Initial packaging for Tizen 64/2464/1
authorGraydon, Tracy <tracy.graydon@intel.com>
Fri, 30 Nov 2012 00:19:46 +0000 (16:19 -0800)
committerGraydon, Tracy <tracy.graydon@intel.com>
Fri, 30 Nov 2012 00:19:46 +0000 (16:19 -0800)
377 files changed:
AUTHORS [new file with mode: 0644]
CONTRIBUTORS [new file with mode: 0644]
COPYING [new file with mode: 0644]
COPYING.GPL [new file with mode: 0644]
COPYING.LGPL [new file with mode: 0644]
ChangeLog [new file with mode: 0644]
Makefile-cmph.am [new file with mode: 0644]
Makefile-examples.am [new file with mode: 0644]
Makefile-gir.am [new file with mode: 0644]
Makefile-girepository.am [new file with mode: 0644]
Makefile-giscanner.am [new file with mode: 0644]
Makefile-tools.am [new file with mode: 0644]
Makefile.am [new file with mode: 0644]
Makefile.in [new file with mode: 0644]
Makefile.introspection [new file with mode: 0644]
NEWS [new file with mode: 0644]
README [new file with mode: 0644]
TODO [new file with mode: 0644]
acinclude.m4 [new file with mode: 0644]
aclocal.m4 [new file with mode: 0644]
build-aux/compile [new file with mode: 0755]
build-aux/config.guess [new file with mode: 0755]
build-aux/config.sub [new file with mode: 0755]
build-aux/depcomp [new file with mode: 0755]
build-aux/install-sh [new file with mode: 0755]
build-aux/ltmain.sh [new file with mode: 0755]
build-aux/missing [new file with mode: 0755]
build-aux/py-compile [new file with mode: 0755]
build-aux/ylwrap [new file with mode: 0755]
common.mk [new file with mode: 0644]
config.h.in [new file with mode: 0644]
configure [new file with mode: 0755]
configure.ac [new file with mode: 0644]
docs/Makefile.am [new file with mode: 0644]
docs/Makefile.in [new file with mode: 0644]
docs/g-ir-compiler.1 [new file with mode: 0644]
docs/g-ir-generate.1 [new file with mode: 0644]
docs/g-ir-scanner.1 [new file with mode: 0644]
docs/reference/Makefile.am [new file with mode: 0644]
docs/reference/Makefile.in [new file with mode: 0644]
docs/reference/gi-docs.sgml [new file with mode: 0644]
docs/reference/gi-gir-reference.xml [new file with mode: 0644]
docs/reference/gi-gir.sgml [new file with mode: 0644]
docs/reference/gi-overrides.txt [new file with mode: 0644]
docs/reference/gi-overview.xml [new file with mode: 0644]
docs/reference/gi-sections.txt [new file with mode: 0644]
docs/reference/gi-struct-hierarchy.xml [new file with mode: 0644]
docs/reference/gi.types [new file with mode: 0644]
docs/reference/html/annotation-glossary.html [new file with mode: 0644]
docs/reference/html/gi-GIArgInfo.html [new file with mode: 0644]
docs/reference/html/gi-GIBaseInfo.html [new file with mode: 0644]
docs/reference/html/gi-GICallableInfo.html [new file with mode: 0644]
docs/reference/html/gi-GIConstantInfo.html [new file with mode: 0644]
docs/reference/html/gi-GIEnumInfo.html [new file with mode: 0644]
docs/reference/html/gi-GIFieldInfo.html [new file with mode: 0644]
docs/reference/html/gi-GIFunctionInfo.html [new file with mode: 0644]
docs/reference/html/gi-GIInterfaceInfo.html [new file with mode: 0644]
docs/reference/html/gi-GIObjectInfo.html [new file with mode: 0644]
docs/reference/html/gi-GIPropertyInfo.html [new file with mode: 0644]
docs/reference/html/gi-GIRegisteredTypeInfo.html [new file with mode: 0644]
docs/reference/html/gi-GISignalInfo.html [new file with mode: 0644]
docs/reference/html/gi-GIStructInfo.html [new file with mode: 0644]
docs/reference/html/gi-GITypeInfo.html [new file with mode: 0644]
docs/reference/html/gi-GIUnionInfo.html [new file with mode: 0644]
docs/reference/html/gi-GIVFuncInfo.html [new file with mode: 0644]
docs/reference/html/gi-ffi.html [new file with mode: 0644]
docs/reference/html/gi-gierrordomaininfo.html [new file with mode: 0644]
docs/reference/html/gi-gir-reference.html [new file with mode: 0644]
docs/reference/html/gi-gir.html [new file with mode: 0644]
docs/reference/html/gi-girepository.html [new file with mode: 0644]
docs/reference/html/gi-girffi.html [new file with mode: 0644]
docs/reference/html/gi-gtypelib.html [new file with mode: 0644]
docs/reference/html/gi-libgirepository.html [new file with mode: 0644]
docs/reference/html/gi-overview.html [new file with mode: 0644]
docs/reference/html/gi-repository-structs.html [new file with mode: 0644]
docs/reference/html/gi-struct-hierarchy.html [new file with mode: 0644]
docs/reference/html/gi-typelib.html [new file with mode: 0644]
docs/reference/html/gi.devhelp2 [new file with mode: 0644]
docs/reference/html/girepository.html [new file with mode: 0644]
docs/reference/html/glib.html [new file with mode: 0644]
docs/reference/html/home.png [new file with mode: 0644]
docs/reference/html/index.html [new file with mode: 0644]
docs/reference/html/index.sgml [new file with mode: 0644]
docs/reference/html/left.png [new file with mode: 0644]
docs/reference/html/overview.png [new file with mode: 0644]
docs/reference/html/right.png [new file with mode: 0644]
docs/reference/html/style.css [new file with mode: 0644]
docs/reference/html/up.png [new file with mode: 0644]
docs/reference/images/overview.png [new file with mode: 0644]
docs/reference/version.xml.in [new file with mode: 0644]
examples/glib-print.c [new file with mode: 0644]
gir/DBus-1.0.gir [new file with mode: 0644]
gir/DBusGLib-1.0.gir [new file with mode: 0644]
gir/GL-1.0.gir [new file with mode: 0644]
gir/cairo-1.0.gir.in [new file with mode: 0644]
gir/fontconfig-2.0.gir [new file with mode: 0644]
gir/freetype2-2.0.gir [new file with mode: 0644]
gir/gio-2.0.c [new file with mode: 0644]
gir/glib-2.0.c [new file with mode: 0644]
gir/gobject-2.0.c [new file with mode: 0644]
gir/libxml2-2.0.gir [new file with mode: 0644]
gir/xfixes-4.0.gir [new file with mode: 0644]
gir/xft-2.0.gir [new file with mode: 0644]
gir/xlib-2.0.gir [new file with mode: 0644]
gir/xrandr-1.3.gir [new file with mode: 0644]
girepository/cmph-bdz-test.c [new file with mode: 0644]
girepository/cmph/bdz.c [new file with mode: 0755]
girepository/cmph/bdz.h [new file with mode: 0755]
girepository/cmph/bdz_ph.c [new file with mode: 0755]
girepository/cmph/bdz_ph.h [new file with mode: 0755]
girepository/cmph/bdz_structs.h [new file with mode: 0755]
girepository/cmph/bdz_structs_ph.h [new file with mode: 0755]
girepository/cmph/bitbool.h [new file with mode: 0644]
girepository/cmph/bmz.c [new file with mode: 0644]
girepository/cmph/bmz.h [new file with mode: 0644]
girepository/cmph/bmz8.c [new file with mode: 0644]
girepository/cmph/bmz8.h [new file with mode: 0644]
girepository/cmph/bmz8_structs.h [new file with mode: 0644]
girepository/cmph/bmz_structs.h [new file with mode: 0644]
girepository/cmph/brz.c [new file with mode: 0755]
girepository/cmph/brz.h [new file with mode: 0644]
girepository/cmph/brz_structs.h [new file with mode: 0755]
girepository/cmph/buffer_entry.c [new file with mode: 0644]
girepository/cmph/buffer_entry.h [new file with mode: 0644]
girepository/cmph/buffer_manager.c [new file with mode: 0644]
girepository/cmph/buffer_manager.h [new file with mode: 0644]
girepository/cmph/chd.c [new file with mode: 0644]
girepository/cmph/chd.h [new file with mode: 0644]
girepository/cmph/chd_ph.c [new file with mode: 0644]
girepository/cmph/chd_ph.h [new file with mode: 0644]
girepository/cmph/chd_structs.h [new file with mode: 0644]
girepository/cmph/chd_structs_ph.h [new file with mode: 0644]
girepository/cmph/chm.c [new file with mode: 0644]
girepository/cmph/chm.h [new file with mode: 0644]
girepository/cmph/chm_structs.h [new file with mode: 0644]
girepository/cmph/cmph.c [new file with mode: 0644]
girepository/cmph/cmph.h [new file with mode: 0644]
girepository/cmph/cmph_structs.c [new file with mode: 0644]
girepository/cmph/cmph_structs.h [new file with mode: 0644]
girepository/cmph/cmph_time.h [new file with mode: 0644]
girepository/cmph/cmph_types.h [new file with mode: 0644]
girepository/cmph/compressed_rank.c [new file with mode: 0644]
girepository/cmph/compressed_rank.h [new file with mode: 0644]
girepository/cmph/compressed_seq.c [new file with mode: 0644]
girepository/cmph/compressed_seq.h [new file with mode: 0644]
girepository/cmph/debug.h [new file with mode: 0644]
girepository/cmph/fch.c [new file with mode: 0644]
girepository/cmph/fch.h [new file with mode: 0644]
girepository/cmph/fch_buckets.c [new file with mode: 0644]
girepository/cmph/fch_buckets.h [new file with mode: 0644]
girepository/cmph/fch_structs.h [new file with mode: 0755]
girepository/cmph/graph.c [new file with mode: 0644]
girepository/cmph/graph.h [new file with mode: 0644]
girepository/cmph/hash.c [new file with mode: 0644]
girepository/cmph/hash.h [new file with mode: 0644]
girepository/cmph/hash_state.h [new file with mode: 0644]
girepository/cmph/jenkins_hash.c [new file with mode: 0644]
girepository/cmph/jenkins_hash.h [new file with mode: 0644]
girepository/cmph/miller_rabin.c [new file with mode: 0644]
girepository/cmph/miller_rabin.h [new file with mode: 0644]
girepository/cmph/select.c [new file with mode: 0644]
girepository/cmph/select.h [new file with mode: 0644]
girepository/cmph/select_lookup_tables.h [new file with mode: 0644]
girepository/cmph/vqueue.c [new file with mode: 0644]
girepository/cmph/vqueue.h [new file with mode: 0644]
girepository/cmph/vstack.c [new file with mode: 0644]
girepository/cmph/vstack.h [new file with mode: 0644]
girepository/gdump.c [new file with mode: 0644]
girepository/gi-dump-types.c [new file with mode: 0644]
girepository/giarginfo.c [new file with mode: 0644]
girepository/giarginfo.h [new file with mode: 0644]
girepository/gibaseinfo.c [new file with mode: 0644]
girepository/gibaseinfo.h [new file with mode: 0644]
girepository/gicallableinfo.c [new file with mode: 0644]
girepository/gicallableinfo.h [new file with mode: 0644]
girepository/giconstantinfo.c [new file with mode: 0644]
girepository/giconstantinfo.h [new file with mode: 0644]
girepository/gienuminfo.c [new file with mode: 0644]
girepository/gienuminfo.h [new file with mode: 0644]
girepository/gifieldinfo.c [new file with mode: 0644]
girepository/gifieldinfo.h [new file with mode: 0644]
girepository/gifunctioninfo.c [new file with mode: 0644]
girepository/gifunctioninfo.h [new file with mode: 0644]
girepository/giinterfaceinfo.c [new file with mode: 0644]
girepository/giinterfaceinfo.h [new file with mode: 0644]
girepository/ginvoke.c [new file with mode: 0644]
girepository/giobjectinfo.c [new file with mode: 0644]
girepository/giobjectinfo.h [new file with mode: 0644]
girepository/gipropertyinfo.c [new file with mode: 0644]
girepository/gipropertyinfo.h [new file with mode: 0644]
girepository/giregisteredtypeinfo.c [new file with mode: 0644]
girepository/giregisteredtypeinfo.h [new file with mode: 0644]
girepository/girepository-private.h [new file with mode: 0644]
girepository/girepository.c [new file with mode: 0644]
girepository/girepository.h [new file with mode: 0644]
girepository/girffi.c [new file with mode: 0644]
girepository/girffi.h [new file with mode: 0644]
girepository/girmodule.c [new file with mode: 0644]
girepository/girmodule.h [new file with mode: 0644]
girepository/girnode.c [new file with mode: 0644]
girepository/girnode.h [new file with mode: 0644]
girepository/giroffsets.c [new file with mode: 0644]
girepository/girparser.c [new file with mode: 0644]
girepository/girparser.h [new file with mode: 0644]
girepository/girwriter.c [new file with mode: 0644]
girepository/girwriter.h [new file with mode: 0644]
girepository/gisignalinfo.c [new file with mode: 0644]
girepository/gisignalinfo.h [new file with mode: 0644]
girepository/gistructinfo.c [new file with mode: 0644]
girepository/gistructinfo.h [new file with mode: 0644]
girepository/gitypeinfo.c [new file with mode: 0644]
girepository/gitypeinfo.h [new file with mode: 0644]
girepository/gitypelib-internal.h [new file with mode: 0644]
girepository/gitypelib.c [new file with mode: 0644]
girepository/gitypelib.h [new file with mode: 0644]
girepository/gitypes.h [new file with mode: 0644]
girepository/giunioninfo.c [new file with mode: 0644]
girepository/giunioninfo.h [new file with mode: 0644]
girepository/givfuncinfo.c [new file with mode: 0644]
girepository/givfuncinfo.h [new file with mode: 0644]
girepository/glib-compat.h [new file with mode: 0644]
girepository/gthash-test.c [new file with mode: 0644]
girepository/gthash.c [new file with mode: 0644]
giscanner/__init__.py [new file with mode: 0644]
giscanner/annotationmain.py [new file with mode: 0644]
giscanner/annotationparser.py [new file with mode: 0644]
giscanner/ast.py [new file with mode: 0644]
giscanner/cachestore.py [new file with mode: 0644]
giscanner/codegen.py [new file with mode: 0644]
giscanner/docmain.py [new file with mode: 0644]
giscanner/dumper.py [new file with mode: 0644]
giscanner/gdumpparser.py [new file with mode: 0644]
giscanner/girparser.py [new file with mode: 0644]
giscanner/girwriter.py [new file with mode: 0644]
giscanner/giscannermodule.c [new file with mode: 0644]
giscanner/grealpath.h [new file with mode: 0644]
giscanner/introspectablepass.py [new file with mode: 0644]
giscanner/libtoolimporter.py [new file with mode: 0644]
giscanner/maintransformer.py [new file with mode: 0644]
giscanner/mallard-C-class.tmpl [new file with mode: 0644]
giscanner/mallard-C-default.tmpl [new file with mode: 0644]
giscanner/mallard-C-enum.tmpl [new file with mode: 0644]
giscanner/mallard-C-function.tmpl [new file with mode: 0644]
giscanner/mallard-C-namespace.tmpl [new file with mode: 0644]
giscanner/mallard-C-property.tmpl [new file with mode: 0644]
giscanner/mallard-C-record.tmpl [new file with mode: 0644]
giscanner/mallard-C-signal.tmpl [new file with mode: 0644]
giscanner/mallard-C-vfunc.tmpl [new file with mode: 0644]
giscanner/mallard-Python-class.tmpl [new file with mode: 0644]
giscanner/mallard-Python-default.tmpl [new file with mode: 0644]
giscanner/mallard-Python-enum.tmpl [new file with mode: 0644]
giscanner/mallard-Python-function.tmpl [new file with mode: 0644]
giscanner/mallard-Python-namespace.tmpl [new file with mode: 0644]
giscanner/mallard-Python-property.tmpl [new file with mode: 0644]
giscanner/mallard-Python-record.tmpl [new file with mode: 0644]
giscanner/mallard-Python-signal.tmpl [new file with mode: 0644]
giscanner/mallard-Python-vfunc.tmpl [new file with mode: 0644]
giscanner/mallardwriter.py [new file with mode: 0644]
giscanner/message.py [new file with mode: 0644]
giscanner/odict.py [new file with mode: 0644]
giscanner/scannerlexer.l [new file with mode: 0644]
giscanner/scannermain.py [new file with mode: 0755]
giscanner/scannerparser.y [new file with mode: 0644]
giscanner/shlibs.py [new file with mode: 0644]
giscanner/sourcescanner.c [new file with mode: 0644]
giscanner/sourcescanner.h [new file with mode: 0644]
giscanner/sourcescanner.py [new file with mode: 0644]
giscanner/testcodegen.py [new file with mode: 0644]
giscanner/transformer.py [new file with mode: 0644]
giscanner/utils.py [new file with mode: 0644]
giscanner/xmlwriter.py [new file with mode: 0755]
gobject-introspection-1.0.pc [new file with mode: 0644]
gobject-introspection-1.0.pc.in [new file with mode: 0644]
gobject-introspection-no-export-1.0.pc [new file with mode: 0644]
gobject-introspection-no-export-1.0.pc.in [new file with mode: 0644]
gtk-doc.make [new file with mode: 0644]
m4/Makefile.am [new file with mode: 0644]
m4/Makefile.in [new file with mode: 0644]
m4/as-compiler-flag.m4 [new file with mode: 0644]
m4/gtk-doc.m4 [new file with mode: 0644]
m4/introspection.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]
misc/pep8.py [new file with mode: 0644]
misc/pre-commit [new file with mode: 0755]
misc/pyflakes.py [new file with mode: 0644]
packaging/gobject-introspection.spec [new file with mode: 0644]
scannerlexer.c [new file with mode: 0644]
scannerparser.c [new file with mode: 0644]
scannerparser.h [new file with mode: 0644]
tests/Makefile.am [new file with mode: 0644]
tests/Makefile.in [new file with mode: 0644]
tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj-property-example.page [new file with mode: 0644]
tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj-signal-example.page [new file with mode: 0644]
tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj-vfunc.page [new file with mode: 0644]
tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.method.page [new file with mode: 0644]
tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.new.page [new file with mode: 0644]
tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.page [new file with mode: 0644]
tests/doctool/DocExamples-1.0-C-expected/DocExamples.ObjClass.page [new file with mode: 0644]
tests/doctool/DocExamples-1.0-C-expected/index.page [new file with mode: 0644]
tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-property-example.page [new file with mode: 0644]
tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-signal-example.page [new file with mode: 0644]
tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-vfunc.page [new file with mode: 0644]
tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.method.page [new file with mode: 0644]
tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.page [new file with mode: 0644]
tests/doctool/DocExamples-1.0-Python-expected/index.page [new file with mode: 0644]
tests/doctool/Makefile.am [new file with mode: 0644]
tests/doctool/Makefile.in [new file with mode: 0644]
tests/doctool/doc-examples-obj.c [new file with mode: 0644]
tests/doctool/doc-examples-obj.h [new file with mode: 0644]
tests/everything.c [new file with mode: 0644]
tests/gimarshallingtests.c [new file with mode: 0644]
tests/gimarshallingtests.h [new file with mode: 0644]
tests/offsets/Makefile.am [new file with mode: 0644]
tests/offsets/Makefile.in [new file with mode: 0644]
tests/offsets/gen-gitestoffsets [new file with mode: 0755]
tests/offsets/offsets.c [new file with mode: 0644]
tests/offsets/offsets.h [new file with mode: 0644]
tests/repository/Makefile.am [new file with mode: 0644]
tests/repository/Makefile.in [new file with mode: 0644]
tests/repository/gitestrepo.c [new file with mode: 0644]
tests/repository/gitestthrows.c [new file with mode: 0644]
tests/repository/gitypelibtest.c [new file with mode: 0644]
tests/scanner/Annotation-1.0-expected.gir [new file with mode: 0644]
tests/scanner/Bar-1.0-expected.gir [new file with mode: 0644]
tests/scanner/Foo-1.0-expected.gir [new file with mode: 0644]
tests/scanner/GetType-1.0-expected.gir [new file with mode: 0644]
tests/scanner/GtkFrob-1.0-expected.gir [new file with mode: 0644]
tests/scanner/Makefile.am [new file with mode: 0644]
tests/scanner/Makefile.in [new file with mode: 0644]
tests/scanner/Regress-1.0-expected.gir [new file with mode: 0644]
tests/scanner/TestInherit-1.0-expected.gir [new file with mode: 0644]
tests/scanner/Utility-1.0-expected.gir [new file with mode: 0644]
tests/scanner/annotation.c [new file with mode: 0644]
tests/scanner/annotation.h [new file with mode: 0644]
tests/scanner/barapp.c [new file with mode: 0644]
tests/scanner/barapp.h [new file with mode: 0644]
tests/scanner/drawable.c [new file with mode: 0644]
tests/scanner/drawable.h [new file with mode: 0644]
tests/scanner/foo.c [new file with mode: 0644]
tests/scanner/foo.h [new file with mode: 0644]
tests/scanner/gettype.c [new file with mode: 0644]
tests/scanner/gettype.h [new file with mode: 0644]
tests/scanner/gtkfrob.c [new file with mode: 0644]
tests/scanner/gtkfrob.h [new file with mode: 0644]
tests/scanner/headeronly.h [new file with mode: 0644]
tests/scanner/regress.c [new file with mode: 0644]
tests/scanner/regress.h [new file with mode: 0644]
tests/scanner/utility.c [new file with mode: 0644]
tests/scanner/utility.h [new file with mode: 0644]
tests/warn/Makefile.am [new file with mode: 0644]
tests/warn/Makefile.in [new file with mode: 0644]
tests/warn/callback-invalid-scope.h [new file with mode: 0644]
tests/warn/callback-missing-scope.h [new file with mode: 0644]
tests/warn/common.h [new file with mode: 0644]
tests/warn/invalid-array.h [new file with mode: 0644]
tests/warn/invalid-closure.h [new file with mode: 0644]
tests/warn/invalid-constructor.h [new file with mode: 0644]
tests/warn/invalid-element-type.h [new file with mode: 0644]
tests/warn/invalid-method.h [new file with mode: 0644]
tests/warn/invalid-option.h [new file with mode: 0644]
tests/warn/invalid-out.h [new file with mode: 0644]
tests/warn/invalid-transfer.h [new file with mode: 0644]
tests/warn/missing-element-type.h [new file with mode: 0644]
tests/warn/return-gobject.h [new file with mode: 0644]
tests/warn/unknown-parameter.h [new file with mode: 0644]
tests/warn/unresolved-type.h [new file with mode: 0644]
tests/warn/warningtester.py [new file with mode: 0644]
tools/compiler.c [new file with mode: 0644]
tools/g-ir-annotation-tool.in [new file with mode: 0755]
tools/g-ir-doc-tool.in [new file with mode: 0644]
tools/g-ir-scanner.in [new file with mode: 0755]
tools/generate.c [new file with mode: 0644]

diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..f791187
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,9 @@
+Colin Walters <walters@verbum.org>
+Johan Dahlin <johan@gnome.org>
+
+Original girepository author:
+Matthias Clasen <mclasen@redhat.com>
+
+Original scanner author:
+Jürg Billeter  <j@bitron.ch>
+
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
new file mode 100644 (file)
index 0000000..1b2f67d
--- /dev/null
@@ -0,0 +1,78 @@
+Adam Sampson
+Adel Gadllah
+Alan Knowles
+Alexey Zakhlestin
+Andreas Rottmann
+Bastien Nocera
+Brian Cameron
+Chris Rivera
+Christian Persch
+Christophe Fergeau
+Colin Walters
+C. Scott Ananian
+Damien Lespiau
+Danielle Madeley
+Dan Winship
+David Ignacio
+David Zeuthen
+Didier 'Ptitjes
+dyfet@gnutelephony.org
+Eduardo Lima Mitev
+Emmanuele Bassi
+Florian Müllner
+Funda Wang
+Gustavo J. A. M. Carneiro
+Gustavo Noronha Silva
+Halton Huo
+Havoc Pennington
+Holger Hans Peter Freyther
+Iain Nicol
+Jani Monoses
+Jasper Lievisse Adriaanse
+Javier Jardón
+Joe Marcus Clarke
+Johan Bilien
+Johan Dahlin
+John (J5) Palmieri
+John Ehresman
+Jonathan Matthew
+Josselin Mouette
+Jürg Billeter
+Kedar Sovani
+Luca Bruno
+Lucas Rocha
+Maciej Katafiasz
+Marc-Andre Lureau
+Marco Pesenti Gritti
+Marina Zhurakhinskaya
+Mark Doffman
+Mark Lee
+Matthias Clasen
+Maxim Ermilov
+Michael Meeks
+Owen Taylor
+Pavel Holejsovsky
+Philip Van Hoof
+Richard Hult
+Robert Ancell
+Robert Carr
+Rob Taylor
+Ryan Lortie
+Saikiran Madugula
+Saleem Abdulrasool
+Saleem Ansari
+Simon McVittie
+Simon van der Linden
+Simón Pena
+Stefan Kost
+Steve Frécinaux
+Theppitak Karoonboonyanan
+Tim Horton
+Tobias Mueller
+Tomeu Vizoso
+Tommi Komulainen
+Tor Lillqvist
+Torsten Schönfeld
+Tristan Van Berkom
+Xan Lopez
+Zachary Goldberg
diff --git a/COPYING b/COPYING
new file mode 100644 (file)
index 0000000..3c45039
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,12 @@
+gobject-introspection has two licenses; one for the typelib library,
+and one for the tools.
+
+The scanner (giscanner/) and typelib libraries (girepository/) are
+licensed under the LGPLv2+.  See the file COPYING.LGPL.
+
+The tools (tools/) are licensed under the GPLv2+.  See the file COPYING.GPL.
+
+There is also some MIT code in giscanner/.  In general where
+applicable files should have headers denoting their license status; if
+they do not, please file a bug at http://bugzilla.gnome.org.
+
diff --git a/COPYING.GPL b/COPYING.GPL
new file mode 100644 (file)
index 0000000..d60c31a
--- /dev/null
@@ -0,0 +1,340 @@
+                   GNU GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, 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 or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+\f
+                   GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+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 give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, 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) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+\f
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+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 Program, 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 Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) 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; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, 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 executable.  However, as a
+special exception, the source code 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.
+
+If distribution of executable or 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 counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+\f
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program 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.
+
+  5. 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 Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program 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 to
+this License.
+
+  7. 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 Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program 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 Program.
+
+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.
+\f
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program 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.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the 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 Program
+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 Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, 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
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "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 PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. 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 PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), 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 Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  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 program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year  name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/COPYING.LGPL b/COPYING.LGPL
new file mode 100644 (file)
index 0000000..bf50f20
--- /dev/null
@@ -0,0 +1,482 @@
+                 GNU LIBRARY GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+                   59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL.  It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+                           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 Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it.  You can use it for
+your libraries, too.
+
+  When we speak of free software, we are referring to freedom, 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 or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the 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 a program 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.
+
+  Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library.  If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+\f
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software.  To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+  Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs.  This
+license, the GNU Library General Public License, applies to certain
+designated libraries.  This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+  The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it.  Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program.  However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+  Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries.  We
+concluded that weaker conditions might promote sharing better.
+
+  However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves.  This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them.  (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.)  The hope is that this
+will lead to faster development of free libraries.
+
+  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, while the latter only
+works together with the library.
+
+  Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+\f
+                 GNU LIBRARY GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+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 compile 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) 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.
+
+    c) 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.
+
+    d) 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 source code 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 to
+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 Library 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 Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 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
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public
+    License along with this library; if not, write to the 
+    Free Software Foundation, Inc., 59 Temple Place - Suite 330, 
+    Boston, MA  02111-1307  USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/ChangeLog b/ChangeLog
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/Makefile-cmph.am b/Makefile-cmph.am
new file mode 100644 (file)
index 0000000..7bca06b
--- /dev/null
@@ -0,0 +1,74 @@
+noinst_LTLIBRARIES += libcmph.la
+
+libcmph_la_CPPFLAGS = -Icmph $(GLIB_CFLAGS)
+libcmph_la_LIBADD = -lm $(GLIB_LIBS)
+
+libcmph_la_SOURCES = \
+       girepository/cmph/bdz.c \
+       girepository/cmph/bdz.h \
+       girepository/cmph/bdz_ph.c \
+       girepository/cmph/bdz_ph.h \
+       girepository/cmph/bdz_structs.h \
+       girepository/cmph/bdz_structs_ph.h \
+       girepository/cmph/bitbool.h \
+       girepository/cmph/bmz8.c \
+       girepository/cmph/bmz8.h \
+       girepository/cmph/bmz8_structs.h \
+       girepository/cmph/bmz.c \
+       girepository/cmph/bmz.h \
+       girepository/cmph/bmz_structs.h \
+       girepository/cmph/brz.c \
+       girepository/cmph/brz.h \
+       girepository/cmph/brz_structs.h \
+       girepository/cmph/buffer_entry.c \
+       girepository/cmph/buffer_entry.h \
+       girepository/cmph/buffer_manager.c \
+       girepository/cmph/buffer_manager.h \
+       girepository/cmph/chd.c \
+       girepository/cmph/chd.h \
+       girepository/cmph/chd_ph.c \
+       girepository/cmph/chd_ph.h \
+       girepository/cmph/chd_structs.h \
+       girepository/cmph/chd_structs_ph.h \
+       girepository/cmph/chm.c \
+       girepository/cmph/chm.h \
+       girepository/cmph/chm_structs.h \
+       girepository/cmph/cmph.c \
+       girepository/cmph/cmph.h \
+       girepository/cmph/cmph_structs.c \
+       girepository/cmph/cmph_structs.h \
+       girepository/cmph/cmph_time.h \
+       girepository/cmph/cmph_types.h \
+       girepository/cmph/compressed_rank.c \
+       girepository/cmph/compressed_rank.h \
+       girepository/cmph/compressed_seq.c \
+       girepository/cmph/compressed_seq.h \
+       girepository/cmph/debug.h \
+       girepository/cmph/fch_buckets.c \
+       girepository/cmph/fch_buckets.h \
+       girepository/cmph/fch.c \
+       girepository/cmph/fch.h \
+       girepository/cmph/fch_structs.h \
+       girepository/cmph/graph.c \
+       girepository/cmph/graph.h \
+       girepository/cmph/hash.c \
+       girepository/cmph/hash.h \
+       girepository/cmph/hash_state.h \
+       girepository/cmph/jenkins_hash.c \
+       girepository/cmph/jenkins_hash.h \
+       girepository/cmph/miller_rabin.c \
+       girepository/cmph/miller_rabin.h \
+       girepository/cmph/select.c \
+       girepository/cmph/select.h \
+       girepository/cmph/select_lookup_tables.h \
+       girepository/cmph/vqueue.c \
+       girepository/cmph/vqueue.h \
+       girepository/cmph/vstack.c \
+       girepository/cmph/vstack.h
+
+GTESTER_PROGS += cmph-bdz-test
+
+cmph_bdz_test_SOURCES = girepository/cmph-bdz-test.c
+cmph_bdz_test_CFLAGS = -I$(top_srcdir)/girepository/cmph $(GOBJECT_CFLAGS)
+cmph_bdz_test_LDADD = libcmph.la $(GOBJECT_LIBS)
+
diff --git a/Makefile-examples.am b/Makefile-examples.am
new file mode 100644 (file)
index 0000000..0d9cedc
--- /dev/null
@@ -0,0 +1,5 @@
+noinst_PROGRAMS += glib-print
+
+glib_print_SOURCES = examples/glib-print.c
+glib_print_CFLAGS = $(GOBJECT_CFLAGS) -I$(top_srcdir)/girepository
+glib_print_LDADD = libgirepository-1.0.la $(GOBJECT_LIBS)
diff --git a/Makefile-gir.am b/Makefile-gir.am
new file mode 100644 (file)
index 0000000..364d5ec
--- /dev/null
@@ -0,0 +1,235 @@
+BUILT_GIRSOURCES =
+SUBSTITUTED_GIRSOURCES =
+
+STATIC_GIRSOURCES =               \
+        gir/DBus-1.0.gir           \
+        gir/DBusGLib-1.0.gir        \
+        gir/fontconfig-2.0.gir      \
+        gir/freetype2-2.0.gir       \
+        gir/GL-1.0.gir              \
+        gir/libxml2-2.0.gir         \
+        gir/xft-2.0.gir             \
+        gir/xlib-2.0.gir            \
+        gir/xfixes-4.0.gir          \
+        gir/xrandr-1.3.gir
+EXTRA_DIST += $(STATIC_GIRSOURCES)
+
+gir/cairo-1.0.gir: gir/cairo-1.0.gir.in Makefile
+       [ -d $(@D) ] || $(mkdir_p) $(@D) ; \
+       sed \
+       -e s,%CAIRO_SHARED_LIBRARY%,$(CAIRO_SHARED_LIBRARY), \
+       -e s,%CAIRO_GIR_PACKAGE%,$(CAIRO_GIR_PACKAGE), \
+       < $< > $@.tmp && mv $@.tmp $@
+BUILT_SOURCES += gir/cairo-1.0.gir
+SUBSTITUTED_GIRSOURCES += gir/cairo-1.0.gir
+CLEANFILES += gir/cairo-1.0.gir
+EXTRA_DIST += gir/cairo-1.0.gir.in
+
+# Doesn't seem to work to do gir/%.typelib =(
+gir/cairo-1.0.typelib: g-ir-compiler
+gir/DBus-1.0.typelib: g-ir-compiler
+gir/DBusGLib-1.0.typelib: g-ir-compiler
+gir/fontconfig-2.0.typelib: g-ir-compiler
+gir/freetype2-2.0.typelib: g-ir-compiler
+gir/GL-1.0.typelib: g-ir-compiler
+gir/libxml2-2.0.typelib: g-ir-compiler
+gir/xft-2.0.typelib: g-ir-compiler
+gir/xlib-2.0.typelib: g-ir-compiler
+gir/xfixes-4.0.typelib: g-ir-compiler
+gir/xrandr-1.3.typelib: g-ir-compiler
+
+# glib with source (to enable documentation)
+if WITH_GLIBSRC
+     GLib_2_0_gir_DOCSRC = $(GLIBSRC)/glib/*.c
+     GObject_2_0_gir_DOCSRC = $(GLIBSRC)/gobject/*.c
+     GModule_2_0_gir_DOCSRC = $(GLIBSRC)/gmodule/*.c
+     Gio_2_0_gir_DOCSRC = $(GLIBSRC)/gio/*.c
+else
+    GLib_2_0_gir_DOCSRC = 
+    GObject_2_0_gir_DOCSRC = 
+    GModule_2_0_gir_DOCSRC = 
+    Gio_2_0_gir_DOCSRC = 
+
+endif
+
+# glib
+GLIB_INCLUDEDIR=$(shell pkg-config --variable=includedir glib-2.0)/glib-2.0
+GLIB_LIBDIR=$(shell pkg-config --variable=libdir glib-2.0)
+
+if OS_WIN32
+GLIB_LIBRARY=libglib-2.0-0
+else
+GLIB_LIBRARY=glib-2.0
+endif
+
+GLib_2_0_gir_LIBS = $(GLIB_LIBRARY) $(GOBJECT_LIBRARY)
+GLib_2_0_gir_SCANNERFLAGS = \
+            --external-library \
+            --reparse-validate \
+            --identifier-prefix=G \
+            --symbol-prefix=g \
+            --symbol-prefix=glib \
+            --c-include="glib.h" \
+            $(GLib_2_0_gir_DOCSRC)
+GLib_2_0_gir_PACKAGES = glib-2.0
+GLib_2_0_gir_CFLAGS = \
+            -I$(GLIB_INCLUDEDIR) \
+            -I$(GLIB_LIBDIR)/glib-2.0/include \
+            -DGETTEXT_PACKAGE=Dummy \
+            -DGLIB_COMPILATION \
+            -D__G_I18N_LIB_H__
+GLib_2_0_gir_FILES =  \
+                $(GLIB_LIBDIR)/glib-2.0/include/glibconfig.h \
+               $(GLIB_INCLUDEDIR)/glib/*.h \
+               $(GLIB_INCLUDEDIR)/gobject/glib-types.h \
+                gir/glib-2.0.c
+
+BUILT_GIRSOURCES += GLib-2.0.gir
+
+GLib-2.0.gir: g-ir-scanner g-ir-compiler$(EXEEXT)
+
+gir/DBusGLib-1.0.typelib: GObject-2.0.gir
+
+# gobject
+GOBJECT_INCLUDEDIR=$(shell pkg-config --variable=includedir gobject-2.0)/glib-2.0
+GOBJECT_LIBDIR=$(shell pkg-config --variable=libdir gobject-2.0)
+
+if OS_WIN32
+GOBJECT_LIBRARY=libgobject-2.0-0
+else
+GOBJECT_LIBRARY=gobject-2.0
+endif
+
+GObject-2.0.gir: GLib-2.0.gir
+GObject_2_0_gir_LIBS = $(GOBJECT_LIBRARY)
+GObject_2_0_gir_SCANNERFLAGS = \
+            --external-library \
+            --reparse-validate \
+            --identifier-prefix=G \
+            --c-include="glib-object.h" \
+            --add-include-path=. \
+            $(GObject_2_0_gir_DOCSRC)
+
+GObject_2_0_gir_PACKAGES = gobject-2.0
+GObject_2_0_gir_INCLUDES = GLib-2.0
+GObject_2_0_gir_CFLAGS = \
+            -DGOBJECT_COMPILATION \
+            -I$(GOBJECT_INCLUDEDIR) \
+            -I$(GOBJECT_LIBDIR)/glib-2.0/include
+GObject_2_0_gir_FILES = \
+       $(filter-out $(GOBJECT_INCLUDEDIR)/gobject/glib-types.h, $(wildcard $(GOBJECT_INCLUDEDIR)/gobject/*.h)) \
+       gir/gobject-2.0.c
+
+BUILT_GIRSOURCES += GObject-2.0.gir
+
+# gmodule
+GMODULE_INCLUDEDIR=$(shell pkg-config --variable=includedir gmodule-2.0)/glib-2.0
+GMODULE_LIBDIR=$(shell pkg-config --variable=libdir gmodule-2.0)
+
+if OS_WIN32
+GMODULE_LIBRARY=libgmodule-2.0-0
+else
+GMODULE_LIBRARY=gmodule-2.0
+endif
+
+GModule-2.0.gir: GLib-2.0.gir
+
+GModule_2_0_gir_LIBS = $(GMODULE_LIBRARY)
+GModule_2_0_gir_SCANNERFLAGS = \
+            --external-library \
+            --identifier-prefix=G \
+            --c-include="gmodule.h" \
+            --add-include-path=. \
+            $(GModule_2_0_gir_DOCSRC)
+
+GModule_2_0_gir_PACKAGES = gmodule-2.0
+GModule_2_0_gir_INCLUDES = GLib-2.0
+GModule_2_0_gir_CFLAGS = \
+            -I$(GMODULE_INCLUDEDIR) \
+            -I$(GMODULE_LIBDIR)/glib-2.0/include
+GModule_2_0_gir_FILES = $(GLIB_INCLUDEDIR)/gmodule.h
+
+BUILT_GIRSOURCES += GModule-2.0.gir
+
+# gio
+GIO_INCLUDEDIR=$(shell pkg-config --variable=includedir gio-2.0)/glib-2.0
+GIO_LIBDIR=$(shell pkg-config --variable=libdir gio-2.0)
+
+if OS_WIN32
+GIO_LIBRARY=libgio-2.0-0
+else
+GIO_LIBRARY=gio-2.0
+endif
+
+if HAVE_GIO_UNIX
+GIO_UNIX_HDRS=$(shell pkg-config --variable=includedir gio-unix-2.0)/gio-unix-2.0/gio/*.h
+GIO_UNIX_PACKAGES = gio-unix-2.0
+else
+GIO_UNIX_HDRS=
+GIO_UNIX_PACKAGES =
+endif
+GIO_CINCLUDES=$(patsubst %,--c-include='%',$(shell echo $(GIO_UNIX_HDRS)))
+
+Gio-2.0.gir: GObject-2.0.gir
+
+Gio_2_0_gir_LIBS = $(GIO_LIBRARY)
+Gio_2_0_gir_SCANNERFLAGS = \
+            --external-library \
+            --reparse-validate \
+            --warn-all \
+            --identifier-prefix=G \
+            --c-include="gio/gio.h" \
+            $(GIO_CINCLUDES) \
+            --add-include-path=. \
+            $(Gio_2_0_gir_DOCSRC)
+
+Gio_2_0_gir_PACKAGES = gio-2.0 $(GIO_UNIX_PACKAGES)
+Gio_2_0_gir_INCLUDES = GObject-2.0
+Gio_2_0_gir_CFLAGS = \
+            -DGIO_COMPILATION \
+            -I$(GIO_LIBDIR)/glib-2.0/include
+Gio_2_0_gir_FILES = \
+            $(GIO_UNIX_HDRS) \
+            $(filter-out %/gsettingsbackend.h, $(shell echo $(GIO_INCLUDEDIR)/gio/*.h)) \
+            gir/gio-2.0.c
+
+BUILT_GIRSOURCES += Gio-2.0.gir
+EXTRA_DIST += gir/glib-2.0.c gir/gobject-2.0.c gir/gio-2.0.c
+
+# girepository
+GIRepository-2.0.gir: GObject-2.0.gir libgirepository-1.0.la
+
+GIRepository_2_0_gir_LIBS = libgirepository-1.0.la
+GIRepository_2_0_gir_SCANNERFLAGS = \
+       --warn-all \
+        --identifier-prefix=GI \
+        --symbol-prefix=g \
+        --c-include="girepository.h" \
+        --add-include-path=.
+GIRepository_2_0_gir_PACKAGES = gobject-2.0
+GIRepository_2_0_gir_INCLUDES = GObject-2.0
+GIRepository_2_0_gir_EXPORT_PACKAGES = gobject-introspection-1.0
+GIRepository_2_0_gir_CFLAGS = \
+    -I$(top_srcdir)/girepository -I$(top_srcdir) \
+    -DGI_COMPILATION
+GIRepository_2_0_gir_FILES = \
+        $(top_srcdir)/girepository/girepository.h   \
+        $(top_srcdir)/girepository/girepository.c   \
+        $(top_srcdir)/girepository/gi*info.c       \
+        $(top_srcdir)/girepository/gi*info.h       \
+        $(top_srcdir)/girepository/gitypelib.h     \
+        $(top_srcdir)/girepository/gitypes.h
+
+BUILT_GIRSOURCES += GIRepository-2.0.gir
+
+CLEANFILES += $(BUILT_GIRSOURCES)
+
+INTROSPECTION_GIRS += $(BUILT_GIRSOURCES)
+
+girdir = $(GIR_DIR)
+gir_DATA = $(STATIC_GIRSOURCES) $(SUBSTITUTED_GIRSOURCES) $(BUILT_GIRSOURCES)
+
+typelibsdir = $(libdir)/girepository-1.0
+typelibs_DATA = $(gir_DATA:.gir=.typelib)
+
+CLEANFILES += $(typelibs_DATA)
diff --git a/Makefile-girepository.am b/Makefile-girepository.am
new file mode 100644 (file)
index 0000000..2c07b3a
--- /dev/null
@@ -0,0 +1,92 @@
+girepodir = $(includedir)/gobject-introspection-1.0/
+girepo_HEADERS =                                       \
+       girepository/giarginfo.h                        \
+       girepository/gibaseinfo.h                       \
+       girepository/gicallableinfo.h                   \
+       girepository/giconstantinfo.h                   \
+       girepository/gienuminfo.h                       \
+       girepository/gifieldinfo.h                      \
+       girepository/gifunctioninfo.h                   \
+       girepository/giinterfaceinfo.h                  \
+       girepository/giobjectinfo.h                     \
+       girepository/gipropertyinfo.h                   \
+       girepository/giregisteredtypeinfo.h             \
+       girepository/girepository.h                     \
+       girepository/girffi.h                           \
+       girepository/gisignalinfo.h                     \
+       girepository/gistructinfo.h                     \
+       girepository/gitypeinfo.h                       \
+       girepository/gitypelib.h                        \
+       girepository/gitypes.h                          \
+       girepository/giunioninfo.h                      \
+       girepository/givfuncinfo.h
+
+lib_LTLIBRARIES += libgirepository-1.0.la
+noinst_LTLIBRARIES += libgirepository-internals.la libgirepository-gthash.la
+
+libgirepository_gthash_la_SOURCES =                            \
+       girepository/gthash.c
+libgirepository_gthash_la_CFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
+libgirepository_gthash_la_LIBADD = libcmph.la $(GIREPO_LIBS)
+
+libgirepository_internals_la_SOURCES =                         \
+       girepository/girmodule.c                                \
+       girepository/girmodule.h                                \
+       girepository/girnode.c                                  \
+       girepository/girnode.h                                  \
+       girepository/giroffsets.c                               \
+       girepository/girparser.c                                \
+       girepository/girparser.h                                \
+       girepository/girwriter.c                                \
+       girepository/girwriter.h
+
+libgirepository_internals_la_CFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
+libgirepository_internals_la_LIBADD = libgirepository-gthash.la $(GIREPO_LIBS)
+
+libgirepository_1_0_la_SOURCES =                       \
+       girepository/gdump.c                            \
+       girepository/giarginfo.c                        \
+       girepository/gibaseinfo.c                       \
+       girepository/gicallableinfo.c                   \
+       girepository/giconstantinfo.c                   \
+       girepository/gienuminfo.c                       \
+       girepository/gifieldinfo.c                      \
+       girepository/gifunctioninfo.c                   \
+       girepository/ginvoke.c                          \
+       girepository/giinterfaceinfo.c                  \
+       girepository/giobjectinfo.c                     \
+       girepository/gipropertyinfo.c                   \
+       girepository/giregisteredtypeinfo.c             \
+       girepository/girepository.c                     \
+       girepository/girepository-private.h             \
+       girepository/girffi.c                           \
+       girepository/girffi.h                           \
+       girepository/gisignalinfo.c                     \
+       girepository/gistructinfo.c                     \
+       girepository/gitypeinfo.c                       \
+       girepository/gitypelib.c                        \
+       girepository/gitypelib-internal.h               \
+       girepository/glib-compat.h                      \
+       girepository/giunioninfo.c                      \
+       girepository/givfuncinfo.c
+
+libgirepository_1_0_la_CPPFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository -DG_IREPOSITORY_COMPILATION
+libgirepository_1_0_la_LIBADD = libgirepository-gthash.la $(GIREPO_LIBS)
+libgirepository_1_0_la_LDFLAGS = -no-undefined -version-number 1:0:0 -export-symbols-regex '^gi?_'
+
+gdumpdir = $(datadir)/gobject-introspection-1.0/
+gdump_DATA = girepository/gdump.c
+
+if !OS_WIN32
+noinst_PROGRAMS += gi-dump-types
+
+gi_dump_types_SOURCES = girepository/gdump.c girepository/gi-dump-types.c
+gi_dump_types_CFLAGS = $(GIO_UNIX_CFLAGS) $(GMODULE_CFLAGS)
+gi_dump_types_LDADD = $(GIO_UNIX_LIBS) $(GMODULE_LIBS)
+endif
+
+GTESTER_PROGS += gthash-test
+
+gthash_test_SOURCES = girepository/gthash.c girepository/gthash-test.c
+gthash_test_CFLAGS = -I$(top_srcdir)/girepository $(GOBJECT_CFLAGS)
+gthash_test_LDADD = libcmph.la libgirepository-1.0.la $(GOBJECT_LIBS)
diff --git a/Makefile-giscanner.am b/Makefile-giscanner.am
new file mode 100644 (file)
index 0000000..c529c4e
--- /dev/null
@@ -0,0 +1,95 @@
+## Process this file with automake to produce Makefile.in
+
+BUILT_SOURCES +=               \
+       scannerparser.c         \
+       scannerparser.h         \
+       scannerlexer.c          \
+       scannerlexer.h
+
+AM_YFLAGS = -d -t
+
+# Why do I have to do this automake?
+scannerlexer.h: scannerlexer.c
+
+noinst_LTLIBRARIES += libgiscanner.la
+
+libgiscanner_la_SOURCES = \
+       giscanner/sourcescanner.c                               \
+       giscanner/sourcescanner.h                               \
+       giscanner/scannerlexer.l                                \
+       giscanner/scannerparser.y                               \
+       giscanner/grealpath.h
+libgiscanner_la_CPPFLAGS = -I$(top_srcdir)/girepository -I$(top_srcdir)/giscanner
+libgiscanner_la_LIBADD = $(GOBJECT_LIBS)
+libgiscanner_la_CFLAGS = $(GOBJECT_CFLAGS)
+
+# Python module
+pkgpyexecdir = $(pkglibdir)/giscanner
+pkgpyexec_LTLIBRARIES = _giscanner.la
+pkgpyexec_PYTHON =                     \
+       giscanner/__init__.py           \
+       giscanner/annotationmain.py     \
+       giscanner/annotationparser.py   \
+       giscanner/ast.py                \
+       giscanner/cachestore.py         \
+       giscanner/codegen.py            \
+       giscanner/docmain.py    \
+       giscanner/dumper.py             \
+       giscanner/introspectablepass.py \
+       giscanner/girparser.py          \
+       giscanner/girwriter.py          \
+       giscanner/gdumpparser.py        \
+       giscanner/libtoolimporter.py    \
+       giscanner/odict.py              \
+       giscanner/mallardwriter.py      \
+       giscanner/mallard-C-class.tmpl  \
+       giscanner/mallard-C-default.tmpl        \
+       giscanner/mallard-C-enum.tmpl   \
+       giscanner/mallard-C-function.tmpl       \
+       giscanner/mallard-C-namespace.tmpl      \
+       giscanner/mallard-C-property.tmpl       \
+       giscanner/mallard-C-record.tmpl \
+       giscanner/mallard-C-signal.tmpl \
+       giscanner/mallard-C-vfunc.tmpl  \
+       giscanner/mallard-Python-class.tmpl     \
+       giscanner/mallard-Python-default.tmpl   \
+       giscanner/mallard-Python-enum.tmpl      \
+       giscanner/mallard-Python-function.tmpl  \
+       giscanner/mallard-Python-namespace.tmpl \
+       giscanner/mallard-Python-property.tmpl  \
+       giscanner/mallard-Python-record.tmpl    \
+       giscanner/mallard-Python-signal.tmpl    \
+       giscanner/mallard-Python-vfunc.tmpl     \
+       giscanner/maintransformer.py    \
+       giscanner/message.py            \
+       giscanner/shlibs.py             \
+       giscanner/scannermain.py        \
+       giscanner/sourcescanner.py      \
+       giscanner/testcodegen.py        \
+       giscanner/transformer.py        \
+       giscanner/utils.py              \
+       giscanner/xmlwriter.py
+
+_giscanner_la_CFLAGS = \
+       $(PYTHON_INCLUDES) \
+       $(GOBJECT_CFLAGS) \
+       -I$(top_srcdir)/giscanner
+_giscanner_la_LIBADD = libgiscanner.la $(GOBJECT_LIBS)
+
+_giscanner_la_LDFLAGS = \
+       -module -avoid-version -export-symbols-regex init_giscanner
+
+if OS_WIN32
+# Windows requires Python extension modules to be explicitly
+# linked to libpython. Extension modules are shared libaries
+# (.dll files), but need to be called .pyd for Python to load
+# them as extension modules.
+_giscanner_la_LIBADD += \
+       $(PYTHON_LIBS)
+
+_giscanner_la_LDFLAGS += \
+       -no-undefined \
+       -shrext ".pyd"
+endif
+
+_giscanner_la_SOURCES = giscanner/giscannermodule.c
diff --git a/Makefile-tools.am b/Makefile-tools.am
new file mode 100644 (file)
index 0000000..34d2a25
--- /dev/null
@@ -0,0 +1,49 @@
+bin_PROGRAMS += g-ir-compiler g-ir-generate
+bin_SCRIPTS += g-ir-scanner g-ir-annotation-tool
+
+if BUILD_DOCTOOL
+bin_SCRIPTS += g-ir-doc-tool
+endif
+
+EXTRA_DIST +=                          \
+       tools/g-ir-scanner.in           \
+       tools/g-ir-annotation-tool.in   \
+       tools/g-ir-doc-tool.in
+
+TOOL_SUBSTITUTIONS = sed -e s,@libdir\@,$(libdir), -e s,@datarootdir\@,$(datarootdir), -e s,@PYTHON\@,$(PYTHON),
+
+g-ir-scanner: tools/g-ir-scanner.in _giscanner.la Makefile
+       $(AM_V_GEN) $(TOOL_SUBSTITUTIONS) $< > $@.tmp && mv $@.tmp $@
+       @chmod a+x $@
+
+g-ir-annotation-tool: tools/g-ir-annotation-tool.in _giscanner.la Makefile
+       $(AM_V_GEN) $(TOOL_SUBSTITUTIONS) $< > $@.tmp && mv $@.tmp $@
+       @chmod a+x $@
+
+g-ir-doc-tool: tools/g-ir-doc-tool.in _giscanner.la Makefile
+       $(AM_V_GEN) $(TOOL_SUBSTITUTIONS) $< > $@.tmp && mv $@.tmp $@
+       @chmod a+x $@
+
+g_ir_compiler_SOURCES = tools/compiler.c
+g_ir_compiler_CPPFLAGS = -DGIREPO_DEFAULT_SEARCH_PATH="\"$(libdir)\"" \
+                        -I$(top_srcdir)/girepository
+g_ir_compiler_CFLAGS = $(GIO_CFLAGS)
+g_ir_compiler_LDADD = \
+       libgirepository-internals.la    \
+       libgirepository-1.0.la          \
+       $(GIREPO_LIBS)
+
+g_ir_generate_SOURCES = tools/generate.c
+g_ir_generate_CPPFLAGS = -DGIREPO_DEFAULT_SEARCH_PATH="\"$(libdir)\"" \
+                        -I$(top_srcdir)/girepository
+g_ir_generate_CFLAGS = $(GIO_CFLAGS)
+g_ir_generate_LDADD = \
+       libgirepository-internals.la    \
+       libgirepository-1.0.la          \
+       $(GIREPO_LIBS)
+
+GCOVSOURCES =                                  \
+       $(g_ir_compiler_SOURCES)                \
+       $(g_ir_generate_SOURCES)
+
+CLEANFILES += g-ir-scanner g-ir-annotation-tool g-ir-doc-tool
diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..9cc54cf
--- /dev/null
@@ -0,0 +1,105 @@
+man_MANS =
+EXTRA_DIST =
+lib_LTLIBRARIES =
+noinst_LTLIBRARIES =
+BUILT_SOURCES =
+CLEANFILES = $(BUILT_SOURCES)
+INTROSPECTION_GIRS =
+check_LTLIBRARIES =
+check_PROGRAMS =
+bin_PROGRAMS =
+bin_SCRIPTS =
+GTESTER_PROGS =
+noinst_PROGRAMS = $(GTESTER_PROGS)
+
+include common.mk
+include Makefile.introspection
+
+include Makefile-cmph.am
+include Makefile-girepository.am
+include Makefile-giscanner.am
+include Makefile-examples.am
+include Makefile-gir.am
+include Makefile-tools.am
+
+## Process this file with automake to produce Makefile.in
+ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
+
+SUBDIRS = . docs tests
+
+DIST_SUBDIRS = m4 $(SUBDIRS)
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
+
+man_MANS +=                    \
+       docs/g-ir-compiler.1    \
+       docs/g-ir-generate.1    \
+       docs/g-ir-scanner.1
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = gobject-introspection-1.0.pc gobject-introspection-no-export-1.0.pc
+
+m4dir = $(datadir)/aclocal
+m4_DATA = m4/introspection.m4
+
+makedir = $(datadir)/gobject-introspection-1.0
+dist_make_DATA = Makefile.introspection
+
+EXTRA_DIST +=                  \
+       COPYING.LGPL            \
+       COPYING.GPL             \
+       CONTRIBUTORS            \
+       $(pkgconfig_DATA)       \
+       $(man_MANS)             \
+       $(m4_DATA)              \
+       misc/pep8.py            \
+       misc/pre-commit         \
+       misc/pyflakes.py
+
+check-local:
+       gtester --verbose $(GTESTER_PROGS)
+       @test ! -d $(top_srcdir)/.git || (test -f $(top_srcdir)/.git/hooks/pre-commit || (echo -e "ERROR: missing \
+       pre-commit hook.\n\ncopy misc/pre-commit to .git/hooks"; false))
+       @test ! -d $(top_srcdir)/.git || (test -x $(top_srcdir)/.git/hooks/pre-commit || (echo -e "ERROR: pre-commit \
+       is not executable\n\nrun chmod +x .git/hooks/pre-commit"; false))
+       @echo "  PEP-8 INQUISITION"
+       @find $(top_srcdir)/giscanner -name \*.py | sort | uniq | xargs $(PYTHON) $(top_srcdir)/misc/pep8.py --repeat --exclude=config.py
+       @touch $(top_builddir)/.make-check-passed
+
+check-pyflakes:
+       @echo "  CHECK Pyflakes"
+       @find $(top_srcdir)/giscanner -name \*.py | sort | uniq | xargs $(PYTHON) $(top_srcdir)/misc/pyflakes.py
+
+
+# Colin's handy Makefile bits for:
+# 1) stuffing tarballs with pre-generated scripts from your workstation
+# 2) bumping configure.ac version post-release
+# 3) tagging correctly in git
+# 4) uploading to gnome.org
+# To use:
+#  $ make check
+#  $ make dist
+#  $ make prepare-minor-release
+
+# Customize to taste
+TAG_PREFIX=GOBJECT_INTROSPECTION_
+COMPRESSION=.xz
+
+
+PACKAGE=@PACKAGE@
+VERSION=@VERSION@
+DISTNAME=$(PACKAGE)-$(VERSION).tar$(COMPRESSION)
+TAG_VERSION=$(shell echo $(VERSION) |sed s/\\\./_/g)
+
+prepare-release-tag: Makefile
+       git tag -m "Tag $(TAG_VERSION)" -a $(TAG_PREFIX)$(TAG_VERSION)
+
+prepare-minor-release: $(DISTNAME) prepare-release-tag Makefile
+       env top_srcdir=$(top_srcdir) python $(top_srcdir)/tools/verbump.py
+
+upload-release: $(DISTNAME) Makefile
+       git log origin/master..master
+       @echo -n "Ok to push? [y/N] "; read ans; test x$$ans == xy || exit 1
+       git push --tags origin master:master
+       scp $(DISTNAME) master.gnome.org:
+       ssh master.gnome.org install-module $(DISTNAME)
+
diff --git a/Makefile.in b/Makefile.in
new file mode 100644 (file)
index 0000000..1bc6011
--- /dev/null
@@ -0,0 +1,2926 @@
+# 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@
+
+# -*- Mode: make -*-
+# Copyright 2009-2010 Johan Dahlin
+#
+# This file defines variables that are compatible with
+# Makefile.introspection, but for use within the gobject-introspection
+# module itself.
+#
+
+# -*- Mode: make -*-
+# Copyright 2009-2010 Johan Dahlin
+#
+# This file is free software; the author(s) gives unlimited
+# permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# * Input variables:
+#
+#   INTROSPECTION_GIRS - List of GIRS that should be generated
+#   INTROSPECTION_SCANNER - Command to invoke scanner, normally set by
+#      GOBJECT_INTROSPECTION_REQUIRE/CHECK() in introspection.m4
+#   INTROSPECTION_SCANNER_ARGS - Additional args to pass in to the scanner
+#   INTROSPECTION_SCANNER_ENV - Environment variables to set before running
+#      the scanner
+#   INTROSPECTION_COMPILER - Command to invoke compiler, normally set by
+#      GOBJECT_INTROSPECTION_REQUIRE/CHECK() in introspection.m4
+#   INTROSPECTION_COMPILER_ARGS - Additional args to pass in to the compiler
+#
+# * Simple tutorial
+#
+# Add this to configure.ac:
+#   -Wno-portability to AM_INIT_AUTOMAKE
+#   GOBJECT_INTROSPECTION_CHECK([0.6.7])
+#
+# Add this to Makefile.am where your library/program is built:
+#   include $(INTROSPECTION_MAKEFILE)
+#   INTROSPECTION_GIRS = YourLib-1.0.gir
+#   YourLib_1_0_gir_NAMESPACE = YourLib
+#   YourLib_1_0_gir_VERSION = 1.0
+#   YourLib_1_0_gir_LIBS = libyourlib.la
+#   YourLib_1_0_gir_FILES = $(libyourlib_1_0_SOURCES)
+#   girdir = $(datadir)/gir-1.0
+#   dist_gir_DATA = YourLib-1.0.gir
+#   typelibdir = $(libdir)/girepository-1.0
+#   typelib_DATA = YourLib-1.0.typelib
+#   CLEANFILES = $(dist_gir_DATA) $(typelib_DATA)
+#
+
+
+
+
+
+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@
+check_PROGRAMS =
+bin_PROGRAMS = g-ir-compiler$(EXEEXT) g-ir-generate$(EXEEXT)
+noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) glib-print$(EXEEXT)
+DIST_COMMON = README $(am__configure_deps) $(dist_make_DATA) \
+       $(girepo_HEADERS) $(pkgpyexec_PYTHON) \
+       $(srcdir)/Makefile-cmph.am $(srcdir)/Makefile-examples.am \
+       $(srcdir)/Makefile-gir.am $(srcdir)/Makefile-girepository.am \
+       $(srcdir)/Makefile-giscanner.am $(srcdir)/Makefile-tools.am \
+       $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+       $(srcdir)/Makefile.introspection $(srcdir)/common.mk \
+       $(srcdir)/config.h.in \
+       $(srcdir)/gobject-introspection-1.0.pc.in \
+       $(srcdir)/gobject-introspection-no-export-1.0.pc.in \
+       $(top_srcdir)/configure AUTHORS COPYING ChangeLog NEWS TODO \
+       build-aux/compile build-aux/config.guess build-aux/config.sub \
+       build-aux/depcomp build-aux/install-sh build-aux/ltmain.sh \
+       build-aux/missing build-aux/py-compile build-aux/ylwrap \
+       scannerlexer.c scannerparser.c scannerparser.h
+@OS_WIN32_FALSE@am__append_1 = gi-dump-types
+
+# Windows requires Python extension modules to be explicitly
+# linked to libpython. Extension modules are shared libaries
+# (.dll files), but need to be called .pyd for Python to load
+# them as extension modules.
+@OS_WIN32_TRUE@am__append_2 = \
+@OS_WIN32_TRUE@        $(PYTHON_LIBS)
+
+@OS_WIN32_TRUE@am__append_3 = \
+@OS_WIN32_TRUE@        -no-undefined \
+@OS_WIN32_TRUE@        -shrext ".pyd"
+
+@BUILD_DOCTOOL_TRUE@am__append_4 = g-ir-doc-tool
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.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)/acinclude.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 = gobject-introspection-1.0.pc \
+       gobject-introspection-no-export-1.0.pc
+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)$(pkgpyexecdir)" \
+       "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \
+       "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(man1dir)" \
+       "$(DESTDIR)$(makedir)" "$(DESTDIR)$(gdumpdir)" \
+       "$(DESTDIR)$(girdir)" "$(DESTDIR)$(m4dir)" \
+       "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(typelibsdir)" \
+       "$(DESTDIR)$(girepodir)"
+LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) \
+       $(pkgpyexec_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+@OS_WIN32_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
+_giscanner_la_DEPENDENCIES = libgiscanner.la $(am__DEPENDENCIES_1) \
+       $(am__DEPENDENCIES_2)
+am__giscanner_la_OBJECTS = _giscanner_la-giscannermodule.lo
+_giscanner_la_OBJECTS = $(am__giscanner_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+_giscanner_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(_giscanner_la_CFLAGS) \
+       $(CFLAGS) $(_giscanner_la_LDFLAGS) $(LDFLAGS) -o $@
+libcmph_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_libcmph_la_OBJECTS = libcmph_la-bdz.lo libcmph_la-bdz_ph.lo \
+       libcmph_la-bmz8.lo libcmph_la-bmz.lo libcmph_la-brz.lo \
+       libcmph_la-buffer_entry.lo libcmph_la-buffer_manager.lo \
+       libcmph_la-chd.lo libcmph_la-chd_ph.lo libcmph_la-chm.lo \
+       libcmph_la-cmph.lo libcmph_la-cmph_structs.lo \
+       libcmph_la-compressed_rank.lo libcmph_la-compressed_seq.lo \
+       libcmph_la-fch_buckets.lo libcmph_la-fch.lo \
+       libcmph_la-graph.lo libcmph_la-hash.lo \
+       libcmph_la-jenkins_hash.lo libcmph_la-miller_rabin.lo \
+       libcmph_la-select.lo libcmph_la-vqueue.lo libcmph_la-vstack.lo
+libcmph_la_OBJECTS = $(am_libcmph_la_OBJECTS)
+libgirepository_1_0_la_DEPENDENCIES = libgirepository-gthash.la \
+       $(am__DEPENDENCIES_1)
+am_libgirepository_1_0_la_OBJECTS = libgirepository_1_0_la-gdump.lo \
+       libgirepository_1_0_la-giarginfo.lo \
+       libgirepository_1_0_la-gibaseinfo.lo \
+       libgirepository_1_0_la-gicallableinfo.lo \
+       libgirepository_1_0_la-giconstantinfo.lo \
+       libgirepository_1_0_la-gienuminfo.lo \
+       libgirepository_1_0_la-gifieldinfo.lo \
+       libgirepository_1_0_la-gifunctioninfo.lo \
+       libgirepository_1_0_la-ginvoke.lo \
+       libgirepository_1_0_la-giinterfaceinfo.lo \
+       libgirepository_1_0_la-giobjectinfo.lo \
+       libgirepository_1_0_la-gipropertyinfo.lo \
+       libgirepository_1_0_la-giregisteredtypeinfo.lo \
+       libgirepository_1_0_la-girepository.lo \
+       libgirepository_1_0_la-girffi.lo \
+       libgirepository_1_0_la-gisignalinfo.lo \
+       libgirepository_1_0_la-gistructinfo.lo \
+       libgirepository_1_0_la-gitypeinfo.lo \
+       libgirepository_1_0_la-gitypelib.lo \
+       libgirepository_1_0_la-giunioninfo.lo \
+       libgirepository_1_0_la-givfuncinfo.lo
+libgirepository_1_0_la_OBJECTS = $(am_libgirepository_1_0_la_OBJECTS)
+libgirepository_1_0_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+       $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+       $(AM_CFLAGS) $(CFLAGS) $(libgirepository_1_0_la_LDFLAGS) \
+       $(LDFLAGS) -o $@
+libgirepository_gthash_la_DEPENDENCIES = libcmph.la \
+       $(am__DEPENDENCIES_1)
+am_libgirepository_gthash_la_OBJECTS =  \
+       libgirepository_gthash_la-gthash.lo
+libgirepository_gthash_la_OBJECTS =  \
+       $(am_libgirepository_gthash_la_OBJECTS)
+libgirepository_gthash_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+       $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+       $(libgirepository_gthash_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
+libgirepository_internals_la_DEPENDENCIES = libgirepository-gthash.la \
+       $(am__DEPENDENCIES_1)
+am_libgirepository_internals_la_OBJECTS =  \
+       libgirepository_internals_la-girmodule.lo \
+       libgirepository_internals_la-girnode.lo \
+       libgirepository_internals_la-giroffsets.lo \
+       libgirepository_internals_la-girparser.lo \
+       libgirepository_internals_la-girwriter.lo
+libgirepository_internals_la_OBJECTS =  \
+       $(am_libgirepository_internals_la_OBJECTS)
+libgirepository_internals_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+       $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+       $(libgirepository_internals_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
+libgiscanner_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_libgiscanner_la_OBJECTS = libgiscanner_la-sourcescanner.lo \
+       libgiscanner_la-scannerlexer.lo \
+       libgiscanner_la-scannerparser.lo
+libgiscanner_la_OBJECTS = $(am_libgiscanner_la_OBJECTS)
+libgiscanner_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+       $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+       $(libgiscanner_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+       -o $@
+am__EXEEXT_1 = cmph-bdz-test$(EXEEXT) gthash-test$(EXEEXT)
+@OS_WIN32_FALSE@am__EXEEXT_2 = gi-dump-types$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
+am_cmph_bdz_test_OBJECTS = cmph_bdz_test-cmph-bdz-test.$(OBJEXT)
+cmph_bdz_test_OBJECTS = $(am_cmph_bdz_test_OBJECTS)
+cmph_bdz_test_DEPENDENCIES = libcmph.la $(am__DEPENDENCIES_1)
+cmph_bdz_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(cmph_bdz_test_CFLAGS) \
+       $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_g_ir_compiler_OBJECTS = g_ir_compiler-compiler.$(OBJEXT)
+g_ir_compiler_OBJECTS = $(am_g_ir_compiler_OBJECTS)
+g_ir_compiler_DEPENDENCIES = libgirepository-internals.la \
+       libgirepository-1.0.la $(am__DEPENDENCIES_1)
+g_ir_compiler_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(g_ir_compiler_CFLAGS) \
+       $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_g_ir_generate_OBJECTS = g_ir_generate-generate.$(OBJEXT)
+g_ir_generate_OBJECTS = $(am_g_ir_generate_OBJECTS)
+g_ir_generate_DEPENDENCIES = libgirepository-internals.la \
+       libgirepository-1.0.la $(am__DEPENDENCIES_1)
+g_ir_generate_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(g_ir_generate_CFLAGS) \
+       $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__gi_dump_types_SOURCES_DIST = girepository/gdump.c \
+       girepository/gi-dump-types.c
+@OS_WIN32_FALSE@am_gi_dump_types_OBJECTS =  \
+@OS_WIN32_FALSE@       gi_dump_types-gdump.$(OBJEXT) \
+@OS_WIN32_FALSE@       gi_dump_types-gi-dump-types.$(OBJEXT)
+gi_dump_types_OBJECTS = $(am_gi_dump_types_OBJECTS)
+@OS_WIN32_FALSE@gi_dump_types_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+@OS_WIN32_FALSE@       $(am__DEPENDENCIES_1)
+gi_dump_types_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(gi_dump_types_CFLAGS) \
+       $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_glib_print_OBJECTS = glib_print-glib-print.$(OBJEXT)
+glib_print_OBJECTS = $(am_glib_print_OBJECTS)
+glib_print_DEPENDENCIES = libgirepository-1.0.la $(am__DEPENDENCIES_1)
+glib_print_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(glib_print_CFLAGS) \
+       $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_gthash_test_OBJECTS = gthash_test-gthash.$(OBJEXT) \
+       gthash_test-gthash-test.$(OBJEXT)
+gthash_test_OBJECTS = $(am_gthash_test_OBJECTS)
+gthash_test_DEPENDENCIES = libcmph.la libgirepository-1.0.la \
+       $(am__DEPENDENCIES_1)
+gthash_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(gthash_test_CFLAGS) \
+       $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SCRIPTS = $(bin_SCRIPTS)
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/build-aux/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  " $@;
+@MAINTAINER_MODE_FALSE@am__skiplex = test -f $@ ||
+LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS)
+LTLEXCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS)
+AM_V_LEX = $(am__v_LEX_$(V))
+am__v_LEX_ = $(am__v_LEX_$(AM_DEFAULT_VERBOSITY))
+am__v_LEX_0 = @echo "  LEX   " $@;
+YLWRAP = $(top_srcdir)/build-aux/ylwrap
+@MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ ||
+YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
+LTYACCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=compile $(YACC) $(YFLAGS) $(AM_YFLAGS)
+AM_V_YACC = $(am__v_YACC_$(V))
+am__v_YACC_ = $(am__v_YACC_$(AM_DEFAULT_VERBOSITY))
+am__v_YACC_0 = @echo "  YACC  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(_giscanner_la_SOURCES) $(libcmph_la_SOURCES) \
+       $(libgirepository_1_0_la_SOURCES) \
+       $(libgirepository_gthash_la_SOURCES) \
+       $(libgirepository_internals_la_SOURCES) \
+       $(libgiscanner_la_SOURCES) $(cmph_bdz_test_SOURCES) \
+       $(g_ir_compiler_SOURCES) $(g_ir_generate_SOURCES) \
+       $(gi_dump_types_SOURCES) $(glib_print_SOURCES) \
+       $(gthash_test_SOURCES)
+DIST_SOURCES = $(_giscanner_la_SOURCES) $(libcmph_la_SOURCES) \
+       $(libgirepository_1_0_la_SOURCES) \
+       $(libgirepository_gthash_la_SOURCES) \
+       $(libgirepository_internals_la_SOURCES) \
+       $(libgiscanner_la_SOURCES) $(cmph_bdz_test_SOURCES) \
+       $(g_ir_compiler_SOURCES) $(g_ir_generate_SOURCES) \
+       $(am__gi_dump_types_SOURCES_DIST) $(glib_print_SOURCES) \
+       $(gthash_test_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)/build-aux/py-compile
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(man_MANS)
+DATA = $(dist_make_DATA) $(gdump_DATA) $(gir_DATA) $(m4_DATA) \
+       $(pkgconfig_DATA) $(typelibs_DATA)
+HEADERS = $(girepo_HEADERS)
+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
+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"
+GZIP_ENV = --best
+DIST_ARCHIVES = $(distdir).tar.xz
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_GIR_PACKAGE = @CAIRO_GIR_PACKAGE@
+CAIRO_GOBJECT_CFLAGS = @CAIRO_GOBJECT_CFLAGS@
+CAIRO_GOBJECT_LIBS = @CAIRO_GOBJECT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CAIRO_SHARED_LIBRARY = @CAIRO_SHARED_LIBRARY@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+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@
+EXPANDED_BINDIR = @EXPANDED_BINDIR@
+EXPANDED_DATADIR = @EXPANDED_DATADIR@
+EXPANDED_LIBDIR = @EXPANDED_LIBDIR@
+EXPANDED_LIBEXECDIR = @EXPANDED_LIBEXECDIR@
+EXPANDED_LOCALSTATEDIR = @EXPANDED_LOCALSTATEDIR@
+EXPANDED_SYSCONFDIR = @EXPANDED_SYSCONFDIR@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FFI_PC_CFLAGS = @FFI_PC_CFLAGS@
+FFI_PC_LIBS = @FFI_PC_LIBS@
+FFI_PC_PACKAGES = @FFI_PC_PACKAGES@
+FGREP = @FGREP@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
+GIREPO_CFLAGS = @GIREPO_CFLAGS@
+GIREPO_LIBS = @GIREPO_LIBS@
+GIR_DIR = @GIR_DIR@
+GIR_SUFFIX = @GIR_SUFFIX@
+GLIBSRC = @GLIBSRC@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMODULE_CFLAGS = @GMODULE_CFLAGS@
+GMODULE_LIBS = @GMODULE_LIBS@
+GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
+GOBJECT_INTROSPECTION_LIBDIR = @GOBJECT_INTROSPECTION_LIBDIR@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
+GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
+GTKDOC_MKPDF = @GTKDOC_MKPDF@
+GTKDOC_REBASE = @GTKDOC_REBASE@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+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@
+POW_LIB = @POW_LIB@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_LIB_LOC = @PYTHON_LIB_LOC@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SCANNER_CFLAGS = @SCANNER_CFLAGS@
+SCANNER_LIBS = @SCANNER_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+YACC = @YACC@
+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 module
+pkgpyexecdir = $(pkglibdir)/giscanner
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+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@
+man_MANS = docs/g-ir-compiler.1 docs/g-ir-generate.1 \
+       docs/g-ir-scanner.1
+EXTRA_DIST = $(STATIC_GIRSOURCES) gir/cairo-1.0.gir.in gir/glib-2.0.c \
+       gir/gobject-2.0.c gir/gio-2.0.c tools/g-ir-scanner.in \
+       tools/g-ir-annotation-tool.in tools/g-ir-doc-tool.in \
+       COPYING.LGPL COPYING.GPL CONTRIBUTORS $(pkgconfig_DATA) \
+       $(man_MANS) $(m4_DATA) misc/pep8.py misc/pre-commit \
+       misc/pyflakes.py
+lib_LTLIBRARIES = libgirepository-1.0.la
+noinst_LTLIBRARIES = libcmph.la libgirepository-internals.la \
+       libgirepository-gthash.la libgiscanner.la
+BUILT_SOURCES = scannerparser.c scannerparser.h scannerlexer.c \
+       scannerlexer.h gir/cairo-1.0.gir
+CLEANFILES = $(BUILT_SOURCES) gir/cairo-1.0.gir $(BUILT_GIRSOURCES) \
+       $(typelibs_DATA) g-ir-scanner g-ir-annotation-tool \
+       g-ir-doc-tool
+INTROSPECTION_GIRS = $(BUILT_GIRSOURCES)
+check_LTLIBRARIES = 
+bin_SCRIPTS = g-ir-scanner g-ir-annotation-tool $(am__append_4)
+GTESTER_PROGS = cmph-bdz-test gthash-test
+INTROSPECTION_SCANNER = \
+    env PATH=.libs:$(PATH) \
+        LPATH=.libs \
+        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
+        UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
+        $(top_builddir)/g-ir-scanner
+
+INTROSPECTION_SCANNER_ARGS = \
+    --verbose \
+    -I$(top_srcdir) \
+    --add-include-path=$(srcdir) \
+    --add-include-path=$(top_srcdir)/gir \
+    --add-include-path=$(builddir) \
+    --add-include-path=$(top_builddir)
+
+INTROSPECTION_COMPILER = \
+    env PATH=.libs:$(PATH) \
+        $(top_builddir)/g-ir-compiler$(EXEEXT)
+
+INTROSPECTION_COMPILER_ARGS = \
+    --includedir=$(srcdir) \
+    --includedir=$(top_srcdir)/gir \
+    --includedir=$(builddir) \
+    --includedir=$(top_builddir)
+
+INTROSPECTION_DOCTOOL = \
+    env PATH=.libs:$(PATH) \
+        LPATH=.libs \
+        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
+        UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
+        $(top_builddir)/g-ir-doc-tool
+
+
+# Private functions
+_gir_name = $(subst /,_,$(subst -,_,$(subst .,_,$(1))))
+
+# Namespace and Version is either fetched from the gir filename
+# or the _NAMESPACE/_VERSION variable combo
+_gir_namespace = $(or $($(_gir_name)_NAMESPACE),$(firstword $(subst -, ,$(notdir $(1)))))
+_gir_version = $(or $($(_gir_name)_VERSION),$(lastword $(subst -, ,$(1:.gir=))))
+
+# _PROGRAM is an optional variable which needs it's own --program argument
+_gir_program = $(if $($(_gir_name)_PROGRAM),--program=$($(_gir_name)_PROGRAM))
+
+# Variables which provides a list of things
+_gir_libraries = $(foreach lib,$($(_gir_name)_LIBS),--library=$(lib))
+_gir_packages = $(foreach pkg,$($(_gir_name)_PACKAGES),--pkg=$(pkg))
+_gir_includes = $(foreach include,$($(_gir_name)_INCLUDES),--include=$(include))
+_gir_export_packages = $(foreach pkg,$($(_gir_name)_EXPORT_PACKAGES),--pkg-export=$(pkg))
+
+# Reuse the LIBTOOL variable from automake if it's set, but
+# work around MSYS weirdness: When running g-ir-scanner, MSYS changes
+# a command-line argument --libtool="/bin/sh ../../libtool" into
+# --libtool=c:/opt/msys/1.0/bin/libtool. So just use sh.exe without path
+# because we already "know" where the libtool configure produced is.
+_gir_libtool = $(if $(findstring MINGW32,$(shell uname -s)),--libtool="$(top_builddir)/libtool",$(if $(LIBTOOL),--libtool="$(LIBTOOL)"))
+
+# Macros for AM_SILENT_RULES prettiness
+_gir_verbosity = $(if $(AM_DEFAULT_VERBOSITY),$(AM_DEFAULT_VERBOSITY),1)
+_gir_silent_scanner_prefix = $(_gir_silent_scanner_prefix_$(V))
+_gir_silent_scanner_prefix_ = $(_gir_silent_scanner_prefix_$(_gir_verbosity))
+_gir_silent_scanner_prefix_0 = @echo "  GISCAN $(1)";
+_gir_silent_scanner_opts = $(_gir_silent_scanner_opts_$(V))
+_gir_silent_scanner_opts_ = $(_gir_silent_scanner_opts_$(_gir_verbosity))
+_gir_silent_scanner_opts_0 = --quiet
+_gir_silent_compiler = $(_gir_silent_compiler_$(V))
+_gir_silent_compiler_ = $(_gir_silent_compiler_$(_gir_verbosity))
+_gir_silent_compiler_0 = @echo "  GICOMP $(1)";
+libcmph_la_CPPFLAGS = -Icmph $(GLIB_CFLAGS)
+libcmph_la_LIBADD = -lm $(GLIB_LIBS)
+libcmph_la_SOURCES = \
+       girepository/cmph/bdz.c \
+       girepository/cmph/bdz.h \
+       girepository/cmph/bdz_ph.c \
+       girepository/cmph/bdz_ph.h \
+       girepository/cmph/bdz_structs.h \
+       girepository/cmph/bdz_structs_ph.h \
+       girepository/cmph/bitbool.h \
+       girepository/cmph/bmz8.c \
+       girepository/cmph/bmz8.h \
+       girepository/cmph/bmz8_structs.h \
+       girepository/cmph/bmz.c \
+       girepository/cmph/bmz.h \
+       girepository/cmph/bmz_structs.h \
+       girepository/cmph/brz.c \
+       girepository/cmph/brz.h \
+       girepository/cmph/brz_structs.h \
+       girepository/cmph/buffer_entry.c \
+       girepository/cmph/buffer_entry.h \
+       girepository/cmph/buffer_manager.c \
+       girepository/cmph/buffer_manager.h \
+       girepository/cmph/chd.c \
+       girepository/cmph/chd.h \
+       girepository/cmph/chd_ph.c \
+       girepository/cmph/chd_ph.h \
+       girepository/cmph/chd_structs.h \
+       girepository/cmph/chd_structs_ph.h \
+       girepository/cmph/chm.c \
+       girepository/cmph/chm.h \
+       girepository/cmph/chm_structs.h \
+       girepository/cmph/cmph.c \
+       girepository/cmph/cmph.h \
+       girepository/cmph/cmph_structs.c \
+       girepository/cmph/cmph_structs.h \
+       girepository/cmph/cmph_time.h \
+       girepository/cmph/cmph_types.h \
+       girepository/cmph/compressed_rank.c \
+       girepository/cmph/compressed_rank.h \
+       girepository/cmph/compressed_seq.c \
+       girepository/cmph/compressed_seq.h \
+       girepository/cmph/debug.h \
+       girepository/cmph/fch_buckets.c \
+       girepository/cmph/fch_buckets.h \
+       girepository/cmph/fch.c \
+       girepository/cmph/fch.h \
+       girepository/cmph/fch_structs.h \
+       girepository/cmph/graph.c \
+       girepository/cmph/graph.h \
+       girepository/cmph/hash.c \
+       girepository/cmph/hash.h \
+       girepository/cmph/hash_state.h \
+       girepository/cmph/jenkins_hash.c \
+       girepository/cmph/jenkins_hash.h \
+       girepository/cmph/miller_rabin.c \
+       girepository/cmph/miller_rabin.h \
+       girepository/cmph/select.c \
+       girepository/cmph/select.h \
+       girepository/cmph/select_lookup_tables.h \
+       girepository/cmph/vqueue.c \
+       girepository/cmph/vqueue.h \
+       girepository/cmph/vstack.c \
+       girepository/cmph/vstack.h
+
+cmph_bdz_test_SOURCES = girepository/cmph-bdz-test.c
+cmph_bdz_test_CFLAGS = -I$(top_srcdir)/girepository/cmph $(GOBJECT_CFLAGS)
+cmph_bdz_test_LDADD = libcmph.la $(GOBJECT_LIBS)
+girepodir = $(includedir)/gobject-introspection-1.0/
+girepo_HEADERS = \
+       girepository/giarginfo.h                        \
+       girepository/gibaseinfo.h                       \
+       girepository/gicallableinfo.h                   \
+       girepository/giconstantinfo.h                   \
+       girepository/gienuminfo.h                       \
+       girepository/gifieldinfo.h                      \
+       girepository/gifunctioninfo.h                   \
+       girepository/giinterfaceinfo.h                  \
+       girepository/giobjectinfo.h                     \
+       girepository/gipropertyinfo.h                   \
+       girepository/giregisteredtypeinfo.h             \
+       girepository/girepository.h                     \
+       girepository/girffi.h                           \
+       girepository/gisignalinfo.h                     \
+       girepository/gistructinfo.h                     \
+       girepository/gitypeinfo.h                       \
+       girepository/gitypelib.h                        \
+       girepository/gitypes.h                          \
+       girepository/giunioninfo.h                      \
+       girepository/givfuncinfo.h
+
+libgirepository_gthash_la_SOURCES = \
+       girepository/gthash.c
+
+libgirepository_gthash_la_CFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
+libgirepository_gthash_la_LIBADD = libcmph.la $(GIREPO_LIBS)
+libgirepository_internals_la_SOURCES = \
+       girepository/girmodule.c                                \
+       girepository/girmodule.h                                \
+       girepository/girnode.c                                  \
+       girepository/girnode.h                                  \
+       girepository/giroffsets.c                               \
+       girepository/girparser.c                                \
+       girepository/girparser.h                                \
+       girepository/girwriter.c                                \
+       girepository/girwriter.h
+
+libgirepository_internals_la_CFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
+libgirepository_internals_la_LIBADD = libgirepository-gthash.la $(GIREPO_LIBS)
+libgirepository_1_0_la_SOURCES = \
+       girepository/gdump.c                            \
+       girepository/giarginfo.c                        \
+       girepository/gibaseinfo.c                       \
+       girepository/gicallableinfo.c                   \
+       girepository/giconstantinfo.c                   \
+       girepository/gienuminfo.c                       \
+       girepository/gifieldinfo.c                      \
+       girepository/gifunctioninfo.c                   \
+       girepository/ginvoke.c                          \
+       girepository/giinterfaceinfo.c                  \
+       girepository/giobjectinfo.c                     \
+       girepository/gipropertyinfo.c                   \
+       girepository/giregisteredtypeinfo.c             \
+       girepository/girepository.c                     \
+       girepository/girepository-private.h             \
+       girepository/girffi.c                           \
+       girepository/girffi.h                           \
+       girepository/gisignalinfo.c                     \
+       girepository/gistructinfo.c                     \
+       girepository/gitypeinfo.c                       \
+       girepository/gitypelib.c                        \
+       girepository/gitypelib-internal.h               \
+       girepository/glib-compat.h                      \
+       girepository/giunioninfo.c                      \
+       girepository/givfuncinfo.c
+
+libgirepository_1_0_la_CPPFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository -DG_IREPOSITORY_COMPILATION
+libgirepository_1_0_la_LIBADD = libgirepository-gthash.la $(GIREPO_LIBS)
+libgirepository_1_0_la_LDFLAGS = -no-undefined -version-number 1:0:0 -export-symbols-regex '^gi?_'
+gdumpdir = $(datadir)/gobject-introspection-1.0/
+gdump_DATA = girepository/gdump.c
+@OS_WIN32_FALSE@gi_dump_types_SOURCES = girepository/gdump.c girepository/gi-dump-types.c
+@OS_WIN32_FALSE@gi_dump_types_CFLAGS = $(GIO_UNIX_CFLAGS) $(GMODULE_CFLAGS)
+@OS_WIN32_FALSE@gi_dump_types_LDADD = $(GIO_UNIX_LIBS) $(GMODULE_LIBS)
+gthash_test_SOURCES = girepository/gthash.c girepository/gthash-test.c
+gthash_test_CFLAGS = -I$(top_srcdir)/girepository $(GOBJECT_CFLAGS)
+gthash_test_LDADD = libcmph.la libgirepository-1.0.la $(GOBJECT_LIBS)
+AM_YFLAGS = -d -t
+libgiscanner_la_SOURCES = \
+       giscanner/sourcescanner.c                               \
+       giscanner/sourcescanner.h                               \
+       giscanner/scannerlexer.l                                \
+       giscanner/scannerparser.y                               \
+       giscanner/grealpath.h
+
+libgiscanner_la_CPPFLAGS = -I$(top_srcdir)/girepository -I$(top_srcdir)/giscanner
+libgiscanner_la_LIBADD = $(GOBJECT_LIBS)
+libgiscanner_la_CFLAGS = $(GOBJECT_CFLAGS)
+pkgpyexec_LTLIBRARIES = _giscanner.la
+pkgpyexec_PYTHON = \
+       giscanner/__init__.py           \
+       giscanner/annotationmain.py     \
+       giscanner/annotationparser.py   \
+       giscanner/ast.py                \
+       giscanner/cachestore.py         \
+       giscanner/codegen.py            \
+       giscanner/docmain.py    \
+       giscanner/dumper.py             \
+       giscanner/introspectablepass.py \
+       giscanner/girparser.py          \
+       giscanner/girwriter.py          \
+       giscanner/gdumpparser.py        \
+       giscanner/libtoolimporter.py    \
+       giscanner/odict.py              \
+       giscanner/mallardwriter.py      \
+       giscanner/mallard-C-class.tmpl  \
+       giscanner/mallard-C-default.tmpl        \
+       giscanner/mallard-C-enum.tmpl   \
+       giscanner/mallard-C-function.tmpl       \
+       giscanner/mallard-C-namespace.tmpl      \
+       giscanner/mallard-C-property.tmpl       \
+       giscanner/mallard-C-record.tmpl \
+       giscanner/mallard-C-signal.tmpl \
+       giscanner/mallard-C-vfunc.tmpl  \
+       giscanner/mallard-Python-class.tmpl     \
+       giscanner/mallard-Python-default.tmpl   \
+       giscanner/mallard-Python-enum.tmpl      \
+       giscanner/mallard-Python-function.tmpl  \
+       giscanner/mallard-Python-namespace.tmpl \
+       giscanner/mallard-Python-property.tmpl  \
+       giscanner/mallard-Python-record.tmpl    \
+       giscanner/mallard-Python-signal.tmpl    \
+       giscanner/mallard-Python-vfunc.tmpl     \
+       giscanner/maintransformer.py    \
+       giscanner/message.py            \
+       giscanner/shlibs.py             \
+       giscanner/scannermain.py        \
+       giscanner/sourcescanner.py      \
+       giscanner/testcodegen.py        \
+       giscanner/transformer.py        \
+       giscanner/utils.py              \
+       giscanner/xmlwriter.py
+
+_giscanner_la_CFLAGS = \
+       $(PYTHON_INCLUDES) \
+       $(GOBJECT_CFLAGS) \
+       -I$(top_srcdir)/giscanner
+
+_giscanner_la_LIBADD = libgiscanner.la $(GOBJECT_LIBS) $(am__append_2)
+_giscanner_la_LDFLAGS = -module -avoid-version -export-symbols-regex \
+       init_giscanner $(am__append_3)
+_giscanner_la_SOURCES = giscanner/giscannermodule.c
+glib_print_SOURCES = examples/glib-print.c
+glib_print_CFLAGS = $(GOBJECT_CFLAGS) -I$(top_srcdir)/girepository
+glib_print_LDADD = libgirepository-1.0.la $(GOBJECT_LIBS)
+BUILT_GIRSOURCES = GLib-2.0.gir GObject-2.0.gir GModule-2.0.gir \
+       Gio-2.0.gir GIRepository-2.0.gir
+SUBSTITUTED_GIRSOURCES = gir/cairo-1.0.gir
+STATIC_GIRSOURCES = \
+        gir/DBus-1.0.gir           \
+        gir/DBusGLib-1.0.gir        \
+        gir/fontconfig-2.0.gir      \
+        gir/freetype2-2.0.gir       \
+        gir/GL-1.0.gir              \
+        gir/libxml2-2.0.gir         \
+        gir/xft-2.0.gir             \
+        gir/xlib-2.0.gir            \
+        gir/xfixes-4.0.gir          \
+        gir/xrandr-1.3.gir
+
+@WITH_GLIBSRC_FALSE@GLib_2_0_gir_DOCSRC = 
+
+# glib with source (to enable documentation)
+@WITH_GLIBSRC_TRUE@GLib_2_0_gir_DOCSRC = $(GLIBSRC)/glib/*.c
+@WITH_GLIBSRC_FALSE@GObject_2_0_gir_DOCSRC = 
+@WITH_GLIBSRC_TRUE@GObject_2_0_gir_DOCSRC = $(GLIBSRC)/gobject/*.c
+@WITH_GLIBSRC_FALSE@GModule_2_0_gir_DOCSRC = 
+@WITH_GLIBSRC_TRUE@GModule_2_0_gir_DOCSRC = $(GLIBSRC)/gmodule/*.c
+@WITH_GLIBSRC_FALSE@Gio_2_0_gir_DOCSRC = 
+@WITH_GLIBSRC_TRUE@Gio_2_0_gir_DOCSRC = $(GLIBSRC)/gio/*.c
+
+# glib
+GLIB_INCLUDEDIR = $(shell pkg-config --variable=includedir glib-2.0)/glib-2.0
+GLIB_LIBDIR = $(shell pkg-config --variable=libdir glib-2.0)
+@OS_WIN32_FALSE@GLIB_LIBRARY = glib-2.0
+@OS_WIN32_TRUE@GLIB_LIBRARY = libglib-2.0-0
+GLib_2_0_gir_LIBS = $(GLIB_LIBRARY) $(GOBJECT_LIBRARY)
+GLib_2_0_gir_SCANNERFLAGS = \
+            --external-library \
+            --reparse-validate \
+            --identifier-prefix=G \
+            --symbol-prefix=g \
+            --symbol-prefix=glib \
+            --c-include="glib.h" \
+            $(GLib_2_0_gir_DOCSRC)
+
+GLib_2_0_gir_PACKAGES = glib-2.0
+GLib_2_0_gir_CFLAGS = \
+            -I$(GLIB_INCLUDEDIR) \
+            -I$(GLIB_LIBDIR)/glib-2.0/include \
+            -DGETTEXT_PACKAGE=Dummy \
+            -DGLIB_COMPILATION \
+            -D__G_I18N_LIB_H__
+
+GLib_2_0_gir_FILES = \
+                $(GLIB_LIBDIR)/glib-2.0/include/glibconfig.h \
+               $(GLIB_INCLUDEDIR)/glib/*.h \
+               $(GLIB_INCLUDEDIR)/gobject/glib-types.h \
+                gir/glib-2.0.c
+
+
+# gobject
+GOBJECT_INCLUDEDIR = $(shell pkg-config --variable=includedir gobject-2.0)/glib-2.0
+GOBJECT_LIBDIR = $(shell pkg-config --variable=libdir gobject-2.0)
+@OS_WIN32_FALSE@GOBJECT_LIBRARY = gobject-2.0
+@OS_WIN32_TRUE@GOBJECT_LIBRARY = libgobject-2.0-0
+GObject_2_0_gir_LIBS = $(GOBJECT_LIBRARY)
+GObject_2_0_gir_SCANNERFLAGS = \
+            --external-library \
+            --reparse-validate \
+            --identifier-prefix=G \
+            --c-include="glib-object.h" \
+            --add-include-path=. \
+            $(GObject_2_0_gir_DOCSRC)
+
+GObject_2_0_gir_PACKAGES = gobject-2.0
+GObject_2_0_gir_INCLUDES = GLib-2.0
+GObject_2_0_gir_CFLAGS = \
+            -DGOBJECT_COMPILATION \
+            -I$(GOBJECT_INCLUDEDIR) \
+            -I$(GOBJECT_LIBDIR)/glib-2.0/include
+
+GObject_2_0_gir_FILES = \
+       $(filter-out $(GOBJECT_INCLUDEDIR)/gobject/glib-types.h, $(wildcard $(GOBJECT_INCLUDEDIR)/gobject/*.h)) \
+       gir/gobject-2.0.c
+
+
+# gmodule
+GMODULE_INCLUDEDIR = $(shell pkg-config --variable=includedir gmodule-2.0)/glib-2.0
+GMODULE_LIBDIR = $(shell pkg-config --variable=libdir gmodule-2.0)
+@OS_WIN32_FALSE@GMODULE_LIBRARY = gmodule-2.0
+@OS_WIN32_TRUE@GMODULE_LIBRARY = libgmodule-2.0-0
+GModule_2_0_gir_LIBS = $(GMODULE_LIBRARY)
+GModule_2_0_gir_SCANNERFLAGS = \
+            --external-library \
+            --identifier-prefix=G \
+            --c-include="gmodule.h" \
+            --add-include-path=. \
+            $(GModule_2_0_gir_DOCSRC)
+
+GModule_2_0_gir_PACKAGES = gmodule-2.0
+GModule_2_0_gir_INCLUDES = GLib-2.0
+GModule_2_0_gir_CFLAGS = \
+            -I$(GMODULE_INCLUDEDIR) \
+            -I$(GMODULE_LIBDIR)/glib-2.0/include
+
+GModule_2_0_gir_FILES = $(GLIB_INCLUDEDIR)/gmodule.h
+
+# gio
+GIO_INCLUDEDIR = $(shell pkg-config --variable=includedir gio-2.0)/glib-2.0
+GIO_LIBDIR = $(shell pkg-config --variable=libdir gio-2.0)
+@OS_WIN32_FALSE@GIO_LIBRARY = gio-2.0
+@OS_WIN32_TRUE@GIO_LIBRARY = libgio-2.0-0
+@HAVE_GIO_UNIX_FALSE@GIO_UNIX_HDRS = 
+@HAVE_GIO_UNIX_TRUE@GIO_UNIX_HDRS = $(shell pkg-config --variable=includedir gio-unix-2.0)/gio-unix-2.0/gio/*.h
+@HAVE_GIO_UNIX_FALSE@GIO_UNIX_PACKAGES = 
+@HAVE_GIO_UNIX_TRUE@GIO_UNIX_PACKAGES = gio-unix-2.0
+GIO_CINCLUDES = $(patsubst %,--c-include='%',$(shell echo $(GIO_UNIX_HDRS)))
+Gio_2_0_gir_LIBS = $(GIO_LIBRARY)
+Gio_2_0_gir_SCANNERFLAGS = \
+            --external-library \
+            --reparse-validate \
+            --warn-all \
+            --identifier-prefix=G \
+            --c-include="gio/gio.h" \
+            $(GIO_CINCLUDES) \
+            --add-include-path=. \
+            $(Gio_2_0_gir_DOCSRC)
+
+Gio_2_0_gir_PACKAGES = gio-2.0 $(GIO_UNIX_PACKAGES)
+Gio_2_0_gir_INCLUDES = GObject-2.0
+Gio_2_0_gir_CFLAGS = \
+            -DGIO_COMPILATION \
+            -I$(GIO_LIBDIR)/glib-2.0/include
+
+Gio_2_0_gir_FILES = \
+            $(GIO_UNIX_HDRS) \
+            $(filter-out %/gsettingsbackend.h, $(shell echo $(GIO_INCLUDEDIR)/gio/*.h)) \
+            gir/gio-2.0.c
+
+GIRepository_2_0_gir_LIBS = libgirepository-1.0.la
+GIRepository_2_0_gir_SCANNERFLAGS = \
+       --warn-all \
+        --identifier-prefix=GI \
+        --symbol-prefix=g \
+        --c-include="girepository.h" \
+        --add-include-path=.
+
+GIRepository_2_0_gir_PACKAGES = gobject-2.0
+GIRepository_2_0_gir_INCLUDES = GObject-2.0
+GIRepository_2_0_gir_EXPORT_PACKAGES = gobject-introspection-1.0
+GIRepository_2_0_gir_CFLAGS = \
+    -I$(top_srcdir)/girepository -I$(top_srcdir) \
+    -DGI_COMPILATION
+
+GIRepository_2_0_gir_FILES = \
+        $(top_srcdir)/girepository/girepository.h   \
+        $(top_srcdir)/girepository/girepository.c   \
+        $(top_srcdir)/girepository/gi*info.c       \
+        $(top_srcdir)/girepository/gi*info.h       \
+        $(top_srcdir)/girepository/gitypelib.h     \
+        $(top_srcdir)/girepository/gitypes.h
+
+girdir = $(GIR_DIR)
+gir_DATA = $(STATIC_GIRSOURCES) $(SUBSTITUTED_GIRSOURCES) $(BUILT_GIRSOURCES)
+typelibsdir = $(libdir)/girepository-1.0
+typelibs_DATA = $(gir_DATA:.gir=.typelib)
+TOOL_SUBSTITUTIONS = sed -e s,@libdir\@,$(libdir), -e s,@datarootdir\@,$(datarootdir), -e s,@PYTHON\@,$(PYTHON),
+g_ir_compiler_SOURCES = tools/compiler.c
+g_ir_compiler_CPPFLAGS = -DGIREPO_DEFAULT_SEARCH_PATH="\"$(libdir)\"" \
+                        -I$(top_srcdir)/girepository
+
+g_ir_compiler_CFLAGS = $(GIO_CFLAGS)
+g_ir_compiler_LDADD = \
+       libgirepository-internals.la    \
+       libgirepository-1.0.la          \
+       $(GIREPO_LIBS)
+
+g_ir_generate_SOURCES = tools/generate.c
+g_ir_generate_CPPFLAGS = -DGIREPO_DEFAULT_SEARCH_PATH="\"$(libdir)\"" \
+                        -I$(top_srcdir)/girepository
+
+g_ir_generate_CFLAGS = $(GIO_CFLAGS)
+g_ir_generate_LDADD = \
+       libgirepository-internals.la    \
+       libgirepository-1.0.la          \
+       $(GIREPO_LIBS)
+
+GCOVSOURCES = \
+       $(g_ir_compiler_SOURCES)                \
+       $(g_ir_generate_SOURCES)
+
+ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
+SUBDIRS = . docs tests
+DIST_SUBDIRS = m4 $(SUBDIRS)
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = gobject-introspection-1.0.pc gobject-introspection-no-export-1.0.pc
+m4dir = $(datadir)/aclocal
+m4_DATA = m4/introspection.m4
+makedir = $(datadir)/gobject-introspection-1.0
+dist_make_DATA = Makefile.introspection
+
+# Colin's handy Makefile bits for:
+# 1) stuffing tarballs with pre-generated scripts from your workstation
+# 2) bumping configure.ac version post-release
+# 3) tagging correctly in git
+# 4) uploading to gnome.org
+# To use:
+#  $ make check
+#  $ make dist
+#  $ make prepare-minor-release
+
+# Customize to taste
+TAG_PREFIX = GOBJECT_INTROSPECTION_
+COMPRESSION = .xz
+DISTNAME = $(PACKAGE)-$(VERSION).tar$(COMPRESSION)
+TAG_VERSION = $(shell echo $(VERSION) |sed s/\\\./_/g)
+all: $(BUILT_SOURCES) config.h
+       $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .l .lo .o .obj .y
+am--refresh:
+       @:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/common.mk $(srcdir)/Makefile.introspection $(srcdir)/Makefile-cmph.am $(srcdir)/Makefile-girepository.am $(srcdir)/Makefile-giscanner.am $(srcdir)/Makefile-examples.am $(srcdir)/Makefile-gir.am $(srcdir)/Makefile-tools.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
+gobject-introspection-1.0.pc: $(top_builddir)/config.status $(srcdir)/gobject-introspection-1.0.pc.in
+       cd $(top_builddir) && $(SHELL) ./config.status $@
+gobject-introspection-no-export-1.0.pc: $(top_builddir)/config.status $(srcdir)/gobject-introspection-no-export-1.0.pc.in
+       cd $(top_builddir) && $(SHELL) ./config.status $@
+
+clean-checkLTLIBRARIES:
+       -test -z "$(check_LTLIBRARIES)" || rm -f $(check_LTLIBRARIES)
+       @list='$(check_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-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
+
+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
+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
+_giscanner.la: $(_giscanner_la_OBJECTS) $(_giscanner_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(_giscanner_la_LINK) -rpath $(pkgpyexecdir) $(_giscanner_la_OBJECTS) $(_giscanner_la_LIBADD) $(LIBS)
+libcmph.la: $(libcmph_la_OBJECTS) $(libcmph_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK)  $(libcmph_la_OBJECTS) $(libcmph_la_LIBADD) $(LIBS)
+libgirepository-1.0.la: $(libgirepository_1_0_la_OBJECTS) $(libgirepository_1_0_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(libgirepository_1_0_la_LINK) -rpath $(libdir) $(libgirepository_1_0_la_OBJECTS) $(libgirepository_1_0_la_LIBADD) $(LIBS)
+libgirepository-gthash.la: $(libgirepository_gthash_la_OBJECTS) $(libgirepository_gthash_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(libgirepository_gthash_la_LINK)  $(libgirepository_gthash_la_OBJECTS) $(libgirepository_gthash_la_LIBADD) $(LIBS)
+libgirepository-internals.la: $(libgirepository_internals_la_OBJECTS) $(libgirepository_internals_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(libgirepository_internals_la_LINK)  $(libgirepository_internals_la_OBJECTS) $(libgirepository_internals_la_LIBADD) $(LIBS)
+scannerparser.h: scannerparser.c
+       @if test ! -f $@; then \
+         rm -f scannerparser.c; \
+         $(MAKE) $(AM_MAKEFLAGS) scannerparser.c; \
+       else :; fi
+libgiscanner.la: $(libgiscanner_la_OBJECTS) $(libgiscanner_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(libgiscanner_la_LINK)  $(libgiscanner_la_OBJECTS) $(libgiscanner_la_LIBADD) $(LIBS)
+install-binPROGRAMS: $(bin_PROGRAMS)
+       @$(NORMAL_INSTALL)
+       test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       for p in $$list; do echo "$$p $$p"; done | \
+       sed 's/$(EXEEXT)$$//' | \
+       while read p p1; do if test -f $$p || test -f $$p1; \
+         then echo "$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+       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; \
+           else { print "f", $$3 "/" $$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_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+           $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+           } \
+       ; done
+
+uninstall-binPROGRAMS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       files=`for p in $$list; do echo "$$p"; done | \
+         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+             -e 's/$$/$(EXEEXT)/' `; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+       @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+       echo " rm -f" $$list; \
+       rm -f $$list || exit $$?; \
+       test -n "$(EXEEXT)" || exit 0; \
+       list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+       echo " rm -f" $$list; \
+       rm -f $$list
+
+clean-checkPROGRAMS:
+       @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+       echo " rm -f" $$list; \
+       rm -f $$list || exit $$?; \
+       test -n "$(EXEEXT)" || exit 0; \
+       list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+       echo " rm -f" $$list; \
+       rm -f $$list
+
+clean-noinstPROGRAMS:
+       @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+       echo " rm -f" $$list; \
+       rm -f $$list || exit $$?; \
+       test -n "$(EXEEXT)" || exit 0; \
+       list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+       echo " rm -f" $$list; \
+       rm -f $$list
+cmph-bdz-test$(EXEEXT): $(cmph_bdz_test_OBJECTS) $(cmph_bdz_test_DEPENDENCIES) 
+       @rm -f cmph-bdz-test$(EXEEXT)
+       $(AM_V_CCLD)$(cmph_bdz_test_LINK) $(cmph_bdz_test_OBJECTS) $(cmph_bdz_test_LDADD) $(LIBS)
+g-ir-compiler$(EXEEXT): $(g_ir_compiler_OBJECTS) $(g_ir_compiler_DEPENDENCIES) 
+       @rm -f g-ir-compiler$(EXEEXT)
+       $(AM_V_CCLD)$(g_ir_compiler_LINK) $(g_ir_compiler_OBJECTS) $(g_ir_compiler_LDADD) $(LIBS)
+g-ir-generate$(EXEEXT): $(g_ir_generate_OBJECTS) $(g_ir_generate_DEPENDENCIES) 
+       @rm -f g-ir-generate$(EXEEXT)
+       $(AM_V_CCLD)$(g_ir_generate_LINK) $(g_ir_generate_OBJECTS) $(g_ir_generate_LDADD) $(LIBS)
+gi-dump-types$(EXEEXT): $(gi_dump_types_OBJECTS) $(gi_dump_types_DEPENDENCIES) 
+       @rm -f gi-dump-types$(EXEEXT)
+       $(AM_V_CCLD)$(gi_dump_types_LINK) $(gi_dump_types_OBJECTS) $(gi_dump_types_LDADD) $(LIBS)
+glib-print$(EXEEXT): $(glib_print_OBJECTS) $(glib_print_DEPENDENCIES) 
+       @rm -f glib-print$(EXEEXT)
+       $(AM_V_CCLD)$(glib_print_LINK) $(glib_print_OBJECTS) $(glib_print_LDADD) $(LIBS)
+gthash-test$(EXEEXT): $(gthash_test_OBJECTS) $(gthash_test_DEPENDENCIES) 
+       @rm -f gthash-test$(EXEEXT)
+       $(AM_V_CCLD)$(gthash_test_LINK) $(gthash_test_OBJECTS) $(gthash_test_LDADD) $(LIBS)
+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
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_giscanner_la-giscannermodule.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmph_bdz_test-cmph-bdz-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_ir_compiler-compiler.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_ir_generate-generate.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gi_dump_types-gdump.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gi_dump_types-gi-dump-types.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glib_print-glib-print.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gthash_test-gthash-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gthash_test-gthash.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcmph_la-bdz.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcmph_la-bdz_ph.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcmph_la-bmz.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcmph_la-bmz8.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcmph_la-brz.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcmph_la-buffer_entry.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcmph_la-buffer_manager.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcmph_la-chd.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcmph_la-chd_ph.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcmph_la-chm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcmph_la-cmph.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcmph_la-cmph_structs.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcmph_la-compressed_rank.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcmph_la-compressed_seq.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcmph_la-fch.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcmph_la-fch_buckets.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcmph_la-graph.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcmph_la-hash.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcmph_la-jenkins_hash.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcmph_la-miller_rabin.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcmph_la-select.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcmph_la-vqueue.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcmph_la-vstack.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgirepository_1_0_la-gdump.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgirepository_1_0_la-giarginfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgirepository_1_0_la-gibaseinfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgirepository_1_0_la-gicallableinfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgirepository_1_0_la-giconstantinfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgirepository_1_0_la-gienuminfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgirepository_1_0_la-gifieldinfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgirepository_1_0_la-gifunctioninfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgirepository_1_0_la-giinterfaceinfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgirepository_1_0_la-ginvoke.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgirepository_1_0_la-giobjectinfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgirepository_1_0_la-gipropertyinfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgirepository_1_0_la-giregisteredtypeinfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgirepository_1_0_la-girepository.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgirepository_1_0_la-girffi.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgirepository_1_0_la-gisignalinfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgirepository_1_0_la-gistructinfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgirepository_1_0_la-gitypeinfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgirepository_1_0_la-gitypelib.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgirepository_1_0_la-giunioninfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgirepository_1_0_la-givfuncinfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgirepository_gthash_la-gthash.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgirepository_internals_la-girmodule.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgirepository_internals_la-girnode.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgirepository_internals_la-giroffsets.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgirepository_internals_la-girparser.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgirepository_internals_la-girwriter.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgiscanner_la-scannerlexer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgiscanner_la-scannerparser.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgiscanner_la-sourcescanner.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 $@ $<
+
+_giscanner_la-giscannermodule.lo: giscanner/giscannermodule.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) $(_giscanner_la_CFLAGS) $(CFLAGS) -MT _giscanner_la-giscannermodule.lo -MD -MP -MF $(DEPDIR)/_giscanner_la-giscannermodule.Tpo -c -o _giscanner_la-giscannermodule.lo `test -f 'giscanner/giscannermodule.c' || echo '$(srcdir)/'`giscanner/giscannermodule.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_giscanner_la-giscannermodule.Tpo $(DEPDIR)/_giscanner_la-giscannermodule.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='giscanner/giscannermodule.c' object='_giscanner_la-giscannermodule.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) $(_giscanner_la_CFLAGS) $(CFLAGS) -c -o _giscanner_la-giscannermodule.lo `test -f 'giscanner/giscannermodule.c' || echo '$(srcdir)/'`giscanner/giscannermodule.c
+
+libcmph_la-bdz.lo: girepository/cmph/bdz.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcmph_la-bdz.lo -MD -MP -MF $(DEPDIR)/libcmph_la-bdz.Tpo -c -o libcmph_la-bdz.lo `test -f 'girepository/cmph/bdz.c' || echo '$(srcdir)/'`girepository/cmph/bdz.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcmph_la-bdz.Tpo $(DEPDIR)/libcmph_la-bdz.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/cmph/bdz.c' object='libcmph_la-bdz.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) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcmph_la-bdz.lo `test -f 'girepository/cmph/bdz.c' || echo '$(srcdir)/'`girepository/cmph/bdz.c
+
+libcmph_la-bdz_ph.lo: girepository/cmph/bdz_ph.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcmph_la-bdz_ph.lo -MD -MP -MF $(DEPDIR)/libcmph_la-bdz_ph.Tpo -c -o libcmph_la-bdz_ph.lo `test -f 'girepository/cmph/bdz_ph.c' || echo '$(srcdir)/'`girepository/cmph/bdz_ph.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcmph_la-bdz_ph.Tpo $(DEPDIR)/libcmph_la-bdz_ph.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/cmph/bdz_ph.c' object='libcmph_la-bdz_ph.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) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcmph_la-bdz_ph.lo `test -f 'girepository/cmph/bdz_ph.c' || echo '$(srcdir)/'`girepository/cmph/bdz_ph.c
+
+libcmph_la-bmz8.lo: girepository/cmph/bmz8.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcmph_la-bmz8.lo -MD -MP -MF $(DEPDIR)/libcmph_la-bmz8.Tpo -c -o libcmph_la-bmz8.lo `test -f 'girepository/cmph/bmz8.c' || echo '$(srcdir)/'`girepository/cmph/bmz8.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcmph_la-bmz8.Tpo $(DEPDIR)/libcmph_la-bmz8.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/cmph/bmz8.c' object='libcmph_la-bmz8.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) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcmph_la-bmz8.lo `test -f 'girepository/cmph/bmz8.c' || echo '$(srcdir)/'`girepository/cmph/bmz8.c
+
+libcmph_la-bmz.lo: girepository/cmph/bmz.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcmph_la-bmz.lo -MD -MP -MF $(DEPDIR)/libcmph_la-bmz.Tpo -c -o libcmph_la-bmz.lo `test -f 'girepository/cmph/bmz.c' || echo '$(srcdir)/'`girepository/cmph/bmz.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcmph_la-bmz.Tpo $(DEPDIR)/libcmph_la-bmz.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/cmph/bmz.c' object='libcmph_la-bmz.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) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcmph_la-bmz.lo `test -f 'girepository/cmph/bmz.c' || echo '$(srcdir)/'`girepository/cmph/bmz.c
+
+libcmph_la-brz.lo: girepository/cmph/brz.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcmph_la-brz.lo -MD -MP -MF $(DEPDIR)/libcmph_la-brz.Tpo -c -o libcmph_la-brz.lo `test -f 'girepository/cmph/brz.c' || echo '$(srcdir)/'`girepository/cmph/brz.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcmph_la-brz.Tpo $(DEPDIR)/libcmph_la-brz.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/cmph/brz.c' object='libcmph_la-brz.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) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcmph_la-brz.lo `test -f 'girepository/cmph/brz.c' || echo '$(srcdir)/'`girepository/cmph/brz.c
+
+libcmph_la-buffer_entry.lo: girepository/cmph/buffer_entry.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcmph_la-buffer_entry.lo -MD -MP -MF $(DEPDIR)/libcmph_la-buffer_entry.Tpo -c -o libcmph_la-buffer_entry.lo `test -f 'girepository/cmph/buffer_entry.c' || echo '$(srcdir)/'`girepository/cmph/buffer_entry.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcmph_la-buffer_entry.Tpo $(DEPDIR)/libcmph_la-buffer_entry.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/cmph/buffer_entry.c' object='libcmph_la-buffer_entry.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) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcmph_la-buffer_entry.lo `test -f 'girepository/cmph/buffer_entry.c' || echo '$(srcdir)/'`girepository/cmph/buffer_entry.c
+
+libcmph_la-buffer_manager.lo: girepository/cmph/buffer_manager.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcmph_la-buffer_manager.lo -MD -MP -MF $(DEPDIR)/libcmph_la-buffer_manager.Tpo -c -o libcmph_la-buffer_manager.lo `test -f 'girepository/cmph/buffer_manager.c' || echo '$(srcdir)/'`girepository/cmph/buffer_manager.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcmph_la-buffer_manager.Tpo $(DEPDIR)/libcmph_la-buffer_manager.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/cmph/buffer_manager.c' object='libcmph_la-buffer_manager.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) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcmph_la-buffer_manager.lo `test -f 'girepository/cmph/buffer_manager.c' || echo '$(srcdir)/'`girepository/cmph/buffer_manager.c
+
+libcmph_la-chd.lo: girepository/cmph/chd.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcmph_la-chd.lo -MD -MP -MF $(DEPDIR)/libcmph_la-chd.Tpo -c -o libcmph_la-chd.lo `test -f 'girepository/cmph/chd.c' || echo '$(srcdir)/'`girepository/cmph/chd.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcmph_la-chd.Tpo $(DEPDIR)/libcmph_la-chd.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/cmph/chd.c' object='libcmph_la-chd.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) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcmph_la-chd.lo `test -f 'girepository/cmph/chd.c' || echo '$(srcdir)/'`girepository/cmph/chd.c
+
+libcmph_la-chd_ph.lo: girepository/cmph/chd_ph.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcmph_la-chd_ph.lo -MD -MP -MF $(DEPDIR)/libcmph_la-chd_ph.Tpo -c -o libcmph_la-chd_ph.lo `test -f 'girepository/cmph/chd_ph.c' || echo '$(srcdir)/'`girepository/cmph/chd_ph.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcmph_la-chd_ph.Tpo $(DEPDIR)/libcmph_la-chd_ph.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/cmph/chd_ph.c' object='libcmph_la-chd_ph.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) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcmph_la-chd_ph.lo `test -f 'girepository/cmph/chd_ph.c' || echo '$(srcdir)/'`girepository/cmph/chd_ph.c
+
+libcmph_la-chm.lo: girepository/cmph/chm.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcmph_la-chm.lo -MD -MP -MF $(DEPDIR)/libcmph_la-chm.Tpo -c -o libcmph_la-chm.lo `test -f 'girepository/cmph/chm.c' || echo '$(srcdir)/'`girepository/cmph/chm.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcmph_la-chm.Tpo $(DEPDIR)/libcmph_la-chm.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/cmph/chm.c' object='libcmph_la-chm.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) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcmph_la-chm.lo `test -f 'girepository/cmph/chm.c' || echo '$(srcdir)/'`girepository/cmph/chm.c
+
+libcmph_la-cmph.lo: girepository/cmph/cmph.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcmph_la-cmph.lo -MD -MP -MF $(DEPDIR)/libcmph_la-cmph.Tpo -c -o libcmph_la-cmph.lo `test -f 'girepository/cmph/cmph.c' || echo '$(srcdir)/'`girepository/cmph/cmph.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcmph_la-cmph.Tpo $(DEPDIR)/libcmph_la-cmph.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/cmph/cmph.c' object='libcmph_la-cmph.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) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcmph_la-cmph.lo `test -f 'girepository/cmph/cmph.c' || echo '$(srcdir)/'`girepository/cmph/cmph.c
+
+libcmph_la-cmph_structs.lo: girepository/cmph/cmph_structs.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcmph_la-cmph_structs.lo -MD -MP -MF $(DEPDIR)/libcmph_la-cmph_structs.Tpo -c -o libcmph_la-cmph_structs.lo `test -f 'girepository/cmph/cmph_structs.c' || echo '$(srcdir)/'`girepository/cmph/cmph_structs.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcmph_la-cmph_structs.Tpo $(DEPDIR)/libcmph_la-cmph_structs.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/cmph/cmph_structs.c' object='libcmph_la-cmph_structs.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) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcmph_la-cmph_structs.lo `test -f 'girepository/cmph/cmph_structs.c' || echo '$(srcdir)/'`girepository/cmph/cmph_structs.c
+
+libcmph_la-compressed_rank.lo: girepository/cmph/compressed_rank.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcmph_la-compressed_rank.lo -MD -MP -MF $(DEPDIR)/libcmph_la-compressed_rank.Tpo -c -o libcmph_la-compressed_rank.lo `test -f 'girepository/cmph/compressed_rank.c' || echo '$(srcdir)/'`girepository/cmph/compressed_rank.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcmph_la-compressed_rank.Tpo $(DEPDIR)/libcmph_la-compressed_rank.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/cmph/compressed_rank.c' object='libcmph_la-compressed_rank.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) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcmph_la-compressed_rank.lo `test -f 'girepository/cmph/compressed_rank.c' || echo '$(srcdir)/'`girepository/cmph/compressed_rank.c
+
+libcmph_la-compressed_seq.lo: girepository/cmph/compressed_seq.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcmph_la-compressed_seq.lo -MD -MP -MF $(DEPDIR)/libcmph_la-compressed_seq.Tpo -c -o libcmph_la-compressed_seq.lo `test -f 'girepository/cmph/compressed_seq.c' || echo '$(srcdir)/'`girepository/cmph/compressed_seq.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcmph_la-compressed_seq.Tpo $(DEPDIR)/libcmph_la-compressed_seq.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/cmph/compressed_seq.c' object='libcmph_la-compressed_seq.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) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcmph_la-compressed_seq.lo `test -f 'girepository/cmph/compressed_seq.c' || echo '$(srcdir)/'`girepository/cmph/compressed_seq.c
+
+libcmph_la-fch_buckets.lo: girepository/cmph/fch_buckets.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcmph_la-fch_buckets.lo -MD -MP -MF $(DEPDIR)/libcmph_la-fch_buckets.Tpo -c -o libcmph_la-fch_buckets.lo `test -f 'girepository/cmph/fch_buckets.c' || echo '$(srcdir)/'`girepository/cmph/fch_buckets.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcmph_la-fch_buckets.Tpo $(DEPDIR)/libcmph_la-fch_buckets.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/cmph/fch_buckets.c' object='libcmph_la-fch_buckets.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) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcmph_la-fch_buckets.lo `test -f 'girepository/cmph/fch_buckets.c' || echo '$(srcdir)/'`girepository/cmph/fch_buckets.c
+
+libcmph_la-fch.lo: girepository/cmph/fch.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcmph_la-fch.lo -MD -MP -MF $(DEPDIR)/libcmph_la-fch.Tpo -c -o libcmph_la-fch.lo `test -f 'girepository/cmph/fch.c' || echo '$(srcdir)/'`girepository/cmph/fch.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcmph_la-fch.Tpo $(DEPDIR)/libcmph_la-fch.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/cmph/fch.c' object='libcmph_la-fch.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) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcmph_la-fch.lo `test -f 'girepository/cmph/fch.c' || echo '$(srcdir)/'`girepository/cmph/fch.c
+
+libcmph_la-graph.lo: girepository/cmph/graph.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcmph_la-graph.lo -MD -MP -MF $(DEPDIR)/libcmph_la-graph.Tpo -c -o libcmph_la-graph.lo `test -f 'girepository/cmph/graph.c' || echo '$(srcdir)/'`girepository/cmph/graph.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcmph_la-graph.Tpo $(DEPDIR)/libcmph_la-graph.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/cmph/graph.c' object='libcmph_la-graph.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) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcmph_la-graph.lo `test -f 'girepository/cmph/graph.c' || echo '$(srcdir)/'`girepository/cmph/graph.c
+
+libcmph_la-hash.lo: girepository/cmph/hash.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcmph_la-hash.lo -MD -MP -MF $(DEPDIR)/libcmph_la-hash.Tpo -c -o libcmph_la-hash.lo `test -f 'girepository/cmph/hash.c' || echo '$(srcdir)/'`girepository/cmph/hash.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcmph_la-hash.Tpo $(DEPDIR)/libcmph_la-hash.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/cmph/hash.c' object='libcmph_la-hash.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) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcmph_la-hash.lo `test -f 'girepository/cmph/hash.c' || echo '$(srcdir)/'`girepository/cmph/hash.c
+
+libcmph_la-jenkins_hash.lo: girepository/cmph/jenkins_hash.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcmph_la-jenkins_hash.lo -MD -MP -MF $(DEPDIR)/libcmph_la-jenkins_hash.Tpo -c -o libcmph_la-jenkins_hash.lo `test -f 'girepository/cmph/jenkins_hash.c' || echo '$(srcdir)/'`girepository/cmph/jenkins_hash.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcmph_la-jenkins_hash.Tpo $(DEPDIR)/libcmph_la-jenkins_hash.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/cmph/jenkins_hash.c' object='libcmph_la-jenkins_hash.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) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcmph_la-jenkins_hash.lo `test -f 'girepository/cmph/jenkins_hash.c' || echo '$(srcdir)/'`girepository/cmph/jenkins_hash.c
+
+libcmph_la-miller_rabin.lo: girepository/cmph/miller_rabin.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcmph_la-miller_rabin.lo -MD -MP -MF $(DEPDIR)/libcmph_la-miller_rabin.Tpo -c -o libcmph_la-miller_rabin.lo `test -f 'girepository/cmph/miller_rabin.c' || echo '$(srcdir)/'`girepository/cmph/miller_rabin.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcmph_la-miller_rabin.Tpo $(DEPDIR)/libcmph_la-miller_rabin.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/cmph/miller_rabin.c' object='libcmph_la-miller_rabin.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) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcmph_la-miller_rabin.lo `test -f 'girepository/cmph/miller_rabin.c' || echo '$(srcdir)/'`girepository/cmph/miller_rabin.c
+
+libcmph_la-select.lo: girepository/cmph/select.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcmph_la-select.lo -MD -MP -MF $(DEPDIR)/libcmph_la-select.Tpo -c -o libcmph_la-select.lo `test -f 'girepository/cmph/select.c' || echo '$(srcdir)/'`girepository/cmph/select.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcmph_la-select.Tpo $(DEPDIR)/libcmph_la-select.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/cmph/select.c' object='libcmph_la-select.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) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcmph_la-select.lo `test -f 'girepository/cmph/select.c' || echo '$(srcdir)/'`girepository/cmph/select.c
+
+libcmph_la-vqueue.lo: girepository/cmph/vqueue.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcmph_la-vqueue.lo -MD -MP -MF $(DEPDIR)/libcmph_la-vqueue.Tpo -c -o libcmph_la-vqueue.lo `test -f 'girepository/cmph/vqueue.c' || echo '$(srcdir)/'`girepository/cmph/vqueue.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcmph_la-vqueue.Tpo $(DEPDIR)/libcmph_la-vqueue.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/cmph/vqueue.c' object='libcmph_la-vqueue.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) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcmph_la-vqueue.lo `test -f 'girepository/cmph/vqueue.c' || echo '$(srcdir)/'`girepository/cmph/vqueue.c
+
+libcmph_la-vstack.lo: girepository/cmph/vstack.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcmph_la-vstack.lo -MD -MP -MF $(DEPDIR)/libcmph_la-vstack.Tpo -c -o libcmph_la-vstack.lo `test -f 'girepository/cmph/vstack.c' || echo '$(srcdir)/'`girepository/cmph/vstack.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcmph_la-vstack.Tpo $(DEPDIR)/libcmph_la-vstack.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/cmph/vstack.c' object='libcmph_la-vstack.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) $(libcmph_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcmph_la-vstack.lo `test -f 'girepository/cmph/vstack.c' || echo '$(srcdir)/'`girepository/cmph/vstack.c
+
+libgirepository_1_0_la-gdump.lo: girepository/gdump.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgirepository_1_0_la-gdump.lo -MD -MP -MF $(DEPDIR)/libgirepository_1_0_la-gdump.Tpo -c -o libgirepository_1_0_la-gdump.lo `test -f 'girepository/gdump.c' || echo '$(srcdir)/'`girepository/gdump.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgirepository_1_0_la-gdump.Tpo $(DEPDIR)/libgirepository_1_0_la-gdump.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/gdump.c' object='libgirepository_1_0_la-gdump.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) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgirepository_1_0_la-gdump.lo `test -f 'girepository/gdump.c' || echo '$(srcdir)/'`girepository/gdump.c
+
+libgirepository_1_0_la-giarginfo.lo: girepository/giarginfo.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgirepository_1_0_la-giarginfo.lo -MD -MP -MF $(DEPDIR)/libgirepository_1_0_la-giarginfo.Tpo -c -o libgirepository_1_0_la-giarginfo.lo `test -f 'girepository/giarginfo.c' || echo '$(srcdir)/'`girepository/giarginfo.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgirepository_1_0_la-giarginfo.Tpo $(DEPDIR)/libgirepository_1_0_la-giarginfo.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/giarginfo.c' object='libgirepository_1_0_la-giarginfo.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) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgirepository_1_0_la-giarginfo.lo `test -f 'girepository/giarginfo.c' || echo '$(srcdir)/'`girepository/giarginfo.c
+
+libgirepository_1_0_la-gibaseinfo.lo: girepository/gibaseinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgirepository_1_0_la-gibaseinfo.lo -MD -MP -MF $(DEPDIR)/libgirepository_1_0_la-gibaseinfo.Tpo -c -o libgirepository_1_0_la-gibaseinfo.lo `test -f 'girepository/gibaseinfo.c' || echo '$(srcdir)/'`girepository/gibaseinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgirepository_1_0_la-gibaseinfo.Tpo $(DEPDIR)/libgirepository_1_0_la-gibaseinfo.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/gibaseinfo.c' object='libgirepository_1_0_la-gibaseinfo.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) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgirepository_1_0_la-gibaseinfo.lo `test -f 'girepository/gibaseinfo.c' || echo '$(srcdir)/'`girepository/gibaseinfo.c
+
+libgirepository_1_0_la-gicallableinfo.lo: girepository/gicallableinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgirepository_1_0_la-gicallableinfo.lo -MD -MP -MF $(DEPDIR)/libgirepository_1_0_la-gicallableinfo.Tpo -c -o libgirepository_1_0_la-gicallableinfo.lo `test -f 'girepository/gicallableinfo.c' || echo '$(srcdir)/'`girepository/gicallableinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgirepository_1_0_la-gicallableinfo.Tpo $(DEPDIR)/libgirepository_1_0_la-gicallableinfo.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/gicallableinfo.c' object='libgirepository_1_0_la-gicallableinfo.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) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgirepository_1_0_la-gicallableinfo.lo `test -f 'girepository/gicallableinfo.c' || echo '$(srcdir)/'`girepository/gicallableinfo.c
+
+libgirepository_1_0_la-giconstantinfo.lo: girepository/giconstantinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgirepository_1_0_la-giconstantinfo.lo -MD -MP -MF $(DEPDIR)/libgirepository_1_0_la-giconstantinfo.Tpo -c -o libgirepository_1_0_la-giconstantinfo.lo `test -f 'girepository/giconstantinfo.c' || echo '$(srcdir)/'`girepository/giconstantinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgirepository_1_0_la-giconstantinfo.Tpo $(DEPDIR)/libgirepository_1_0_la-giconstantinfo.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/giconstantinfo.c' object='libgirepository_1_0_la-giconstantinfo.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) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgirepository_1_0_la-giconstantinfo.lo `test -f 'girepository/giconstantinfo.c' || echo '$(srcdir)/'`girepository/giconstantinfo.c
+
+libgirepository_1_0_la-gienuminfo.lo: girepository/gienuminfo.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgirepository_1_0_la-gienuminfo.lo -MD -MP -MF $(DEPDIR)/libgirepository_1_0_la-gienuminfo.Tpo -c -o libgirepository_1_0_la-gienuminfo.lo `test -f 'girepository/gienuminfo.c' || echo '$(srcdir)/'`girepository/gienuminfo.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgirepository_1_0_la-gienuminfo.Tpo $(DEPDIR)/libgirepository_1_0_la-gienuminfo.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/gienuminfo.c' object='libgirepository_1_0_la-gienuminfo.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) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgirepository_1_0_la-gienuminfo.lo `test -f 'girepository/gienuminfo.c' || echo '$(srcdir)/'`girepository/gienuminfo.c
+
+libgirepository_1_0_la-gifieldinfo.lo: girepository/gifieldinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgirepository_1_0_la-gifieldinfo.lo -MD -MP -MF $(DEPDIR)/libgirepository_1_0_la-gifieldinfo.Tpo -c -o libgirepository_1_0_la-gifieldinfo.lo `test -f 'girepository/gifieldinfo.c' || echo '$(srcdir)/'`girepository/gifieldinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgirepository_1_0_la-gifieldinfo.Tpo $(DEPDIR)/libgirepository_1_0_la-gifieldinfo.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/gifieldinfo.c' object='libgirepository_1_0_la-gifieldinfo.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) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgirepository_1_0_la-gifieldinfo.lo `test -f 'girepository/gifieldinfo.c' || echo '$(srcdir)/'`girepository/gifieldinfo.c
+
+libgirepository_1_0_la-gifunctioninfo.lo: girepository/gifunctioninfo.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgirepository_1_0_la-gifunctioninfo.lo -MD -MP -MF $(DEPDIR)/libgirepository_1_0_la-gifunctioninfo.Tpo -c -o libgirepository_1_0_la-gifunctioninfo.lo `test -f 'girepository/gifunctioninfo.c' || echo '$(srcdir)/'`girepository/gifunctioninfo.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgirepository_1_0_la-gifunctioninfo.Tpo $(DEPDIR)/libgirepository_1_0_la-gifunctioninfo.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/gifunctioninfo.c' object='libgirepository_1_0_la-gifunctioninfo.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) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgirepository_1_0_la-gifunctioninfo.lo `test -f 'girepository/gifunctioninfo.c' || echo '$(srcdir)/'`girepository/gifunctioninfo.c
+
+libgirepository_1_0_la-ginvoke.lo: girepository/ginvoke.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgirepository_1_0_la-ginvoke.lo -MD -MP -MF $(DEPDIR)/libgirepository_1_0_la-ginvoke.Tpo -c -o libgirepository_1_0_la-ginvoke.lo `test -f 'girepository/ginvoke.c' || echo '$(srcdir)/'`girepository/ginvoke.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgirepository_1_0_la-ginvoke.Tpo $(DEPDIR)/libgirepository_1_0_la-ginvoke.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/ginvoke.c' object='libgirepository_1_0_la-ginvoke.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) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgirepository_1_0_la-ginvoke.lo `test -f 'girepository/ginvoke.c' || echo '$(srcdir)/'`girepository/ginvoke.c
+
+libgirepository_1_0_la-giinterfaceinfo.lo: girepository/giinterfaceinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgirepository_1_0_la-giinterfaceinfo.lo -MD -MP -MF $(DEPDIR)/libgirepository_1_0_la-giinterfaceinfo.Tpo -c -o libgirepository_1_0_la-giinterfaceinfo.lo `test -f 'girepository/giinterfaceinfo.c' || echo '$(srcdir)/'`girepository/giinterfaceinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgirepository_1_0_la-giinterfaceinfo.Tpo $(DEPDIR)/libgirepository_1_0_la-giinterfaceinfo.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/giinterfaceinfo.c' object='libgirepository_1_0_la-giinterfaceinfo.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) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgirepository_1_0_la-giinterfaceinfo.lo `test -f 'girepository/giinterfaceinfo.c' || echo '$(srcdir)/'`girepository/giinterfaceinfo.c
+
+libgirepository_1_0_la-giobjectinfo.lo: girepository/giobjectinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgirepository_1_0_la-giobjectinfo.lo -MD -MP -MF $(DEPDIR)/libgirepository_1_0_la-giobjectinfo.Tpo -c -o libgirepository_1_0_la-giobjectinfo.lo `test -f 'girepository/giobjectinfo.c' || echo '$(srcdir)/'`girepository/giobjectinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgirepository_1_0_la-giobjectinfo.Tpo $(DEPDIR)/libgirepository_1_0_la-giobjectinfo.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/giobjectinfo.c' object='libgirepository_1_0_la-giobjectinfo.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) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgirepository_1_0_la-giobjectinfo.lo `test -f 'girepository/giobjectinfo.c' || echo '$(srcdir)/'`girepository/giobjectinfo.c
+
+libgirepository_1_0_la-gipropertyinfo.lo: girepository/gipropertyinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgirepository_1_0_la-gipropertyinfo.lo -MD -MP -MF $(DEPDIR)/libgirepository_1_0_la-gipropertyinfo.Tpo -c -o libgirepository_1_0_la-gipropertyinfo.lo `test -f 'girepository/gipropertyinfo.c' || echo '$(srcdir)/'`girepository/gipropertyinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgirepository_1_0_la-gipropertyinfo.Tpo $(DEPDIR)/libgirepository_1_0_la-gipropertyinfo.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/gipropertyinfo.c' object='libgirepository_1_0_la-gipropertyinfo.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) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgirepository_1_0_la-gipropertyinfo.lo `test -f 'girepository/gipropertyinfo.c' || echo '$(srcdir)/'`girepository/gipropertyinfo.c
+
+libgirepository_1_0_la-giregisteredtypeinfo.lo: girepository/giregisteredtypeinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgirepository_1_0_la-giregisteredtypeinfo.lo -MD -MP -MF $(DEPDIR)/libgirepository_1_0_la-giregisteredtypeinfo.Tpo -c -o libgirepository_1_0_la-giregisteredtypeinfo.lo `test -f 'girepository/giregisteredtypeinfo.c' || echo '$(srcdir)/'`girepository/giregisteredtypeinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgirepository_1_0_la-giregisteredtypeinfo.Tpo $(DEPDIR)/libgirepository_1_0_la-giregisteredtypeinfo.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/giregisteredtypeinfo.c' object='libgirepository_1_0_la-giregisteredtypeinfo.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) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgirepository_1_0_la-giregisteredtypeinfo.lo `test -f 'girepository/giregisteredtypeinfo.c' || echo '$(srcdir)/'`girepository/giregisteredtypeinfo.c
+
+libgirepository_1_0_la-girepository.lo: girepository/girepository.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgirepository_1_0_la-girepository.lo -MD -MP -MF $(DEPDIR)/libgirepository_1_0_la-girepository.Tpo -c -o libgirepository_1_0_la-girepository.lo `test -f 'girepository/girepository.c' || echo '$(srcdir)/'`girepository/girepository.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgirepository_1_0_la-girepository.Tpo $(DEPDIR)/libgirepository_1_0_la-girepository.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/girepository.c' object='libgirepository_1_0_la-girepository.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) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgirepository_1_0_la-girepository.lo `test -f 'girepository/girepository.c' || echo '$(srcdir)/'`girepository/girepository.c
+
+libgirepository_1_0_la-girffi.lo: girepository/girffi.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgirepository_1_0_la-girffi.lo -MD -MP -MF $(DEPDIR)/libgirepository_1_0_la-girffi.Tpo -c -o libgirepository_1_0_la-girffi.lo `test -f 'girepository/girffi.c' || echo '$(srcdir)/'`girepository/girffi.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgirepository_1_0_la-girffi.Tpo $(DEPDIR)/libgirepository_1_0_la-girffi.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/girffi.c' object='libgirepository_1_0_la-girffi.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) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgirepository_1_0_la-girffi.lo `test -f 'girepository/girffi.c' || echo '$(srcdir)/'`girepository/girffi.c
+
+libgirepository_1_0_la-gisignalinfo.lo: girepository/gisignalinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgirepository_1_0_la-gisignalinfo.lo -MD -MP -MF $(DEPDIR)/libgirepository_1_0_la-gisignalinfo.Tpo -c -o libgirepository_1_0_la-gisignalinfo.lo `test -f 'girepository/gisignalinfo.c' || echo '$(srcdir)/'`girepository/gisignalinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgirepository_1_0_la-gisignalinfo.Tpo $(DEPDIR)/libgirepository_1_0_la-gisignalinfo.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/gisignalinfo.c' object='libgirepository_1_0_la-gisignalinfo.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) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgirepository_1_0_la-gisignalinfo.lo `test -f 'girepository/gisignalinfo.c' || echo '$(srcdir)/'`girepository/gisignalinfo.c
+
+libgirepository_1_0_la-gistructinfo.lo: girepository/gistructinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgirepository_1_0_la-gistructinfo.lo -MD -MP -MF $(DEPDIR)/libgirepository_1_0_la-gistructinfo.Tpo -c -o libgirepository_1_0_la-gistructinfo.lo `test -f 'girepository/gistructinfo.c' || echo '$(srcdir)/'`girepository/gistructinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgirepository_1_0_la-gistructinfo.Tpo $(DEPDIR)/libgirepository_1_0_la-gistructinfo.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/gistructinfo.c' object='libgirepository_1_0_la-gistructinfo.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) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgirepository_1_0_la-gistructinfo.lo `test -f 'girepository/gistructinfo.c' || echo '$(srcdir)/'`girepository/gistructinfo.c
+
+libgirepository_1_0_la-gitypeinfo.lo: girepository/gitypeinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgirepository_1_0_la-gitypeinfo.lo -MD -MP -MF $(DEPDIR)/libgirepository_1_0_la-gitypeinfo.Tpo -c -o libgirepository_1_0_la-gitypeinfo.lo `test -f 'girepository/gitypeinfo.c' || echo '$(srcdir)/'`girepository/gitypeinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgirepository_1_0_la-gitypeinfo.Tpo $(DEPDIR)/libgirepository_1_0_la-gitypeinfo.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/gitypeinfo.c' object='libgirepository_1_0_la-gitypeinfo.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) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgirepository_1_0_la-gitypeinfo.lo `test -f 'girepository/gitypeinfo.c' || echo '$(srcdir)/'`girepository/gitypeinfo.c
+
+libgirepository_1_0_la-gitypelib.lo: girepository/gitypelib.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgirepository_1_0_la-gitypelib.lo -MD -MP -MF $(DEPDIR)/libgirepository_1_0_la-gitypelib.Tpo -c -o libgirepository_1_0_la-gitypelib.lo `test -f 'girepository/gitypelib.c' || echo '$(srcdir)/'`girepository/gitypelib.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgirepository_1_0_la-gitypelib.Tpo $(DEPDIR)/libgirepository_1_0_la-gitypelib.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/gitypelib.c' object='libgirepository_1_0_la-gitypelib.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) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgirepository_1_0_la-gitypelib.lo `test -f 'girepository/gitypelib.c' || echo '$(srcdir)/'`girepository/gitypelib.c
+
+libgirepository_1_0_la-giunioninfo.lo: girepository/giunioninfo.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgirepository_1_0_la-giunioninfo.lo -MD -MP -MF $(DEPDIR)/libgirepository_1_0_la-giunioninfo.Tpo -c -o libgirepository_1_0_la-giunioninfo.lo `test -f 'girepository/giunioninfo.c' || echo '$(srcdir)/'`girepository/giunioninfo.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgirepository_1_0_la-giunioninfo.Tpo $(DEPDIR)/libgirepository_1_0_la-giunioninfo.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/giunioninfo.c' object='libgirepository_1_0_la-giunioninfo.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) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgirepository_1_0_la-giunioninfo.lo `test -f 'girepository/giunioninfo.c' || echo '$(srcdir)/'`girepository/giunioninfo.c
+
+libgirepository_1_0_la-givfuncinfo.lo: girepository/givfuncinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgirepository_1_0_la-givfuncinfo.lo -MD -MP -MF $(DEPDIR)/libgirepository_1_0_la-givfuncinfo.Tpo -c -o libgirepository_1_0_la-givfuncinfo.lo `test -f 'girepository/givfuncinfo.c' || echo '$(srcdir)/'`girepository/givfuncinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgirepository_1_0_la-givfuncinfo.Tpo $(DEPDIR)/libgirepository_1_0_la-givfuncinfo.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/givfuncinfo.c' object='libgirepository_1_0_la-givfuncinfo.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) $(libgirepository_1_0_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgirepository_1_0_la-givfuncinfo.lo `test -f 'girepository/givfuncinfo.c' || echo '$(srcdir)/'`girepository/givfuncinfo.c
+
+libgirepository_gthash_la-gthash.lo: girepository/gthash.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) $(libgirepository_gthash_la_CFLAGS) $(CFLAGS) -MT libgirepository_gthash_la-gthash.lo -MD -MP -MF $(DEPDIR)/libgirepository_gthash_la-gthash.Tpo -c -o libgirepository_gthash_la-gthash.lo `test -f 'girepository/gthash.c' || echo '$(srcdir)/'`girepository/gthash.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgirepository_gthash_la-gthash.Tpo $(DEPDIR)/libgirepository_gthash_la-gthash.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/gthash.c' object='libgirepository_gthash_la-gthash.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) $(libgirepository_gthash_la_CFLAGS) $(CFLAGS) -c -o libgirepository_gthash_la-gthash.lo `test -f 'girepository/gthash.c' || echo '$(srcdir)/'`girepository/gthash.c
+
+libgirepository_internals_la-girmodule.lo: girepository/girmodule.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) $(libgirepository_internals_la_CFLAGS) $(CFLAGS) -MT libgirepository_internals_la-girmodule.lo -MD -MP -MF $(DEPDIR)/libgirepository_internals_la-girmodule.Tpo -c -o libgirepository_internals_la-girmodule.lo `test -f 'girepository/girmodule.c' || echo '$(srcdir)/'`girepository/girmodule.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgirepository_internals_la-girmodule.Tpo $(DEPDIR)/libgirepository_internals_la-girmodule.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/girmodule.c' object='libgirepository_internals_la-girmodule.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) $(libgirepository_internals_la_CFLAGS) $(CFLAGS) -c -o libgirepository_internals_la-girmodule.lo `test -f 'girepository/girmodule.c' || echo '$(srcdir)/'`girepository/girmodule.c
+
+libgirepository_internals_la-girnode.lo: girepository/girnode.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) $(libgirepository_internals_la_CFLAGS) $(CFLAGS) -MT libgirepository_internals_la-girnode.lo -MD -MP -MF $(DEPDIR)/libgirepository_internals_la-girnode.Tpo -c -o libgirepository_internals_la-girnode.lo `test -f 'girepository/girnode.c' || echo '$(srcdir)/'`girepository/girnode.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgirepository_internals_la-girnode.Tpo $(DEPDIR)/libgirepository_internals_la-girnode.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/girnode.c' object='libgirepository_internals_la-girnode.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) $(libgirepository_internals_la_CFLAGS) $(CFLAGS) -c -o libgirepository_internals_la-girnode.lo `test -f 'girepository/girnode.c' || echo '$(srcdir)/'`girepository/girnode.c
+
+libgirepository_internals_la-giroffsets.lo: girepository/giroffsets.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) $(libgirepository_internals_la_CFLAGS) $(CFLAGS) -MT libgirepository_internals_la-giroffsets.lo -MD -MP -MF $(DEPDIR)/libgirepository_internals_la-giroffsets.Tpo -c -o libgirepository_internals_la-giroffsets.lo `test -f 'girepository/giroffsets.c' || echo '$(srcdir)/'`girepository/giroffsets.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgirepository_internals_la-giroffsets.Tpo $(DEPDIR)/libgirepository_internals_la-giroffsets.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/giroffsets.c' object='libgirepository_internals_la-giroffsets.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) $(libgirepository_internals_la_CFLAGS) $(CFLAGS) -c -o libgirepository_internals_la-giroffsets.lo `test -f 'girepository/giroffsets.c' || echo '$(srcdir)/'`girepository/giroffsets.c
+
+libgirepository_internals_la-girparser.lo: girepository/girparser.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) $(libgirepository_internals_la_CFLAGS) $(CFLAGS) -MT libgirepository_internals_la-girparser.lo -MD -MP -MF $(DEPDIR)/libgirepository_internals_la-girparser.Tpo -c -o libgirepository_internals_la-girparser.lo `test -f 'girepository/girparser.c' || echo '$(srcdir)/'`girepository/girparser.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgirepository_internals_la-girparser.Tpo $(DEPDIR)/libgirepository_internals_la-girparser.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/girparser.c' object='libgirepository_internals_la-girparser.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) $(libgirepository_internals_la_CFLAGS) $(CFLAGS) -c -o libgirepository_internals_la-girparser.lo `test -f 'girepository/girparser.c' || echo '$(srcdir)/'`girepository/girparser.c
+
+libgirepository_internals_la-girwriter.lo: girepository/girwriter.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) $(libgirepository_internals_la_CFLAGS) $(CFLAGS) -MT libgirepository_internals_la-girwriter.lo -MD -MP -MF $(DEPDIR)/libgirepository_internals_la-girwriter.Tpo -c -o libgirepository_internals_la-girwriter.lo `test -f 'girepository/girwriter.c' || echo '$(srcdir)/'`girepository/girwriter.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgirepository_internals_la-girwriter.Tpo $(DEPDIR)/libgirepository_internals_la-girwriter.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/girwriter.c' object='libgirepository_internals_la-girwriter.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) $(libgirepository_internals_la_CFLAGS) $(CFLAGS) -c -o libgirepository_internals_la-girwriter.lo `test -f 'girepository/girwriter.c' || echo '$(srcdir)/'`girepository/girwriter.c
+
+libgiscanner_la-sourcescanner.lo: giscanner/sourcescanner.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgiscanner_la_CPPFLAGS) $(CPPFLAGS) $(libgiscanner_la_CFLAGS) $(CFLAGS) -MT libgiscanner_la-sourcescanner.lo -MD -MP -MF $(DEPDIR)/libgiscanner_la-sourcescanner.Tpo -c -o libgiscanner_la-sourcescanner.lo `test -f 'giscanner/sourcescanner.c' || echo '$(srcdir)/'`giscanner/sourcescanner.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgiscanner_la-sourcescanner.Tpo $(DEPDIR)/libgiscanner_la-sourcescanner.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='giscanner/sourcescanner.c' object='libgiscanner_la-sourcescanner.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) $(libgiscanner_la_CPPFLAGS) $(CPPFLAGS) $(libgiscanner_la_CFLAGS) $(CFLAGS) -c -o libgiscanner_la-sourcescanner.lo `test -f 'giscanner/sourcescanner.c' || echo '$(srcdir)/'`giscanner/sourcescanner.c
+
+libgiscanner_la-scannerlexer.lo: scannerlexer.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgiscanner_la_CPPFLAGS) $(CPPFLAGS) $(libgiscanner_la_CFLAGS) $(CFLAGS) -MT libgiscanner_la-scannerlexer.lo -MD -MP -MF $(DEPDIR)/libgiscanner_la-scannerlexer.Tpo -c -o libgiscanner_la-scannerlexer.lo `test -f 'scannerlexer.c' || echo '$(srcdir)/'`scannerlexer.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgiscanner_la-scannerlexer.Tpo $(DEPDIR)/libgiscanner_la-scannerlexer.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='scannerlexer.c' object='libgiscanner_la-scannerlexer.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) $(libgiscanner_la_CPPFLAGS) $(CPPFLAGS) $(libgiscanner_la_CFLAGS) $(CFLAGS) -c -o libgiscanner_la-scannerlexer.lo `test -f 'scannerlexer.c' || echo '$(srcdir)/'`scannerlexer.c
+
+libgiscanner_la-scannerparser.lo: scannerparser.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgiscanner_la_CPPFLAGS) $(CPPFLAGS) $(libgiscanner_la_CFLAGS) $(CFLAGS) -MT libgiscanner_la-scannerparser.lo -MD -MP -MF $(DEPDIR)/libgiscanner_la-scannerparser.Tpo -c -o libgiscanner_la-scannerparser.lo `test -f 'scannerparser.c' || echo '$(srcdir)/'`scannerparser.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgiscanner_la-scannerparser.Tpo $(DEPDIR)/libgiscanner_la-scannerparser.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='scannerparser.c' object='libgiscanner_la-scannerparser.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) $(libgiscanner_la_CPPFLAGS) $(CPPFLAGS) $(libgiscanner_la_CFLAGS) $(CFLAGS) -c -o libgiscanner_la-scannerparser.lo `test -f 'scannerparser.c' || echo '$(srcdir)/'`scannerparser.c
+
+cmph_bdz_test-cmph-bdz-test.o: girepository/cmph-bdz-test.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cmph_bdz_test_CFLAGS) $(CFLAGS) -MT cmph_bdz_test-cmph-bdz-test.o -MD -MP -MF $(DEPDIR)/cmph_bdz_test-cmph-bdz-test.Tpo -c -o cmph_bdz_test-cmph-bdz-test.o `test -f 'girepository/cmph-bdz-test.c' || echo '$(srcdir)/'`girepository/cmph-bdz-test.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/cmph_bdz_test-cmph-bdz-test.Tpo $(DEPDIR)/cmph_bdz_test-cmph-bdz-test.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/cmph-bdz-test.c' object='cmph_bdz_test-cmph-bdz-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cmph_bdz_test_CFLAGS) $(CFLAGS) -c -o cmph_bdz_test-cmph-bdz-test.o `test -f 'girepository/cmph-bdz-test.c' || echo '$(srcdir)/'`girepository/cmph-bdz-test.c
+
+cmph_bdz_test-cmph-bdz-test.obj: girepository/cmph-bdz-test.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cmph_bdz_test_CFLAGS) $(CFLAGS) -MT cmph_bdz_test-cmph-bdz-test.obj -MD -MP -MF $(DEPDIR)/cmph_bdz_test-cmph-bdz-test.Tpo -c -o cmph_bdz_test-cmph-bdz-test.obj `if test -f 'girepository/cmph-bdz-test.c'; then $(CYGPATH_W) 'girepository/cmph-bdz-test.c'; else $(CYGPATH_W) '$(srcdir)/girepository/cmph-bdz-test.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/cmph_bdz_test-cmph-bdz-test.Tpo $(DEPDIR)/cmph_bdz_test-cmph-bdz-test.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/cmph-bdz-test.c' object='cmph_bdz_test-cmph-bdz-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cmph_bdz_test_CFLAGS) $(CFLAGS) -c -o cmph_bdz_test-cmph-bdz-test.obj `if test -f 'girepository/cmph-bdz-test.c'; then $(CYGPATH_W) 'girepository/cmph-bdz-test.c'; else $(CYGPATH_W) '$(srcdir)/girepository/cmph-bdz-test.c'; fi`
+
+g_ir_compiler-compiler.o: tools/compiler.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(g_ir_compiler_CPPFLAGS) $(CPPFLAGS) $(g_ir_compiler_CFLAGS) $(CFLAGS) -MT g_ir_compiler-compiler.o -MD -MP -MF $(DEPDIR)/g_ir_compiler-compiler.Tpo -c -o g_ir_compiler-compiler.o `test -f 'tools/compiler.c' || echo '$(srcdir)/'`tools/compiler.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/g_ir_compiler-compiler.Tpo $(DEPDIR)/g_ir_compiler-compiler.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='tools/compiler.c' object='g_ir_compiler-compiler.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(g_ir_compiler_CPPFLAGS) $(CPPFLAGS) $(g_ir_compiler_CFLAGS) $(CFLAGS) -c -o g_ir_compiler-compiler.o `test -f 'tools/compiler.c' || echo '$(srcdir)/'`tools/compiler.c
+
+g_ir_compiler-compiler.obj: tools/compiler.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(g_ir_compiler_CPPFLAGS) $(CPPFLAGS) $(g_ir_compiler_CFLAGS) $(CFLAGS) -MT g_ir_compiler-compiler.obj -MD -MP -MF $(DEPDIR)/g_ir_compiler-compiler.Tpo -c -o g_ir_compiler-compiler.obj `if test -f 'tools/compiler.c'; then $(CYGPATH_W) 'tools/compiler.c'; else $(CYGPATH_W) '$(srcdir)/tools/compiler.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/g_ir_compiler-compiler.Tpo $(DEPDIR)/g_ir_compiler-compiler.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='tools/compiler.c' object='g_ir_compiler-compiler.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(g_ir_compiler_CPPFLAGS) $(CPPFLAGS) $(g_ir_compiler_CFLAGS) $(CFLAGS) -c -o g_ir_compiler-compiler.obj `if test -f 'tools/compiler.c'; then $(CYGPATH_W) 'tools/compiler.c'; else $(CYGPATH_W) '$(srcdir)/tools/compiler.c'; fi`
+
+g_ir_generate-generate.o: tools/generate.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(g_ir_generate_CPPFLAGS) $(CPPFLAGS) $(g_ir_generate_CFLAGS) $(CFLAGS) -MT g_ir_generate-generate.o -MD -MP -MF $(DEPDIR)/g_ir_generate-generate.Tpo -c -o g_ir_generate-generate.o `test -f 'tools/generate.c' || echo '$(srcdir)/'`tools/generate.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/g_ir_generate-generate.Tpo $(DEPDIR)/g_ir_generate-generate.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='tools/generate.c' object='g_ir_generate-generate.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(g_ir_generate_CPPFLAGS) $(CPPFLAGS) $(g_ir_generate_CFLAGS) $(CFLAGS) -c -o g_ir_generate-generate.o `test -f 'tools/generate.c' || echo '$(srcdir)/'`tools/generate.c
+
+g_ir_generate-generate.obj: tools/generate.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(g_ir_generate_CPPFLAGS) $(CPPFLAGS) $(g_ir_generate_CFLAGS) $(CFLAGS) -MT g_ir_generate-generate.obj -MD -MP -MF $(DEPDIR)/g_ir_generate-generate.Tpo -c -o g_ir_generate-generate.obj `if test -f 'tools/generate.c'; then $(CYGPATH_W) 'tools/generate.c'; else $(CYGPATH_W) '$(srcdir)/tools/generate.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/g_ir_generate-generate.Tpo $(DEPDIR)/g_ir_generate-generate.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='tools/generate.c' object='g_ir_generate-generate.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(g_ir_generate_CPPFLAGS) $(CPPFLAGS) $(g_ir_generate_CFLAGS) $(CFLAGS) -c -o g_ir_generate-generate.obj `if test -f 'tools/generate.c'; then $(CYGPATH_W) 'tools/generate.c'; else $(CYGPATH_W) '$(srcdir)/tools/generate.c'; fi`
+
+gi_dump_types-gdump.o: girepository/gdump.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gi_dump_types_CFLAGS) $(CFLAGS) -MT gi_dump_types-gdump.o -MD -MP -MF $(DEPDIR)/gi_dump_types-gdump.Tpo -c -o gi_dump_types-gdump.o `test -f 'girepository/gdump.c' || echo '$(srcdir)/'`girepository/gdump.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/gi_dump_types-gdump.Tpo $(DEPDIR)/gi_dump_types-gdump.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/gdump.c' object='gi_dump_types-gdump.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gi_dump_types_CFLAGS) $(CFLAGS) -c -o gi_dump_types-gdump.o `test -f 'girepository/gdump.c' || echo '$(srcdir)/'`girepository/gdump.c
+
+gi_dump_types-gdump.obj: girepository/gdump.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gi_dump_types_CFLAGS) $(CFLAGS) -MT gi_dump_types-gdump.obj -MD -MP -MF $(DEPDIR)/gi_dump_types-gdump.Tpo -c -o gi_dump_types-gdump.obj `if test -f 'girepository/gdump.c'; then $(CYGPATH_W) 'girepository/gdump.c'; else $(CYGPATH_W) '$(srcdir)/girepository/gdump.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/gi_dump_types-gdump.Tpo $(DEPDIR)/gi_dump_types-gdump.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/gdump.c' object='gi_dump_types-gdump.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gi_dump_types_CFLAGS) $(CFLAGS) -c -o gi_dump_types-gdump.obj `if test -f 'girepository/gdump.c'; then $(CYGPATH_W) 'girepository/gdump.c'; else $(CYGPATH_W) '$(srcdir)/girepository/gdump.c'; fi`
+
+gi_dump_types-gi-dump-types.o: girepository/gi-dump-types.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gi_dump_types_CFLAGS) $(CFLAGS) -MT gi_dump_types-gi-dump-types.o -MD -MP -MF $(DEPDIR)/gi_dump_types-gi-dump-types.Tpo -c -o gi_dump_types-gi-dump-types.o `test -f 'girepository/gi-dump-types.c' || echo '$(srcdir)/'`girepository/gi-dump-types.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/gi_dump_types-gi-dump-types.Tpo $(DEPDIR)/gi_dump_types-gi-dump-types.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/gi-dump-types.c' object='gi_dump_types-gi-dump-types.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gi_dump_types_CFLAGS) $(CFLAGS) -c -o gi_dump_types-gi-dump-types.o `test -f 'girepository/gi-dump-types.c' || echo '$(srcdir)/'`girepository/gi-dump-types.c
+
+gi_dump_types-gi-dump-types.obj: girepository/gi-dump-types.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gi_dump_types_CFLAGS) $(CFLAGS) -MT gi_dump_types-gi-dump-types.obj -MD -MP -MF $(DEPDIR)/gi_dump_types-gi-dump-types.Tpo -c -o gi_dump_types-gi-dump-types.obj `if test -f 'girepository/gi-dump-types.c'; then $(CYGPATH_W) 'girepository/gi-dump-types.c'; else $(CYGPATH_W) '$(srcdir)/girepository/gi-dump-types.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/gi_dump_types-gi-dump-types.Tpo $(DEPDIR)/gi_dump_types-gi-dump-types.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/gi-dump-types.c' object='gi_dump_types-gi-dump-types.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gi_dump_types_CFLAGS) $(CFLAGS) -c -o gi_dump_types-gi-dump-types.obj `if test -f 'girepository/gi-dump-types.c'; then $(CYGPATH_W) 'girepository/gi-dump-types.c'; else $(CYGPATH_W) '$(srcdir)/girepository/gi-dump-types.c'; fi`
+
+glib_print-glib-print.o: examples/glib-print.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(glib_print_CFLAGS) $(CFLAGS) -MT glib_print-glib-print.o -MD -MP -MF $(DEPDIR)/glib_print-glib-print.Tpo -c -o glib_print-glib-print.o `test -f 'examples/glib-print.c' || echo '$(srcdir)/'`examples/glib-print.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/glib_print-glib-print.Tpo $(DEPDIR)/glib_print-glib-print.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='examples/glib-print.c' object='glib_print-glib-print.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(glib_print_CFLAGS) $(CFLAGS) -c -o glib_print-glib-print.o `test -f 'examples/glib-print.c' || echo '$(srcdir)/'`examples/glib-print.c
+
+glib_print-glib-print.obj: examples/glib-print.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(glib_print_CFLAGS) $(CFLAGS) -MT glib_print-glib-print.obj -MD -MP -MF $(DEPDIR)/glib_print-glib-print.Tpo -c -o glib_print-glib-print.obj `if test -f 'examples/glib-print.c'; then $(CYGPATH_W) 'examples/glib-print.c'; else $(CYGPATH_W) '$(srcdir)/examples/glib-print.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/glib_print-glib-print.Tpo $(DEPDIR)/glib_print-glib-print.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='examples/glib-print.c' object='glib_print-glib-print.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(glib_print_CFLAGS) $(CFLAGS) -c -o glib_print-glib-print.obj `if test -f 'examples/glib-print.c'; then $(CYGPATH_W) 'examples/glib-print.c'; else $(CYGPATH_W) '$(srcdir)/examples/glib-print.c'; fi`
+
+gthash_test-gthash.o: girepository/gthash.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gthash_test_CFLAGS) $(CFLAGS) -MT gthash_test-gthash.o -MD -MP -MF $(DEPDIR)/gthash_test-gthash.Tpo -c -o gthash_test-gthash.o `test -f 'girepository/gthash.c' || echo '$(srcdir)/'`girepository/gthash.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/gthash_test-gthash.Tpo $(DEPDIR)/gthash_test-gthash.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/gthash.c' object='gthash_test-gthash.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gthash_test_CFLAGS) $(CFLAGS) -c -o gthash_test-gthash.o `test -f 'girepository/gthash.c' || echo '$(srcdir)/'`girepository/gthash.c
+
+gthash_test-gthash.obj: girepository/gthash.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gthash_test_CFLAGS) $(CFLAGS) -MT gthash_test-gthash.obj -MD -MP -MF $(DEPDIR)/gthash_test-gthash.Tpo -c -o gthash_test-gthash.obj `if test -f 'girepository/gthash.c'; then $(CYGPATH_W) 'girepository/gthash.c'; else $(CYGPATH_W) '$(srcdir)/girepository/gthash.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/gthash_test-gthash.Tpo $(DEPDIR)/gthash_test-gthash.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/gthash.c' object='gthash_test-gthash.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gthash_test_CFLAGS) $(CFLAGS) -c -o gthash_test-gthash.obj `if test -f 'girepository/gthash.c'; then $(CYGPATH_W) 'girepository/gthash.c'; else $(CYGPATH_W) '$(srcdir)/girepository/gthash.c'; fi`
+
+gthash_test-gthash-test.o: girepository/gthash-test.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gthash_test_CFLAGS) $(CFLAGS) -MT gthash_test-gthash-test.o -MD -MP -MF $(DEPDIR)/gthash_test-gthash-test.Tpo -c -o gthash_test-gthash-test.o `test -f 'girepository/gthash-test.c' || echo '$(srcdir)/'`girepository/gthash-test.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/gthash_test-gthash-test.Tpo $(DEPDIR)/gthash_test-gthash-test.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/gthash-test.c' object='gthash_test-gthash-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gthash_test_CFLAGS) $(CFLAGS) -c -o gthash_test-gthash-test.o `test -f 'girepository/gthash-test.c' || echo '$(srcdir)/'`girepository/gthash-test.c
+
+gthash_test-gthash-test.obj: girepository/gthash-test.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gthash_test_CFLAGS) $(CFLAGS) -MT gthash_test-gthash-test.obj -MD -MP -MF $(DEPDIR)/gthash_test-gthash-test.Tpo -c -o gthash_test-gthash-test.obj `if test -f 'girepository/gthash-test.c'; then $(CYGPATH_W) 'girepository/gthash-test.c'; else $(CYGPATH_W) '$(srcdir)/girepository/gthash-test.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/gthash_test-gthash-test.Tpo $(DEPDIR)/gthash_test-gthash-test.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='girepository/gthash-test.c' object='gthash_test-gthash-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gthash_test_CFLAGS) $(CFLAGS) -c -o gthash_test-gthash-test.obj `if test -f 'girepository/gthash-test.c'; then $(CYGPATH_W) 'girepository/gthash-test.c'; else $(CYGPATH_W) '$(srcdir)/girepository/gthash-test.c'; fi`
+
+.l.c:
+       $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE)
+
+scannerlexer.c: giscanner/scannerlexer.l
+       $(AM_V_LEX) \
+       $(am__skiplex) \
+       $(SHELL) $(YLWRAP) `test -f 'giscanner/scannerlexer.l' || echo '$(srcdir)/'`giscanner/scannerlexer.l $(LEX_OUTPUT_ROOT).c scannerlexer.c -- $(LEX) $(LFLAGS) $(AM_LFLAGS)
+
+.y.c:
+       $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE)
+
+scannerparser.c: giscanner/scannerparser.y
+       $(AM_V_YACC) \
+       $(am__skipyacc) \
+       $(SHELL) $(YLWRAP) `test -f 'giscanner/scannerparser.y' || echo '$(srcdir)/'`giscanner/scannerparser.y y.tab.c scannerparser.c y.tab.h scannerparser.h y.output scannerparser.output -- $(YACC) $(YFLAGS) $(AM_YFLAGS)
+
+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-man1: $(man_MANS)
+       @$(NORMAL_INSTALL)
+       test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+       @list=''; test -n "$(man1dir)" || exit 0; \
+       { for i in $$list; do echo "$$i"; done; \
+       l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+         sed -n '/\.1[a-z]*$$/p'; \
+       } | while read p; do \
+         if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; echo "$$p"; \
+       done | \
+       sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+       sed 'N;N;s,\n, ,g' | { \
+       list=; while read file base inst; do \
+         if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+           echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+           $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+         fi; \
+       done; \
+       for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+       while read files; do \
+         test -z "$$files" || { \
+           echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+           $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+       done; }
+
+uninstall-man1:
+       @$(NORMAL_UNINSTALL)
+       @list=''; test -n "$(man1dir)" || exit 0; \
+       files=`{ for i in $$list; do echo "$$i"; done; \
+       l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+         sed -n '/\.1[a-z]*$$/p'; \
+       } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+       test -z "$$files" || { \
+         echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+         cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+install-dist_makeDATA: $(dist_make_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(makedir)" || $(MKDIR_P) "$(DESTDIR)$(makedir)"
+       @list='$(dist_make_DATA)'; test -n "$(makedir)" || 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)$(makedir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(makedir)" || exit $$?; \
+       done
+
+uninstall-dist_makeDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(dist_make_DATA)'; test -n "$(makedir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(makedir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(makedir)" && rm -f $$files
+install-gdumpDATA: $(gdump_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(gdumpdir)" || $(MKDIR_P) "$(DESTDIR)$(gdumpdir)"
+       @list='$(gdump_DATA)'; test -n "$(gdumpdir)" || 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)$(gdumpdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(gdumpdir)" || exit $$?; \
+       done
+
+uninstall-gdumpDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(gdump_DATA)'; test -n "$(gdumpdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(gdumpdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(gdumpdir)" && rm -f $$files
+install-girDATA: $(gir_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(girdir)" || $(MKDIR_P) "$(DESTDIR)$(girdir)"
+       @list='$(gir_DATA)'; test -n "$(girdir)" || 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)$(girdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(girdir)" || exit $$?; \
+       done
+
+uninstall-girDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(gir_DATA)'; test -n "$(girdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(girdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(girdir)" && rm -f $$files
+install-m4DATA: $(m4_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(m4dir)" || $(MKDIR_P) "$(DESTDIR)$(m4dir)"
+       @list='$(m4_DATA)'; test -n "$(m4dir)" || 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)$(m4dir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(m4dir)" || exit $$?; \
+       done
+
+uninstall-m4DATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(m4_DATA)'; test -n "$(m4dir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(m4dir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(m4dir)" && rm -f $$files
+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
+install-typelibsDATA: $(typelibs_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(typelibsdir)" || $(MKDIR_P) "$(DESTDIR)$(typelibsdir)"
+       @list='$(typelibs_DATA)'; test -n "$(typelibsdir)" || 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)$(typelibsdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(typelibsdir)" || exit $$?; \
+       done
+
+uninstall-typelibsDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(typelibs_DATA)'; test -n "$(typelibsdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(typelibsdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(typelibsdir)" && rm -f $$files
+install-girepoHEADERS: $(girepo_HEADERS)
+       @$(NORMAL_INSTALL)
+       test -z "$(girepodir)" || $(MKDIR_P) "$(DESTDIR)$(girepodir)"
+       @list='$(girepo_HEADERS)'; test -n "$(girepodir)" || 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)$(girepodir)'"; \
+         $(INSTALL_HEADER) $$files "$(DESTDIR)$(girepodir)" || exit $$?; \
+       done
+
+uninstall-girepoHEADERS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(girepo_HEADERS)'; test -n "$(girepodir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(girepodir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(girepodir)" && 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)
+       @list='$(MANS)'; if test -n "$$list"; then \
+         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"; else :; fi; done`; \
+         if test -n "$$list" && \
+           grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+           echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+           grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
+           echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+           echo "       typically \`make maintainer-clean' will remove them" >&2; \
+           exit 1; \
+         else :; fi; \
+       else :; fi
+       $(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
+       -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) | xz -c >$(distdir).tar.xz
+       $(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
+       $(MAKE) $(AM_MAKEFLAGS) $(check_LTLIBRARIES) $(check_PROGRAMS)
+       $(MAKE) $(AM_MAKEFLAGS) check-local
+check: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) check-recursive
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) \
+               $(HEADERS) config.h
+install-binPROGRAMS: install-libLTLIBRARIES
+
+installdirs: installdirs-recursive
+installdirs-am:
+       for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(makedir)" "$(DESTDIR)$(gdumpdir)" "$(DESTDIR)$(girdir)" "$(DESTDIR)$(m4dir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(typelibsdir)" "$(DESTDIR)$(girepodir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
+install: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) 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."
+       -rm -f scannerlexer.c
+       -rm -f scannerparser.c
+       -rm -f scannerparser.h
+       -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-recursive
+
+clean-am: clean-binPROGRAMS clean-checkLTLIBRARIES clean-checkPROGRAMS \
+       clean-generic clean-libLTLIBRARIES clean-libtool \
+       clean-noinstLTLIBRARIES clean-noinstPROGRAMS \
+       clean-pkgpyexecLTLIBRARIES mostlyclean-am
+
+distclean: distclean-recursive
+       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-hdr distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-dist_makeDATA install-gdumpDATA \
+       install-girDATA install-girepoHEADERS install-m4DATA \
+       install-man install-pkgconfigDATA install-typelibsDATA
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS install-binSCRIPTS \
+       install-libLTLIBRARIES install-pkgpyexecLTLIBRARIES \
+       install-pkgpyexecPYTHON
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man: install-man1
+
+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 -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-binPROGRAMS uninstall-binSCRIPTS \
+       uninstall-dist_makeDATA uninstall-gdumpDATA uninstall-girDATA \
+       uninstall-girepoHEADERS uninstall-libLTLIBRARIES \
+       uninstall-m4DATA uninstall-man uninstall-pkgconfigDATA \
+       uninstall-pkgpyexecLTLIBRARIES uninstall-pkgpyexecPYTHON \
+       uninstall-typelibsDATA
+
+uninstall-man: uninstall-man1
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
+       check-am ctags-recursive install install-am install-strip \
+       tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+       all all-am am--refresh check check-am check-local clean \
+       clean-binPROGRAMS clean-checkLTLIBRARIES clean-checkPROGRAMS \
+       clean-generic clean-libLTLIBRARIES clean-libtool \
+       clean-noinstLTLIBRARIES clean-noinstPROGRAMS \
+       clean-pkgpyexecLTLIBRARIES ctags ctags-recursive dist dist-all \
+       dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ dist-xz \
+       dist-zip distcheck distclean distclean-compile \
+       distclean-generic distclean-hdr distclean-libtool \
+       distclean-tags distcleancheck distdir distuninstallcheck dvi \
+       dvi-am html html-am info info-am install install-am \
+       install-binPROGRAMS install-binSCRIPTS install-data \
+       install-data-am install-dist_makeDATA install-dvi \
+       install-dvi-am install-exec install-exec-am install-gdumpDATA \
+       install-girDATA install-girepoHEADERS install-html \
+       install-html-am install-info install-info-am \
+       install-libLTLIBRARIES install-m4DATA install-man install-man1 \
+       install-pdf install-pdf-am install-pkgconfigDATA \
+       install-pkgpyexecLTLIBRARIES install-pkgpyexecPYTHON \
+       install-ps install-ps-am install-strip install-typelibsDATA \
+       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-binPROGRAMS uninstall-binSCRIPTS \
+       uninstall-dist_makeDATA uninstall-gdumpDATA uninstall-girDATA \
+       uninstall-girepoHEADERS uninstall-libLTLIBRARIES \
+       uninstall-m4DATA uninstall-man uninstall-man1 \
+       uninstall-pkgconfigDATA uninstall-pkgpyexecLTLIBRARIES \
+       uninstall-pkgpyexecPYTHON uninstall-typelibsDATA
+
+
+# Make sure the required variables are set, these should under normal
+# circumstances come from introspection.m4
+$(if $(INTROSPECTION_SCANNER),,$(error Need to define INTROSPECTION_SCANNER))
+$(if $(INTROSPECTION_COMPILER),,$(error Need to define INTROSPECTION_COMPILER))
+
+#
+# Creates a GIR by scanning C headers/sources
+# $(1) - Name of the gir file (output)
+#
+# If output is Gtk-2.0.gir then you should name the variables like
+# Gtk_2_0_gir_NAMESPACE, Gtk_2_0_gir_VERSION etc.
+# Required variables:
+# FILES - C sources and headers which should be scanned
+#
+# One of these variables are required:
+# LIBS - Library where the symbol represented in the gir can be found
+# PROGRAM - Program where the symbol represented in the gir can be found
+#
+# Optional variables
+# NAMESPACE - Namespace of the gir, first letter capital,
+#   rest should be lower case, for instance: 'Gtk', 'Clutter', 'ClutterGtk'.
+#   If not present the namespace will be fetched from the gir filename,
+#   the part before the first dash. For 'Gtk-2.0', namespace will be 'Gtk'.
+# VERSION - Version of the gir, if not present, will be fetched from gir
+# filename, the part after the first dash. For 'Gtk-2.0', version will be '2.0'.
+# LIBTOOL - Command to invoke libtool, usually set by automake
+# SCANNERFLAGS - Flags to pass in to the scanner, see g-ir-scanner(1) for a list
+# CFLAGS - Flags to pass in to the parser when scanning headers
+# LDFLAGS - Linker flags used by the scanner
+# PACKAGES - list of pkg-config names which cflags are required to parse
+#   the headers of this gir
+# INCLUDES - Gir files to include without the .gir suffix, for instance
+#   GLib-2.0, Gtk-2.0. This is needed for all libraries which you depend on that
+#   provides introspection information.
+# EXPORT_PACKAGES - list of pkg-config names that are provided by this gir.
+#   By default the names in the PACKAGES variable will be used.
+#
+
+define introspection-scanner
+
+# Basic sanity check, to make sure required variables are set
+$(if $($(_gir_name)_FILES),,$(error Need to define $(_gir_name)_FILES))
+$(if $(or $(findstring --header-only,$($(_gir_name)_SCANNERFLAGS)),
+          $($(_gir_name)_LIBS),
+          $($(_gir_name)_PROGRAM)),,
+    $(error Need to define $(_gir_name)_LIBS or $(_gir_name)_PROGRAM))
+
+# Only dependencies we know are actually filenames goes into _FILES, make
+# sure these are built before running the scanner. Libraries and programs
+# needs to be added manually.
+$(1): $$($(_gir_name)_FILES)
+       @ $(MKDIR_P) $(dir $(1))
+       $(_gir_silent_scanner_prefix) $(INTROSPECTION_SCANNER_ENV) $(INTROSPECTION_SCANNER) $(_gir_silent_scanner_opts) \
+       $(INTROSPECTION_SCANNER_ARGS) \
+         --namespace=$(_gir_namespace) \
+         --nsversion=$(_gir_version) \
+         $(_gir_libtool) \
+         $(_gir_packages) \
+         $(_gir_includes) \
+         $(_gir_export_packages) \
+         $(_gir_program) \
+         $(_gir_libraries) \
+         $($(_gir_name)_SCANNERFLAGS) \
+         $($(_gir_name)_CFLAGS) \
+         $($(_gir_name)_LDFLAGS) \
+         $$^ \
+         --output $(1)
+endef
+
+$(foreach gir,$(INTROSPECTION_GIRS),$(eval $(call introspection-scanner,$(gir))))
+
+#
+# Compiles a gir into a typelib
+# $(1): gir filename (input)
+# $(2): typelib filename (output)
+#
+define introspection-compiler
+$(_gir_silent_compiler) $(INTROSPECTION_COMPILER) $(INTROSPECTION_COMPILER_ARGS) --includedir=. $(1) -o $(2)
+endef
+
+# Simple rule to compile a typelib.
+%.typelib: %.gir
+       $(call introspection-compiler,$<,$@)
+
+# Why do I have to do this automake?
+scannerlexer.h: scannerlexer.c
+
+gir/cairo-1.0.gir: gir/cairo-1.0.gir.in Makefile
+       [ -d $(@D) ] || $(mkdir_p) $(@D) ; \
+       sed \
+       -e s,%CAIRO_SHARED_LIBRARY%,$(CAIRO_SHARED_LIBRARY), \
+       -e s,%CAIRO_GIR_PACKAGE%,$(CAIRO_GIR_PACKAGE), \
+       < $< > $@.tmp && mv $@.tmp $@
+
+# Doesn't seem to work to do gir/%.typelib =(
+gir/cairo-1.0.typelib: g-ir-compiler
+gir/DBus-1.0.typelib: g-ir-compiler
+gir/DBusGLib-1.0.typelib: g-ir-compiler
+gir/fontconfig-2.0.typelib: g-ir-compiler
+gir/freetype2-2.0.typelib: g-ir-compiler
+gir/GL-1.0.typelib: g-ir-compiler
+gir/libxml2-2.0.typelib: g-ir-compiler
+gir/xft-2.0.typelib: g-ir-compiler
+gir/xlib-2.0.typelib: g-ir-compiler
+gir/xfixes-4.0.typelib: g-ir-compiler
+gir/xrandr-1.3.typelib: g-ir-compiler
+
+GLib-2.0.gir: g-ir-scanner g-ir-compiler$(EXEEXT)
+
+gir/DBusGLib-1.0.typelib: GObject-2.0.gir
+
+GObject-2.0.gir: GLib-2.0.gir
+
+GModule-2.0.gir: GLib-2.0.gir
+
+Gio-2.0.gir: GObject-2.0.gir
+
+# girepository
+GIRepository-2.0.gir: GObject-2.0.gir libgirepository-1.0.la
+
+g-ir-scanner: tools/g-ir-scanner.in _giscanner.la Makefile
+       $(AM_V_GEN) $(TOOL_SUBSTITUTIONS) $< > $@.tmp && mv $@.tmp $@
+       @chmod a+x $@
+
+g-ir-annotation-tool: tools/g-ir-annotation-tool.in _giscanner.la Makefile
+       $(AM_V_GEN) $(TOOL_SUBSTITUTIONS) $< > $@.tmp && mv $@.tmp $@
+       @chmod a+x $@
+
+g-ir-doc-tool: tools/g-ir-doc-tool.in _giscanner.la Makefile
+       $(AM_V_GEN) $(TOOL_SUBSTITUTIONS) $< > $@.tmp && mv $@.tmp $@
+       @chmod a+x $@
+
+check-local:
+       gtester --verbose $(GTESTER_PROGS)
+       @test ! -d $(top_srcdir)/.git || (test -f $(top_srcdir)/.git/hooks/pre-commit || (echo -e "ERROR: missing \
+       pre-commit hook.\n\ncopy misc/pre-commit to .git/hooks"; false))
+       @test ! -d $(top_srcdir)/.git || (test -x $(top_srcdir)/.git/hooks/pre-commit || (echo -e "ERROR: pre-commit \
+       is not executable\n\nrun chmod +x .git/hooks/pre-commit"; false))
+       @echo "  PEP-8 INQUISITION"
+       @find $(top_srcdir)/giscanner -name \*.py | sort | uniq | xargs $(PYTHON) $(top_srcdir)/misc/pep8.py --repeat --exclude=config.py
+       @touch $(top_builddir)/.make-check-passed
+
+check-pyflakes:
+       @echo "  CHECK Pyflakes"
+       @find $(top_srcdir)/giscanner -name \*.py | sort | uniq | xargs $(PYTHON) $(top_srcdir)/misc/pyflakes.py
+
+prepare-release-tag: Makefile
+       git tag -m "Tag $(TAG_VERSION)" -a $(TAG_PREFIX)$(TAG_VERSION)
+
+prepare-minor-release: $(DISTNAME) prepare-release-tag Makefile
+       env top_srcdir=$(top_srcdir) python $(top_srcdir)/tools/verbump.py
+
+upload-release: $(DISTNAME) Makefile
+       git log origin/master..master
+       @echo -n "Ok to push? [y/N] "; read ans; test x$$ans == xy || exit 1
+       git push --tags origin master:master
+       scp $(DISTNAME) master.gnome.org:
+       ssh master.gnome.org install-module $(DISTNAME)
+
+# 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/Makefile.introspection b/Makefile.introspection
new file mode 100644 (file)
index 0000000..755dd15
--- /dev/null
@@ -0,0 +1,163 @@
+# -*- Mode: make -*-
+# Copyright 2009-2010 Johan Dahlin
+#
+# This file is free software; the author(s) gives unlimited
+# permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# * Input variables:
+#
+#   INTROSPECTION_GIRS - List of GIRS that should be generated
+#   INTROSPECTION_SCANNER - Command to invoke scanner, normally set by
+#      GOBJECT_INTROSPECTION_REQUIRE/CHECK() in introspection.m4
+#   INTROSPECTION_SCANNER_ARGS - Additional args to pass in to the scanner
+#   INTROSPECTION_SCANNER_ENV - Environment variables to set before running
+#      the scanner
+#   INTROSPECTION_COMPILER - Command to invoke compiler, normally set by
+#      GOBJECT_INTROSPECTION_REQUIRE/CHECK() in introspection.m4
+#   INTROSPECTION_COMPILER_ARGS - Additional args to pass in to the compiler
+#
+# * Simple tutorial
+#
+# Add this to configure.ac:
+#   -Wno-portability to AM_INIT_AUTOMAKE
+#   GOBJECT_INTROSPECTION_CHECK([0.6.7])
+#
+# Add this to Makefile.am where your library/program is built:
+#   include $(INTROSPECTION_MAKEFILE)
+#   INTROSPECTION_GIRS = YourLib-1.0.gir
+#   YourLib_1_0_gir_NAMESPACE = YourLib
+#   YourLib_1_0_gir_VERSION = 1.0
+#   YourLib_1_0_gir_LIBS = libyourlib.la
+#   YourLib_1_0_gir_FILES = $(libyourlib_1_0_SOURCES)
+#   girdir = $(datadir)/gir-1.0
+#   dist_gir_DATA = YourLib-1.0.gir
+#   typelibdir = $(libdir)/girepository-1.0
+#   typelib_DATA = YourLib-1.0.typelib
+#   CLEANFILES = $(dist_gir_DATA) $(typelib_DATA)
+#
+
+# Make sure the required variables are set, these should under normal
+# circumstances come from introspection.m4
+$(if $(INTROSPECTION_SCANNER),,$(error Need to define INTROSPECTION_SCANNER))
+$(if $(INTROSPECTION_COMPILER),,$(error Need to define INTROSPECTION_COMPILER))
+
+# Private functions
+
+## Transform the gir filename to something which can reference through a variable
+## without automake/make complaining, eg Gtk-2.0.gir -> Gtk_2_0_gir
+_gir_name = $(subst /,_,$(subst -,_,$(subst .,_,$(1))))
+
+# Namespace and Version is either fetched from the gir filename
+# or the _NAMESPACE/_VERSION variable combo
+_gir_namespace = $(or $($(_gir_name)_NAMESPACE),$(firstword $(subst -, ,$(notdir $(1)))))
+_gir_version = $(or $($(_gir_name)_VERSION),$(lastword $(subst -, ,$(1:.gir=))))
+
+# _PROGRAM is an optional variable which needs it's own --program argument
+_gir_program = $(if $($(_gir_name)_PROGRAM),--program=$($(_gir_name)_PROGRAM))
+
+# Variables which provides a list of things
+_gir_libraries = $(foreach lib,$($(_gir_name)_LIBS),--library=$(lib))
+_gir_packages = $(foreach pkg,$($(_gir_name)_PACKAGES),--pkg=$(pkg))
+_gir_includes = $(foreach include,$($(_gir_name)_INCLUDES),--include=$(include))
+_gir_export_packages = $(foreach pkg,$($(_gir_name)_EXPORT_PACKAGES),--pkg-export=$(pkg))
+
+# Reuse the LIBTOOL variable from automake if it's set, but
+# work around MSYS weirdness: When running g-ir-scanner, MSYS changes
+# a command-line argument --libtool="/bin/sh ../../libtool" into
+# --libtool=c:/opt/msys/1.0/bin/libtool. So just use sh.exe without path
+# because we already "know" where the libtool configure produced is.
+_gir_libtool = $(if $(findstring MINGW32,$(shell uname -s)),--libtool="$(top_builddir)/libtool",$(if $(LIBTOOL),--libtool="$(LIBTOOL)"))
+
+# Macros for AM_SILENT_RULES prettiness
+_gir_verbosity = $(if $(AM_DEFAULT_VERBOSITY),$(AM_DEFAULT_VERBOSITY),1)
+
+_gir_silent_scanner_prefix = $(_gir_silent_scanner_prefix_$(V))
+_gir_silent_scanner_prefix_ = $(_gir_silent_scanner_prefix_$(_gir_verbosity))
+_gir_silent_scanner_prefix_0 = @echo "  GISCAN $(1)";
+_gir_silent_scanner_opts = $(_gir_silent_scanner_opts_$(V))
+_gir_silent_scanner_opts_ = $(_gir_silent_scanner_opts_$(_gir_verbosity))
+_gir_silent_scanner_opts_0 = --quiet
+
+_gir_silent_compiler = $(_gir_silent_compiler_$(V))
+_gir_silent_compiler_ = $(_gir_silent_compiler_$(_gir_verbosity))
+_gir_silent_compiler_0 = @echo "  GICOMP $(1)";
+
+#
+# Creates a GIR by scanning C headers/sources
+# $(1) - Name of the gir file (output)
+#
+# If output is Gtk-2.0.gir then you should name the variables like
+# Gtk_2_0_gir_NAMESPACE, Gtk_2_0_gir_VERSION etc.
+# Required variables:
+# FILES - C sources and headers which should be scanned
+#
+# One of these variables are required:
+# LIBS - Library where the symbol represented in the gir can be found
+# PROGRAM - Program where the symbol represented in the gir can be found
+#
+# Optional variables
+# NAMESPACE - Namespace of the gir, first letter capital,
+#   rest should be lower case, for instance: 'Gtk', 'Clutter', 'ClutterGtk'.
+#   If not present the namespace will be fetched from the gir filename,
+#   the part before the first dash. For 'Gtk-2.0', namespace will be 'Gtk'.
+# VERSION - Version of the gir, if not present, will be fetched from gir
+# filename, the part after the first dash. For 'Gtk-2.0', version will be '2.0'.
+# LIBTOOL - Command to invoke libtool, usually set by automake
+# SCANNERFLAGS - Flags to pass in to the scanner, see g-ir-scanner(1) for a list
+# CFLAGS - Flags to pass in to the parser when scanning headers
+# LDFLAGS - Linker flags used by the scanner
+# PACKAGES - list of pkg-config names which cflags are required to parse
+#   the headers of this gir
+# INCLUDES - Gir files to include without the .gir suffix, for instance
+#   GLib-2.0, Gtk-2.0. This is needed for all libraries which you depend on that
+#   provides introspection information.
+# EXPORT_PACKAGES - list of pkg-config names that are provided by this gir.
+#   By default the names in the PACKAGES variable will be used.
+#
+
+define introspection-scanner
+
+# Basic sanity check, to make sure required variables are set
+$(if $($(_gir_name)_FILES),,$(error Need to define $(_gir_name)_FILES))
+$(if $(or $(findstring --header-only,$($(_gir_name)_SCANNERFLAGS)),
+          $($(_gir_name)_LIBS),
+          $($(_gir_name)_PROGRAM)),,
+    $(error Need to define $(_gir_name)_LIBS or $(_gir_name)_PROGRAM))
+
+# Only dependencies we know are actually filenames goes into _FILES, make
+# sure these are built before running the scanner. Libraries and programs
+# needs to be added manually.
+$(1): $$($(_gir_name)_FILES)
+       @ $(MKDIR_P) $(dir $(1))
+       $(_gir_silent_scanner_prefix) $(INTROSPECTION_SCANNER_ENV) $(INTROSPECTION_SCANNER) $(_gir_silent_scanner_opts) \
+       $(INTROSPECTION_SCANNER_ARGS) \
+         --namespace=$(_gir_namespace) \
+         --nsversion=$(_gir_version) \
+         $(_gir_libtool) \
+         $(_gir_packages) \
+         $(_gir_includes) \
+         $(_gir_export_packages) \
+         $(_gir_program) \
+         $(_gir_libraries) \
+         $($(_gir_name)_SCANNERFLAGS) \
+         $($(_gir_name)_CFLAGS) \
+         $($(_gir_name)_LDFLAGS) \
+         $$^ \
+         --output $(1)
+endef
+
+$(foreach gir,$(INTROSPECTION_GIRS),$(eval $(call introspection-scanner,$(gir))))
+
+#
+# Compiles a gir into a typelib
+# $(1): gir filename (input)
+# $(2): typelib filename (output)
+#
+define introspection-compiler
+$(_gir_silent_compiler) $(INTROSPECTION_COMPILER) $(INTROSPECTION_COMPILER_ARGS) --includedir=. $(1) -o $(2)
+endef
+
+# Simple rule to compile a typelib.
+%.typelib: %.gir
+       $(call introspection-compiler,$<,$@)
diff --git a/NEWS b/NEWS
new file mode 100644 (file)
index 0000000..ba814dc
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,218 @@
+For NEWS for newer releases see git shortlog
+---
+0.6.3 22-jun 2009
+    Bugs resolved:
+      - 551738 Association needed between records and classes/interfaces
+      - 555960 Nested structs and unions
+      - 555964 float #defined constants are ignored
+      - 556475 support Shadows: annotation
+      - 561360 do not fail for not-found GTypes
+      - 561604 g-ir-compiler fails on gvariant
+      - 563469 Arrays not treated correctly in struct offset calculation
+      - 563682 Fails to build on Hurd/i386 because of undefined PATH_MAX
+      - 564016 add nsprefix to gir and typelib
+      - 566560 giscanner.transformer.SkipError
+      - 567906 put pkg-config name in gir, use them by default in scanner
+      - 568680 Scanner misses fields (at least in GObject.Object)
+      - 569355 warning fixes
+      - 569633 [PATCH] Typelib compiler fails with vararg callbacks.
+      - 569930 g_registered_type_info_get_g_type does not handle GObject
+      - 570594 everything you know about C syntax is wrong
+      - 570903 Add information about -I flag to scanner manpage.
+      - 571182 introspection.m4 issues
+      - 571248 [patch] ignore unknown elements in gir parser
+      - 571483 .gir should be sorted
+      - 571548 generic typelib attributes
+      - 571649 Rename Soup-2.0.gir to Soup-2.4.gir
+      - 572075 Make the scanner work with static and convenience libraries
+      - 572086 Parse doc-comment tags case-insensitive
+      - 572423 Add c:header-filename or c:header-filenames where appropr...
+      - 572434 Have glib:is-iface-struct-for attribute on *Iface structs
+      - 572563 build failure in tests/everything
+      - 572790 #defines should be parsed in .h files but not .c files
+      - 572965 Allow generic marshaller to be called without parameters
+      - 573306 Relax callback grouping detection rules
+      - 573309 Adding an "--all" parameter to g-ir-generate
+      - 573332 Allow annotation of enums as bitfields
+      - 574139 There is no way to identify 'user_data' arguments in the ...
+      - 574284 Add support for a 'closure' and 'destroy' annotations
+      - 574501 build script looks for site-packages instead of dist-pack...
+      - 575613 incorrect enum stripping
+      - 576323 g-ir-compiler fails with constant in classes
+      - 576605 Get rid of GI_SCOPE_TYPE_OBJECT
+      - 576627 gir-repository: WebKit needs to include Soup-2.4
+      - 577065 Fix 'Could not find GIR file ...' error to use right file...
+      - 577534 use rename() to write out typelibs
+      - 577546 Missing annotations for GLib, GObject and Gio
+      - 579522 gobject-introspection fails to build when missing libsoup...
+      - 579602 Annotation fixes for gdk, gdkpixbuf, gtk and notify
+      - 581680 Leftover bogus text in g-object-introspection documentation
+      - 581681 Allow the use of the "Rename To" annotation for literal m...
+      - 581682 Improve "Everything" test library
+      - 581684 Minor doc comment fix
+      - 581685 Allow nested parameterized types for GList, GSList, and G...
+      - 581689 Better handle classes with non-standard to_underscore names.
+      - 583338 GIR annotations: gtk_init can take a null argv
+      - 584423 Add short/ushort support
+      - 584432 g-ir-compiler fails to find gir files installed by gobjec...
+      - 584453 Default annotations value for const gchar* const *
+      - 584816 Add GLclampf to the GL GIR
+      - 584842 Add an Everything-1.0-expected.gir, test Everything versu...
+      - 585081 libgirepository-everything is not linked against libglib,...
+      - 585141 Incomplete gir generation for GdkPixbuf, Atk, Poppler
+      - 585150 XPATH_TESTS are not run
+      - 585328 g_type_info_is_zero_terminated returns TRUE unless (array...
+      - 585373 Add annotations for g_spawn_* functions.
+      - 585579 g-o-i: 'make check' doesn't check Everything-1.0-expected...
+      - 585584 Fix warnings in girparser.c and compiler.c
+      - 585908 make distcheck fails
+    Contributors:
+    C. Scott Ananian, Emmanuele Bassi, Johan Bilien, Robert Carr,
+    Johan Dahlin, Holger Hans Peter Freyther, Marco Pesenti Gritti,
+    David Ignacio, Mark Lee, Simon van der Linden, Xan Lopez,
+    Didier 'Ptitjes, Chris Rivera, Andreas Rottmann, Owen W. Taylor,
+    Colin Walters, Dan Winship, Tomeu Vizoso and Marina Zhurakhinskaya
+
+
+0.6.2 21-jan-2009
+    Bugs resolved:
+    - Bug 562622 â€“ Errordomains missing
+    - Bug 562615 â€“ Struct methods missing
+    - Bug 567813 â€“ Everything should be versioned
+    - Bug 555036 â€“ put gtk-doc in GIR
+    - Bug 562467 â€“ Property annotation
+    - Bug 546739 â€“ Introspection should know precise signal parameter types
+    - Bug 563591 â€“ Flags not recognized when there is no introspection data
+    - Bug 563386 â€“ scanner ignores "const" on boxed return values
+    - Bug 566404 â€“ Annotations for GLib
+    - Bug 566419 â€“ Element type of arrays not properly handled in all cases
+    - Bug 566560 â€“ giscanner.transformer.SkipError
+    - Bug 563794 - Redo annotation parsing & applying
+    - Bug 563469 â€“ Arrays not treated correctly in struct offset calculation
+    - Bug 556489 â€“ callback annotations
+    - Bug 563998 â€“ Cache the GIBaseInfo for GTypes
+    - Bug 562545 â€“ Add function taking / returning GValue
+    - Bug 563742 â€“ introspection should record the introduced version of
+    - Bug 562971 â€“ g-ir-scanner failure on libgpod headers
+    - Bug 562289 â€“ Race when removing invalid cache
+    - Bug 559705 â€“ Missing association between static methods and classes
+    - Bug 562022 â€“ gobject-introspection needs python headers
+    - Bug 561617 â€“ Return value array annotations
+    - Bug 561296 - Add "storage type" to the typelib data for enums
+    - Bug 559706 - Interface prerequisites
+    - Bug 561087 - Respect is_pointer in serialize_type()
+    - Bug 560825 â€“ Add size and alignment to typelib
+    Contributors:
+    Johan Bilien, Jürg Billeter, Johan Dahlin, Christophe Fergeau
+    Havoc Pennington, Andreas Rottmann, Owen Taylor, Tristan Van Berkom
+    Colin Walters, Dan Winship
+
+0.6.1 25-nov-2008
+    Bugs resolved:
+    - Bug 552371 - implement struct field get/set
+    - Bug 552568 - All the argv parameters in Gtk.gir map char*** to int8
+    - Bug 557468 - Support for GI_TYPELIB_PATH
+    - Bug 557788 - Return types for constructors in generated typelib bogus
+    - Bug 557898 - Fails to build on OSX 10.4
+    - Bug 558436 - avoid having scanner load app code
+    - Bug 558848 - girparser.py: shared-library should be optional
+    - Bug 558849 - girepository: extend X stubbing
+    - Bug 559601 - Pointers in structs/unions unduly treated as arrays
+    - Bug 559703 - Virtual functions miss throws attribute in .gir
+    - Bug 559706 - Interface prerequisites missing
+    - Bug 559736 - Show the right filename in error messages
+    - Bug 559737 - Deal with continuations in macros
+    - Bug 560241 - Out-arguments should not be marked as being pointers in a...
+    - Bug 560248 - "disguised structures"
+    - Bug 560250 - [PATCH] Fully parse included modules
+    - Bug 560251 - [PATCH] Split g_ir_ffi_get_ffi_type() out from ginvoke.c
+    - Bug 560252 - Compute field offsets before writing typelib
+    - Bug 560253 - [PATCH] Add struture and boxed types to Everything test m...
+    - Bug 560308 - g-ir-compiler goes in infinite loop on Gdk-2.0.gir
+    - Bug 560326 - Fails to build Gtk-2.0.typelib with "Unexpected non-point...
+    - Bug 560346 - Fix and install pkgconfig file
+    - Bug 560404 - Prefix types when resolving aliases in included modules
+    - Bug 560419 - Cache includes when parsing
+    - Bug 560474 - g-ir-compiler crashes when compiling the glib gir
+    - Bug 560708 - Don't treat arrays that have a length specified as zero-t...
+    - Bug 560825 - Add size and alignment to typelib
+    - Bug 561087 - Respect is_pointer in serialize_type()
+    - Bug 561135 - hashtable element-type annotations broken
+    - Bug 561137 - support multiple repos for GBaseInfo
+    - Bug 561296 - Add "storage type" to the typelib data for enums
+    - Bug 561568 - Add Gio Unix bits to the Gio.gir if available
+    - Bug 561570 - Add TestObj with static methods
+    - Bug 561617 - Return value array annotations
+    - Bug 562022 - gobject-introspection needs python headers
+    - Bug 562030 - gir repository fails to build DBus-1.0.typelib without db...
+    - Bug 562031 - gir repository fails to libxml2 typelib without libxml2 i... 
+    Contributors: Ã‰tienne Bersac, Johan Bilien, Jürg Billeter, Johan Dahlin,
+      Tommi Komulainen, Tom Parker, Lucas Rocha, Andreas Rottmann
+      Colin Walters, Dan Winship, Owen Taylor
+
+0.6.0 31-oct-2008
+    Bugs resolved:
+    - Bug 551162 - giscanner does not recognize asm and __asm__
+    - Bug 551737 - Fix strip_namespace_func to only strip prefix...
+    - Bug 551744 - Non-GObject types aren't aggregating ctors and methods
+    - Bug 552065 - Add deprecation annotation
+    - Bug 552347 - Parse #defines constants
+    - Bug 552370 - add one more test for unsigned as a type, not as a type qualifier
+    - Bug 552370 - unsigned not scanned properly
+    - Bug 552374 - Const strings should be identified in the gir
+    - Bug 552380 - Array parameters should be marked in the gir
+    - Bug 552384 - Use SHLIB_SUFFIX intead of G_MODULE_SUFFIX for Darwin
+    - Bug 552390 - Handle capitialization like "DBus" more robustly
+    - Bug 552393 - Note variadic functions
+    - Bug 552566 - Add time_t type 
+    - Bug 552858 - versioning
+    - Bug 554490 - g-ir-scanner gets confused by '\\'
+    - Bug 554521 - scanner generates wrong names for enum members with...
+    - Bug 554576 - scan problem with ev_selection_render_selection()
+    - Bug 554632 - type tag for GType
+    - Bug 554854 - The --typelib-xml and --inject options should reuse giscanner ...
+    - Bug 555293 - append library_paths to LPATH env variable to workaround a...
+    - Bug 555294 - Add support for multiple shared libraries per typelib.
+    - Bug 555712 - Struct and union issues
+    - Bug 555946 - Install a test module exercising all types, transfer rules, etc
+    - Bug 556048 â€“ Crash in g_irepository_find_by_gtype
+    - Bug 556174 â€“ parse types for lists etc
+    - Bug 556185 - segfault on g_callable_info_get_return_type
+    - Bug 556323 â€“ transfer-ownership is wrong for functions returning const char *
+    - Bug 556331 - clean up includes handling
+    - Bug 556358 - don't use libtool internals
+    - Bug 556400 â€“ Fails to build on OS X 10.4
+    - Bug 556432 - transfer annotations and defaults
+    - Bug 556433 â€“ assume direction = out for int * parameters
+    - Bug 556434 â€“ unhandled interface/object/... member types
+    - Bug 556541 â€“ access union members through UnionBlob rather than StructBlob
+    - Bug 556543 â€“ reduce compiler warnings
+    - Bug 556579 - union and struct name misresolved
+    - Bug 556610 â€“ giscanner/girparser.py drops parameter options
+    - Bug 556732 â€“ generate gir files consistently
+    - Bug 556739 - transfer ownership
+    - Bug 556777 - validate properties
+    - Bug 556783 - change namespace handling to be more consistent
+    - Bug 556795 - char ** regression
+    - Bug 557076 - move typelibs to $libdir
+    - Bug 557092 â€“ Callback annotations not used
+    - Bug 557241 â€“ "throws" flag for functions
+    - Bug 557377 â€“ Add test to ensure annotations survive the roundtrip via typelib
+    - Bug 557379 â€“ g-ir-generate not writing the 'abstract' attribute
+    - Bug 557405 â€“ Use 'allow-none' consistently
+    - Bug 557468 â€“ Support for GI_TYPELIB_PATH
+    - Bug 557623 - Constructors shouldn't be flagged as methods
+    - Bug 557786 - support fixed size arrays
+    - Bug 557788 â€“ Return types for constructors in generated typelib bogus
+    - Bug 557791 â€“ g_irepository_require() could return a GTypelib *
+    - Bug 558062 â€“ provide and use paths in the .pc file
+    - Bug 558065 â€“ gitesttypes should be installed
+    - Bug 558068 â€“ when invoking a method, offset the in arguments by one, not the out
+    - Bug 558109 â€“ _g_typelib_init fails to find shared libraries
+    - Bug 558383 â€“ builddir != srcdir build fails if giscanner python module not already installed
+    Contributors: Johan Bilien, Jürg Billeter, Johan Dahlin, John Ehresman,
+      Tommi Komulainen, Jani Monoses, Lucas Rocha, Andreas Rottmann
+      Colin Walters, Dan Winship, Owen Taylor
+
+0.5.0 01-sep-2008
+    - First public release
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..2a1dd1c
--- /dev/null
+++ b/README
@@ -0,0 +1,71 @@
+GObject Introspection
+=====================
+The goal of the project is to describe the APIs and  collect them in
+a uniform, machine readable format.
+
+GIR XML format
+==============
+
+There's an XML format called GIR used by GObjectIntrospection.
+The purpose of it is to provide a common structure to access the complete
+available API that a library or other unit of code exports.
+It is meant to be language agnostic using namespaces to separate
+core, language or library specific functionality.
+There are currently only C based tools that work on the format, but it's
+meant to be usable to use in other situations, for instance to/from another
+set of languages.
+
+Typelib
+=======
+
+The typelib is a to disk version of the GIR designed to be fast, memory
+efficient and complete enough so that language bindings can be written
+on top of it without other sources of information.
+It is normally compiled from a GIR when a library/program is installed and
+accessed from the language binding or another application who wishes to
+use the information.
+
+Tools
+=====
+
+Three tools are shipped with GObject Introspection:
+- g-ir-compile, a typelib compiler. It converts one or more GIR files
+  into one or more typelib blobs. It can either emit the raw typelib
+  blob or C code (--code).
+- g-ir-generate, an GIR generator, using the repository API. It generates
+  GIR files from binary typelib which can be in a shared object, or a raw
+  typelib blob.
+- g-ir-scanner, a tool which generates GIR XML files by parsing headers
+  and introspecting GObject based libraries.
+- g-ir-doc-tool, generates Mallard files that can be viewed with yelp or
+  rendered to HTML with yelp-build from yelp-tools.
+
+API library
+===========
+
+There's also a C based library called libgirepository which provides
+an API to access to the typelib metadata. It also contains an API to
+invoke functions, given the function info object. The implementation is
+based on libffi (3.0 or higher of libffi required, can be found at
+http://sourceware.org/libffi).
+
+There are a number of GIR test files in tests/, and a script to do
+roundtrip tests (GIR -> typelib -> GIR).
+
+Helping out
+===========
+The introspection framework needs a lot more work, see TODO.
+
+Homepage
+========
+http://live.gnome.org/GObjectIntrospection
+
+Reporting bugs
+==============
+Bugs should be reported in http://bugzilla.gnome.org/, the glib product and
+the introspection component.
+
+Contact
+=======
+Mail: gtk-devel-list@gnome.org
+IRC: #introspection@irc.gnome.org
diff --git a/TODO b/TODO
new file mode 100644 (file)
index 0000000..600454a
--- /dev/null
+++ b/TODO
@@ -0,0 +1,50 @@
+GIR XML format
+----------
+- Document the format better
+- Add attributes to connect signals to their default handlers
+  and wrappers to their vfuncs
+- Add a way to specify default values
+- Add a way to mark init functions like gtk_init
+- For argument/return values etc, store only c:identifier in the
+  <class/> definition. Requires a link to the references type in the 
+  Type node.
+- replace gidl/gdk-pixbuf.gidl with something generated from headers,
+  verify all information is available, possible to write
+
+Binary format
+-------------
+- Sort arrays so that we can use bsearch for lookup
+- Maybe add hashes to lookup interfaces and functions in interfaces
+- Add default values
+- Make annotations more flexible (and typed)
+
+Compiler
+--------
+- Cleanup, maybe turn the nodes in to objects to avoid the horrific
+  type switches
+- Add thorough error checking
+
+Repository
+----------
+- Reconsider the current clunky API, maybe an iterator approach is better
+- Add thorough error checking
+- Use hashes
+- Maybe allow populating repositories at runtime
+- Think about a system-wide repository mapping namespace ids to
+  libraries/metadata files
+- Fix extra indirection for out parameters in invoke
+
+Scanner
+------
+- Property.readable/writable, GLibProperty.blurb/nick
+- Constants
+- Annotations in external files which is not source code
+
+C API
+-------
+- type SYMBOL is kind of inconvenient; would be nicer to go straight to 
+  boxed, etc.
+- no way to construct a boxed type
+- no way to access struct fields (should have a way to go field -> GArgument)
+- types namespaced GI, functions namespaced g_
+- no way to get GType given a GIRegisteredTypeInfo
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644 (file)
index 0000000..deebd2b
--- /dev/null
@@ -0,0 +1,49 @@
+dnl as-ac-expand.m4 0.2.0                                   -*- autoconf -*-
+dnl autostars m4 macro for expanding directories using configure's prefix
+
+dnl (C) 2003, 2004, 2005 Thomas Vander Stichele <thomas at apestaart dot org>
+
+dnl Copying and distribution of this file, with or without modification,
+dnl are permitted in any medium without royalty provided the copyright
+dnl notice and this notice are preserved.
+
+dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR)
+
+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/aclocal.m4 b/aclocal.m4
new file mode 100644 (file)
index 0000000..59fc54c
--- /dev/null
@@ -0,0 +1,1441 @@
+# 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'.])])
+
+# 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`
+])
+
+# 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"])
+])
+
+# 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
+
+# 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
+
+m4_include([m4/gtk-doc.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])
+m4_include([acinclude.m4])
diff --git a/build-aux/compile b/build-aux/compile
new file mode 100755 (executable)
index 0000000..c0096a7
--- /dev/null
@@ -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/build-aux/config.guess b/build-aux/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/build-aux/config.sub b/build-aux/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/build-aux/depcomp b/build-aux/depcomp
new file mode 100755 (executable)
index 0000000..df8eea7
--- /dev/null
@@ -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/build-aux/install-sh b/build-aux/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/build-aux/ltmain.sh b/build-aux/ltmain.sh
new file mode 100755 (executable)
index 0000000..78cf017
--- /dev/null
@@ -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_append 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/build-aux/missing b/build-aux/missing
new file mode 100755 (executable)
index 0000000..28055d2
--- /dev/null
@@ -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/build-aux/py-compile b/build-aux/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/build-aux/ylwrap b/build-aux/ylwrap
new file mode 100755 (executable)
index 0000000..84d5634
--- /dev/null
@@ -0,0 +1,222 @@
+#! /bin/sh
+# ylwrap - wrapper for lex/yacc invocations.
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005,
+# 2007, 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 files given.  Try \`$0 --help' for more information." 1>&2
+    exit 1
+    ;;
+  --basedir)
+    basedir=$2
+    shift 2
+    ;;
+  -h|--h*)
+    cat <<\EOF
+Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]...
+
+Wrapper for lex/yacc invocations, renaming files as desired.
+
+  INPUT is the input file
+  OUTPUT is one file PROG generates
+  DESIRED is the file we actually want instead of OUTPUT
+  PROGRAM is program to run
+  ARGS are passed to PROG
+
+Any number of OUTPUT,DESIRED pairs may be used.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v|--v*)
+    echo "ylwrap $scriptversion"
+    exit $?
+    ;;
+esac
+
+
+# The input.
+input="$1"
+shift
+case "$input" in
+  [\\/]* | ?:[\\/]*)
+    # Absolute path; do nothing.
+    ;;
+  *)
+    # Relative path.  Make it absolute.
+    input="`pwd`/$input"
+    ;;
+esac
+
+pairlist=
+while test "$#" -ne 0; do
+  if test "$1" = "--"; then
+    shift
+    break
+  fi
+  pairlist="$pairlist $1"
+  shift
+done
+
+# The program to run.
+prog="$1"
+shift
+# Make any relative path in $prog absolute.
+case "$prog" in
+  [\\/]* | ?:[\\/]*) ;;
+  *[\\/]*) prog="`pwd`/$prog" ;;
+esac
+
+# FIXME: add hostname here for parallel makes that run commands on
+# other machines.  But that might take us over the 14-char limit.
+dirname=ylwrap$$
+trap "cd '`pwd`'; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15
+mkdir $dirname || exit 1
+
+cd $dirname
+
+case $# in
+  0) "$prog" "$input" ;;
+  *) "$prog" "$@" "$input" ;;
+esac
+ret=$?
+
+if test $ret -eq 0; then
+  set X $pairlist
+  shift
+  first=yes
+  # Since DOS filename conventions don't allow two dots,
+  # the DOS version of Bison writes out y_tab.c instead of y.tab.c
+  # and y_tab.h instead of y.tab.h. Test to see if this is the case.
+  y_tab_nodot="no"
+  if test -f y_tab.c || test -f y_tab.h; then
+    y_tab_nodot="yes"
+  fi
+
+  # The directory holding the input.
+  input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'`
+  # Quote $INPUT_DIR so we can use it in a regexp.
+  # FIXME: really we should care about more than `.' and `\'.
+  input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'`
+
+  while test "$#" -ne 0; do
+    from="$1"
+    # Handle y_tab.c and y_tab.h output by DOS
+    if test $y_tab_nodot = "yes"; then
+      if test $from = "y.tab.c"; then
+       from="y_tab.c"
+      else
+       if test $from = "y.tab.h"; then
+         from="y_tab.h"
+       fi
+      fi
+    fi
+    if test -f "$from"; then
+      # If $2 is an absolute path name, then just use that,
+      # otherwise prepend `../'.
+      case "$2" in
+       [\\/]* | ?:[\\/]*) target="$2";;
+       *) target="../$2";;
+      esac
+
+      # We do not want to overwrite a header file if it hasn't
+      # changed.  This avoid useless recompilations.  However the
+      # parser itself (the first file) should always be updated,
+      # because it is the destination of the .y.c rule in the
+      # Makefile.  Divert the output of all other files to a temporary
+      # file so we can compare them to existing versions.
+      if test $first = no; then
+       realtarget="$target"
+       target="tmp-`echo $target | sed s/.*[\\/]//g`"
+      fi
+      # Edit out `#line' or `#' directives.
+      #
+      # We don't want the resulting debug information to point at
+      # an absolute srcdir; it is better for it to just mention the
+      # .y file with no path.
+      #
+      # We want to use the real output file name, not yy.lex.c for
+      # instance.
+      #
+      # We want the include guards to be adjusted too.
+      FROM=`echo "$from" | sed \
+            -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
+            -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
+      TARGET=`echo "$2" | sed \
+            -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
+            -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
+
+      sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$2," \
+          -e "s,$FROM,$TARGET," "$from" >"$target" || ret=$?
+
+      # Check whether header files must be updated.
+      if test $first = no; then
+       if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then
+         echo "$2" is unchanged
+         rm -f "$target"
+       else
+          echo updating "$2"
+          mv -f "$target" "$realtarget"
+        fi
+      fi
+    else
+      # A missing file is only an error for the first file.  This
+      # is a blatant hack to let us support using "yacc -d".  If -d
+      # is not specified, we don't want an error when the header
+      # file is "missing".
+      if test $first = yes; then
+        ret=1
+      fi
+    fi
+    shift
+    shift
+    first=no
+  done
+else
+  ret=$?
+fi
+
+# Remove the directory.
+cd ..
+rm -rf $dirname
+
+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/common.mk b/common.mk
new file mode 100644 (file)
index 0000000..052d5b4
--- /dev/null
+++ b/common.mk
@@ -0,0 +1,41 @@
+# -*- Mode: make -*-
+# Copyright 2009-2010 Johan Dahlin
+#
+# This file defines variables that are compatible with
+# Makefile.introspection, but for use within the gobject-introspection
+# module itself.
+#
+
+INTROSPECTION_SCANNER = \
+    env PATH=.libs:$(PATH) \
+        LPATH=.libs \
+        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
+        UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
+        $(top_builddir)/g-ir-scanner
+
+INTROSPECTION_SCANNER_ARGS = \
+    --verbose \
+    -I$(top_srcdir) \
+    --add-include-path=$(srcdir) \
+    --add-include-path=$(top_srcdir)/gir \
+    --add-include-path=$(builddir) \
+    --add-include-path=$(top_builddir)
+
+INTROSPECTION_COMPILER = \
+    env PATH=.libs:$(PATH) \
+        $(top_builddir)/g-ir-compiler$(EXEEXT)
+
+INTROSPECTION_COMPILER_ARGS = \
+    --includedir=$(srcdir) \
+    --includedir=$(top_srcdir)/gir \
+    --includedir=$(builddir) \
+    --includedir=$(top_builddir)
+
+INTROSPECTION_DOCTOOL = \
+    env PATH=.libs:$(PATH) \
+        LPATH=.libs \
+        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
+        UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
+        $(top_builddir)/g-ir-doc-tool
diff --git a/config.h.in b/config.h.in
new file mode 100644 (file)
index 0000000..14b9ace
--- /dev/null
@@ -0,0 +1,126 @@
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Director prefix for gir installation */
+#undef GIR_DIR
+
+/* Name of the gir directory */
+#undef GIR_SUFFIX
+
+/* Directory prefix for typelib installation */
+#undef GOBJECT_INTROSPECTION_LIBDIR
+
+/* Define to 1 if you have the `backtrace' function. */
+#undef HAVE_BACKTRACE
+
+/* Define to 1 if you have the `backtrace_symbols' function. */
+#undef HAVE_BACKTRACE_SYMBOLS
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `dl' library (-ldl). */
+#undef HAVE_LIBDL
+
+/* Define to 1 if you have the `memchr' function. */
+#undef HAVE_MEMCHR
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* 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 `strchr' function. */
+#undef HAVE_STRCHR
+
+/* 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 `strspn' function. */
+#undef HAVE_STRSPN
+
+/* Define to 1 if you have the `strstr' function. */
+#undef HAVE_STRSTR
+
+/* Define to 1 if you have the `strtol' function. */
+#undef HAVE_STRTOL
+
+/* Define to 1 if you have the `strtoull' function. */
+#undef HAVE_STRTOULL
+
+/* 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
+
+/* Define to the platform's shared library suffix */
+#undef SHLIB_SUFFIX
+
+/* The size of `char', as computed by sizeof. */
+#undef SIZEOF_CHAR
+
+/* The size of `int', as computed by sizeof. */
+#undef SIZEOF_INT
+
+/* The size of `long', as computed by sizeof. */
+#undef SIZEOF_LONG
+
+/* The size of `short', as computed by sizeof. */
+#undef SIZEOF_SHORT
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
+   `char[]'. */
+#undef YYTEXT_POINTER
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
diff --git a/configure b/configure
new file mode 100755 (executable)
index 0000000..91a8e59
--- /dev/null
+++ b/configure
@@ -0,0 +1,17096 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.68 for gobject-introspection 1.32.1.
+#
+# Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=glib&component=introspection>.
+#
+#
+# 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=glib&component=introspection
+$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='gobject-introspection'
+PACKAGE_TARNAME='gobject-introspection'
+PACKAGE_VERSION='1.32.1'
+PACKAGE_STRING='gobject-introspection 1.32.1'
+PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=glib&component=introspection'
+PACKAGE_URL=''
+
+# 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
+GLIBSRC
+WITH_GLIBSRC_FALSE
+WITH_GLIBSRC_TRUE
+BUILD_DOCTOOL_FALSE
+BUILD_DOCTOOL_TRUE
+PYTHON_LIB_LOC
+PYTHON_LIBS
+PYTHON_INCLUDES
+pkgpyexecdir
+pyexecdir
+pkgpythondir
+pythondir
+PYTHON_PLATFORM
+PYTHON_EXEC_PREFIX
+PYTHON_PREFIX
+PYTHON_VERSION
+PYTHON
+LIBOBJS
+POW_LIB
+GTK_DOC_USE_REBASE_FALSE
+GTK_DOC_USE_REBASE_TRUE
+GTK_DOC_USE_LIBTOOL_FALSE
+GTK_DOC_USE_LIBTOOL_TRUE
+GTK_DOC_BUILD_PDF_FALSE
+GTK_DOC_BUILD_PDF_TRUE
+GTK_DOC_BUILD_HTML_FALSE
+GTK_DOC_BUILD_HTML_TRUE
+ENABLE_GTK_DOC_FALSE
+ENABLE_GTK_DOC_TRUE
+GTKDOC_DEPS_LIBS
+GTKDOC_DEPS_CFLAGS
+HTML_DIR
+GTKDOC_MKPDF
+GTKDOC_REBASE
+GTKDOC_CHECK
+GIREPO_LIBS
+GIREPO_CFLAGS
+FFI_PC_PACKAGES
+FFI_PC_LIBS
+FFI_PC_CFLAGS
+FFI_LIBS
+FFI_CFLAGS
+SCANNER_LIBS
+SCANNER_CFLAGS
+HAVE_CAIRO_GOBJECT_FALSE
+HAVE_CAIRO_GOBJECT_TRUE
+HAVE_CAIRO_FALSE
+HAVE_CAIRO_TRUE
+BUILD_TESTS_FALSE
+BUILD_TESTS_TRUE
+CAIRO_GIR_PACKAGE
+CAIRO_SHARED_LIBRARY
+CAIRO_GOBJECT_LIBS
+CAIRO_GOBJECT_CFLAGS
+CAIRO_LIBS
+CAIRO_CFLAGS
+HAVE_GIO_UNIX_FALSE
+HAVE_GIO_UNIX_TRUE
+GIO_UNIX_LIBS
+GIO_UNIX_CFLAGS
+GIO_LIBS
+GIO_CFLAGS
+GMODULE_LIBS
+GMODULE_CFLAGS
+GOBJECT_LIBS
+GOBJECT_CFLAGS
+GLIB_LIBS
+GLIB_CFLAGS
+GIR_DIR
+GIR_SUFFIX
+GOBJECT_INTROSPECTION_LIBDIR
+EXPANDED_DATADIR
+EXPANDED_LIBEXECDIR
+EXPANDED_LIBDIR
+EXPANDED_BINDIR
+EXPANDED_SYSCONFDIR
+EXPANDED_LOCALSTATEDIR
+YACC
+LEXLIB
+LEX_OUTPUT_ROOT
+LEX
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
+PKG_CONFIG
+CPP
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+MANIFEST_TOOL
+RANLIB
+ac_ct_AR
+AR
+DLLTOOL
+OBJDUMP
+LN_S
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
+EGREP
+GREP
+SED
+LIBTOOL
+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
+OS_WIN32_FALSE
+OS_WIN32_TRUE
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+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
+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_maintainer_mode
+enable_silent_rules
+enable_dependency_tracking
+enable_shared
+enable_static
+with_pic
+enable_fast_install
+with_gnu_ld
+with_sysroot
+enable_libtool_lock
+enable_tests
+with_html_dir
+enable_gtk_doc
+enable_gtk_doc_html
+enable_gtk_doc_pdf
+enable_doctool
+with_glib_src
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP
+PKG_CONFIG
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR
+GLIB_CFLAGS
+GLIB_LIBS
+GOBJECT_CFLAGS
+GOBJECT_LIBS
+GMODULE_CFLAGS
+GMODULE_LIBS
+GIO_CFLAGS
+GIO_LIBS
+GIO_UNIX_CFLAGS
+GIO_UNIX_LIBS
+CAIRO_CFLAGS
+CAIRO_LIBS
+CAIRO_GOBJECT_CFLAGS
+CAIRO_GOBJECT_LIBS
+SCANNER_CFLAGS
+SCANNER_LIBS
+FFI_CFLAGS
+FFI_LIBS
+GIREPO_CFLAGS
+GIREPO_LIBS
+GTKDOC_DEPS_CFLAGS
+GTKDOC_DEPS_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 gobject-introspection 1.32.1 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/gobject-introspection]
+  --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 gobject-introspection 1.32.1:";;
+   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]
+  --disable-maintainer-mode  disable make rules and dependencies not useful
+                         (and sometimes confusing) to the casual installer
+  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')
+  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-shared[=PKGS]  build shared libraries [default=yes]
+  --enable-static[=PKGS]  build static libraries [default=yes]
+  --enable-fast-install[=PKGS]
+                          optimize for fast installation [default=yes]
+  --disable-libtool-lock  avoid locking (might break parallel builds)
+  --disable-tests           disable test libraries
+  --enable-gtk-doc        use gtk-doc to build documentation [[default=no]]
+  --enable-gtk-doc-html   build documentation in html format [[default=yes]]
+  --enable-gtk-doc-pdf    build documentation in pdf format [[default=no]]
+  --enable-doctool           enable g-ir-doctool
+
+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).
+  --with-html-dir=PATH    path to installed docs
+  --with-glib-src=PATH    Source directory for glib - needed to add docs to gir
+
+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
+  GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config
+  GLIB_LIBS   linker flags for GLIB, overriding pkg-config
+  GOBJECT_CFLAGS
+              C compiler flags for GOBJECT, overriding pkg-config
+  GOBJECT_LIBS
+              linker flags for GOBJECT, overriding pkg-config
+  GMODULE_CFLAGS
+              C compiler flags for GMODULE, overriding pkg-config
+  GMODULE_LIBS
+              linker flags for GMODULE, overriding pkg-config
+  GIO_CFLAGS  C compiler flags for GIO, overriding pkg-config
+  GIO_LIBS    linker flags for GIO, overriding pkg-config
+  GIO_UNIX_CFLAGS
+              C compiler flags for GIO_UNIX, overriding pkg-config
+  GIO_UNIX_LIBS
+              linker flags for GIO_UNIX, overriding pkg-config
+  CAIRO_CFLAGS
+              C compiler flags for CAIRO, overriding pkg-config
+  CAIRO_LIBS  linker flags for CAIRO, overriding pkg-config
+  CAIRO_GOBJECT_CFLAGS
+              C compiler flags for CAIRO_GOBJECT, overriding pkg-config
+  CAIRO_GOBJECT_LIBS
+              linker flags for CAIRO_GOBJECT, overriding pkg-config
+  SCANNER_CFLAGS
+              C compiler flags for SCANNER, overriding pkg-config
+  SCANNER_LIBS
+              linker flags for SCANNER, overriding pkg-config
+  FFI_CFLAGS  C compiler flags for FFI, overriding pkg-config
+  FFI_LIBS    linker flags for FFI, overriding pkg-config
+  GIREPO_CFLAGS
+              C compiler flags for GIREPO, overriding pkg-config
+  GIREPO_LIBS linker flags for GIREPO, overriding pkg-config
+  GTKDOC_DEPS_CFLAGS
+              C compiler flags for GTKDOC_DEPS, overriding pkg-config
+  GTKDOC_DEPS_LIBS
+              linker flags for GTKDOC_DEPS, 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=glib&component=introspection>.
+_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
+gobject-introspection configure 1.32.1
+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
+
+# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
+# --------------------------------------------
+# Tries to find the compile-time value of EXPR in a program that includes
+# INCLUDES, setting VAR accordingly. Returns whether the value could be
+# computed
+ac_fn_c_compute_int ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if test "$cross_compiling" = yes; then
+    # Depending upon the size, compute the lo and hi bounds.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=$ac_mid; break
+else
+  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
+                       if test $ac_lo -le $ac_mid; then
+                         ac_lo= ac_hi=
+                         break
+                       fi
+                       as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) < 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_lo=$ac_mid; break
+else
+  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
+                       if test $ac_mid -le $ac_hi; then
+                         ac_lo= ac_hi=
+                         break
+                       fi
+                       as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  ac_lo= ac_hi=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=$ac_mid
+else
+  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in #((
+?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
+'') ac_retval=1 ;;
+esac
+  else
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+static long int longval () { return $2; }
+static unsigned long int ulongval () { return $2; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    return 1;
+  if (($2) < 0)
+    {
+      long int i = longval ();
+      if (i != ($2))
+       return 1;
+      fprintf (f, "%ld", i);
+    }
+  else
+    {
+      unsigned long int i = ulongval ();
+      if (i != ($2))
+       return 1;
+      fprintf (f, "%lu", i);
+    }
+  /* Do not output a trailing newline, as this causes \r\n confusion
+     on some platforms.  */
+  return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
+else
+  ac_retval=1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f conftest.val
+
+  fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_compute_int
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if eval \${$3+:} false; then :
+  { $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
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_header_compiler=yes
+else
+  ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  ac_header_preproc=yes
+else
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+  yes:no: )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( $as_echo "## ------------------------------------------------------------------------------------------- ##
+## Report this to http://bugzilla.gnome.org/enter_bug.cgi?product=glib&component=introspection ##
+## ------------------------------------------------------------------------------------------- ##"
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+  { $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
+  eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_mongrel
+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 gobject-introspection $as_me 1.32.1, 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
+
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+ac_aux_dir=
+for ac_dir in build-aux "$srcdir"/build-aux; 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 build-aux \"$srcdir\"/build-aux" "$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.
+
+
+
+am__api_version='1.11'
+
+# 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='gobject-introspection'
+ VERSION='1.32.1'
+
+
+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"}
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5
+$as_echo_n "checking how to create a ustar tar archive... " >&6; }
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar plaintar pax cpio none'
+_am_tools=${am_cv_prog_tar_ustar-$_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
+      { echo "$as_me:$LINENO: $_am_tar --version" >&5
+   ($_am_tar --version) >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } && break
+    done
+    am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=ustar -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 ustar -w "$$tardir"'
+    am__tar_='pax -L -x ustar -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H ustar -L'
+    am__tar_='find "$tardir" -print | cpio -o -H ustar -L'
+    am__untar='cpio -i -H ustar -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_ustar}" && break
+
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
+   (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
+   ($am__untar <conftest.tar) >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
+
+if ${am_cv_prog_tar_ustar+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  am_cv_prog_tar_ustar=$_am_tool
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5
+$as_echo "$am_cv_prog_tar_ustar" >&6; }
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to disable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to disable 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=yes
+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
+
+
+
+# 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='\'
+
+
+# Check for Win32
+# 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
+
+
+case "$host" in
+*-*-mingw*)
+       os_win32=yes
+       ;;
+*)
+       os_win32=no
+       ;;
+esac
+ if test "x$os_win32" = "xyes"; then
+  OS_WIN32_TRUE=
+  OS_WIN32_FALSE='#'
+else
+  OS_WIN32_TRUE='#'
+  OS_WIN32_FALSE=
+fi
+
+
+# Checks for programs.
+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
+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
+
+
+
+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
+
+
+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
+
+
+
+# Initialize libtool
+
+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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $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
+
+
+  enable_win32_dll=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 --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=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:
+
+
+
+
+
+
+
+
+
+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.9.0
+       { $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
+
+for ac_prog in flex lex
+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_LEX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$LEX"; then
+  ac_cv_prog_LEX="$LEX" # 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_LEX="$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
+LEX=$ac_cv_prog_LEX
+if test -n "$LEX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
+$as_echo "$LEX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$LEX" && break
+done
+test -n "$LEX" || LEX=":"
+
+if test "x$LEX" != "x:"; then
+  cat >conftest.l <<_ACEOF
+%%
+a { ECHO; }
+b { REJECT; }
+c { yymore (); }
+d { yyless (1); }
+e { yyless (input () != 0); }
+f { unput (yytext[0]); }
+. { BEGIN INITIAL; }
+%%
+#ifdef YYTEXT_POINTER
+extern char *yytext;
+#endif
+int
+main (void)
+{
+  return ! yylex () + ! yywrap ();
+}
+_ACEOF
+{ { ac_try="$LEX conftest.l"
+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 "$LEX conftest.l") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
+$as_echo_n "checking lex output file root... " >&6; }
+if ${ac_cv_prog_lex_root+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+if test -f lex.yy.c; then
+  ac_cv_prog_lex_root=lex.yy
+elif test -f lexyy.c; then
+  ac_cv_prog_lex_root=lexyy
+else
+  as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
+$as_echo "$ac_cv_prog_lex_root" >&6; }
+LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
+
+if test -z "${LEXLIB+set}"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
+$as_echo_n "checking lex library... " >&6; }
+if ${ac_cv_lib_lex+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    ac_save_LIBS=$LIBS
+    ac_cv_lib_lex='none needed'
+    for ac_lib in '' -lfl -ll; do
+      LIBS="$ac_lib $ac_save_LIBS"
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+`cat $LEX_OUTPUT_ROOT.c`
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_lex=$ac_lib
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+      test "$ac_cv_lib_lex" != 'none needed' && break
+    done
+    LIBS=$ac_save_LIBS
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
+$as_echo "$ac_cv_lib_lex" >&6; }
+  test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
+$as_echo_n "checking whether yytext is a pointer... " >&6; }
+if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  # POSIX says lex can declare yytext either as a pointer or an array; the
+# default is implementation-dependent.  Figure out which it is, since
+# not all implementations provide the %pointer and %array declarations.
+ac_cv_prog_lex_yytext_pointer=no
+ac_save_LIBS=$LIBS
+LIBS="$LEXLIB $ac_save_LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+  #define YYTEXT_POINTER 1
+`cat $LEX_OUTPUT_ROOT.c`
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_prog_lex_yytext_pointer=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_save_LIBS
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
+$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
+if test $ac_cv_prog_lex_yytext_pointer = yes; then
+
+$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
+
+fi
+rm -f conftest.l $LEX_OUTPUT_ROOT.c
+
+fi
+if test "$LEX" = :; then
+       as_fn_error $? "flex not found but required" "$LINENO" 5
+fi
+
+for ac_prog in 'bison -y'
+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_YACC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$YACC"; then
+  ac_cv_prog_YACC="$YACC" # 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_YACC="$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
+YACC=$ac_cv_prog_YACC
+if test -n "$YACC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
+$as_echo "$YACC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$YACC" && break
+done
+test -n "$YACC" || YACC=":"
+
+if test "$YACC" = :; then
+       as_fn_error $? "bison not found but required" "$LINENO" 5
+fi
+
+
+ensureflag() {
+  flag="$1"; shift
+  result="$@"
+
+  case " ${result} " in
+  *[\ \        ]${flag}[\ \    ]*) ;;
+  *) result="${flag} ${result}" ;;
+  esac
+
+  echo ${result}
+}
+
+if test "$GCC" = "yes"; then
+    for flag in -Wall -Wchar-subscripts -Wmissing-declarations \
+        -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align \
+        -Wsign-compare -fno-strict-aliasing;
+    do
+        CFLAGS="$(ensureflag $flag $CFLAGS)"
+    done
+fi
+
+# Checks for libraries.
+{ $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 :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBDL 1
+_ACEOF
+
+  LIBS="-ldl $LIBS"
+
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the suffix of shared libraries" >&5
+$as_echo_n "checking for the suffix of shared libraries... " >&6; }
+# libtool variables are immediately available since 2.0, prior to that we need
+# to call libtool --config explicitly
+if test "x$shrext_cmds" = x; then
+    shrext_cmds=`SED=$SED ./libtool --config | grep '^shrext_cmds='`
+    eval $shrext_cmds
+fi
+eval std_shrext=$shrext_cmds
+# chop the initial dot
+SHLIB_SUFFIX=${std_shrext#.}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: .$SHLIB_SUFFIX" >&5
+$as_echo ".$SHLIB_SUFFIX" >&6; }
+# any reason it may fail?
+if test "x$SHLIB_SUFFIX" = x; then
+        as_fn_error $? "Cannot determine shared library suffix from libtool" "$LINENO" 5
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define SHLIB_SUFFIX "$SHLIB_SUFFIX"
+_ACEOF
+
+
+# Copied from dbus configure.in
+#### find the actual value for $prefix that we'll end up with
+##   (I know this is broken and should be done in the Makefile, but
+##    that's a major pain and almost nobody actually seems to care)
+
+  EXP_VAR=EXPANDED_LOCALSTATEDIR
+  FROM_VAR="$localstatedir"
+
+    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
+  EXPANDED_LOCALSTATEDIR="$full_var"
+
+
+    prefix=$prefix_save
+  exec_prefix=$exec_prefix_save
+
+
+  EXP_VAR=EXPANDED_SYSCONFDIR
+  FROM_VAR="$sysconfdir"
+
+    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
+  EXPANDED_SYSCONFDIR="$full_var"
+
+
+    prefix=$prefix_save
+  exec_prefix=$exec_prefix_save
+
+
+  EXP_VAR=EXPANDED_BINDIR
+  FROM_VAR="$bindir"
+
+    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
+  EXPANDED_BINDIR="$full_var"
+
+
+    prefix=$prefix_save
+  exec_prefix=$exec_prefix_save
+
+
+  EXP_VAR=EXPANDED_LIBDIR
+  FROM_VAR="$libdir"
+
+    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
+  EXPANDED_LIBDIR="$full_var"
+
+
+    prefix=$prefix_save
+  exec_prefix=$exec_prefix_save
+
+
+  EXP_VAR=EXPANDED_LIBEXECDIR
+  FROM_VAR="$libexecdir"
+
+    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
+  EXPANDED_LIBEXECDIR="$full_var"
+
+
+    prefix=$prefix_save
+  exec_prefix=$exec_prefix_save
+
+
+  EXP_VAR=EXPANDED_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
+  EXPANDED_DATADIR="$full_var"
+
+
+    prefix=$prefix_save
+  exec_prefix=$exec_prefix_save
+
+
+#### Directory to install the libexec binaries
+GOBJECT_INTROSPECTION_LIBDIR="$EXPANDED_LIBDIR"
+
+
+cat >>confdefs.h <<_ACEOF
+#define GOBJECT_INTROSPECTION_LIBDIR "$GOBJECT_INTROSPECTION_LIBDIR"
+_ACEOF
+
+
+#### Directory to install the gir files
+GIR_SUFFIX="gir-1.0"
+
+
+cat >>confdefs.h <<_ACEOF
+#define GIR_SUFFIX "$GIR_SUFFIX"
+_ACEOF
+
+
+GIR_DIR="$EXPANDED_DATADIR/$GIR_SUFFIX"
+
+
+cat >>confdefs.h <<_ACEOF
+#define GIR_DIR "$GIR_DIR"
+_ACEOF
+
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5
+$as_echo_n "checking for GLIB... " >&6; }
+
+if test -n "$GLIB_CFLAGS"; then
+    pkg_cv_GLIB_CFLAGS="$GLIB_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.29.7\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.29.7") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.29.7" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$GLIB_LIBS"; then
+    pkg_cv_GLIB_LIBS="$GLIB_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.29.7\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.29.7") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.29.7" 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
+               GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= 2.29.7" 2>&1`
+        else
+               GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= 2.29.7" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$GLIB_PKG_ERRORS" >&5
+
+       as_fn_error $? "Package requirements (glib-2.0 >= 2.29.7) were not met:
+
+$GLIB_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 GLIB_CFLAGS
+and GLIB_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 GLIB_CFLAGS
+and GLIB_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
+       GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS
+       GLIB_LIBS=$pkg_cv_GLIB_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GOBJECT" >&5
+$as_echo_n "checking for GOBJECT... " >&6; }
+
+if test -n "$GOBJECT_CFLAGS"; then
+    pkg_cv_GOBJECT_CFLAGS="$GOBJECT_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-2.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gobject-2.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GOBJECT_CFLAGS=`$PKG_CONFIG --cflags "gobject-2.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$GOBJECT_LIBS"; then
+    pkg_cv_GOBJECT_LIBS="$GOBJECT_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-2.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gobject-2.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GOBJECT_LIBS=`$PKG_CONFIG --libs "gobject-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
+               GOBJECT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gobject-2.0" 2>&1`
+        else
+               GOBJECT_PKG_ERRORS=`$PKG_CONFIG --print-errors "gobject-2.0" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$GOBJECT_PKG_ERRORS" >&5
+
+       as_fn_error $? "Package requirements (gobject-2.0) were not met:
+
+$GOBJECT_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 GOBJECT_CFLAGS
+and GOBJECT_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 GOBJECT_CFLAGS
+and GOBJECT_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
+       GOBJECT_CFLAGS=$pkg_cv_GOBJECT_CFLAGS
+       GOBJECT_LIBS=$pkg_cv_GOBJECT_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GMODULE" >&5
+$as_echo_n "checking for GMODULE... " >&6; }
+
+if test -n "$GMODULE_CFLAGS"; then
+    pkg_cv_GMODULE_CFLAGS="$GMODULE_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gmodule-2.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gmodule-2.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GMODULE_CFLAGS=`$PKG_CONFIG --cflags "gmodule-2.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$GMODULE_LIBS"; then
+    pkg_cv_GMODULE_LIBS="$GMODULE_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gmodule-2.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gmodule-2.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GMODULE_LIBS=`$PKG_CONFIG --libs "gmodule-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
+               GMODULE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gmodule-2.0" 2>&1`
+        else
+               GMODULE_PKG_ERRORS=`$PKG_CONFIG --print-errors "gmodule-2.0" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$GMODULE_PKG_ERRORS" >&5
+
+       as_fn_error $? "Package requirements (gmodule-2.0) were not met:
+
+$GMODULE_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 GMODULE_CFLAGS
+and GMODULE_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 GMODULE_CFLAGS
+and GMODULE_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
+       GMODULE_CFLAGS=$pkg_cv_GMODULE_CFLAGS
+       GMODULE_LIBS=$pkg_cv_GMODULE_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+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\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gio-2.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>/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\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gio-2.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>/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>&1`
+        else
+               GIO_PKG_ERRORS=`$PKG_CONFIG --print-errors "gio-2.0" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$GIO_PKG_ERRORS" >&5
+
+       as_fn_error $? "Package requirements (gio-2.0) were not met:
+
+$GIO_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 GIO_CFLAGS
+and GIO_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 GIO_CFLAGS
+and GIO_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
+       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; }
+
+fi
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GIO_UNIX" >&5
+$as_echo_n "checking for GIO_UNIX... " >&6; }
+
+if test -n "$GIO_UNIX_CFLAGS"; then
+    pkg_cv_GIO_UNIX_CFLAGS="$GIO_UNIX_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\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gio-unix-2.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GIO_UNIX_CFLAGS=`$PKG_CONFIG --cflags "gio-unix-2.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$GIO_UNIX_LIBS"; then
+    pkg_cv_GIO_UNIX_LIBS="$GIO_UNIX_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\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gio-unix-2.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GIO_UNIX_LIBS=`$PKG_CONFIG --libs "gio-unix-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
+               GIO_UNIX_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gio-unix-2.0" 2>&1`
+        else
+               GIO_UNIX_PKG_ERRORS=`$PKG_CONFIG --print-errors "gio-unix-2.0" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$GIO_UNIX_PKG_ERRORS" >&5
+
+       have_gio_unix=false
+elif test $pkg_failed = untried; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       have_gio_unix=false
+else
+       GIO_UNIX_CFLAGS=$pkg_cv_GIO_UNIX_CFLAGS
+       GIO_UNIX_LIBS=$pkg_cv_GIO_UNIX_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       have_gio_unix=true
+fi
+ if test x$have_gio_unix = xtrue; then
+  HAVE_GIO_UNIX_TRUE=
+  HAVE_GIO_UNIX_FALSE='#'
+else
+  HAVE_GIO_UNIX_TRUE='#'
+  HAVE_GIO_UNIX_FALSE=
+fi
+
+
+# Check whether --enable-tests was given.
+if test "${enable_tests+set}" = set; then :
+  enableval=$enable_tests; enable_tests=$enableval
+else
+  enable_tests=yes
+fi
+
+have_cairo=no
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAIRO" >&5
+$as_echo_n "checking for CAIRO... " >&6; }
+
+if test -n "$CAIRO_CFLAGS"; then
+    pkg_cv_CAIRO_CFLAGS="$CAIRO_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "cairo") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$CAIRO_LIBS"; then
+    pkg_cv_CAIRO_LIBS="$CAIRO_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "cairo") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_CAIRO_LIBS=`$PKG_CONFIG --libs "cairo" 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
+               CAIRO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "cairo" 2>&1`
+        else
+               CAIRO_PKG_ERRORS=`$PKG_CONFIG --print-errors "cairo" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$CAIRO_PKG_ERRORS" >&5
+
+       have_cairo=no
+elif test $pkg_failed = untried; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       have_cairo=no
+else
+       CAIRO_CFLAGS=$pkg_cv_CAIRO_CFLAGS
+       CAIRO_LIBS=$pkg_cv_CAIRO_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       have_cairo=yes
+fi
+if test x$have_cairo != xyes && test x$enable_tests != xno; then
+  as_fn_error $? "Tests enabled but cairo not found; pass --disable-tests or install cairo" "$LINENO" 5
+fi
+
+have_cairo_gobject=no
+if test x$have_cairo = xyes; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAIRO_GOBJECT" >&5
+$as_echo_n "checking for CAIRO_GOBJECT... " >&6; }
+
+if test -n "$CAIRO_GOBJECT_CFLAGS"; then
+    pkg_cv_CAIRO_GOBJECT_CFLAGS="$CAIRO_GOBJECT_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo-gobject\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "cairo-gobject") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_CAIRO_GOBJECT_CFLAGS=`$PKG_CONFIG --cflags "cairo-gobject" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$CAIRO_GOBJECT_LIBS"; then
+    pkg_cv_CAIRO_GOBJECT_LIBS="$CAIRO_GOBJECT_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo-gobject\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "cairo-gobject") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_CAIRO_GOBJECT_LIBS=`$PKG_CONFIG --libs "cairo-gobject" 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
+               CAIRO_GOBJECT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "cairo-gobject" 2>&1`
+        else
+               CAIRO_GOBJECT_PKG_ERRORS=`$PKG_CONFIG --print-errors "cairo-gobject" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$CAIRO_GOBJECT_PKG_ERRORS" >&5
+
+       have_cairo_gobject=no
+elif test $pkg_failed = untried; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       have_cairo_gobject=no
+else
+       CAIRO_GOBJECT_CFLAGS=$pkg_cv_CAIRO_GOBJECT_CFLAGS
+       CAIRO_GOBJECT_LIBS=$pkg_cv_CAIRO_GOBJECT_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       have_cairo_gobject=yes
+fi
+fi
+
+if test x$have_cairo_gobject = xyes; then
+  case "$host" in
+    *-*-darwin*)
+      CAIRO_SHARED_LIBRARY="libcairo-gobject.2.dylib"
+      ;;
+    *-*-mingw*)
+      CAIRO_SHARED_LIBRARY="libcairo-gobject-2.dll"
+      ;;
+    *-*-openbsd*)
+      CAIRO_SHARED_LIBRARY="libcairo-gobject.so"
+      ;;
+    *)
+      CAIRO_SHARED_LIBRARY="libcairo-gobject.so.2"
+      ;;
+  esac
+  CAIRO_GIR_PACKAGE="cairo-gobject"
+elif test x$have_cairo = xyes; then
+  case "$host" in
+    *-*-darwin*)
+      CAIRO_SHARED_LIBRARY="libcairo.2.dylib"
+      ;;
+    *-*-mingw*)
+      CAIRO_SHARED_LIBRARY="libcairo-2.dll"
+      ;;
+    *-*-openbsd*)
+      CAIRO_SHARED_LIBRARY="libcairo.so"
+      ;;
+    *)
+      CAIRO_SHARED_LIBRARY="libcairo.so.2"
+      ;;
+  esac
+  CAIRO_GIR_PACKAGE="cairo"
+fi
+
+
+
+ if test x$enable_tests != xno; then
+  BUILD_TESTS_TRUE=
+  BUILD_TESTS_FALSE='#'
+else
+  BUILD_TESTS_TRUE='#'
+  BUILD_TESTS_FALSE=
+fi
+
+ if test x$have_cairo != xno; then
+  HAVE_CAIRO_TRUE=
+  HAVE_CAIRO_FALSE='#'
+else
+  HAVE_CAIRO_TRUE='#'
+  HAVE_CAIRO_FALSE=
+fi
+
+ if test x$have_cairo_gobject != xno; then
+  HAVE_CAIRO_GOBJECT_TRUE=
+  HAVE_CAIRO_GOBJECT_FALSE='#'
+else
+  HAVE_CAIRO_GOBJECT_TRUE='#'
+  HAVE_CAIRO_GOBJECT_FALSE=
+fi
+
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SCANNER" >&5
+$as_echo_n "checking for SCANNER... " >&6; }
+
+if test -n "$SCANNER_CFLAGS"; then
+    pkg_cv_SCANNER_CFLAGS="$SCANNER_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-2.0 gthread-2.0 gio-2.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gobject-2.0 gthread-2.0 gio-2.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SCANNER_CFLAGS=`$PKG_CONFIG --cflags "gobject-2.0 gthread-2.0 gio-2.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$SCANNER_LIBS"; then
+    pkg_cv_SCANNER_LIBS="$SCANNER_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-2.0 gthread-2.0 gio-2.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gobject-2.0 gthread-2.0 gio-2.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SCANNER_LIBS=`$PKG_CONFIG --libs "gobject-2.0 gthread-2.0 gio-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
+               SCANNER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gobject-2.0 gthread-2.0 gio-2.0" 2>&1`
+        else
+               SCANNER_PKG_ERRORS=`$PKG_CONFIG --print-errors "gobject-2.0 gthread-2.0 gio-2.0" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$SCANNER_PKG_ERRORS" >&5
+
+       as_fn_error $? "Package requirements (gobject-2.0 gthread-2.0 gio-2.0) were not met:
+
+$SCANNER_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 SCANNER_CFLAGS
+and SCANNER_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 SCANNER_CFLAGS
+and SCANNER_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
+       SCANNER_CFLAGS=$pkg_cv_SCANNER_CFLAGS
+       SCANNER_LIBS=$pkg_cv_SCANNER_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+
+
+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\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libffi") 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" 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\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libffi") 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" 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" 2>&1`
+        else
+               FFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$FFI_PKG_ERRORS" >&5
+
+       have_ffi_pkgconfig=no
+elif test $pkg_failed = untried; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       have_ffi_pkgconfig=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_ffi_pkgconfig=yes
+fi
+FFI_PC_CFLAGS=""
+FFI_PC_LIBS=""
+FFI_PC_PACKAGES=""
+if test x"$have_ffi_pkgconfig" = xyes ; then
+    FFI_PC_PACKAGES="libffi"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ffi.h" >&5
+$as_echo_n "checking for ffi.h... " >&6; }
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ffi.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  have_ffi_h=yes
+else
+  have_ffi_h=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+  if test x"$have_ffi_h" = x"yes"; then
+
+    save_LIBS=$LIBS
+    if test x"$with_ffi" = x"yes" || test x"$with_ffi" = x"auto"; then
+      other_LIBS=
+    else
+      other_LIBS=$with_ffi
+    fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ffi_call" >&5
+$as_echo_n "checking for library containing ffi_call... " >&6; }
+if ${ac_cv_search_ffi_call+:} 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 ffi_call ();
+int
+main ()
+{
+return ffi_call ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' ffi; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib $other_LIBS $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_ffi_call=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_ffi_call+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_ffi_call+:} false; then :
+
+else
+  ac_cv_search_ffi_call=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ffi_call" >&5
+$as_echo "$ac_cv_search_ffi_call" >&6; }
+ac_res=$ac_cv_search_ffi_call
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+else
+  as_fn_error $? "libffi not found" "$LINENO" 5
+fi
+
+    if test x"$ac_cv_search_ffi_call" = x"none required" ; then
+      FFI_LIBS=$other_LIBS
+    else
+      FFI_LIBS="$ac_cv_search_ffi_call $other_LIBS"
+    fi
+
+    LIBS=$save_LIBS
+  fi
+  if test x"$have_ffi_h" != x"yes" ; then
+    as_fn_error $? "ffi.h not found" "$LINENO" 5
+  fi
+
+  FFI_PC_LIBS=$FFI_LIBS
+  FFI_PC_CFLAGS=$FFI_CFLAGS
+  FFI_CFLAGS=
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ffi_h" >&5
+$as_echo "$have_ffi_h" >&6; }
+
+
+fi
+
+
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5
+$as_echo_n "checking size of char... " >&6; }
+if ${ac_cv_sizeof_char+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char"        "$ac_includes_default"; then :
+
+else
+  if test "$ac_cv_type_char" = yes; then
+     { { $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 "cannot compute sizeof (char)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_char=0
+   fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5
+$as_echo "$ac_cv_sizeof_char" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_CHAR $ac_cv_sizeof_char
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
+$as_echo_n "checking size of short... " >&6; }
+if ${ac_cv_sizeof_short+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
+
+else
+  if test "$ac_cv_type_short" = yes; then
+     { { $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 "cannot compute sizeof (short)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_short=0
+   fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
+$as_echo "$ac_cv_sizeof_short" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SHORT $ac_cv_sizeof_short
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
+$as_echo_n "checking size of int... " >&6; }
+if ${ac_cv_sizeof_int+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
+
+else
+  if test "$ac_cv_type_int" = yes; then
+     { { $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 "cannot compute sizeof (int)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_int=0
+   fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
+$as_echo "$ac_cv_sizeof_int" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_INT $ac_cv_sizeof_int
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
+$as_echo_n "checking size of long... " >&6; }
+if ${ac_cv_sizeof_long+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
+
+else
+  if test "$ac_cv_type_long" = yes; then
+     { { $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 "cannot compute sizeof (long)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_long=0
+   fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
+$as_echo "$ac_cv_sizeof_long" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GIREPO" >&5
+$as_echo_n "checking for GIREPO... " >&6; }
+
+if test -n "$GIREPO_CFLAGS"; then
+    pkg_cv_GIREPO_CFLAGS="$GIREPO_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-2.0 gmodule-2.0 gio-2.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.24.0 gobject-2.0 gmodule-2.0 gio-2.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GIREPO_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.24.0 gobject-2.0 gmodule-2.0 gio-2.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$GIREPO_LIBS"; then
+    pkg_cv_GIREPO_LIBS="$GIREPO_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-2.0 gmodule-2.0 gio-2.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.24.0 gobject-2.0 gmodule-2.0 gio-2.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GIREPO_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.24.0 gobject-2.0 gmodule-2.0 gio-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
+               GIREPO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= 2.24.0 gobject-2.0 gmodule-2.0 gio-2.0" 2>&1`
+        else
+               GIREPO_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= 2.24.0 gobject-2.0 gmodule-2.0 gio-2.0" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$GIREPO_PKG_ERRORS" >&5
+
+       as_fn_error $? "Package requirements (glib-2.0 >= 2.24.0 gobject-2.0 gmodule-2.0 gio-2.0) were not met:
+
+$GIREPO_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 GIREPO_CFLAGS
+and GIREPO_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 GIREPO_CFLAGS
+and GIREPO_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
+       GIREPO_CFLAGS=$pkg_cv_GIREPO_CFLAGS
+       GIREPO_LIBS=$pkg_cv_GIREPO_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+
+# if we ever remove manual check for ffi and require .pc file, then
+# just put libffi in the PKG_CHECK_MODULES(GIREPO) deps
+GIREPO_LIBS="$GIREPO_LIBS $GCOV_LIBS $FFI_LIBS"
+GIREPO_CFLAGS="$GIREPO_CFLAGS $FFI_CFLAGS"
+
+GIREPO_CFLAGS="$GIREPO_CFLAGS $GCOV_CFLAGS"
+
+# gtk-doc
+
+
+
+    # Extract the first word of "gtkdoc-check", so it can be a program name with args.
+set dummy gtkdoc-check; 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_GTKDOC_CHECK+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $GTKDOC_CHECK in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GTKDOC_CHECK="$GTKDOC_CHECK" # 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_GTKDOC_CHECK="$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
+GTKDOC_CHECK=$ac_cv_path_GTKDOC_CHECK
+if test -n "$GTKDOC_CHECK"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK" >&5
+$as_echo "$GTKDOC_CHECK" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  for ac_prog in gtkdoc-rebase
+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_GTKDOC_REBASE+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $GTKDOC_REBASE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GTKDOC_REBASE="$GTKDOC_REBASE" # 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_GTKDOC_REBASE="$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
+GTKDOC_REBASE=$ac_cv_path_GTKDOC_REBASE
+if test -n "$GTKDOC_REBASE"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_REBASE" >&5
+$as_echo "$GTKDOC_REBASE" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$GTKDOC_REBASE" && break
+done
+test -n "$GTKDOC_REBASE" || GTKDOC_REBASE="true"
+
+  # Extract the first word of "gtkdoc-mkpdf", so it can be a program name with args.
+set dummy gtkdoc-mkpdf; 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_GTKDOC_MKPDF+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $GTKDOC_MKPDF in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GTKDOC_MKPDF="$GTKDOC_MKPDF" # 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_GTKDOC_MKPDF="$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
+GTKDOC_MKPDF=$ac_cv_path_GTKDOC_MKPDF
+if test -n "$GTKDOC_MKPDF"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_MKPDF" >&5
+$as_echo "$GTKDOC_MKPDF" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+# Check whether --with-html-dir was given.
+if test "${with_html_dir+set}" = set; then :
+  withval=$with_html_dir;
+else
+  with_html_dir='${datadir}/gtk-doc/html'
+fi
+
+  HTML_DIR="$with_html_dir"
+
+
+    # Check whether --enable-gtk-doc was given.
+if test "${enable_gtk_doc+set}" = set; then :
+  enableval=$enable_gtk_doc;
+else
+  enable_gtk_doc=no
+fi
+
+
+  if test x$enable_gtk_doc = xyes; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk-doc >= 1.15\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gtk-doc >= 1.15") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  :
+else
+  as_fn_error $? "You need to have gtk-doc >= 1.15 installed to build $PACKAGE_NAME" "$LINENO" 5
+fi
+        if test "x$PACKAGE_NAME" != "xglib"; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTKDOC_DEPS" >&5
+$as_echo_n "checking for GTKDOC_DEPS... " >&6; }
+
+if test -n "$GTKDOC_DEPS_CFLAGS"; then
+    pkg_cv_GTKDOC_DEPS_CFLAGS="$GTKDOC_DEPS_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.10.0 gobject-2.0  >= 2.10.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GTKDOC_DEPS_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$GTKDOC_DEPS_LIBS"; then
+    pkg_cv_GTKDOC_DEPS_LIBS="$GTKDOC_DEPS_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.10.0 gobject-2.0  >= 2.10.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GTKDOC_DEPS_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.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
+               GTKDOC_DEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0" 2>&1`
+        else
+               GTKDOC_DEPS_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$GTKDOC_DEPS_PKG_ERRORS" >&5
+
+       as_fn_error $? "Package requirements (glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0) were not met:
+
+$GTKDOC_DEPS_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 GTKDOC_DEPS_CFLAGS
+and GTKDOC_DEPS_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 GTKDOC_DEPS_CFLAGS
+and GTKDOC_DEPS_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
+       GTKDOC_DEPS_CFLAGS=$pkg_cv_GTKDOC_DEPS_CFLAGS
+       GTKDOC_DEPS_LIBS=$pkg_cv_GTKDOC_DEPS_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+    fi
+  fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build gtk-doc documentation" >&5
+$as_echo_n "checking whether to build gtk-doc documentation... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk_doc" >&5
+$as_echo "$enable_gtk_doc" >&6; }
+
+    # Check whether --enable-gtk-doc-html was given.
+if test "${enable_gtk_doc_html+set}" = set; then :
+  enableval=$enable_gtk_doc_html;
+else
+  enable_gtk_doc_html=yes
+fi
+
+    # Check whether --enable-gtk-doc-pdf was given.
+if test "${enable_gtk_doc_pdf+set}" = set; then :
+  enableval=$enable_gtk_doc_pdf;
+else
+  enable_gtk_doc_pdf=no
+fi
+
+
+  if test -z "$GTKDOC_MKPDF"; then
+    enable_gtk_doc_pdf=no
+  fi
+
+
+   if test x$enable_gtk_doc = xyes; then
+  ENABLE_GTK_DOC_TRUE=
+  ENABLE_GTK_DOC_FALSE='#'
+else
+  ENABLE_GTK_DOC_TRUE='#'
+  ENABLE_GTK_DOC_FALSE=
+fi
+
+   if test x$enable_gtk_doc_html = xyes; then
+  GTK_DOC_BUILD_HTML_TRUE=
+  GTK_DOC_BUILD_HTML_FALSE='#'
+else
+  GTK_DOC_BUILD_HTML_TRUE='#'
+  GTK_DOC_BUILD_HTML_FALSE=
+fi
+
+   if test x$enable_gtk_doc_pdf = xyes; then
+  GTK_DOC_BUILD_PDF_TRUE=
+  GTK_DOC_BUILD_PDF_FALSE='#'
+else
+  GTK_DOC_BUILD_PDF_TRUE='#'
+  GTK_DOC_BUILD_PDF_FALSE=
+fi
+
+   if test -n "$LIBTOOL"; then
+  GTK_DOC_USE_LIBTOOL_TRUE=
+  GTK_DOC_USE_LIBTOOL_FALSE='#'
+else
+  GTK_DOC_USE_LIBTOOL_TRUE='#'
+  GTK_DOC_USE_LIBTOOL_FALSE=
+fi
+
+   if test -n "$GTKDOC_REBASE"; then
+  GTK_DOC_USE_REBASE_TRUE=
+  GTK_DOC_USE_REBASE_FALSE='#'
+else
+  GTK_DOC_USE_REBASE_TRUE='#'
+  GTK_DOC_USE_REBASE_FALSE=
+fi
+
+
+
+# Checks for header files.
+{ $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
+
+for ac_header in fcntl.h stdlib.h string.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$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
+
+
+# Checks for typedefs, structures, and compiler characteristics.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+if ${ac_cv_c_const+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+  /* Ultrix mips cc rejects this.  */
+  typedef int charset[2];
+  const charset cs;
+  /* SunOS 4.1.1 cc rejects this.  */
+  char const *const *pcpcc;
+  char **ppc;
+  /* NEC SVR4.0.2 mips cc rejects this.  */
+  struct point {int x, y;};
+  static struct point const zero = {0,0};
+  /* AIX XL C 1.02.0.0 rejects this.
+     It does not let you subtract one const X* pointer from another in
+     an arm of an if-expression whose if-part is not a constant
+     expression */
+  const char *g = "string";
+  pcpcc = &g + (g ? g-g : 0);
+  /* HPUX 7.0 cc rejects these. */
+  ++pcpcc;
+  ppc = (char**) pcpcc;
+  pcpcc = (char const *const *) ppc;
+  { /* SCO 3.2v4 cc rejects this.  */
+    char *t;
+    char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+    *t++ = 0;
+    if (s) return 0;
+  }
+  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+    int x[] = {25, 17};
+    const int *foo = &x[0];
+    ++foo;
+  }
+  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+    typedef const int *iptr;
+    iptr p = 0;
+    ++p;
+  }
+  { /* AIX XL C 1.02.0.0 rejects this saying
+       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+    struct s { int j; const int *ap[3]; };
+    struct s *b; b->j = 5;
+  }
+  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+    const int foo = 10;
+    if (!foo) return 0;
+  }
+  return !cs[0] && !zero.x;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_const=yes
+else
+  ac_cv_c_const=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+$as_echo "$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
+
+$as_echo "#define const /**/" >>confdefs.h
+
+fi
+
+
+# Checks for library functions.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5
+$as_echo_n "checking for working strtod... " >&6; }
+if ${ac_cv_func_strtod+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_func_strtod=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+$ac_includes_default
+#ifndef strtod
+double strtod ();
+#endif
+int
+main()
+{
+  {
+    /* Some versions of Linux strtod mis-parse strings with leading '+'.  */
+    char *string = " +69";
+    char *term;
+    double value;
+    value = strtod (string, &term);
+    if (value != 69 || term != (string + 4))
+      return 1;
+  }
+
+  {
+    /* Under Solaris 2.4, strtod returns the wrong value for the
+       terminating character under some conditions.  */
+    char *string = "NaN";
+    char *term;
+    strtod (string, &term);
+    if (term != string && *(term - 1) == 0)
+      return 1;
+  }
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_strtod=yes
+else
+  ac_cv_func_strtod=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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5
+$as_echo "$ac_cv_func_strtod" >&6; }
+if test $ac_cv_func_strtod = no; then
+  case " $LIBOBJS " in
+  *" strtod.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS strtod.$ac_objext"
+ ;;
+esac
+
+ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
+if test "x$ac_cv_func_pow" = xyes; then :
+
+fi
+
+if test $ac_cv_func_pow = no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
+$as_echo_n "checking for pow in -lm... " >&6; }
+if ${ac_cv_lib_m_pow+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm  $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 pow ();
+int
+main ()
+{
+return pow ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_m_pow=yes
+else
+  ac_cv_lib_m_pow=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_m_pow" >&5
+$as_echo "$ac_cv_lib_m_pow" >&6; }
+if test "x$ac_cv_lib_m_pow" = xyes; then :
+  POW_LIB=-lm
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5
+$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
+fi
+
+fi
+
+fi
+
+for ac_func in memchr strchr strspn strstr strtol strtoull
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+for ac_func in backtrace backtrace_symbols
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+# Python
+
+
+
+
+        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" >&5
+$as_echo_n "checking whether $PYTHON version >= 2.5... " >&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'.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" >&5
+$as_echo_n "checking for a Python interpreter with version >= 2.5... " >&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'.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
+  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
+
+
+case "$host" in
+*-*-mingw*)
+       # Change backslashes to forward slashes in pyexecdir to avoid
+       # quoting issues
+       pyexecdir=`echo $pyexecdir | tr '\\\\' '/'`
+       ;;
+esac
+
+{ $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; print sys.prefix"`
+py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
+if test "x$PYTHON_INCLUDES" == x; then
+  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 $? "Python headers not found" "$LINENO" 5
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+CPPFLAGS="$save_CPPFLAGS"
+
+if test "x$os_win32" = "xyes"; then
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libraries required to link against libpython" >&5
+$as_echo_n "checking for libraries required to link against libpython... " >&6; }
+if test "x$PYTHON_LIBS" == x; then
+       PYTHON_LIBS="-L${py_prefix}/lib -lpython${PYTHON_VERSION}"
+fi
+if test "x$PYTHON_LIB_LOC" == x; then
+       PYTHON_LIB_LOC="${py_prefix}/lib"
+fi
+
+
+save_LIBS="$LIBS"
+LIBS="$LIBS $PYTHON_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 Py_Initialize ();
+int
+main ()
+{
+return Py_Initialize ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+           LIBS="$save_LIBS"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
+$as_echo "found" >&6; };
+else
+           LIBS="$save_LIBS"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }; as_fn_error $? "Python libs not found. Windows requires Python modules to be explicitly linked to libpython." "$LINENO" 5
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+
+fi
+
+# Check whether --enable-doctool was given.
+if test "${enable_doctool+set}" = set; then :
+  enableval=$enable_doctool; enable_doctool=$enableval
+else
+  enable_doctool=no
+fi
+
+if test x$enable_doctool != xno; then
+
+py_mod_var=`echo mako'_' | sed 'y%./+-%__p_%'`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python module mako" >&5
+$as_echo_n "checking for python module mako... " >&6; }
+if eval \${py_cv_mod_$py_mod_var+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+prog="
+import sys
+try:
+        import mako
+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; }
+  as_fn_error $? "Could not find python module: mako" "$LINENO" 5
+fi
+
+fi
+ if test x$enable_doctool != xno; then
+  BUILD_DOCTOOL_TRUE=
+  BUILD_DOCTOOL_FALSE='#'
+else
+  BUILD_DOCTOOL_TRUE='#'
+  BUILD_DOCTOOL_FALSE=
+fi
+
+
+# Glib documentation
+
+GLIBSRC=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glib source directory to use for documentation" >&5
+$as_echo_n "checking for glib source directory to use for documentation... " >&6; }
+
+
+# Check whether --with-glib-src was given.
+if test "${with_glib_src+set}" = set; then :
+  withval=$with_glib_src; GLIBSRC=$withval
+
+fi
+
+ if test x"$GLIBSRC" != x; then
+  WITH_GLIBSRC_TRUE=
+  WITH_GLIBSRC_FALSE='#'
+else
+  WITH_GLIBSRC_TRUE='#'
+  WITH_GLIBSRC_FALSE=
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GLIBSRC" >&5
+$as_echo "$GLIBSRC" >&6; }
+
+
+
+ac_config_files="$ac_config_files Makefile m4/Makefile tests/Makefile tests/offsets/Makefile tests/scanner/Makefile tests/repository/Makefile tests/warn/Makefile tests/doctool/Makefile docs/Makefile docs/reference/Makefile gobject-introspection-1.0.pc gobject-introspection-no-export-1.0.pc"
+
+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 "${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 "${HAVE_GIO_UNIX_TRUE}" && test -z "${HAVE_GIO_UNIX_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_GIO_UNIX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_TESTS_TRUE}" && test -z "${BUILD_TESTS_FALSE}"; then
+  as_fn_error $? "conditional \"BUILD_TESTS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_CAIRO_TRUE}" && test -z "${HAVE_CAIRO_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_CAIRO\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_CAIRO_GOBJECT_TRUE}" && test -z "${HAVE_CAIRO_GOBJECT_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_CAIRO_GOBJECT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_GTK_DOC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${GTK_DOC_BUILD_HTML_TRUE}" && test -z "${GTK_DOC_BUILD_HTML_FALSE}"; then
+  as_fn_error $? "conditional \"GTK_DOC_BUILD_HTML\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${GTK_DOC_BUILD_PDF_TRUE}" && test -z "${GTK_DOC_BUILD_PDF_FALSE}"; then
+  as_fn_error $? "conditional \"GTK_DOC_BUILD_PDF\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${GTK_DOC_USE_LIBTOOL_TRUE}" && test -z "${GTK_DOC_USE_LIBTOOL_FALSE}"; then
+  as_fn_error $? "conditional \"GTK_DOC_USE_LIBTOOL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${GTK_DOC_USE_REBASE_TRUE}" && test -z "${GTK_DOC_USE_REBASE_FALSE}"; then
+  as_fn_error $? "conditional \"GTK_DOC_USE_REBASE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_DOCTOOL_TRUE}" && test -z "${BUILD_DOCTOOL_FALSE}"; then
+  as_fn_error $? "conditional \"BUILD_DOCTOOL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${WITH_GLIBSRC_TRUE}" && test -z "${WITH_GLIBSRC_FALSE}"; then
+  as_fn_error $? "conditional \"WITH_GLIBSRC\" 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 gobject-introspection $as_me 1.32.1, 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=glib&component=introspection>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+gobject-introspection config.status 1.32.1
+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'
+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"`'
+enable_static='`$ECHO "$enable_static" | $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"`'
+OBJDUMP='`$ECHO "$OBJDUMP" | $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"`'
+DLLTOOL='`$ECHO "$DLLTOOL" | $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 SHELL \
+ECHO \
+SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+OBJDUMP \
+deplibs_check_method \
+file_magic_cmd \
+file_magic_glob \
+want_nocaseglob \
+DLLTOOL \
+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'
+
+
+
+
+_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" ;;
+    "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;;
+    "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
+    "tests/offsets/Makefile") CONFIG_FILES="$CONFIG_FILES tests/offsets/Makefile" ;;
+    "tests/scanner/Makefile") CONFIG_FILES="$CONFIG_FILES tests/scanner/Makefile" ;;
+    "tests/repository/Makefile") CONFIG_FILES="$CONFIG_FILES tests/repository/Makefile" ;;
+    "tests/warn/Makefile") CONFIG_FILES="$CONFIG_FILES tests/warn/Makefile" ;;
+    "tests/doctool/Makefile") CONFIG_FILES="$CONFIG_FILES tests/doctool/Makefile" ;;
+    "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
+    "docs/reference/Makefile") CONFIG_FILES="$CONFIG_FILES docs/reference/Makefile" ;;
+    "gobject-introspection-1.0.pc") CONFIG_FILES="$CONFIG_FILES gobject-introspection-1.0.pc" ;;
+    "gobject-introspection-no-export-1.0.pc") CONFIG_FILES="$CONFIG_FILES gobject-introspection-no-export-1.0.pc" ;;
+
+  *) 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
+
+# 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
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# 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
+
+# An object symbol dumper.
+OBJDUMP=$lt_OBJDUMP
+
+# 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
+
+# DLL creation program.
+DLLTOOL=$lt_DLLTOOL
+
+# 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
+
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..dcb496d
--- /dev/null
@@ -0,0 +1,311 @@
+#                                               -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+dnl the gi version number
+m4_define(gi_major_version, 1)
+m4_define(gi_minor_version, 32)
+m4_define(gi_micro_version, 1)
+m4_define(gi_version, gi_major_version.gi_minor_version.gi_micro_version)
+
+AC_PREREQ([2.63])
+AC_INIT([gobject-introspection],
+        [gi_version],
+        [http://bugzilla.gnome.org/enter_bug.cgi?product=glib&component=introspection],
+        [gobject-introspection])
+
+AC_CONFIG_HEADER([config.h])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_AUX_DIR([build-aux])
+
+AM_INIT_AUTOMAKE([1.11 tar-ustar dist-xz no-dist-gzip foreign -Wno-portability])
+AM_MAINTAINER_MODE([enable])
+
+AM_SILENT_RULES([yes])
+
+# Check for Win32
+AC_CANONICAL_HOST
+case "$host" in
+*-*-mingw*)
+       os_win32=yes
+       ;;
+*)
+       os_win32=no
+       ;;
+esac
+AM_CONDITIONAL(OS_WIN32, [test "x$os_win32" = "xyes"])
+
+# Checks for programs.
+AC_PROG_CC
+AM_PROG_CC_C_O
+
+# Initialize libtool
+LT_PREREQ([2.2])
+LT_INIT
+
+PKG_PROG_PKG_CONFIG
+
+AC_PROG_LEX
+if test "$LEX" = :; then
+       AC_MSG_ERROR([flex not found but required])
+fi
+
+AC_CHECK_PROGS(YACC, 'bison -y', :)
+if test "$YACC" = :; then
+       AC_MSG_ERROR([bison not found but required])
+fi
+
+
+changequote(,)dnl
+ensureflag() {
+  flag="$1"; shift
+  result="$@"
+
+  case " ${result} " in
+  *[\ \        ]${flag}[\ \    ]*) ;;
+  *) result="${flag} ${result}" ;;
+  esac
+
+  echo ${result}
+}
+changequote([,])dnl
+
+if test "$GCC" = "yes"; then
+    for flag in -Wall -Wchar-subscripts -Wmissing-declarations \
+        -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align \
+        -Wsign-compare -fno-strict-aliasing;
+    do
+        CFLAGS="$(ensureflag $flag $CFLAGS)"
+    done
+fi
+
+# Checks for libraries.
+AC_CHECK_LIB([dl], [dlopen])
+
+AC_MSG_CHECKING(for the suffix of shared libraries)
+# libtool variables are immediately available since 2.0, prior to that we need
+# to call libtool --config explicitly
+if test "x$shrext_cmds" = x; then
+    shrext_cmds=`SED=$SED ./libtool --config | grep '^shrext_cmds='`
+    eval $shrext_cmds
+fi
+eval std_shrext=$shrext_cmds
+# chop the initial dot
+SHLIB_SUFFIX=${std_shrext#.}
+AC_MSG_RESULT(.$SHLIB_SUFFIX)
+# any reason it may fail?
+if test "x$SHLIB_SUFFIX" = x; then
+        AC_MSG_ERROR(Cannot determine shared library suffix from libtool)
+fi
+AC_DEFINE_UNQUOTED([SHLIB_SUFFIX], "$SHLIB_SUFFIX", [Define to the platform's shared library suffix])
+
+# Copied from dbus configure.in
+#### find the actual value for $prefix that we'll end up with
+##   (I know this is broken and should be done in the Makefile, but
+##    that's a major pain and almost nobody actually seems to care)
+AS_AC_EXPAND(EXPANDED_LOCALSTATEDIR, "$localstatedir")
+AS_AC_EXPAND(EXPANDED_SYSCONFDIR, "$sysconfdir")
+AS_AC_EXPAND(EXPANDED_BINDIR, "$bindir")
+AS_AC_EXPAND(EXPANDED_LIBDIR, "$libdir")
+AS_AC_EXPAND(EXPANDED_LIBEXECDIR, "$libexecdir")
+AS_AC_EXPAND(EXPANDED_DATADIR, "$datadir")
+
+#### Directory to install the libexec binaries
+GOBJECT_INTROSPECTION_LIBDIR="$EXPANDED_LIBDIR"
+AC_SUBST(GOBJECT_INTROSPECTION_LIBDIR)
+AC_DEFINE_UNQUOTED(GOBJECT_INTROSPECTION_LIBDIR,"$GOBJECT_INTROSPECTION_LIBDIR", [Directory prefix for typelib installation])
+
+#### Directory to install the gir files
+GIR_SUFFIX="gir-1.0"
+AC_SUBST(GIR_SUFFIX)
+AC_DEFINE_UNQUOTED(GIR_SUFFIX, "$GIR_SUFFIX", [Name of the gir directory])
+
+GIR_DIR="$EXPANDED_DATADIR/$GIR_SUFFIX"
+AC_SUBST(GIR_DIR)
+AC_DEFINE_UNQUOTED(GIR_DIR, "$GIR_DIR", [Director prefix for gir installation])
+
+PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.29.7])
+PKG_CHECK_MODULES(GOBJECT, [gobject-2.0])
+PKG_CHECK_MODULES(GMODULE, [gmodule-2.0])
+PKG_CHECK_MODULES(GIO, [gio-2.0])
+PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0], have_gio_unix=true, have_gio_unix=false)
+AM_CONDITIONAL(HAVE_GIO_UNIX, test x$have_gio_unix = xtrue)
+
+AC_ARG_ENABLE(tests,[  --disable-tests           disable test libraries ], enable_tests=$enableval,enable_tests=yes)
+have_cairo=no
+PKG_CHECK_MODULES(CAIRO, [cairo], have_cairo=yes, have_cairo=no)
+if test x$have_cairo != xyes && test x$enable_tests != xno; then
+  AC_MSG_ERROR([Tests enabled but cairo not found; pass --disable-tests or install cairo])
+fi
+
+have_cairo_gobject=no
+if test x$have_cairo = xyes; then
+  PKG_CHECK_MODULES(CAIRO_GOBJECT, [cairo-gobject], have_cairo_gobject=yes, have_cairo_gobject=no)
+fi
+
+if test x$have_cairo_gobject = xyes; then
+  case "$host" in
+    *-*-darwin*)
+      CAIRO_SHARED_LIBRARY="libcairo-gobject.2.dylib"
+      ;;
+    *-*-mingw*)
+      CAIRO_SHARED_LIBRARY="libcairo-gobject-2.dll"
+      ;;
+    *-*-openbsd*)
+      CAIRO_SHARED_LIBRARY="libcairo-gobject.so"
+      ;;
+    *)
+      CAIRO_SHARED_LIBRARY="libcairo-gobject.so.2"
+      ;;
+  esac
+  CAIRO_GIR_PACKAGE="cairo-gobject"
+elif test x$have_cairo = xyes; then
+  case "$host" in
+    *-*-darwin*)
+      CAIRO_SHARED_LIBRARY="libcairo.2.dylib"
+      ;;
+    *-*-mingw*)
+      CAIRO_SHARED_LIBRARY="libcairo-2.dll"
+      ;;
+    *-*-openbsd*)
+      CAIRO_SHARED_LIBRARY="libcairo.so"
+      ;;
+    *)
+      CAIRO_SHARED_LIBRARY="libcairo.so.2"
+      ;;
+  esac
+  CAIRO_GIR_PACKAGE="cairo"
+fi
+AC_SUBST(CAIRO_SHARED_LIBRARY)
+AC_SUBST(CAIRO_GIR_PACKAGE)
+
+AM_CONDITIONAL(BUILD_TESTS, test x$enable_tests != xno)
+AM_CONDITIONAL(HAVE_CAIRO, test x$have_cairo != xno)
+AM_CONDITIONAL(HAVE_CAIRO_GOBJECT, test x$have_cairo_gobject != xno)
+
+PKG_CHECK_MODULES(SCANNER, [gobject-2.0 gthread-2.0 gio-2.0])
+
+dnl libffi
+PKG_CHECK_MODULES(FFI, libffi, have_ffi_pkgconfig=yes, have_ffi_pkgconfig=no)
+FFI_PC_CFLAGS=""
+FFI_PC_LIBS=""
+FFI_PC_PACKAGES=""
+if test x"$have_ffi_pkgconfig" = xyes ; then
+    FFI_PC_PACKAGES="libffi"
+else
+  AC_MSG_CHECKING(for ffi.h)
+
+  AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <ffi.h>]])],
+                    [have_ffi_h=yes],[have_ffi_h=no])
+  if test x"$have_ffi_h" = x"yes"; then
+
+    save_LIBS=$LIBS
+    if test x"$with_ffi" = x"yes" || test x"$with_ffi" = x"auto"; then
+      other_LIBS=
+    else
+      other_LIBS=$with_ffi
+    fi
+
+    AC_SEARCH_LIBS(ffi_call,ffi,,AC_MSG_ERROR([libffi not found]),$other_LIBS)
+    if test x"$ac_cv_search_ffi_call" = x"none required" ; then
+      FFI_LIBS=$other_LIBS
+    else
+      FFI_LIBS="$ac_cv_search_ffi_call $other_LIBS"
+    fi
+
+    LIBS=$save_LIBS
+  fi
+  if test x"$have_ffi_h" != x"yes" ; then
+    AC_MSG_ERROR([ffi.h not found])
+  fi
+
+  FFI_PC_LIBS=$FFI_LIBS
+  FFI_PC_CFLAGS=$FFI_CFLAGS
+  FFI_CFLAGS=
+  AC_MSG_RESULT([$have_ffi_h])
+  AC_SUBST(FFI_LIBS)
+  AC_SUBST(FFI_CFLAGS)
+fi
+AC_SUBST(FFI_PC_CFLAGS)
+AC_SUBST(FFI_PC_LIBS)
+AC_SUBST(FFI_PC_PACKAGES)
+
+AC_CHECK_SIZEOF(char)
+AC_CHECK_SIZEOF(short)
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(long)
+
+PKG_CHECK_MODULES(GIREPO, [glib-2.0 >= 2.24.0 gobject-2.0 gmodule-2.0 gio-2.0])
+
+# if we ever remove manual check for ffi and require .pc file, then
+# just put libffi in the PKG_CHECK_MODULES(GIREPO) deps
+GIREPO_LIBS="$GIREPO_LIBS $GCOV_LIBS $FFI_LIBS"
+GIREPO_CFLAGS="$GIREPO_CFLAGS $FFI_CFLAGS"
+
+GIREPO_CFLAGS="$GIREPO_CFLAGS $GCOV_CFLAGS"
+
+# gtk-doc
+GTK_DOC_CHECK([1.15],[--flavour no-tmpl])
+
+# Checks for header files.
+AC_HEADER_STDC
+AC_CHECK_HEADERS([fcntl.h stdlib.h string.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+
+# Checks for library functions.
+AC_FUNC_STRTOD
+AC_CHECK_FUNCS([memchr strchr strspn strstr strtol strtoull])
+AC_CHECK_FUNCS([backtrace backtrace_symbols])
+
+# Python
+AM_PATH_PYTHON([2.5])
+case "$host" in
+*-*-mingw*)
+       # Change backslashes to forward slashes in pyexecdir to avoid
+       # quoting issues
+       pyexecdir=`echo $pyexecdir | tr '\\\\' '/'`
+       ;;
+esac
+AM_CHECK_PYTHON_HEADERS(, AC_MSG_ERROR([Python headers not found]))
+if test "x$os_win32" = "xyes"; then
+  AM_CHECK_PYTHON_LIBS(, AC_MSG_ERROR([Python libs not found. Windows requires Python modules to be explicitly linked to libpython.]))
+fi
+
+dnl Not enabled by default until 3.6 cycle when we can propose mako as
+dnl an external dependency
+AC_ARG_ENABLE(doctool,[  --enable-doctool           enable g-ir-doctool ], enable_doctool=$enableval,enable_doctool=no)
+if test x$enable_doctool != xno; then
+   AM_CHECK_PYMOD(mako,,,[AC_MSG_ERROR(Could not find python module: mako)])
+fi
+AM_CONDITIONAL(BUILD_DOCTOOL, test x$enable_doctool != xno)
+
+# Glib documentation
+
+GLIBSRC=
+AC_MSG_CHECKING([for glib source directory to use for documentation])
+
+AC_ARG_WITH(glib-src,
+       [  --with-glib-src=PATH    Source directory for glib - needed to add docs to gir],
+       GLIBSRC=$withval
+) 
+AM_CONDITIONAL(WITH_GLIBSRC, test x"$GLIBSRC" != x)
+AC_SUBST(GLIBSRC)
+AC_MSG_RESULT([$GLIBSRC])
+
+
+
+AC_CONFIG_FILES([
+Makefile
+m4/Makefile
+tests/Makefile
+tests/offsets/Makefile
+tests/scanner/Makefile
+tests/repository/Makefile
+tests/warn/Makefile
+tests/doctool/Makefile
+docs/Makefile
+docs/reference/Makefile
+gobject-introspection-1.0.pc
+gobject-introspection-no-export-1.0.pc])
+AC_OUTPUT
diff --git a/docs/Makefile.am b/docs/Makefile.am
new file mode 100644 (file)
index 0000000..f3ddc22
--- /dev/null
@@ -0,0 +1 @@
+SUBDIRS = reference
diff --git a/docs/Makefile.in b/docs/Makefile.in
new file mode 100644 (file)
index 0000000..4c01d1a
--- /dev/null
@@ -0,0 +1,625 @@
+# 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/gtk-doc.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)/acinclude.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 =
+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
+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"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_GIR_PACKAGE = @CAIRO_GIR_PACKAGE@
+CAIRO_GOBJECT_CFLAGS = @CAIRO_GOBJECT_CFLAGS@
+CAIRO_GOBJECT_LIBS = @CAIRO_GOBJECT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CAIRO_SHARED_LIBRARY = @CAIRO_SHARED_LIBRARY@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+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@
+EXPANDED_BINDIR = @EXPANDED_BINDIR@
+EXPANDED_DATADIR = @EXPANDED_DATADIR@
+EXPANDED_LIBDIR = @EXPANDED_LIBDIR@
+EXPANDED_LIBEXECDIR = @EXPANDED_LIBEXECDIR@
+EXPANDED_LOCALSTATEDIR = @EXPANDED_LOCALSTATEDIR@
+EXPANDED_SYSCONFDIR = @EXPANDED_SYSCONFDIR@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FFI_PC_CFLAGS = @FFI_PC_CFLAGS@
+FFI_PC_LIBS = @FFI_PC_LIBS@
+FFI_PC_PACKAGES = @FFI_PC_PACKAGES@
+FGREP = @FGREP@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
+GIREPO_CFLAGS = @GIREPO_CFLAGS@
+GIREPO_LIBS = @GIREPO_LIBS@
+GIR_DIR = @GIR_DIR@
+GIR_SUFFIX = @GIR_SUFFIX@
+GLIBSRC = @GLIBSRC@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMODULE_CFLAGS = @GMODULE_CFLAGS@
+GMODULE_LIBS = @GMODULE_LIBS@
+GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
+GOBJECT_INTROSPECTION_LIBDIR = @GOBJECT_INTROSPECTION_LIBDIR@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
+GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
+GTKDOC_MKPDF = @GTKDOC_MKPDF@
+GTKDOC_REBASE = @GTKDOC_REBASE@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+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@
+POW_LIB = @POW_LIB@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_LIB_LOC = @PYTHON_LIB_LOC@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SCANNER_CFLAGS = @SCANNER_CFLAGS@
+SCANNER_LIBS = @SCANNER_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+YACC = @YACC@
+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@
+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@
+SUBDIRS = reference
+all: all-recursive
+
+.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
+
+# 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
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+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 mostlyclean-am
+
+distclean: distclean-recursive
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+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 -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:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+       install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+       all all-am check check-am clean clean-generic clean-libtool \
+       ctags ctags-recursive distclean 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 installdirs-am maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-generic \
+       mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+       uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/docs/g-ir-compiler.1 b/docs/g-ir-compiler.1
new file mode 100644 (file)
index 0000000..8d1b85d
--- /dev/null
@@ -0,0 +1,51 @@
+.TH "g-ir-compiler" 1
+.SH NAME
+g-ir-compiler \- typelib compiler.
+.SH SYNOPSIS
+.B g-ir-compiler
+[OPTION...] GIRFILE
+.SH DESCRIPTION
+g-ir-compiler converts one or more GIR files into one or more typelib. 
+It can either emit the raw typelib blob (default behavior) or C code
+(--code). The output will be written to standard output unless the --output 
+is specified.
+.SH OPTIONS
+.TP
+.B \---help
+Show help options
+.TP
+.B \, ---code
+Emit C code which is suitable for including in a shared library instead
+of a raw typelib.
+.TP
+.B \, ---output=FILENAME
+Save the resulting output in FILENAME.
+.TP
+.B \---verbose                       
+Show verbose messages
+.TP
+.B \---debug                       
+Show debug messages
+.TP
+.B \---no-init
+Do not include an initialization snippet to register the typelib in the
+respository. This can only be used if --code is also specified.
+.TP
+.B \---includedir=DIRECTORY
+Adds a directory which will be used to find includes inside the GIR format.
+.TP
+.B \---module=MODULE
+FIXME
+.TP
+.B \---shared-library=FILENAME
+Specifies the shared library where the symbols in the typelib can be found.
+The name of the library should not contain the leading lib prefix nor
+the ending shared library suffix.
+.TP
+.SH BUGS
+Report bugs at http://bugzilla.gnome.org/ in the glib product and
+introspection component.
+.SH HOMEPAGE and CONTACT
+http://live.gnome.org/GObjectIntrospection
+.SH AUTHORS
+Mattias Clasen
diff --git a/docs/g-ir-generate.1 b/docs/g-ir-generate.1
new file mode 100644 (file)
index 0000000..78d12d5
--- /dev/null
@@ -0,0 +1,29 @@
+.TH "g-ir-generate" 1
+.SH NAME
+g-ir-generate \- typelib generator
+.SH SYNOPSIS
+.B g-ir-generate
+[OPTION...] FILES...
+.SH DESCRIPTION
+g-idl-generate is an GIR generator, using the repository API. It generates
+GIR files from a raw typelib or in a shared library (--shlib).
+The output will be written to standard output unless the --output 
+is specified.
+.SH OPTIONS
+.TP
+.B \, --help
+Show help options
+.TP
+.B \, --shlib=FILENAME
+The shared library to read the symbols from.
+.TP
+.B \, --output=FILENAME
+Save the resulting output in FILENAME.
+.TP
+.SH BUGS
+Report bugs at http://bugzilla.gnome.org/ in the glib product and
+introspection component.
+.SH HOMEPAGE and CONTACT
+http://live.gnome.org/GObjectIntrospection
+.SH AUTHORS
+Mattias Clasen
diff --git a/docs/g-ir-scanner.1 b/docs/g-ir-scanner.1
new file mode 100644 (file)
index 0000000..847c78b
--- /dev/null
@@ -0,0 +1,146 @@
+.TH "g-ir-scanner" 1
+.SH NAME
+g-ir-scanner \- extracting C metadata from sources and headers
+.SH SYNOPSIS
+.B g-ir-scanner
+[OPTION...] FILES...
+.SH DESCRIPTION
+g-ir-scanner is a tool which generates GIR XML files by parsing headers
+and introspecting GObject based libraries.
+It is usually invoked during the normal build step for a project and
+the information is saved to disk and later installed, so that language bindings
+and other applications can use it.
+Header files and source files are passed in as arguments on the command line.
+The suffix determines whether a file be treated as a source file (.c) or a
+header file (.h). Currently only C based libraries are supported by the scanner.
+.SH OPTIONS
+.TP
+.B \--help
+Show help options
+.TP
+.B \--quiet
+If passed, do not print details of normal operation.
+.TP
+.B \--warn-all
+Display warnings for public API which is not introspectable.
+.TP
+.B \--warn-error
+Make warnings be fatal errors.
+.TP
+.B \--format=FORMAT
+This parameters decides which the resulting format will be used.
+The default value is gir.
+.TP
+.B \--include=NAME
+Add the specified introspection dependency to the scanned namespace.
+NAME is of the form NAMESPACE-VERSION, like Gtk-3.0.
+.TP
+.B \--include-uninstalled=PATH
+Add the specified introspection dependency to the scanned namespace.
+This differs from \--include in that it takes a file path, and
+does not process the pkg-config dependencies (since they may not
+be installed yet).
+.TP
+.B \--add-include-path=PATH
+Add a directory to the path which the scanner uses to find GIR files.
+Can be used multiple times to specify multiple directories
+.TP
+.B \-i, --library=LIBRARY
+Specifies a library that will be introspected. This means that the
+*_get_type() functions in it will be called for GObject data types.
+The name of the library should not contain the leading lib prefix nor
+the ending shared library suffix.
+.TP
+.B \-L, --library-path=PATH
+Include this directory when searching for a library.
+This option can be specified multiple times to include more than one
+directory to look for libraries in.
+.TP
+.B \-Idirectory
+Include this directory in the list of directories to be searched for
+header files.  You need to pass to the scanner all the directories
+you'd normally pass to the compiler when using the specified source
+files.
+.TP
+.B \-n, --namespace=NAME
+The namespace name. This name should be capitalized, eg the first letter
+should be upper case. Examples: Gtk, Clutter, WebKit.
+.TP
+.B \--no-libtool
+Disable usage of libtool for compiling stub introspection binary.  Use this
+if your build system does not require libtool.
+.TP
+.B \--libtool
+Full path to libtool executable.  Typically used for Automake systems.
+.TP
+.B --nsversion=VERSION
+The namespace version. For instance 1.0. This is usually the platform version,
+eg 2.0 for Gtk+, not 2.12.7.
+.TP
+.B \-p, --program=PROGRAM
+Specifies a binary that will be introspected. This means that the
+*_get_type() functions in it will be called for GObject data types.
+The binary must be modified to take a --introspect= option, and
+to pass the argument to this function to g_irepository_dump.
+.TP
+.B \--program-arg=ARG
+Additional argument to pass to program for introspection.
+.TP
+.B \--identifier-prefix=PREFIX
+This option may be specified multiple times.  Each one
+gives a prefix that will be stripped from all C identifiers.
+If none specified, the namespace will be used.
+Eg, an identifier prefix of
+.B Foo
+will export the identifier
+.B typdef struct _FooBar FooBar;
+as
+.B Foo.Bar.
+.TP
+.B \--symbol-prefix=PREFIX
+This option may be specified multiple times.  Each one
+gives a prefix that will be stripped from all C symbols.
+Eg, an symbol prefix of
+.B foo
+will export the symbol
+.B foo_bar_do_something
+as
+.B Foo.Bar.do_something.
+.TP
+.B \--accept-unprefixed
+If specified, the scanner will accept identifiers and symbols which
+do not match the namespace prefix.  Try to avoid using this if possible.
+.TP
+.B \--output=FILENAME
+Name of the file to output. Normally namespace + format extension.
+Eg, GLib-2.0.gir.
+.TP
+.B \--pkg=PACKAGE
+List of pkg-config packages to get compiler and linker flags from.
+This option can be specified multiple times to include flags from
+several pkg-config packages.
+.TP
+.B \--pkg-export=PACKAGE
+List of pkg-config packages that are provided by the generated gir.
+This option can be specified multiple times if the gir provides more
+packages.
+If not specified, the packages specified with --pkg= will be used.
+.TP
+.B \--verbose
+Be verbose, include some debugging information.
+.TP
+.SH ENVIRONMENT VARIABLES
+The g-ir-scanner uses the XDG_DATA_DIRS variable to check for dirs,
+the gir's are located in XDG_DATA_DIRS/share/gir-1.0. It is normally
+set on a distribution so you shouldn't need to set it yourself.
+
+The variable GI_SCANNER_DISABLE_CACHE ensures that the scanner will
+not write cache data to $HOME.
+.SH BUGS
+Report bugs at http://bugzilla.gnome.org/ in the glib product and
+introspection component.
+.SH HOMEPAGE and CONTACT
+http://live.gnome.org/GObjectIntrospection
+.SH AUTHORS
+Johan Dahlin
+
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
new file mode 100644 (file)
index 0000000..19c9aff
--- /dev/null
@@ -0,0 +1,62 @@
+AUTOMAKE_OPTIONS = 1.6
+
+# The name of the module.
+DOC_MODULE=gi
+
+# The top-level SGML file.
+DOC_MAIN_SGML_FILE=gi-docs.sgml
+
+# The directory containing the source code. Relative to $(srcdir)
+DOC_SOURCE_DIR=$(top_srcdir)/girepository
+
+# Extra options to supply to gtkdoc-scan
+SCAN_OPTIONS=
+
+# Extra options to supply to gtkdoc-mkdb
+MKDB_OPTIONS=--sgml-mode --output-format=xml --name-space=g
+
+# Used for dependencies
+HFILE_GLOB=$(top_srcdir)/girepository/*.h
+CFILE_GLOB=$(top_srcdir)/girepository/*.c
+
+# Headers to ignore
+IGNORE_HFILES= \
+    glib-compat.h   \
+    girnode.h      \
+    ginfo.h        \
+    girparser.h            \
+    girwriter.h            \
+    girmodule.h
+
+INCLUDES=$(GIREPO_CFLAGS) -I$(top_srcdir)
+GTKDOC_LIBS = $(GIREPO_LIBS) $(top_builddir)/libgirepository-1.0.la $(top_builddir)/libgirepository-internals.la
+
+content_files = \
+    gi-gir-reference.xml    \
+    gi-gir.sgml                    \
+    gi-overview.xml        \
+    gi-struct-hierarchy.xml
+
+HTML_IMAGES = \
+    $(srcdir)/images/overview.png
+
+# Extra options to supply to gtkdoc-fixref
+FIXXREF_OPTIONS=
+
+# include common portion ...
+include $(top_srcdir)/gtk-doc.make
+# Other files to distribute
+EXTRA_DIST += version.xml.in
+
+gtk-docs-clean:
+       rm -fr html tmpl xml
+
+clean-local: gtk-docs-clean
+
+########################################################################
+
+dist-hook-local: $(BUILT_EXTRA_DIST)
+       files='$(BUILT_EXTRA_DIST)';                            \
+       for f in $$files; do                                    \
+         if test -f $$f; then d=.; else d=$(srcdir); fi;       \
+         cp $$d/$$f $(distdir) || exit 1; done
diff --git a/docs/reference/Makefile.in b/docs/reference/Makefile.in
new file mode 100644 (file)
index 0000000..71d3980
--- /dev/null
@@ -0,0 +1,725 @@
+# 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@
+
+# -*- mode: makefile -*-
+
+####################################
+# Everything below here is generic #
+####################################
+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@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+       $(top_srcdir)/gtk-doc.make
+subdir = docs/reference
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.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)/acinclude.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@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_GIR_PACKAGE = @CAIRO_GIR_PACKAGE@
+CAIRO_GOBJECT_CFLAGS = @CAIRO_GOBJECT_CFLAGS@
+CAIRO_GOBJECT_LIBS = @CAIRO_GOBJECT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CAIRO_SHARED_LIBRARY = @CAIRO_SHARED_LIBRARY@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+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@
+EXPANDED_BINDIR = @EXPANDED_BINDIR@
+EXPANDED_DATADIR = @EXPANDED_DATADIR@
+EXPANDED_LIBDIR = @EXPANDED_LIBDIR@
+EXPANDED_LIBEXECDIR = @EXPANDED_LIBEXECDIR@
+EXPANDED_LOCALSTATEDIR = @EXPANDED_LOCALSTATEDIR@
+EXPANDED_SYSCONFDIR = @EXPANDED_SYSCONFDIR@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FFI_PC_CFLAGS = @FFI_PC_CFLAGS@
+FFI_PC_LIBS = @FFI_PC_LIBS@
+FFI_PC_PACKAGES = @FFI_PC_PACKAGES@
+FGREP = @FGREP@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
+GIREPO_CFLAGS = @GIREPO_CFLAGS@
+GIREPO_LIBS = @GIREPO_LIBS@
+GIR_DIR = @GIR_DIR@
+GIR_SUFFIX = @GIR_SUFFIX@
+GLIBSRC = @GLIBSRC@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMODULE_CFLAGS = @GMODULE_CFLAGS@
+GMODULE_LIBS = @GMODULE_LIBS@
+GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
+GOBJECT_INTROSPECTION_LIBDIR = @GOBJECT_INTROSPECTION_LIBDIR@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
+GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
+GTKDOC_MKPDF = @GTKDOC_MKPDF@
+GTKDOC_REBASE = @GTKDOC_REBASE@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+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@
+POW_LIB = @POW_LIB@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_LIB_LOC = @PYTHON_LIB_LOC@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SCANNER_CFLAGS = @SCANNER_CFLAGS@
+SCANNER_LIBS = @SCANNER_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+YACC = @YACC@
+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@
+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.6
+
+# The name of the module.
+DOC_MODULE = gi
+
+# The top-level SGML file.
+DOC_MAIN_SGML_FILE = gi-docs.sgml
+
+# The directory containing the source code. Relative to $(srcdir)
+DOC_SOURCE_DIR = $(top_srcdir)/girepository
+
+# Extra options to supply to gtkdoc-scan
+SCAN_OPTIONS = 
+
+# Extra options to supply to gtkdoc-mkdb
+MKDB_OPTIONS = --sgml-mode --output-format=xml --name-space=g
+
+# Used for dependencies
+HFILE_GLOB = $(top_srcdir)/girepository/*.h
+CFILE_GLOB = $(top_srcdir)/girepository/*.c
+
+# Headers to ignore
+IGNORE_HFILES = \
+    glib-compat.h   \
+    girnode.h      \
+    ginfo.h        \
+    girparser.h            \
+    girwriter.h            \
+    girmodule.h
+
+INCLUDES = $(GIREPO_CFLAGS) -I$(top_srcdir)
+GTKDOC_LIBS = $(GIREPO_LIBS) $(top_builddir)/libgirepository-1.0.la $(top_builddir)/libgirepository-internals.la
+content_files = \
+    gi-gir-reference.xml    \
+    gi-gir.sgml                    \
+    gi-overview.xml        \
+    gi-struct-hierarchy.xml
+
+HTML_IMAGES = \
+    $(srcdir)/images/overview.png
+
+
+# Extra options to supply to gtkdoc-fixref
+FIXXREF_OPTIONS = 
+@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_RUN = 
+@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_RUN = $(LIBTOOL) --mode=execute
+
+# We set GPATH here; this gives us semantics for GNU make
+# which are more like other make's VPATH, when it comes to
+# whether a source that is a target of one rule is then
+# searched for in VPATH/GPATH.
+#
+GPATH = $(srcdir)
+TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE)
+SETUP_FILES = \
+       $(content_files)                \
+       $(DOC_MAIN_SGML_FILE)           \
+       $(DOC_MODULE)-sections.txt      \
+       $(DOC_MODULE)-overrides.txt
+
+
+# include common portion ...
+# Other files to distribute
+EXTRA_DIST = $(HTML_IMAGES) $(SETUP_FILES) version.xml.in
+DOC_STAMPS = setup-build.stamp scan-build.stamp sgml-build.stamp \
+       html-build.stamp pdf-build.stamp \
+       sgml.stamp html.stamp pdf.stamp
+
+SCANOBJ_FILES = \
+       $(DOC_MODULE).args       \
+       $(DOC_MODULE).hierarchy  \
+       $(DOC_MODULE).interfaces \
+       $(DOC_MODULE).prerequisites \
+       $(DOC_MODULE).signals
+
+REPORT_FILES = \
+       $(DOC_MODULE)-undocumented.txt \
+       $(DOC_MODULE)-undeclared.txt \
+       $(DOC_MODULE)-unused.txt
+
+CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
+@ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_HTML_FALSE@HTML_BUILD_STAMP = 
+@ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_HTML_TRUE@HTML_BUILD_STAMP = html-build.stamp
+@ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_FALSE@PDF_BUILD_STAMP = 
+@ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_TRUE@PDF_BUILD_STAMP = pdf-build.stamp
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/gtk-doc.make $(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/reference/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign docs/reference/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
+       $(MAKE) $(AM_MAKEFLAGS) \
+         top_distdir="$(top_distdir)" distdir="$(distdir)" \
+         dist-hook
+check-am: all-am
+check: check-am
+all-am: Makefile all-local
+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 mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-local
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: 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 \
+       maintainer-clean-local
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-local
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am all-local check check-am clean clean-generic \
+       clean-libtool clean-local dist-hook distclean \
+       distclean-generic distclean-libtool distclean-local distdir \
+       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-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 \
+       maintainer-clean-local mostlyclean mostlyclean-generic \
+       mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
+       uninstall-local
+
+
+@ENABLE_GTK_DOC_TRUE@all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)
+@ENABLE_GTK_DOC_FALSE@all-local:
+
+docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)
+
+$(REPORT_FILES): sgml-build.stamp
+
+#### setup ####
+
+setup-build.stamp:
+       -@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
+           echo '  DOC   Preparing build'; \
+           files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \
+           if test "x$$files" != "x" ; then \
+               for file in $$files ; do \
+                   test -f $(abs_srcdir)/$$file && \
+                       cp -pu $(abs_srcdir)/$$file $(abs_builddir)/ || true; \
+               done; \
+           fi; \
+       fi
+       @touch setup-build.stamp
+
+#### scan ####
+
+scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
+       @echo '  DOC   Scanning header files'
+       @_source_dir='' ; \
+       for i in $(DOC_SOURCE_DIR) ; do \
+           _source_dir="$${_source_dir} --source-dir=$$i" ; \
+       done ; \
+       gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES)
+       @if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \
+           echo "  DOC   Introspecting gobjects"; \
+           scanobj_options=""; \
+           gtkdoc-scangobj 2>&1 --help | grep  >/dev/null "\-\-verbose"; \
+           if test "$(?)" = "0"; then \
+               if test "x$(V)" = "x1"; then \
+                   scanobj_options="--verbose"; \
+               fi; \
+           fi; \
+           CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \
+           gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \
+       else \
+           for i in $(SCANOBJ_FILES) ; do \
+               test -f $$i || touch $$i ; \
+           done \
+       fi
+       @touch scan-build.stamp
+
+$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
+       @true
+
+#### xml ####
+
+sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files)
+       @echo '  DOC   Building XML'
+       @_source_dir='' ; \
+       for i in $(DOC_SOURCE_DIR) ; do \
+           _source_dir="$${_source_dir} --source-dir=$$i" ; \
+       done ; \
+       gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS)
+       @touch sgml-build.stamp
+
+sgml.stamp: sgml-build.stamp
+       @true
+
+#### html ####
+
+html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
+       @echo '  DOC   Building HTML'
+       @rm -rf html
+       @mkdir html
+       @mkhtml_options=""; \
+       gtkdoc-mkhtml 2>&1 --help | grep  >/dev/null "\-\-verbose"; \
+       if test "$(?)" = "0"; then \
+         if test "x$(V)" = "x1"; then \
+           mkhtml_options="$$mkhtml_options --verbose"; \
+         fi; \
+       fi; \
+       gtkdoc-mkhtml 2>&1 --help | grep  >/dev/null "\-\-path"; \
+       if test "$(?)" = "0"; then \
+         mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \
+       fi; \
+       cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
+       -@test "x$(HTML_IMAGES)" = "x" || \
+       for file in $(HTML_IMAGES) ; do \
+         if test -f $(abs_srcdir)/$$file ; then \
+           cp $(abs_srcdir)/$$file $(abs_builddir)/html; \
+         fi; \
+         if test -f $(abs_builddir)/$$file ; then \
+           cp $(abs_builddir)/$$file $(abs_builddir)/html; \
+         fi; \
+       done;
+       @echo '  DOC   Fixing cross-references'
+       @gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
+       @touch html-build.stamp
+
+#### pdf ####
+
+pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
+       @echo '  DOC   Building PDF'
+       @rm -f $(DOC_MODULE).pdf
+       @mkpdf_options=""; \
+       gtkdoc-mkpdf 2>&1 --help | grep  >/dev/null "\-\-verbose"; \
+       if test "$(?)" = "0"; then \
+         if test "x$(V)" = "x1"; then \
+           mkpdf_options="$$mkpdf_options --verbose"; \
+         fi; \
+       fi; \
+       if test "x$(HTML_IMAGES)" != "x"; then \
+         for img in $(HTML_IMAGES); do \
+           part=`dirname $$img`; \
+           echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \
+           if test $$? != 0; then \
+             mkpdf_options="$$mkpdf_options --imgdir=$$part"; \
+           fi; \
+         done; \
+       fi; \
+       gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS)
+       @touch pdf-build.stamp
+
+##############
+
+clean-local:
+       @rm -f *~ *.bak
+       @rm -rf .libs
+
+distclean-local:
+       @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \
+           $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
+       @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
+           rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \
+       fi
+
+maintainer-clean-local:
+       @rm -rf xml html
+
+install-data-local:
+       @installfiles=`echo $(builddir)/html/*`; \
+       if test "$$installfiles" = '$(builddir)/html/*'; \
+       then echo 1>&2 'Nothing to install' ; \
+       else \
+         if test -n "$(DOC_MODULE_VERSION)"; then \
+           installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
+         else \
+           installdir="$(DESTDIR)$(TARGET_DIR)"; \
+         fi; \
+         $(mkinstalldirs) $${installdir} ; \
+         for i in $$installfiles; do \
+           echo ' $(INSTALL_DATA) '$$i ; \
+           $(INSTALL_DATA) $$i $${installdir}; \
+         done; \
+         if test -n "$(DOC_MODULE_VERSION)"; then \
+           mv -f $${installdir}/$(DOC_MODULE).devhelp2 \
+             $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \
+         fi; \
+         $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \
+       fi
+
+uninstall-local:
+       @if test -n "$(DOC_MODULE_VERSION)"; then \
+         installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
+       else \
+         installdir="$(DESTDIR)$(TARGET_DIR)"; \
+       fi; \
+       rm -rf $${installdir}
+
+#
+# Require gtk-doc when making dist
+#
+@ENABLE_GTK_DOC_TRUE@dist-check-gtkdoc: docs
+@ENABLE_GTK_DOC_FALSE@dist-check-gtkdoc:
+@ENABLE_GTK_DOC_FALSE@ @echo "*** gtk-doc must be installed and enabled in order to make dist"
+@ENABLE_GTK_DOC_FALSE@ @false
+
+dist-hook: dist-check-gtkdoc dist-hook-local
+       @mkdir $(distdir)/html
+       @cp ./html/* $(distdir)/html
+       @-cp ./$(DOC_MODULE).pdf $(distdir)/
+       @-cp ./$(DOC_MODULE).types $(distdir)/
+       @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/
+       @cd $(distdir) && rm -f $(DISTCLEANFILES)
+       @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html
+
+.PHONY : dist-hook-local docs
+
+gtk-docs-clean:
+       rm -fr html tmpl xml
+
+clean-local: gtk-docs-clean
+
+########################################################################
+
+dist-hook-local: $(BUILT_EXTRA_DIST)
+       files='$(BUILT_EXTRA_DIST)';                            \
+       for f in $$files; do                                    \
+         if test -f $$f; then d=.; else d=$(srcdir); fi;       \
+         cp $$d/$$f $(distdir) || exit 1; done
+
+# 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/reference/gi-docs.sgml b/docs/reference/gi-docs.sgml
new file mode 100644 (file)
index 0000000..4d743c9
--- /dev/null
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
+<!ENTITY version SYSTEM "version.xml">
+]>
+<!--ENTITY index-Objects-Grouped SYSTEM "objects_grouped.sgml"-->
+<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
+  <bookinfo>
+    <title>GObject Introspection Reference Manual</title>
+  </bookinfo>
+
+  <chapter id="glib">
+    <title>GObject-Introspection Overview</title>
+    <para>
+Bla bla bla bla bla
+    </para>
+      <xi:include href="gi-overview.xml"/>
+<!--
+    &gi-building;
+-->
+  </chapter>
+
+<!--
+  <chapter id="tools">
+    <title>GObject Introspection Tools</title>
+
+    &g-ir-scanner;
+    &g-ir-compiler;
+    &g-ir-generator;
+  </chapter>
+-->
+
+  <part id="girepository">
+    <chapter id="gi-libgirepository">
+      <title>GIRepository</title>
+      <xi:include href="xml/girepository.xml"/>
+    </chapter>
+    <chapter id="gi-ffi">
+      <title>GIR Foreign functions interface</title>
+      <xi:include href="xml/girffi.xml"/>
+    </chapter>
+    <chapter id="gi-repository-structs">
+      <title>GIRepository structs</title>
+      <xi:include href="gi-struct-hierarchy.xml"/>
+      <xi:include href="xml/gibaseinfo.xml"/>
+      <xi:include href="xml/gifunctioninfo.xml"/>
+      <xi:include href="xml/gicallableinfo.xml"/>
+      <xi:include href="xml/giarginfo.xml"/>
+      <xi:include href="xml/gitypeinfo.xml"/>
+      <xi:include href="xml/gistructinfo.xml"/>
+      <xi:include href="xml/giunioninfo.xml"/>
+      <xi:include href="xml/gifieldinfo.xml"/>
+      <xi:include href="xml/gipropertyinfo.xml"/>
+      <xi:include href="xml/givfuncinfo.xml"/>
+      <xi:include href="xml/gisignalinfo.xml"/>
+      <xi:include href="xml/gienuminfo.xml"/>
+      <xi:include href="xml/giregisteredtypeinfo.xml"/>
+      <xi:include href="xml/giobjectinfo.xml"/>
+      <xi:include href="xml/giinterfaceinfo.xml"/>
+      <xi:include href="xml/giconstantinfo.xml"/>
+      <xi:include href="xml/gierrordomaininfo.xml"/>
+    </chapter>
+
+  </part>
+
+
+  <part id="gi-gir">
+    <title>GIR markup format</title>
+      <xi:include href="gi-gir-reference.xml" />
+<!--
+    &gi-gir-creating;
+    &gi-gir-parsing;
+    &gi-gir-verifying;
+-->
+  </part>
+
+  <chapter id="gi-typelib">
+    <title>Typelib binary format</title>
+    <xi:include href="xml/gtypelib.xml" />
+  </chapter>
+
+   <xi:include href="xml/annotation-glossary.xml" />
+</book>
diff --git a/docs/reference/gi-gir-reference.xml b/docs/reference/gi-gir-reference.xml
new file mode 100644 (file)
index 0000000..8d19112
--- /dev/null
@@ -0,0 +1,114 @@
+<chapter id="gi-gir-reference">
+
+  <title>The GIR XML format</title>
+
+  <para>
+    This chapter describes the GIR XML markup format.
+  </para>
+
+   <refsect2 id="gi-gir-api">
+     <title><emphasis>api</emphasis> node</title>
+
+     The root node of all GIR documents is the api node.
+
+     Possible children: <link linkend="gi-gir-namespace">namespace</link>.
+
+     <example>
+     <title>A GIR fragment showing an api node</title>
+     <programlisting><![CDATA[
+     <api version="1.0">
+       <namespace/>
+     </api>]]></programlisting>
+     </example>
+
+   </refsect2>
+
+   <refsect2 id="gi-gir-namespace">
+     <title><emphasis>namespace</emphasis> node</title>
+
+     Parent node: <link linkend="gi-gir-api">api</link>.
+     Possible children: <link linkend="gi-gir-callback">callback</link>,
+     <link linkend="gi-gir-class">class</link>,
+     <link linkend="gi-gir-function">function</link>.
+     <link linkend="gi-gir-interface">interface</link>.
+
+     <example>
+     <title>A GIR fragment showing an namespace node</title>
+     <programlisting><![CDATA[
+     <api version="1.0">
+       <namespace="Gtk">
+          <class/>
+          <function/>
+       </namespace>
+     </api>]]></programlisting>
+     </example>
+
+   </refsect2>
+
+   <refsect2 id="gi-gir-class">
+     <title><emphasis>class</emphasis> node</title>
+
+     Parent node: <link linkend="gi-gir-namespace">namespace</link>.
+     Possible children: <link linkend="gi-gir-class">constructor</link>,
+     <link linkend="gi-gir-field">field</link>,
+     <link linkend="gi-gir-method">method</link>,
+     <link linkend="gi-gir-property">property</link>.
+     <example>
+     <title>A GIR fragment showing an class node</title>
+     <programlisting><![CDATA[
+     <api version="1.0">
+       <namespace="Gtk">
+         <class name="Widget">
+            <constructor/>
+            <field/>
+            <method/>
+            <property/>
+         <class>
+       </namespace>
+     </api>]]></programlisting>
+     </example>
+
+   </refsect2>
+
+   <refsect2 id="gi-gir-interface">
+     <title><emphasis>interface</emphasis> node</title>
+
+     Parent node: <link linkend="gi-gir-namespace">namespace</link>.
+     Possible children: <link linkend="gi-gir-field">field</link>,
+     <link linkend="gi-gir-method">method</link>,
+     <link linkend="gi-gir-property">property</link>.
+     <example>
+     <title>A GIR fragment showing an interface node</title>
+     <programlisting><![CDATA[
+     <api version="1.0">
+       <namespace="Gtk">
+         <interface name="Buildable">
+            <field/>
+            <method/>
+            <property/>
+         <interface>
+       </namespace>
+     </api>]]></programlisting>
+     </example>
+
+   </refsect2>
+
+   <refsect2 id="gi-gir-function">
+     <title><emphasis>function</emphasis> node</title>
+
+     Parent node: <link linkend="gi-gir-namespace">namespace</link>.
+     <example>
+     <title>A GIR fragment showing an function node</title>
+     <programlisting><![CDATA[
+     <api version="1.0">
+       <namespace="Gtk">
+         <function name="init">
+         </function>
+       </namespace>
+     </api>]]></programlisting>
+     </example>
+
+   </refsect2>
+
+</chapter>
+
diff --git a/docs/reference/gi-gir.sgml b/docs/reference/gi-gir.sgml
new file mode 100644 (file)
index 0000000..590444f
--- /dev/null
@@ -0,0 +1,23 @@
+<chapter id="gi-gir-reference">
+
+  <title>The GIR XML format</title>
+
+  <para>
+    This chapter describes the GIR XML markup format.
+  </para>
+
+   <section id="gi-gir-api">
+      <title>API node</title>
+      
+      The root node of all GIR documents is the api node.
+
+      Attributes:
+      <itemizedlist>
+       <listitem><para>version</para></listitem>
+        The version of the GIR, currently the only known version is 1.0.
+      </itemizedlist>
+
+   </section>
+
+</chapter>
+
diff --git a/docs/reference/gi-overrides.txt b/docs/reference/gi-overrides.txt
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/docs/reference/gi-overview.xml b/docs/reference/gi-overview.xml
new file mode 100644 (file)
index 0000000..b624a88
--- /dev/null
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
+<!ENTITY version SYSTEM "version.xml">
+]>
+<!--ENTITY index-Objects-Grouped SYSTEM "objects_grouped.sgml"-->
+<refentry id="gi-overview">
+<refmeta>
+  <refentrytitle role="top_of_page" id="gi-overview.top_of_page">Introspection Overview</refentrytitle>
+  <manvolnum>3</manvolnum>
+  <refmiscinfo>GI Library</refmiscinfo>
+</refmeta>
+<refnamediv>
+  <refname>Overview</refname>
+  <refpurpose>General overview of introspection</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+The GObject-Introspection package contains of a few different parts:
+  <itemizedlist>
+    <listitem>
+      <para>The GIR XML format - an XML format describing the exported
+      C API including documentation
+      </para>
+    </listitem>
+    <listitem>
+      <para>The GTypelib format - a binary format optimized for fast disk access
+      and low memory usage
+      </para>
+    </listitem>
+    <listitem>
+      <para>g-ir-scanner - parses C source code and gtk-doc comments and
+      generates GIR XML files
+      </para>
+    </listitem>
+    <listitem>
+      <para>g-ir-compiler - compiles GIR XML files into typelibs
+      </para>
+    </listitem>
+    <listitem>
+      <para>libgirepository - library to access typelib from C
+      </para>
+    </listitem>
+  </itemizedlist>
+
+<para>A quick overview how the different components fits together:</para>
+
+<inlinegraphic fileref="overview.png" format="PNG"></inlinegraphic>
+
+</refsynopsisdiv>
+
+</refentry>
diff --git a/docs/reference/gi-sections.txt b/docs/reference/gi-sections.txt
new file mode 100644 (file)
index 0000000..7db8378
--- /dev/null
@@ -0,0 +1,369 @@
+<SECTION>
+<FILE>girepository</FILE>
+GICallbackInfo
+GIRepository
+GIRepositoryError
+GIRepositoryLoadFlags
+GITypelib
+g_irepository_get_default
+g_irepository_prepend_search_path
+g_irepository_get_search_path
+g_irepository_load_typelib
+g_irepository_is_registered
+g_irepository_find_by_name
+g_irepository_require
+g_irepository_require_private
+g_irepository_get_dependencies
+g_irepository_get_loaded_namespaces
+g_irepository_find_by_gtype
+g_irepository_get_n_infos
+g_irepository_get_info
+g_irepository_get_typelib_path
+g_irepository_get_shared_library
+g_irepository_get_version
+g_irepository_get_option_group
+g_irepository_get_c_prefix
+g_irepository_dump
+g_irepository_enumerate_versions
+G_IREPOSITORY_ERROR
+g_typelib_new_from_memory
+g_typelib_new_from_const_memory
+g_typelib_new_from_mapped_file
+g_typelib_free
+g_typelib_symbol
+g_typelib_get_namespace
+<SUBSECTION Standard>
+GIRepositoryClass
+G_TYPE_IREPOSITORY
+G_IREPOSITORY
+G_IREPOSITORY_CLASS
+G_IREPOSITORY_GET_CLASS
+G_IS_IREPOSITORY
+G_IS_IREPOSITORY_CLASS
+<SUBSECTION Private>
+g_info_new
+GIRepositoryPrivate
+g_irepository_get_type
+g_irepository_error_quark
+GIRealInfo
+GIUnresolvedInfo
+</SECTION>
+
+<SECTION>
+<FILE>gibaseinfo</FILE>
+GIInfoType
+g_info_type_to_string
+GIAttributeIter
+GIBaseInfo
+g_base_info_ref
+g_base_info_unref
+g_base_info_get_type
+g_base_info_get_name
+g_base_info_get_namespace
+g_base_info_is_deprecated
+g_base_info_get_attribute
+g_base_info_iterate_attributes
+g_base_info_get_container
+g_base_info_get_typelib
+g_base_info_equal
+<SUBSECTION Private>
+GIBaseInfoStub
+</SECTION>
+
+<SECTION>
+<FILE>gicallableinfo</FILE>
+GI_IS_CALLABLE_INFO
+GICallableInfo
+g_callable_info_get_return_type
+g_callable_info_get_caller_owns
+g_callable_info_may_return_null
+g_callable_info_get_return_attribute
+g_callable_info_iterate_return_attributes
+g_callable_info_get_n_args
+g_callable_info_get_arg
+g_callable_info_load_arg
+g_callable_info_load_return_type
+</SECTION>
+
+<SECTION>
+<FILE>giconstantinfo</FILE>
+GI_IS_CONSTANT_INFO
+GIConstantInfo
+g_constant_info_get_type
+g_constant_info_get_value
+</SECTION>
+
+<SECTION>
+<FILE>givfuncinfo</FILE>
+GI_IS_VFUNC_INFO
+GIVFuncInfo
+GIVFuncInfoFlags
+g_vfunc_info_get_flags
+g_vfunc_info_get_offset
+g_vfunc_info_get_signal
+g_vfunc_info_get_invoker
+</SECTION>
+
+<SECTION>
+<FILE>gisignalinfo</FILE>
+GI_IS_SIGNAL_INFO
+GISignalInfo
+g_signal_info_get_flags
+g_signal_info_get_class_closure
+g_signal_info_true_stops_emit
+</SECTION>
+
+<SECTION>
+<FILE>gipropertyinfo</FILE>
+GI_IS_PROPERTY_INFO
+GIPropertyInfo
+g_property_info_get_flags
+g_property_info_get_type
+g_property_info_get_ownership_transfer
+</SECTION>
+
+<SECTION>
+<FILE>giinterfaceinfo</FILE>
+GI_IS_INTERFACE_INFO
+GIInterfaceInfo
+g_interface_info_get_n_prerequisites
+g_interface_info_get_prerequisite
+g_interface_info_get_n_properties
+g_interface_info_get_property
+g_interface_info_get_n_methods
+g_interface_info_get_method
+g_interface_info_find_method
+g_interface_info_get_n_signals
+g_interface_info_get_signal
+g_interface_info_get_n_vfuncs
+g_interface_info_get_vfunc
+g_interface_info_get_n_constants
+g_interface_info_get_constant
+g_interface_info_get_iface_struct
+g_interface_info_find_vfunc
+</SECTION>
+
+<SECTION>
+<FILE>giobjectinfo</FILE>
+GI_IS_OBJECT_INFO
+GIObjectInfo
+GIObjectInfoGetValueFunction
+GIObjectInfoRefFunction
+GIObjectInfoSetValueFunction
+GIObjectInfoUnrefFunction
+g_object_info_get_type_name
+g_object_info_get_type_init
+g_object_info_get_abstract
+g_object_info_get_fundamental
+g_object_info_get_parent
+g_object_info_get_n_interfaces
+g_object_info_get_interface
+g_object_info_get_n_fields
+g_object_info_get_field
+g_object_info_get_n_properties
+g_object_info_get_property
+g_object_info_get_n_methods
+g_object_info_get_method
+g_object_info_find_method
+g_object_info_get_n_signals
+g_object_info_get_signal
+g_object_info_get_n_vfuncs
+g_object_info_get_vfunc
+g_object_info_get_n_constants
+g_object_info_get_constant
+g_object_info_get_class_struct
+g_object_info_find_vfunc
+g_object_info_get_unref_function
+g_object_info_get_unref_function_pointer
+g_object_info_get_ref_function
+g_object_info_get_ref_function_pointer
+g_object_info_get_set_value_function
+g_object_info_get_set_value_function_pointer
+g_object_info_get_get_value_function
+g_object_info_get_get_value_function_pointer
+</SECTION>
+
+<SECTION>
+<FILE>gienuminfo</FILE>
+GI_IS_ENUM_INFO
+GI_IS_VALUE_INFO
+GIEnumInfo
+GIValueInfo
+g_enum_info_get_n_values
+g_enum_info_get_value
+g_enum_info_get_n_methods
+g_enum_info_get_method
+g_enum_info_get_storage_type
+g_value_info_get_value
+</SECTION>
+
+<SECTION>
+<FILE>giregisteredtypeinfo</FILE>
+GI_IS_REGISTERED_TYPE_INFO
+GIRegisteredTypeInfo
+g_registered_type_info_get_type_name
+g_registered_type_info_get_type_init
+g_registered_type_info_get_g_type
+</SECTION>
+
+<SECTION>
+<FILE>gistructinfo</FILE>
+GI_IS_STRUCT_INFO
+GIStructInfo
+g_struct_info_get_n_fields
+g_struct_info_get_field
+g_struct_info_get_n_methods
+g_struct_info_get_method
+g_struct_info_find_method
+g_struct_info_get_size
+g_struct_info_get_alignment
+g_struct_info_is_gtype_struct
+g_struct_info_is_foreign
+</SECTION>
+
+<SECTION>
+<FILE>giunioninfo</FILE>
+GI_IS_UNION_INFO
+GIUnionInfo
+g_union_info_get_n_fields
+g_union_info_get_field
+g_union_info_get_n_methods
+g_union_info_get_method
+g_union_info_is_discriminated
+g_union_info_get_discriminator_offset
+g_union_info_get_discriminator_type
+g_union_info_get_discriminator
+g_union_info_find_method
+g_union_info_get_size
+g_union_info_get_alignment
+</SECTION>
+
+<SECTION>
+<FILE>gifieldinfo</FILE>
+GI_IS_FIELD_INFO
+GIFieldInfo
+GIFieldInfoFlags
+g_field_info_get_flags
+g_field_info_get_size
+g_field_info_get_offset
+g_field_info_get_type
+g_field_info_get_field
+g_field_info_set_field
+</SECTION>
+
+<SECTION>
+<FILE>giarginfo</FILE>
+GI_IS_ARG_INFO
+GIArgInfo
+GIDirection
+GIScopeType
+GITransfer
+g_arg_info_get_direction
+g_arg_info_is_caller_allocates
+g_arg_info_is_return_value
+g_arg_info_is_optional
+g_arg_info_may_be_null
+g_arg_info_get_ownership_transfer
+g_arg_info_get_scope
+g_arg_info_get_closure
+g_arg_info_get_destroy
+g_arg_info_get_type
+g_arg_info_load_type
+</SECTION>
+
+<SECTION>
+<FILE>gitypeinfo</FILE>
+GI_IS_TYPE_INFO
+GIArrayType
+GITypeInfo
+GITypeTag
+G_TYPE_TAG_IS_BASIC
+g_type_tag_to_string
+g_type_info_is_pointer
+g_type_info_get_tag
+g_type_info_get_param_type
+g_type_info_get_interface
+g_type_info_get_array_length
+g_type_info_get_array_fixed_size
+g_type_info_is_zero_terminated
+g_type_info_get_n_error_domains
+g_type_info_get_error_domain
+g_type_info_get_array_type
+</SECTION>
+
+<SECTION>
+<FILE>gifunctioninfo</FILE>
+GI_IS_FUNCTION_INFO
+GIFunctionInfo
+GInvokeError
+GIFunctionInfoFlags
+G_INVOKE_ERROR
+g_function_info_get_symbol
+g_function_info_get_flags
+g_function_info_get_property
+g_function_info_get_vfunc
+g_function_info_invoke
+<SUBSECTION Private>
+g_invoke_error_quark
+</SECTION>
+
+<SECTION>
+<FILE>gierrordomaininfo</FILE>
+GI_IS_ERROR_DOMAIN_INFO
+GIErrorDomainInfo
+g_error_domain_info_get_quark
+g_error_domain_info_get_codes
+</SECTION>
+
+<SECTION>
+<FILE>gtypelib</FILE>
+G_IR_MAGIC
+GTypelibBlobType
+Header
+DirEntry
+ArgBlob
+SignatureBlob
+CommonBlob
+FunctionBlob
+CallbackBlob
+InterfaceTypeBlob
+ParamTypeBlob
+ErrorTypeBlob
+ErrorDomainBlob
+ValueBlob
+FieldBlob
+RegisteredTypeBlob
+StructBlob
+UnionBlob
+EnumBlob
+PropertyBlob
+SignalBlob
+VFuncBlob
+ObjectBlob
+InterfaceBlob
+ConstantBlob
+AttributeBlob
+dimensions
+g_typelib_get_dir_entry
+g_typelib_check_sanity
+g_typelib_get_string
+GTypelibError
+G_TYPELIB_ERROR
+g_typelib_validate
+BLOB_IS_REGISTERED_TYPE
+<SUBSECTION Private>
+g_typelib_error_quark
+</SECTION>
+
+<SECTION>
+<FILE>girffi</FILE>
+GIFFIClosureCallback
+GIFunctionInvoker
+gi_cclosure_marshal_generic
+g_type_info_get_ffi_type
+g_function_info_prep_invoker
+g_function_invoker_destroy
+g_callable_info_prepare_closure
+g_callable_info_free_closure
+</SECTION>
+
diff --git a/docs/reference/gi-struct-hierarchy.xml b/docs/reference/gi-struct-hierarchy.xml
new file mode 100644 (file)
index 0000000..7b63c54
--- /dev/null
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
+<!ENTITY version SYSTEM "version.xml">
+]>
+<!--ENTITY index-Objects-Grouped SYSTEM "objects_grouped.sgml"-->
+<refentry id="gi-struct-hierarchy">
+<refmeta>
+  <refentrytitle role="top_of_page" id="gi-struct-hierarchy.top_of_page">Struct hierarchy</refentrytitle>
+  <manvolnum>3</manvolnum>
+  <refmiscinfo>GI Library</refmiscinfo>
+</refmeta>
+<refnamediv>
+  <refname>Struct hierarchy</refname>
+  <refpurpose>Struct hierarchy description for GIBaseInfo and all its sub structs</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv id="gi-struct-hierarchy.synopsis" role="synopsis">
+<title role="synopsis.title">Synopsis</title>
+
+<synopsis>
+* <link linkend="gi-GIBaseInfo">GIBaseInfo</link>
+  * <link linkend="gi-GICallableInfo">GICallableInfo</link>
+    * <link linkend="gi-GIFunctionInfo">GIFunctionInfo</link>
+    * <link linkend="gi-GISignalInfo">GISignalInfo</link>
+    * <link linkend="gi-GIVFuncInfo">GIVFuncInfo</link>
+  * <link linkend="gi-GIRegisteredTypeInfo">GIRegisteredTypeInfo</link>
+    * <link linkend="gi-GIEnumInfo">GIEnumInfo</link>
+    * <link linkend="gi-GIInterfaceInfo">GIInterfaceInfo</link>
+    * <link linkend="gi-GIObjectInfo">GIObjectInfo</link>
+    * <link linkend="gi-GIStructInfo">GIStructInfo</link>
+    * <link linkend="gi-GIUnionInfo">GIUnionInfo</link>
+  * <link linkend="gi-GIArgInfo">GIArgInfo</link>
+  * <link linkend="gi-GIConstantInfo">GIConstantInfo</link>
+  * <link linkend="gi-GIErrorDomainInfo">GIErrorDomainInfo</link>
+  * <link linkend="gi-GIFieldInfo">GIFieldInfo</link>
+  * <link linkend="gi-GIPropertyInfo">GIPropertyInfo</link>
+  * <link linkend="gi-GITypeInfo">GITypeInfo</link>
+</synopsis>
+
+</refsynopsisdiv>
+
+</refentry>
diff --git a/docs/reference/gi.types b/docs/reference/gi.types
new file mode 100644 (file)
index 0000000..3b4e9df
--- /dev/null
@@ -0,0 +1,2 @@
+g_irepository_get_type
+g_irepository_get_type
diff --git a/docs/reference/html/annotation-glossary.html b/docs/reference/html/annotation-glossary.html
new file mode 100644 (file)
index 0000000..580a758
--- /dev/null
@@ -0,0 +1,62 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Annotation Glossary</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="prev" href="gi-gtypelib.html" title="gtypelib">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="gi-gtypelib.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td> </td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td> </td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a class="shortcut" href="#glsO">O</a>
+                     Â | 
+                   <a class="shortcut" href="#glsA">A</a>
+                     Â | 
+                   <a class="shortcut" href="#glsE">E</a>
+                     Â | 
+                   <a class="shortcut" href="#glsT">T</a>
+</td></tr>
+</table>
+<div class="glossary">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="annotation-glossary"></a>Annotation Glossary</h2></div></div></div>
+<a name="glsO"></a><h3 class="title">O</h3>
+<dt>
+<a name="annotation-glossterm-out%20caller-allocates"></a>out caller-allocates</dt>
+<dd><p>Out parameter, where caller must allocate storage.</p></dd>
+<dt>
+<a name="annotation-glossterm-out"></a>out</dt>
+<dd><p>Parameter for returning results. Default is <acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>.</p></dd>
+<a name="glsA"></a><h3 class="title">A</h3>
+<dt>
+<a name="annotation-glossterm-allow-none"></a>allow-none</dt>
+<dd><p>NULL is ok, both for passing and for returning.</p></dd>
+<a name="glsE"></a><h3 class="title">E</h3>
+<dt>
+<a name="annotation-glossterm-element-type"></a>element-type</dt>
+<dd><p>Generics and defining elements of containers and arrays.</p></dd>
+<a name="glsT"></a><h3 class="title">T</h3>
+<dt>
+<a name="annotation-glossterm-transfer%20full"></a>transfer full</dt>
+<dd><p>Free data after the code is done.</p></dd>
+<dt>
+<a name="annotation-glossterm-transfer%20none"></a>transfer none</dt>
+<dd><p>Don't free data after the code is done.</p></dd>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi-GIArgInfo.html b/docs/reference/html/gi-GIArgInfo.html
new file mode 100644 (file)
index 0000000..a0cb293
--- /dev/null
@@ -0,0 +1,494 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GIArgInfo</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="gi-repository-structs.html" title="GIRepository structs">
+<link rel="prev" href="gi-GICallableInfo.html" title="GICallableInfo">
+<link rel="next" href="gi-GITypeInfo.html" title="GITypeInfo">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="gi-GICallableInfo.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="gi-repository-structs.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="gi-GITypeInfo.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#gi-GIArgInfo.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#gi-GIArgInfo.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry">
+<a name="gi-GIArgInfo"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="gi-GIArgInfo.top_of_page"></a>GIArgInfo</span></h2>
+<p>GIArgInfo â€” Struct representing an argument</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<a name="gi-GIArgInfo.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">#define             <a class="link" href="gi-GIArgInfo.html#GI-IS-ARG-INFO:CAPS" title="GI_IS_ARG_INFO()">GI_IS_ARG_INFO</a>                      (info)
+typedef             <a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo">GIArgInfo</a>;
+enum                <a class="link" href="gi-GIArgInfo.html#GIDirection" title="enum GIDirection">GIDirection</a>;
+enum                <a class="link" href="gi-GIArgInfo.html#GIScopeType" title="enum GIScopeType">GIScopeType</a>;
+enum                <a class="link" href="gi-GIArgInfo.html#GITransfer" title="enum GITransfer">GITransfer</a>;
+<a class="link" href="gi-GIArgInfo.html#GIDirection" title="enum GIDirection"><span class="returnvalue">GIDirection</span></a>         <a class="link" href="gi-GIArgInfo.html#g-arg-info-get-direction" title="g_arg_info_get_direction ()">g_arg_info_get_direction</a>            (<em class="parameter"><code><a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a> *info</code></em>);
+<span class="returnvalue">gboolean</span>            <a class="link" href="gi-GIArgInfo.html#g-arg-info-is-caller-allocates" title="g_arg_info_is_caller_allocates ()">g_arg_info_is_caller_allocates</a>      (<em class="parameter"><code><a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a> *info</code></em>);
+<span class="returnvalue">gboolean</span>            <a class="link" href="gi-GIArgInfo.html#g-arg-info-is-return-value" title="g_arg_info_is_return_value ()">g_arg_info_is_return_value</a>          (<em class="parameter"><code><a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a> *info</code></em>);
+<span class="returnvalue">gboolean</span>            <a class="link" href="gi-GIArgInfo.html#g-arg-info-is-optional" title="g_arg_info_is_optional ()">g_arg_info_is_optional</a>              (<em class="parameter"><code><a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a> *info</code></em>);
+<span class="returnvalue">gboolean</span>            <a class="link" href="gi-GIArgInfo.html#g-arg-info-may-be-null" title="g_arg_info_may_be_null ()">g_arg_info_may_be_null</a>              (<em class="parameter"><code><a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIArgInfo.html#GITransfer" title="enum GITransfer"><span class="returnvalue">GITransfer</span></a>          <a class="link" href="gi-GIArgInfo.html#g-arg-info-get-ownership-transfer" title="g_arg_info_get_ownership_transfer ()">g_arg_info_get_ownership_transfer</a>   (<em class="parameter"><code><a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIArgInfo.html#GIScopeType" title="enum GIScopeType"><span class="returnvalue">GIScopeType</span></a>         <a class="link" href="gi-GIArgInfo.html#g-arg-info-get-scope" title="g_arg_info_get_scope ()">g_arg_info_get_scope</a>                (<em class="parameter"><code><a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a> *info</code></em>);
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GIArgInfo.html#g-arg-info-get-closure" title="g_arg_info_get_closure ()">g_arg_info_get_closure</a>              (<em class="parameter"><code><a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a> *info</code></em>);
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GIArgInfo.html#g-arg-info-get-destroy" title="g_arg_info_get_destroy ()">g_arg_info_get_destroy</a>              (<em class="parameter"><code><a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="returnvalue">GITypeInfo</span></a> *        <a class="link" href="gi-GIArgInfo.html#g-arg-info-get-type" title="g_arg_info_get_type ()">g_arg_info_get_type</a>                 (<em class="parameter"><code><a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a> *info</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="gi-GIArgInfo.html#g-arg-info-load-type" title="g_arg_info_load_type ()">g_arg_info_load_type</a>                (<em class="parameter"><code><a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a> *type</code></em>);
+</pre>
+</div>
+<div class="refsect1">
+<a name="gi-GIArgInfo.description"></a><h2>Description</h2>
+<p>
+GIArgInfo represents an argument. An argument is always
+part of a <a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a>.
+</p>
+<p>
+</p>
+<div class="refsect1">
+<a name="gi-giarginfo.struct-hierarchy"></a><h2>Struct hierarchy</h2>
+<pre class="synopsis">
+  <a class="link" href="gi-GIBaseInfo.html" title="GIBaseInfo">GIBaseInfo</a>
+   +----GIArgInfo
+</pre>
+</div>
+<p>
+</p>
+</div>
+<div class="refsect1">
+<a name="gi-GIArgInfo.details"></a><h2>Details</h2>
+<div class="refsect2">
+<a name="GI-IS-ARG-INFO:CAPS"></a><h3>GI_IS_ARG_INFO()</h3>
+<pre class="programlisting">#define             GI_IS_ARG_INFO(info)</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIArgInfo"></a><h3>GIArgInfo</h3>
+<pre class="programlisting">typedef GIBaseInfo GIArgInfo;
+</pre>
+<p>
+Represents an argument.
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIDirection"></a><h3>enum GIDirection</h3>
+<pre class="programlisting">typedef enum {
+  GI_DIRECTION_IN,
+  GI_DIRECTION_OUT,
+  GI_DIRECTION_INOUT
+} GIDirection;
+</pre>
+<p>
+The direction of a <a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><a name="GI-DIRECTION-IN:CAPS"></a><span class="term"><code class="literal">GI_DIRECTION_IN</code></span></p></td>
+<td>in argument.
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-DIRECTION-OUT:CAPS"></a><span class="term"><code class="literal">GI_DIRECTION_OUT</code></span></p></td>
+<td>out argument.
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-DIRECTION-INOUT:CAPS"></a><span class="term"><code class="literal">GI_DIRECTION_INOUT</code></span></p></td>
+<td>in and out argument.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIScopeType"></a><h3>enum GIScopeType</h3>
+<pre class="programlisting">typedef enum {
+  GI_SCOPE_TYPE_INVALID,
+  GI_SCOPE_TYPE_CALL,
+  GI_SCOPE_TYPE_ASYNC,
+  GI_SCOPE_TYPE_NOTIFIED
+} GIScopeType;
+</pre>
+<p>
+Scope type of a <a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a> representing callback, determines how the
+callback is invoked and is used to decided when the invoke structs
+can be freed.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><a name="GI-SCOPE-TYPE-INVALID:CAPS"></a><span class="term"><code class="literal">GI_SCOPE_TYPE_INVALID</code></span></p></td>
+<td>The argument is not of callback type.
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-SCOPE-TYPE-CALL:CAPS"></a><span class="term"><code class="literal">GI_SCOPE_TYPE_CALL</code></span></p></td>
+<td>The callback and associated user_data is only
+used during the call to this function.
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-SCOPE-TYPE-ASYNC:CAPS"></a><span class="term"><code class="literal">GI_SCOPE_TYPE_ASYNC</code></span></p></td>
+<td>The callback and associated user_data is
+only used until the callback is invoked, and the callback.
+is invoked always exactly once.
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-SCOPE-TYPE-NOTIFIED:CAPS"></a><span class="term"><code class="literal">GI_SCOPE_TYPE_NOTIFIED</code></span></p></td>
+<td>The callback and and associated
+user_data is used until the caller is notfied via the destroy_notify.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GITransfer"></a><h3>enum GITransfer</h3>
+<pre class="programlisting">typedef enum {
+  GI_TRANSFER_NOTHING,
+  GI_TRANSFER_CONTAINER,
+  GI_TRANSFER_EVERYTHING
+} GITransfer;
+</pre>
+<p>
+The transfer is the exchange of data between two parts, from the callee to
+the caller. The callee is either a function/method/signal or an
+object/interface where a property is defined. The caller is the side
+accessing a property or calling a function.
+<a class="link" href="gi-GIArgInfo.html#GITransfer" title="enum GITransfer"><span class="type">GITransfer</span></a> specifies who's responsible for freeing the resources after the
+ownership transfer is complete. In case of a containing type such as a list,
+an array or a hash table the container itself is specified differently from
+the items within the container itself. Each container is freed differently,
+check the documentation for the types themselves for information on how to
+free them.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><a name="GI-TRANSFER-NOTHING:CAPS"></a><span class="term"><code class="literal">GI_TRANSFER_NOTHING</code></span></p></td>
+<td>transfer nothing from the callee (function or the type
+instance the property belongs to) to the caller. The callee retains the
+ownership of the transfer and the caller doesn't need to do anything to free
+up the resources of this transfer.
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-TRANSFER-CONTAINER:CAPS"></a><span class="term"><code class="literal">GI_TRANSFER_CONTAINER</code></span></p></td>
+<td>transfer the container (list, array, hash table) from
+the callee to the caller. The callee retains the ownership of the individual
+items in the container and the caller has to free up the container resources
+(<code class="function">g_list_free()</code>/<code class="function">g_hash_table_destroy()</code> etc) of this transfer.
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-TRANSFER-EVERYTHING:CAPS"></a><span class="term"><code class="literal">GI_TRANSFER_EVERYTHING</code></span></p></td>
+<td>transfer everything, eg the container and its
+contents from the callee to the caller. This is the case when the callee
+creates a copy of all the data it returns. The caller is responsible for
+cleaning up the container and item resources of this transfer.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-arg-info-get-direction"></a><h3>g_arg_info_get_direction ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIArgInfo.html#GIDirection" title="enum GIDirection"><span class="returnvalue">GIDirection</span></a>         g_arg_info_get_direction            (<em class="parameter"><code><a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the direction of the argument. Check <a class="link" href="gi-GIArgInfo.html#GIDirection" title="enum GIDirection"><span class="type">GIDirection</span></a> for possible
+direction values.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the direction</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-arg-info-is-caller-allocates"></a><h3>g_arg_info_is_caller_allocates ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>            g_arg_info_is_caller_allocates      (<em class="parameter"><code><a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain if the argument is a pointer to a struct or object that will
+receive an output of a function.  The default assumption for
+<a class="link" href="gi-GIArgInfo.html#GI-DIRECTION-OUT:CAPS"><code class="literal">GI_DIRECTION_OUT</code></a> arguments which have allocation is that the
+callee allocates; if this is <code class="literal">TRUE</code>, then the caller must allocate.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></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 caller is required to have allocated the argument</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-arg-info-is-return-value"></a><h3>g_arg_info_is_return_value ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>            g_arg_info_is_return_value          (<em class="parameter"><code><a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain if the argument is a return value. It can either be a
+parameter or a return value.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></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 it is a return value</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-arg-info-is-optional"></a><h3>g_arg_info_is_optional ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>            g_arg_info_is_optional              (<em class="parameter"><code><a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain if the argument is optional.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></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 it is an optional argument</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-arg-info-may-be-null"></a><h3>g_arg_info_may_be_null ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>            g_arg_info_may_be_null              (<em class="parameter"><code><a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain if the argument accepts <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></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 it accepts <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-arg-info-get-ownership-transfer"></a><h3>g_arg_info_get_ownership_transfer ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIArgInfo.html#GITransfer" title="enum GITransfer"><span class="returnvalue">GITransfer</span></a>          g_arg_info_get_ownership_transfer   (<em class="parameter"><code><a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the ownership transfer for this argument.
+<a class="link" href="gi-GIArgInfo.html#GITransfer" title="enum GITransfer"><span class="type">GITransfer</span></a> contains a list of possible values.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the transfer</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-arg-info-get-scope"></a><h3>g_arg_info_get_scope ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIArgInfo.html#GIScopeType" title="enum GIScopeType"><span class="returnvalue">GIScopeType</span></a>         g_arg_info_get_scope                (<em class="parameter"><code><a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the scope type for this argument. The scope type explains
+how a callback is going to be invoked, most importantly when
+the resources required to invoke it can be freed.
+<a class="link" href="gi-GIArgInfo.html#GIScopeType" title="enum GIScopeType"><span class="type">GIScopeType</span></a> contains a list of possible values.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the scope type</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-arg-info-get-closure"></a><h3>g_arg_info_get_closure ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_arg_info_get_closure              (<em class="parameter"><code><a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the index of the user data argument. This is only valid
+for arguments which are callbacks.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>index of the user data argument or -1 if there is none</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-arg-info-get-destroy"></a><h3>g_arg_info_get_destroy ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_arg_info_get_destroy              (<em class="parameter"><code><a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtains the index of the <span class="type">GDestroyNotify</span> argument. This is only valid
+for arguments which are callbacks.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>index of the <span class="type">GDestroyNotify</span> argument or -1 if there is none</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-arg-info-get-type"></a><h3>g_arg_info_get_type ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="returnvalue">GITypeInfo</span></a> *        g_arg_info_get_type                 (<em class="parameter"><code><a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the type information for <em class="parameter"><code>info</code></em>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a>, free it with
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-arg-info-load-type"></a><h3>g_arg_info_load_type ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                g_arg_info_load_type                (<em class="parameter"><code><a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a> *type</code></em>);</pre>
+<p>
+Obtain information about a the type of given argument <em class="parameter"><code>info</code></em>; this
+function is a variant of <a class="link" href="gi-GIArgInfo.html#g-arg-info-get-type" title="g_arg_info_get_type ()"><code class="function">g_arg_info_get_type()</code></a> designed for stack
+allocation.
+</p>
+<p>
+The initialized <em class="parameter"><code>type</code></em> must not be referenced after <em class="parameter"><code>info</code></em> is deallocated.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
+<td>Initialized with information about type of <em class="parameter"><code>info</code></em>. <span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi-GIBaseInfo.html b/docs/reference/html/gi-GIBaseInfo.html
new file mode 100644 (file)
index 0000000..33e9c3a
--- /dev/null
@@ -0,0 +1,636 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GIBaseInfo</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="gi-repository-structs.html" title="GIRepository structs">
+<link rel="prev" href="gi-struct-hierarchy.html" title="Struct hierarchy">
+<link rel="next" href="gi-GIFunctionInfo.html" title="GIFunctionInfo">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="gi-struct-hierarchy.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="gi-repository-structs.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="gi-GIFunctionInfo.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#gi-GIBaseInfo.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#gi-GIBaseInfo.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry">
+<a name="gi-GIBaseInfo"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="gi-GIBaseInfo.top_of_page"></a>GIBaseInfo</span></h2>
+<p>GIBaseInfo â€” Base struct for all GITypelib structs</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<a name="gi-GIBaseInfo.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">enum                <a class="link" href="gi-GIBaseInfo.html#GIInfoType" title="enum GIInfoType">GIInfoType</a>;
+const <span class="returnvalue">gchar</span> *       <a class="link" href="gi-GIBaseInfo.html#g-info-type-to-string" title="g_info_type_to_string ()">g_info_type_to_string</a>               (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIInfoType" title="enum GIInfoType"><span class="type">GIInfoType</span></a> type</code></em>);
+                    <a class="link" href="gi-GIBaseInfo.html#GIAttributeIter" title="GIAttributeIter">GIAttributeIter</a>;
+typedef             <a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo">GIBaseInfo</a>;
+<a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="returnvalue">GIBaseInfo</span></a> *        <a class="link" href="gi-GIBaseInfo.html#g-base-info-ref" title="g_base_info_ref ()">g_base_info_ref</a>                     (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()">g_base_info_unref</a>                   (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIBaseInfo.html#GIInfoType" title="enum GIInfoType"><span class="returnvalue">GIInfoType</span></a>          <a class="link" href="gi-GIBaseInfo.html#g-base-info-get-type" title="g_base_info_get_type ()">g_base_info_get_type</a>                (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);
+const <span class="returnvalue">gchar</span> *       <a class="link" href="gi-GIBaseInfo.html#g-base-info-get-name" title="g_base_info_get_name ()">g_base_info_get_name</a>                (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);
+const <span class="returnvalue">gchar</span> *       <a class="link" href="gi-GIBaseInfo.html#g-base-info-get-namespace" title="g_base_info_get_namespace ()">g_base_info_get_namespace</a>           (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);
+<span class="returnvalue">gboolean</span>            <a class="link" href="gi-GIBaseInfo.html#g-base-info-is-deprecated" title="g_base_info_is_deprecated ()">g_base_info_is_deprecated</a>           (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);
+const <span class="returnvalue">gchar</span> *       <a class="link" href="gi-GIBaseInfo.html#g-base-info-get-attribute" title="g_base_info_get_attribute ()">g_base_info_get_attribute</a>           (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);
+<span class="returnvalue">gboolean</span>            <a class="link" href="gi-GIBaseInfo.html#g-base-info-iterate-attributes" title="g_base_info_iterate_attributes ()">g_base_info_iterate_attributes</a>      (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIAttributeIter" title="GIAttributeIter"><span class="type">GIAttributeIter</span></a> *iterator</code></em>,
+                                                         <em class="parameter"><code><span class="type">char</span> **name</code></em>,
+                                                         <em class="parameter"><code><span class="type">char</span> **value</code></em>);
+<a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="returnvalue">GIBaseInfo</span></a> *        <a class="link" href="gi-GIBaseInfo.html#g-base-info-get-container" title="g_base_info_get_container ()">g_base_info_get_container</a>           (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);
+<a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="returnvalue">GITypelib</span></a> *         <a class="link" href="gi-GIBaseInfo.html#g-base-info-get-typelib" title="g_base_info_get_typelib ()">g_base_info_get_typelib</a>             (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);
+<span class="returnvalue">gboolean</span>            <a class="link" href="gi-GIBaseInfo.html#g-base-info-equal" title="g_base_info_equal ()">g_base_info_equal</a>                   (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info1</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info2</code></em>);
+</pre>
+</div>
+<div class="refsect1">
+<a name="gi-GIBaseInfo.description"></a><h2>Description</h2>
+<p>
+GIBaseInfo is the common base struct of all other *Info structs
+accessible through the <a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> API.
+All other structs can be casted to a <a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a>, for instance:
+</p>
+<div class="example">
+<a name="id530107"></a><p class="title"><b>Example 1. Casting a <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a> to <a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a></b></p>
+<div class="example-contents">
+  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
+    <tbody>
+      <tr>
+        <td class="listing_lines" align="right"><pre>1
+2</pre></td>
+        <td class="listing_code"><pre class="programlisting"><span class="usertype">GIFunctionInfo</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">function_info </span><span class="symbol">=</span><span class="normal"> </span><span class="symbol">...;</span>
+<span class="usertype">GIBaseInfo</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">info </span><span class="symbol">=</span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="gi-GIBaseInfo.html#GIBaseInfo">GIBaseInfo</a></span><span class="symbol">*)</span><span class="normal">function_info</span><span class="symbol">;</span></pre></td>
+      </tr>
+    </tbody>
+  </table>
+</div>
+
+</div>
+<p><br class="example-break">
+Most <a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> APIs returning a <a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> is actually creating a new struct, in other
+words, <a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> has to be called when done accessing the data.
+GIBaseInfos are normally accessed by calling either
+<a class="link" href="gi-girepository.html#g-irepository-find-by-name" title="g_irepository_find_by_name ()"><code class="function">g_irepository_find_by_name()</code></a>, <a class="link" href="gi-girepository.html#g-irepository-find-by-gtype" title="g_irepository_find_by_gtype ()"><code class="function">g_irepository_find_by_gtype()</code></a> or <a class="link" href="gi-girepository.html#g-irepository-get-info" title="g_irepository_get_info ()"><code class="function">g_irepository_get_info()</code></a>.
+</p>
+<p>
+</p>
+<div class="example">
+<a name="id520533"></a><p class="title"><b>Example 2. Getting the Button of the Gtk typelib</b></p>
+<div class="example-contents">
+  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
+    <tbody>
+      <tr>
+        <td class="listing_lines" align="right"><pre>1
+2
+3</pre></td>
+        <td class="listing_code"><pre class="programlisting"><span class="usertype">GIBaseInfo</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">button_info </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="gi-girepository.html#g-irepository-find-by-name">g_irepository_find_by_name</a></span><span class="symbol">(</span><span class="normal"><a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS">NULL</a></span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Gtk"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Button"</span><span class="symbol">);</span>
+<span class="symbol">...</span><span class="normal"> </span><span class="usertype">use</span><span class="normal"> button_info </span><span class="symbol">...</span>
+<span class="function"><a href="gi-GIBaseInfo.html#g-base-info-unref">g_base_info_unref</a></span><span class="symbol">(</span><span class="normal">button_info</span><span class="symbol">);</span></pre></td>
+      </tr>
+    </tbody>
+  </table>
+</div>
+
+</div>
+<p><br class="example-break">
+</p>
+<p>
+</p>
+<div class="refsect1">
+<a name="gi-gibaseinfo.struct-hierarchy"></a><h2>Struct hierarchy</h2>
+<pre class="synopsis">
+  GIBaseInfo
+   +----<a class="link" href="gi-GIArgInfo.html" title="GIArgInfo">GIArgInfo</a>
+   +----<a class="link" href="gi-GICallableInfo.html" title="GICallableInfo">GICallableInfo</a>
+   +----<a class="link" href="gi-GIConstantInfo.html" title="GIConstantInfo">GIConstantInfo</a>
+   +----<a class="link" href="gi-GIFieldInfo.html" title="GIFieldInfo">GIFieldInfo</a>
+   +----<a class="link" href="gi-GIPropertyInfo.html" title="GIPropertyInfo">GIPropertyInfo</a>
+   +----<a class="link" href="gi-GIRegisteredTypeInfo.html" title="GIRegisteredTypeInfo">GIRegisteredTypeInfo</a>
+   +----<a class="link" href="gi-GITypeInfo.html" title="GITypeInfo">GITypeInfo</a>
+</pre>
+</div>
+<p>
+</p>
+</div>
+<div class="refsect1">
+<a name="gi-GIBaseInfo.details"></a><h2>Details</h2>
+<div class="refsect2">
+<a name="GIInfoType"></a><h3>enum GIInfoType</h3>
+<pre class="programlisting">typedef enum {
+  GI_INFO_TYPE_INVALID,
+  GI_INFO_TYPE_FUNCTION,
+  GI_INFO_TYPE_CALLBACK,
+  GI_INFO_TYPE_STRUCT,
+  GI_INFO_TYPE_BOXED,
+  GI_INFO_TYPE_ENUM,         /*  5 */
+  GI_INFO_TYPE_FLAGS,
+  GI_INFO_TYPE_OBJECT,
+  GI_INFO_TYPE_INTERFACE,
+  GI_INFO_TYPE_CONSTANT,
+  GI_INFO_TYPE_INVALID_0,    /* 10 */  /** DELETED - used to be ERROR_DOMAIN **/
+  GI_INFO_TYPE_UNION,
+  GI_INFO_TYPE_VALUE,
+  GI_INFO_TYPE_SIGNAL,
+  GI_INFO_TYPE_VFUNC,
+  GI_INFO_TYPE_PROPERTY,     /* 15 */
+  GI_INFO_TYPE_FIELD,
+  GI_INFO_TYPE_ARG,
+  GI_INFO_TYPE_TYPE,
+  GI_INFO_TYPE_UNRESOLVED
+} GIInfoType;
+</pre>
+<p>
+The type of a GIBaseInfo struct.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><a name="GI-INFO-TYPE-INVALID:CAPS"></a><span class="term"><code class="literal">GI_INFO_TYPE_INVALID</code></span></p></td>
+<td>invalid type
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-INFO-TYPE-FUNCTION:CAPS"></a><span class="term"><code class="literal">GI_INFO_TYPE_FUNCTION</code></span></p></td>
+<td>function, see <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-INFO-TYPE-CALLBACK:CAPS"></a><span class="term"><code class="literal">GI_INFO_TYPE_CALLBACK</code></span></p></td>
+<td>callback, see <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-INFO-TYPE-STRUCT:CAPS"></a><span class="term"><code class="literal">GI_INFO_TYPE_STRUCT</code></span></p></td>
+<td>struct, see <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-INFO-TYPE-BOXED:CAPS"></a><span class="term"><code class="literal">GI_INFO_TYPE_BOXED</code></span></p></td>
+<td>boxed, see <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> or <a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-INFO-TYPE-ENUM:CAPS"></a><span class="term"><code class="literal">GI_INFO_TYPE_ENUM</code></span></p></td>
+<td>enum, see <a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo"><span class="type">GIEnumInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-INFO-TYPE-FLAGS:CAPS"></a><span class="term"><code class="literal">GI_INFO_TYPE_FLAGS</code></span></p></td>
+<td>flags, see <a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo"><span class="type">GIEnumInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-INFO-TYPE-OBJECT:CAPS"></a><span class="term"><code class="literal">GI_INFO_TYPE_OBJECT</code></span></p></td>
+<td>object, see <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-INFO-TYPE-INTERFACE:CAPS"></a><span class="term"><code class="literal">GI_INFO_TYPE_INTERFACE</code></span></p></td>
+<td>interface, see <a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-INFO-TYPE-CONSTANT:CAPS"></a><span class="term"><code class="literal">GI_INFO_TYPE_CONSTANT</code></span></p></td>
+<td>contant, see <a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo"><span class="type">GIConstantInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-INFO-TYPE-INVALID-0:CAPS"></a><span class="term"><code class="literal">GI_INFO_TYPE_INVALID_0</code></span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><a name="GI-INFO-TYPE-UNION:CAPS"></a><span class="term"><code class="literal">GI_INFO_TYPE_UNION</code></span></p></td>
+<td>union, see <a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-INFO-TYPE-VALUE:CAPS"></a><span class="term"><code class="literal">GI_INFO_TYPE_VALUE</code></span></p></td>
+<td>enum value, see <a class="link" href="gi-GIEnumInfo.html#GIValueInfo" title="GIValueInfo"><span class="type">GIValueInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-INFO-TYPE-SIGNAL:CAPS"></a><span class="term"><code class="literal">GI_INFO_TYPE_SIGNAL</code></span></p></td>
+<td>signal, see <a class="link" href="gi-GISignalInfo.html#GISignalInfo" title="GISignalInfo"><span class="type">GISignalInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-INFO-TYPE-VFUNC:CAPS"></a><span class="term"><code class="literal">GI_INFO_TYPE_VFUNC</code></span></p></td>
+<td>virtual function, see <a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-INFO-TYPE-PROPERTY:CAPS"></a><span class="term"><code class="literal">GI_INFO_TYPE_PROPERTY</code></span></p></td>
+<td>GObject property, see <a class="link" href="gi-GIPropertyInfo.html#GIPropertyInfo" title="GIPropertyInfo"><span class="type">GIPropertyInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-INFO-TYPE-FIELD:CAPS"></a><span class="term"><code class="literal">GI_INFO_TYPE_FIELD</code></span></p></td>
+<td>struct or union field, see <a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="type">GIFieldInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-INFO-TYPE-ARG:CAPS"></a><span class="term"><code class="literal">GI_INFO_TYPE_ARG</code></span></p></td>
+<td>argument of a function or callback, see <a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-INFO-TYPE-TYPE:CAPS"></a><span class="term"><code class="literal">GI_INFO_TYPE_TYPE</code></span></p></td>
+<td>type information, see <a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-INFO-TYPE-UNRESOLVED:CAPS"></a><span class="term"><code class="literal">GI_INFO_TYPE_UNRESOLVED</code></span></p></td>
+<td>unresolved type, a type which is not present in
+the typelib, or any of its dependencies.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-info-type-to-string"></a><h3>g_info_type_to_string ()</h3>
+<pre class="programlisting">const <span class="returnvalue">gchar</span> *       g_info_type_to_string               (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIInfoType" title="enum GIInfoType"><span class="type">GIInfoType</span></a> type</code></em>);</pre>
+<p>
+Obtain a string representation of <em class="parameter"><code>type</code></em>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
+<td>the info type</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the string</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIAttributeIter"></a><h3>GIAttributeIter</h3>
+<pre class="programlisting">typedef struct {
+} GIAttributeIter;
+</pre>
+<p>
+An opaque structure used to iterate over attributes
+in a <a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> struct.
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIBaseInfo"></a><h3>GIBaseInfo</h3>
+<pre class="programlisting">typedef struct _GIBaseInfoStub GIBaseInfo;
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-base-info-ref"></a><h3>g_base_info_ref ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="returnvalue">GIBaseInfo</span></a> *        g_base_info_ref                     (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);</pre>
+<p>
+Increases the reference count of <em class="parameter"><code>info</code></em>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the same <em class="parameter"><code>info</code></em>.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-base-info-unref"></a><h3>g_base_info_unref ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                g_base_info_unref                   (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);</pre>
+<p>
+Decreases the reference count of <em class="parameter"><code>info</code></em>. When its reference count
+drops to 0, the info is freed.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-base-info-get-type"></a><h3>g_base_info_get_type ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIBaseInfo.html#GIInfoType" title="enum GIInfoType"><span class="returnvalue">GIInfoType</span></a>          g_base_info_get_type                (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the info type of the GIBaseInfo.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the info type of <em class="parameter"><code>info</code></em>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-base-info-get-name"></a><h3>g_base_info_get_name ()</h3>
+<pre class="programlisting">const <span class="returnvalue">gchar</span> *       g_base_info_get_name                (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the name of the <em class="parameter"><code>info</code></em>. What the name represents depends on
+the <a class="link" href="gi-GIBaseInfo.html#GIInfoType" title="enum GIInfoType"><span class="type">GIInfoType</span></a> of the <em class="parameter"><code>info</code></em>. For instance for <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a> it is
+the name of the function.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the name of <em class="parameter"><code>info</code></em> or <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if it lacks a name.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-base-info-get-namespace"></a><h3>g_base_info_get_namespace ()</h3>
+<pre class="programlisting">const <span class="returnvalue">gchar</span> *       g_base_info_get_namespace           (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the namespace of <em class="parameter"><code>info</code></em>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the namespace</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-base-info-is-deprecated"></a><h3>g_base_info_is_deprecated ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>            g_base_info_is_deprecated           (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain whether the <em class="parameter"><code>info</code></em> is represents a metadata which is
+deprecated or not.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></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 deprecated</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-base-info-get-attribute"></a><h3>g_base_info_get_attribute ()</h3>
+<pre class="programlisting">const <span class="returnvalue">gchar</span> *       g_base_info_get_attribute           (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
+<p>
+Retrieve an arbitrary attribute associated with this node.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>a freeform string naming an attribute</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>The value of the attribute, or <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if no such attribute exists</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-base-info-iterate-attributes"></a><h3>g_base_info_iterate_attributes ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>            g_base_info_iterate_attributes      (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIAttributeIter" title="GIAttributeIter"><span class="type">GIAttributeIter</span></a> *iterator</code></em>,
+                                                         <em class="parameter"><code><span class="type">char</span> **name</code></em>,
+                                                         <em class="parameter"><code><span class="type">char</span> **value</code></em>);</pre>
+<p>
+Iterate over all attributes associated with this node.  The iterator
+structure is typically stack allocated, and must have its first
+member initialized to <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>.
+</p>
+<p>
+Both the <em class="parameter"><code>name</code></em> and <em class="parameter"><code>value</code></em> should be treated as constants
+and must not be freed.
+</p>
+<p>
+</p>
+<div class="example">
+<a name="id523953"></a><p class="title"><b>Example 3. Iterating over attributes</b></p>
+<div class="example-contents">
+  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
+    <tbody>
+      <tr>
+        <td class="listing_lines" align="right"><pre>1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11</pre></td>
+        <td class="listing_code"><pre class="programlisting"><span class="type">void</span>
+<span class="function">print_attributes</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GIBaseInfo</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">info</span><span class="symbol">)</span>
+<span class="cbracket">{</span>
+<span class="normal">  </span><span class="usertype">GIAttributeIter</span><span class="normal"> iter </span><span class="symbol">=</span><span class="normal"> </span><span class="cbracket">{</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="cbracket">}</span><span class="symbol">;</span>
+<span class="normal">  </span><span class="type">char</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">name</span><span class="symbol">;</span>
+<span class="normal">  </span><span class="type">char</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">value</span><span class="symbol">;</span>
+<span class="normal">  </span><span class="keyword">while</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="gi-GIBaseInfo.html#g-base-info-iterate-attributes">g_base_info_iterate_attributes</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">info</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">iter</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">name</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">value</span><span class="symbol">))</span>
+<span class="normal">    </span><span class="cbracket">{</span>
+<span class="normal">      </span><span class="function">g_print</span><span class="normal"> </span><span class="symbol">(</span><span class="string">"attribute name: %s value: %s"</span><span class="symbol">,</span><span class="normal"> name</span><span class="symbol">,</span><span class="normal"> value</span><span class="symbol">);</span>
+<span class="normal">    </span><span class="cbracket">}</span>
+<span class="cbracket">}</span></pre></td>
+      </tr>
+    </tbody>
+  </table>
+</div>
+
+</div>
+<p><br class="example-break">
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>iterator</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIBaseInfo.html#GIAttributeIter" title="GIAttributeIter"><span class="type">GIAttributeIter</span></a> structure, must be initialized; see below</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>Returned name, must not be freed. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>Returned name, must not be freed. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
+</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 there are more attributes</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-base-info-get-container"></a><h3>g_base_info_get_container ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="returnvalue">GIBaseInfo</span></a> *        g_base_info_get_container           (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the container of the <em class="parameter"><code>info</code></em>. The container is the parent
+GIBaseInfo. For instance, the parent of a <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a> is an
+<a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> or <a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the container. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-base-info-get-typelib"></a><h3>g_base_info_get_typelib ()</h3>
+<pre class="programlisting"><a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="returnvalue">GITypelib</span></a> *         g_base_info_get_typelib             (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the typelib this <em class="parameter"><code>info</code></em> belongs to
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the typelib. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-base-info-equal"></a><h3>g_base_info_equal ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>            g_base_info_equal                   (<em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info1</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> *info2</code></em>);</pre>
+<p>
+Compare two <a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a>.
+</p>
+<p>
+Using pointer comparison is not practical since many functions return
+different instances of <a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> that refers to the same part of the
+TypeLib; use this function instead to do <a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> comparisons.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info1</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info2</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></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 and only if <em class="parameter"><code>info1</code></em> equals <em class="parameter"><code>info2</code></em>.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi-GICallableInfo.html b/docs/reference/html/gi-GICallableInfo.html
new file mode 100644 (file)
index 0000000..8c6f09f
--- /dev/null
@@ -0,0 +1,376 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GICallableInfo</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="gi-repository-structs.html" title="GIRepository structs">
+<link rel="prev" href="gi-GIFunctionInfo.html" title="GIFunctionInfo">
+<link rel="next" href="gi-GIArgInfo.html" title="GIArgInfo">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="gi-GIFunctionInfo.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="gi-repository-structs.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="gi-GIArgInfo.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#gi-GICallableInfo.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#gi-GICallableInfo.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry">
+<a name="gi-GICallableInfo"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="gi-GICallableInfo.top_of_page"></a>GICallableInfo</span></h2>
+<p>GICallableInfo â€” Struct representing a callable</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<a name="gi-GICallableInfo.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">#define             <a class="link" href="gi-GICallableInfo.html#GI-IS-CALLABLE-INFO:CAPS" title="GI_IS_CALLABLE_INFO()">GI_IS_CALLABLE_INFO</a>                 (info)
+typedef             <a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo">GICallableInfo</a>;
+<a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="returnvalue">GITypeInfo</span></a> *        <a class="link" href="gi-GICallableInfo.html#g-callable-info-get-return-type" title="g_callable_info_get_return_type ()">g_callable_info_get_return_type</a>     (<em class="parameter"><code><a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIArgInfo.html#GITransfer" title="enum GITransfer"><span class="returnvalue">GITransfer</span></a>          <a class="link" href="gi-GICallableInfo.html#g-callable-info-get-caller-owns" title="g_callable_info_get_caller_owns ()">g_callable_info_get_caller_owns</a>     (<em class="parameter"><code><a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a> *info</code></em>);
+<span class="returnvalue">gboolean</span>            <a class="link" href="gi-GICallableInfo.html#g-callable-info-may-return-null" title="g_callable_info_may_return_null ()">g_callable_info_may_return_null</a>     (<em class="parameter"><code><a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a> *info</code></em>);
+const <span class="returnvalue">gchar</span> *       <a class="link" href="gi-GICallableInfo.html#g-callable-info-get-return-attribute" title="g_callable_info_get_return_attribute ()">g_callable_info_get_return_attribute</a>
+                                                        (<em class="parameter"><code><a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);
+<span class="returnvalue">gboolean</span>            <a class="link" href="gi-GICallableInfo.html#g-callable-info-iterate-return-attributes" title="g_callable_info_iterate_return_attributes ()">g_callable_info_iterate_return_attributes</a>
+                                                        (<em class="parameter"><code><a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIAttributeIter" title="GIAttributeIter"><span class="type">GIAttributeIter</span></a> *iterator</code></em>,
+                                                         <em class="parameter"><code><span class="type">char</span> **name</code></em>,
+                                                         <em class="parameter"><code><span class="type">char</span> **value</code></em>);
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GICallableInfo.html#g-callable-info-get-n-args" title="g_callable_info_get_n_args ()">g_callable_info_get_n_args</a>          (<em class="parameter"><code><a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="returnvalue">GIArgInfo</span></a> *         <a class="link" href="gi-GICallableInfo.html#g-callable-info-get-arg" title="g_callable_info_get_arg ()">g_callable_info_get_arg</a>             (<em class="parameter"><code><a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="gi-GICallableInfo.html#g-callable-info-load-arg" title="g_callable_info_load_arg ()">g_callable_info_load_arg</a>            (<em class="parameter"><code><a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a> *arg</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="gi-GICallableInfo.html#g-callable-info-load-return-type" title="g_callable_info_load_return_type ()">g_callable_info_load_return_type</a>    (<em class="parameter"><code><a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a> *type</code></em>);
+</pre>
+</div>
+<div class="refsect1">
+<a name="gi-GICallableInfo.description"></a><h2>Description</h2>
+<p>
+GICallableInfo represents an entity which is callable.
+Currently a function (<a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a>), virtual function,
+(<a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a>) or callback (<a class="link" href="gi-girepository.html#GICallbackInfo" title="GICallbackInfo"><span class="type">GICallbackInfo</span></a>).
+</p>
+<p>
+A callable has a list of arguments (<a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a>), a return type,
+direction and a flag which decides if it returns null.
+</p>
+<p>
+</p>
+<div class="refsect1">
+<a name="gi-gicallableinfo.struct-hierarchy"></a><h2>Struct hierarchy</h2>
+<pre class="synopsis">
+  <a class="link" href="gi-GIBaseInfo.html" title="GIBaseInfo">GIBaseInfo</a>
+   +----GICallableInfo
+         +----<a class="link" href="gi-GIFunctionInfo.html" title="GIFunctionInfo">GIFunctionInfo</a>
+         +----<a class="link" href="gi-GISignalInfo.html" title="GISignalInfo">GISignalInfo</a>
+         +----<a class="link" href="gi-GIVFuncInfo.html" title="GIVFuncInfo">GIVFuncInfo</a>
+</pre>
+</div>
+<p>
+</p>
+</div>
+<div class="refsect1">
+<a name="gi-GICallableInfo.details"></a><h2>Details</h2>
+<div class="refsect2">
+<a name="GI-IS-CALLABLE-INFO:CAPS"></a><h3>GI_IS_CALLABLE_INFO()</h3>
+<pre class="programlisting">#define             GI_IS_CALLABLE_INFO(info)</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GICallableInfo"></a><h3>GICallableInfo</h3>
+<pre class="programlisting">typedef GIBaseInfo GICallableInfo;
+</pre>
+<p>
+Represents a callable, either <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a>, <a class="link" href="gi-girepository.html#GICallbackInfo" title="GICallbackInfo"><span class="type">GICallbackInfo</span></a> or
+<a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a>.
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-callable-info-get-return-type"></a><h3>g_callable_info_get_return_type ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="returnvalue">GITypeInfo</span></a> *        g_callable_info_get_return_type     (<em class="parameter"><code><a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the return type of a callable item as a <a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a>. Free the struct by calling
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-callable-info-get-caller-owns"></a><h3>g_callable_info_get_caller_owns ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIArgInfo.html#GITransfer" title="enum GITransfer"><span class="returnvalue">GITransfer</span></a>          g_callable_info_get_caller_owns     (<em class="parameter"><code><a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a> *info</code></em>);</pre>
+<p>
+See whether the caller owns the return value of this callable.
+<a class="link" href="gi-GIArgInfo.html#GITransfer" title="enum GITransfer"><span class="type">GITransfer</span></a> contains a list of possible transfer values.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></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 caller owns the return value, <code class="literal">FALSE</code> otherwise.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-callable-info-may-return-null"></a><h3>g_callable_info_may_return_null ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>            g_callable_info_may_return_null     (<em class="parameter"><code><a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a> *info</code></em>);</pre>
+<p>
+See if a callable could return <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></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 callable could return <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-callable-info-get-return-attribute"></a><h3>g_callable_info_get_return_attribute ()</h3>
+<pre class="programlisting">const <span class="returnvalue">gchar</span> *       g_callable_info_get_return_attribute
+                                                        (<em class="parameter"><code><a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
+<p>
+Retrieve an arbitrary attribute associated with the return value.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>a freeform string naming an attribute</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>The value of the attribute, or <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if no such attribute exists</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-callable-info-iterate-return-attributes"></a><h3>g_callable_info_iterate_return_attributes ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>            g_callable_info_iterate_return_attributes
+                                                        (<em class="parameter"><code><a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="gi-GIBaseInfo.html#GIAttributeIter" title="GIAttributeIter"><span class="type">GIAttributeIter</span></a> *iterator</code></em>,
+                                                         <em class="parameter"><code><span class="type">char</span> **name</code></em>,
+                                                         <em class="parameter"><code><span class="type">char</span> **value</code></em>);</pre>
+<p>
+Iterate over all attributes associated with the return value.  The
+iterator structure is typically stack allocated, and must have its
+first member initialized to <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>.
+</p>
+<p>
+Both the <em class="parameter"><code>name</code></em> and <em class="parameter"><code>value</code></em> should be treated as constants
+and must not be freed.
+</p>
+<p>
+See <a class="link" href="gi-GIBaseInfo.html#g-base-info-iterate-attributes" title="g_base_info_iterate_attributes ()"><code class="function">g_base_info_iterate_attributes()</code></a> for an example of how to use a
+similar API.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>iterator</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIBaseInfo.html#GIAttributeIter" title="GIAttributeIter"><span class="type">GIAttributeIter</span></a> structure, must be initialized; see below</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>Returned name, must not be freed. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>Returned name, must not be freed. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
+</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 there are more attributes</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-callable-info-get-n-args"></a><h3>g_callable_info_get_n_args ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_callable_info_get_n_args          (<em class="parameter"><code><a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the number of arguments (both IN and OUT) for this callable.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>The number of arguments this callable expects.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-callable-info-get-arg"></a><h3>g_callable_info_get_arg ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="returnvalue">GIArgInfo</span></a> *         g_callable_info_get_arg             (<em class="parameter"><code><a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);</pre>
+<p>
+Obtain information about a particular argument of this callable.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
+<td>the argument index to fetch</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a>. Free it with
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-callable-info-load-arg"></a><h3>g_callable_info_load_arg ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                g_callable_info_load_arg            (<em class="parameter"><code><a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a> *arg</code></em>);</pre>
+<p>
+Obtain information about a particular argument of this callable; this
+function is a variant of <a class="link" href="gi-GICallableInfo.html#g-callable-info-get-arg" title="g_callable_info_get_arg ()"><code class="function">g_callable_info_get_arg()</code></a> designed for stack
+allocation.
+</p>
+<p>
+The initialized <em class="parameter"><code>arg</code></em> must not be referenced after <em class="parameter"><code>info</code></em> is deallocated.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
+<td>the argument index to fetch</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>arg</code></em> :</span></p></td>
+<td>Initialize with argument number <em class="parameter"><code>n</code></em>. <span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-callable-info-load-return-type"></a><h3>g_callable_info_load_return_type ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                g_callable_info_load_return_type    (<em class="parameter"><code><a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a> *type</code></em>);</pre>
+<p>
+Obtain information about a return value of callable; this
+function is a variant of <a class="link" href="gi-GICallableInfo.html#g-callable-info-get-return-type" title="g_callable_info_get_return_type ()"><code class="function">g_callable_info_get_return_type()</code></a> designed for stack
+allocation.
+</p>
+<p>
+The initialized <em class="parameter"><code>type</code></em> must not be referenced after <em class="parameter"><code>info</code></em> is deallocated.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
+<td>Initialized with return type of <em class="parameter"><code>info</code></em>. <span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi-GIConstantInfo.html b/docs/reference/html/gi-GIConstantInfo.html
new file mode 100644 (file)
index 0000000..48d30dc
--- /dev/null
@@ -0,0 +1,142 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GIConstantInfo</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="gi-repository-structs.html" title="GIRepository structs">
+<link rel="prev" href="gi-GIInterfaceInfo.html" title="GIInterfaceInfo">
+<link rel="next" href="gi-gierrordomaininfo.html" title="gierrordomaininfo">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="gi-GIInterfaceInfo.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="gi-repository-structs.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="gi-gierrordomaininfo.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#gi-GIConstantInfo.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#gi-GIConstantInfo.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry">
+<a name="gi-GIConstantInfo"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="gi-GIConstantInfo.top_of_page"></a>GIConstantInfo</span></h2>
+<p>GIConstantInfo â€” Struct representing a constant</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<a name="gi-GIConstantInfo.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">#define             <a class="link" href="gi-GIConstantInfo.html#GI-IS-CONSTANT-INFO:CAPS" title="GI_IS_CONSTANT_INFO()">GI_IS_CONSTANT_INFO</a>                 (info)
+typedef             <a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo">GIConstantInfo</a>;
+<a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="returnvalue">GITypeInfo</span></a> *        <a class="link" href="gi-GIConstantInfo.html#g-constant-info-get-type" title="g_constant_info_get_type ()">g_constant_info_get_type</a>            (<em class="parameter"><code><a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo"><span class="type">GIConstantInfo</span></a> *info</code></em>);
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GIConstantInfo.html#g-constant-info-get-value" title="g_constant_info_get_value ()">g_constant_info_get_value</a>           (<em class="parameter"><code><a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo"><span class="type">GIConstantInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">GIArgument</span> *value</code></em>);
+</pre>
+</div>
+<div class="refsect1">
+<a name="gi-GIConstantInfo.description"></a><h2>Description</h2>
+<p>
+GIConstantInfo represents a constant. A constant has a type associated
+which can be obtained by calling <a class="link" href="gi-GIConstantInfo.html#g-constant-info-get-type" title="g_constant_info_get_type ()"><code class="function">g_constant_info_get_type()</code></a> and a value,
+which can be obtained by calling <a class="link" href="gi-GIConstantInfo.html#g-constant-info-get-value" title="g_constant_info_get_value ()"><code class="function">g_constant_info_get_value()</code></a>.
+</p>
+<p>
+</p>
+<div class="refsect1">
+<a name="gi-giconstantinfo.struct-hierarchy"></a><h2>Struct hierarchy</h2>
+<pre class="synopsis">
+  <a class="link" href="gi-GIBaseInfo.html" title="GIBaseInfo">GIBaseInfo</a>
+   +----GIConstantInfo
+</pre>
+</div>
+<p>
+</p>
+</div>
+<div class="refsect1">
+<a name="gi-GIConstantInfo.details"></a><h2>Details</h2>
+<div class="refsect2">
+<a name="GI-IS-CONSTANT-INFO:CAPS"></a><h3>GI_IS_CONSTANT_INFO()</h3>
+<pre class="programlisting">#define             GI_IS_CONSTANT_INFO(info)</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIConstantInfo"></a><h3>GIConstantInfo</h3>
+<pre class="programlisting">typedef GIBaseInfo GIConstantInfo;
+</pre>
+<p>
+Represents a constant.
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-constant-info-get-type"></a><h3>g_constant_info_get_type ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="returnvalue">GITypeInfo</span></a> *        g_constant_info_get_type            (<em class="parameter"><code><a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo"><span class="type">GIConstantInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the type of the constant as a <a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo"><span class="type">GIConstantInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a>. Free the struct by calling
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-constant-info-get-value"></a><h3>g_constant_info_get_value ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_constant_info_get_value           (<em class="parameter"><code><a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo"><span class="type">GIConstantInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">GIArgument</span> *value</code></em>);</pre>
+<p>
+Obtain the value associated with the <a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo"><span class="type">GIConstantInfo</span></a> and store it in the
+<em class="parameter"><code>value</code></em> parameter. <em class="parameter"><code>argument</code></em> needs to be allocated before passing it in.
+The size of the constant value stored in <em class="parameter"><code>argument</code></em> will be returned.
+Free the value with <code class="function">g_constant_info_free_value()</code>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo"><span class="type">GIConstantInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>an argument. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>size of the constant</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi-GIEnumInfo.html b/docs/reference/html/gi-GIEnumInfo.html
new file mode 100644 (file)
index 0000000..488d571
--- /dev/null
@@ -0,0 +1,265 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GIEnumInfo</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="gi-repository-structs.html" title="GIRepository structs">
+<link rel="prev" href="gi-GISignalInfo.html" title="GISignalInfo">
+<link rel="next" href="gi-GIRegisteredTypeInfo.html" title="GIRegisteredTypeInfo">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="gi-GISignalInfo.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="gi-repository-structs.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="gi-GIRegisteredTypeInfo.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#gi-GIEnumInfo.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#gi-GIEnumInfo.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry">
+<a name="gi-GIEnumInfo"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="gi-GIEnumInfo.top_of_page"></a>GIEnumInfo</span></h2>
+<p>GIEnumInfo â€” Structs representing an enumeration and its values</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<a name="gi-GIEnumInfo.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">#define             <a class="link" href="gi-GIEnumInfo.html#GI-IS-ENUM-INFO:CAPS" title="GI_IS_ENUM_INFO()">GI_IS_ENUM_INFO</a>                     (info)
+#define             <a class="link" href="gi-GIEnumInfo.html#GI-IS-VALUE-INFO:CAPS" title="GI_IS_VALUE_INFO()">GI_IS_VALUE_INFO</a>                    (info)
+typedef             <a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo">GIEnumInfo</a>;
+typedef             <a class="link" href="gi-GIEnumInfo.html#GIValueInfo" title="GIValueInfo">GIValueInfo</a>;
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GIEnumInfo.html#g-enum-info-get-n-values" title="g_enum_info_get_n_values ()">g_enum_info_get_n_values</a>            (<em class="parameter"><code><a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo"><span class="type">GIEnumInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIEnumInfo.html#GIValueInfo" title="GIValueInfo"><span class="returnvalue">GIValueInfo</span></a> *       <a class="link" href="gi-GIEnumInfo.html#g-enum-info-get-value" title="g_enum_info_get_value ()">g_enum_info_get_value</a>               (<em class="parameter"><code><a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo"><span class="type">GIEnumInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GIEnumInfo.html#g-enum-info-get-n-methods" title="g_enum_info_get_n_methods ()">g_enum_info_get_n_methods</a>           (<em class="parameter"><code><a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo"><span class="type">GIEnumInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="returnvalue">GIFunctionInfo</span></a> *    <a class="link" href="gi-GIEnumInfo.html#g-enum-info-get-method" title="g_enum_info_get_method ()">g_enum_info_get_method</a>              (<em class="parameter"><code><a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo"><span class="type">GIEnumInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);
+<a class="link" href="gi-GITypeInfo.html#GITypeTag" title="enum GITypeTag"><span class="returnvalue">GITypeTag</span></a>           <a class="link" href="gi-GIEnumInfo.html#g-enum-info-get-storage-type" title="g_enum_info_get_storage_type ()">g_enum_info_get_storage_type</a>        (<em class="parameter"><code><a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo"><span class="type">GIEnumInfo</span></a> *info</code></em>);
+<span class="returnvalue">gint64</span>              <a class="link" href="gi-GIEnumInfo.html#g-value-info-get-value" title="g_value_info_get_value ()">g_value_info_get_value</a>              (<em class="parameter"><code><a class="link" href="gi-GIEnumInfo.html#GIValueInfo" title="GIValueInfo"><span class="type">GIValueInfo</span></a> *info</code></em>);
+</pre>
+</div>
+<div class="refsect1">
+<a name="gi-GIEnumInfo.description"></a><h2>Description</h2>
+<p>
+A GIEnumInfo represents an enumeration and a GIValueInfo struct represents a value
+of an enumeration. The GIEnumInfo contains a set of values and a type
+The GIValueInfo is fetched by calling <a class="link" href="gi-GIEnumInfo.html#g-enum-info-get-value" title="g_enum_info_get_value ()"><code class="function">g_enum_info_get_value()</code></a> on a <a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo"><span class="type">GIEnumInfo</span></a>.
+</p>
+<p>
+</p>
+<div class="refsect1">
+<a name="gi-gienuminfo.struct-hierarchy"></a><h2>Struct hierarchy</h2>
+<pre class="synopsis">
+  <a class="link" href="gi-GIBaseInfo.html" title="GIBaseInfo">GIBaseInfo</a>
+   +----<a class="link" href="gi-GIRegisteredTypeInfo.html" title="GIRegisteredTypeInfo">GIRegisteredTypeInfo</a>
+         +----GIEnumInfo
+</pre>
+</div>
+<p>
+</p>
+</div>
+<div class="refsect1">
+<a name="gi-GIEnumInfo.details"></a><h2>Details</h2>
+<div class="refsect2">
+<a name="GI-IS-ENUM-INFO:CAPS"></a><h3>GI_IS_ENUM_INFO()</h3>
+<pre class="programlisting">#define             GI_IS_ENUM_INFO(info)</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GI-IS-VALUE-INFO:CAPS"></a><h3>GI_IS_VALUE_INFO()</h3>
+<pre class="programlisting">#define             GI_IS_VALUE_INFO(info)</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIEnumInfo"></a><h3>GIEnumInfo</h3>
+<pre class="programlisting">typedef GIBaseInfo GIEnumInfo;
+</pre>
+<p>
+Represents an enum or a flag.
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIValueInfo"></a><h3>GIValueInfo</h3>
+<pre class="programlisting">typedef GIBaseInfo GIValueInfo;
+</pre>
+<p>
+Represents a enum value of a <a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo"><span class="type">GIEnumInfo</span></a>.
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-enum-info-get-n-values"></a><h3>g_enum_info_get_n_values ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_enum_info_get_n_values            (<em class="parameter"><code><a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo"><span class="type">GIEnumInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the number of values this enumeration contains.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo"><span class="type">GIEnumInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the number of enumeration values</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-enum-info-get-value"></a><h3>g_enum_info_get_value ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIEnumInfo.html#GIValueInfo" title="GIValueInfo"><span class="returnvalue">GIValueInfo</span></a> *       g_enum_info_get_value               (<em class="parameter"><code><a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo"><span class="type">GIEnumInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);</pre>
+<p>
+Obtain a value for this enumeration.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo"><span class="type">GIEnumInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
+<td>index of value to fetch</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the enumeration value or <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if type tag is wrong,
+free the struct with <a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-enum-info-get-n-methods"></a><h3>g_enum_info_get_n_methods ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_enum_info_get_n_methods           (<em class="parameter"><code><a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo"><span class="type">GIEnumInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the number of methods that this enum type has.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo"><span class="type">GIEnumInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>number of methods</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since 1.29.17</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-enum-info-get-method"></a><h3>g_enum_info_get_method ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="returnvalue">GIFunctionInfo</span></a> *    g_enum_info_get_method              (<em class="parameter"><code><a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo"><span class="type">GIEnumInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);</pre>
+<p>
+Obtain an enum type method at index <em class="parameter"><code>n</code></em>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo"><span class="type">GIEnumInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
+<td>index of method to get</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a>. Free the struct by calling
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since 1.29.17</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-enum-info-get-storage-type"></a><h3>g_enum_info_get_storage_type ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GITypeInfo.html#GITypeTag" title="enum GITypeTag"><span class="returnvalue">GITypeTag</span></a>           g_enum_info_get_storage_type        (<em class="parameter"><code><a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo"><span class="type">GIEnumInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the tag of the type used for the enum in the C ABI. This will
+will be a signed or unsigned integral type.
+</p>
+<p>
+Note that in the current implementation the width of the type is
+computed correctly, but the signed or unsigned nature of the type
+may not match the sign of the type used by the C compiler.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo"><span class="type">GIEnumInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the storage type for the enumeration</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-value-info-get-value"></a><h3>g_value_info_get_value ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint64</span>              g_value_info_get_value              (<em class="parameter"><code><a class="link" href="gi-GIEnumInfo.html#GIValueInfo" title="GIValueInfo"><span class="type">GIValueInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the enumeration value of the <a class="link" href="gi-GIEnumInfo.html#GIValueInfo" title="GIValueInfo"><span class="type">GIValueInfo</span></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIEnumInfo.html#GIValueInfo" title="GIValueInfo"><span class="type">GIValueInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the enumeration value. This will always be representable
+as a 32-bit signed or unsigned value. The use of gint64 as the
+return type is to allow both.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi-GIFieldInfo.html b/docs/reference/html/gi-GIFieldInfo.html
new file mode 100644 (file)
index 0000000..ba81770
--- /dev/null
@@ -0,0 +1,294 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GIFieldInfo</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="gi-repository-structs.html" title="GIRepository structs">
+<link rel="prev" href="gi-GIUnionInfo.html" title="GIUnionInfo">
+<link rel="next" href="gi-GIPropertyInfo.html" title="GIPropertyInfo">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="gi-GIUnionInfo.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="gi-repository-structs.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="gi-GIPropertyInfo.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#gi-GIFieldInfo.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#gi-GIFieldInfo.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry">
+<a name="gi-GIFieldInfo"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="gi-GIFieldInfo.top_of_page"></a>GIFieldInfo</span></h2>
+<p>GIFieldInfo â€” Struct representing a struct or union field</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<a name="gi-GIFieldInfo.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">#define             <a class="link" href="gi-GIFieldInfo.html#GI-IS-FIELD-INFO:CAPS" title="GI_IS_FIELD_INFO()">GI_IS_FIELD_INFO</a>                    (info)
+typedef             <a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo">GIFieldInfo</a>;
+enum                <a class="link" href="gi-GIFieldInfo.html#GIFieldInfoFlags" title="enum GIFieldInfoFlags">GIFieldInfoFlags</a>;
+<a class="link" href="gi-GIFieldInfo.html#GIFieldInfoFlags" title="enum GIFieldInfoFlags"><span class="returnvalue">GIFieldInfoFlags</span></a>    <a class="link" href="gi-GIFieldInfo.html#g-field-info-get-flags" title="g_field_info_get_flags ()">g_field_info_get_flags</a>              (<em class="parameter"><code><a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="type">GIFieldInfo</span></a> *info</code></em>);
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GIFieldInfo.html#g-field-info-get-size" title="g_field_info_get_size ()">g_field_info_get_size</a>               (<em class="parameter"><code><a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="type">GIFieldInfo</span></a> *info</code></em>);
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GIFieldInfo.html#g-field-info-get-offset" title="g_field_info_get_offset ()">g_field_info_get_offset</a>             (<em class="parameter"><code><a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="type">GIFieldInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="returnvalue">GITypeInfo</span></a> *        <a class="link" href="gi-GIFieldInfo.html#g-field-info-get-type" title="g_field_info_get_type ()">g_field_info_get_type</a>               (<em class="parameter"><code><a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="type">GIFieldInfo</span></a> *info</code></em>);
+<span class="returnvalue">gboolean</span>            <a class="link" href="gi-GIFieldInfo.html#g-field-info-get-field" title="g_field_info_get_field ()">g_field_info_get_field</a>              (<em class="parameter"><code><a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="type">GIFieldInfo</span></a> *field_info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gpointer</span> mem</code></em>,
+                                                         <em class="parameter"><code><span class="type">GIArgument</span> *value</code></em>);
+<span class="returnvalue">gboolean</span>            <a class="link" href="gi-GIFieldInfo.html#g-field-info-set-field" title="g_field_info_set_field ()">g_field_info_set_field</a>              (<em class="parameter"><code><a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="type">GIFieldInfo</span></a> *field_info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gpointer</span> mem</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">GIArgument</span> *value</code></em>);
+</pre>
+</div>
+<div class="refsect1">
+<a name="gi-GIFieldInfo.description"></a><h2>Description</h2>
+<p>
+A GIFieldInfo struct represents a field of a struct (see <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a>),
+union (see <a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a>) or an object (see <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>). The GIFieldInfo
+is fetched by calling <a class="link" href="gi-GIStructInfo.html#g-struct-info-get-field" title="g_struct_info_get_field ()"><code class="function">g_struct_info_get_field()</code></a>, <a class="link" href="gi-GIUnionInfo.html#g-union-info-get-field" title="g_union_info_get_field ()"><code class="function">g_union_info_get_field()</code></a>
+or <code class="function">g_object_info_get_value()</code>.
+A field has a size, type and a struct offset asssociated and a set of flags,
+which is currently <a class="link" href="gi-GIFieldInfo.html#GI-FIELD-IS-READABLE:CAPS"><span class="type">GI_FIELD_IS_READABLE</span></a> or <a class="link" href="gi-GIFieldInfo.html#GI-FIELD-IS-WRITABLE:CAPS"><span class="type">GI_FIELD_IS_WRITABLE</span></a>.
+</p>
+<p>
+</p>
+<div class="refsect1">
+<a name="gi-gifieldinfo.struct-hierarchy"></a><h2>Struct hierarchy</h2>
+<pre class="synopsis">
+  <a class="link" href="gi-GIBaseInfo.html" title="GIBaseInfo">GIBaseInfo</a>
+   +----GIFieldInfo
+</pre>
+</div>
+<p>
+</p>
+</div>
+<div class="refsect1">
+<a name="gi-GIFieldInfo.details"></a><h2>Details</h2>
+<div class="refsect2">
+<a name="GI-IS-FIELD-INFO:CAPS"></a><h3>GI_IS_FIELD_INFO()</h3>
+<pre class="programlisting">#define             GI_IS_FIELD_INFO(info)</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIFieldInfo"></a><h3>GIFieldInfo</h3>
+<pre class="programlisting">typedef GIBaseInfo GIFieldInfo;
+</pre>
+<p>
+Represents a field of a <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> or a <a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a>.
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIFieldInfoFlags"></a><h3>enum GIFieldInfoFlags</h3>
+<pre class="programlisting">typedef enum {
+  GI_FIELD_IS_READABLE = 1 &lt;&lt; 0,
+  GI_FIELD_IS_WRITABLE = 1 &lt;&lt; 1
+} GIFieldInfoFlags;
+</pre>
+<p>
+Flags for a <a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="type">GIFieldInfo</span></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><a name="GI-FIELD-IS-READABLE:CAPS"></a><span class="term"><code class="literal">GI_FIELD_IS_READABLE</code></span></p></td>
+<td>field is readable.
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-FIELD-IS-WRITABLE:CAPS"></a><span class="term"><code class="literal">GI_FIELD_IS_WRITABLE</code></span></p></td>
+<td>field is writable.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-field-info-get-flags"></a><h3>g_field_info_get_flags ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIFieldInfo.html#GIFieldInfoFlags" title="enum GIFieldInfoFlags"><span class="returnvalue">GIFieldInfoFlags</span></a>    g_field_info_get_flags              (<em class="parameter"><code><a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="type">GIFieldInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the flags for this <a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="type">GIFieldInfo</span></a>. See <a class="link" href="gi-GIFieldInfo.html#GIFieldInfoFlags" title="enum GIFieldInfoFlags"><span class="type">GIFieldInfoFlags</span></a> for possible
+flag values.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="type">GIFieldInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the flags</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-field-info-get-size"></a><h3>g_field_info_get_size ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_field_info_get_size               (<em class="parameter"><code><a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="type">GIFieldInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the size in bits of the field member, this is how
+much space you need to allocate to store the field.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="type">GIFieldInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the field size</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-field-info-get-offset"></a><h3>g_field_info_get_offset ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_field_info_get_offset             (<em class="parameter"><code><a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="type">GIFieldInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the offset in bits of the field member, this is relative
+to the beginning of the struct or union.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="type">GIFieldInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the field offset</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-field-info-get-type"></a><h3>g_field_info_get_type ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="returnvalue">GITypeInfo</span></a> *        g_field_info_get_type               (<em class="parameter"><code><a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="type">GIFieldInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the type of a field as a <a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="type">GIFieldInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a>. Free the struct by calling
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-field-info-get-field"></a><h3>g_field_info_get_field ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>            g_field_info_get_field              (<em class="parameter"><code><a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="type">GIFieldInfo</span></a> *field_info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gpointer</span> mem</code></em>,
+                                                         <em class="parameter"><code><span class="type">GIArgument</span> *value</code></em>);</pre>
+<p>
+Reads a field identified by a <span class="type">GFieldInfo</span> from a C structure or
+union.  This only handles fields of simple C types. It will fail
+for a field of a composite type like a nested structure or union
+even if that is actually readable.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field_info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="type">GIFieldInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mem</code></em> :</span></p></td>
+<td>pointer to a block of memory representing a C structure or union</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>a <span class="type">GIArgument</span> into which to store the value retrieved</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 reading the field succeeded, otherwise <code class="literal">FALSE</code>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-field-info-set-field"></a><h3>g_field_info_set_field ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>            g_field_info_set_field              (<em class="parameter"><code><a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="type">GIFieldInfo</span></a> *field_info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gpointer</span> mem</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">GIArgument</span> *value</code></em>);</pre>
+<p>
+Writes a field identified by a <span class="type">GFieldInfo</span> to a C structure or
+union.  This only handles fields of simple C types. It will fail
+for a field of a composite type like a nested structure or union
+even if that is actually writable. Note also that that it will refuse
+to write fields where memory management would by required. A field
+with a type such as 'char *' must be set with a setter function.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field_info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="type">GIFieldInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mem</code></em> :</span></p></td>
+<td>pointer to a block of memory representing a C structure or union</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>a <span class="type">GIArgument</span> holding the value to store</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 writing the field succeeded, otherwise <code class="literal">FALSE</code>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi-GIFunctionInfo.html b/docs/reference/html/gi-GIFunctionInfo.html
new file mode 100644 (file)
index 0000000..3170cb2
--- /dev/null
@@ -0,0 +1,365 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GIFunctionInfo</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="gi-repository-structs.html" title="GIRepository structs">
+<link rel="prev" href="gi-GIBaseInfo.html" title="GIBaseInfo">
+<link rel="next" href="gi-GICallableInfo.html" title="GICallableInfo">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="gi-GIBaseInfo.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="gi-repository-structs.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="gi-GICallableInfo.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#gi-GIFunctionInfo.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#gi-GIFunctionInfo.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry">
+<a name="gi-GIFunctionInfo"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="gi-GIFunctionInfo.top_of_page"></a>GIFunctionInfo</span></h2>
+<p>GIFunctionInfo â€” Struct representing a function</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<a name="gi-GIFunctionInfo.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">#define             <a class="link" href="gi-GIFunctionInfo.html#GI-IS-FUNCTION-INFO:CAPS" title="GI_IS_FUNCTION_INFO()">GI_IS_FUNCTION_INFO</a>                 (info)
+typedef             <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo">GIFunctionInfo</a>;
+enum                <a class="link" href="gi-GIFunctionInfo.html#GInvokeError" title="enum GInvokeError">GInvokeError</a>;
+enum                <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfoFlags" title="enum GIFunctionInfoFlags">GIFunctionInfoFlags</a>;
+#define             <a class="link" href="gi-GIFunctionInfo.html#G-INVOKE-ERROR:CAPS" title="G_INVOKE_ERROR">G_INVOKE_ERROR</a>
+const <span class="returnvalue">gchar</span> *       <a class="link" href="gi-GIFunctionInfo.html#g-function-info-get-symbol" title="g_function_info_get_symbol ()">g_function_info_get_symbol</a>          (<em class="parameter"><code><a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfoFlags" title="enum GIFunctionInfoFlags"><span class="returnvalue">GIFunctionInfoFlags</span></a> <a class="link" href="gi-GIFunctionInfo.html#g-function-info-get-flags" title="g_function_info_get_flags ()">g_function_info_get_flags</a>           (<em class="parameter"><code><a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIPropertyInfo.html#GIPropertyInfo" title="GIPropertyInfo"><span class="returnvalue">GIPropertyInfo</span></a> *    <a class="link" href="gi-GIFunctionInfo.html#g-function-info-get-property" title="g_function_info_get_property ()">g_function_info_get_property</a>        (<em class="parameter"><code><a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="returnvalue">GIVFuncInfo</span></a> *       <a class="link" href="gi-GIFunctionInfo.html#g-function-info-get-vfunc" title="g_function_info_get_vfunc ()">g_function_info_get_vfunc</a>           (<em class="parameter"><code><a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a> *info</code></em>);
+<span class="returnvalue">gboolean</span>            <a class="link" href="gi-GIFunctionInfo.html#g-function-info-invoke" title="g_function_info_invoke ()">g_function_info_invoke</a>              (<em class="parameter"><code><a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">GIArgument</span> *in_args</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> n_in_args</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">GIArgument</span> *out_args</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> n_out_args</code></em>,
+                                                         <em class="parameter"><code><span class="type">GIArgument</span> *return_value</code></em>,
+                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
+</pre>
+</div>
+<div class="refsect1">
+<a name="gi-GIFunctionInfo.description"></a><h2>Description</h2>
+<p>
+GIFunctionInfo represents a function, method or constructor.
+To find out what kind of entity a <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a> represents, call
+<a class="link" href="gi-GIFunctionInfo.html#g-function-info-get-flags" title="g_function_info_get_flags ()"><code class="function">g_function_info_get_flags()</code></a>.
+</p>
+<p>
+See also <a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a> for information on how to retreive arguments and
+other metadata.
+</p>
+<p>
+</p>
+<div class="refsect1">
+<a name="gi-gifunctioninfo.struct-hierarchy"></a><h2>Struct hierarchy</h2>
+<pre class="synopsis">
+  <a class="link" href="gi-GIBaseInfo.html" title="GIBaseInfo">GIBaseInfo</a>
+   +----<a class="link" href="gi-GICallableInfo.html" title="GICallableInfo">GICallableInfo</a>
+         +----GIFunctionInfo
+         +----<a class="link" href="gi-GISignalInfo.html" title="GISignalInfo">GISignalInfo</a>
+         +----<a class="link" href="gi-GIVFuncInfo.html" title="GIVFuncInfo">GIVFuncInfo</a>
+</pre>
+</div>
+<p>
+</p>
+</div>
+<div class="refsect1">
+<a name="gi-GIFunctionInfo.details"></a><h2>Details</h2>
+<div class="refsect2">
+<a name="GI-IS-FUNCTION-INFO:CAPS"></a><h3>GI_IS_FUNCTION_INFO()</h3>
+<pre class="programlisting">#define             GI_IS_FUNCTION_INFO(info)</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIFunctionInfo"></a><h3>GIFunctionInfo</h3>
+<pre class="programlisting">typedef GIBaseInfo GIFunctionInfo;
+</pre>
+<p>
+Represents a function, eg arguments and return value.
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GInvokeError"></a><h3>enum GInvokeError</h3>
+<pre class="programlisting">typedef enum {
+  G_INVOKE_ERROR_FAILED,
+  G_INVOKE_ERROR_SYMBOL_NOT_FOUND,
+  G_INVOKE_ERROR_ARGUMENT_MISMATCH
+} GInvokeError;
+</pre>
+<p>
+An error occuring while invoking a function via
+<a class="link" href="gi-GIFunctionInfo.html#g-function-info-invoke" title="g_function_info_invoke ()"><code class="function">g_function_info_invoke()</code></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><a name="G-INVOKE-ERROR-FAILED:CAPS"></a><span class="term"><code class="literal">G_INVOKE_ERROR_FAILED</code></span></p></td>
+<td>invokation failed, unknown error.
+</td>
+</tr>
+<tr>
+<td><p><a name="G-INVOKE-ERROR-SYMBOL-NOT-FOUND:CAPS"></a><span class="term"><code class="literal">G_INVOKE_ERROR_SYMBOL_NOT_FOUND</code></span></p></td>
+<td>symbol couldn't be found in any of the
+libraries associated with the typelib of the function.
+</td>
+</tr>
+<tr>
+<td><p><a name="G-INVOKE-ERROR-ARGUMENT-MISMATCH:CAPS"></a><span class="term"><code class="literal">G_INVOKE_ERROR_ARGUMENT_MISMATCH</code></span></p></td>
+<td>the arguments provided didn't match
+the expected arguments for the functions type signature.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIFunctionInfoFlags"></a><h3>enum GIFunctionInfoFlags</h3>
+<pre class="programlisting">typedef enum {
+  GI_FUNCTION_IS_METHOD      = 1 &lt;&lt; 0,
+  GI_FUNCTION_IS_CONSTRUCTOR = 1 &lt;&lt; 1,
+  GI_FUNCTION_IS_GETTER      = 1 &lt;&lt; 2,
+  GI_FUNCTION_IS_SETTER      = 1 &lt;&lt; 3,
+  GI_FUNCTION_WRAPS_VFUNC    = 1 &lt;&lt; 4,
+  GI_FUNCTION_THROWS         = 1 &lt;&lt; 5
+} GIFunctionInfoFlags;
+</pre>
+<p>
+Flags for a <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a> struct.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><a name="GI-FUNCTION-IS-METHOD:CAPS"></a><span class="term"><code class="literal">GI_FUNCTION_IS_METHOD</code></span></p></td>
+<td>is a method.
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-FUNCTION-IS-CONSTRUCTOR:CAPS"></a><span class="term"><code class="literal">GI_FUNCTION_IS_CONSTRUCTOR</code></span></p></td>
+<td>is a constructor.
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-FUNCTION-IS-GETTER:CAPS"></a><span class="term"><code class="literal">GI_FUNCTION_IS_GETTER</code></span></p></td>
+<td>is a getter of a <a class="link" href="gi-GIPropertyInfo.html#GIPropertyInfo" title="GIPropertyInfo"><span class="type">GIPropertyInfo</span></a>.
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-FUNCTION-IS-SETTER:CAPS"></a><span class="term"><code class="literal">GI_FUNCTION_IS_SETTER</code></span></p></td>
+<td>is a setter of a <a class="link" href="gi-GIPropertyInfo.html#GIPropertyInfo" title="GIPropertyInfo"><span class="type">GIPropertyInfo</span></a>.
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-FUNCTION-WRAPS-VFUNC:CAPS"></a><span class="term"><code class="literal">GI_FUNCTION_WRAPS_VFUNC</code></span></p></td>
+<td>represents a virtual function.
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-FUNCTION-THROWS:CAPS"></a><span class="term"><code class="literal">GI_FUNCTION_THROWS</code></span></p></td>
+<td>the function may throw an error.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="G-INVOKE-ERROR:CAPS"></a><h3>G_INVOKE_ERROR</h3>
+<pre class="programlisting">#define G_INVOKE_ERROR (g_invoke_error_quark ())
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-function-info-get-symbol"></a><h3>g_function_info_get_symbol ()</h3>
+<pre class="programlisting">const <span class="returnvalue">gchar</span> *       g_function_info_get_symbol          (<em class="parameter"><code><a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the symbol of the function. The symbol is the name of the
+exported function, suitable to be used as an argument to
+<code class="function">g_module_symbol()</code>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the symbol</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-function-info-get-flags"></a><h3>g_function_info_get_flags ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfoFlags" title="enum GIFunctionInfoFlags"><span class="returnvalue">GIFunctionInfoFlags</span></a> g_function_info_get_flags           (<em class="parameter"><code><a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfoFlags" title="enum GIFunctionInfoFlags"><span class="type">GIFunctionInfoFlags</span></a> for the <em class="parameter"><code>info</code></em>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the flags</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-function-info-get-property"></a><h3>g_function_info_get_property ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIPropertyInfo.html#GIPropertyInfo" title="GIPropertyInfo"><span class="returnvalue">GIPropertyInfo</span></a> *    g_function_info_get_property        (<em class="parameter"><code><a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the property associated with this <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a>.
+Only <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a> with the flag <a class="link" href="gi-GIFunctionInfo.html#GI-FUNCTION-IS-GETTER:CAPS"><code class="literal">GI_FUNCTION_IS_GETTER</code></a> or
+<a class="link" href="gi-GIFunctionInfo.html#GI-FUNCTION-IS-SETTER:CAPS"><code class="literal">GI_FUNCTION_IS_SETTER</code></a> have a property set. For other cases,
+<a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> will be returned.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the property or <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if not set. Free it with
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-function-info-get-vfunc"></a><h3>g_function_info_get_vfunc ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="returnvalue">GIVFuncInfo</span></a> *       g_function_info_get_vfunc           (<em class="parameter"><code><a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the virtual function associated with this <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a>.
+Only <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a> with the flag <a class="link" href="gi-GIFunctionInfo.html#GI-FUNCTION-WRAPS-VFUNC:CAPS"><code class="literal">GI_FUNCTION_WRAPS_VFUNC</code></a> has
+a virtual function set. For other cases, <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> will be returned.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the virtual function or <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if not set.
+Free it by calling <a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-function-info-invoke"></a><h3>g_function_info_invoke ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>            g_function_info_invoke              (<em class="parameter"><code><a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">GIArgument</span> *in_args</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> n_in_args</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">GIArgument</span> *out_args</code></em>,
+                                                         <em class="parameter"><code><span class="type">int</span> n_out_args</code></em>,
+                                                         <em class="parameter"><code><span class="type">GIArgument</span> *return_value</code></em>,
+                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
+<p>
+Invokes the function described in <em class="parameter"><code>info</code></em> with the given
+arguments. Note that inout parameters must appear in both
+argument lists. This function uses <code class="function">dlsym()</code> to obtain a pointer
+to the function, so the library or shared object containing the
+described function must either be linked to the caller, or must
+have been <code class="function">g_module_symbol()</code>ed before calling this function.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a> describing the function to invoke</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>in_args</code></em> :</span></p></td>
+<td>an array of <span class="type">GIArgument</span>s, one for each in
+parameter of <em class="parameter"><code>info</code></em>. If there are no in parameter, <em class="parameter"><code>in_args</code></em>
+can be <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>n_in_args</code></em> :</span></p></td>
+<td>the length of the <em class="parameter"><code>in_args</code></em> array</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>out_args</code></em> :</span></p></td>
+<td>an array of <span class="type">GIArgument</span>s, one for each out
+parameter of <em class="parameter"><code>info</code></em>. If there are no out parameters, <em class="parameter"><code>out_args</code></em>
+may be <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>n_out_args</code></em> :</span></p></td>
+<td>the length of the <em class="parameter"><code>out_args</code></em> array</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>return_value</code></em> :</span></p></td>
+<td>return location for the return value of the
+function. If the function returns void, <em class="parameter"><code>return_value</code></em> may be
+<a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
+<td>return location for detailed error information, or <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</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 function has been invoked, <code class="literal">FALSE</code> if an
+error occurred.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi-GIInterfaceInfo.html b/docs/reference/html/gi-GIInterfaceInfo.html
new file mode 100644 (file)
index 0000000..6022a16
--- /dev/null
@@ -0,0 +1,504 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GIInterfaceInfo</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="gi-repository-structs.html" title="GIRepository structs">
+<link rel="prev" href="gi-GIObjectInfo.html" title="GIObjectInfo">
+<link rel="next" href="gi-GIConstantInfo.html" title="GIConstantInfo">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="gi-GIObjectInfo.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="gi-repository-structs.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="gi-GIConstantInfo.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#gi-GIInterfaceInfo.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#gi-GIInterfaceInfo.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry">
+<a name="gi-GIInterfaceInfo"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="gi-GIInterfaceInfo.top_of_page"></a>GIInterfaceInfo</span></h2>
+<p>GIInterfaceInfo â€” Struct representing a GInterface</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<a name="gi-GIInterfaceInfo.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">#define             <a class="link" href="gi-GIInterfaceInfo.html#GI-IS-INTERFACE-INFO:CAPS" title="GI_IS_INTERFACE_INFO()">GI_IS_INTERFACE_INFO</a>                (info)
+typedef             <a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo">GIInterfaceInfo</a>;
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GIInterfaceInfo.html#g-interface-info-get-n-prerequisites" title="g_interface_info_get_n_prerequisites ()">g_interface_info_get_n_prerequisites</a>
+                                                        (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="returnvalue">GIBaseInfo</span></a> *        <a class="link" href="gi-GIInterfaceInfo.html#g-interface-info-get-prerequisite" title="g_interface_info_get_prerequisite ()">g_interface_info_get_prerequisite</a>   (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GIInterfaceInfo.html#g-interface-info-get-n-properties" title="g_interface_info_get_n_properties ()">g_interface_info_get_n_properties</a>   (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIPropertyInfo.html#GIPropertyInfo" title="GIPropertyInfo"><span class="returnvalue">GIPropertyInfo</span></a> *    <a class="link" href="gi-GIInterfaceInfo.html#g-interface-info-get-property" title="g_interface_info_get_property ()">g_interface_info_get_property</a>       (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GIInterfaceInfo.html#g-interface-info-get-n-methods" title="g_interface_info_get_n_methods ()">g_interface_info_get_n_methods</a>      (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="returnvalue">GIFunctionInfo</span></a> *    <a class="link" href="gi-GIInterfaceInfo.html#g-interface-info-get-method" title="g_interface_info_get_method ()">g_interface_info_get_method</a>         (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);
+<a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="returnvalue">GIFunctionInfo</span></a> *    <a class="link" href="gi-GIInterfaceInfo.html#g-interface-info-find-method" title="g_interface_info_find_method ()">g_interface_info_find_method</a>        (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GIInterfaceInfo.html#g-interface-info-get-n-signals" title="g_interface_info_get_n_signals ()">g_interface_info_get_n_signals</a>      (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GISignalInfo.html#GISignalInfo" title="GISignalInfo"><span class="returnvalue">GISignalInfo</span></a> *      <a class="link" href="gi-GIInterfaceInfo.html#g-interface-info-get-signal" title="g_interface_info_get_signal ()">g_interface_info_get_signal</a>         (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GIInterfaceInfo.html#g-interface-info-get-n-vfuncs" title="g_interface_info_get_n_vfuncs ()">g_interface_info_get_n_vfuncs</a>       (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="returnvalue">GIVFuncInfo</span></a> *       <a class="link" href="gi-GIInterfaceInfo.html#g-interface-info-get-vfunc" title="g_interface_info_get_vfunc ()">g_interface_info_get_vfunc</a>          (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GIInterfaceInfo.html#g-interface-info-get-n-constants" title="g_interface_info_get_n_constants ()">g_interface_info_get_n_constants</a>    (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo"><span class="returnvalue">GIConstantInfo</span></a> *    <a class="link" href="gi-GIInterfaceInfo.html#g-interface-info-get-constant" title="g_interface_info_get_constant ()">g_interface_info_get_constant</a>       (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);
+<a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="returnvalue">GIStructInfo</span></a> *      <a class="link" href="gi-GIInterfaceInfo.html#g-interface-info-get-iface-struct" title="g_interface_info_get_iface_struct ()">g_interface_info_get_iface_struct</a>   (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="returnvalue">GIVFuncInfo</span></a> *       <a class="link" href="gi-GIInterfaceInfo.html#g-interface-info-find-vfunc" title="g_interface_info_find_vfunc ()">g_interface_info_find_vfunc</a>         (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);
+</pre>
+</div>
+<div class="refsect1">
+<a name="gi-GIInterfaceInfo.description"></a><h2>Description</h2>
+<p>
+GIInterfaceInfo represents a <span class="type">GInterface</span> type.
+</p>
+<p>
+A GInterface has methods, fields, properties, signals, interfaces, constants,
+virtual functions and prerequisites.
+</p>
+<p>
+</p>
+<div class="refsect1">
+<a name="gi-giinterfaceinfo.struct-hierarchy"></a><h2>Struct hierarchy</h2>
+<pre class="synopsis">
+  <a class="link" href="gi-GIBaseInfo.html" title="GIBaseInfo">GIBaseInfo</a>
+   +----<a class="link" href="gi-GIRegisteredTypeInfo.html" title="GIRegisteredTypeInfo">GIRegisteredTypeInfo</a>
+         +----GIInterfaceInfo
+</pre>
+</div>
+<p>
+</p>
+</div>
+<div class="refsect1">
+<a name="gi-GIInterfaceInfo.details"></a><h2>Details</h2>
+<div class="refsect2">
+<a name="GI-IS-INTERFACE-INFO:CAPS"></a><h3>GI_IS_INTERFACE_INFO()</h3>
+<pre class="programlisting">#define             GI_IS_INTERFACE_INFO(info)</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIInterfaceInfo"></a><h3>GIInterfaceInfo</h3>
+<pre class="programlisting">typedef GIBaseInfo GIInterfaceInfo;
+</pre>
+<p>
+Represents an interface.
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-interface-info-get-n-prerequisites"></a><h3>g_interface_info_get_n_prerequisites ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_interface_info_get_n_prerequisites
+                                                        (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the number of prerequisites for this interface type.
+A prerequisites is another interface that needs to be implemented for
+interface, similar to an base class for GObjects.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>number of prerequisites</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-interface-info-get-prerequisite"></a><h3>g_interface_info_get_prerequisite ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="returnvalue">GIBaseInfo</span></a> *        g_interface_info_get_prerequisite   (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);</pre>
+<p>
+Obtain an interface type prerequisites index <em class="parameter"><code>n</code></em>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
+<td>index of prerequisites to get</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the prerequisites as a <a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a>. Free the struct by calling
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-interface-info-get-n-properties"></a><h3>g_interface_info_get_n_properties ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_interface_info_get_n_properties   (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the number of properties that this interface type has.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>number of properties</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-interface-info-get-property"></a><h3>g_interface_info_get_property ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIPropertyInfo.html#GIPropertyInfo" title="GIPropertyInfo"><span class="returnvalue">GIPropertyInfo</span></a> *    g_interface_info_get_property       (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);</pre>
+<p>
+Obtain an interface type property at index <em class="parameter"><code>n</code></em>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
+<td>index of property to get</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIPropertyInfo.html#GIPropertyInfo" title="GIPropertyInfo"><span class="type">GIPropertyInfo</span></a>. Free the struct by calling
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-interface-info-get-n-methods"></a><h3>g_interface_info_get_n_methods ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_interface_info_get_n_methods      (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the number of methods that this interface type has.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>number of methods</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-interface-info-get-method"></a><h3>g_interface_info_get_method ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="returnvalue">GIFunctionInfo</span></a> *    g_interface_info_get_method         (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);</pre>
+<p>
+Obtain an interface type method at index <em class="parameter"><code>n</code></em>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
+<td>index of method to get</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a>. Free the struct by calling
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-interface-info-find-method"></a><h3>g_interface_info_find_method ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="returnvalue">GIFunctionInfo</span></a> *    g_interface_info_find_method        (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
+<p>
+Obtain a method of the interface type given a <em class="parameter"><code>name</code></em>. <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> will be
+returned if there's no method available with that name.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>name of method to obtain</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a> or <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if none found.
+Free the struct by calling <a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-interface-info-get-n-signals"></a><h3>g_interface_info_get_n_signals ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_interface_info_get_n_signals      (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the number of signals that this interface type has.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>number of signals</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-interface-info-get-signal"></a><h3>g_interface_info_get_signal ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GISignalInfo.html#GISignalInfo" title="GISignalInfo"><span class="returnvalue">GISignalInfo</span></a> *      g_interface_info_get_signal         (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);</pre>
+<p>
+Obtain an interface type signal at index <em class="parameter"><code>n</code></em>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
+<td>index of signal to get</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GISignalInfo.html#GISignalInfo" title="GISignalInfo"><span class="type">GISignalInfo</span></a>. Free the struct by calling
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-interface-info-get-n-vfuncs"></a><h3>g_interface_info_get_n_vfuncs ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_interface_info_get_n_vfuncs       (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the number of virtual functions that this interface type has.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>number of virtual functions</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-interface-info-get-vfunc"></a><h3>g_interface_info_get_vfunc ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="returnvalue">GIVFuncInfo</span></a> *       g_interface_info_get_vfunc          (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);</pre>
+<p>
+Obtain an interface type virtual function at index <em class="parameter"><code>n</code></em>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
+<td>index of virtual function to get</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a>. Free the struct by calling
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-interface-info-get-n-constants"></a><h3>g_interface_info_get_n_constants ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_interface_info_get_n_constants    (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the number of constants that this interface type has.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>number of constants</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-interface-info-get-constant"></a><h3>g_interface_info_get_constant ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo"><span class="returnvalue">GIConstantInfo</span></a> *    g_interface_info_get_constant       (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);</pre>
+<p>
+Obtain an interface type constant at index <em class="parameter"><code>n</code></em>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
+<td>index of constant to get</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo"><span class="type">GIConstantInfo</span></a>. Free the struct by calling
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-interface-info-get-iface-struct"></a><h3>g_interface_info_get_iface_struct ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="returnvalue">GIStructInfo</span></a> *      g_interface_info_get_iface_struct   (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>);</pre>
+<p>
+Returns the layout C structure associated with this <span class="type">GInterface</span>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> or <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>. Free it with
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-interface-info-find-vfunc"></a><h3>g_interface_info_find_vfunc ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="returnvalue">GIVFuncInfo</span></a> *       g_interface_info_find_vfunc         (<em class="parameter"><code><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
+<p>
+Locate a virtual function slot with name <em class="parameter"><code>name</code></em>. See the documentation
+for <a class="link" href="gi-GIObjectInfo.html#g-object-info-find-vfunc" title="g_object_info_find_vfunc ()"><code class="function">g_object_info_find_vfunc()</code></a> for more information on virtuals.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>The name of a virtual function to find.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a>, or <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>. Free it with
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi-GIObjectInfo.html b/docs/reference/html/gi-GIObjectInfo.html
new file mode 100644 (file)
index 0000000..25cdfd8
--- /dev/null
@@ -0,0 +1,1001 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GIObjectInfo</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="gi-repository-structs.html" title="GIRepository structs">
+<link rel="prev" href="gi-GIRegisteredTypeInfo.html" title="GIRegisteredTypeInfo">
+<link rel="next" href="gi-GIInterfaceInfo.html" title="GIInterfaceInfo">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="gi-GIRegisteredTypeInfo.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="gi-repository-structs.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="gi-GIInterfaceInfo.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#gi-GIObjectInfo.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#gi-GIObjectInfo.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry">
+<a name="gi-GIObjectInfo"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="gi-GIObjectInfo.top_of_page"></a>GIObjectInfo</span></h2>
+<p>GIObjectInfo â€” Struct representing a GObject</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<a name="gi-GIObjectInfo.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">#define             <a class="link" href="gi-GIObjectInfo.html#GI-IS-OBJECT-INFO:CAPS" title="GI_IS_OBJECT_INFO()">GI_IS_OBJECT_INFO</a>                   (info)
+typedef             <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo">GIObjectInfo</a>;
+<span class="returnvalue">void</span> *              (<a class="link" href="gi-GIObjectInfo.html#GIObjectInfoGetValueFunction" title="GIObjectInfoGetValueFunction ()">*GIObjectInfoGetValueFunction</a>)     (<em class="parameter"><code>const <span class="type">GValue</span> *value</code></em>);
+<span class="returnvalue">void</span> *              (<a class="link" href="gi-GIObjectInfo.html#GIObjectInfoRefFunction" title="GIObjectInfoRefFunction ()">*GIObjectInfoRefFunction</a>)          (<em class="parameter"><code><span class="type">void</span> *object</code></em>);
+<span class="returnvalue">void</span>                (<a class="link" href="gi-GIObjectInfo.html#GIObjectInfoSetValueFunction" title="GIObjectInfoSetValueFunction ()">*GIObjectInfoSetValueFunction</a>)     (<em class="parameter"><code><span class="type">GValue</span> *value</code></em>,
+                                                         <em class="parameter"><code><span class="type">void</span> *object</code></em>);
+<span class="returnvalue">void</span>                (<a class="link" href="gi-GIObjectInfo.html#GIObjectInfoUnrefFunction" title="GIObjectInfoUnrefFunction ()">*GIObjectInfoUnrefFunction</a>)        (<em class="parameter"><code><span class="type">void</span> *object</code></em>);
+const <span class="returnvalue">gchar</span> *       <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-type-name" title="g_object_info_get_type_name ()">g_object_info_get_type_name</a>         (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);
+const <span class="returnvalue">gchar</span> *       <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-type-init" title="g_object_info_get_type_init ()">g_object_info_get_type_init</a>         (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);
+<span class="returnvalue">gboolean</span>            <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-abstract" title="g_object_info_get_abstract ()">g_object_info_get_abstract</a>          (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);
+<span class="returnvalue">gboolean</span>            <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-fundamental" title="g_object_info_get_fundamental ()">g_object_info_get_fundamental</a>       (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="returnvalue">GIObjectInfo</span></a> *      <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-parent" title="g_object_info_get_parent ()">g_object_info_get_parent</a>            (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-n-interfaces" title="g_object_info_get_n_interfaces ()">g_object_info_get_n_interfaces</a>      (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="returnvalue">GIInterfaceInfo</span></a> *   <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-interface" title="g_object_info_get_interface ()">g_object_info_get_interface</a>         (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-n-fields" title="g_object_info_get_n_fields ()">g_object_info_get_n_fields</a>          (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="returnvalue">GIFieldInfo</span></a> *       <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-field" title="g_object_info_get_field ()">g_object_info_get_field</a>             (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-n-properties" title="g_object_info_get_n_properties ()">g_object_info_get_n_properties</a>      (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIPropertyInfo.html#GIPropertyInfo" title="GIPropertyInfo"><span class="returnvalue">GIPropertyInfo</span></a> *    <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-property" title="g_object_info_get_property ()">g_object_info_get_property</a>          (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-n-methods" title="g_object_info_get_n_methods ()">g_object_info_get_n_methods</a>         (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="returnvalue">GIFunctionInfo</span></a> *    <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-method" title="g_object_info_get_method ()">g_object_info_get_method</a>            (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);
+<a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="returnvalue">GIFunctionInfo</span></a> *    <a class="link" href="gi-GIObjectInfo.html#g-object-info-find-method" title="g_object_info_find_method ()">g_object_info_find_method</a>           (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-n-signals" title="g_object_info_get_n_signals ()">g_object_info_get_n_signals</a>         (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GISignalInfo.html#GISignalInfo" title="GISignalInfo"><span class="returnvalue">GISignalInfo</span></a> *      <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-signal" title="g_object_info_get_signal ()">g_object_info_get_signal</a>            (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-n-vfuncs" title="g_object_info_get_n_vfuncs ()">g_object_info_get_n_vfuncs</a>          (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="returnvalue">GIVFuncInfo</span></a> *       <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-vfunc" title="g_object_info_get_vfunc ()">g_object_info_get_vfunc</a>             (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-n-constants" title="g_object_info_get_n_constants ()">g_object_info_get_n_constants</a>       (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo"><span class="returnvalue">GIConstantInfo</span></a> *    <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-constant" title="g_object_info_get_constant ()">g_object_info_get_constant</a>          (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);
+<a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="returnvalue">GIStructInfo</span></a> *      <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-class-struct" title="g_object_info_get_class_struct ()">g_object_info_get_class_struct</a>      (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="returnvalue">GIVFuncInfo</span></a> *       <a class="link" href="gi-GIObjectInfo.html#g-object-info-find-vfunc" title="g_object_info_find_vfunc ()">g_object_info_find_vfunc</a>            (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);
+const <span class="returnvalue">char</span> *        <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-unref-function" title="g_object_info_get_unref_function ()">g_object_info_get_unref_function</a>    (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIObjectInfo.html#GIObjectInfoUnrefFunction" title="GIObjectInfoUnrefFunction ()"><span class="returnvalue">GIObjectInfoUnrefFunction</span></a> <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-unref-function-pointer" title="g_object_info_get_unref_function_pointer ()">g_object_info_get_unref_function_pointer</a>
+                                                        (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);
+const <span class="returnvalue">char</span> *        <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-ref-function" title="g_object_info_get_ref_function ()">g_object_info_get_ref_function</a>      (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIObjectInfo.html#GIObjectInfoRefFunction" title="GIObjectInfoRefFunction ()"><span class="returnvalue">GIObjectInfoRefFunction</span></a> <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-ref-function-pointer" title="g_object_info_get_ref_function_pointer ()">g_object_info_get_ref_function_pointer</a>
+                                                        (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);
+const <span class="returnvalue">char</span> *        <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-set-value-function" title="g_object_info_get_set_value_function ()">g_object_info_get_set_value_function</a>
+                                                        (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIObjectInfo.html#GIObjectInfoSetValueFunction" title="GIObjectInfoSetValueFunction ()"><span class="returnvalue">GIObjectInfoSetValueFunction</span></a> <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-set-value-function-pointer" title="g_object_info_get_set_value_function_pointer ()">g_object_info_get_set_value_function_pointer</a>
+                                                        (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);
+const <span class="returnvalue">char</span> *        <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-get-value-function" title="g_object_info_get_get_value_function ()">g_object_info_get_get_value_function</a>
+                                                        (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIObjectInfo.html#GIObjectInfoGetValueFunction" title="GIObjectInfoGetValueFunction ()"><span class="returnvalue">GIObjectInfoGetValueFunction</span></a> <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-get-value-function-pointer" title="g_object_info_get_get_value_function_pointer ()">g_object_info_get_get_value_function_pointer</a>
+                                                        (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);
+</pre>
+</div>
+<div class="refsect1">
+<a name="gi-GIObjectInfo.description"></a><h2>Description</h2>
+<p>
+GIObjectInfo represents a <span class="type">GObject</span>. This doesn't represent a specific
+instance of a GObject, instead this represent the object type (eg class).
+</p>
+<p>
+A GObject has methods, fields, properties, signals, interfaces, constants
+and virtual functions.
+</p>
+<p>
+</p>
+<div class="refsect1">
+<a name="gi-giobjectinfo.struct-hierarchy"></a><h2>Struct hierarchy</h2>
+<pre class="synopsis">
+  <a class="link" href="gi-GIBaseInfo.html" title="GIBaseInfo">GIBaseInfo</a>
+   +----<a class="link" href="gi-GIRegisteredTypeInfo.html" title="GIRegisteredTypeInfo">GIRegisteredTypeInfo</a>
+         +----GIObjectInfo
+</pre>
+</div>
+<p>
+</p>
+</div>
+<div class="refsect1">
+<a name="gi-GIObjectInfo.details"></a><h2>Details</h2>
+<div class="refsect2">
+<a name="GI-IS-OBJECT-INFO:CAPS"></a><h3>GI_IS_OBJECT_INFO()</h3>
+<pre class="programlisting">#define             GI_IS_OBJECT_INFO(info)</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIObjectInfo"></a><h3>GIObjectInfo</h3>
+<pre class="programlisting">typedef GIBaseInfo GIObjectInfo;
+</pre>
+<p>
+Represents an object.
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIObjectInfoGetValueFunction"></a><h3>GIObjectInfoGetValueFunction ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span> *              (*GIObjectInfoGetValueFunction)     (<em class="parameter"><code>const <span class="type">GValue</span> *value</code></em>);</pre>
+<p>
+Extract an object instance out of <em class="parameter"><code>value</code></em>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>a <span class="type">GValue</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the object instance. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIObjectInfoRefFunction"></a><h3>GIObjectInfoRefFunction ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span> *              (*GIObjectInfoRefFunction)          (<em class="parameter"><code><span class="type">void</span> *object</code></em>);</pre>
+<p>
+Increases the reference count of an object instance.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
+<td>object instance pointer</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the object instance. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIObjectInfoSetValueFunction"></a><h3>GIObjectInfoSetValueFunction ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                (*GIObjectInfoSetValueFunction)     (<em class="parameter"><code><span class="type">GValue</span> *value</code></em>,
+                                                         <em class="parameter"><code><span class="type">void</span> *object</code></em>);</pre>
+<p>
+Update <em class="parameter"><code>value</code></em> and attach the object instance pointer <em class="parameter"><code>object</code></em> to it.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
+<td>a <span class="type">GValue</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
+<td>object instance pointer</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIObjectInfoUnrefFunction"></a><h3>GIObjectInfoUnrefFunction ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                (*GIObjectInfoUnrefFunction)        (<em class="parameter"><code><span class="type">void</span> *object</code></em>);</pre>
+<p>
+Decreases the reference count of an object instance.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
+<td>object instance pointer</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-get-type-name"></a><h3>g_object_info_get_type_name ()</h3>
+<pre class="programlisting">const <span class="returnvalue">gchar</span> *       g_object_info_get_type_name         (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the name of the objects class/type.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>name of the objects type</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-get-type-init"></a><h3>g_object_info_get_type_init ()</h3>
+<pre class="programlisting">const <span class="returnvalue">gchar</span> *       g_object_info_get_type_init         (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the function which when called will return the GType
+function for which this object type is registered.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the type init function</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-get-abstract"></a><h3>g_object_info_get_abstract ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>            g_object_info_get_abstract          (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain if the object type is an abstract type, eg if it cannot be
+instantiated
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></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 object type is abstract</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-get-fundamental"></a><h3>g_object_info_get_fundamental ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>            g_object_info_get_fundamental       (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain if the object type is of a fundamental type which is not
+G_TYPE_OBJECT. This is mostly for supporting GstMiniObject.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></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 object type is a fundamental type</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-get-parent"></a><h3>g_object_info_get_parent ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="returnvalue">GIObjectInfo</span></a> *      g_object_info_get_parent            (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the parent of the object type.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>. Free the struct by calling
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-get-n-interfaces"></a><h3>g_object_info_get_n_interfaces ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_object_info_get_n_interfaces      (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the number of interfaces that this object type has.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>number of interfaces</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-get-interface"></a><h3>g_object_info_get_interface ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="returnvalue">GIInterfaceInfo</span></a> *   g_object_info_get_interface         (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);</pre>
+<p>
+Obtain an object type interface at index <em class="parameter"><code>n</code></em>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
+<td>index of interface to get</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a>. Free the struct by calling
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-get-n-fields"></a><h3>g_object_info_get_n_fields ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_object_info_get_n_fields          (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the number of fields that this object type has.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>number of fields</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-get-field"></a><h3>g_object_info_get_field ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="returnvalue">GIFieldInfo</span></a> *       g_object_info_get_field             (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);</pre>
+<p>
+Obtain an object type field at index <em class="parameter"><code>n</code></em>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
+<td>index of field to get</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="type">GIFieldInfo</span></a>. Free the struct by calling
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-get-n-properties"></a><h3>g_object_info_get_n_properties ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_object_info_get_n_properties      (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the number of properties that this object type has.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>number of properties</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-get-property"></a><h3>g_object_info_get_property ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIPropertyInfo.html#GIPropertyInfo" title="GIPropertyInfo"><span class="returnvalue">GIPropertyInfo</span></a> *    g_object_info_get_property          (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);</pre>
+<p>
+Obtain an object type property at index <em class="parameter"><code>n</code></em>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
+<td>index of property to get</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIPropertyInfo.html#GIPropertyInfo" title="GIPropertyInfo"><span class="type">GIPropertyInfo</span></a>. Free the struct by calling
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-get-n-methods"></a><h3>g_object_info_get_n_methods ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_object_info_get_n_methods         (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the number of methods that this object type has.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>number of methods</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-get-method"></a><h3>g_object_info_get_method ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="returnvalue">GIFunctionInfo</span></a> *    g_object_info_get_method            (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);</pre>
+<p>
+Obtain an object type method at index <em class="parameter"><code>n</code></em>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
+<td>index of method to get</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a>. Free the struct by calling
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-find-method"></a><h3>g_object_info_find_method ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="returnvalue">GIFunctionInfo</span></a> *    g_object_info_find_method           (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
+<p>
+Obtain a method of the object type given a <em class="parameter"><code>name</code></em>. <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> will be
+returned if there's no method available with that name.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>name of method to obtain</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a>. Free the struct by calling
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-get-n-signals"></a><h3>g_object_info_get_n_signals ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_object_info_get_n_signals         (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the number of signals that this object type has.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>number of signals</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-get-signal"></a><h3>g_object_info_get_signal ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GISignalInfo.html#GISignalInfo" title="GISignalInfo"><span class="returnvalue">GISignalInfo</span></a> *      g_object_info_get_signal            (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);</pre>
+<p>
+Obtain an object type signal at index <em class="parameter"><code>n</code></em>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
+<td>index of signal to get</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GISignalInfo.html#GISignalInfo" title="GISignalInfo"><span class="type">GISignalInfo</span></a>. Free the struct by calling
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-get-n-vfuncs"></a><h3>g_object_info_get_n_vfuncs ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_object_info_get_n_vfuncs          (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the number of virtual functions that this object type has.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>number of virtual functions</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-get-vfunc"></a><h3>g_object_info_get_vfunc ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="returnvalue">GIVFuncInfo</span></a> *       g_object_info_get_vfunc             (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);</pre>
+<p>
+Obtain an object type virtual function at index <em class="parameter"><code>n</code></em>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
+<td>index of virtual function to get</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a>. Free the struct by calling
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-get-n-constants"></a><h3>g_object_info_get_n_constants ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_object_info_get_n_constants       (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the number of constants that this object type has.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>number of constants</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-get-constant"></a><h3>g_object_info_get_constant ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo"><span class="returnvalue">GIConstantInfo</span></a> *    g_object_info_get_constant          (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);</pre>
+<p>
+Obtain an object type constant at index <em class="parameter"><code>n</code></em>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
+<td>index of constant to get</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo"><span class="type">GIConstantInfo</span></a>. Free the struct by calling
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-get-class-struct"></a><h3>g_object_info_get_class_struct ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="returnvalue">GIStructInfo</span></a> *      g_object_info_get_class_struct      (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);</pre>
+<p>
+Every <span class="type">GObject</span> has two structures; an instance structure and a class
+structure.  This function returns the metadata for the class structure.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> or <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>. Free with
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-find-vfunc"></a><h3>g_object_info_find_vfunc ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="returnvalue">GIVFuncInfo</span></a> *       g_object_info_find_vfunc            (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
+<p>
+Locate a virtual function slot with name <em class="parameter"><code>name</code></em>. Note that the namespace
+for virtuals is distinct from that of methods; there may or may not be
+a concrete method associated for a virtual. If there is one, it may
+be retrieved using <a class="link" href="gi-GIVFuncInfo.html#g-vfunc-info-get-invoker" title="g_vfunc_info_get_invoker ()"><code class="function">g_vfunc_info_get_invoker()</code></a>, otherwise <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> will be
+returned.
+See the documentation for <a class="link" href="gi-GIVFuncInfo.html#g-vfunc-info-get-invoker" title="g_vfunc_info_get_invoker ()"><code class="function">g_vfunc_info_get_invoker()</code></a> for more
+information on invoking virtuals.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>The name of a virtual function to find.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a>, or <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>. Free it with
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-get-unref-function"></a><h3>g_object_info_get_unref_function ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> *        g_object_info_get_unref_function    (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the symbol name of the function that should be called to unref this
+object type. It's mainly used fundamental types. The type signature for
+the symbol is <a class="link" href="gi-GIObjectInfo.html#GIObjectInfoUnrefFunction" title="GIObjectInfoUnrefFunction ()"><code class="literal">GIObjectInfoUnrefFunction</code></a>, to fetch the function pointer
+see <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-unref-function" title="g_object_info_get_unref_function ()"><code class="function">g_object_info_get_unref_function()</code></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the symbol or <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-get-unref-function-pointer"></a><h3>g_object_info_get_unref_function_pointer ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIObjectInfo.html#GIObjectInfoUnrefFunction" title="GIObjectInfoUnrefFunction ()"><span class="returnvalue">GIObjectInfoUnrefFunction</span></a> g_object_info_get_unref_function_pointer
+                                                        (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain a pointer to a function which can be used to
+decrease the reference count an instance of this object type.
+This takes derivation into account and will reversely traverse
+the base classes of this type, starting at the top type.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the function pointer or <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-get-ref-function"></a><h3>g_object_info_get_ref_function ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> *        g_object_info_get_ref_function      (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the symbol name of the function that should be called to ref this
+object type. It's mainly used fundamental types. The type signature for
+the symbol is <a class="link" href="gi-GIObjectInfo.html#GIObjectInfoRefFunction" title="GIObjectInfoRefFunction ()"><code class="literal">GIObjectInfoRefFunction</code></a>, to fetch the function pointer
+see <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-ref-function" title="g_object_info_get_ref_function ()"><code class="function">g_object_info_get_ref_function()</code></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the symbol or <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-get-ref-function-pointer"></a><h3>g_object_info_get_ref_function_pointer ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIObjectInfo.html#GIObjectInfoRefFunction" title="GIObjectInfoRefFunction ()"><span class="returnvalue">GIObjectInfoRefFunction</span></a> g_object_info_get_ref_function_pointer
+                                                        (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain a pointer to a function which can be used to
+increase the reference count an instance of this object type.
+This takes derivation into account and will reversely traverse
+the base classes of this type, starting at the top type.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the function pointer or <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-get-set-value-function"></a><h3>g_object_info_get_set_value_function ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> *        g_object_info_get_set_value_function
+                                                        (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the symbol name of the function that should be called to convert
+set a GValue giving an object instance pointer of this object type.
+I's mainly used fundamental types. The type signature for the symbol
+is <a class="link" href="gi-GIObjectInfo.html#GIObjectInfoSetValueFunction" title="GIObjectInfoSetValueFunction ()"><code class="literal">GIObjectInfoSetValueFunction</code></a>, to fetch the function pointer
+see <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-set-value-function" title="g_object_info_get_set_value_function ()"><code class="function">g_object_info_get_set_value_function()</code></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the symbol or <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-get-set-value-function-pointer"></a><h3>g_object_info_get_set_value_function_pointer ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIObjectInfo.html#GIObjectInfoSetValueFunction" title="GIObjectInfoSetValueFunction ()"><span class="returnvalue">GIObjectInfoSetValueFunction</span></a> g_object_info_get_set_value_function_pointer
+                                                        (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain a pointer to a function which can be used to
+set a GValue given an instance of this object type.
+This takes derivation into account and will reversely traverse
+the base classes of this type, starting at the top type.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the function pointer or <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-get-get-value-function"></a><h3>g_object_info_get_get_value_function ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> *        g_object_info_get_get_value_function
+                                                        (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the symbol name of the function that should be called to convert
+an object instance pointer of this object type to a GValue.
+I's mainly used fundamental types. The type signature for the symbol
+is <a class="link" href="gi-GIObjectInfo.html#GIObjectInfoGetValueFunction" title="GIObjectInfoGetValueFunction ()"><code class="literal">GIObjectInfoGetValueFunction</code></a>, to fetch the function pointer
+see <a class="link" href="gi-GIObjectInfo.html#g-object-info-get-get-value-function" title="g_object_info_get_get_value_function ()"><code class="function">g_object_info_get_get_value_function()</code></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the symbol or <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-object-info-get-get-value-function-pointer"></a><h3>g_object_info_get_get_value_function_pointer ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIObjectInfo.html#GIObjectInfoGetValueFunction" title="GIObjectInfoGetValueFunction ()"><span class="returnvalue">GIObjectInfoGetValueFunction</span></a> g_object_info_get_get_value_function_pointer
+                                                        (<em class="parameter"><code><a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain a pointer to a function which can be used to
+extract an instance of this object type out of a GValue.
+This takes derivation into account and will reversely traverse
+the base classes of this type, starting at the top type.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the function pointer or <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi-GIPropertyInfo.html b/docs/reference/html/gi-GIPropertyInfo.html
new file mode 100644 (file)
index 0000000..e498c4a
--- /dev/null
@@ -0,0 +1,158 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GIPropertyInfo</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="gi-repository-structs.html" title="GIRepository structs">
+<link rel="prev" href="gi-GIFieldInfo.html" title="GIFieldInfo">
+<link rel="next" href="gi-GIVFuncInfo.html" title="GIVFuncInfo">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="gi-GIFieldInfo.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="gi-repository-structs.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="gi-GIVFuncInfo.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#gi-GIPropertyInfo.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#gi-GIPropertyInfo.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry">
+<a name="gi-GIPropertyInfo"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="gi-GIPropertyInfo.top_of_page"></a>GIPropertyInfo</span></h2>
+<p>GIPropertyInfo â€” Struct representing a property</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<a name="gi-GIPropertyInfo.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">#define             <a class="link" href="gi-GIPropertyInfo.html#GI-IS-PROPERTY-INFO:CAPS" title="GI_IS_PROPERTY_INFO()">GI_IS_PROPERTY_INFO</a>                 (info)
+typedef             <a class="link" href="gi-GIPropertyInfo.html#GIPropertyInfo" title="GIPropertyInfo">GIPropertyInfo</a>;
+<span class="returnvalue">GParamFlags</span>         <a class="link" href="gi-GIPropertyInfo.html#g-property-info-get-flags" title="g_property_info_get_flags ()">g_property_info_get_flags</a>           (<em class="parameter"><code><a class="link" href="gi-GIPropertyInfo.html#GIPropertyInfo" title="GIPropertyInfo"><span class="type">GIPropertyInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="returnvalue">GITypeInfo</span></a> *        <a class="link" href="gi-GIPropertyInfo.html#g-property-info-get-type" title="g_property_info_get_type ()">g_property_info_get_type</a>            (<em class="parameter"><code><a class="link" href="gi-GIPropertyInfo.html#GIPropertyInfo" title="GIPropertyInfo"><span class="type">GIPropertyInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIArgInfo.html#GITransfer" title="enum GITransfer"><span class="returnvalue">GITransfer</span></a>          <a class="link" href="gi-GIPropertyInfo.html#g-property-info-get-ownership-transfer" title="g_property_info_get_ownership_transfer ()">g_property_info_get_ownership_transfer</a>
+                                                        (<em class="parameter"><code><a class="link" href="gi-GIPropertyInfo.html#GIPropertyInfo" title="GIPropertyInfo"><span class="type">GIPropertyInfo</span></a> *info</code></em>);
+</pre>
+</div>
+<div class="refsect1">
+<a name="gi-GIPropertyInfo.description"></a><h2>Description</h2>
+<p>
+GIPropertyInfo represents a property. A property belongs to
+either a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> or a <a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a>.
+</p>
+<p>
+</p>
+<div class="refsect1">
+<a name="gi-gipropertyinfo.struct-hierarchy"></a><h2>Struct hierarchy</h2>
+<pre class="synopsis">
+  <a class="link" href="gi-GIBaseInfo.html" title="GIBaseInfo">GIBaseInfo</a>
+   +----GIPropertyInfo
+</pre>
+</div>
+<p>
+</p>
+</div>
+<div class="refsect1">
+<a name="gi-GIPropertyInfo.details"></a><h2>Details</h2>
+<div class="refsect2">
+<a name="GI-IS-PROPERTY-INFO:CAPS"></a><h3>GI_IS_PROPERTY_INFO()</h3>
+<pre class="programlisting">#define             GI_IS_PROPERTY_INFO(info)</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIPropertyInfo"></a><h3>GIPropertyInfo</h3>
+<pre class="programlisting">typedef GIBaseInfo GIPropertyInfo;
+</pre>
+<p>
+Represents a property of a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> or a <a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a>.
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-property-info-get-flags"></a><h3>g_property_info_get_flags ()</h3>
+<pre class="programlisting"><span class="returnvalue">GParamFlags</span>         g_property_info_get_flags           (<em class="parameter"><code><a class="link" href="gi-GIPropertyInfo.html#GIPropertyInfo" title="GIPropertyInfo"><span class="type">GIPropertyInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the flags for this property info. See <span class="type">GParamFags</span> for
+more information about possible flag values.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIPropertyInfo.html#GIPropertyInfo" title="GIPropertyInfo"><span class="type">GIPropertyInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the flags</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-property-info-get-type"></a><h3>g_property_info_get_type ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="returnvalue">GITypeInfo</span></a> *        g_property_info_get_type            (<em class="parameter"><code><a class="link" href="gi-GIPropertyInfo.html#GIPropertyInfo" title="GIPropertyInfo"><span class="type">GIPropertyInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the type information for the property <em class="parameter"><code>info</code></em>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIPropertyInfo.html#GIPropertyInfo" title="GIPropertyInfo"><span class="type">GIPropertyInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a>, free it with
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-property-info-get-ownership-transfer"></a><h3>g_property_info_get_ownership_transfer ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIArgInfo.html#GITransfer" title="enum GITransfer"><span class="returnvalue">GITransfer</span></a>          g_property_info_get_ownership_transfer
+                                                        (<em class="parameter"><code><a class="link" href="gi-GIPropertyInfo.html#GIPropertyInfo" title="GIPropertyInfo"><span class="type">GIPropertyInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the ownership transfer for this property. See <a class="link" href="gi-GIArgInfo.html#GITransfer" title="enum GITransfer"><span class="type">GITransfer</span></a> for more
+information about transfer values.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIPropertyInfo.html#GIPropertyInfo" title="GIPropertyInfo"><span class="type">GIPropertyInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the transfer</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi-GIRegisteredTypeInfo.html b/docs/reference/html/gi-GIRegisteredTypeInfo.html
new file mode 100644 (file)
index 0000000..22943fc
--- /dev/null
@@ -0,0 +1,176 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GIRegisteredTypeInfo</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="gi-repository-structs.html" title="GIRepository structs">
+<link rel="prev" href="gi-GIEnumInfo.html" title="GIEnumInfo">
+<link rel="next" href="gi-GIObjectInfo.html" title="GIObjectInfo">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="gi-GIEnumInfo.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="gi-repository-structs.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="gi-GIObjectInfo.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#gi-GIRegisteredTypeInfo.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#gi-GIRegisteredTypeInfo.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry">
+<a name="gi-GIRegisteredTypeInfo"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="gi-GIRegisteredTypeInfo.top_of_page"></a>GIRegisteredTypeInfo</span></h2>
+<p>GIRegisteredTypeInfo â€” Struct representing a struct with a GType</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<a name="gi-GIRegisteredTypeInfo.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">#define             <a class="link" href="gi-GIRegisteredTypeInfo.html#GI-IS-REGISTERED-TYPE-INFO:CAPS" title="GI_IS_REGISTERED_TYPE_INFO()">GI_IS_REGISTERED_TYPE_INFO</a>          (info)
+typedef             <a class="link" href="gi-GIRegisteredTypeInfo.html#GIRegisteredTypeInfo" title="GIRegisteredTypeInfo">GIRegisteredTypeInfo</a>;
+const <span class="returnvalue">gchar</span> *       <a class="link" href="gi-GIRegisteredTypeInfo.html#g-registered-type-info-get-type-name" title="g_registered_type_info_get_type_name ()">g_registered_type_info_get_type_name</a>
+                                                        (<em class="parameter"><code><a class="link" href="gi-GIRegisteredTypeInfo.html#GIRegisteredTypeInfo" title="GIRegisteredTypeInfo"><span class="type">GIRegisteredTypeInfo</span></a> *info</code></em>);
+const <span class="returnvalue">gchar</span> *       <a class="link" href="gi-GIRegisteredTypeInfo.html#g-registered-type-info-get-type-init" title="g_registered_type_info_get_type_init ()">g_registered_type_info_get_type_init</a>
+                                                        (<em class="parameter"><code><a class="link" href="gi-GIRegisteredTypeInfo.html#GIRegisteredTypeInfo" title="GIRegisteredTypeInfo"><span class="type">GIRegisteredTypeInfo</span></a> *info</code></em>);
+<span class="returnvalue">GType</span>               <a class="link" href="gi-GIRegisteredTypeInfo.html#g-registered-type-info-get-g-type" title="g_registered_type_info_get_g_type ()">g_registered_type_info_get_g_type</a>   (<em class="parameter"><code><a class="link" href="gi-GIRegisteredTypeInfo.html#GIRegisteredTypeInfo" title="GIRegisteredTypeInfo"><span class="type">GIRegisteredTypeInfo</span></a> *info</code></em>);
+</pre>
+</div>
+<div class="refsect1">
+<a name="gi-GIRegisteredTypeInfo.description"></a><h2>Description</h2>
+<p>
+GIRegisteredTypeInfo represents an entity with a GType associated. Could
+be either a <a class="link" href="gi-GIEnumInfo.html#GIEnumInfo" title="GIEnumInfo"><span class="type">GIEnumInfo</span></a>, <a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a>, <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a>, <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> or a
+<a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a>.
+</p>
+<p>
+A registered type info struct has a name and a type function.
+To get the name call <a class="link" href="gi-GIRegisteredTypeInfo.html#g-registered-type-info-get-type-name" title="g_registered_type_info_get_type_name ()"><code class="function">g_registered_type_info_get_type_name()</code></a>.
+Most users want to call <a class="link" href="gi-GIRegisteredTypeInfo.html#g-registered-type-info-get-g-type" title="g_registered_type_info_get_g_type ()"><code class="function">g_registered_type_info_get_g_type()</code></a> and don't worry
+about the rest of the details.
+</p>
+<p>
+</p>
+<div class="refsect1">
+<a name="gi-giregisteredtypeinfo.struct-hierarchy"></a><h2>Struct hierarchy</h2>
+<pre class="synopsis">
+  <a class="link" href="gi-GIBaseInfo.html" title="GIBaseInfo">GIBaseInfo</a>
+   +----GIRegisteredTypeInfo
+         +----<a class="link" href="gi-GIEnumInfo.html" title="GIEnumInfo">GIEnumInfo</a>
+         +----<a class="link" href="gi-GIInterfaceInfo.html" title="GIInterfaceInfo">GIInterfaceInfo</a>
+         +----<a class="link" href="gi-GIObjectInfo.html" title="GIObjectInfo">GIObjectInfo</a>
+         +----<a class="link" href="gi-GIStructInfo.html" title="GIStructInfo">GIStructInfo</a>
+         +----<a class="link" href="gi-GIUnionInfo.html" title="GIUnionInfo">GIUnionInfo</a>
+</pre>
+</div>
+<p>
+</p>
+</div>
+<div class="refsect1">
+<a name="gi-GIRegisteredTypeInfo.details"></a><h2>Details</h2>
+<div class="refsect2">
+<a name="GI-IS-REGISTERED-TYPE-INFO:CAPS"></a><h3>GI_IS_REGISTERED_TYPE_INFO()</h3>
+<pre class="programlisting">#define             GI_IS_REGISTERED_TYPE_INFO(info)</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIRegisteredTypeInfo"></a><h3>GIRegisteredTypeInfo</h3>
+<pre class="programlisting">typedef GIBaseInfo GIRegisteredTypeInfo;
+</pre>
+<p>
+Represent a registered type.
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-registered-type-info-get-type-name"></a><h3>g_registered_type_info_get_type_name ()</h3>
+<pre class="programlisting">const <span class="returnvalue">gchar</span> *       g_registered_type_info_get_type_name
+                                                        (<em class="parameter"><code><a class="link" href="gi-GIRegisteredTypeInfo.html#GIRegisteredTypeInfo" title="GIRegisteredTypeInfo"><span class="type">GIRegisteredTypeInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the type name of the struct within the GObject type system.
+This type can be passed to <code class="function">g_type_name()</code> to get a <span class="type">GType</span>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIRegisteredTypeInfo.html#GIRegisteredTypeInfo" title="GIRegisteredTypeInfo"><span class="type">GIRegisteredTypeInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the type name</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-registered-type-info-get-type-init"></a><h3>g_registered_type_info_get_type_init ()</h3>
+<pre class="programlisting">const <span class="returnvalue">gchar</span> *       g_registered_type_info_get_type_init
+                                                        (<em class="parameter"><code><a class="link" href="gi-GIRegisteredTypeInfo.html#GIRegisteredTypeInfo" title="GIRegisteredTypeInfo"><span class="type">GIRegisteredTypeInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the type init function for <em class="parameter"><code>info</code></em>. The type init function is the
+function which will register the GType within the GObject type system.
+Usually this is not called by langauge bindings or applications, use
+<a class="link" href="gi-GIRegisteredTypeInfo.html#g-registered-type-info-get-g-type" title="g_registered_type_info_get_g_type ()"><code class="function">g_registered_type_info_get_g_type()</code></a> directly instead.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIRegisteredTypeInfo.html#GIRegisteredTypeInfo" title="GIRegisteredTypeInfo"><span class="type">GIRegisteredTypeInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the symbol name of the type init function, suitable for
+passing into <code class="function">g_module_symbol()</code>.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-registered-type-info-get-g-type"></a><h3>g_registered_type_info_get_g_type ()</h3>
+<pre class="programlisting"><span class="returnvalue">GType</span>               g_registered_type_info_get_g_type   (<em class="parameter"><code><a class="link" href="gi-GIRegisteredTypeInfo.html#GIRegisteredTypeInfo" title="GIRegisteredTypeInfo"><span class="type">GIRegisteredTypeInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the <span class="type">GType</span> for this registered type or G_TYPE_NONE which a special meaning.
+It means that either there is no type information associated with this <em class="parameter"><code>info</code></em> or
+that the shared library which provides the type_init function for this
+<em class="parameter"><code>info</code></em> cannot be called.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIRegisteredTypeInfo.html#GIRegisteredTypeInfo" title="GIRegisteredTypeInfo"><span class="type">GIRegisteredTypeInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <span class="type">GType</span>.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi-GISignalInfo.html b/docs/reference/html/gi-GISignalInfo.html
new file mode 100644 (file)
index 0000000..ded2e8d
--- /dev/null
@@ -0,0 +1,165 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GISignalInfo</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="gi-repository-structs.html" title="GIRepository structs">
+<link rel="prev" href="gi-GIVFuncInfo.html" title="GIVFuncInfo">
+<link rel="next" href="gi-GIEnumInfo.html" title="GIEnumInfo">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="gi-GIVFuncInfo.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="gi-repository-structs.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="gi-GIEnumInfo.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#gi-GISignalInfo.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#gi-GISignalInfo.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry">
+<a name="gi-GISignalInfo"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="gi-GISignalInfo.top_of_page"></a>GISignalInfo</span></h2>
+<p>GISignalInfo â€” Struct representing a signal</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<a name="gi-GISignalInfo.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">#define             <a class="link" href="gi-GISignalInfo.html#GI-IS-SIGNAL-INFO:CAPS" title="GI_IS_SIGNAL_INFO()">GI_IS_SIGNAL_INFO</a>                   (info)
+typedef             <a class="link" href="gi-GISignalInfo.html#GISignalInfo" title="GISignalInfo">GISignalInfo</a>;
+<span class="returnvalue">GSignalFlags</span>        <a class="link" href="gi-GISignalInfo.html#g-signal-info-get-flags" title="g_signal_info_get_flags ()">g_signal_info_get_flags</a>             (<em class="parameter"><code><a class="link" href="gi-GISignalInfo.html#GISignalInfo" title="GISignalInfo"><span class="type">GISignalInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="returnvalue">GIVFuncInfo</span></a> *       <a class="link" href="gi-GISignalInfo.html#g-signal-info-get-class-closure" title="g_signal_info_get_class_closure ()">g_signal_info_get_class_closure</a>     (<em class="parameter"><code><a class="link" href="gi-GISignalInfo.html#GISignalInfo" title="GISignalInfo"><span class="type">GISignalInfo</span></a> *info</code></em>);
+<span class="returnvalue">gboolean</span>            <a class="link" href="gi-GISignalInfo.html#g-signal-info-true-stops-emit" title="g_signal_info_true_stops_emit ()">g_signal_info_true_stops_emit</a>       (<em class="parameter"><code><a class="link" href="gi-GISignalInfo.html#GISignalInfo" title="GISignalInfo"><span class="type">GISignalInfo</span></a> *info</code></em>);
+</pre>
+</div>
+<div class="refsect1">
+<a name="gi-GISignalInfo.description"></a><h2>Description</h2>
+<p>
+GISignalInfo represents a signal. It's a sub-struct of <a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a>
+and contains a set of flags and a class closure.
+</p>
+<p>
+See <a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a> for information on how to retreive arguments
+and other metadata from the signal.
+</p>
+<p>
+</p>
+<div class="refsect1">
+<a name="gi-gisignalinfo.struct-hierarchy"></a><h2>Struct hierarchy</h2>
+<pre class="synopsis">
+  <a class="link" href="gi-GIBaseInfo.html" title="GIBaseInfo">GIBaseInfo</a>
+   +----<a class="link" href="gi-GICallableInfo.html" title="GICallableInfo">GICallableInfo</a>
+         +----<a class="link" href="gi-GIFunctionInfo.html" title="GIFunctionInfo">GIFunctionInfo</a>
+         +----GISignalInfo
+         +----<a class="link" href="gi-GIVFuncInfo.html" title="GIVFuncInfo">GIVFuncInfo</a>
+</pre>
+</div>
+<p>
+</p>
+</div>
+<div class="refsect1">
+<a name="gi-GISignalInfo.details"></a><h2>Details</h2>
+<div class="refsect2">
+<a name="GI-IS-SIGNAL-INFO:CAPS"></a><h3>GI_IS_SIGNAL_INFO()</h3>
+<pre class="programlisting">#define             GI_IS_SIGNAL_INFO(info)</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GISignalInfo"></a><h3>GISignalInfo</h3>
+<pre class="programlisting">typedef GIBaseInfo GISignalInfo;
+</pre>
+<p>
+Represents a signal.
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-signal-info-get-flags"></a><h3>g_signal_info_get_flags ()</h3>
+<pre class="programlisting"><span class="returnvalue">GSignalFlags</span>        g_signal_info_get_flags             (<em class="parameter"><code><a class="link" href="gi-GISignalInfo.html#GISignalInfo" title="GISignalInfo"><span class="type">GISignalInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the flags for this signal info. See <span class="type">GSignalFlags</span> for
+more information about possible flag values.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GISignalInfo.html#GISignalInfo" title="GISignalInfo"><span class="type">GISignalInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the flags</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-signal-info-get-class-closure"></a><h3>g_signal_info_get_class_closure ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="returnvalue">GIVFuncInfo</span></a> *       g_signal_info_get_class_closure     (<em class="parameter"><code><a class="link" href="gi-GISignalInfo.html#GISignalInfo" title="GISignalInfo"><span class="type">GISignalInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the class closure for this signal if one is set. The class
+closure is a virtual function on the type that the signal belongs to.
+If the signal lacks a closure <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> will be returned.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GISignalInfo.html#GISignalInfo" title="GISignalInfo"><span class="type">GISignalInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the class closure or <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-signal-info-true-stops-emit"></a><h3>g_signal_info_true_stops_emit ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>            g_signal_info_true_stops_emit       (<em class="parameter"><code><a class="link" href="gi-GISignalInfo.html#GISignalInfo" title="GISignalInfo"><span class="type">GISignalInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain if the returning true in the signal handler will
+stop the emission of the signal.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GISignalInfo.html#GISignalInfo" title="GISignalInfo"><span class="type">GISignalInfo</span></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 returning true stops the signal emission</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi-GIStructInfo.html b/docs/reference/html/gi-GIStructInfo.html
new file mode 100644 (file)
index 0000000..e47b450
--- /dev/null
@@ -0,0 +1,303 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GIStructInfo</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="gi-repository-structs.html" title="GIRepository structs">
+<link rel="prev" href="gi-GITypeInfo.html" title="GITypeInfo">
+<link rel="next" href="gi-GIUnionInfo.html" title="GIUnionInfo">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="gi-GITypeInfo.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="gi-repository-structs.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="gi-GIUnionInfo.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#gi-GIStructInfo.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#gi-GIStructInfo.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry">
+<a name="gi-GIStructInfo"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="gi-GIStructInfo.top_of_page"></a>GIStructInfo</span></h2>
+<p>GIStructInfo â€” Struct representing a C structure</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<a name="gi-GIStructInfo.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">#define             <a class="link" href="gi-GIStructInfo.html#GI-IS-STRUCT-INFO:CAPS" title="GI_IS_STRUCT_INFO()">GI_IS_STRUCT_INFO</a>                   (info)
+typedef             <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo">GIStructInfo</a>;
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GIStructInfo.html#g-struct-info-get-n-fields" title="g_struct_info_get_n_fields ()">g_struct_info_get_n_fields</a>          (<em class="parameter"><code><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="returnvalue">GIFieldInfo</span></a> *       <a class="link" href="gi-GIStructInfo.html#g-struct-info-get-field" title="g_struct_info_get_field ()">g_struct_info_get_field</a>             (<em class="parameter"><code><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GIStructInfo.html#g-struct-info-get-n-methods" title="g_struct_info_get_n_methods ()">g_struct_info_get_n_methods</a>         (<em class="parameter"><code><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="returnvalue">GIFunctionInfo</span></a> *    <a class="link" href="gi-GIStructInfo.html#g-struct-info-get-method" title="g_struct_info_get_method ()">g_struct_info_get_method</a>            (<em class="parameter"><code><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);
+<a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="returnvalue">GIFunctionInfo</span></a> *    <a class="link" href="gi-GIStructInfo.html#g-struct-info-find-method" title="g_struct_info_find_method ()">g_struct_info_find_method</a>           (<em class="parameter"><code><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);
+<span class="returnvalue">gsize</span>               <a class="link" href="gi-GIStructInfo.html#g-struct-info-get-size" title="g_struct_info_get_size ()">g_struct_info_get_size</a>              (<em class="parameter"><code><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> *info</code></em>);
+<span class="returnvalue">gsize</span>               <a class="link" href="gi-GIStructInfo.html#g-struct-info-get-alignment" title="g_struct_info_get_alignment ()">g_struct_info_get_alignment</a>         (<em class="parameter"><code><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> *info</code></em>);
+<span class="returnvalue">gboolean</span>            <a class="link" href="gi-GIStructInfo.html#g-struct-info-is-gtype-struct" title="g_struct_info_is_gtype_struct ()">g_struct_info_is_gtype_struct</a>       (<em class="parameter"><code><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> *info</code></em>);
+<span class="returnvalue">gboolean</span>            <a class="link" href="gi-GIStructInfo.html#g-struct-info-is-foreign" title="g_struct_info_is_foreign ()">g_struct_info_is_foreign</a>            (<em class="parameter"><code><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> *info</code></em>);
+</pre>
+</div>
+<div class="refsect1">
+<a name="gi-GIStructInfo.description"></a><h2>Description</h2>
+<p>
+GIStructInfo represents a generic C structure type.
+</p>
+<p>
+A structure has methods and fields.
+</p>
+<p>
+</p>
+<div class="refsect1">
+<a name="gi-giobjectinfo.struct-hierarchy"></a><h2>Struct hierarchy</h2>
+<pre class="synopsis">
+  <a class="link" href="gi-GIBaseInfo.html" title="GIBaseInfo">GIBaseInfo</a>
+   +----<a class="link" href="gi-GIRegisteredTypeInfo.html" title="GIRegisteredTypeInfo">GIRegisteredTypeInfo</a>
+         +----GIStructInfo
+</pre>
+</div>
+<p>
+</p>
+</div>
+<div class="refsect1">
+<a name="gi-GIStructInfo.details"></a><h2>Details</h2>
+<div class="refsect2">
+<a name="GI-IS-STRUCT-INFO:CAPS"></a><h3>GI_IS_STRUCT_INFO()</h3>
+<pre class="programlisting">#define             GI_IS_STRUCT_INFO(info)</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIStructInfo"></a><h3>GIStructInfo</h3>
+<pre class="programlisting">typedef GIBaseInfo GIStructInfo;
+</pre>
+<p>
+Represents a struct.
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-struct-info-get-n-fields"></a><h3>g_struct_info_get_n_fields ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_struct_info_get_n_fields          (<em class="parameter"><code><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the number of fields this structure has.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>number of fields</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-struct-info-get-field"></a><h3>g_struct_info_get_field ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="returnvalue">GIFieldInfo</span></a> *       g_struct_info_get_field             (<em class="parameter"><code><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);</pre>
+<p>
+Obtain the type information for field with specified index.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
+<td>a field index</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="type">GIFieldInfo</span></a>, free it with <a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a>
+when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-struct-info-get-n-methods"></a><h3>g_struct_info_get_n_methods ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_struct_info_get_n_methods         (<em class="parameter"><code><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the number of methods this structure has.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>number of methods</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-struct-info-get-method"></a><h3>g_struct_info_get_method ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="returnvalue">GIFunctionInfo</span></a> *    g_struct_info_get_method            (<em class="parameter"><code><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);</pre>
+<p>
+Obtain the type information for method with specified index.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
+<td>a method index</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a>, free it with <a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a>
+when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-struct-info-find-method"></a><h3>g_struct_info_find_method ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="returnvalue">GIFunctionInfo</span></a> *    g_struct_info_find_method           (<em class="parameter"><code><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
+<p>
+Obtain the type information for method named <em class="parameter"><code>name</code></em>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>a method name</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a>, free it with <a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a>
+when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-struct-info-get-size"></a><h3>g_struct_info_get_size ()</h3>
+<pre class="programlisting"><span class="returnvalue">gsize</span>               g_struct_info_get_size              (<em class="parameter"><code><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the total size of the structure.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>size of the structure in bytes</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-struct-info-get-alignment"></a><h3>g_struct_info_get_alignment ()</h3>
+<pre class="programlisting"><span class="returnvalue">gsize</span>               g_struct_info_get_alignment         (<em class="parameter"><code><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the required alignment of the structure.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>required alignment in bytes</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-struct-info-is-gtype-struct"></a><h3>g_struct_info_is_gtype_struct ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>            g_struct_info_is_gtype_struct       (<em class="parameter"><code><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> *info</code></em>);</pre>
+<p>
+Return true if this structure represents the "class structure" for some
+<span class="type">GObject</span> or <span class="type">GInterface</span>.  This function is mainly useful to hide this kind of structure
+from generated public APIs.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></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 this is a class struct, <code class="literal">FALSE</code> otherwise</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-struct-info-is-foreign"></a><h3>g_struct_info_is_foreign ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>            g_struct_info_is_foreign            (<em class="parameter"><code><a class="link" href="gi-GIStructInfo.html#GIStructInfo" title="GIStructInfo"><span class="type">GIStructInfo</span></a> *info</code></em>);</pre>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi-GITypeInfo.html b/docs/reference/html/gi-GITypeInfo.html
new file mode 100644 (file)
index 0000000..e0f21bb
--- /dev/null
@@ -0,0 +1,518 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GITypeInfo</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="gi-repository-structs.html" title="GIRepository structs">
+<link rel="prev" href="gi-GIArgInfo.html" title="GIArgInfo">
+<link rel="next" href="gi-GIStructInfo.html" title="GIStructInfo">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="gi-GIArgInfo.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="gi-repository-structs.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="gi-GIStructInfo.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#gi-GITypeInfo.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#gi-GITypeInfo.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry">
+<a name="gi-GITypeInfo"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="gi-GITypeInfo.top_of_page"></a>GITypeInfo</span></h2>
+<p>GITypeInfo â€” Struct representing a type</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<a name="gi-GITypeInfo.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">#define             <a class="link" href="gi-GITypeInfo.html#GI-IS-TYPE-INFO:CAPS" title="GI_IS_TYPE_INFO()">GI_IS_TYPE_INFO</a>                     (info)
+enum                <a class="link" href="gi-GITypeInfo.html#GIArrayType" title="enum GIArrayType">GIArrayType</a>;
+typedef             <a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo">GITypeInfo</a>;
+enum                <a class="link" href="gi-GITypeInfo.html#GITypeTag" title="enum GITypeTag">GITypeTag</a>;
+#define             <a class="link" href="gi-GITypeInfo.html#G-TYPE-TAG-IS-BASIC:CAPS" title="G_TYPE_TAG_IS_BASIC()">G_TYPE_TAG_IS_BASIC</a>                 (tag)
+const <span class="returnvalue">gchar</span> *       <a class="link" href="gi-GITypeInfo.html#g-type-tag-to-string" title="g_type_tag_to_string ()">g_type_tag_to_string</a>                (<em class="parameter"><code><a class="link" href="gi-GITypeInfo.html#GITypeTag" title="enum GITypeTag"><span class="type">GITypeTag</span></a> type</code></em>);
+<span class="returnvalue">gboolean</span>            <a class="link" href="gi-GITypeInfo.html#g-type-info-is-pointer" title="g_type_info_is_pointer ()">g_type_info_is_pointer</a>              (<em class="parameter"><code><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GITypeInfo.html#GITypeTag" title="enum GITypeTag"><span class="returnvalue">GITypeTag</span></a>           <a class="link" href="gi-GITypeInfo.html#g-type-info-get-tag" title="g_type_info_get_tag ()">g_type_info_get_tag</a>                 (<em class="parameter"><code><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="returnvalue">GITypeInfo</span></a> *        <a class="link" href="gi-GITypeInfo.html#g-type-info-get-param-type" title="g_type_info_get_param_type ()">g_type_info_get_param_type</a>          (<em class="parameter"><code><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);
+<a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="returnvalue">GIBaseInfo</span></a> *        <a class="link" href="gi-GITypeInfo.html#g-type-info-get-interface" title="g_type_info_get_interface ()">g_type_info_get_interface</a>           (<em class="parameter"><code><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a> *info</code></em>);
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GITypeInfo.html#g-type-info-get-array-length" title="g_type_info_get_array_length ()">g_type_info_get_array_length</a>        (<em class="parameter"><code><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a> *info</code></em>);
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GITypeInfo.html#g-type-info-get-array-fixed-size" title="g_type_info_get_array_fixed_size ()">g_type_info_get_array_fixed_size</a>    (<em class="parameter"><code><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a> *info</code></em>);
+<span class="returnvalue">gboolean</span>            <a class="link" href="gi-GITypeInfo.html#g-type-info-is-zero-terminated" title="g_type_info_is_zero_terminated ()">g_type_info_is_zero_terminated</a>      (<em class="parameter"><code><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GITypeInfo.html#GIArrayType" title="enum GIArrayType"><span class="returnvalue">GIArrayType</span></a>         <a class="link" href="gi-GITypeInfo.html#g-type-info-get-array-type" title="g_type_info_get_array_type ()">g_type_info_get_array_type</a>          (<em class="parameter"><code><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a> *info</code></em>);
+</pre>
+</div>
+<div class="refsect1">
+<a name="gi-GITypeInfo.description"></a><h2>Description</h2>
+<p>
+GITypeInfo represents a type. You can retrieve a type info from
+an argument (see <a class="link" href="gi-GIArgInfo.html#GIArgInfo" title="GIArgInfo"><span class="type">GIArgInfo</span></a>), a functions return value (see <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a>),
+a field (see <a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="type">GIFieldInfo</span></a>), a property (see <a class="link" href="gi-GIPropertyInfo.html#GIPropertyInfo" title="GIPropertyInfo"><span class="type">GIPropertyInfo</span></a>), a constant
+(see <a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo"><span class="type">GIConstantInfo</span></a>) or for a union discriminator (see <a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a>).
+</p>
+<p>
+A type can either be a of a basic type which is a standard C primitive
+type or an interface type. For interface types you need to call
+<a class="link" href="gi-GITypeInfo.html#g-type-info-get-interface" title="g_type_info_get_interface ()"><code class="function">g_type_info_get_interface()</code></a> to get a reference to the base info for that
+interface.
+</p>
+<p>
+</p>
+<div class="refsect1">
+<a name="gi-gitypeinfo.struct-hierarchy"></a><h2>Struct hierarchy</h2>
+<pre class="synopsis">
+  <a class="link" href="gi-GIBaseInfo.html" title="GIBaseInfo">GIBaseInfo</a>
+   +----GITypeInfo
+</pre>
+</div>
+<p>
+</p>
+</div>
+<div class="refsect1">
+<a name="gi-GITypeInfo.details"></a><h2>Details</h2>
+<div class="refsect2">
+<a name="GI-IS-TYPE-INFO:CAPS"></a><h3>GI_IS_TYPE_INFO()</h3>
+<pre class="programlisting">#define             GI_IS_TYPE_INFO(info)</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIArrayType"></a><h3>enum GIArrayType</h3>
+<pre class="programlisting">typedef enum {
+  GI_ARRAY_TYPE_C,
+  GI_ARRAY_TYPE_ARRAY,
+  GI_ARRAY_TYPE_PTR_ARRAY,
+  GI_ARRAY_TYPE_BYTE_ARRAY
+} GIArrayType;
+</pre>
+<p>
+The type of array in a <a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><a name="GI-ARRAY-TYPE-C:CAPS"></a><span class="term"><code class="literal">GI_ARRAY_TYPE_C</code></span></p></td>
+<td>a C array, char[] for instance
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-ARRAY-TYPE-ARRAY:CAPS"></a><span class="term"><code class="literal">GI_ARRAY_TYPE_ARRAY</code></span></p></td>
+<td>a <em class="parameter"><code>GArray</code></em> array
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-ARRAY-TYPE-PTR-ARRAY:CAPS"></a><span class="term"><code class="literal">GI_ARRAY_TYPE_PTR_ARRAY</code></span></p></td>
+<td>a <span class="type">GPtrArray</span> array
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-ARRAY-TYPE-BYTE-ARRAY:CAPS"></a><span class="term"><code class="literal">GI_ARRAY_TYPE_BYTE_ARRAY</code></span></p></td>
+<td>a <span class="type">GByteArray</span> array
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GITypeInfo"></a><h3>GITypeInfo</h3>
+<pre class="programlisting">typedef GIBaseInfo GITypeInfo;
+</pre>
+<p>
+Represents type information, direction, transfer etc.
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GITypeTag"></a><h3>enum GITypeTag</h3>
+<pre class="programlisting">typedef enum {
+  /* Basic types */
+  GI_TYPE_TAG_VOID      =  0,
+  GI_TYPE_TAG_BOOLEAN   =  1,
+  GI_TYPE_TAG_INT8      =  2,
+  GI_TYPE_TAG_UINT8     =  3,
+  GI_TYPE_TAG_INT16     =  4,
+  GI_TYPE_TAG_UINT16    =  5,
+  GI_TYPE_TAG_INT32     =  6,
+  GI_TYPE_TAG_UINT32    =  7,
+  GI_TYPE_TAG_INT64     =  8,
+  GI_TYPE_TAG_UINT64    =  9,
+  GI_TYPE_TAG_FLOAT     = 10,
+  GI_TYPE_TAG_DOUBLE    = 11,
+  GI_TYPE_TAG_GTYPE     = 12,
+  GI_TYPE_TAG_UTF8      = 13,
+  GI_TYPE_TAG_FILENAME  = 14,
+  /* Non-basic types; compare with G_TYPE_TAG_IS_BASIC */
+  GI_TYPE_TAG_ARRAY     = 15,
+  GI_TYPE_TAG_INTERFACE = 16,
+  GI_TYPE_TAG_GLIST     = 17,
+  GI_TYPE_TAG_GSLIST    = 18,
+  GI_TYPE_TAG_GHASH     = 19,
+  GI_TYPE_TAG_ERROR     = 20,
+  /* Another basic type */
+  GI_TYPE_TAG_UNICHAR   = 21
+  /* Note - there is only room currently for 32 tags.
+   * See docs/typelib-format.txt SimpleTypeBlob definition */
+} GITypeTag;
+</pre>
+<p>
+The type tag of a <a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><a name="GI-TYPE-TAG-VOID:CAPS"></a><span class="term"><code class="literal">GI_TYPE_TAG_VOID</code></span></p></td>
+<td>void
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-TYPE-TAG-BOOLEAN:CAPS"></a><span class="term"><code class="literal">GI_TYPE_TAG_BOOLEAN</code></span></p></td>
+<td>boolean
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-TYPE-TAG-INT8:CAPS"></a><span class="term"><code class="literal">GI_TYPE_TAG_INT8</code></span></p></td>
+<td>8-bit signed integer
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-TYPE-TAG-UINT8:CAPS"></a><span class="term"><code class="literal">GI_TYPE_TAG_UINT8</code></span></p></td>
+<td>8-bit unsigned integer
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-TYPE-TAG-INT16:CAPS"></a><span class="term"><code class="literal">GI_TYPE_TAG_INT16</code></span></p></td>
+<td>16-bit signed integer
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-TYPE-TAG-UINT16:CAPS"></a><span class="term"><code class="literal">GI_TYPE_TAG_UINT16</code></span></p></td>
+<td>16-bit unsigned integer
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-TYPE-TAG-INT32:CAPS"></a><span class="term"><code class="literal">GI_TYPE_TAG_INT32</code></span></p></td>
+<td>32-bit signed integer
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-TYPE-TAG-UINT32:CAPS"></a><span class="term"><code class="literal">GI_TYPE_TAG_UINT32</code></span></p></td>
+<td>32-bit unsigned integer
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-TYPE-TAG-INT64:CAPS"></a><span class="term"><code class="literal">GI_TYPE_TAG_INT64</code></span></p></td>
+<td>64-bit signed integer
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-TYPE-TAG-UINT64:CAPS"></a><span class="term"><code class="literal">GI_TYPE_TAG_UINT64</code></span></p></td>
+<td>64-bit unsigned integer
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-TYPE-TAG-FLOAT:CAPS"></a><span class="term"><code class="literal">GI_TYPE_TAG_FLOAT</code></span></p></td>
+<td>float
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-TYPE-TAG-DOUBLE:CAPS"></a><span class="term"><code class="literal">GI_TYPE_TAG_DOUBLE</code></span></p></td>
+<td>double floating point
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-TYPE-TAG-GTYPE:CAPS"></a><span class="term"><code class="literal">GI_TYPE_TAG_GTYPE</code></span></p></td>
+<td>a <span class="type">GType</span>
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-TYPE-TAG-UTF8:CAPS"></a><span class="term"><code class="literal">GI_TYPE_TAG_UTF8</code></span></p></td>
+<td>a UTF-8 encoded string
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-TYPE-TAG-FILENAME:CAPS"></a><span class="term"><code class="literal">GI_TYPE_TAG_FILENAME</code></span></p></td>
+<td>a filename, encoded in the same encoding
+as the native filesystem is using.
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-TYPE-TAG-ARRAY:CAPS"></a><span class="term"><code class="literal">GI_TYPE_TAG_ARRAY</code></span></p></td>
+<td>an array
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-TYPE-TAG-INTERFACE:CAPS"></a><span class="term"><code class="literal">GI_TYPE_TAG_INTERFACE</code></span></p></td>
+<td>an extended interface object
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-TYPE-TAG-GLIST:CAPS"></a><span class="term"><code class="literal">GI_TYPE_TAG_GLIST</code></span></p></td>
+<td>a <span class="type">GList</span>
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-TYPE-TAG-GSLIST:CAPS"></a><span class="term"><code class="literal">GI_TYPE_TAG_GSLIST</code></span></p></td>
+<td>a <span class="type">GSList</span>
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-TYPE-TAG-GHASH:CAPS"></a><span class="term"><code class="literal">GI_TYPE_TAG_GHASH</code></span></p></td>
+<td>a <span class="type">GHashTable</span>
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-TYPE-TAG-ERROR:CAPS"></a><span class="term"><code class="literal">GI_TYPE_TAG_ERROR</code></span></p></td>
+<td>a <span class="type">GError</span>
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-TYPE-TAG-UNICHAR:CAPS"></a><span class="term"><code class="literal">GI_TYPE_TAG_UNICHAR</code></span></p></td>
+<td>Unicode character
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="G-TYPE-TAG-IS-BASIC:CAPS"></a><h3>G_TYPE_TAG_IS_BASIC()</h3>
+<pre class="programlisting">#define G_TYPE_TAG_IS_BASIC(tag) (tag &lt; GI_TYPE_TAG_ARRAY || tag == GI_TYPE_TAG_UNICHAR)
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-type-tag-to-string"></a><h3>g_type_tag_to_string ()</h3>
+<pre class="programlisting">const <span class="returnvalue">gchar</span> *       g_type_tag_to_string                (<em class="parameter"><code><a class="link" href="gi-GITypeInfo.html#GITypeTag" title="enum GITypeTag"><span class="type">GITypeTag</span></a> type</code></em>);</pre>
+<p>
+Obtain a string representation of <em class="parameter"><code>type</code></em>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
+<td>the type_tag</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the string</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-type-info-is-pointer"></a><h3>g_type_info_is_pointer ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>            g_type_info_is_pointer              (<em class="parameter"><code><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain if the type is passed as a reference.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></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 it is a pointer</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-type-info-get-tag"></a><h3>g_type_info_get_tag ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GITypeInfo.html#GITypeTag" title="enum GITypeTag"><span class="returnvalue">GITypeTag</span></a>           g_type_info_get_tag                 (<em class="parameter"><code><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the type tag for the type. See <a class="link" href="gi-GITypeInfo.html#GITypeTag" title="enum GITypeTag"><span class="type">GITypeTag</span></a> for a list
+of type tags.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the type tag</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-type-info-get-param-type"></a><h3>g_type_info_get_param_type ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="returnvalue">GITypeInfo</span></a> *        g_type_info_get_param_type          (<em class="parameter"><code><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);</pre>
+<p>
+Obtain the parameter type <em class="parameter"><code>n</code></em>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
+<td>index of the parameter</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the param type info. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-type-info-get-interface"></a><h3>g_type_info_get_interface ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="returnvalue">GIBaseInfo</span></a> *        g_type_info_get_interface           (<em class="parameter"><code><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a> *info</code></em>);</pre>
+<p>
+For types which have <a class="link" href="gi-GITypeInfo.html#GI-TYPE-TAG-INTERFACE:CAPS"><span class="type">GI_TYPE_TAG_INTERFACE</span></a> such as GObjects and boxed values,
+this function returns full information about the referenced type.  You can then
+inspect the type of the returned <a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> to further query whether it is
+a concrete GObject, a GInterface, a structure, etc. using <a class="link" href="gi-GIBaseInfo.html#g-base-info-get-type" title="g_base_info_get_type ()"><code class="function">g_base_info_get_type()</code></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a>, or <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>. Free it with
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-type-info-get-array-length"></a><h3>g_type_info_get_array_length ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_type_info_get_array_length        (<em class="parameter"><code><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the array length of the type. The type tag must be a
+<a class="link" href="gi-GITypeInfo.html#GI-TYPE-TAG-ARRAY:CAPS"><span class="type">GI_TYPE_TAG_ARRAY</span></a> or -1 will returned.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the array length, or -1 if the type is not an array</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-type-info-get-array-fixed-size"></a><h3>g_type_info_get_array_fixed_size ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_type_info_get_array_fixed_size    (<em class="parameter"><code><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the fixed array size of the type. The type tag must be a
+<a class="link" href="gi-GITypeInfo.html#GI-TYPE-TAG-ARRAY:CAPS"><span class="type">GI_TYPE_TAG_ARRAY</span></a> or -1 will returned.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the size or -1 if it's not an array</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-type-info-is-zero-terminated"></a><h3>g_type_info_is_zero_terminated ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>            g_type_info_is_zero_terminated      (<em class="parameter"><code><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain if the last element of the array is <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>. The type tag must be a
+<a class="link" href="gi-GITypeInfo.html#GI-TYPE-TAG-ARRAY:CAPS"><span class="type">GI_TYPE_TAG_ARRAY</span></a> or <code class="literal">FALSE</code> will returned.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></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 zero terminated</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-type-info-get-array-type"></a><h3>g_type_info_get_array_type ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GITypeInfo.html#GIArrayType" title="enum GIArrayType"><span class="returnvalue">GIArrayType</span></a>         g_type_info_get_array_type          (<em class="parameter"><code><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the array type for this type. See <a class="link" href="gi-GITypeInfo.html#GIArrayType" title="enum GIArrayType"><span class="type">GIArrayType</span></a> for a list of
+possible values. If the type tag of this type is not array, -1 will be
+returned.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the array type or -1</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi-GIUnionInfo.html b/docs/reference/html/gi-GIUnionInfo.html
new file mode 100644 (file)
index 0000000..484fe6e
--- /dev/null
@@ -0,0 +1,363 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GIUnionInfo</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="gi-repository-structs.html" title="GIRepository structs">
+<link rel="prev" href="gi-GIStructInfo.html" title="GIStructInfo">
+<link rel="next" href="gi-GIFieldInfo.html" title="GIFieldInfo">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="gi-GIStructInfo.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="gi-repository-structs.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="gi-GIFieldInfo.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#gi-GIUnionInfo.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#gi-GIUnionInfo.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry">
+<a name="gi-GIUnionInfo"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="gi-GIUnionInfo.top_of_page"></a>GIUnionInfo</span></h2>
+<p>GIUnionInfo â€” Struct representing a union.</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<a name="gi-GIUnionInfo.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">#define             <a class="link" href="gi-GIUnionInfo.html#GI-IS-UNION-INFO:CAPS" title="GI_IS_UNION_INFO()">GI_IS_UNION_INFO</a>                    (info)
+typedef             <a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo">GIUnionInfo</a>;
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GIUnionInfo.html#g-union-info-get-n-fields" title="g_union_info_get_n_fields ()">g_union_info_get_n_fields</a>           (<em class="parameter"><code><a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="returnvalue">GIFieldInfo</span></a> *       <a class="link" href="gi-GIUnionInfo.html#g-union-info-get-field" title="g_union_info_get_field ()">g_union_info_get_field</a>              (<em class="parameter"><code><a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GIUnionInfo.html#g-union-info-get-n-methods" title="g_union_info_get_n_methods ()">g_union_info_get_n_methods</a>          (<em class="parameter"><code><a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="returnvalue">GIFunctionInfo</span></a> *    <a class="link" href="gi-GIUnionInfo.html#g-union-info-get-method" title="g_union_info_get_method ()">g_union_info_get_method</a>             (<em class="parameter"><code><a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);
+<span class="returnvalue">gboolean</span>            <a class="link" href="gi-GIUnionInfo.html#g-union-info-is-discriminated" title="g_union_info_is_discriminated ()">g_union_info_is_discriminated</a>       (<em class="parameter"><code><a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a> *info</code></em>);
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GIUnionInfo.html#g-union-info-get-discriminator-offset" title="g_union_info_get_discriminator_offset ()">g_union_info_get_discriminator_offset</a>
+                                                        (<em class="parameter"><code><a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="returnvalue">GITypeInfo</span></a> *        <a class="link" href="gi-GIUnionInfo.html#g-union-info-get-discriminator-type" title="g_union_info_get_discriminator_type ()">g_union_info_get_discriminator_type</a> (<em class="parameter"><code><a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo"><span class="returnvalue">GIConstantInfo</span></a> *    <a class="link" href="gi-GIUnionInfo.html#g-union-info-get-discriminator" title="g_union_info_get_discriminator ()">g_union_info_get_discriminator</a>      (<em class="parameter"><code><a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);
+<a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="returnvalue">GIFunctionInfo</span></a> *    <a class="link" href="gi-GIUnionInfo.html#g-union-info-find-method" title="g_union_info_find_method ()">g_union_info_find_method</a>            (<em class="parameter"><code><a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);
+<span class="returnvalue">gsize</span>               <a class="link" href="gi-GIUnionInfo.html#g-union-info-get-size" title="g_union_info_get_size ()">g_union_info_get_size</a>               (<em class="parameter"><code><a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a> *info</code></em>);
+<span class="returnvalue">gsize</span>               <a class="link" href="gi-GIUnionInfo.html#g-union-info-get-alignment" title="g_union_info_get_alignment ()">g_union_info_get_alignment</a>          (<em class="parameter"><code><a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a> *info</code></em>);
+</pre>
+</div>
+<div class="refsect1">
+<a name="gi-GIUnionInfo.description"></a><h2>Description</h2>
+<p>
+GIUnionInfo represents a union type.
+</p>
+<p>
+A union has methods and fields.  Unions can optionally have a
+discriminator, which is a field deciding what type of real union
+fields is valid for specified instance.
+</p>
+<p>
+</p>
+<div class="refsect1">
+<a name="gi-giobjectinfo.struct-hierarchy"></a><h2>Struct hierarchy</h2>
+<pre class="synopsis">
+  <a class="link" href="gi-GIBaseInfo.html" title="GIBaseInfo">GIBaseInfo</a>
+   +----<a class="link" href="gi-GIRegisteredTypeInfo.html" title="GIRegisteredTypeInfo">GIRegisteredTypeInfo</a>
+         +----GIUnionInfo
+</pre>
+</div>
+<p>
+</p>
+</div>
+<div class="refsect1">
+<a name="gi-GIUnionInfo.details"></a><h2>Details</h2>
+<div class="refsect2">
+<a name="GI-IS-UNION-INFO:CAPS"></a><h3>GI_IS_UNION_INFO()</h3>
+<pre class="programlisting">#define             GI_IS_UNION_INFO(info)</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIUnionInfo"></a><h3>GIUnionInfo</h3>
+<pre class="programlisting">typedef GIBaseInfo GIUnionInfo;
+</pre>
+<p>
+Represents a union.
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-union-info-get-n-fields"></a><h3>g_union_info_get_n_fields ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_union_info_get_n_fields           (<em class="parameter"><code><a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the number of fields this union has.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>number of fields</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-union-info-get-field"></a><h3>g_union_info_get_field ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="returnvalue">GIFieldInfo</span></a> *       g_union_info_get_field              (<em class="parameter"><code><a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);</pre>
+<p>
+Obtain the type information for field with specified index.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
+<td>a field index</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIFieldInfo.html#GIFieldInfo" title="GIFieldInfo"><span class="type">GIFieldInfo</span></a>, free it with <a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a>
+when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-union-info-get-n-methods"></a><h3>g_union_info_get_n_methods ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_union_info_get_n_methods          (<em class="parameter"><code><a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the number of methods this union has.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>number of methods</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-union-info-get-method"></a><h3>g_union_info_get_method ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="returnvalue">GIFunctionInfo</span></a> *    g_union_info_get_method             (<em class="parameter"><code><a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);</pre>
+<p>
+Obtain the type information for method with specified index.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
+<td>a method index</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a>, free it with <a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a>
+when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-union-info-is-discriminated"></a><h3>g_union_info_is_discriminated ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>            g_union_info_is_discriminated       (<em class="parameter"><code><a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a> *info</code></em>);</pre>
+<p>
+Return true if this union contains discriminator field.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></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 this is a discriminated union, <code class="literal">FALSE</code> otherwise</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-union-info-get-discriminator-offset"></a><h3>g_union_info_get_discriminator_offset ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_union_info_get_discriminator_offset
+                                                        (<em class="parameter"><code><a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a> *info</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-union-info-get-discriminator-type"></a><h3>g_union_info_get_discriminator_type ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="returnvalue">GITypeInfo</span></a> *        g_union_info_get_discriminator_type (<em class="parameter"><code><a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the type information of the union discriminator.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a>, free it with <a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a>
+when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-union-info-get-discriminator"></a><h3>g_union_info_get_discriminator ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo"><span class="returnvalue">GIConstantInfo</span></a> *    g_union_info_get_discriminator      (<em class="parameter"><code><a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> n</code></em>);</pre>
+<p>
+Obtain discriminator value assigned for n-th union field, i.e. n-th
+union field is the active one if discriminator contains this
+constant.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
+<td>a union field index</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIConstantInfo.html#GIConstantInfo" title="GIConstantInfo"><span class="type">GIConstantInfo</span></a>, free it with <a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a>
+when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-union-info-find-method"></a><h3>g_union_info_find_method ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="returnvalue">GIFunctionInfo</span></a> *    g_union_info_find_method            (<em class="parameter"><code><a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
+<p>
+Obtain the type information for method named <em class="parameter"><code>name</code></em>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>a method name</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a>, free it with <a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a>
+when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-union-info-get-size"></a><h3>g_union_info_get_size ()</h3>
+<pre class="programlisting"><span class="returnvalue">gsize</span>               g_union_info_get_size               (<em class="parameter"><code><a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the total size of the union.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>size of the union in bytes</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-union-info-get-alignment"></a><h3>g_union_info_get_alignment ()</h3>
+<pre class="programlisting"><span class="returnvalue">gsize</span>               g_union_info_get_alignment          (<em class="parameter"><code><a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the required alignment of the union.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIUnionInfo.html#GIUnionInfo" title="GIUnionInfo"><span class="type">GIUnionInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>required alignment in bytes</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi-GIVFuncInfo.html b/docs/reference/html/gi-GIVFuncInfo.html
new file mode 100644 (file)
index 0000000..74a6e30
--- /dev/null
@@ -0,0 +1,229 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GIVFuncInfo</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="gi-repository-structs.html" title="GIRepository structs">
+<link rel="prev" href="gi-GIPropertyInfo.html" title="GIPropertyInfo">
+<link rel="next" href="gi-GISignalInfo.html" title="GISignalInfo">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="gi-GIPropertyInfo.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="gi-repository-structs.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="gi-GISignalInfo.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#gi-GIVFuncInfo.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#gi-GIVFuncInfo.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry">
+<a name="gi-GIVFuncInfo"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="gi-GIVFuncInfo.top_of_page"></a>GIVFuncInfo</span></h2>
+<p>GIVFuncInfo â€” Struct representing a virtual function</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<a name="gi-GIVFuncInfo.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">#define             <a class="link" href="gi-GIVFuncInfo.html#GI-IS-VFUNC-INFO:CAPS" title="GI_IS_VFUNC_INFO()">GI_IS_VFUNC_INFO</a>                    (info)
+typedef             <a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo">GIVFuncInfo</a>;
+enum                <a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfoFlags" title="enum GIVFuncInfoFlags">GIVFuncInfoFlags</a>;
+<a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfoFlags" title="enum GIVFuncInfoFlags"><span class="returnvalue">GIVFuncInfoFlags</span></a>    <a class="link" href="gi-GIVFuncInfo.html#g-vfunc-info-get-flags" title="g_vfunc_info_get_flags ()">g_vfunc_info_get_flags</a>              (<em class="parameter"><code><a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a> *info</code></em>);
+<span class="returnvalue">gint</span>                <a class="link" href="gi-GIVFuncInfo.html#g-vfunc-info-get-offset" title="g_vfunc_info_get_offset ()">g_vfunc_info_get_offset</a>             (<em class="parameter"><code><a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GISignalInfo.html#GISignalInfo" title="GISignalInfo"><span class="returnvalue">GISignalInfo</span></a> *      <a class="link" href="gi-GIVFuncInfo.html#g-vfunc-info-get-signal" title="g_vfunc_info_get_signal ()">g_vfunc_info_get_signal</a>             (<em class="parameter"><code><a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a> *info</code></em>);
+<a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="returnvalue">GIFunctionInfo</span></a> *    <a class="link" href="gi-GIVFuncInfo.html#g-vfunc-info-get-invoker" title="g_vfunc_info_get_invoker ()">g_vfunc_info_get_invoker</a>            (<em class="parameter"><code><a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a> *info</code></em>);
+</pre>
+</div>
+<div class="refsect1">
+<a name="gi-GIVFuncInfo.description"></a><h2>Description</h2>
+<p>
+GIVfuncInfo represents a virtual function. A property belongs to
+either a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> or a <a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a>.
+</p>
+<p>
+</p>
+<div class="refsect1">
+<a name="gi-givfuncinfo.struct-hierarchy"></a><h2>Struct hierarchy</h2>
+<pre class="synopsis">
+  <a class="link" href="gi-GIBaseInfo.html" title="GIBaseInfo">GIBaseInfo</a>
+   +----<a class="link" href="gi-GICallableInfo.html" title="GICallableInfo">GICallableInfo</a>
+         +----<a class="link" href="gi-GIFunctionInfo.html" title="GIFunctionInfo">GIFunctionInfo</a>
+         +----<a class="link" href="gi-GISignalInfo.html" title="GISignalInfo">GISignalInfo</a>
+         +----GIVFuncInfo
+</pre>
+</div>
+<p>
+</p>
+</div>
+<div class="refsect1">
+<a name="gi-GIVFuncInfo.details"></a><h2>Details</h2>
+<div class="refsect2">
+<a name="GI-IS-VFUNC-INFO:CAPS"></a><h3>GI_IS_VFUNC_INFO()</h3>
+<pre class="programlisting">#define             GI_IS_VFUNC_INFO(info)</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIVFuncInfo"></a><h3>GIVFuncInfo</h3>
+<pre class="programlisting">typedef GIBaseInfo GIVFuncInfo;
+</pre>
+<p>
+Represents a virtual function.
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIVFuncInfoFlags"></a><h3>enum GIVFuncInfoFlags</h3>
+<pre class="programlisting">typedef enum {
+  GI_VFUNC_MUST_CHAIN_UP     = 1 &lt;&lt; 0,
+  GI_VFUNC_MUST_OVERRIDE     = 1 &lt;&lt; 1,
+  GI_VFUNC_MUST_NOT_OVERRIDE = 1 &lt;&lt; 2,
+  GI_VFUNC_THROWS =            1 &lt;&lt; 3
+} GIVFuncInfoFlags;
+</pre>
+<p>
+Flags of a <a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a> struct.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><a name="GI-VFUNC-MUST-CHAIN-UP:CAPS"></a><span class="term"><code class="literal">GI_VFUNC_MUST_CHAIN_UP</code></span></p></td>
+<td>chains up to the parent type
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-VFUNC-MUST-OVERRIDE:CAPS"></a><span class="term"><code class="literal">GI_VFUNC_MUST_OVERRIDE</code></span></p></td>
+<td>overrides
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-VFUNC-MUST-NOT-OVERRIDE:CAPS"></a><span class="term"><code class="literal">GI_VFUNC_MUST_NOT_OVERRIDE</code></span></p></td>
+<td>does not override
+</td>
+</tr>
+<tr>
+<td><p><a name="GI-VFUNC-THROWS:CAPS"></a><span class="term"><code class="literal">GI_VFUNC_THROWS</code></span></p></td>
+<td>Includes a <span class="type">GError</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-vfunc-info-get-flags"></a><h3>g_vfunc_info_get_flags ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfoFlags" title="enum GIVFuncInfoFlags"><span class="returnvalue">GIVFuncInfoFlags</span></a>    g_vfunc_info_get_flags              (<em class="parameter"><code><a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the flags for this virtual function info. See <a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfoFlags" title="enum GIVFuncInfoFlags"><span class="type">GIVFuncInfoFlags</span></a> for
+more information about possible flag values.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the flags</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-vfunc-info-get-offset"></a><h3>g_vfunc_info_get_offset ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_vfunc_info_get_offset             (<em class="parameter"><code><a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the offset of the function pointer in the class struct. The value
+0xFFFF indicates that the struct offset is unknown.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the struct offset or 0xFFFF if it's unknown</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-vfunc-info-get-signal"></a><h3>g_vfunc_info_get_signal ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GISignalInfo.html#GISignalInfo" title="GISignalInfo"><span class="returnvalue">GISignalInfo</span></a> *      g_vfunc_info_get_signal             (<em class="parameter"><code><a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a> *info</code></em>);</pre>
+<p>
+Obtain the signal for the virtual function if one is set.
+The signal comes from the object or interface to which
+this virtual function belongs.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the signal or <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if none set. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-vfunc-info-get-invoker"></a><h3>g_vfunc_info_get_invoker ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="returnvalue">GIFunctionInfo</span></a> *    g_vfunc_info_get_invoker            (<em class="parameter"><code><a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a> *info</code></em>);</pre>
+<p>
+If this virtual function has an associated invoker method, this
+method will return it.  An invoker method is a C entry point.
+</p>
+<p>
+Not all virtuals will have invokers.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a> or <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>. Free it with
+<a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi-ffi.html b/docs/reference/html/gi-ffi.html
new file mode 100644 (file)
index 0000000..03ba1b9
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GIR Foreign functions interface</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="girepository.html" title="Part I. ">
+<link rel="prev" href="gi-girepository.html" title="girepository">
+<link rel="next" href="gi-girffi.html" title="girffi">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
+<td><a accesskey="p" href="gi-girepository.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="girepository.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="gi-girffi.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="chapter">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="gi-ffi"></a>GIR Foreign functions interface</h2></div></div></div>
+<div class="toc"><dl><dt>
+<span class="refentrytitle"><a href="gi-girffi.html">girffi</a></span><span class="refpurpose"></span>
+</dt></dl></div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi-gierrordomaininfo.html b/docs/reference/html/gi-gierrordomaininfo.html
new file mode 100644 (file)
index 0000000..03121fe
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>gierrordomaininfo</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="gi-repository-structs.html" title="GIRepository structs">
+<link rel="prev" href="gi-GIConstantInfo.html" title="GIConstantInfo">
+<link rel="next" href="gi-gir.html" title="Part II. GIR markup format">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="gi-GIConstantInfo.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="gi-repository-structs.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="gi-gir.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#gi-gierrordomaininfo.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#gi-gierrordomaininfo.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry">
+<a name="gi-gierrordomaininfo"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="gi-gierrordomaininfo.top_of_page"></a>gierrordomaininfo</span></h2>
+<p>gierrordomaininfo</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<a name="gi-gierrordomaininfo.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis"></pre>
+</div>
+<div class="refsect1">
+<a name="gi-gierrordomaininfo.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1">
+<a name="gi-gierrordomaininfo.details"></a><h2>Details</h2>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi-gir-reference.html b/docs/reference/html/gi-gir-reference.html
new file mode 100644 (file)
index 0000000..c101a20
--- /dev/null
@@ -0,0 +1,215 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>The GIR XML format</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="gi-gir.html" title="Part II. GIR markup format">
+<link rel="prev" href="gi-gir.html" title="Part II. GIR markup format">
+<link rel="next" href="gi-typelib.html" title="Typelib binary format">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
+<td><a accesskey="p" href="gi-gir.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="gi-gir.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="gi-typelib.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="chapter">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="gi-gir-reference"></a>The GIR XML format</h2></div></div></div>
+<p>
+    This chapter describes the GIR XML markup format.
+  </p>
+<div class="refsect2">
+<a name="gi-gir-api"></a><h3>
+<span class="emphasis"><em>api</em></span> node</h3>
+
+     The root node of all GIR documents is the api node.
+
+     Possible children: <a href="gi-gir-reference.html#gi-gir-namespace">namespace</a>.
+
+     <div class="example">
+<a name="id481079"></a><p class="title"><b>Example 4. A GIR fragment showing an api node</b></p>
+<div class="example-contents">
+  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
+    <tbody>
+      <tr>
+        <td class="listing_lines" align="right"><pre>1
+2
+3</pre></td>
+        <td class="listing_code"><pre class="programlisting"><span class="symbol">&lt;</span><span class="usertype">api</span><span class="normal"> version</span><span class="symbol">=</span><span class="string">"1.0"</span><span class="symbol">&gt;</span>
+<span class="normal">  </span><span class="symbol">&lt;</span><span class="normal">namespace</span><span class="symbol">/&gt;</span>
+<span class="symbol">&lt;/</span><span class="normal">api</span><span class="symbol">&gt;</span></pre></td>
+      </tr>
+    </tbody>
+  </table>
+</div>
+
+</div>
+<br class="example-break">
+</div>
+<hr>
+<div class="refsect2">
+<a name="gi-gir-namespace"></a><h3>
+<span class="emphasis"><em>namespace</em></span> node</h3>
+
+     Parent node: <a href="gi-gir-reference.html#gi-gir-api">api</a>.
+     Possible children: callback,
+     <a href="gi-gir-reference.html#gi-gir-class">class</a>,
+     <a href="gi-gir-reference.html#gi-gir-function">function</a>.
+     <a href="gi-gir-reference.html#gi-gir-interface">interface</a>.
+
+     <div class="example">
+<a name="id488486"></a><p class="title"><b>Example 5. A GIR fragment showing an namespace node</b></p>
+<div class="example-contents">
+  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
+    <tbody>
+      <tr>
+        <td class="listing_lines" align="right"><pre>1
+2
+3
+4
+5
+6</pre></td>
+        <td class="listing_code"><pre class="programlisting"><span class="symbol">&lt;</span><span class="usertype">api</span><span class="normal"> version</span><span class="symbol">=</span><span class="string">"1.0"</span><span class="symbol">&gt;</span>
+<span class="normal">  </span><span class="symbol">&lt;</span><span class="normal">namespace</span><span class="symbol">=</span><span class="string">"Gtk"</span><span class="symbol">&gt;</span>
+<span class="normal">     </span><span class="symbol">&lt;</span><span class="normal">class</span><span class="symbol">/&gt;</span>
+<span class="normal">     </span><span class="symbol">&lt;</span><span class="normal">function</span><span class="symbol">/&gt;</span>
+<span class="normal">  </span><span class="symbol">&lt;/</span><span class="normal">namespace</span><span class="symbol">&gt;</span>
+<span class="symbol">&lt;/</span><span class="normal">api</span><span class="symbol">&gt;</span></pre></td>
+      </tr>
+    </tbody>
+  </table>
+</div>
+
+</div>
+<br class="example-break">
+</div>
+<hr>
+<div class="refsect2">
+<a name="gi-gir-class"></a><h3>
+<span class="emphasis"><em>class</em></span> node</h3>
+
+     Parent node: <a href="gi-gir-reference.html#gi-gir-namespace">namespace</a>.
+     Possible children: <a href="gi-gir-reference.html#gi-gir-class">constructor</a>,
+     field,
+     method,
+     property.
+     <div class="example">
+<a name="id518920"></a><p class="title"><b>Example 6. A GIR fragment showing an class node</b></p>
+<div class="example-contents">
+  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
+    <tbody>
+      <tr>
+        <td class="listing_lines" align="right"><pre>1
+2
+3
+4
+5
+6
+7
+8
+9
+10</pre></td>
+        <td class="listing_code"><pre class="programlisting"><span class="symbol">&lt;</span><span class="usertype">api</span><span class="normal"> version</span><span class="symbol">=</span><span class="string">"1.0"</span><span class="symbol">&gt;</span>
+<span class="normal">  </span><span class="symbol">&lt;</span><span class="normal">namespace</span><span class="symbol">=</span><span class="string">"Gtk"</span><span class="symbol">&gt;</span>
+<span class="normal">    </span><span class="symbol">&lt;</span><span class="usertype">class</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"Widget"</span><span class="symbol">&gt;</span>
+<span class="normal">       </span><span class="symbol">&lt;</span><span class="normal">constructor</span><span class="symbol">/&gt;</span>
+<span class="normal">       </span><span class="symbol">&lt;</span><span class="normal">field</span><span class="symbol">/&gt;</span>
+<span class="normal">       </span><span class="symbol">&lt;</span><span class="normal">method</span><span class="symbol">/&gt;</span>
+<span class="normal">       </span><span class="symbol">&lt;</span><span class="normal">property</span><span class="symbol">/&gt;</span>
+<span class="normal">    </span><span class="symbol">&lt;</span><span class="normal">class</span><span class="symbol">&gt;</span>
+<span class="normal">  </span><span class="symbol">&lt;/</span><span class="normal">namespace</span><span class="symbol">&gt;</span>
+<span class="symbol">&lt;/</span><span class="normal">api</span><span class="symbol">&gt;</span></pre></td>
+      </tr>
+    </tbody>
+  </table>
+</div>
+
+</div>
+<br class="example-break">
+</div>
+<hr>
+<div class="refsect2">
+<a name="gi-gir-interface"></a><h3>
+<span class="emphasis"><em>interface</em></span> node</h3>
+
+     Parent node: <a href="gi-gir-reference.html#gi-gir-namespace">namespace</a>.
+     Possible children: field,
+     method,
+     property.
+     <div class="example">
+<a name="id506234"></a><p class="title"><b>Example 7. A GIR fragment showing an interface node</b></p>
+<div class="example-contents">
+  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
+    <tbody>
+      <tr>
+        <td class="listing_lines" align="right"><pre>1
+2
+3
+4
+5
+6
+7
+8
+9</pre></td>
+        <td class="listing_code"><pre class="programlisting"><span class="symbol">&lt;</span><span class="usertype">api</span><span class="normal"> version</span><span class="symbol">=</span><span class="string">"1.0"</span><span class="symbol">&gt;</span>
+<span class="normal">  </span><span class="symbol">&lt;</span><span class="normal">namespace</span><span class="symbol">=</span><span class="string">"Gtk"</span><span class="symbol">&gt;</span>
+<span class="normal">    </span><span class="symbol">&lt;</span><span class="usertype">interface</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"Buildable"</span><span class="symbol">&gt;</span>
+<span class="normal">       </span><span class="symbol">&lt;</span><span class="normal">field</span><span class="symbol">/&gt;</span>
+<span class="normal">       </span><span class="symbol">&lt;</span><span class="normal">method</span><span class="symbol">/&gt;</span>
+<span class="normal">       </span><span class="symbol">&lt;</span><span class="normal">property</span><span class="symbol">/&gt;</span>
+<span class="normal">    </span><span class="symbol">&lt;</span><span class="normal">interface</span><span class="symbol">&gt;</span>
+<span class="normal">  </span><span class="symbol">&lt;/</span><span class="normal">namespace</span><span class="symbol">&gt;</span>
+<span class="symbol">&lt;/</span><span class="normal">api</span><span class="symbol">&gt;</span></pre></td>
+      </tr>
+    </tbody>
+  </table>
+</div>
+
+</div>
+<br class="example-break">
+</div>
+<hr>
+<div class="refsect2">
+<a name="gi-gir-function"></a><h3>
+<span class="emphasis"><em>function</em></span> node</h3>
+
+     Parent node: <a href="gi-gir-reference.html#gi-gir-namespace">namespace</a>.
+     <div class="example">
+<a name="id522284"></a><p class="title"><b>Example 8. A GIR fragment showing an function node</b></p>
+<div class="example-contents">
+  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
+    <tbody>
+      <tr>
+        <td class="listing_lines" align="right"><pre>1
+2
+3
+4
+5
+6</pre></td>
+        <td class="listing_code"><pre class="programlisting"><span class="symbol">&lt;</span><span class="usertype">api</span><span class="normal"> version</span><span class="symbol">=</span><span class="string">"1.0"</span><span class="symbol">&gt;</span>
+<span class="normal">  </span><span class="symbol">&lt;</span><span class="normal">namespace</span><span class="symbol">=</span><span class="string">"Gtk"</span><span class="symbol">&gt;</span>
+<span class="normal">    </span><span class="symbol">&lt;</span><span class="usertype">function</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"init"</span><span class="symbol">&gt;</span>
+<span class="normal">    </span><span class="symbol">&lt;/</span><span class="normal">function</span><span class="symbol">&gt;</span>
+<span class="normal">  </span><span class="symbol">&lt;/</span><span class="normal">namespace</span><span class="symbol">&gt;</span>
+<span class="symbol">&lt;/</span><span class="normal">api</span><span class="symbol">&gt;</span></pre></td>
+      </tr>
+    </tbody>
+  </table>
+</div>
+
+</div>
+<br class="example-break">
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi-gir.html b/docs/reference/html/gi-gir.html
new file mode 100644 (file)
index 0000000..7fb2321
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Part II. GIR markup format</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="prev" href="gi-gierrordomaininfo.html" title="gierrordomaininfo">
+<link rel="next" href="gi-gir-reference.html" title="The GIR XML format">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
+<td><a accesskey="p" href="gi-gierrordomaininfo.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td> </td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="gi-gir-reference.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="part">
+<div class="titlepage"><div><div><h1 class="title">
+<a name="gi-gir"></a>Part II. GIR markup format</h1></div></div></div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl><dt><span class="chapter"><a href="gi-gir-reference.html">The GIR XML format</a></span></dt></dl>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi-girepository.html b/docs/reference/html/gi-girepository.html
new file mode 100644 (file)
index 0000000..2908cce
--- /dev/null
@@ -0,0 +1,965 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>girepository</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="gi-libgirepository.html" title="GIRepository">
+<link rel="prev" href="gi-libgirepository.html" title="GIRepository">
+<link rel="next" href="gi-ffi.html" title="GIR Foreign functions interface">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="gi-libgirepository.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="gi-libgirepository.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="gi-ffi.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#gi-girepository.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#gi-girepository.description" class="shortcut">Description</a>
+                  Â | 
+                  <a href="#gi-girepository.object-hierarchy" class="shortcut">Object Hierarchy</a>
+</td></tr>
+</table>
+<div class="refentry">
+<a name="gi-girepository"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="gi-girepository.top_of_page"></a>girepository</span></h2>
+<p>girepository</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<a name="gi-girepository.synopsis"></a><h2>Synopsis</h2>
+<a name="GIRepository"></a><pre class="synopsis">typedef             <a class="link" href="gi-girepository.html#GICallbackInfo" title="GICallbackInfo">GICallbackInfo</a>;
+struct              <a class="link" href="gi-girepository.html#GIRepository-struct" title="struct GIRepository">GIRepository</a>;
+enum                <a class="link" href="gi-girepository.html#GIRepositoryError" title="enum GIRepositoryError">GIRepositoryError</a>;
+enum                <a class="link" href="gi-girepository.html#GIRepositoryLoadFlags" title="enum GIRepositoryLoadFlags">GIRepositoryLoadFlags</a>;
+                    <a class="link" href="gi-girepository.html#GITypelib" title="GITypelib">GITypelib</a>;
+<a class="link" href="gi-girepository.html#GIRepository"><span class="returnvalue">GIRepository</span></a> *      <a class="link" href="gi-girepository.html#g-irepository-get-default" title="g_irepository_get_default ()">g_irepository_get_default</a>           (<em class="parameter"><code><span class="type">void</span></code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="gi-girepository.html#g-irepository-prepend-search-path" title="g_irepository_prepend_search_path ()">g_irepository_prepend_search_path</a>   (<em class="parameter"><code>const <span class="type">char</span> *directory</code></em>);
+<span class="returnvalue">GSList</span> *            <a class="link" href="gi-girepository.html#g-irepository-get-search-path" title="g_irepository_get_search_path ()">g_irepository_get_search_path</a>       (<em class="parameter"><code><span class="type">void</span></code></em>);
+const <span class="returnvalue">char</span> *        <a class="link" href="gi-girepository.html#g-irepository-load-typelib" title="g_irepository_load_typelib ()">g_irepository_load_typelib</a>          (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="type">GITypelib</span></a> *typelib</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepositoryLoadFlags" title="enum GIRepositoryLoadFlags"><span class="type">GIRepositoryLoadFlags</span></a> flags</code></em>,
+                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
+<span class="returnvalue">gboolean</span>            <a class="link" href="gi-girepository.html#g-irepository-is-registered" title="g_irepository_is_registered ()">g_irepository_is_registered</a>         (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *namespace_</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *version</code></em>);
+<a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="returnvalue">GIBaseInfo</span></a> *        <a class="link" href="gi-girepository.html#g-irepository-find-by-name" title="g_irepository_find_by_name ()">g_irepository_find_by_name</a>          (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *namespace_</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);
+<a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="returnvalue">GITypelib</span></a> *         <a class="link" href="gi-girepository.html#g-irepository-require" title="g_irepository_require ()">g_irepository_require</a>               (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *namespace_</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *version</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepositoryLoadFlags" title="enum GIRepositoryLoadFlags"><span class="type">GIRepositoryLoadFlags</span></a> flags</code></em>,
+                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
+<a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="returnvalue">GITypelib</span></a> *         <a class="link" href="gi-girepository.html#g-irepository-require-private" title="g_irepository_require_private ()">g_irepository_require_private</a>       (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *typelib_dir</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *namespace_</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *version</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepositoryLoadFlags" title="enum GIRepositoryLoadFlags"><span class="type">GIRepositoryLoadFlags</span></a> flags</code></em>,
+                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
+<span class="returnvalue">gchar</span> **            <a class="link" href="gi-girepository.html#g-irepository-get-dependencies" title="g_irepository_get_dependencies ()">g_irepository_get_dependencies</a>      (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *namespace_</code></em>);
+<span class="returnvalue">gchar</span> **            <a class="link" href="gi-girepository.html#g-irepository-get-loaded-namespaces" title="g_irepository_get_loaded_namespaces ()">g_irepository_get_loaded_namespaces</a> (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>);
+<a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="returnvalue">GIBaseInfo</span></a> *        <a class="link" href="gi-girepository.html#g-irepository-find-by-gtype" title="g_irepository_find_by_gtype ()">g_irepository_find_by_gtype</a>         (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>,
+                                                         <em class="parameter"><code><span class="type">GType</span> gtype</code></em>);
+<span class="returnvalue">gint</span>                <a class="link" href="gi-girepository.html#g-irepository-get-n-infos" title="g_irepository_get_n_infos ()">g_irepository_get_n_infos</a>           (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *namespace_</code></em>);
+<a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="returnvalue">GIBaseInfo</span></a> *        <a class="link" href="gi-girepository.html#g-irepository-get-info" title="g_irepository_get_info ()">g_irepository_get_info</a>              (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *namespace_</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> index</code></em>);
+const <span class="returnvalue">gchar</span> *       <a class="link" href="gi-girepository.html#g-irepository-get-typelib-path" title="g_irepository_get_typelib_path ()">g_irepository_get_typelib_path</a>      (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *namespace_</code></em>);
+const <span class="returnvalue">gchar</span> *       <a class="link" href="gi-girepository.html#g-irepository-get-shared-library" title="g_irepository_get_shared_library ()">g_irepository_get_shared_library</a>    (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *namespace_</code></em>);
+const <span class="returnvalue">gchar</span> *       <a class="link" href="gi-girepository.html#g-irepository-get-version" title="g_irepository_get_version ()">g_irepository_get_version</a>           (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *namespace_</code></em>);
+<span class="returnvalue">GOptionGroup</span> *      <a class="link" href="gi-girepository.html#g-irepository-get-option-group" title="g_irepository_get_option_group ()">g_irepository_get_option_group</a>      (<em class="parameter"><code><span class="type">void</span></code></em>);
+const <span class="returnvalue">gchar</span> *       <a class="link" href="gi-girepository.html#g-irepository-get-c-prefix" title="g_irepository_get_c_prefix ()">g_irepository_get_c_prefix</a>          (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *namespace_</code></em>);
+<span class="returnvalue">gboolean</span>            <a class="link" href="gi-girepository.html#g-irepository-dump" title="g_irepository_dump ()">g_irepository_dump</a>                  (<em class="parameter"><code>const <span class="type">char</span> *arg</code></em>,
+                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
+<span class="returnvalue">GList</span> *             <a class="link" href="gi-girepository.html#g-irepository-enumerate-versions" title="g_irepository_enumerate_versions ()">g_irepository_enumerate_versions</a>    (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *namespace_</code></em>);
+#define             <a class="link" href="gi-girepository.html#G-IREPOSITORY-ERROR:CAPS" title="G_IREPOSITORY_ERROR">G_IREPOSITORY_ERROR</a>
+<a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="returnvalue">GITypelib</span></a> *         <a class="link" href="gi-girepository.html#g-typelib-new-from-memory" title="g_typelib_new_from_memory ()">g_typelib_new_from_memory</a>           (<em class="parameter"><code><span class="type">guint8</span> *memory</code></em>,
+                                                         <em class="parameter"><code><span class="type">gsize</span> len</code></em>,
+                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
+<a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="returnvalue">GITypelib</span></a> *         <a class="link" href="gi-girepository.html#g-typelib-new-from-const-memory" title="g_typelib_new_from_const_memory ()">g_typelib_new_from_const_memory</a>     (<em class="parameter"><code>const <span class="type">guint8</span> *memory</code></em>,
+                                                         <em class="parameter"><code><span class="type">gsize</span> len</code></em>,
+                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
+<a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="returnvalue">GITypelib</span></a> *         <a class="link" href="gi-girepository.html#g-typelib-new-from-mapped-file" title="g_typelib_new_from_mapped_file ()">g_typelib_new_from_mapped_file</a>      (<em class="parameter"><code><span class="type">GMappedFile</span> *mfile</code></em>,
+                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="gi-girepository.html#g-typelib-free" title="g_typelib_free ()">g_typelib_free</a>                      (<em class="parameter"><code><a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="type">GITypelib</span></a> *typelib</code></em>);
+<span class="returnvalue">gboolean</span>            <a class="link" href="gi-girepository.html#g-typelib-symbol" title="g_typelib_symbol ()">g_typelib_symbol</a>                    (<em class="parameter"><code><a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="type">GITypelib</span></a> *typelib</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *symbol_name</code></em>,
+                                                         <em class="parameter"><code><span class="type">gpointer</span> *symbol</code></em>);
+const <span class="returnvalue">gchar</span> *       <a class="link" href="gi-girepository.html#g-typelib-get-namespace" title="g_typelib_get_namespace ()">g_typelib_get_namespace</a>             (<em class="parameter"><code><a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="type">GITypelib</span></a> *typelib</code></em>);
+</pre>
+</div>
+<div class="refsect1">
+<a name="gi-girepository.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="synopsis">
+  GObject
+   +----GIRepository
+</pre>
+</div>
+<div class="refsect1">
+<a name="gi-girepository.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1">
+<a name="gi-girepository.details"></a><h2>Details</h2>
+<div class="refsect2">
+<a name="GICallbackInfo"></a><h3>GICallbackInfo</h3>
+<pre class="programlisting">typedef GIBaseInfo GICallbackInfo;
+</pre>
+<p>
+Represents a callback, eg arguments and return value.
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIRepository-struct"></a><h3>struct GIRepository</h3>
+<pre class="programlisting">struct GIRepository;</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIRepositoryError"></a><h3>enum GIRepositoryError</h3>
+<pre class="programlisting">typedef enum {
+  G_IREPOSITORY_ERROR_TYPELIB_NOT_FOUND,
+  G_IREPOSITORY_ERROR_NAMESPACE_MISMATCH,
+  G_IREPOSITORY_ERROR_NAMESPACE_VERSION_CONFLICT,
+  G_IREPOSITORY_ERROR_LIBRARY_NOT_FOUND
+} GIRepositoryError;
+</pre>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><a name="G-IREPOSITORY-ERROR-TYPELIB-NOT-FOUND:CAPS"></a><span class="term"><code class="literal">G_IREPOSITORY_ERROR_TYPELIB_NOT_FOUND</code></span></p></td>
+<td>the typelib could not be found.
+</td>
+</tr>
+<tr>
+<td><p><a name="G-IREPOSITORY-ERROR-NAMESPACE-MISMATCH:CAPS"></a><span class="term"><code class="literal">G_IREPOSITORY_ERROR_NAMESPACE_MISMATCH</code></span></p></td>
+<td>the namespace does not match the
+requested namespace.
+</td>
+</tr>
+<tr>
+<td><p><a name="G-IREPOSITORY-ERROR-NAMESPACE-VERSION-CONFLICT:CAPS"></a><span class="term"><code class="literal">G_IREPOSITORY_ERROR_NAMESPACE_VERSION_CONFLICT</code></span></p></td>
+<td>the version of the
+typelib does not match the requested version.
+</td>
+</tr>
+<tr>
+<td><p><a name="G-IREPOSITORY-ERROR-LIBRARY-NOT-FOUND:CAPS"></a><span class="term"><code class="literal">G_IREPOSITORY_ERROR_LIBRARY_NOT_FOUND</code></span></p></td>
+<td>the library used by the typelib
+could not be found.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIRepositoryLoadFlags"></a><h3>enum GIRepositoryLoadFlags</h3>
+<pre class="programlisting">typedef enum {
+  G_IREPOSITORY_LOAD_FLAG_LAZY = 1 &lt;&lt; 0
+} GIRepositoryLoadFlags;
+</pre>
+<p>
+Flags that controlls how a typelib is loaded by
+GIRepositry, used by <a class="link" href="gi-girepository.html#g-irepository-load-typelib" title="g_irepository_load_typelib ()"><code class="function">g_irepository_load_typelib()</code></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><a name="G-IREPOSITORY-LOAD-FLAG-LAZY:CAPS"></a><span class="term"><code class="literal">G_IREPOSITORY_LOAD_FLAG_LAZY</code></span></p></td>
+<td>Load the types lazily.
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GITypelib"></a><h3>GITypelib</h3>
+<pre class="programlisting">typedef struct {
+} GITypelib;
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-irepository-get-default"></a><h3>g_irepository_get_default ()</h3>
+<pre class="programlisting"><a class="link" href="gi-girepository.html#GIRepository"><span class="returnvalue">GIRepository</span></a> *      g_irepository_get_default           (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+<p>
+Returns the singleton process-global default <a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a>.  It is
+not currently supported to have multiple repositories in a
+particular process, but this function is provided in the unlikely
+eventuality that it would become possible, and as a convenience for
+higher level language bindings to conform to the GObject method
+call conventions.
+</p>
+<p>
+All methods on <a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> also accept <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> as an instance
+parameter to mean this default repository, which is usually more
+convenient for C.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>The global singleton <a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-irepository-prepend-search-path"></a><h3>g_irepository_prepend_search_path ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                g_irepository_prepend_search_path   (<em class="parameter"><code>const <span class="type">char</span> *directory</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-irepository-get-search-path"></a><h3>g_irepository_get_search_path ()</h3>
+<pre class="programlisting"><span class="returnvalue">GSList</span> *            g_irepository_get_search_path       (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+<p>
+Returns the search path the GIRepository will use when looking for typelibs.
+The string is internal to GIRespository and should not be freed, nor should
+the elements.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>list of strings. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> filename][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-irepository-load-typelib"></a><h3>g_irepository_load_typelib ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> *        g_irepository_load_typelib          (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="type">GITypelib</span></a> *typelib</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepositoryLoadFlags" title="enum GIRepositoryLoadFlags"><span class="type">GIRepositoryLoadFlags</span></a> flags</code></em>,
+                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-irepository-is-registered"></a><h3>g_irepository_is_registered ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>            g_irepository_is_registered         (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *namespace_</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *version</code></em>);</pre>
+<p>
+Check whether a particular namespace (and optionally, a specific
+version thereof) is currently loaded.  This function is likely to
+only be useful in unusual circumstances; in order to act upon
+metadata in the namespace, you should call <a class="link" href="gi-girepository.html#g-irepository-require" title="g_irepository_require ()"><code class="function">g_irepository_require()</code></a>
+instead which will ensure the namespace is loaded, and return as
+quickly as this function will if it has already been loaded.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>repository</code></em> :</span></p></td>
+<td>A <a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a>, may be <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> for the default. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>namespace_</code></em> :</span></p></td>
+<td>Namespace of interest</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>version</code></em> :</span></p></td>
+<td>Required version, may be <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> for latest. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
+</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 namespace-version is loaded, <code class="literal">FALSE</code> otherwise</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-irepository-find-by-name"></a><h3>g_irepository_find_by_name ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="returnvalue">GIBaseInfo</span></a> *        g_irepository_find_by_name          (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *namespace_</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
+<p>
+Searches for a particular entry in a namespace.  Before calling
+this function for a particular namespace, you must call
+<a class="link" href="gi-girepository.html#g-irepository-require" title="g_irepository_require ()"><code class="function">g_irepository_require()</code></a> once to load the namespace, or otherwise
+ensure the namespace has already been loaded.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>repository</code></em> :</span></p></td>
+<td>A <a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a>, may be <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> for the default. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>namespace_</code></em> :</span></p></td>
+<td>Namespace which will be searched</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>Entry name to find</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+<a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> representing metadata about <em class="parameter"><code>name</code></em>, or <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-irepository-require"></a><h3>g_irepository_require ()</h3>
+<pre class="programlisting"><a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="returnvalue">GITypelib</span></a> *         g_irepository_require               (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *namespace_</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *version</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepositoryLoadFlags" title="enum GIRepositoryLoadFlags"><span class="type">GIRepositoryLoadFlags</span></a> flags</code></em>,
+                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
+<p>
+Force the namespace <em class="parameter"><code>namespace_</code></em> to be loaded if it isn't already.
+If <em class="parameter"><code>namespace_</code></em> is not loaded, this function will search for a
+".typelib" file using the repository search path.  In addition, a
+version <em class="parameter"><code>version</code></em> of namespace may be specified.  If <em class="parameter"><code>version</code></em> is
+not specified, the latest will be used.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>repository</code></em> :</span></p></td>
+<td>Repository, may be <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> for the default. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>namespace_</code></em> :</span></p></td>
+<td>GI namespace to use, e.g. "Gtk"</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>version</code></em> :</span></p></td>
+<td>Version of namespace, may be <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> for latest. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
+<td>Set of <a class="link" href="gi-girepository.html#GIRepositoryLoadFlags" title="enum GIRepositoryLoadFlags"><code class="literal">GIRepositoryLoadFlags</code></a>, may be 0</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
+<td>a <span class="type">GError</span>.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>a pointer to the <a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="type">GITypelib</span></a> if successful, <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> otherwise. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-irepository-require-private"></a><h3>g_irepository_require_private ()</h3>
+<pre class="programlisting"><a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="returnvalue">GITypelib</span></a> *         g_irepository_require_private       (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *typelib_dir</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *namespace_</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *version</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepositoryLoadFlags" title="enum GIRepositoryLoadFlags"><span class="type">GIRepositoryLoadFlags</span></a> flags</code></em>,
+                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
+<p>
+Force the namespace <em class="parameter"><code>namespace_</code></em> to be loaded if it isn't already.
+If <em class="parameter"><code>namespace_</code></em> is not loaded, this function will search for a
+".typelib" file within the private directory only. In addition, a
+version <em class="parameter"><code>version</code></em> of namespace should be specified.  If <em class="parameter"><code>version</code></em> is
+not specified, the latest will be used.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>repository</code></em> :</span></p></td>
+<td>Repository, may be <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> for the default. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>typelib_dir</code></em> :</span></p></td>
+<td>Private directory where to find the requested typelib</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>namespace_</code></em> :</span></p></td>
+<td>GI namespace to use, e.g. "Gtk"</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>version</code></em> :</span></p></td>
+<td>Version of namespace, may be <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> for latest. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
+<td>Set of <a class="link" href="gi-girepository.html#GIRepositoryLoadFlags" title="enum GIRepositoryLoadFlags"><code class="literal">GIRepositoryLoadFlags</code></a>, may be 0</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
+<td>a <span class="type">GError</span>.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>a pointer to the <a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="type">GITypelib</span></a> if successful, <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> otherwise. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-irepository-get-dependencies"></a><h3>g_irepository_get_dependencies ()</h3>
+<pre class="programlisting"><span class="returnvalue">gchar</span> **            g_irepository_get_dependencies      (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *namespace_</code></em>);</pre>
+<p>
+Return an array of all (transitive) dependencies for namespace
+<em class="parameter"><code>namespace_</code></em>, including version.  The returned strings are of the
+form <code class="code">namespace-version</code>.
+</p>
+<p>
+Note: The namespace must have already been loaded using a function
+such as <a class="link" href="gi-girepository.html#g-irepository-require" title="g_irepository_require ()"><code class="function">g_irepository_require()</code></a> before calling this function.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>repository</code></em> :</span></p></td>
+<td>A <a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a>, may be <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> for the default. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>namespace_</code></em> :</span></p></td>
+<td>Namespace of interest</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>Zero-terminated string array of versioned dependencies. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-irepository-get-loaded-namespaces"></a><h3>g_irepository_get_loaded_namespaces ()</h3>
+<pre class="programlisting"><span class="returnvalue">gchar</span> **            g_irepository_get_loaded_namespaces (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>);</pre>
+<p>
+Return the list of currently loaded namespaces.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>repository</code></em> :</span></p></td>
+<td>A <a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a>, may be <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> for the default. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>List of namespaces. <span class="annotation">[utf8][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-irepository-find-by-gtype"></a><h3>g_irepository_find_by_gtype ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="returnvalue">GIBaseInfo</span></a> *        g_irepository_find_by_gtype         (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>,
+                                                         <em class="parameter"><code><span class="type">GType</span> gtype</code></em>);</pre>
+<p>
+Searches all loaded namespaces for a particular <span class="type">GType</span>.  Note that
+in order to locate the metadata, the namespace corresponding to
+the type must first have been loaded.  There is currently no
+mechanism for determining the namespace which corresponds to an
+arbitrary GType - thus, this function will operate most reliably
+when you know the GType to originate from be from a loaded namespace.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>repository</code></em> :</span></p></td>
+<td>A <a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a>, may be <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> for the default. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>gtype</code></em> :</span></p></td>
+<td>GType to search for</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+<a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> representing metadata about <em class="parameter"><code>type</code></em>, or <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-irepository-get-n-infos"></a><h3>g_irepository_get_n_infos ()</h3>
+<pre class="programlisting"><span class="returnvalue">gint</span>                g_irepository_get_n_infos           (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *namespace_</code></em>);</pre>
+<p>
+This function returns the number of metadata entries in
+given namespace <em class="parameter"><code>namespace_</code></em>.  The namespace must have
+already been loaded before calling this function.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>repository</code></em> :</span></p></td>
+<td>A <a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a>, may be <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> for the default. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>namespace_</code></em> :</span></p></td>
+<td>Namespace to inspect</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>number of metadata entries</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-irepository-get-info"></a><h3>g_irepository_get_info ()</h3>
+<pre class="programlisting"><a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="returnvalue">GIBaseInfo</span></a> *        g_irepository_get_info              (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *namespace_</code></em>,
+                                                         <em class="parameter"><code><span class="type">gint</span> index</code></em>);</pre>
+<p>
+This function returns a particular metadata entry in the
+given namespace <em class="parameter"><code>namespace_</code></em>.  The namespace must have
+already been loaded before calling this function.
+See <a class="link" href="gi-girepository.html#g-irepository-get-n-infos" title="g_irepository_get_n_infos ()"><code class="function">g_irepository_get_n_infos()</code></a> to find the maximum number of
+entries.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>repository</code></em> :</span></p></td>
+<td>A <a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a>, may be <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> for the default. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>namespace_</code></em> :</span></p></td>
+<td>Namespace to inspect</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>index</code></em> :</span></p></td>
+<td>0-based offset into namespace metadata for entry</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+<a class="link" href="gi-GIBaseInfo.html#GIBaseInfo" title="GIBaseInfo"><span class="type">GIBaseInfo</span></a> containing metadata. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-irepository-get-typelib-path"></a><h3>g_irepository_get_typelib_path ()</h3>
+<pre class="programlisting">const <span class="returnvalue">gchar</span> *       g_irepository_get_typelib_path      (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *namespace_</code></em>);</pre>
+<p>
+If namespace <em class="parameter"><code>namespace_</code></em> is loaded, return the full path to the
+.typelib file it was loaded from.  If the typelib for
+namespace <em class="parameter"><code>namespace_</code></em> was included in a shared library, return
+the special string "$lt;builtin$gt;".
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>repository</code></em> :</span></p></td>
+<td>Repository, may be <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> for the default. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>namespace_</code></em> :</span></p></td>
+<td>GI namespace to use, e.g. "Gtk"</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>Filesystem path (or $lt;builtin$gt;) if successful, <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if namespace is not loaded</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-irepository-get-shared-library"></a><h3>g_irepository_get_shared_library ()</h3>
+<pre class="programlisting">const <span class="returnvalue">gchar</span> *       g_irepository_get_shared_library    (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *namespace_</code></em>);</pre>
+<p>
+This function returns the full path to the shared C library
+associated with the given namespace <em class="parameter"><code>namespace_</code></em>. There may be no
+shared library path associated, in which case this function will
+return <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>.
+</p>
+<p>
+Note: The namespace must have already been loaded using a function
+such as <a class="link" href="gi-girepository.html#g-irepository-require" title="g_irepository_require ()"><code class="function">g_irepository_require()</code></a> before calling this function.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>repository</code></em> :</span></p></td>
+<td>A <a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a>, may be <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> for the default. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>namespace_</code></em> :</span></p></td>
+<td>Namespace to inspect</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>Full path to shared library, or <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if none associated</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-irepository-get-version"></a><h3>g_irepository_get_version ()</h3>
+<pre class="programlisting">const <span class="returnvalue">gchar</span> *       g_irepository_get_version           (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *namespace_</code></em>);</pre>
+<p>
+This function returns the loaded version associated with the given
+namespace <em class="parameter"><code>namespace_</code></em>.
+</p>
+<p>
+Note: The namespace must have already been loaded using a function
+such as <a class="link" href="gi-girepository.html#g-irepository-require" title="g_irepository_require ()"><code class="function">g_irepository_require()</code></a> before calling this function.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>repository</code></em> :</span></p></td>
+<td>A <a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a>, may be <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> for the default. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>namespace_</code></em> :</span></p></td>
+<td>Namespace to inspect</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>Loaded version</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-irepository-get-option-group"></a><h3>g_irepository_get_option_group ()</h3>
+<pre class="programlisting"><span class="returnvalue">GOptionGroup</span> *      g_irepository_get_option_group      (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+<p>
+Obtain the option group for girepository, it's used
+by the dumper and for programs that wants to provide
+introspection information
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the option group. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-irepository-get-c-prefix"></a><h3>g_irepository_get_c_prefix ()</h3>
+<pre class="programlisting">const <span class="returnvalue">gchar</span> *       g_irepository_get_c_prefix          (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *namespace_</code></em>);</pre>
+<p>
+This function returns the "C prefix", or the C level namespace
+associated with the given introspection namespace.  Each C symbol
+starts with this prefix, as well each <span class="type">GType</span> in the library.
+</p>
+<p>
+Note: The namespace must have already been loaded using a function
+such as <a class="link" href="gi-girepository.html#g-irepository-require" title="g_irepository_require ()"><code class="function">g_irepository_require()</code></a> before calling this function.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>repository</code></em> :</span></p></td>
+<td>A <a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a>, may be <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> for the default. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>namespace_</code></em> :</span></p></td>
+<td>Namespace to inspect</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>C namespace prefix, or <a href="/src/build/jhbuild/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if none associated</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-irepository-dump"></a><h3>g_irepository_dump ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>            g_irepository_dump                  (<em class="parameter"><code>const <span class="type">char</span> *arg</code></em>,
+                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
+<p>
+Argument specified is a comma-separated pair of filenames; i.e. of
+the form "input.txt,output.xml".  The input file should be a
+UTF-8 Unix-line-ending text file, with each line containing the name
+of a GType _get_type function.
+</p>
+<p>
+The output file should already exist, but be empty.  This function will
+overwrite its contents.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>arg</code></em> :</span></p></td>
+<td>Comma-separated pair of input and output filenames</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
+<td>a <code class="literal">GError</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 success, <code class="literal">FALSE</code> on error</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-irepository-enumerate-versions"></a><h3>g_irepository_enumerate_versions ()</h3>
+<pre class="programlisting"><span class="returnvalue">GList</span> *             g_irepository_enumerate_versions    (<em class="parameter"><code><a class="link" href="gi-girepository.html#GIRepository"><span class="type">GIRepository</span></a> *repository</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *namespace_</code></em>);</pre>
+<p>
+Obtain an unordered list of versions (either currently loaded or
+available) for <em class="parameter"><code>namespace_</code></em> in this <em class="parameter"><code>repository</code></em>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>repository</code></em> :</span></p></td>
+<td>the repository. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>namespace_</code></em> :</span></p></td>
+<td>GI namespace, e.g. "Gtk"</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the array of versions. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="G-IREPOSITORY-ERROR:CAPS"></a><h3>G_IREPOSITORY_ERROR</h3>
+<pre class="programlisting">#define G_IREPOSITORY_ERROR (g_irepository_error_quark ())
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-typelib-new-from-memory"></a><h3>g_typelib_new_from_memory ()</h3>
+<pre class="programlisting"><a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="returnvalue">GITypelib</span></a> *         g_typelib_new_from_memory           (<em class="parameter"><code><span class="type">guint8</span> *memory</code></em>,
+                                                         <em class="parameter"><code><span class="type">gsize</span> len</code></em>,
+                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
+<p>
+Creates a new <a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="type">GITypelib</span></a> from a memory location.  The memory block
+pointed to by <em class="parameter"><code>typelib</code></em> will be automatically <code class="function">g_free()</code>d when the
+repository is destroyed.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>memory</code></em> :</span></p></td>
+<td>address of memory chunk containing the typelib</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
+<td>length of memory chunk containing the typelib</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
+<td>a <span class="type">GError</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the new <a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="type">GITypelib</span></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-typelib-new-from-const-memory"></a><h3>g_typelib_new_from_const_memory ()</h3>
+<pre class="programlisting"><a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="returnvalue">GITypelib</span></a> *         g_typelib_new_from_const_memory     (<em class="parameter"><code>const <span class="type">guint8</span> *memory</code></em>,
+                                                         <em class="parameter"><code><span class="type">gsize</span> len</code></em>,
+                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
+<p>
+Creates a new <a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="type">GITypelib</span></a> from a memory location.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>memory</code></em> :</span></p></td>
+<td>address of memory chunk containing the typelib</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
+<td>length of memory chunk containing the typelib</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
+<td>A <span class="type">GError</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the new <a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="type">GITypelib</span></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-typelib-new-from-mapped-file"></a><h3>g_typelib_new_from_mapped_file ()</h3>
+<pre class="programlisting"><a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="returnvalue">GITypelib</span></a> *         g_typelib_new_from_mapped_file      (<em class="parameter"><code><span class="type">GMappedFile</span> *mfile</code></em>,
+                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
+<p>
+Creates a new <a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="type">GITypelib</span></a> from a <span class="type">GMappedFile</span>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mfile</code></em> :</span></p></td>
+<td>a <span class="type">GMappedFile</span>, that will be free'd when the repository is destroyed</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
+<td>a <span class="type">GError</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the new <a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="type">GITypelib</span></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-typelib-free"></a><h3>g_typelib_free ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                g_typelib_free                      (<em class="parameter"><code><a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="type">GITypelib</span></a> *typelib</code></em>);</pre>
+<p>
+Free a <a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="type">GITypelib</span></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>typelib</code></em> :</span></p></td>
+<td>a <a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="type">GITypelib</span></a>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-typelib-symbol"></a><h3>g_typelib_symbol ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>            g_typelib_symbol                    (<em class="parameter"><code><a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="type">GITypelib</span></a> *typelib</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">gchar</span> *symbol_name</code></em>,
+                                                         <em class="parameter"><code><span class="type">gpointer</span> *symbol</code></em>);</pre>
+<p>
+Loads a symbol from <a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="type">GITypelib</span></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>typelib</code></em> :</span></p></td>
+<td>the typelib</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>symbol_name</code></em> :</span></p></td>
+<td>name of symbol to be loaded</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>symbol</code></em> :</span></p></td>
+<td>returns a pointer to the symbol value</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+<span class="type">TRUE</span> on success</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-typelib-get-namespace"></a><h3>g_typelib_get_namespace ()</h3>
+<pre class="programlisting">const <span class="returnvalue">gchar</span> *       g_typelib_get_namespace             (<em class="parameter"><code><a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="type">GITypelib</span></a> *typelib</code></em>);</pre>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi-girffi.html b/docs/reference/html/gi-girffi.html
new file mode 100644 (file)
index 0000000..fdee399
--- /dev/null
@@ -0,0 +1,238 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>girffi</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="gi-ffi.html" title="GIR Foreign functions interface">
+<link rel="prev" href="gi-ffi.html" title="GIR Foreign functions interface">
+<link rel="next" href="gi-repository-structs.html" title="GIRepository structs">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="gi-ffi.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="gi-ffi.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="gi-repository-structs.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#gi-girffi.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#gi-girffi.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry">
+<a name="gi-girffi"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="gi-girffi.top_of_page"></a>girffi</span></h2>
+<p>girffi</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<a name="gi-girffi.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis"><span class="returnvalue">void</span>                (<a class="link" href="gi-girffi.html#GIFFIClosureCallback" title="GIFFIClosureCallback ()">*GIFFIClosureCallback</a>)             (<em class="parameter"><code><span class="type">ffi_cif</span> *Param1</code></em>,
+                                                         <em class="parameter"><code><span class="type">void</span> *Param2</code></em>,
+                                                         <em class="parameter"><code><span class="type">void</span> **Param3</code></em>,
+                                                         <em class="parameter"><code><span class="type">void</span> *Param4</code></em>);
+struct              <a class="link" href="gi-girffi.html#GIFunctionInvoker" title="struct GIFunctionInvoker">GIFunctionInvoker</a>;
+<span class="returnvalue">void</span>                <a class="link" href="gi-girffi.html#gi-cclosure-marshal-generic" title="gi_cclosure_marshal_generic ()">gi_cclosure_marshal_generic</a>         (<em class="parameter"><code><span class="type">GClosure</span> *closure</code></em>,
+                                                         <em class="parameter"><code><span class="type">GValue</span> *return_gvalue</code></em>,
+                                                         <em class="parameter"><code><span class="type">guint</span> n_param_values</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">GValue</span> *param_values</code></em>,
+                                                         <em class="parameter"><code><span class="type">gpointer</span> invocation_hint</code></em>,
+                                                         <em class="parameter"><code><span class="type">gpointer</span> marshal_data</code></em>);
+<span class="returnvalue">ffi_type</span> *          <a class="link" href="gi-girffi.html#g-type-info-get-ffi-type" title="g_type_info_get_ffi_type ()">g_type_info_get_ffi_type</a>            (<em class="parameter"><code><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a> *info</code></em>);
+<span class="returnvalue">gboolean</span>            <a class="link" href="gi-girffi.html#g-function-info-prep-invoker" title="g_function_info_prep_invoker ()">g_function_info_prep_invoker</a>        (<em class="parameter"><code><a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="gi-girffi.html#GIFunctionInvoker" title="struct GIFunctionInvoker"><span class="type">GIFunctionInvoker</span></a> *invoker</code></em>,
+                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="gi-girffi.html#g-function-invoker-destroy" title="g_function_invoker_destroy ()">g_function_invoker_destroy</a>          (<em class="parameter"><code><a class="link" href="gi-girffi.html#GIFunctionInvoker" title="struct GIFunctionInvoker"><span class="type">GIFunctionInvoker</span></a> *invoker</code></em>);
+<span class="returnvalue">ffi_closure</span> *       <a class="link" href="gi-girffi.html#g-callable-info-prepare-closure" title="g_callable_info_prepare_closure ()">g_callable_info_prepare_closure</a>     (<em class="parameter"><code><a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a> *callable_info</code></em>,
+                                                         <em class="parameter"><code><span class="type">ffi_cif</span> *cif</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="gi-girffi.html#GIFFIClosureCallback" title="GIFFIClosureCallback ()"><span class="type">GIFFIClosureCallback</span></a> callback</code></em>,
+                                                         <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="gi-girffi.html#g-callable-info-free-closure" title="g_callable_info_free_closure ()">g_callable_info_free_closure</a>        (<em class="parameter"><code><a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a> *callable_info</code></em>,
+                                                         <em class="parameter"><code><span class="type">ffi_closure</span> *closure</code></em>);
+</pre>
+</div>
+<div class="refsect1">
+<a name="gi-girffi.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1">
+<a name="gi-girffi.details"></a><h2>Details</h2>
+<div class="refsect2">
+<a name="GIFFIClosureCallback"></a><h3>GIFFIClosureCallback ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                (*GIFFIClosureCallback)             (<em class="parameter"><code><span class="type">ffi_cif</span> *Param1</code></em>,
+                                                         <em class="parameter"><code><span class="type">void</span> *Param2</code></em>,
+                                                         <em class="parameter"><code><span class="type">void</span> **Param3</code></em>,
+                                                         <em class="parameter"><code><span class="type">void</span> *Param4</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GIFunctionInvoker"></a><h3>struct GIFunctionInvoker</h3>
+<pre class="programlisting">struct GIFunctionInvoker {
+  ffi_cif cif;
+  gpointer native_address;
+};
+</pre>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><span class="type">ffi_cif</span> <em class="structfield"><code><a name="GIFunctionInvoker.cif"></a>cif</code></em>;</span></p></td>
+<td>the cif</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">gpointer</span> <em class="structfield"><code><a name="GIFunctionInvoker.native-address"></a>native_address</code></em>;</span></p></td>
+<td>the native adress</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gi-cclosure-marshal-generic"></a><h3>gi_cclosure_marshal_generic ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                gi_cclosure_marshal_generic         (<em class="parameter"><code><span class="type">GClosure</span> *closure</code></em>,
+                                                         <em class="parameter"><code><span class="type">GValue</span> *return_gvalue</code></em>,
+                                                         <em class="parameter"><code><span class="type">guint</span> n_param_values</code></em>,
+                                                         <em class="parameter"><code>const <span class="type">GValue</span> *param_values</code></em>,
+                                                         <em class="parameter"><code><span class="type">gpointer</span> invocation_hint</code></em>,
+                                                         <em class="parameter"><code><span class="type">gpointer</span> marshal_data</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-type-info-get-ffi-type"></a><h3>g_type_info_get_ffi_type ()</h3>
+<pre class="programlisting"><span class="returnvalue">ffi_type</span> *          g_type_info_get_ffi_type            (<em class="parameter"><code><a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a> *info</code></em>);</pre>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>A <a class="link" href="gi-GITypeInfo.html#GITypeInfo" title="GITypeInfo"><span class="type">GITypeInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>A <span class="type">ffi_type</span> corresponding to the platform default C ABI for <em class="parameter"><code>info</code></em>.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-function-info-prep-invoker"></a><h3>g_function_info_prep_invoker ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>            g_function_info_prep_invoker        (<em class="parameter"><code><a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a> *info</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="gi-girffi.html#GIFunctionInvoker" title="struct GIFunctionInvoker"><span class="type">GIFunctionInvoker</span></a> *invoker</code></em>,
+                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
+<p>
+Initialize the caller-allocated <em class="parameter"><code>invoker</code></em> structure with a cache
+of information needed to invoke the C function corresponding to
+<em class="parameter"><code>info</code></em> with the platform's default ABI.
+</p>
+<p>
+A primary intent of this function is that a dynamic structure allocated
+by a language binding could contain a <a class="link" href="gi-girffi.html#GIFunctionInvoker" title="struct GIFunctionInvoker"><span class="type">GIFunctionInvoker</span></a> structure
+inside the binding's function mapping.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
+<td>A <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="type">GIFunctionInfo</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>invoker</code></em> :</span></p></td>
+<td>Output invoker structure</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
+<td>A <span class="type">GError</span>
+</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 with <em class="parameter"><code>error</code></em> set.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-function-invoker-destroy"></a><h3>g_function_invoker_destroy ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                g_function_invoker_destroy          (<em class="parameter"><code><a class="link" href="gi-girffi.html#GIFunctionInvoker" title="struct GIFunctionInvoker"><span class="type">GIFunctionInvoker</span></a> *invoker</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-callable-info-prepare-closure"></a><h3>g_callable_info_prepare_closure ()</h3>
+<pre class="programlisting"><span class="returnvalue">ffi_closure</span> *       g_callable_info_prepare_closure     (<em class="parameter"><code><a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a> *callable_info</code></em>,
+                                                         <em class="parameter"><code><span class="type">ffi_cif</span> *cif</code></em>,
+                                                         <em class="parameter"><code><a class="link" href="gi-girffi.html#GIFFIClosureCallback" title="GIFFIClosureCallback ()"><span class="type">GIFFIClosureCallback</span></a> callback</code></em>,
+                                                         <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
+<p>
+Prepares a callback for ffi invocation.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>callable_info</code></em> :</span></p></td>
+<td>a callable info from a typelib</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>cif</code></em> :</span></p></td>
+<td>a ffi_cif structure</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
+<td>the ffi callback</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
+<td>data to be passed into the callback</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the ffi_closure or NULL on error.
+The return value should be freed by calling <a class="link" href="gi-girffi.html#g-callable-info-free-closure" title="g_callable_info_free_closure ()"><code class="function">g_callable_info_free_closure()</code></a>.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-callable-info-free-closure"></a><h3>g_callable_info_free_closure ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                g_callable_info_free_closure        (<em class="parameter"><code><a class="link" href="gi-GICallableInfo.html#GICallableInfo" title="GICallableInfo"><span class="type">GICallableInfo</span></a> *callable_info</code></em>,
+                                                         <em class="parameter"><code><span class="type">ffi_closure</span> *closure</code></em>);</pre>
+<p>
+Frees a ffi_closure returned from <a class="link" href="gi-girffi.html#g-callable-info-prepare-closure" title="g_callable_info_prepare_closure ()"><code class="function">g_callable_info_prepare_closure()</code></a>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>callable_info</code></em> :</span></p></td>
+<td>a callable info from a typelib</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>closure</code></em> :</span></p></td>
+<td>ffi closure</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi-gtypelib.html b/docs/reference/html/gi-gtypelib.html
new file mode 100644 (file)
index 0000000..54f1f0c
--- /dev/null
@@ -0,0 +1,2058 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>gtypelib</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="gi-typelib.html" title="Typelib binary format">
+<link rel="prev" href="gi-typelib.html" title="Typelib binary format">
+<link rel="next" href="annotation-glossary.html" title="Annotation Glossary">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="gi-typelib.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="gi-typelib.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="annotation-glossary.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#gi-gtypelib.synopsis" class="shortcut">Top</a>
+                  Â | 
+                  <a href="#gi-gtypelib.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry">
+<a name="gi-gtypelib"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="gi-gtypelib.top_of_page"></a>gtypelib</span></h2>
+<p>gtypelib â€” Layout and accessors for typelib</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="gi-gtypelib.stability-level"></a><h2>Stability Level</h2>
+Stable, unless otherwise indicated
+</div>
+<div class="refsynopsisdiv">
+<a name="gi-gtypelib.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">#define             <a class="link" href="gi-gtypelib.html#G-IR-MAGIC:CAPS" title="G_IR_MAGIC">G_IR_MAGIC</a>
+enum                <a class="link" href="gi-gtypelib.html#GTypelibBlobType" title="enum GTypelibBlobType">GTypelibBlobType</a>;
+                    <a class="link" href="gi-gtypelib.html#Header" title="Header">Header</a>;
+                    <a class="link" href="gi-gtypelib.html#DirEntry" title="DirEntry">DirEntry</a>;
+                    <a class="link" href="gi-gtypelib.html#ArgBlob" title="ArgBlob">ArgBlob</a>;
+                    <a class="link" href="gi-gtypelib.html#SignatureBlob" title="SignatureBlob">SignatureBlob</a>;
+                    <a class="link" href="gi-gtypelib.html#CommonBlob" title="CommonBlob">CommonBlob</a>;
+                    <a class="link" href="gi-gtypelib.html#FunctionBlob" title="FunctionBlob">FunctionBlob</a>;
+                    <a class="link" href="gi-gtypelib.html#CallbackBlob" title="CallbackBlob">CallbackBlob</a>;
+                    <a class="link" href="gi-gtypelib.html#InterfaceTypeBlob" title="InterfaceTypeBlob">InterfaceTypeBlob</a>;
+                    <a class="link" href="gi-gtypelib.html#ParamTypeBlob" title="ParamTypeBlob">ParamTypeBlob</a>;
+                    <a class="link" href="gi-gtypelib.html#ErrorTypeBlob" title="ErrorTypeBlob">ErrorTypeBlob</a>;
+                    <a class="link" href="gi-gtypelib.html#ValueBlob" title="ValueBlob">ValueBlob</a>;
+                    <a class="link" href="gi-gtypelib.html#FieldBlob" title="FieldBlob">FieldBlob</a>;
+                    <a class="link" href="gi-gtypelib.html#RegisteredTypeBlob" title="RegisteredTypeBlob">RegisteredTypeBlob</a>;
+                    <a class="link" href="gi-gtypelib.html#StructBlob" title="StructBlob">StructBlob</a>;
+                    <a class="link" href="gi-gtypelib.html#UnionBlob" title="UnionBlob">UnionBlob</a>;
+                    <a class="link" href="gi-gtypelib.html#EnumBlob" title="EnumBlob">EnumBlob</a>;
+                    <a class="link" href="gi-gtypelib.html#PropertyBlob" title="PropertyBlob">PropertyBlob</a>;
+                    <a class="link" href="gi-gtypelib.html#SignalBlob" title="SignalBlob">SignalBlob</a>;
+                    <a class="link" href="gi-gtypelib.html#VFuncBlob" title="VFuncBlob">VFuncBlob</a>;
+                    <a class="link" href="gi-gtypelib.html#ObjectBlob" title="ObjectBlob">ObjectBlob</a>;
+                    <a class="link" href="gi-gtypelib.html#InterfaceBlob" title="InterfaceBlob">InterfaceBlob</a>;
+                    <a class="link" href="gi-gtypelib.html#ConstantBlob" title="ConstantBlob">ConstantBlob</a>;
+                    <a class="link" href="gi-gtypelib.html#AttributeBlob" title="AttributeBlob">AttributeBlob</a>;
+<a class="link" href="gi-gtypelib.html#DirEntry" title="DirEntry"><span class="returnvalue">DirEntry</span></a> *          <a class="link" href="gi-gtypelib.html#g-typelib-get-dir-entry" title="g_typelib_get_dir_entry ()">g_typelib_get_dir_entry</a>             (<em class="parameter"><code><a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="type">GITypelib</span></a> *typelib</code></em>,
+                                                         <em class="parameter"><code><span class="type">guint16</span> index</code></em>);
+<span class="returnvalue">void</span>                <a class="link" href="gi-gtypelib.html#g-typelib-check-sanity" title="g_typelib_check_sanity ()">g_typelib_check_sanity</a>              (<em class="parameter"><code><span class="type">void</span></code></em>);
+#define             <a class="link" href="gi-gtypelib.html#g-typelib-get-string" title="g_typelib_get_string()">g_typelib_get_string</a>                (typelib,
+                                                         offset)
+#define             <a class="link" href="gi-gtypelib.html#G-TYPELIB-ERROR:CAPS" title="G_TYPELIB_ERROR">G_TYPELIB_ERROR</a>
+<span class="returnvalue">gboolean</span>            <a class="link" href="gi-gtypelib.html#g-typelib-validate" title="g_typelib_validate ()">g_typelib_validate</a>                  (<em class="parameter"><code><a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="type">GITypelib</span></a> *typelib</code></em>,
+                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
+#define             <a class="link" href="gi-gtypelib.html#BLOB-IS-REGISTERED-TYPE:CAPS" title="BLOB_IS_REGISTERED_TYPE()">BLOB_IS_REGISTERED_TYPE</a>             (blob)
+</pre>
+</div>
+<div class="refsect1">
+<a name="gi-gtypelib.description"></a><h2>Description</h2>
+<p>
+The "typelib" is a binary, readonly, memory-mappable database
+containing reflective information about a GObject library.
+</p>
+<p>
+The format of GObject typelib is strongly influenced by the Mozilla XPCOM
+format.
+</p>
+<p>
+Some of the differences to XPCOM include:
+</p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem"><p>Type information is stored not quite as compactly (XPCOM stores it inline
+in function descriptions in variable-sized blobs of 1 to n bytes. We store
+16 bits of type information for each parameter, which is enough to encode
+simple types inline. Complex (e.g. recursive) types are stored out of line
+in a separate list of types.</p></li>
+<li class="listitem"><p>String and complex type data is stored outside of typelib entry blobs,
+references are stored as offsets relative to the start of the typelib.
+One possibility is to store the strings and types in a pools at the end
+of the typelib.</p></li>
+</ul></div>
+<p>
+</p>
+<p>
+The typelib has the following general format.
+</p>
+<p>
+typelib ::= header, section-index, directory, blobs, attributes, attributedata
+</p>
+<p>
+directory ::= list of entries
+</p>
+<p>
+entry ::= blob type, name, namespace, offset
+blob ::= function|callback|struct|boxed|enum|flags|object|interface|constant|union
+attributes ::= list of attributes, sorted by offset
+attribute ::= offset, key, value
+attributedata ::= string data for attributes
+</p>
+<p>
+Details
+</p>
+<p>
+We describe the fragments that make up the typelib in the form of C structs
+(although some fall short of being valid C structs since they contain multiple
+flexible arrays).
+</p>
+</div>
+<div class="refsect1">
+<a name="gi-gtypelib.details"></a><h2>Details</h2>
+<div class="refsect2">
+<a name="G-IR-MAGIC:CAPS"></a><h3>G_IR_MAGIC</h3>
+<pre class="programlisting">#define G_IR_MAGIC "GOBJ\nMETADATA\r\n\032"
+</pre>
+<p>
+Identifying prefix for the typelib.  This was inspired by XPCOM,
+which in turn borrowed from PNG.
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GTypelibBlobType"></a><h3>enum GTypelibBlobType</h3>
+<pre class="programlisting">typedef enum {
+  BLOB_TYPE_INVALID,
+  BLOB_TYPE_FUNCTION,
+  BLOB_TYPE_CALLBACK,
+  BLOB_TYPE_STRUCT,
+  BLOB_TYPE_BOXED,
+  BLOB_TYPE_ENUM,
+  BLOB_TYPE_FLAGS,
+  BLOB_TYPE_OBJECT,
+  BLOB_TYPE_INTERFACE,
+  BLOB_TYPE_CONSTANT,
+  BLOB_TYPE_INVALID_0, /* DELETED - used to be ErrorDomain */
+  BLOB_TYPE_UNION
+} GTypelibBlobType;
+</pre>
+<p>
+The integral value of this enumeration appears in each "Blob"
+component of a typelib to identify its type.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><a name="BLOB-TYPE-INVALID:CAPS"></a><span class="term"><code class="literal">BLOB_TYPE_INVALID</code></span></p></td>
+<td>Should not appear in code
+</td>
+</tr>
+<tr>
+<td><p><a name="BLOB-TYPE-FUNCTION:CAPS"></a><span class="term"><code class="literal">BLOB_TYPE_FUNCTION</code></span></p></td>
+<td>A <a class="link" href="gi-gtypelib.html#FunctionBlob" title="FunctionBlob"><span class="type">FunctionBlob</span></a>
+</td>
+</tr>
+<tr>
+<td><p><a name="BLOB-TYPE-CALLBACK:CAPS"></a><span class="term"><code class="literal">BLOB_TYPE_CALLBACK</code></span></p></td>
+<td>A <a class="link" href="gi-gtypelib.html#CallbackBlob" title="CallbackBlob"><span class="type">CallbackBlob</span></a>
+</td>
+</tr>
+<tr>
+<td><p><a name="BLOB-TYPE-STRUCT:CAPS"></a><span class="term"><code class="literal">BLOB_TYPE_STRUCT</code></span></p></td>
+<td>A <a class="link" href="gi-gtypelib.html#StructBlob" title="StructBlob"><span class="type">StructBlob</span></a>
+</td>
+</tr>
+<tr>
+<td><p><a name="BLOB-TYPE-BOXED:CAPS"></a><span class="term"><code class="literal">BLOB_TYPE_BOXED</code></span></p></td>
+<td>Can be either a <a class="link" href="gi-gtypelib.html#StructBlob" title="StructBlob"><span class="type">StructBlob</span></a> or <a class="link" href="gi-gtypelib.html#UnionBlob" title="UnionBlob"><span class="type">UnionBlob</span></a>
+</td>
+</tr>
+<tr>
+<td><p><a name="BLOB-TYPE-ENUM:CAPS"></a><span class="term"><code class="literal">BLOB_TYPE_ENUM</code></span></p></td>
+<td>An <a class="link" href="gi-gtypelib.html#EnumBlob" title="EnumBlob"><span class="type">EnumBlob</span></a>
+</td>
+</tr>
+<tr>
+<td><p><a name="BLOB-TYPE-FLAGS:CAPS"></a><span class="term"><code class="literal">BLOB_TYPE_FLAGS</code></span></p></td>
+<td>An <a class="link" href="gi-gtypelib.html#EnumBlob" title="EnumBlob"><span class="type">EnumBlob</span></a>
+</td>
+</tr>
+<tr>
+<td><p><a name="BLOB-TYPE-OBJECT:CAPS"></a><span class="term"><code class="literal">BLOB_TYPE_OBJECT</code></span></p></td>
+<td>An <a class="link" href="gi-gtypelib.html#ObjectBlob" title="ObjectBlob"><span class="type">ObjectBlob</span></a>
+</td>
+</tr>
+<tr>
+<td><p><a name="BLOB-TYPE-INTERFACE:CAPS"></a><span class="term"><code class="literal">BLOB_TYPE_INTERFACE</code></span></p></td>
+<td>An <a class="link" href="gi-gtypelib.html#InterfaceBlob" title="InterfaceBlob"><span class="type">InterfaceBlob</span></a>
+</td>
+</tr>
+<tr>
+<td><p><a name="BLOB-TYPE-CONSTANT:CAPS"></a><span class="term"><code class="literal">BLOB_TYPE_CONSTANT</code></span></p></td>
+<td>A <a class="link" href="gi-gtypelib.html#ConstantBlob" title="ConstantBlob"><span class="type">ConstantBlob</span></a>
+</td>
+</tr>
+<tr>
+<td><p><a name="BLOB-TYPE-INVALID-0:CAPS"></a><span class="term"><code class="literal">BLOB_TYPE_INVALID_0</code></span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><a name="BLOB-TYPE-UNION:CAPS"></a><span class="term"><code class="literal">BLOB_TYPE_UNION</code></span></p></td>
+<td>A <a class="link" href="gi-gtypelib.html#UnionBlob" title="UnionBlob"><span class="type">UnionBlob</span></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="Header"></a><h3>Header</h3>
+<pre class="programlisting">typedef struct {
+  gchar   magic[16];
+  guint8  major_version;
+  guint8  minor_version;
+  guint16 n_entries;
+  guint16 n_local_entries;
+  guint32 directory;
+  guint32 n_attributes;
+  guint32 attributes;
+
+  guint32 dependencies;
+
+  guint32 size;
+  guint32 namespace;
+  guint32 nsversion;
+  guint32 shared_library;
+  guint32 c_prefix;
+
+  guint16 entry_blob_size;
+  guint16 function_blob_size;
+  guint16 callback_blob_size;
+  guint16 signal_blob_size;
+  guint16 vfunc_blob_size;
+  guint16 arg_blob_size;
+  guint16 property_blob_size;
+  guint16 field_blob_size;
+  guint16 value_blob_size;
+  guint16 attribute_blob_size;
+  guint16 constant_blob_size;
+  guint16 error_domain_blob_size;
+
+  guint16 signature_blob_size;
+  guint16 enum_blob_size;
+  guint16 struct_blob_size;
+  guint16 object_blob_size;
+  guint16 interface_blob_size;
+  guint16 union_blob_size;
+
+  guint32 sections;
+} Header;
+</pre>
+<p>
+The header structure appears exactly once at the beginning of a typelib.  It is a
+collection of meta-information, such as the number of entries and dependencies.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><span class="type">gchar</span> <em class="structfield"><code><a name="Header.magic"></a>magic</code></em>[16];</span></p></td>
+<td>See <a class="link" href="gi-gtypelib.html#G-IR-MAGIC:CAPS" title="G_IR_MAGIC"><span class="type">G_IR_MAGIC</span></a>.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint8</span> <em class="structfield"><code><a name="Header.major-version"></a>major_version</code></em>;</span></p></td>
+<td>The version of the typelib format. Minor version changes indicate
+compatible changes and should still allow the typelib to be parsed
+by a parser designed for the same major_version.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint8</span> <em class="structfield"><code><a name="Header.minor-version"></a>minor_version</code></em>;</span></p></td>
+<td>See major_version.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="Header.n-entries"></a>n_entries</code></em>;</span></p></td>
+<td>The number of entries in the directory.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="Header.n-local-entries"></a>n_local_entries</code></em>;</span></p></td>
+<td>The number of entries referring to blobs in this typelib. The
+local entries must occur before the unresolved entries.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="Header.directory"></a>directory</code></em>;</span></p></td>
+<td>Offset of the directory in the typelib.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="Header.n-attributes"></a>n_attributes</code></em>;</span></p></td>
+<td>Number of attribute blocks</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="Header.attributes"></a>attributes</code></em>;</span></p></td>
+<td>Offset of the list of attributes in the typelib.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="Header.dependencies"></a>dependencies</code></em>;</span></p></td>
+<td>Offset of a single string, which is the list of
+dependencies, separated by the '|' character.  The
+dependencies are required in order to avoid having programs
+consuming a typelib check for an "Unresolved" type return
+from every API call.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="Header.size"></a>size</code></em>;</span></p></td>
+<td>The size in bytes of the typelib.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="Header.namespace"></a>namespace</code></em>;</span></p></td>
+<td>Offset of the namespace string in the typelib.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="Header.nsversion"></a>nsversion</code></em>;</span></p></td>
+<td>Offset of the namespace version string in the typelib.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="Header.shared-library"></a>shared_library</code></em>;</span></p></td>
+<td>This field is the set of shared libraries associated
+with the typelib.  The entries are separated by the '|' (pipe) character.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="Header.c-prefix"></a>c_prefix</code></em>;</span></p></td>
+<td>The prefix for the function names of the library</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="Header.entry-blob-size"></a>entry_blob_size</code></em>;</span></p></td>
+<td>The sizes of fixed-size blobs. Recording this information here
+allows to write parser which continue to work if the format is
+extended by adding new fields to the end of the fixed-size blobs.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="Header.function-blob-size"></a>function_blob_size</code></em>;</span></p></td>
+<td>See above.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="Header.callback-blob-size"></a>callback_blob_size</code></em>;</span></p></td>
+<td>See above.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="Header.signal-blob-size"></a>signal_blob_size</code></em>;</span></p></td>
+<td>See above.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="Header.vfunc-blob-size"></a>vfunc_blob_size</code></em>;</span></p></td>
+<td>See above.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="Header.arg-blob-size"></a>arg_blob_size</code></em>;</span></p></td>
+<td>See above.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="Header.property-blob-size"></a>property_blob_size</code></em>;</span></p></td>
+<td>See above.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="Header.field-blob-size"></a>field_blob_size</code></em>;</span></p></td>
+<td>See above.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="Header.value-blob-size"></a>value_blob_size</code></em>;</span></p></td>
+<td>See above.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="Header.attribute-blob-size"></a>attribute_blob_size</code></em>;</span></p></td>
+<td>See above.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="Header.constant-blob-size"></a>constant_blob_size</code></em>;</span></p></td>
+<td>See above.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="Header.error-domain-blob-size"></a>error_domain_blob_size</code></em>;</span></p></td>
+<td>See above.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="Header.signature-blob-size"></a>signature_blob_size</code></em>;</span></p></td>
+<td>See above.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="Header.enum-blob-size"></a>enum_blob_size</code></em>;</span></p></td>
+<td>See above.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="Header.struct-blob-size"></a>struct_blob_size</code></em>;</span></p></td>
+<td>See above.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="Header.object-blob-size"></a>object_blob_size</code></em>;</span></p></td>
+<td>See above.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="Header.interface-blob-size"></a>interface_blob_size</code></em>;</span></p></td>
+<td>For variable-size blobs, the size of the struct up to the first
+flexible array member. Recording this information here allows to
+write parser which continue to work if the format is extended by
+adding new fields before the first flexible array member in
+variable-size blobs.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="Header.union-blob-size"></a>union_blob_size</code></em>;</span></p></td>
+<td>See above.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="Header.sections"></a>sections</code></em>;</span></p></td>
+<td>Offset of section blob array</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="DirEntry"></a><h3>DirEntry</h3>
+<pre class="programlisting">typedef struct {
+  guint16 blob_type;
+
+  guint16 local    : 1;
+  guint32 name;
+  guint32 offset;
+} DirEntry;
+</pre>
+<p>
+References to directory entries are stored as 1-based 16-bit indexes.
+</p>
+<p>
+All blobs pointed to by a directory entry start with the same layout for
+the first 8 bytes (the reserved flags may be used by some blob types)
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="DirEntry.blob-type"></a>blob_type</code></em>;</span></p></td>
+<td>A <a class="link" href="gi-gtypelib.html#GTypelibBlobType" title="enum GTypelibBlobType"><span class="type">GTypelibBlobType</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="DirEntry.local"></a>local</code></em> : 1;</span></p></td>
+<td>Whether this entry refers to a blob in this typelib.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="DirEntry.name"></a>name</code></em>;</span></p></td>
+<td>The name of the entry.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="DirEntry.offset"></a>offset</code></em>;</span></p></td>
+<td>If is_local is set, this is the offset of the blob in the typelib.
+Otherwise, it is the offset of the namespace in which the blob has
+to be looked up by name.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="ArgBlob"></a><h3>ArgBlob</h3>
+<pre class="programlisting">typedef struct {
+  guint32        name;
+
+  guint          in                           : 1;
+  guint          out                          : 1;
+  guint          caller_allocates             : 1;
+  guint          allow_none                   : 1;
+  guint          optional                     : 1;
+  guint          transfer_ownership           : 1;
+  guint          transfer_container_ownership : 1;
+  guint          return_value                 : 1;
+  guint          scope                        : 3;
+  guint          skip                         : 1;
+  gint8        closure;
+  gint8        destroy;
+
+
+  SimpleTypeBlob arg_type;
+} ArgBlob;
+</pre>
+<p>
+Types are specified by four bytes. If the three high bytes are zero,
+the low byte describes a basic type, otherwise the 32bit number is an
+offset which points to a TypeBlob.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="ArgBlob.name"></a>name</code></em>;</span></p></td>
+<td>A suggested name for the parameter.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint</span> <em class="structfield"><code><a name="ArgBlob.in"></a>in</code></em> : 1;</span></p></td>
+<td>The parameter is an input to the function</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint</span> <em class="structfield"><code><a name="ArgBlob.out"></a>out</code></em> : 1;</span></p></td>
+<td>The parameter is used to return an output of the function.
+Parameters can be both in and out. Out parameters implicitly
+add another level of indirection to the parameter type. Ie if
+the type is uint32 in an out parameter, the function actually
+takes an uint32*.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint</span> <em class="structfield"><code><a name="ArgBlob.caller-allocates"></a>caller_allocates</code></em> : 1;</span></p></td>
+<td>The parameter is a pointer to a struct or object that will
+receive an output of the function.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint</span> <em class="structfield"><code><a name="ArgBlob.allow-none"></a>allow_none</code></em> : 1;</span></p></td>
+<td>Only meaningful for types which are passed as pointers.
+For an in parameter, indicates if it is ok to pass NULL in, for
+an out parameter, whether it may return NULL. Note that NULL is a
+valid GList and GSList value, thus allow_none will normally be set
+for parameters of these types.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint</span> <em class="structfield"><code><a name="ArgBlob.optional"></a>optional</code></em> : 1;</span></p></td>
+<td>For an out parameter, indicates that NULL may be passed in
+if the value is not needed.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint</span> <em class="structfield"><code><a name="ArgBlob.transfer-ownership"></a>transfer_ownership</code></em> : 1;</span></p></td>
+<td>For an in parameter, indicates that the function takes over
+ownership of the parameter value. For an out parameter, it
+indicates that the caller is responsible for freeing the return
+value.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint</span> <em class="structfield"><code><a name="ArgBlob.transfer-container-ownership"></a>transfer_container_ownership</code></em> : 1;</span></p></td>
+<td>For container types, indicates that the
+ownership of the container,  but not of its contents is transferred. This is typically the case
+for out parameters returning lists of statically allocated things.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint</span> <em class="structfield"><code><a name="ArgBlob.return-value"></a>return_value</code></em> : 1;</span></p></td>
+<td>The parameter should be considered the return value of the function.
+Only out parameters can be marked as return value, and there can be
+at most one per function call. If an out parameter is marked as
+return value, the actual return value of the function should be
+either void or a boolean indicating the success of the call.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint</span> <em class="structfield"><code><a name="ArgBlob.scope"></a>scope</code></em> : 3;</span></p></td>
+<td>A <a class="link" href="gi-GIArgInfo.html#GIScopeType" title="enum GIScopeType"><span class="type">GIScopeType</span></a>. If the parameter is of a callback type, this denotes the scope
+of the user_data and the callback function pointer itself
+(for languages that emit code at run-time).</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint</span> <em class="structfield"><code><a name="ArgBlob.skip"></a>skip</code></em> : 1;</span></p></td>
+<td>Indicates that the parameter is only useful in C and should be skipped.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">gint8</span> <em class="structfield"><code><a name="ArgBlob.closure"></a>closure</code></em>;</span></p></td>
+<td>Index of the closure (user_data) parameter associated with the callback,
+or -1.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">gint8</span> <em class="structfield"><code><a name="ArgBlob.destroy"></a>destroy</code></em>;</span></p></td>
+<td>Index of the destroy notfication callback parameter associated with
+the callback, or -1.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">SimpleTypeBlob</span> <em class="structfield"><code><a name="ArgBlob.arg-type"></a>arg_type</code></em>;</span></p></td>
+<td>Describes the type of the parameter. See details below.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="SignatureBlob"></a><h3>SignatureBlob</h3>
+<pre class="programlisting">typedef struct {
+  SimpleTypeBlob return_type;
+
+  guint16        may_return_null              : 1;
+  guint16        caller_owns_return_value     : 1;
+  guint16        caller_owns_return_container : 1;
+  guint16        skip_return                  : 1;
+  guint16        reserved                     :12;
+
+  guint16        n_arguments;
+
+  ArgBlob        arguments[];
+} SignatureBlob;
+</pre>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><span class="type">SimpleTypeBlob</span> <em class="structfield"><code><a name="SignatureBlob.return-type"></a>return_type</code></em>;</span></p></td>
+<td>Describes the type of the return value. See details below.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="SignatureBlob.may-return-null"></a>may_return_null</code></em> : 1;</span></p></td>
+<td>Only relevant for pointer types. Indicates whether the caller
+must expect NULL as a return value.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="SignatureBlob.caller-owns-return-value"></a>caller_owns_return_value</code></em> : 1;</span></p></td>
+<td>If set, the caller is responsible for freeing the return value
+if it is no longer needed.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="SignatureBlob.caller-owns-return-container"></a>caller_owns_return_container</code></em> : 1;</span></p></td>
+<td>This flag is only relevant if the return type is a container type.
+If the flag is set, the caller is resonsible for freeing the
+container, but not its contents.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="SignatureBlob.skip-return"></a>skip_return</code></em> : 1;</span></p></td>
+<td>Indicates that the return value is only useful in C and should be skipped.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="SignatureBlob.reserved"></a>reserved</code></em> :12;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="SignatureBlob.n-arguments"></a>n_arguments</code></em>;</span></p></td>
+<td>The number of arguments that this function expects, also the length
+of the array of ArgBlobs.</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="gi-gtypelib.html#ArgBlob" title="ArgBlob"><span class="type">ArgBlob</span></a> <em class="structfield"><code><a name="SignatureBlob.arguments"></a>arguments</code></em>[];</span></p></td>
+<td>An array of ArgBlob for the arguments of the function.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="CommonBlob"></a><h3>CommonBlob</h3>
+<pre class="programlisting">typedef struct {
+  guint16 blob_type;  /* 1 */
+
+  guint16 deprecated : 1;
+  guint32 name;
+} CommonBlob;
+</pre>
+<p>
+The <a class="link" href="gi-gtypelib.html#CommonBlob" title="CommonBlob"><span class="type">CommonBlob</span></a> is shared between <a class="link" href="gi-gtypelib.html#FunctionBlob" title="FunctionBlob"><span class="type">FunctionBlob</span></a>,
+<a class="link" href="gi-gtypelib.html#CallbackBlob" title="CallbackBlob"><span class="type">CallbackBlob</span></a>, <a class="link" href="gi-gtypelib.html#SignalBlob" title="SignalBlob"><span class="type">SignalBlob</span></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="CommonBlob.blob-type"></a>blob_type</code></em>;</span></p></td>
+<td>A <a class="link" href="gi-gtypelib.html#GTypelibBlobType" title="enum GTypelibBlobType"><span class="type">GTypelibBlobType</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="CommonBlob.deprecated"></a>deprecated</code></em> : 1;</span></p></td>
+<td>Whether the blob is deprecated.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="CommonBlob.name"></a>name</code></em>;</span></p></td>
+<td>The name of the blob.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="FunctionBlob"></a><h3>FunctionBlob</h3>
+<pre class="programlisting">typedef struct {
+  guint16 blob_type;  /* 1 */
+
+  guint16 deprecated  : 1;
+  guint16 setter      : 1;
+  guint16 getter      : 1;
+  guint16 constructor : 1;
+  guint16 wraps_vfunc : 1;
+  guint16 throws      : 1;
+  guint16 index       :10;
+  /* Note the bits above need to match CommonBlob
+   * and are thus exhausted, extend things using
+   * the reserved block below. */
+
+  guint32 name;
+  guint32 symbol;
+  guint32 signature;
+
+  guint16 is_static   : 1;
+  guint16 reserved    : 15;
+  guint16 reserved2   : 16;
+} FunctionBlob;
+</pre>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="FunctionBlob.blob-type"></a>blob_type</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="FunctionBlob.deprecated"></a>deprecated</code></em> : 1;</span></p></td>
+<td>The function is deprecated.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="FunctionBlob.setter"></a>setter</code></em> : 1;</span></p></td>
+<td>The function is a setter for a property. Language bindings may
+prefer to not bind individual setters and rely on the generic
+<code class="function">g_object_set()</code>.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="FunctionBlob.getter"></a>getter</code></em> : 1;</span></p></td>
+<td>The function is a getter for a property. Language bindings may
+prefer to not bind individual getters and rely on the generic
+<code class="function">g_object_get()</code>.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="FunctionBlob.constructor"></a>constructor</code></em> : 1;</span></p></td>
+<td>The function acts as a constructor for the object it is contained
+in.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="FunctionBlob.wraps-vfunc"></a>wraps_vfunc</code></em> : 1;</span></p></td>
+<td>The function is a simple wrapper for a virtual function.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="FunctionBlob.throws"></a>throws</code></em> : 1;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="FunctionBlob.index"></a>index</code></em> :10;</span></p></td>
+<td>Index of the property that this function is a setter or getter of
+in the array of properties of the containing interface, or index
+of the virtual function that this function wraps.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="FunctionBlob.name"></a>name</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="FunctionBlob.symbol"></a>symbol</code></em>;</span></p></td>
+<td>The symbol which can be used to obtain the function pointer with
+<code class="function">dlsym()</code>.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="FunctionBlob.signature"></a>signature</code></em>;</span></p></td>
+<td>Offset of the SignatureBlob describing the parameter types and the
+return value type.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="FunctionBlob.is-static"></a>is_static</code></em> : 1;</span></p></td>
+<td>The function is a "static method"; in other words it's a pure
+function whose name is conceptually scoped to the object.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="FunctionBlob.reserved"></a>reserved</code></em> : 15;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="FunctionBlob.reserved2"></a>reserved2</code></em> : 16;</span></p></td>
+<td></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="CallbackBlob"></a><h3>CallbackBlob</h3>
+<pre class="programlisting">typedef struct {
+  guint16 blob_type;  /* 2 */
+
+  guint16 deprecated : 1;
+  guint32 name;
+  guint32 signature;
+} CallbackBlob;
+</pre>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="CallbackBlob.blob-type"></a>blob_type</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="CallbackBlob.deprecated"></a>deprecated</code></em> : 1;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="CallbackBlob.name"></a>name</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="CallbackBlob.signature"></a>signature</code></em>;</span></p></td>
+<td>Offset of the <a class="link" href="gi-gtypelib.html#SignatureBlob" title="SignatureBlob"><span class="type">SignatureBlob</span></a> describing the parameter types and the
+return value type.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="InterfaceTypeBlob"></a><h3>InterfaceTypeBlob</h3>
+<pre class="programlisting">typedef struct {
+  guint8  pointer  :1;
+  guint8  tag      :5;
+  guint16 interface;
+} InterfaceTypeBlob;
+</pre>
+<p>
+If the interface is an enum of flags type, is_pointer is 0, otherwise it is 1.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><span class="type">guint8</span> <em class="structfield"><code><a name="InterfaceTypeBlob.pointer"></a>pointer</code></em> :1;</span></p></td>
+<td>Whether this type represents an indirection</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint8</span> <em class="structfield"><code><a name="InterfaceTypeBlob.tag"></a>tag</code></em> :5;</span></p></td>
+<td>A <a class="link" href="gi-GITypeInfo.html#GITypeTag" title="enum GITypeTag"><span class="type">GITypeTag</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="InterfaceTypeBlob.interface"></a>interface</code></em>;</span></p></td>
+<td>Index of the directory entry for the interface.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="ParamTypeBlob"></a><h3>ParamTypeBlob</h3>
+<pre class="programlisting">typedef struct {
+  guint8        pointer  :1;
+  guint8        reserved :2;
+  guint8        tag      :5;
+
+  guint8        reserved2;
+  guint16       n_types;
+
+  SimpleTypeBlob type[];
+} ParamTypeBlob;
+</pre>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><span class="type">guint8</span> <em class="structfield"><code><a name="ParamTypeBlob.pointer"></a>pointer</code></em> :1;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint8</span> <em class="structfield"><code><a name="ParamTypeBlob.reserved"></a>reserved</code></em> :2;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint8</span> <em class="structfield"><code><a name="ParamTypeBlob.tag"></a>tag</code></em> :5;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint8</span> <em class="structfield"><code><a name="ParamTypeBlob.reserved2"></a>reserved2</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="ParamTypeBlob.n-types"></a>n_types</code></em>;</span></p></td>
+<td>The number of parameter types to follow.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">SimpleTypeBlob</span> <em class="structfield"><code><a name="ParamTypeBlob.type"></a>type</code></em>[];</span></p></td>
+<td>Describes the type of the list elements.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="ErrorTypeBlob"></a><h3>ErrorTypeBlob</h3>
+<pre class="programlisting">typedef struct {
+  guint8  pointer  :1;
+  guint8  reserved :2;
+  guint8  tag      :5;
+
+  guint8  reserved2;
+
+  guint16 n_domains; /* Must be 0 */
+  guint16 domains[];
+} ErrorTypeBlob;
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="ValueBlob"></a><h3>ValueBlob</h3>
+<pre class="programlisting">typedef struct {
+  guint32 deprecated : 1;
+  guint32 unsigned_value : 1;
+  guint32 name;
+  gint32 value;
+} ValueBlob;
+</pre>
+<p>
+Values commonly occur in enums and flags.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="ValueBlob.deprecated"></a>deprecated</code></em> : 1;</span></p></td>
+<td>Whether this value is deprecated</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="ValueBlob.unsigned-value"></a>unsigned_value</code></em> : 1;</span></p></td>
+<td>if set, value is a 32-bit unsigned integer cast to gint32</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="ValueBlob.name"></a>name</code></em>;</span></p></td>
+<td>Name of blob</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">gint32</span> <em class="structfield"><code><a name="ValueBlob.value"></a>value</code></em>;</span></p></td>
+<td>The numerical value</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="FieldBlob"></a><h3>FieldBlob</h3>
+<pre class="programlisting">typedef struct {
+  guint32        name;
+
+  guint8         readable :1;
+  guint8         writable :1;
+  guint8         has_embedded_type :1;
+  guint8         reserved :5;
+  guint8         bits;
+
+  guint16        struct_offset;
+
+  guint32        reserved2;
+
+  SimpleTypeBlob type;
+} FieldBlob;
+</pre>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="FieldBlob.name"></a>name</code></em>;</span></p></td>
+<td>The name of the field.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint8</span> <em class="structfield"><code><a name="FieldBlob.readable"></a>readable</code></em> :1;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint8</span> <em class="structfield"><code><a name="FieldBlob.writable"></a>writable</code></em> :1;</span></p></td>
+<td>How the field may be accessed.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint8</span> <em class="structfield"><code><a name="FieldBlob.has-embedded-type"></a>has_embedded_type</code></em> :1;</span></p></td>
+<td>An anonymous type follows the FieldBlob.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint8</span> <em class="structfield"><code><a name="FieldBlob.reserved"></a>reserved</code></em> :5;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint8</span> <em class="structfield"><code><a name="FieldBlob.bits"></a>bits</code></em>;</span></p></td>
+<td>If this field is part of a bitfield, the number of bits which it
+uses, otherwise 0.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="FieldBlob.struct-offset"></a>struct_offset</code></em>;</span></p></td>
+<td>The offset of the field in the struct. The value 0xFFFF indicates
+that the struct offset is unknown.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="FieldBlob.reserved2"></a>reserved2</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">SimpleTypeBlob</span> <em class="structfield"><code><a name="FieldBlob.type"></a>type</code></em>;</span></p></td>
+<td>The type of the field.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="RegisteredTypeBlob"></a><h3>RegisteredTypeBlob</h3>
+<pre class="programlisting">typedef struct {
+  guint16 blob_type;
+  guint16 deprecated   : 1;
+  guint16 unregistered : 1;
+  guint16 reserved :14;
+  guint32 name;
+
+  guint32 gtype_name;
+  guint32 gtype_init;
+} RegisteredTypeBlob;
+</pre>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="RegisteredTypeBlob.blob-type"></a>blob_type</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="RegisteredTypeBlob.deprecated"></a>deprecated</code></em> : 1;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="RegisteredTypeBlob.unregistered"></a>unregistered</code></em> : 1;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="RegisteredTypeBlob.reserved"></a>reserved</code></em> :14;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="RegisteredTypeBlob.name"></a>name</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="RegisteredTypeBlob.gtype-name"></a>gtype_name</code></em>;</span></p></td>
+<td>The name under which the type is registered with GType.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="RegisteredTypeBlob.gtype-init"></a>gtype_init</code></em>;</span></p></td>
+<td>The symbol name of the <code class="function">get_type()</code> function which registers the type.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="StructBlob"></a><h3>StructBlob</h3>
+<pre class="programlisting">typedef struct {
+  guint16   blob_type;
+
+  guint16   deprecated   : 1;
+  guint16   unregistered : 1;
+  guint16   is_gtype_struct : 1;
+  guint16   alignment    : 6;
+  guint16   foreign      : 1;
+  guint16   reserved     : 6;
+
+  guint32   name;
+
+  guint32   gtype_name;
+  guint32   gtype_init;
+
+  guint32   size;
+
+  guint16   n_fields;
+  guint16   n_methods;
+
+  guint32   reserved2;
+  guint32   reserved3;
+
+#if 0
+  /* variable-length parts of the blob */
+  FieldBlob    fields[];
+  FunctionBlob methods[];
+#endif
+} StructBlob;
+</pre>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="StructBlob.blob-type"></a>blob_type</code></em>;</span></p></td>
+<td><a class="link" href="gi-gtypelib.html#BLOB-TYPE-STRUCT:CAPS"><span class="type">BLOB_TYPE_STRUCT</span></a></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="StructBlob.deprecated"></a>deprecated</code></em> : 1;</span></p></td>
+<td>Whether this structure is deprecated</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="StructBlob.unregistered"></a>unregistered</code></em> : 1;</span></p></td>
+<td>If this is set, the type is not registered with GType.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="StructBlob.is-gtype-struct"></a>is_gtype_struct</code></em> : 1;</span></p></td>
+<td>Whether this structure is the class or interface layout for a GObject</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="StructBlob.alignment"></a>alignment</code></em> : 6;</span></p></td>
+<td>The byte boundary that the struct is aligned to in memory</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="StructBlob.foreign"></a>foreign</code></em> : 1;</span></p></td>
+<td>If the type is foreign, eg if it's expected to be overridden by
+a native language binding instead of relying of introspected bindings.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="StructBlob.reserved"></a>reserved</code></em> : 6;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="StructBlob.name"></a>name</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="StructBlob.gtype-name"></a>gtype_name</code></em>;</span></p></td>
+<td>String name of the associated <span class="type">GType</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="StructBlob.gtype-init"></a>gtype_init</code></em>;</span></p></td>
+<td>String naming the symbol which gets the runtime <span class="type">GType</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="StructBlob.size"></a>size</code></em>;</span></p></td>
+<td>The size of the struct in bytes.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="StructBlob.n-fields"></a>n_fields</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="StructBlob.n-methods"></a>n_methods</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="StructBlob.reserved2"></a>reserved2</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="StructBlob.reserved3"></a>reserved3</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="gi-gtypelib.html#FieldBlob" title="FieldBlob"><span class="type">FieldBlob</span></a> <em class="structfield"><code><a name="StructBlob.fields"></a>fields</code></em>[];</span></p></td>
+<td>An array of n_fields FieldBlobs.
+should be considered as methods of the struct.</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="gi-gtypelib.html#FunctionBlob" title="FunctionBlob"><span class="type">FunctionBlob</span></a> <em class="structfield"><code><a name="StructBlob.methods"></a>methods</code></em>[];</span></p></td>
+<td></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="UnionBlob"></a><h3>UnionBlob</h3>
+<pre class="programlisting">typedef struct {
+  guint16      blob_type;
+  guint16      deprecated    : 1;
+  guint16      unregistered  : 1;
+  guint16      discriminated : 1;
+  guint16      alignment     : 6;
+  guint16      reserved      : 7;
+  guint32      name;
+
+  guint32      gtype_name;
+  guint32      gtype_init;
+
+  guint32      size;
+
+  guint16      n_fields;
+  guint16      n_functions;
+
+  guint32      reserved2;
+  guint32      reserved3;
+
+  gint32       discriminator_offset;
+  SimpleTypeBlob discriminator_type;
+
+#if 0
+  FieldBlob    fields[];
+  FunctionBlob functions[];
+  ConstantBlob discriminator_values[]
+#endif
+} UnionBlob;
+</pre>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="UnionBlob.blob-type"></a>blob_type</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="UnionBlob.deprecated"></a>deprecated</code></em> : 1;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="UnionBlob.unregistered"></a>unregistered</code></em> : 1;</span></p></td>
+<td>If this is set, the type is not registered with GType.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="UnionBlob.discriminated"></a>discriminated</code></em> : 1;</span></p></td>
+<td>Is set if the union is discriminated</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="UnionBlob.alignment"></a>alignment</code></em> : 6;</span></p></td>
+<td>The byte boundary that the union is aligned to in memory</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="UnionBlob.reserved"></a>reserved</code></em> : 7;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="UnionBlob.name"></a>name</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="UnionBlob.gtype-name"></a>gtype_name</code></em>;</span></p></td>
+<td>String name of the associated <span class="type">GType</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="UnionBlob.gtype-init"></a>gtype_init</code></em>;</span></p></td>
+<td>String naming the symbol which gets the runtime <span class="type">GType</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="UnionBlob.size"></a>size</code></em>;</span></p></td>
+<td>The size of the union in bytes.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="UnionBlob.n-fields"></a>n_fields</code></em>;</span></p></td>
+<td>Length of the arrays</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="UnionBlob.n-functions"></a>n_functions</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="UnionBlob.reserved2"></a>reserved2</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="UnionBlob.reserved3"></a>reserved3</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">gint32</span> <em class="structfield"><code><a name="UnionBlob.discriminator-offset"></a>discriminator_offset</code></em>;</span></p></td>
+<td>Offset from the beginning of the union where the
+discriminator of a discriminated union is located.
+The value 0xFFFF indicates that the discriminator offset
+is unknown.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">SimpleTypeBlob</span> <em class="structfield"><code><a name="UnionBlob.discriminator-type"></a>discriminator_type</code></em>;</span></p></td>
+<td>Type of the discriminator</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="gi-gtypelib.html#FieldBlob" title="FieldBlob"><span class="type">FieldBlob</span></a> <em class="structfield"><code><a name="UnionBlob.fields"></a>fields</code></em>[];</span></p></td>
+<td>Array of FieldBlobs describing the alternative branches of the union</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="gi-gtypelib.html#FunctionBlob" title="FunctionBlob"><span class="type">FunctionBlob</span></a> <em class="structfield"><code><a name="UnionBlob.functions"></a>functions</code></em>[];</span></p></td>
+<td></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="EnumBlob"></a><h3>EnumBlob</h3>
+<pre class="programlisting">typedef struct {
+  guint16   blob_type;
+
+  guint16   deprecated   : 1;
+  guint16   unregistered : 1;
+  guint16   storage_type : 5;
+  guint16   reserved     : 9;
+
+  guint32   name;
+
+  guint32   gtype_name;
+  guint32   gtype_init;
+
+  guint16   n_values;
+  guint16   n_methods;
+
+  guint32   error_domain;
+
+  ValueBlob values[];
+#if 0
+  FunctionBlob methods[];
+#endif
+} EnumBlob;
+</pre>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="EnumBlob.blob-type"></a>blob_type</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="EnumBlob.deprecated"></a>deprecated</code></em> : 1;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="EnumBlob.unregistered"></a>unregistered</code></em> : 1;</span></p></td>
+<td>If this is set, the type is not registered with GType.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="EnumBlob.storage-type"></a>storage_type</code></em> : 5;</span></p></td>
+<td>The tag of the type used for the enum in the C ABI
+(will be a signed or unsigned integral type)</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="EnumBlob.reserved"></a>reserved</code></em> : 9;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="EnumBlob.name"></a>name</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="EnumBlob.gtype-name"></a>gtype_name</code></em>;</span></p></td>
+<td>String name of the associated <span class="type">GType</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="EnumBlob.gtype-init"></a>gtype_init</code></em>;</span></p></td>
+<td>String naming the symbol which gets the runtime <span class="type">GType</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="EnumBlob.n-values"></a>n_values</code></em>;</span></p></td>
+<td>The length of the values array.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="EnumBlob.n-methods"></a>n_methods</code></em>;</span></p></td>
+<td>The length of the methods array.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="EnumBlob.error-domain"></a>error_domain</code></em>;</span></p></td>
+<td>String naming the <span class="type">GError</span> domain this enum is
+associated with</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="gi-gtypelib.html#ValueBlob" title="ValueBlob"><span class="type">ValueBlob</span></a> <em class="structfield"><code><a name="EnumBlob.values"></a>values</code></em>[];</span></p></td>
+<td>Describes the enum values.</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="gi-gtypelib.html#FunctionBlob" title="FunctionBlob"><span class="type">FunctionBlob</span></a> <em class="structfield"><code><a name="EnumBlob.methods"></a>methods</code></em>[];</span></p></td>
+<td>Describes the enum methods.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="PropertyBlob"></a><h3>PropertyBlob</h3>
+<pre class="programlisting">typedef struct {
+  guint32        name;
+
+  guint32        deprecated                   : 1;
+  guint32        readable                     : 1;
+  guint32        writable                     : 1;
+  guint32        construct                    : 1;
+  guint32        construct_only               : 1;
+  guint32        transfer_ownership           : 1;
+  guint32        transfer_container_ownership : 1;
+  guint32        reserved                     :25;
+
+  guint32        reserved2;
+
+  SimpleTypeBlob type;
+} PropertyBlob;
+</pre>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="PropertyBlob.name"></a>name</code></em>;</span></p></td>
+<td>The name of the property.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="PropertyBlob.deprecated"></a>deprecated</code></em> : 1;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="PropertyBlob.readable"></a>readable</code></em> : 1;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="PropertyBlob.writable"></a>writable</code></em> : 1;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="PropertyBlob.construct"></a>construct</code></em> : 1;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="PropertyBlob.construct-only"></a>construct_only</code></em> : 1;</span></p></td>
+<td>The ParamFlags used when registering the property.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="PropertyBlob.transfer-ownership"></a>transfer_ownership</code></em> : 1;</span></p></td>
+<td>When writing, the type containing the property takes
+ownership of the value. When reading, the returned value needs to be released
+by the caller.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="PropertyBlob.transfer-container-ownership"></a>transfer_container_ownership</code></em> : 1;</span></p></td>
+<td>For container types indicates that the
+ownership of the container, but not of its contents, is transferred. This is
+typically the case when reading lists of statically allocated things.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="PropertyBlob.reserved"></a>reserved</code></em> :25;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="PropertyBlob.reserved2"></a>reserved2</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">SimpleTypeBlob</span> <em class="structfield"><code><a name="PropertyBlob.type"></a>type</code></em>;</span></p></td>
+<td>Describes the type of the property.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="SignalBlob"></a><h3>SignalBlob</h3>
+<pre class="programlisting">typedef struct {
+  guint16 deprecated        : 1;
+  guint16 run_first         : 1;
+  guint16 run_last          : 1;
+  guint16 run_cleanup       : 1;
+  guint16 no_recurse        : 1;
+  guint16 detailed          : 1;
+  guint16 action            : 1;
+  guint16 no_hooks          : 1;
+  guint16 has_class_closure : 1;
+  guint16 true_stops_emit   : 1;
+  guint16 reserved          : 6;
+
+  guint16 class_closure;
+
+  guint32 name;
+
+  guint32 reserved2;
+
+  guint32 signature;
+} SignalBlob;
+</pre>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="SignalBlob.deprecated"></a>deprecated</code></em> : 1;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="SignalBlob.run-first"></a>run_first</code></em> : 1;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="SignalBlob.run-last"></a>run_last</code></em> : 1;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="SignalBlob.run-cleanup"></a>run_cleanup</code></em> : 1;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="SignalBlob.no-recurse"></a>no_recurse</code></em> : 1;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="SignalBlob.detailed"></a>detailed</code></em> : 1;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="SignalBlob.action"></a>action</code></em> : 1;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="SignalBlob.no-hooks"></a>no_hooks</code></em> : 1;</span></p></td>
+<td>The flags used when registering the signal.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="SignalBlob.has-class-closure"></a>has_class_closure</code></em> : 1;</span></p></td>
+<td>Set if the signal has a class closure.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="SignalBlob.true-stops-emit"></a>true_stops_emit</code></em> : 1;</span></p></td>
+<td>Whether the signal has true-stops-emit semantics</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="SignalBlob.reserved"></a>reserved</code></em> : 6;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="SignalBlob.class-closure"></a>class_closure</code></em>;</span></p></td>
+<td>The index of the class closure in the list of virtual functions
+of the object or interface on which the signal is defined.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="SignalBlob.name"></a>name</code></em>;</span></p></td>
+<td>The name of the signal.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="SignalBlob.reserved2"></a>reserved2</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="SignalBlob.signature"></a>signature</code></em>;</span></p></td>
+<td>Offset of the SignatureBlob describing the parameter types and the
+return value type.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="VFuncBlob"></a><h3>VFuncBlob</h3>
+<pre class="programlisting">typedef struct {
+  guint32 name;
+
+  guint16 must_chain_up           : 1;
+  guint16 must_be_implemented     : 1;
+  guint16 must_not_be_implemented : 1;
+  guint16 class_closure           : 1;
+  guint16 throws                  : 1;
+  guint16 reserved                :11;
+  guint16 signal;
+
+  guint16 struct_offset;
+  guint16 invoker : 10; /* Number of bits matches @index in FunctionBlob */
+  guint16 reserved2 : 6;
+
+  guint32 reserved3;
+  guint32 signature;
+} VFuncBlob;
+</pre>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="VFuncBlob.name"></a>name</code></em>;</span></p></td>
+<td>The name of the virtual function.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="VFuncBlob.must-chain-up"></a>must_chain_up</code></em> : 1;</span></p></td>
+<td>If set, every implementation of this virtual function must
+chain up to the implementation of the parent class.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="VFuncBlob.must-be-implemented"></a>must_be_implemented</code></em> : 1;</span></p></td>
+<td>If set, every derived class must override this virtual function.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="VFuncBlob.must-not-be-implemented"></a>must_not_be_implemented</code></em> : 1;</span></p></td>
+<td>If set, derived class must not override this virtual function.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="VFuncBlob.class-closure"></a>class_closure</code></em> : 1;</span></p></td>
+<td>Set if this virtual function is the class closure of a signal.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="VFuncBlob.throws"></a>throws</code></em> : 1;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="VFuncBlob.reserved"></a>reserved</code></em> :11;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="VFuncBlob.signal"></a>signal</code></em>;</span></p></td>
+<td>The index of the signal in the list of signals of the object or
+interface to which this virtual function belongs.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="VFuncBlob.struct-offset"></a>struct_offset</code></em>;</span></p></td>
+<td>The offset of the function pointer in the class struct. The value
+0xFFFF indicates that the struct offset is unknown.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="VFuncBlob.invoker"></a>invoker</code></em> : 10;</span></p></td>
+<td>If a method invoker for this virtual exists, this is the offset in the
+class structure of the method.  If no method is known, this value will be 0x3ff.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="VFuncBlob.reserved2"></a>reserved2</code></em> : 6;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="VFuncBlob.reserved3"></a>reserved3</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="VFuncBlob.signature"></a>signature</code></em>;</span></p></td>
+<td>Offset of the SignatureBlob describing the parameter types and the
+return value type.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="ObjectBlob"></a><h3>ObjectBlob</h3>
+<pre class="programlisting">typedef struct {
+  guint16   blob_type;  /* 7 */
+  guint16   deprecated   : 1;
+  guint16   abstract     : 1;
+  guint16   fundamental  : 1;
+  guint16   reserved     :13;
+  guint32   name;
+
+  guint32   gtype_name;
+  guint32   gtype_init;
+
+  guint16   parent;
+  guint16   gtype_struct;
+
+  guint16   n_interfaces;
+  guint16   n_fields;
+  guint16   n_properties;
+  guint16   n_methods;
+  guint16   n_signals;
+  guint16   n_vfuncs;
+  guint16   n_constants;
+  guint16   reserved2;
+
+  guint32   ref_func;
+  guint32   unref_func;
+  guint32   set_value_func;
+  guint32   get_value_func;
+
+  guint32   reserved3;
+  guint32   reserved4;
+
+  guint16   interfaces[];
+
+#if 0
+  /* variable-length parts of the blob */
+  FieldBlob           fields[];
+  PropertyBlob        properties[];
+  FunctionBlob        methods[];
+  SignalBlob          signals[];
+  VFuncBlob           vfuncs[];
+  ConstantBlob        constants[];
+#endif
+} ObjectBlob;
+</pre>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="ObjectBlob.blob-type"></a>blob_type</code></em>;</span></p></td>
+<td><a class="link" href="gi-gtypelib.html#BLOB-TYPE-OBJECT:CAPS"><span class="type">BLOB_TYPE_OBJECT</span></a></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="ObjectBlob.deprecated"></a>deprecated</code></em> : 1;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="ObjectBlob.abstract"></a>abstract</code></em> : 1;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="ObjectBlob.fundamental"></a>fundamental</code></em> : 1;</span></p></td>
+<td>this object is not a GObject derived type, instead it's
+an additional fundamental type.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="ObjectBlob.reserved"></a>reserved</code></em> :13;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="ObjectBlob.name"></a>name</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="ObjectBlob.gtype-name"></a>gtype_name</code></em>;</span></p></td>
+<td>String name of the associated <span class="type">GType</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="ObjectBlob.gtype-init"></a>gtype_init</code></em>;</span></p></td>
+<td>String naming the symbol which gets the runtime <span class="type">GType</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="ObjectBlob.parent"></a>parent</code></em>;</span></p></td>
+<td>The directory index of the parent type. This is only set for
+objects. If an object does not have a parent, it is zero.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="ObjectBlob.gtype-struct"></a>gtype_struct</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="ObjectBlob.n-interfaces"></a>n_interfaces</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="ObjectBlob.n-fields"></a>n_fields</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="ObjectBlob.n-properties"></a>n_properties</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="ObjectBlob.n-methods"></a>n_methods</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="ObjectBlob.n-signals"></a>n_signals</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="ObjectBlob.n-vfuncs"></a>n_vfuncs</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="ObjectBlob.n-constants"></a>n_constants</code></em>;</span></p></td>
+<td>The lengths of the arrays.Up to 16bits of padding may be inserted
+between the arrays to ensure that they start on a 32bit boundary.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="ObjectBlob.reserved2"></a>reserved2</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="ObjectBlob.ref-func"></a>ref_func</code></em>;</span></p></td>
+<td>String pointing to a function which can be called to increase
+the reference count for an instance of this object type.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="ObjectBlob.unref-func"></a>unref_func</code></em>;</span></p></td>
+<td>String pointing to a function which can be called to decrease
+the reference count for an instance of this object type.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="ObjectBlob.set-value-func"></a>set_value_func</code></em>;</span></p></td>
+<td>String pointing to a function which can be called to
+convert a pointer of this object to a GValue</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="ObjectBlob.get-value-func"></a>get_value_func</code></em>;</span></p></td>
+<td>String pointing to a function which can be called to
+convert extract a pointer to this object from a GValue</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="ObjectBlob.reserved3"></a>reserved3</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="ObjectBlob.reserved4"></a>reserved4</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="ObjectBlob.interfaces"></a>interfaces</code></em>[];</span></p></td>
+<td>An array of indices of directory entries for the implemented
+interfaces.</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="gi-gtypelib.html#FieldBlob" title="FieldBlob"><span class="type">FieldBlob</span></a> <em class="structfield"><code><a name="ObjectBlob.fields"></a>fields</code></em>[];</span></p></td>
+<td>Describes the fields.</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="gi-gtypelib.html#PropertyBlob" title="PropertyBlob"><span class="type">PropertyBlob</span></a> <em class="structfield"><code><a name="ObjectBlob.properties"></a>properties</code></em>[];</span></p></td>
+<td>Describes the properties.</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="gi-gtypelib.html#FunctionBlob" title="FunctionBlob"><span class="type">FunctionBlob</span></a> <em class="structfield"><code><a name="ObjectBlob.methods"></a>methods</code></em>[];</span></p></td>
+<td>Describes the methods, constructors, setters and getters.</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="gi-gtypelib.html#SignalBlob" title="SignalBlob"><span class="type">SignalBlob</span></a> <em class="structfield"><code><a name="ObjectBlob.signals"></a>signals</code></em>[];</span></p></td>
+<td>Describes the signals.</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="gi-gtypelib.html#VFuncBlob" title="VFuncBlob"><span class="type">VFuncBlob</span></a> <em class="structfield"><code><a name="ObjectBlob.vfuncs"></a>vfuncs</code></em>[];</span></p></td>
+<td>Describes the virtual functions.</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="gi-gtypelib.html#ConstantBlob" title="ConstantBlob"><span class="type">ConstantBlob</span></a> <em class="structfield"><code><a name="ObjectBlob.constants"></a>constants</code></em>[];</span></p></td>
+<td>Describes the constants.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="InterfaceBlob"></a><h3>InterfaceBlob</h3>
+<pre class="programlisting">typedef struct {
+  guint16 blob_type;
+  guint16 deprecated   : 1;
+  guint16 reserved     :15;
+  guint32 name;
+
+  guint32 gtype_name;
+  guint32 gtype_init;
+  guint16 gtype_struct;
+
+  guint16 n_prerequisites;
+  guint16 n_properties;
+  guint16 n_methods;
+  guint16 n_signals;
+  guint16 n_vfuncs;
+  guint16 n_constants;
+
+  guint16 padding;
+
+  guint32 reserved2;
+  guint32 reserved3;
+
+  guint16 prerequisites[];
+
+#if 0
+  /* variable-length parts of the blob */
+  PropertyBlob        properties[];
+  FunctionBlob        methods[];
+  SignalBlob          signals[];
+  VFuncBlob           vfuncs[];
+  ConstantBlob        constants[];
+#endif
+} InterfaceBlob;
+</pre>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="InterfaceBlob.blob-type"></a>blob_type</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="InterfaceBlob.deprecated"></a>deprecated</code></em> : 1;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="InterfaceBlob.reserved"></a>reserved</code></em> :15;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="InterfaceBlob.name"></a>name</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="InterfaceBlob.gtype-name"></a>gtype_name</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="InterfaceBlob.gtype-init"></a>gtype_init</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="InterfaceBlob.gtype-struct"></a>gtype_struct</code></em>;</span></p></td>
+<td>Name of the interface "class" C structure</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="InterfaceBlob.n-prerequisites"></a>n_prerequisites</code></em>;</span></p></td>
+<td>Number of prerequisites</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="InterfaceBlob.n-properties"></a>n_properties</code></em>;</span></p></td>
+<td>Number of properties</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="InterfaceBlob.n-methods"></a>n_methods</code></em>;</span></p></td>
+<td>Number of methods</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="InterfaceBlob.n-signals"></a>n_signals</code></em>;</span></p></td>
+<td>Number of signals</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="InterfaceBlob.n-vfuncs"></a>n_vfuncs</code></em>;</span></p></td>
+<td>Number of virtual functions</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="InterfaceBlob.n-constants"></a>n_constants</code></em>;</span></p></td>
+<td>The lengths of the arrays.
+Up to 16bits of padding may be inserted between the arrays to ensure that they
+start on a 32bit boundary.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="InterfaceBlob.padding"></a>padding</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="InterfaceBlob.reserved2"></a>reserved2</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="InterfaceBlob.reserved3"></a>reserved3</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="InterfaceBlob.prerequisites"></a>prerequisites</code></em>[];</span></p></td>
+<td>An array of indices of directory entries for required interfaces.</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="gi-gtypelib.html#PropertyBlob" title="PropertyBlob"><span class="type">PropertyBlob</span></a> <em class="structfield"><code><a name="InterfaceBlob.properties"></a>properties</code></em>[];</span></p></td>
+<td>Describes the properties.</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="gi-gtypelib.html#FunctionBlob" title="FunctionBlob"><span class="type">FunctionBlob</span></a> <em class="structfield"><code><a name="InterfaceBlob.methods"></a>methods</code></em>[];</span></p></td>
+<td>Describes the methods, constructors, setters and getters.</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="gi-gtypelib.html#SignalBlob" title="SignalBlob"><span class="type">SignalBlob</span></a> <em class="structfield"><code><a name="InterfaceBlob.signals"></a>signals</code></em>[];</span></p></td>
+<td>Describes the signals.</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="gi-gtypelib.html#VFuncBlob" title="VFuncBlob"><span class="type">VFuncBlob</span></a> <em class="structfield"><code><a name="InterfaceBlob.vfuncs"></a>vfuncs</code></em>[];</span></p></td>
+<td>Describes the virtual functions.</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="gi-gtypelib.html#ConstantBlob" title="ConstantBlob"><span class="type">ConstantBlob</span></a> <em class="structfield"><code><a name="InterfaceBlob.constants"></a>constants</code></em>[];</span></p></td>
+<td>Describes the constants.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="ConstantBlob"></a><h3>ConstantBlob</h3>
+<pre class="programlisting">typedef struct {
+  guint16        blob_type;
+  guint16        deprecated   : 1;
+  guint16        reserved     :15;
+  guint32        name;
+
+  SimpleTypeBlob type;
+
+  guint32        size;
+  guint32        offset;
+
+  guint32        reserved2;
+} ConstantBlob;
+</pre>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="ConstantBlob.blob-type"></a>blob_type</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="ConstantBlob.deprecated"></a>deprecated</code></em> : 1;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="ConstantBlob.reserved"></a>reserved</code></em> :15;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="ConstantBlob.name"></a>name</code></em>;</span></p></td>
+<td></td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">SimpleTypeBlob</span> <em class="structfield"><code><a name="ConstantBlob.type"></a>type</code></em>;</span></p></td>
+<td>The type of the value. In most cases this should be a numeric
+type or string.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="ConstantBlob.size"></a>size</code></em>;</span></p></td>
+<td>The size of the value in bytes.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="ConstantBlob.offset"></a>offset</code></em>;</span></p></td>
+<td>The offset of the value in the typelib.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="ConstantBlob.reserved2"></a>reserved2</code></em>;</span></p></td>
+<td></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="AttributeBlob"></a><h3>AttributeBlob</h3>
+<pre class="programlisting">typedef struct {
+  guint32 offset;
+  guint32 name;
+  guint32 value;
+} AttributeBlob;
+</pre>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="AttributeBlob.offset"></a>offset</code></em>;</span></p></td>
+<td>The offset of the typelib entry to which this attribute refers.
+Attributes are kept sorted by offset, so that the attributes
+of an entry can be found by a binary search.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="AttributeBlob.name"></a>name</code></em>;</span></p></td>
+<td>The name of the attribute, a string.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="AttributeBlob.value"></a>value</code></em>;</span></p></td>
+<td>The value of the attribute (also a string)</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-typelib-get-dir-entry"></a><h3>g_typelib_get_dir_entry ()</h3>
+<pre class="programlisting"><a class="link" href="gi-gtypelib.html#DirEntry" title="DirEntry"><span class="returnvalue">DirEntry</span></a> *          g_typelib_get_dir_entry             (<em class="parameter"><code><a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="type">GITypelib</span></a> *typelib</code></em>,
+                                                         <em class="parameter"><code><span class="type">guint16</span> index</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-typelib-check-sanity"></a><h3>g_typelib_check_sanity ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>                g_typelib_check_sanity              (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-typelib-get-string"></a><h3>g_typelib_get_string()</h3>
+<pre class="programlisting">#define             g_typelib_get_string(typelib,offset)</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="G-TYPELIB-ERROR:CAPS"></a><h3>G_TYPELIB_ERROR</h3>
+<pre class="programlisting">#define G_TYPELIB_ERROR (g_typelib_error_quark ())
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="g-typelib-validate"></a><h3>g_typelib_validate ()</h3>
+<pre class="programlisting"><span class="returnvalue">gboolean</span>            g_typelib_validate                  (<em class="parameter"><code><a class="link" href="gi-girepository.html#GITypelib" title="GITypelib"><span class="type">GITypelib</span></a> *typelib</code></em>,
+                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="BLOB-IS-REGISTERED-TYPE:CAPS"></a><h3>BLOB_IS_REGISTERED_TYPE()</h3>
+<pre class="programlisting">#define             BLOB_IS_REGISTERED_TYPE(blob)</pre>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi-libgirepository.html b/docs/reference/html/gi-libgirepository.html
new file mode 100644 (file)
index 0000000..993ffaf
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GIRepository</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="girepository.html" title="Part I. ">
+<link rel="prev" href="girepository.html" title="Part I. ">
+<link rel="next" href="gi-girepository.html" title="girepository">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
+<td><a accesskey="p" href="girepository.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="girepository.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="gi-girepository.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="chapter">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="gi-libgirepository"></a>GIRepository</h2></div></div></div>
+<div class="toc"><dl><dt>
+<span class="refentrytitle"><a href="gi-girepository.html">girepository</a></span><span class="refpurpose"></span>
+</dt></dl></div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi-overview.html b/docs/reference/html/gi-overview.html
new file mode 100644 (file)
index 0000000..c758e4e
--- /dev/null
@@ -0,0 +1,57 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Introspection Overview</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="glib.html" title="GObject-Introspection Overview">
+<link rel="prev" href="glib.html" title="GObject-Introspection Overview">
+<link rel="next" href="girepository.html" title="Part I. ">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
+<td><a accesskey="p" href="glib.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="glib.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="girepository.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="gi-overview"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="gi-overview.top_of_page"></a>Introspection Overview</span></h2>
+<p>Overview â€” General overview of introspection</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+The GObject-Introspection package contains of a few different parts:
+  <div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem"><p>The GIR XML format - an XML format describing the exported
+      C API including documentation
+      </p></li>
+<li class="listitem"><p>The GTypelib format - a binary format optimized for fast disk access
+      and low memory usage
+      </p></li>
+<li class="listitem"><p>g-ir-scanner - parses C source code and gtk-doc comments and
+      generates GIR XML files
+      </p></li>
+<li class="listitem"><p>g-ir-compiler - compiles GIR XML files into typelibs
+      </p></li>
+<li class="listitem"><p>libgirepository - library to access typelib from C
+      </p></li>
+</ul></div>
+<p>A quick overview how the different components fits together:</p>
+<img src="overview.png">
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi-repository-structs.html b/docs/reference/html/gi-repository-structs.html
new file mode 100644 (file)
index 0000000..b3e9d38
--- /dev/null
@@ -0,0 +1,86 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GIRepository structs</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="girepository.html" title="Part I. ">
+<link rel="prev" href="gi-girffi.html" title="girffi">
+<link rel="next" href="gi-struct-hierarchy.html" title="Struct hierarchy">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
+<td><a accesskey="p" href="gi-girffi.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="girepository.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="gi-struct-hierarchy.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="chapter">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="gi-repository-structs"></a>GIRepository structs</h2></div></div></div>
+<div class="toc"><dl>
+<dt>
+<span class="refentrytitle"><a href="gi-struct-hierarchy.html">Struct hierarchy</a></span><span class="refpurpose"> â€” Struct hierarchy description for GIBaseInfo and all its sub structs</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIBaseInfo.html">GIBaseInfo</a></span><span class="refpurpose"> â€” Base struct for all GITypelib structs</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIFunctionInfo.html">GIFunctionInfo</a></span><span class="refpurpose"> â€” Struct representing a function</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GICallableInfo.html">GICallableInfo</a></span><span class="refpurpose"> â€” Struct representing a callable</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIArgInfo.html">GIArgInfo</a></span><span class="refpurpose"> â€” Struct representing an argument</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GITypeInfo.html">GITypeInfo</a></span><span class="refpurpose"> â€” Struct representing a type</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIStructInfo.html">GIStructInfo</a></span><span class="refpurpose"> â€” Struct representing a C structure</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIUnionInfo.html">GIUnionInfo</a></span><span class="refpurpose"> â€” Struct representing a union.</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIFieldInfo.html">GIFieldInfo</a></span><span class="refpurpose"> â€” Struct representing a struct or union field</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIPropertyInfo.html">GIPropertyInfo</a></span><span class="refpurpose"> â€” Struct representing a property</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIVFuncInfo.html">GIVFuncInfo</a></span><span class="refpurpose"> â€” Struct representing a virtual function</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GISignalInfo.html">GISignalInfo</a></span><span class="refpurpose"> â€” Struct representing a signal</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIEnumInfo.html">GIEnumInfo</a></span><span class="refpurpose"> â€” Structs representing an enumeration and its values</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIRegisteredTypeInfo.html">GIRegisteredTypeInfo</a></span><span class="refpurpose"> â€” Struct representing a struct with a GType</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIObjectInfo.html">GIObjectInfo</a></span><span class="refpurpose"> â€” Struct representing a GObject</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIInterfaceInfo.html">GIInterfaceInfo</a></span><span class="refpurpose"> â€” Struct representing a GInterface</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIConstantInfo.html">GIConstantInfo</a></span><span class="refpurpose"> â€” Struct representing a constant</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-gierrordomaininfo.html">gierrordomaininfo</a></span><span class="refpurpose"></span>
+</dt>
+</dl></div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi-struct-hierarchy.html b/docs/reference/html/gi-struct-hierarchy.html
new file mode 100644 (file)
index 0000000..0e3f66c
--- /dev/null
@@ -0,0 +1,58 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Struct hierarchy</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="gi-repository-structs.html" title="GIRepository structs">
+<link rel="prev" href="gi-repository-structs.html" title="GIRepository structs">
+<link rel="next" href="gi-GIBaseInfo.html" title="GIBaseInfo">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
+<td><a accesskey="p" href="gi-repository-structs.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="gi-repository-structs.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="gi-GIBaseInfo.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="gi-struct-hierarchy"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="gi-struct-hierarchy.top_of_page"></a>Struct hierarchy</span></h2>
+<p>Struct hierarchy â€” Struct hierarchy description for GIBaseInfo and all its sub structs</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<a name="gi-struct-hierarchy.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">
+* <a class="link" href="gi-GIBaseInfo.html" title="GIBaseInfo">GIBaseInfo</a>
+  * <a class="link" href="gi-GICallableInfo.html" title="GICallableInfo">GICallableInfo</a>
+    * <a class="link" href="gi-GIFunctionInfo.html" title="GIFunctionInfo">GIFunctionInfo</a>
+    * <a class="link" href="gi-GISignalInfo.html" title="GISignalInfo">GISignalInfo</a>
+    * <a class="link" href="gi-GIVFuncInfo.html" title="GIVFuncInfo">GIVFuncInfo</a>
+  * <a class="link" href="gi-GIRegisteredTypeInfo.html" title="GIRegisteredTypeInfo">GIRegisteredTypeInfo</a>
+    * <a class="link" href="gi-GIEnumInfo.html" title="GIEnumInfo">GIEnumInfo</a>
+    * <a class="link" href="gi-GIInterfaceInfo.html" title="GIInterfaceInfo">GIInterfaceInfo</a>
+    * <a class="link" href="gi-GIObjectInfo.html" title="GIObjectInfo">GIObjectInfo</a>
+    * <a class="link" href="gi-GIStructInfo.html" title="GIStructInfo">GIStructInfo</a>
+    * <a class="link" href="gi-GIUnionInfo.html" title="GIUnionInfo">GIUnionInfo</a>
+  * <a class="link" href="gi-GIArgInfo.html" title="GIArgInfo">GIArgInfo</a>
+  * <a class="link" href="gi-GIConstantInfo.html" title="GIConstantInfo">GIConstantInfo</a>
+  * GIErrorDomainInfo
+  * <a class="link" href="gi-GIFieldInfo.html" title="GIFieldInfo">GIFieldInfo</a>
+  * <a class="link" href="gi-GIPropertyInfo.html" title="GIPropertyInfo">GIPropertyInfo</a>
+  * <a class="link" href="gi-GITypeInfo.html" title="GITypeInfo">GITypeInfo</a>
+</pre>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi-typelib.html b/docs/reference/html/gi-typelib.html
new file mode 100644 (file)
index 0000000..4ef99ef
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Typelib binary format</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="prev" href="gi-gir-reference.html" title="The GIR XML format">
+<link rel="next" href="gi-gtypelib.html" title="gtypelib">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
+<td><a accesskey="p" href="gi-gir-reference.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td> </td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="gi-gtypelib.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="chapter">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="gi-typelib"></a>Typelib binary format</h2></div></div></div>
+<div class="toc"><dl><dt>
+<span class="refentrytitle"><a href="gi-gtypelib.html">gtypelib</a></span><span class="refpurpose"> â€” Layout and accessors for typelib</span>
+</dt></dl></div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/gi.devhelp2 b/docs/reference/html/gi.devhelp2
new file mode 100644 (file)
index 0000000..86943c5
--- /dev/null
@@ -0,0 +1,398 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<!DOCTYPE book PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
+<book xmlns="http://www.devhelp.net/book" title="GObject Introspection Reference Manual" link="index.html" author="" name="gi" version="2" language="c">
+  <chapters>
+    <sub name="GObject-Introspection Overview" link="glib.html">
+      <sub name="Introspection Overview" link="gi-overview.html"/>
+    </sub>
+    <sub name="" link="girepository.html">
+      <sub name="GIRepository" link="gi-libgirepository.html">
+        <sub name="girepository" link="gi-girepository.html"/>
+      </sub>
+      <sub name="GIR Foreign functions interface" link="gi-ffi.html">
+        <sub name="girffi" link="gi-girffi.html"/>
+      </sub>
+      <sub name="GIRepository structs" link="gi-repository-structs.html">
+        <sub name="Struct hierarchy" link="gi-struct-hierarchy.html"/>
+        <sub name="GIBaseInfo" link="gi-GIBaseInfo.html"/>
+        <sub name="GIFunctionInfo" link="gi-GIFunctionInfo.html"/>
+        <sub name="GICallableInfo" link="gi-GICallableInfo.html"/>
+        <sub name="GIArgInfo" link="gi-GIArgInfo.html"/>
+        <sub name="GITypeInfo" link="gi-GITypeInfo.html"/>
+        <sub name="GIStructInfo" link="gi-GIStructInfo.html"/>
+        <sub name="GIUnionInfo" link="gi-GIUnionInfo.html"/>
+        <sub name="GIFieldInfo" link="gi-GIFieldInfo.html"/>
+        <sub name="GIPropertyInfo" link="gi-GIPropertyInfo.html"/>
+        <sub name="GIVFuncInfo" link="gi-GIVFuncInfo.html"/>
+        <sub name="GISignalInfo" link="gi-GISignalInfo.html"/>
+        <sub name="GIEnumInfo" link="gi-GIEnumInfo.html"/>
+        <sub name="GIRegisteredTypeInfo" link="gi-GIRegisteredTypeInfo.html"/>
+        <sub name="GIObjectInfo" link="gi-GIObjectInfo.html"/>
+        <sub name="GIInterfaceInfo" link="gi-GIInterfaceInfo.html"/>
+        <sub name="GIConstantInfo" link="gi-GIConstantInfo.html"/>
+        <sub name="gierrordomaininfo" link="gi-gierrordomaininfo.html"/>
+      </sub>
+    </sub>
+    <sub name="GIR markup format" link="gi-gir.html">
+      <sub name="The GIR XML format" link="gi-gir-reference.html"/>
+    </sub>
+    <sub name="Typelib binary format" link="gi-typelib.html">
+      <sub name="gtypelib" link="gi-gtypelib.html"/>
+    </sub>
+    <sub name="Annotation Glossary" link="annotation-glossary.html"/>
+  </chapters>
+  <functions>
+    <keyword type="typedef" name="GICallbackInfo" link="gi-girepository.html#GICallbackInfo"/>
+    <keyword type="struct" name="struct GIRepository" link="gi-girepository.html#GIRepository-struct"/>
+    <keyword type="enum" name="enum GIRepositoryError" link="gi-girepository.html#GIRepositoryError"/>
+    <keyword type="enum" name="enum GIRepositoryLoadFlags" link="gi-girepository.html#GIRepositoryLoadFlags"/>
+    <keyword type="struct" name="GITypelib" link="gi-girepository.html#GITypelib"/>
+    <keyword type="function" name="g_irepository_get_default ()" link="gi-girepository.html#g-irepository-get-default"/>
+    <keyword type="function" name="g_irepository_prepend_search_path ()" link="gi-girepository.html#g-irepository-prepend-search-path"/>
+    <keyword type="function" name="g_irepository_get_search_path ()" link="gi-girepository.html#g-irepository-get-search-path"/>
+    <keyword type="function" name="g_irepository_load_typelib ()" link="gi-girepository.html#g-irepository-load-typelib"/>
+    <keyword type="function" name="g_irepository_is_registered ()" link="gi-girepository.html#g-irepository-is-registered"/>
+    <keyword type="function" name="g_irepository_find_by_name ()" link="gi-girepository.html#g-irepository-find-by-name"/>
+    <keyword type="function" name="g_irepository_require ()" link="gi-girepository.html#g-irepository-require"/>
+    <keyword type="function" name="g_irepository_require_private ()" link="gi-girepository.html#g-irepository-require-private"/>
+    <keyword type="function" name="g_irepository_get_dependencies ()" link="gi-girepository.html#g-irepository-get-dependencies"/>
+    <keyword type="function" name="g_irepository_get_loaded_namespaces ()" link="gi-girepository.html#g-irepository-get-loaded-namespaces"/>
+    <keyword type="function" name="g_irepository_find_by_gtype ()" link="gi-girepository.html#g-irepository-find-by-gtype"/>
+    <keyword type="function" name="g_irepository_get_n_infos ()" link="gi-girepository.html#g-irepository-get-n-infos"/>
+    <keyword type="function" name="g_irepository_get_info ()" link="gi-girepository.html#g-irepository-get-info"/>
+    <keyword type="function" name="g_irepository_get_typelib_path ()" link="gi-girepository.html#g-irepository-get-typelib-path"/>
+    <keyword type="function" name="g_irepository_get_shared_library ()" link="gi-girepository.html#g-irepository-get-shared-library"/>
+    <keyword type="function" name="g_irepository_get_version ()" link="gi-girepository.html#g-irepository-get-version"/>
+    <keyword type="function" name="g_irepository_get_option_group ()" link="gi-girepository.html#g-irepository-get-option-group"/>
+    <keyword type="function" name="g_irepository_get_c_prefix ()" link="gi-girepository.html#g-irepository-get-c-prefix"/>
+    <keyword type="function" name="g_irepository_dump ()" link="gi-girepository.html#g-irepository-dump"/>
+    <keyword type="function" name="g_irepository_enumerate_versions ()" link="gi-girepository.html#g-irepository-enumerate-versions"/>
+    <keyword type="macro" name="G_IREPOSITORY_ERROR" link="gi-girepository.html#G-IREPOSITORY-ERROR:CAPS"/>
+    <keyword type="function" name="g_typelib_new_from_memory ()" link="gi-girepository.html#g-typelib-new-from-memory"/>
+    <keyword type="function" name="g_typelib_new_from_const_memory ()" link="gi-girepository.html#g-typelib-new-from-const-memory"/>
+    <keyword type="function" name="g_typelib_new_from_mapped_file ()" link="gi-girepository.html#g-typelib-new-from-mapped-file"/>
+    <keyword type="function" name="g_typelib_free ()" link="gi-girepository.html#g-typelib-free"/>
+    <keyword type="function" name="g_typelib_symbol ()" link="gi-girepository.html#g-typelib-symbol"/>
+    <keyword type="function" name="g_typelib_get_namespace ()" link="gi-girepository.html#g-typelib-get-namespace"/>
+    <keyword type="function" name="GIFFIClosureCallback ()" link="gi-girffi.html#GIFFIClosureCallback"/>
+    <keyword type="struct" name="struct GIFunctionInvoker" link="gi-girffi.html#GIFunctionInvoker"/>
+    <keyword type="function" name="gi_cclosure_marshal_generic ()" link="gi-girffi.html#gi-cclosure-marshal-generic"/>
+    <keyword type="function" name="g_type_info_get_ffi_type ()" link="gi-girffi.html#g-type-info-get-ffi-type"/>
+    <keyword type="function" name="g_function_info_prep_invoker ()" link="gi-girffi.html#g-function-info-prep-invoker"/>
+    <keyword type="function" name="g_function_invoker_destroy ()" link="gi-girffi.html#g-function-invoker-destroy"/>
+    <keyword type="function" name="g_callable_info_prepare_closure ()" link="gi-girffi.html#g-callable-info-prepare-closure"/>
+    <keyword type="function" name="g_callable_info_free_closure ()" link="gi-girffi.html#g-callable-info-free-closure"/>
+    <keyword type="enum" name="enum GIInfoType" link="gi-GIBaseInfo.html#GIInfoType"/>
+    <keyword type="function" name="g_info_type_to_string ()" link="gi-GIBaseInfo.html#g-info-type-to-string"/>
+    <keyword type="struct" name="GIAttributeIter" link="gi-GIBaseInfo.html#GIAttributeIter"/>
+    <keyword type="typedef" name="GIBaseInfo" link="gi-GIBaseInfo.html#GIBaseInfo"/>
+    <keyword type="function" name="g_base_info_ref ()" link="gi-GIBaseInfo.html#g-base-info-ref"/>
+    <keyword type="function" name="g_base_info_unref ()" link="gi-GIBaseInfo.html#g-base-info-unref"/>
+    <keyword type="function" name="g_base_info_get_type ()" link="gi-GIBaseInfo.html#g-base-info-get-type"/>
+    <keyword type="function" name="g_base_info_get_name ()" link="gi-GIBaseInfo.html#g-base-info-get-name"/>
+    <keyword type="function" name="g_base_info_get_namespace ()" link="gi-GIBaseInfo.html#g-base-info-get-namespace"/>
+    <keyword type="function" name="g_base_info_is_deprecated ()" link="gi-GIBaseInfo.html#g-base-info-is-deprecated"/>
+    <keyword type="function" name="g_base_info_get_attribute ()" link="gi-GIBaseInfo.html#g-base-info-get-attribute"/>
+    <keyword type="function" name="g_base_info_iterate_attributes ()" link="gi-GIBaseInfo.html#g-base-info-iterate-attributes"/>
+    <keyword type="function" name="g_base_info_get_container ()" link="gi-GIBaseInfo.html#g-base-info-get-container"/>
+    <keyword type="function" name="g_base_info_get_typelib ()" link="gi-GIBaseInfo.html#g-base-info-get-typelib"/>
+    <keyword type="function" name="g_base_info_equal ()" link="gi-GIBaseInfo.html#g-base-info-equal"/>
+    <keyword type="macro" name="GI_IS_FUNCTION_INFO()" link="gi-GIFunctionInfo.html#GI-IS-FUNCTION-INFO:CAPS"/>
+    <keyword type="typedef" name="GIFunctionInfo" link="gi-GIFunctionInfo.html#GIFunctionInfo"/>
+    <keyword type="enum" name="enum GInvokeError" link="gi-GIFunctionInfo.html#GInvokeError"/>
+    <keyword type="enum" name="enum GIFunctionInfoFlags" link="gi-GIFunctionInfo.html#GIFunctionInfoFlags"/>
+    <keyword type="macro" name="G_INVOKE_ERROR" link="gi-GIFunctionInfo.html#G-INVOKE-ERROR:CAPS"/>
+    <keyword type="function" name="g_function_info_get_symbol ()" link="gi-GIFunctionInfo.html#g-function-info-get-symbol"/>
+    <keyword type="function" name="g_function_info_get_flags ()" link="gi-GIFunctionInfo.html#g-function-info-get-flags"/>
+    <keyword type="function" name="g_function_info_get_property ()" link="gi-GIFunctionInfo.html#g-function-info-get-property"/>
+    <keyword type="function" name="g_function_info_get_vfunc ()" link="gi-GIFunctionInfo.html#g-function-info-get-vfunc"/>
+    <keyword type="function" name="g_function_info_invoke ()" link="gi-GIFunctionInfo.html#g-function-info-invoke"/>
+    <keyword type="macro" name="GI_IS_CALLABLE_INFO()" link="gi-GICallableInfo.html#GI-IS-CALLABLE-INFO:CAPS"/>
+    <keyword type="typedef" name="GICallableInfo" link="gi-GICallableInfo.html#GICallableInfo"/>
+    <keyword type="function" name="g_callable_info_get_return_type ()" link="gi-GICallableInfo.html#g-callable-info-get-return-type"/>
+    <keyword type="function" name="g_callable_info_get_caller_owns ()" link="gi-GICallableInfo.html#g-callable-info-get-caller-owns"/>
+    <keyword type="function" name="g_callable_info_may_return_null ()" link="gi-GICallableInfo.html#g-callable-info-may-return-null"/>
+    <keyword type="function" name="g_callable_info_get_return_attribute ()" link="gi-GICallableInfo.html#g-callable-info-get-return-attribute"/>
+    <keyword type="function" name="g_callable_info_iterate_return_attributes ()" link="gi-GICallableInfo.html#g-callable-info-iterate-return-attributes"/>
+    <keyword type="function" name="g_callable_info_get_n_args ()" link="gi-GICallableInfo.html#g-callable-info-get-n-args"/>
+    <keyword type="function" name="g_callable_info_get_arg ()" link="gi-GICallableInfo.html#g-callable-info-get-arg"/>
+    <keyword type="function" name="g_callable_info_load_arg ()" link="gi-GICallableInfo.html#g-callable-info-load-arg"/>
+    <keyword type="function" name="g_callable_info_load_return_type ()" link="gi-GICallableInfo.html#g-callable-info-load-return-type"/>
+    <keyword type="macro" name="GI_IS_ARG_INFO()" link="gi-GIArgInfo.html#GI-IS-ARG-INFO:CAPS"/>
+    <keyword type="typedef" name="GIArgInfo" link="gi-GIArgInfo.html#GIArgInfo"/>
+    <keyword type="enum" name="enum GIDirection" link="gi-GIArgInfo.html#GIDirection"/>
+    <keyword type="enum" name="enum GIScopeType" link="gi-GIArgInfo.html#GIScopeType"/>
+    <keyword type="enum" name="enum GITransfer" link="gi-GIArgInfo.html#GITransfer"/>
+    <keyword type="function" name="g_arg_info_get_direction ()" link="gi-GIArgInfo.html#g-arg-info-get-direction"/>
+    <keyword type="function" name="g_arg_info_is_caller_allocates ()" link="gi-GIArgInfo.html#g-arg-info-is-caller-allocates"/>
+    <keyword type="function" name="g_arg_info_is_return_value ()" link="gi-GIArgInfo.html#g-arg-info-is-return-value"/>
+    <keyword type="function" name="g_arg_info_is_optional ()" link="gi-GIArgInfo.html#g-arg-info-is-optional"/>
+    <keyword type="function" name="g_arg_info_may_be_null ()" link="gi-GIArgInfo.html#g-arg-info-may-be-null"/>
+    <keyword type="function" name="g_arg_info_get_ownership_transfer ()" link="gi-GIArgInfo.html#g-arg-info-get-ownership-transfer"/>
+    <keyword type="function" name="g_arg_info_get_scope ()" link="gi-GIArgInfo.html#g-arg-info-get-scope"/>
+    <keyword type="function" name="g_arg_info_get_closure ()" link="gi-GIArgInfo.html#g-arg-info-get-closure"/>
+    <keyword type="function" name="g_arg_info_get_destroy ()" link="gi-GIArgInfo.html#g-arg-info-get-destroy"/>
+    <keyword type="function" name="g_arg_info_get_type ()" link="gi-GIArgInfo.html#g-arg-info-get-type"/>
+    <keyword type="function" name="g_arg_info_load_type ()" link="gi-GIArgInfo.html#g-arg-info-load-type"/>
+    <keyword type="macro" name="GI_IS_TYPE_INFO()" link="gi-GITypeInfo.html#GI-IS-TYPE-INFO:CAPS"/>
+    <keyword type="enum" name="enum GIArrayType" link="gi-GITypeInfo.html#GIArrayType"/>
+    <keyword type="typedef" name="GITypeInfo" link="gi-GITypeInfo.html#GITypeInfo"/>
+    <keyword type="enum" name="enum GITypeTag" link="gi-GITypeInfo.html#GITypeTag"/>
+    <keyword type="macro" name="G_TYPE_TAG_IS_BASIC()" link="gi-GITypeInfo.html#G-TYPE-TAG-IS-BASIC:CAPS"/>
+    <keyword type="function" name="g_type_tag_to_string ()" link="gi-GITypeInfo.html#g-type-tag-to-string"/>
+    <keyword type="function" name="g_type_info_is_pointer ()" link="gi-GITypeInfo.html#g-type-info-is-pointer"/>
+    <keyword type="function" name="g_type_info_get_tag ()" link="gi-GITypeInfo.html#g-type-info-get-tag"/>
+    <keyword type="function" name="g_type_info_get_param_type ()" link="gi-GITypeInfo.html#g-type-info-get-param-type"/>
+    <keyword type="function" name="g_type_info_get_interface ()" link="gi-GITypeInfo.html#g-type-info-get-interface"/>
+    <keyword type="function" name="g_type_info_get_array_length ()" link="gi-GITypeInfo.html#g-type-info-get-array-length"/>
+    <keyword type="function" name="g_type_info_get_array_fixed_size ()" link="gi-GITypeInfo.html#g-type-info-get-array-fixed-size"/>
+    <keyword type="function" name="g_type_info_is_zero_terminated ()" link="gi-GITypeInfo.html#g-type-info-is-zero-terminated"/>
+    <keyword type="function" name="g_type_info_get_array_type ()" link="gi-GITypeInfo.html#g-type-info-get-array-type"/>
+    <keyword type="macro" name="GI_IS_STRUCT_INFO()" link="gi-GIStructInfo.html#GI-IS-STRUCT-INFO:CAPS"/>
+    <keyword type="typedef" name="GIStructInfo" link="gi-GIStructInfo.html#GIStructInfo"/>
+    <keyword type="function" name="g_struct_info_get_n_fields ()" link="gi-GIStructInfo.html#g-struct-info-get-n-fields"/>
+    <keyword type="function" name="g_struct_info_get_field ()" link="gi-GIStructInfo.html#g-struct-info-get-field"/>
+    <keyword type="function" name="g_struct_info_get_n_methods ()" link="gi-GIStructInfo.html#g-struct-info-get-n-methods"/>
+    <keyword type="function" name="g_struct_info_get_method ()" link="gi-GIStructInfo.html#g-struct-info-get-method"/>
+    <keyword type="function" name="g_struct_info_find_method ()" link="gi-GIStructInfo.html#g-struct-info-find-method"/>
+    <keyword type="function" name="g_struct_info_get_size ()" link="gi-GIStructInfo.html#g-struct-info-get-size"/>
+    <keyword type="function" name="g_struct_info_get_alignment ()" link="gi-GIStructInfo.html#g-struct-info-get-alignment"/>
+    <keyword type="function" name="g_struct_info_is_gtype_struct ()" link="gi-GIStructInfo.html#g-struct-info-is-gtype-struct"/>
+    <keyword type="function" name="g_struct_info_is_foreign ()" link="gi-GIStructInfo.html#g-struct-info-is-foreign"/>
+    <keyword type="macro" name="GI_IS_UNION_INFO()" link="gi-GIUnionInfo.html#GI-IS-UNION-INFO:CAPS"/>
+    <keyword type="typedef" name="GIUnionInfo" link="gi-GIUnionInfo.html#GIUnionInfo"/>
+    <keyword type="function" name="g_union_info_get_n_fields ()" link="gi-GIUnionInfo.html#g-union-info-get-n-fields"/>
+    <keyword type="function" name="g_union_info_get_field ()" link="gi-GIUnionInfo.html#g-union-info-get-field"/>
+    <keyword type="function" name="g_union_info_get_n_methods ()" link="gi-GIUnionInfo.html#g-union-info-get-n-methods"/>
+    <keyword type="function" name="g_union_info_get_method ()" link="gi-GIUnionInfo.html#g-union-info-get-method"/>
+    <keyword type="function" name="g_union_info_is_discriminated ()" link="gi-GIUnionInfo.html#g-union-info-is-discriminated"/>
+    <keyword type="function" name="g_union_info_get_discriminator_offset ()" link="gi-GIUnionInfo.html#g-union-info-get-discriminator-offset"/>
+    <keyword type="function" name="g_union_info_get_discriminator_type ()" link="gi-GIUnionInfo.html#g-union-info-get-discriminator-type"/>
+    <keyword type="function" name="g_union_info_get_discriminator ()" link="gi-GIUnionInfo.html#g-union-info-get-discriminator"/>
+    <keyword type="function" name="g_union_info_find_method ()" link="gi-GIUnionInfo.html#g-union-info-find-method"/>
+    <keyword type="function" name="g_union_info_get_size ()" link="gi-GIUnionInfo.html#g-union-info-get-size"/>
+    <keyword type="function" name="g_union_info_get_alignment ()" link="gi-GIUnionInfo.html#g-union-info-get-alignment"/>
+    <keyword type="macro" name="GI_IS_FIELD_INFO()" link="gi-GIFieldInfo.html#GI-IS-FIELD-INFO:CAPS"/>
+    <keyword type="typedef" name="GIFieldInfo" link="gi-GIFieldInfo.html#GIFieldInfo"/>
+    <keyword type="enum" name="enum GIFieldInfoFlags" link="gi-GIFieldInfo.html#GIFieldInfoFlags"/>
+    <keyword type="function" name="g_field_info_get_flags ()" link="gi-GIFieldInfo.html#g-field-info-get-flags"/>
+    <keyword type="function" name="g_field_info_get_size ()" link="gi-GIFieldInfo.html#g-field-info-get-size"/>
+    <keyword type="function" name="g_field_info_get_offset ()" link="gi-GIFieldInfo.html#g-field-info-get-offset"/>
+    <keyword type="function" name="g_field_info_get_type ()" link="gi-GIFieldInfo.html#g-field-info-get-type"/>
+    <keyword type="function" name="g_field_info_get_field ()" link="gi-GIFieldInfo.html#g-field-info-get-field"/>
+    <keyword type="function" name="g_field_info_set_field ()" link="gi-GIFieldInfo.html#g-field-info-set-field"/>
+    <keyword type="macro" name="GI_IS_PROPERTY_INFO()" link="gi-GIPropertyInfo.html#GI-IS-PROPERTY-INFO:CAPS"/>
+    <keyword type="typedef" name="GIPropertyInfo" link="gi-GIPropertyInfo.html#GIPropertyInfo"/>
+    <keyword type="function" name="g_property_info_get_flags ()" link="gi-GIPropertyInfo.html#g-property-info-get-flags"/>
+    <keyword type="function" name="g_property_info_get_type ()" link="gi-GIPropertyInfo.html#g-property-info-get-type"/>
+    <keyword type="function" name="g_property_info_get_ownership_transfer ()" link="gi-GIPropertyInfo.html#g-property-info-get-ownership-transfer"/>
+    <keyword type="macro" name="GI_IS_VFUNC_INFO()" link="gi-GIVFuncInfo.html#GI-IS-VFUNC-INFO:CAPS"/>
+    <keyword type="typedef" name="GIVFuncInfo" link="gi-GIVFuncInfo.html#GIVFuncInfo"/>
+    <keyword type="enum" name="enum GIVFuncInfoFlags" link="gi-GIVFuncInfo.html#GIVFuncInfoFlags"/>
+    <keyword type="function" name="g_vfunc_info_get_flags ()" link="gi-GIVFuncInfo.html#g-vfunc-info-get-flags"/>
+    <keyword type="function" name="g_vfunc_info_get_offset ()" link="gi-GIVFuncInfo.html#g-vfunc-info-get-offset"/>
+    <keyword type="function" name="g_vfunc_info_get_signal ()" link="gi-GIVFuncInfo.html#g-vfunc-info-get-signal"/>
+    <keyword type="function" name="g_vfunc_info_get_invoker ()" link="gi-GIVFuncInfo.html#g-vfunc-info-get-invoker"/>
+    <keyword type="macro" name="GI_IS_SIGNAL_INFO()" link="gi-GISignalInfo.html#GI-IS-SIGNAL-INFO:CAPS"/>
+    <keyword type="typedef" name="GISignalInfo" link="gi-GISignalInfo.html#GISignalInfo"/>
+    <keyword type="function" name="g_signal_info_get_flags ()" link="gi-GISignalInfo.html#g-signal-info-get-flags"/>
+    <keyword type="function" name="g_signal_info_get_class_closure ()" link="gi-GISignalInfo.html#g-signal-info-get-class-closure"/>
+    <keyword type="function" name="g_signal_info_true_stops_emit ()" link="gi-GISignalInfo.html#g-signal-info-true-stops-emit"/>
+    <keyword type="macro" name="GI_IS_ENUM_INFO()" link="gi-GIEnumInfo.html#GI-IS-ENUM-INFO:CAPS"/>
+    <keyword type="macro" name="GI_IS_VALUE_INFO()" link="gi-GIEnumInfo.html#GI-IS-VALUE-INFO:CAPS"/>
+    <keyword type="typedef" name="GIEnumInfo" link="gi-GIEnumInfo.html#GIEnumInfo"/>
+    <keyword type="typedef" name="GIValueInfo" link="gi-GIEnumInfo.html#GIValueInfo"/>
+    <keyword type="function" name="g_enum_info_get_n_values ()" link="gi-GIEnumInfo.html#g-enum-info-get-n-values"/>
+    <keyword type="function" name="g_enum_info_get_value ()" link="gi-GIEnumInfo.html#g-enum-info-get-value"/>
+    <keyword type="function" name="g_enum_info_get_n_methods ()" link="gi-GIEnumInfo.html#g-enum-info-get-n-methods" since="1.29.17"/>
+    <keyword type="function" name="g_enum_info_get_method ()" link="gi-GIEnumInfo.html#g-enum-info-get-method" since="1.29.17"/>
+    <keyword type="function" name="g_enum_info_get_storage_type ()" link="gi-GIEnumInfo.html#g-enum-info-get-storage-type"/>
+    <keyword type="function" name="g_value_info_get_value ()" link="gi-GIEnumInfo.html#g-value-info-get-value"/>
+    <keyword type="macro" name="GI_IS_REGISTERED_TYPE_INFO()" link="gi-GIRegisteredTypeInfo.html#GI-IS-REGISTERED-TYPE-INFO:CAPS"/>
+    <keyword type="typedef" name="GIRegisteredTypeInfo" link="gi-GIRegisteredTypeInfo.html#GIRegisteredTypeInfo"/>
+    <keyword type="function" name="g_registered_type_info_get_type_name ()" link="gi-GIRegisteredTypeInfo.html#g-registered-type-info-get-type-name"/>
+    <keyword type="function" name="g_registered_type_info_get_type_init ()" link="gi-GIRegisteredTypeInfo.html#g-registered-type-info-get-type-init"/>
+    <keyword type="function" name="g_registered_type_info_get_g_type ()" link="gi-GIRegisteredTypeInfo.html#g-registered-type-info-get-g-type"/>
+    <keyword type="macro" name="GI_IS_OBJECT_INFO()" link="gi-GIObjectInfo.html#GI-IS-OBJECT-INFO:CAPS"/>
+    <keyword type="typedef" name="GIObjectInfo" link="gi-GIObjectInfo.html#GIObjectInfo"/>
+    <keyword type="function" name="GIObjectInfoGetValueFunction ()" link="gi-GIObjectInfo.html#GIObjectInfoGetValueFunction"/>
+    <keyword type="function" name="GIObjectInfoRefFunction ()" link="gi-GIObjectInfo.html#GIObjectInfoRefFunction"/>
+    <keyword type="function" name="GIObjectInfoSetValueFunction ()" link="gi-GIObjectInfo.html#GIObjectInfoSetValueFunction"/>
+    <keyword type="function" name="GIObjectInfoUnrefFunction ()" link="gi-GIObjectInfo.html#GIObjectInfoUnrefFunction"/>
+    <keyword type="function" name="g_object_info_get_type_name ()" link="gi-GIObjectInfo.html#g-object-info-get-type-name"/>
+    <keyword type="function" name="g_object_info_get_type_init ()" link="gi-GIObjectInfo.html#g-object-info-get-type-init"/>
+    <keyword type="function" name="g_object_info_get_abstract ()" link="gi-GIObjectInfo.html#g-object-info-get-abstract"/>
+    <keyword type="function" name="g_object_info_get_fundamental ()" link="gi-GIObjectInfo.html#g-object-info-get-fundamental"/>
+    <keyword type="function" name="g_object_info_get_parent ()" link="gi-GIObjectInfo.html#g-object-info-get-parent"/>
+    <keyword type="function" name="g_object_info_get_n_interfaces ()" link="gi-GIObjectInfo.html#g-object-info-get-n-interfaces"/>
+    <keyword type="function" name="g_object_info_get_interface ()" link="gi-GIObjectInfo.html#g-object-info-get-interface"/>
+    <keyword type="function" name="g_object_info_get_n_fields ()" link="gi-GIObjectInfo.html#g-object-info-get-n-fields"/>
+    <keyword type="function" name="g_object_info_get_field ()" link="gi-GIObjectInfo.html#g-object-info-get-field"/>
+    <keyword type="function" name="g_object_info_get_n_properties ()" link="gi-GIObjectInfo.html#g-object-info-get-n-properties"/>
+    <keyword type="function" name="g_object_info_get_property ()" link="gi-GIObjectInfo.html#g-object-info-get-property"/>
+    <keyword type="function" name="g_object_info_get_n_methods ()" link="gi-GIObjectInfo.html#g-object-info-get-n-methods"/>
+    <keyword type="function" name="g_object_info_get_method ()" link="gi-GIObjectInfo.html#g-object-info-get-method"/>
+    <keyword type="function" name="g_object_info_find_method ()" link="gi-GIObjectInfo.html#g-object-info-find-method"/>
+    <keyword type="function" name="g_object_info_get_n_signals ()" link="gi-GIObjectInfo.html#g-object-info-get-n-signals"/>
+    <keyword type="function" name="g_object_info_get_signal ()" link="gi-GIObjectInfo.html#g-object-info-get-signal"/>
+    <keyword type="function" name="g_object_info_get_n_vfuncs ()" link="gi-GIObjectInfo.html#g-object-info-get-n-vfuncs"/>
+    <keyword type="function" name="g_object_info_get_vfunc ()" link="gi-GIObjectInfo.html#g-object-info-get-vfunc"/>
+    <keyword type="function" name="g_object_info_get_n_constants ()" link="gi-GIObjectInfo.html#g-object-info-get-n-constants"/>
+    <keyword type="function" name="g_object_info_get_constant ()" link="gi-GIObjectInfo.html#g-object-info-get-constant"/>
+    <keyword type="function" name="g_object_info_get_class_struct ()" link="gi-GIObjectInfo.html#g-object-info-get-class-struct"/>
+    <keyword type="function" name="g_object_info_find_vfunc ()" link="gi-GIObjectInfo.html#g-object-info-find-vfunc"/>
+    <keyword type="function" name="g_object_info_get_unref_function ()" link="gi-GIObjectInfo.html#g-object-info-get-unref-function"/>
+    <keyword type="function" name="g_object_info_get_unref_function_pointer ()" link="gi-GIObjectInfo.html#g-object-info-get-unref-function-pointer"/>
+    <keyword type="function" name="g_object_info_get_ref_function ()" link="gi-GIObjectInfo.html#g-object-info-get-ref-function"/>
+    <keyword type="function" name="g_object_info_get_ref_function_pointer ()" link="gi-GIObjectInfo.html#g-object-info-get-ref-function-pointer"/>
+    <keyword type="function" name="g_object_info_get_set_value_function ()" link="gi-GIObjectInfo.html#g-object-info-get-set-value-function"/>
+    <keyword type="function" name="g_object_info_get_set_value_function_pointer ()" link="gi-GIObjectInfo.html#g-object-info-get-set-value-function-pointer"/>
+    <keyword type="function" name="g_object_info_get_get_value_function ()" link="gi-GIObjectInfo.html#g-object-info-get-get-value-function"/>
+    <keyword type="function" name="g_object_info_get_get_value_function_pointer ()" link="gi-GIObjectInfo.html#g-object-info-get-get-value-function-pointer"/>
+    <keyword type="macro" name="GI_IS_INTERFACE_INFO()" link="gi-GIInterfaceInfo.html#GI-IS-INTERFACE-INFO:CAPS"/>
+    <keyword type="typedef" name="GIInterfaceInfo" link="gi-GIInterfaceInfo.html#GIInterfaceInfo"/>
+    <keyword type="function" name="g_interface_info_get_n_prerequisites ()" link="gi-GIInterfaceInfo.html#g-interface-info-get-n-prerequisites"/>
+    <keyword type="function" name="g_interface_info_get_prerequisite ()" link="gi-GIInterfaceInfo.html#g-interface-info-get-prerequisite"/>
+    <keyword type="function" name="g_interface_info_get_n_properties ()" link="gi-GIInterfaceInfo.html#g-interface-info-get-n-properties"/>
+    <keyword type="function" name="g_interface_info_get_property ()" link="gi-GIInterfaceInfo.html#g-interface-info-get-property"/>
+    <keyword type="function" name="g_interface_info_get_n_methods ()" link="gi-GIInterfaceInfo.html#g-interface-info-get-n-methods"/>
+    <keyword type="function" name="g_interface_info_get_method ()" link="gi-GIInterfaceInfo.html#g-interface-info-get-method"/>
+    <keyword type="function" name="g_interface_info_find_method ()" link="gi-GIInterfaceInfo.html#g-interface-info-find-method"/>
+    <keyword type="function" name="g_interface_info_get_n_signals ()" link="gi-GIInterfaceInfo.html#g-interface-info-get-n-signals"/>
+    <keyword type="function" name="g_interface_info_get_signal ()" link="gi-GIInterfaceInfo.html#g-interface-info-get-signal"/>
+    <keyword type="function" name="g_interface_info_get_n_vfuncs ()" link="gi-GIInterfaceInfo.html#g-interface-info-get-n-vfuncs"/>
+    <keyword type="function" name="g_interface_info_get_vfunc ()" link="gi-GIInterfaceInfo.html#g-interface-info-get-vfunc"/>
+    <keyword type="function" name="g_interface_info_get_n_constants ()" link="gi-GIInterfaceInfo.html#g-interface-info-get-n-constants"/>
+    <keyword type="function" name="g_interface_info_get_constant ()" link="gi-GIInterfaceInfo.html#g-interface-info-get-constant"/>
+    <keyword type="function" name="g_interface_info_get_iface_struct ()" link="gi-GIInterfaceInfo.html#g-interface-info-get-iface-struct"/>
+    <keyword type="function" name="g_interface_info_find_vfunc ()" link="gi-GIInterfaceInfo.html#g-interface-info-find-vfunc"/>
+    <keyword type="macro" name="GI_IS_CONSTANT_INFO()" link="gi-GIConstantInfo.html#GI-IS-CONSTANT-INFO:CAPS"/>
+    <keyword type="typedef" name="GIConstantInfo" link="gi-GIConstantInfo.html#GIConstantInfo"/>
+    <keyword type="function" name="g_constant_info_get_type ()" link="gi-GIConstantInfo.html#g-constant-info-get-type"/>
+    <keyword type="function" name="g_constant_info_get_value ()" link="gi-GIConstantInfo.html#g-constant-info-get-value"/>
+    <keyword type="" name="api node" link="gi-gir-reference.html#gi-gir-api"/>
+    <keyword type="" name="namespace node" link="gi-gir-reference.html#gi-gir-namespace"/>
+    <keyword type="" name="class node" link="gi-gir-reference.html#gi-gir-class"/>
+    <keyword type="" name="interface node" link="gi-gir-reference.html#gi-gir-interface"/>
+    <keyword type="" name="function node" link="gi-gir-reference.html#gi-gir-function"/>
+    <keyword type="macro" name="G_IR_MAGIC" link="gi-gtypelib.html#G-IR-MAGIC:CAPS"/>
+    <keyword type="enum" name="enum GTypelibBlobType" link="gi-gtypelib.html#GTypelibBlobType"/>
+    <keyword type="struct" name="Header" link="gi-gtypelib.html#Header"/>
+    <keyword type="struct" name="DirEntry" link="gi-gtypelib.html#DirEntry"/>
+    <keyword type="struct" name="ArgBlob" link="gi-gtypelib.html#ArgBlob"/>
+    <keyword type="struct" name="SignatureBlob" link="gi-gtypelib.html#SignatureBlob"/>
+    <keyword type="struct" name="CommonBlob" link="gi-gtypelib.html#CommonBlob"/>
+    <keyword type="struct" name="FunctionBlob" link="gi-gtypelib.html#FunctionBlob"/>
+    <keyword type="struct" name="CallbackBlob" link="gi-gtypelib.html#CallbackBlob"/>
+    <keyword type="struct" name="InterfaceTypeBlob" link="gi-gtypelib.html#InterfaceTypeBlob"/>
+    <keyword type="struct" name="ParamTypeBlob" link="gi-gtypelib.html#ParamTypeBlob"/>
+    <keyword type="struct" name="ErrorTypeBlob" link="gi-gtypelib.html#ErrorTypeBlob"/>
+    <keyword type="struct" name="ValueBlob" link="gi-gtypelib.html#ValueBlob"/>
+    <keyword type="struct" name="FieldBlob" link="gi-gtypelib.html#FieldBlob"/>
+    <keyword type="struct" name="RegisteredTypeBlob" link="gi-gtypelib.html#RegisteredTypeBlob"/>
+    <keyword type="struct" name="StructBlob" link="gi-gtypelib.html#StructBlob"/>
+    <keyword type="struct" name="UnionBlob" link="gi-gtypelib.html#UnionBlob"/>
+    <keyword type="struct" name="EnumBlob" link="gi-gtypelib.html#EnumBlob"/>
+    <keyword type="struct" name="PropertyBlob" link="gi-gtypelib.html#PropertyBlob"/>
+    <keyword type="struct" name="SignalBlob" link="gi-gtypelib.html#SignalBlob"/>
+    <keyword type="struct" name="VFuncBlob" link="gi-gtypelib.html#VFuncBlob"/>
+    <keyword type="struct" name="ObjectBlob" link="gi-gtypelib.html#ObjectBlob"/>
+    <keyword type="struct" name="InterfaceBlob" link="gi-gtypelib.html#InterfaceBlob"/>
+    <keyword type="struct" name="ConstantBlob" link="gi-gtypelib.html#ConstantBlob"/>
+    <keyword type="struct" name="AttributeBlob" link="gi-gtypelib.html#AttributeBlob"/>
+    <keyword type="function" name="g_typelib_get_dir_entry ()" link="gi-gtypelib.html#g-typelib-get-dir-entry"/>
+    <keyword type="function" name="g_typelib_check_sanity ()" link="gi-gtypelib.html#g-typelib-check-sanity"/>
+    <keyword type="macro" name="g_typelib_get_string()" link="gi-gtypelib.html#g-typelib-get-string"/>
+    <keyword type="macro" name="G_TYPELIB_ERROR" link="gi-gtypelib.html#G-TYPELIB-ERROR:CAPS"/>
+    <keyword type="function" name="g_typelib_validate ()" link="gi-gtypelib.html#g-typelib-validate"/>
+    <keyword type="macro" name="BLOB_IS_REGISTERED_TYPE()" link="gi-gtypelib.html#BLOB-IS-REGISTERED-TYPE:CAPS"/>
+    <keyword type="constant" name="G_IREPOSITORY_ERROR_TYPELIB_NOT_FOUND" link="gi-girepository.html#G-IREPOSITORY-ERROR-TYPELIB-NOT-FOUND:CAPS"/>
+    <keyword type="constant" name="G_IREPOSITORY_ERROR_NAMESPACE_MISMATCH" link="gi-girepository.html#G-IREPOSITORY-ERROR-NAMESPACE-MISMATCH:CAPS"/>
+    <keyword type="constant" name="G_IREPOSITORY_ERROR_NAMESPACE_VERSION_CONFLICT" link="gi-girepository.html#G-IREPOSITORY-ERROR-NAMESPACE-VERSION-CONFLICT:CAPS"/>
+    <keyword type="constant" name="G_IREPOSITORY_ERROR_LIBRARY_NOT_FOUND" link="gi-girepository.html#G-IREPOSITORY-ERROR-LIBRARY-NOT-FOUND:CAPS"/>
+    <keyword type="constant" name="G_IREPOSITORY_LOAD_FLAG_LAZY" link="gi-girepository.html#G-IREPOSITORY-LOAD-FLAG-LAZY:CAPS"/>
+    <keyword type="constant" name="GI_INFO_TYPE_INVALID" link="gi-GIBaseInfo.html#GI-INFO-TYPE-INVALID:CAPS"/>
+    <keyword type="constant" name="GI_INFO_TYPE_FUNCTION" link="gi-GIBaseInfo.html#GI-INFO-TYPE-FUNCTION:CAPS"/>
+    <keyword type="constant" name="GI_INFO_TYPE_CALLBACK" link="gi-GIBaseInfo.html#GI-INFO-TYPE-CALLBACK:CAPS"/>
+    <keyword type="constant" name="GI_INFO_TYPE_STRUCT" link="gi-GIBaseInfo.html#GI-INFO-TYPE-STRUCT:CAPS"/>
+    <keyword type="constant" name="GI_INFO_TYPE_BOXED" link="gi-GIBaseInfo.html#GI-INFO-TYPE-BOXED:CAPS"/>
+    <keyword type="constant" name="GI_INFO_TYPE_ENUM" link="gi-GIBaseInfo.html#GI-INFO-TYPE-ENUM:CAPS"/>
+    <keyword type="constant" name="GI_INFO_TYPE_FLAGS" link="gi-GIBaseInfo.html#GI-INFO-TYPE-FLAGS:CAPS"/>
+    <keyword type="constant" name="GI_INFO_TYPE_OBJECT" link="gi-GIBaseInfo.html#GI-INFO-TYPE-OBJECT:CAPS"/>
+    <keyword type="constant" name="GI_INFO_TYPE_INTERFACE" link="gi-GIBaseInfo.html#GI-INFO-TYPE-INTERFACE:CAPS"/>
+    <keyword type="constant" name="GI_INFO_TYPE_CONSTANT" link="gi-GIBaseInfo.html#GI-INFO-TYPE-CONSTANT:CAPS"/>
+    <keyword type="constant" name="GI_INFO_TYPE_INVALID_0" link="gi-GIBaseInfo.html#GI-INFO-TYPE-INVALID-0:CAPS"/>
+    <keyword type="constant" name="GI_INFO_TYPE_UNION" link="gi-GIBaseInfo.html#GI-INFO-TYPE-UNION:CAPS"/>
+    <keyword type="constant" name="GI_INFO_TYPE_VALUE" link="gi-GIBaseInfo.html#GI-INFO-TYPE-VALUE:CAPS"/>
+    <keyword type="constant" name="GI_INFO_TYPE_SIGNAL" link="gi-GIBaseInfo.html#GI-INFO-TYPE-SIGNAL:CAPS"/>
+    <keyword type="constant" name="GI_INFO_TYPE_VFUNC" link="gi-GIBaseInfo.html#GI-INFO-TYPE-VFUNC:CAPS"/>
+    <keyword type="constant" name="GI_INFO_TYPE_PROPERTY" link="gi-GIBaseInfo.html#GI-INFO-TYPE-PROPERTY:CAPS"/>
+    <keyword type="constant" name="GI_INFO_TYPE_FIELD" link="gi-GIBaseInfo.html#GI-INFO-TYPE-FIELD:CAPS"/>
+    <keyword type="constant" name="GI_INFO_TYPE_ARG" link="gi-GIBaseInfo.html#GI-INFO-TYPE-ARG:CAPS"/>
+    <keyword type="constant" name="GI_INFO_TYPE_TYPE" link="gi-GIBaseInfo.html#GI-INFO-TYPE-TYPE:CAPS"/>
+    <keyword type="constant" name="GI_INFO_TYPE_UNRESOLVED" link="gi-GIBaseInfo.html#GI-INFO-TYPE-UNRESOLVED:CAPS"/>
+    <keyword type="constant" name="G_INVOKE_ERROR_FAILED" link="gi-GIFunctionInfo.html#G-INVOKE-ERROR-FAILED:CAPS"/>
+    <keyword type="constant" name="G_INVOKE_ERROR_SYMBOL_NOT_FOUND" link="gi-GIFunctionInfo.html#G-INVOKE-ERROR-SYMBOL-NOT-FOUND:CAPS"/>
+    <keyword type="constant" name="G_INVOKE_ERROR_ARGUMENT_MISMATCH" link="gi-GIFunctionInfo.html#G-INVOKE-ERROR-ARGUMENT-MISMATCH:CAPS"/>
+    <keyword type="constant" name="GI_FUNCTION_IS_METHOD" link="gi-GIFunctionInfo.html#GI-FUNCTION-IS-METHOD:CAPS"/>
+    <keyword type="constant" name="GI_FUNCTION_IS_CONSTRUCTOR" link="gi-GIFunctionInfo.html#GI-FUNCTION-IS-CONSTRUCTOR:CAPS"/>
+    <keyword type="constant" name="GI_FUNCTION_IS_GETTER" link="gi-GIFunctionInfo.html#GI-FUNCTION-IS-GETTER:CAPS"/>
+    <keyword type="constant" name="GI_FUNCTION_IS_SETTER" link="gi-GIFunctionInfo.html#GI-FUNCTION-IS-SETTER:CAPS"/>
+    <keyword type="constant" name="GI_FUNCTION_WRAPS_VFUNC" link="gi-GIFunctionInfo.html#GI-FUNCTION-WRAPS-VFUNC:CAPS"/>
+    <keyword type="constant" name="GI_FUNCTION_THROWS" link="gi-GIFunctionInfo.html#GI-FUNCTION-THROWS:CAPS"/>
+    <keyword type="constant" name="GI_DIRECTION_IN" link="gi-GIArgInfo.html#GI-DIRECTION-IN:CAPS"/>
+    <keyword type="constant" name="GI_DIRECTION_OUT" link="gi-GIArgInfo.html#GI-DIRECTION-OUT:CAPS"/>
+    <keyword type="constant" name="GI_DIRECTION_INOUT" link="gi-GIArgInfo.html#GI-DIRECTION-INOUT:CAPS"/>
+    <keyword type="constant" name="GI_SCOPE_TYPE_INVALID" link="gi-GIArgInfo.html#GI-SCOPE-TYPE-INVALID:CAPS"/>
+    <keyword type="constant" name="GI_SCOPE_TYPE_CALL" link="gi-GIArgInfo.html#GI-SCOPE-TYPE-CALL:CAPS"/>
+    <keyword type="constant" name="GI_SCOPE_TYPE_ASYNC" link="gi-GIArgInfo.html#GI-SCOPE-TYPE-ASYNC:CAPS"/>
+    <keyword type="constant" name="GI_SCOPE_TYPE_NOTIFIED" link="gi-GIArgInfo.html#GI-SCOPE-TYPE-NOTIFIED:CAPS"/>
+    <keyword type="constant" name="GI_TRANSFER_NOTHING" link="gi-GIArgInfo.html#GI-TRANSFER-NOTHING:CAPS"/>
+    <keyword type="constant" name="GI_TRANSFER_CONTAINER" link="gi-GIArgInfo.html#GI-TRANSFER-CONTAINER:CAPS"/>
+    <keyword type="constant" name="GI_TRANSFER_EVERYTHING" link="gi-GIArgInfo.html#GI-TRANSFER-EVERYTHING:CAPS"/>
+    <keyword type="constant" name="GI_ARRAY_TYPE_C" link="gi-GITypeInfo.html#GI-ARRAY-TYPE-C:CAPS"/>
+    <keyword type="constant" name="GI_ARRAY_TYPE_ARRAY" link="gi-GITypeInfo.html#GI-ARRAY-TYPE-ARRAY:CAPS"/>
+    <keyword type="constant" name="GI_ARRAY_TYPE_PTR_ARRAY" link="gi-GITypeInfo.html#GI-ARRAY-TYPE-PTR-ARRAY:CAPS"/>
+    <keyword type="constant" name="GI_ARRAY_TYPE_BYTE_ARRAY" link="gi-GITypeInfo.html#GI-ARRAY-TYPE-BYTE-ARRAY:CAPS"/>
+    <keyword type="constant" name="GI_TYPE_TAG_VOID" link="gi-GITypeInfo.html#GI-TYPE-TAG-VOID:CAPS"/>
+    <keyword type="constant" name="GI_TYPE_TAG_BOOLEAN" link="gi-GITypeInfo.html#GI-TYPE-TAG-BOOLEAN:CAPS"/>
+    <keyword type="constant" name="GI_TYPE_TAG_INT8" link="gi-GITypeInfo.html#GI-TYPE-TAG-INT8:CAPS"/>
+    <keyword type="constant" name="GI_TYPE_TAG_UINT8" link="gi-GITypeInfo.html#GI-TYPE-TAG-UINT8:CAPS"/>
+    <keyword type="constant" name="GI_TYPE_TAG_INT16" link="gi-GITypeInfo.html#GI-TYPE-TAG-INT16:CAPS"/>
+    <keyword type="constant" name="GI_TYPE_TAG_UINT16" link="gi-GITypeInfo.html#GI-TYPE-TAG-UINT16:CAPS"/>
+    <keyword type="constant" name="GI_TYPE_TAG_INT32" link="gi-GITypeInfo.html#GI-TYPE-TAG-INT32:CAPS"/>
+    <keyword type="constant" name="GI_TYPE_TAG_UINT32" link="gi-GITypeInfo.html#GI-TYPE-TAG-UINT32:CAPS"/>
+    <keyword type="constant" name="GI_TYPE_TAG_INT64" link="gi-GITypeInfo.html#GI-TYPE-TAG-INT64:CAPS"/>
+    <keyword type="constant" name="GI_TYPE_TAG_UINT64" link="gi-GITypeInfo.html#GI-TYPE-TAG-UINT64:CAPS"/>
+    <keyword type="constant" name="GI_TYPE_TAG_FLOAT" link="gi-GITypeInfo.html#GI-TYPE-TAG-FLOAT:CAPS"/>
+    <keyword type="constant" name="GI_TYPE_TAG_DOUBLE" link="gi-GITypeInfo.html#GI-TYPE-TAG-DOUBLE:CAPS"/>
+    <keyword type="constant" name="GI_TYPE_TAG_GTYPE" link="gi-GITypeInfo.html#GI-TYPE-TAG-GTYPE:CAPS"/>
+    <keyword type="constant" name="GI_TYPE_TAG_UTF8" link="gi-GITypeInfo.html#GI-TYPE-TAG-UTF8:CAPS"/>
+    <keyword type="constant" name="GI_TYPE_TAG_FILENAME" link="gi-GITypeInfo.html#GI-TYPE-TAG-FILENAME:CAPS"/>
+    <keyword type="constant" name="GI_TYPE_TAG_ARRAY" link="gi-GITypeInfo.html#GI-TYPE-TAG-ARRAY:CAPS"/>
+    <keyword type="constant" name="GI_TYPE_TAG_INTERFACE" link="gi-GITypeInfo.html#GI-TYPE-TAG-INTERFACE:CAPS"/>
+    <keyword type="constant" name="GI_TYPE_TAG_GLIST" link="gi-GITypeInfo.html#GI-TYPE-TAG-GLIST:CAPS"/>
+    <keyword type="constant" name="GI_TYPE_TAG_GSLIST" link="gi-GITypeInfo.html#GI-TYPE-TAG-GSLIST:CAPS"/>
+    <keyword type="constant" name="GI_TYPE_TAG_GHASH" link="gi-GITypeInfo.html#GI-TYPE-TAG-GHASH:CAPS"/>
+    <keyword type="constant" name="GI_TYPE_TAG_ERROR" link="gi-GITypeInfo.html#GI-TYPE-TAG-ERROR:CAPS"/>
+    <keyword type="constant" name="GI_TYPE_TAG_UNICHAR" link="gi-GITypeInfo.html#GI-TYPE-TAG-UNICHAR:CAPS"/>
+    <keyword type="constant" name="GI_FIELD_IS_READABLE" link="gi-GIFieldInfo.html#GI-FIELD-IS-READABLE:CAPS"/>
+    <keyword type="constant" name="GI_FIELD_IS_WRITABLE" link="gi-GIFieldInfo.html#GI-FIELD-IS-WRITABLE:CAPS"/>
+    <keyword type="constant" name="GI_VFUNC_MUST_CHAIN_UP" link="gi-GIVFuncInfo.html#GI-VFUNC-MUST-CHAIN-UP:CAPS"/>
+    <keyword type="constant" name="GI_VFUNC_MUST_OVERRIDE" link="gi-GIVFuncInfo.html#GI-VFUNC-MUST-OVERRIDE:CAPS"/>
+    <keyword type="constant" name="GI_VFUNC_MUST_NOT_OVERRIDE" link="gi-GIVFuncInfo.html#GI-VFUNC-MUST-NOT-OVERRIDE:CAPS"/>
+    <keyword type="constant" name="GI_VFUNC_THROWS" link="gi-GIVFuncInfo.html#GI-VFUNC-THROWS:CAPS"/>
+    <keyword type="constant" name="BLOB_TYPE_INVALID" link="gi-gtypelib.html#BLOB-TYPE-INVALID:CAPS"/>
+    <keyword type="constant" name="BLOB_TYPE_FUNCTION" link="gi-gtypelib.html#BLOB-TYPE-FUNCTION:CAPS"/>
+    <keyword type="constant" name="BLOB_TYPE_CALLBACK" link="gi-gtypelib.html#BLOB-TYPE-CALLBACK:CAPS"/>
+    <keyword type="constant" name="BLOB_TYPE_STRUCT" link="gi-gtypelib.html#BLOB-TYPE-STRUCT:CAPS"/>
+    <keyword type="constant" name="BLOB_TYPE_BOXED" link="gi-gtypelib.html#BLOB-TYPE-BOXED:CAPS"/>
+    <keyword type="constant" name="BLOB_TYPE_ENUM" link="gi-gtypelib.html#BLOB-TYPE-ENUM:CAPS"/>
+    <keyword type="constant" name="BLOB_TYPE_FLAGS" link="gi-gtypelib.html#BLOB-TYPE-FLAGS:CAPS"/>
+    <keyword type="constant" name="BLOB_TYPE_OBJECT" link="gi-gtypelib.html#BLOB-TYPE-OBJECT:CAPS"/>
+    <keyword type="constant" name="BLOB_TYPE_INTERFACE" link="gi-gtypelib.html#BLOB-TYPE-INTERFACE:CAPS"/>
+    <keyword type="constant" name="BLOB_TYPE_CONSTANT" link="gi-gtypelib.html#BLOB-TYPE-CONSTANT:CAPS"/>
+    <keyword type="constant" name="BLOB_TYPE_INVALID_0" link="gi-gtypelib.html#BLOB-TYPE-INVALID-0:CAPS"/>
+    <keyword type="constant" name="BLOB_TYPE_UNION" link="gi-gtypelib.html#BLOB-TYPE-UNION:CAPS"/>
+  </functions>
+</book>
diff --git a/docs/reference/html/girepository.html b/docs/reference/html/girepository.html
new file mode 100644 (file)
index 0000000..0e3bfec
--- /dev/null
@@ -0,0 +1,100 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Part I. </title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="prev" href="gi-overview.html" title="Introspection Overview">
+<link rel="next" href="gi-libgirepository.html" title="GIRepository">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
+<td><a accesskey="p" href="gi-overview.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td> </td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="gi-libgirepository.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="part">
+<div class="titlepage"><div><div><h1 class="title">
+<a name="girepository"></a>Part I. </h1></div></div></div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl>
+<dt><span class="chapter"><a href="gi-libgirepository.html">GIRepository</a></span></dt>
+<dd><dl><dt>
+<span class="refentrytitle"><a href="gi-girepository.html">girepository</a></span><span class="refpurpose"></span>
+</dt></dl></dd>
+<dt><span class="chapter"><a href="gi-ffi.html">GIR Foreign functions interface</a></span></dt>
+<dd><dl><dt>
+<span class="refentrytitle"><a href="gi-girffi.html">girffi</a></span><span class="refpurpose"></span>
+</dt></dl></dd>
+<dt><span class="chapter"><a href="gi-repository-structs.html">GIRepository structs</a></span></dt>
+<dd><dl>
+<dt>
+<span class="refentrytitle"><a href="gi-struct-hierarchy.html">Struct hierarchy</a></span><span class="refpurpose"> â€” Struct hierarchy description for GIBaseInfo and all its sub structs</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIBaseInfo.html">GIBaseInfo</a></span><span class="refpurpose"> â€” Base struct for all GITypelib structs</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIFunctionInfo.html">GIFunctionInfo</a></span><span class="refpurpose"> â€” Struct representing a function</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GICallableInfo.html">GICallableInfo</a></span><span class="refpurpose"> â€” Struct representing a callable</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIArgInfo.html">GIArgInfo</a></span><span class="refpurpose"> â€” Struct representing an argument</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GITypeInfo.html">GITypeInfo</a></span><span class="refpurpose"> â€” Struct representing a type</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIStructInfo.html">GIStructInfo</a></span><span class="refpurpose"> â€” Struct representing a C structure</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIUnionInfo.html">GIUnionInfo</a></span><span class="refpurpose"> â€” Struct representing a union.</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIFieldInfo.html">GIFieldInfo</a></span><span class="refpurpose"> â€” Struct representing a struct or union field</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIPropertyInfo.html">GIPropertyInfo</a></span><span class="refpurpose"> â€” Struct representing a property</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIVFuncInfo.html">GIVFuncInfo</a></span><span class="refpurpose"> â€” Struct representing a virtual function</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GISignalInfo.html">GISignalInfo</a></span><span class="refpurpose"> â€” Struct representing a signal</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIEnumInfo.html">GIEnumInfo</a></span><span class="refpurpose"> â€” Structs representing an enumeration and its values</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIRegisteredTypeInfo.html">GIRegisteredTypeInfo</a></span><span class="refpurpose"> â€” Struct representing a struct with a GType</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIObjectInfo.html">GIObjectInfo</a></span><span class="refpurpose"> â€” Struct representing a GObject</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIInterfaceInfo.html">GIInterfaceInfo</a></span><span class="refpurpose"> â€” Struct representing a GInterface</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIConstantInfo.html">GIConstantInfo</a></span><span class="refpurpose"> â€” Struct representing a constant</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-gierrordomaininfo.html">gierrordomaininfo</a></span><span class="refpurpose"></span>
+</dt>
+</dl></dd>
+</dl>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/glib.html b/docs/reference/html/glib.html
new file mode 100644 (file)
index 0000000..273d7c6
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GObject-Introspection Overview</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="up" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="prev" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="next" href="gi-overview.html" title="Introspection Overview">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
+<td><a accesskey="p" href="index.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td> </td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">GObject Introspection Reference Manual</th>
+<td><a accesskey="n" href="gi-overview.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="chapter">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="glib"></a>GObject-Introspection Overview</h2></div></div></div>
+<div class="toc"><dl><dt>
+<span class="refentrytitle"><a href="gi-overview.html">Introspection Overview</a></span><span class="refpurpose"> â€” General overview of introspection</span>
+</dt></dl></div>
+<p>
+Bla bla bla bla bla
+    </p>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/home.png b/docs/reference/html/home.png
new file mode 100644 (file)
index 0000000..1700361
Binary files /dev/null and b/docs/reference/html/home.png differ
diff --git a/docs/reference/html/index.html b/docs/reference/html/index.html
new file mode 100644 (file)
index 0000000..267e977
--- /dev/null
@@ -0,0 +1,104 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GObject Introspection Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="GObject Introspection Reference Manual">
+<link rel="next" href="glib.html" title="GObject-Introspection Overview">
+<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<div class="book">
+<div class="titlepage">
+<div><div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">GObject Introspection Reference Manual</p></th></tr></table></div></div>
+<hr>
+</div>
+<div class="toc"><dl>
+<dt><span class="chapter"><a href="glib.html">GObject-Introspection Overview</a></span></dt>
+<dd><dl><dt>
+<span class="refentrytitle"><a href="gi-overview.html">Introspection Overview</a></span><span class="refpurpose"> â€” General overview of introspection</span>
+</dt></dl></dd>
+<dt><span class="part"><a href="girepository.html">I. </a></span></dt>
+<dd><dl>
+<dt><span class="chapter"><a href="gi-libgirepository.html">GIRepository</a></span></dt>
+<dd><dl><dt>
+<span class="refentrytitle"><a href="gi-girepository.html">girepository</a></span><span class="refpurpose"></span>
+</dt></dl></dd>
+<dt><span class="chapter"><a href="gi-ffi.html">GIR Foreign functions interface</a></span></dt>
+<dd><dl><dt>
+<span class="refentrytitle"><a href="gi-girffi.html">girffi</a></span><span class="refpurpose"></span>
+</dt></dl></dd>
+<dt><span class="chapter"><a href="gi-repository-structs.html">GIRepository structs</a></span></dt>
+<dd><dl>
+<dt>
+<span class="refentrytitle"><a href="gi-struct-hierarchy.html">Struct hierarchy</a></span><span class="refpurpose"> â€” Struct hierarchy description for GIBaseInfo and all its sub structs</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIBaseInfo.html">GIBaseInfo</a></span><span class="refpurpose"> â€” Base struct for all GITypelib structs</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIFunctionInfo.html">GIFunctionInfo</a></span><span class="refpurpose"> â€” Struct representing a function</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GICallableInfo.html">GICallableInfo</a></span><span class="refpurpose"> â€” Struct representing a callable</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIArgInfo.html">GIArgInfo</a></span><span class="refpurpose"> â€” Struct representing an argument</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GITypeInfo.html">GITypeInfo</a></span><span class="refpurpose"> â€” Struct representing a type</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIStructInfo.html">GIStructInfo</a></span><span class="refpurpose"> â€” Struct representing a C structure</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIUnionInfo.html">GIUnionInfo</a></span><span class="refpurpose"> â€” Struct representing a union.</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIFieldInfo.html">GIFieldInfo</a></span><span class="refpurpose"> â€” Struct representing a struct or union field</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIPropertyInfo.html">GIPropertyInfo</a></span><span class="refpurpose"> â€” Struct representing a property</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIVFuncInfo.html">GIVFuncInfo</a></span><span class="refpurpose"> â€” Struct representing a virtual function</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GISignalInfo.html">GISignalInfo</a></span><span class="refpurpose"> â€” Struct representing a signal</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIEnumInfo.html">GIEnumInfo</a></span><span class="refpurpose"> â€” Structs representing an enumeration and its values</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIRegisteredTypeInfo.html">GIRegisteredTypeInfo</a></span><span class="refpurpose"> â€” Struct representing a struct with a GType</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIObjectInfo.html">GIObjectInfo</a></span><span class="refpurpose"> â€” Struct representing a GObject</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIInterfaceInfo.html">GIInterfaceInfo</a></span><span class="refpurpose"> â€” Struct representing a GInterface</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-GIConstantInfo.html">GIConstantInfo</a></span><span class="refpurpose"> â€” Struct representing a constant</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="gi-gierrordomaininfo.html">gierrordomaininfo</a></span><span class="refpurpose"></span>
+</dt>
+</dl></dd>
+</dl></dd>
+<dt><span class="part"><a href="gi-gir.html">II. GIR markup format</a></span></dt>
+<dd><dl><dt><span class="chapter"><a href="gi-gir-reference.html">The GIR XML format</a></span></dt></dl></dd>
+<dt><span class="chapter"><a href="gi-typelib.html">Typelib binary format</a></span></dt>
+<dd><dl><dt>
+<span class="refentrytitle"><a href="gi-gtypelib.html">gtypelib</a></span><span class="refpurpose"> â€” Layout and accessors for typelib</span>
+</dt></dl></dd>
+<dt><span class="glossary"><a href="annotation-glossary.html">Annotation Glossary</a></span></dt>
+</dl></div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.18.1</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/reference/html/index.sgml b/docs/reference/html/index.sgml
new file mode 100644 (file)
index 0000000..ed993d7
--- /dev/null
@@ -0,0 +1,460 @@
+<ANCHOR id="gi-overview" href="gi/gi-overview.html">
+<ANCHOR id="gi-girepository" href="gi/gi-girepository.html">
+<ANCHOR id="gi-girepository.synopsis" href="gi/gi-girepository.html#gi-girepository.synopsis">
+<ANCHOR id="GIRepository" href="gi/gi-girepository.html#GIRepository">
+<ANCHOR id="gi-girepository.object-hierarchy" href="gi/gi-girepository.html#gi-girepository.object-hierarchy">
+<ANCHOR id="gi-girepository.description" href="gi/gi-girepository.html#gi-girepository.description">
+<ANCHOR id="gi-girepository.details" href="gi/gi-girepository.html#gi-girepository.details">
+<ANCHOR id="GICallbackInfo" href="gi/gi-girepository.html#GICallbackInfo">
+<ANCHOR id="GIRepository-struct" href="gi/gi-girepository.html#GIRepository-struct">
+<ANCHOR id="GIRepositoryError" href="gi/gi-girepository.html#GIRepositoryError">
+<ANCHOR id="G-IREPOSITORY-ERROR-TYPELIB-NOT-FOUND:CAPS" href="gi/gi-girepository.html#G-IREPOSITORY-ERROR-TYPELIB-NOT-FOUND:CAPS">
+<ANCHOR id="G-IREPOSITORY-ERROR-NAMESPACE-MISMATCH:CAPS" href="gi/gi-girepository.html#G-IREPOSITORY-ERROR-NAMESPACE-MISMATCH:CAPS">
+<ANCHOR id="G-IREPOSITORY-ERROR-NAMESPACE-VERSION-CONFLICT:CAPS" href="gi/gi-girepository.html#G-IREPOSITORY-ERROR-NAMESPACE-VERSION-CONFLICT:CAPS">
+<ANCHOR id="G-IREPOSITORY-ERROR-LIBRARY-NOT-FOUND:CAPS" href="gi/gi-girepository.html#G-IREPOSITORY-ERROR-LIBRARY-NOT-FOUND:CAPS">
+<ANCHOR id="GIRepositoryLoadFlags" href="gi/gi-girepository.html#GIRepositoryLoadFlags">
+<ANCHOR id="G-IREPOSITORY-LOAD-FLAG-LAZY:CAPS" href="gi/gi-girepository.html#G-IREPOSITORY-LOAD-FLAG-LAZY:CAPS">
+<ANCHOR id="GITypelib" href="gi/gi-girepository.html#GITypelib">
+<ANCHOR id="g-irepository-get-default" href="gi/gi-girepository.html#g-irepository-get-default">
+<ANCHOR id="g-irepository-prepend-search-path" href="gi/gi-girepository.html#g-irepository-prepend-search-path">
+<ANCHOR id="g-irepository-get-search-path" href="gi/gi-girepository.html#g-irepository-get-search-path">
+<ANCHOR id="g-irepository-load-typelib" href="gi/gi-girepository.html#g-irepository-load-typelib">
+<ANCHOR id="g-irepository-is-registered" href="gi/gi-girepository.html#g-irepository-is-registered">
+<ANCHOR id="g-irepository-find-by-name" href="gi/gi-girepository.html#g-irepository-find-by-name">
+<ANCHOR id="g-irepository-require" href="gi/gi-girepository.html#g-irepository-require">
+<ANCHOR id="g-irepository-require-private" href="gi/gi-girepository.html#g-irepository-require-private">
+<ANCHOR id="g-irepository-get-dependencies" href="gi/gi-girepository.html#g-irepository-get-dependencies">
+<ANCHOR id="g-irepository-get-loaded-namespaces" href="gi/gi-girepository.html#g-irepository-get-loaded-namespaces">
+<ANCHOR id="g-irepository-find-by-gtype" href="gi/gi-girepository.html#g-irepository-find-by-gtype">
+<ANCHOR id="g-irepository-get-n-infos" href="gi/gi-girepository.html#g-irepository-get-n-infos">
+<ANCHOR id="g-irepository-get-info" href="gi/gi-girepository.html#g-irepository-get-info">
+<ANCHOR id="g-irepository-get-typelib-path" href="gi/gi-girepository.html#g-irepository-get-typelib-path">
+<ANCHOR id="g-irepository-get-shared-library" href="gi/gi-girepository.html#g-irepository-get-shared-library">
+<ANCHOR id="g-irepository-get-version" href="gi/gi-girepository.html#g-irepository-get-version">
+<ANCHOR id="g-irepository-get-option-group" href="gi/gi-girepository.html#g-irepository-get-option-group">
+<ANCHOR id="g-irepository-get-c-prefix" href="gi/gi-girepository.html#g-irepository-get-c-prefix">
+<ANCHOR id="g-irepository-dump" href="gi/gi-girepository.html#g-irepository-dump">
+<ANCHOR id="g-irepository-enumerate-versions" href="gi/gi-girepository.html#g-irepository-enumerate-versions">
+<ANCHOR id="G-IREPOSITORY-ERROR:CAPS" href="gi/gi-girepository.html#G-IREPOSITORY-ERROR:CAPS">
+<ANCHOR id="g-typelib-new-from-memory" href="gi/gi-girepository.html#g-typelib-new-from-memory">
+<ANCHOR id="g-typelib-new-from-const-memory" href="gi/gi-girepository.html#g-typelib-new-from-const-memory">
+<ANCHOR id="g-typelib-new-from-mapped-file" href="gi/gi-girepository.html#g-typelib-new-from-mapped-file">
+<ANCHOR id="g-typelib-free" href="gi/gi-girepository.html#g-typelib-free">
+<ANCHOR id="g-typelib-symbol" href="gi/gi-girepository.html#g-typelib-symbol">
+<ANCHOR id="g-typelib-get-namespace" href="gi/gi-girepository.html#g-typelib-get-namespace">
+<ANCHOR id="gi-girffi" href="gi/gi-girffi.html">
+<ANCHOR id="gi-girffi.synopsis" href="gi/gi-girffi.html#gi-girffi.synopsis">
+<ANCHOR id="gi-girffi.description" href="gi/gi-girffi.html#gi-girffi.description">
+<ANCHOR id="gi-girffi.details" href="gi/gi-girffi.html#gi-girffi.details">
+<ANCHOR id="GIFFIClosureCallback" href="gi/gi-girffi.html#GIFFIClosureCallback">
+<ANCHOR id="GIFunctionInvoker" href="gi/gi-girffi.html#GIFunctionInvoker">
+<ANCHOR id="gi-cclosure-marshal-generic" href="gi/gi-girffi.html#gi-cclosure-marshal-generic">
+<ANCHOR id="g-type-info-get-ffi-type" href="gi/gi-girffi.html#g-type-info-get-ffi-type">
+<ANCHOR id="g-function-info-prep-invoker" href="gi/gi-girffi.html#g-function-info-prep-invoker">
+<ANCHOR id="g-function-invoker-destroy" href="gi/gi-girffi.html#g-function-invoker-destroy">
+<ANCHOR id="g-callable-info-prepare-closure" href="gi/gi-girffi.html#g-callable-info-prepare-closure">
+<ANCHOR id="g-callable-info-free-closure" href="gi/gi-girffi.html#g-callable-info-free-closure">
+<ANCHOR id="gi-struct-hierarchy" href="gi/gi-struct-hierarchy.html">
+<ANCHOR id="gi-struct-hierarchy.synopsis" href="gi/gi-struct-hierarchy.html#gi-struct-hierarchy.synopsis">
+<ANCHOR id="gi-GIBaseInfo" href="gi/gi-GIBaseInfo.html">
+<ANCHOR id="gi-GIBaseInfo.synopsis" href="gi/gi-GIBaseInfo.html#gi-GIBaseInfo.synopsis">
+<ANCHOR id="gi-GIBaseInfo.description" href="gi/gi-GIBaseInfo.html#gi-GIBaseInfo.description">
+<ANCHOR id="gi-gibaseinfo.struct-hierarchy" href="gi/gi-GIBaseInfo.html#gi-gibaseinfo.struct-hierarchy">
+<ANCHOR id="gi-GIBaseInfo.details" href="gi/gi-GIBaseInfo.html#gi-GIBaseInfo.details">
+<ANCHOR id="GIInfoType" href="gi/gi-GIBaseInfo.html#GIInfoType">
+<ANCHOR id="GI-INFO-TYPE-INVALID:CAPS" href="gi/gi-GIBaseInfo.html#GI-INFO-TYPE-INVALID:CAPS">
+<ANCHOR id="GI-INFO-TYPE-FUNCTION:CAPS" href="gi/gi-GIBaseInfo.html#GI-INFO-TYPE-FUNCTION:CAPS">
+<ANCHOR id="GI-INFO-TYPE-CALLBACK:CAPS" href="gi/gi-GIBaseInfo.html#GI-INFO-TYPE-CALLBACK:CAPS">
+<ANCHOR id="GI-INFO-TYPE-STRUCT:CAPS" href="gi/gi-GIBaseInfo.html#GI-INFO-TYPE-STRUCT:CAPS">
+<ANCHOR id="GI-INFO-TYPE-BOXED:CAPS" href="gi/gi-GIBaseInfo.html#GI-INFO-TYPE-BOXED:CAPS">
+<ANCHOR id="GI-INFO-TYPE-ENUM:CAPS" href="gi/gi-GIBaseInfo.html#GI-INFO-TYPE-ENUM:CAPS">
+<ANCHOR id="GI-INFO-TYPE-FLAGS:CAPS" href="gi/gi-GIBaseInfo.html#GI-INFO-TYPE-FLAGS:CAPS">
+<ANCHOR id="GI-INFO-TYPE-OBJECT:CAPS" href="gi/gi-GIBaseInfo.html#GI-INFO-TYPE-OBJECT:CAPS">
+<ANCHOR id="GI-INFO-TYPE-INTERFACE:CAPS" href="gi/gi-GIBaseInfo.html#GI-INFO-TYPE-INTERFACE:CAPS">
+<ANCHOR id="GI-INFO-TYPE-CONSTANT:CAPS" href="gi/gi-GIBaseInfo.html#GI-INFO-TYPE-CONSTANT:CAPS">
+<ANCHOR id="GI-INFO-TYPE-INVALID-0:CAPS" href="gi/gi-GIBaseInfo.html#GI-INFO-TYPE-INVALID-0:CAPS">
+<ANCHOR id="GI-INFO-TYPE-UNION:CAPS" href="gi/gi-GIBaseInfo.html#GI-INFO-TYPE-UNION:CAPS">
+<ANCHOR id="GI-INFO-TYPE-VALUE:CAPS" href="gi/gi-GIBaseInfo.html#GI-INFO-TYPE-VALUE:CAPS">
+<ANCHOR id="GI-INFO-TYPE-SIGNAL:CAPS" href="gi/gi-GIBaseInfo.html#GI-INFO-TYPE-SIGNAL:CAPS">
+<ANCHOR id="GI-INFO-TYPE-VFUNC:CAPS" href="gi/gi-GIBaseInfo.html#GI-INFO-TYPE-VFUNC:CAPS">
+<ANCHOR id="GI-INFO-TYPE-PROPERTY:CAPS" href="gi/gi-GIBaseInfo.html#GI-INFO-TYPE-PROPERTY:CAPS">
+<ANCHOR id="GI-INFO-TYPE-FIELD:CAPS" href="gi/gi-GIBaseInfo.html#GI-INFO-TYPE-FIELD:CAPS">
+<ANCHOR id="GI-INFO-TYPE-ARG:CAPS" href="gi/gi-GIBaseInfo.html#GI-INFO-TYPE-ARG:CAPS">
+<ANCHOR id="GI-INFO-TYPE-TYPE:CAPS" href="gi/gi-GIBaseInfo.html#GI-INFO-TYPE-TYPE:CAPS">
+<ANCHOR id="GI-INFO-TYPE-UNRESOLVED:CAPS" href="gi/gi-GIBaseInfo.html#GI-INFO-TYPE-UNRESOLVED:CAPS">
+<ANCHOR id="g-info-type-to-string" href="gi/gi-GIBaseInfo.html#g-info-type-to-string">
+<ANCHOR id="GIAttributeIter" href="gi/gi-GIBaseInfo.html#GIAttributeIter">
+<ANCHOR id="GIBaseInfo" href="gi/gi-GIBaseInfo.html#GIBaseInfo">
+<ANCHOR id="g-base-info-ref" href="gi/gi-GIBaseInfo.html#g-base-info-ref">
+<ANCHOR id="g-base-info-unref" href="gi/gi-GIBaseInfo.html#g-base-info-unref">
+<ANCHOR id="g-base-info-get-type" href="gi/gi-GIBaseInfo.html#g-base-info-get-type">
+<ANCHOR id="g-base-info-get-name" href="gi/gi-GIBaseInfo.html#g-base-info-get-name">
+<ANCHOR id="g-base-info-get-namespace" href="gi/gi-GIBaseInfo.html#g-base-info-get-namespace">
+<ANCHOR id="g-base-info-is-deprecated" href="gi/gi-GIBaseInfo.html#g-base-info-is-deprecated">
+<ANCHOR id="g-base-info-get-attribute" href="gi/gi-GIBaseInfo.html#g-base-info-get-attribute">
+<ANCHOR id="g-base-info-iterate-attributes" href="gi/gi-GIBaseInfo.html#g-base-info-iterate-attributes">
+<ANCHOR id="g-base-info-get-container" href="gi/gi-GIBaseInfo.html#g-base-info-get-container">
+<ANCHOR id="g-base-info-get-typelib" href="gi/gi-GIBaseInfo.html#g-base-info-get-typelib">
+<ANCHOR id="g-base-info-equal" href="gi/gi-GIBaseInfo.html#g-base-info-equal">
+<ANCHOR id="gi-GIFunctionInfo" href="gi/gi-GIFunctionInfo.html">
+<ANCHOR id="gi-GIFunctionInfo.synopsis" href="gi/gi-GIFunctionInfo.html#gi-GIFunctionInfo.synopsis">
+<ANCHOR id="gi-GIFunctionInfo.description" href="gi/gi-GIFunctionInfo.html#gi-GIFunctionInfo.description">
+<ANCHOR id="gi-gifunctioninfo.struct-hierarchy" href="gi/gi-GIFunctionInfo.html#gi-gifunctioninfo.struct-hierarchy">
+<ANCHOR id="gi-GIFunctionInfo.details" href="gi/gi-GIFunctionInfo.html#gi-GIFunctionInfo.details">
+<ANCHOR id="GI-IS-FUNCTION-INFO:CAPS" href="gi/gi-GIFunctionInfo.html#GI-IS-FUNCTION-INFO:CAPS">
+<ANCHOR id="GIFunctionInfo" href="gi/gi-GIFunctionInfo.html#GIFunctionInfo">
+<ANCHOR id="GInvokeError" href="gi/gi-GIFunctionInfo.html#GInvokeError">
+<ANCHOR id="G-INVOKE-ERROR-FAILED:CAPS" href="gi/gi-GIFunctionInfo.html#G-INVOKE-ERROR-FAILED:CAPS">
+<ANCHOR id="G-INVOKE-ERROR-SYMBOL-NOT-FOUND:CAPS" href="gi/gi-GIFunctionInfo.html#G-INVOKE-ERROR-SYMBOL-NOT-FOUND:CAPS">
+<ANCHOR id="G-INVOKE-ERROR-ARGUMENT-MISMATCH:CAPS" href="gi/gi-GIFunctionInfo.html#G-INVOKE-ERROR-ARGUMENT-MISMATCH:CAPS">
+<ANCHOR id="GIFunctionInfoFlags" href="gi/gi-GIFunctionInfo.html#GIFunctionInfoFlags">
+<ANCHOR id="GI-FUNCTION-IS-METHOD:CAPS" href="gi/gi-GIFunctionInfo.html#GI-FUNCTION-IS-METHOD:CAPS">
+<ANCHOR id="GI-FUNCTION-IS-CONSTRUCTOR:CAPS" href="gi/gi-GIFunctionInfo.html#GI-FUNCTION-IS-CONSTRUCTOR:CAPS">
+<ANCHOR id="GI-FUNCTION-IS-GETTER:CAPS" href="gi/gi-GIFunctionInfo.html#GI-FUNCTION-IS-GETTER:CAPS">
+<ANCHOR id="GI-FUNCTION-IS-SETTER:CAPS" href="gi/gi-GIFunctionInfo.html#GI-FUNCTION-IS-SETTER:CAPS">
+<ANCHOR id="GI-FUNCTION-WRAPS-VFUNC:CAPS" href="gi/gi-GIFunctionInfo.html#GI-FUNCTION-WRAPS-VFUNC:CAPS">
+<ANCHOR id="GI-FUNCTION-THROWS:CAPS" href="gi/gi-GIFunctionInfo.html#GI-FUNCTION-THROWS:CAPS">
+<ANCHOR id="G-INVOKE-ERROR:CAPS" href="gi/gi-GIFunctionInfo.html#G-INVOKE-ERROR:CAPS">
+<ANCHOR id="g-function-info-get-symbol" href="gi/gi-GIFunctionInfo.html#g-function-info-get-symbol">
+<ANCHOR id="g-function-info-get-flags" href="gi/gi-GIFunctionInfo.html#g-function-info-get-flags">
+<ANCHOR id="g-function-info-get-property" href="gi/gi-GIFunctionInfo.html#g-function-info-get-property">
+<ANCHOR id="g-function-info-get-vfunc" href="gi/gi-GIFunctionInfo.html#g-function-info-get-vfunc">
+<ANCHOR id="g-function-info-invoke" href="gi/gi-GIFunctionInfo.html#g-function-info-invoke">
+<ANCHOR id="gi-GICallableInfo" href="gi/gi-GICallableInfo.html">
+<ANCHOR id="gi-GICallableInfo.synopsis" href="gi/gi-GICallableInfo.html#gi-GICallableInfo.synopsis">
+<ANCHOR id="gi-GICallableInfo.description" href="gi/gi-GICallableInfo.html#gi-GICallableInfo.description">
+<ANCHOR id="gi-gicallableinfo.struct-hierarchy" href="gi/gi-GICallableInfo.html#gi-gicallableinfo.struct-hierarchy">
+<ANCHOR id="gi-GICallableInfo.details" href="gi/gi-GICallableInfo.html#gi-GICallableInfo.details">
+<ANCHOR id="GI-IS-CALLABLE-INFO:CAPS" href="gi/gi-GICallableInfo.html#GI-IS-CALLABLE-INFO:CAPS">
+<ANCHOR id="GICallableInfo" href="gi/gi-GICallableInfo.html#GICallableInfo">
+<ANCHOR id="g-callable-info-get-return-type" href="gi/gi-GICallableInfo.html#g-callable-info-get-return-type">
+<ANCHOR id="g-callable-info-get-caller-owns" href="gi/gi-GICallableInfo.html#g-callable-info-get-caller-owns">
+<ANCHOR id="g-callable-info-may-return-null" href="gi/gi-GICallableInfo.html#g-callable-info-may-return-null">
+<ANCHOR id="g-callable-info-get-return-attribute" href="gi/gi-GICallableInfo.html#g-callable-info-get-return-attribute">
+<ANCHOR id="g-callable-info-iterate-return-attributes" href="gi/gi-GICallableInfo.html#g-callable-info-iterate-return-attributes">
+<ANCHOR id="g-callable-info-get-n-args" href="gi/gi-GICallableInfo.html#g-callable-info-get-n-args">
+<ANCHOR id="g-callable-info-get-arg" href="gi/gi-GICallableInfo.html#g-callable-info-get-arg">
+<ANCHOR id="g-callable-info-load-arg" href="gi/gi-GICallableInfo.html#g-callable-info-load-arg">
+<ANCHOR id="g-callable-info-load-return-type" href="gi/gi-GICallableInfo.html#g-callable-info-load-return-type">
+<ANCHOR id="gi-GIArgInfo" href="gi/gi-GIArgInfo.html">
+<ANCHOR id="gi-GIArgInfo.synopsis" href="gi/gi-GIArgInfo.html#gi-GIArgInfo.synopsis">
+<ANCHOR id="gi-GIArgInfo.description" href="gi/gi-GIArgInfo.html#gi-GIArgInfo.description">
+<ANCHOR id="gi-giarginfo.struct-hierarchy" href="gi/gi-GIArgInfo.html#gi-giarginfo.struct-hierarchy">
+<ANCHOR id="gi-GIArgInfo.details" href="gi/gi-GIArgInfo.html#gi-GIArgInfo.details">
+<ANCHOR id="GI-IS-ARG-INFO:CAPS" href="gi/gi-GIArgInfo.html#GI-IS-ARG-INFO:CAPS">
+<ANCHOR id="GIArgInfo" href="gi/gi-GIArgInfo.html#GIArgInfo">
+<ANCHOR id="GIDirection" href="gi/gi-GIArgInfo.html#GIDirection">
+<ANCHOR id="GI-DIRECTION-IN:CAPS" href="gi/gi-GIArgInfo.html#GI-DIRECTION-IN:CAPS">
+<ANCHOR id="GI-DIRECTION-OUT:CAPS" href="gi/gi-GIArgInfo.html#GI-DIRECTION-OUT:CAPS">
+<ANCHOR id="GI-DIRECTION-INOUT:CAPS" href="gi/gi-GIArgInfo.html#GI-DIRECTION-INOUT:CAPS">
+<ANCHOR id="GIScopeType" href="gi/gi-GIArgInfo.html#GIScopeType">
+<ANCHOR id="GI-SCOPE-TYPE-INVALID:CAPS" href="gi/gi-GIArgInfo.html#GI-SCOPE-TYPE-INVALID:CAPS">
+<ANCHOR id="GI-SCOPE-TYPE-CALL:CAPS" href="gi/gi-GIArgInfo.html#GI-SCOPE-TYPE-CALL:CAPS">
+<ANCHOR id="GI-SCOPE-TYPE-ASYNC:CAPS" href="gi/gi-GIArgInfo.html#GI-SCOPE-TYPE-ASYNC:CAPS">
+<ANCHOR id="GI-SCOPE-TYPE-NOTIFIED:CAPS" href="gi/gi-GIArgInfo.html#GI-SCOPE-TYPE-NOTIFIED:CAPS">
+<ANCHOR id="GITransfer" href="gi/gi-GIArgInfo.html#GITransfer">
+<ANCHOR id="GI-TRANSFER-NOTHING:CAPS" href="gi/gi-GIArgInfo.html#GI-TRANSFER-NOTHING:CAPS">
+<ANCHOR id="GI-TRANSFER-CONTAINER:CAPS" href="gi/gi-GIArgInfo.html#GI-TRANSFER-CONTAINER:CAPS">
+<ANCHOR id="GI-TRANSFER-EVERYTHING:CAPS" href="gi/gi-GIArgInfo.html#GI-TRANSFER-EVERYTHING:CAPS">
+<ANCHOR id="g-arg-info-get-direction" href="gi/gi-GIArgInfo.html#g-arg-info-get-direction">
+<ANCHOR id="g-arg-info-is-caller-allocates" href="gi/gi-GIArgInfo.html#g-arg-info-is-caller-allocates">
+<ANCHOR id="g-arg-info-is-return-value" href="gi/gi-GIArgInfo.html#g-arg-info-is-return-value">
+<ANCHOR id="g-arg-info-is-optional" href="gi/gi-GIArgInfo.html#g-arg-info-is-optional">
+<ANCHOR id="g-arg-info-may-be-null" href="gi/gi-GIArgInfo.html#g-arg-info-may-be-null">
+<ANCHOR id="g-arg-info-get-ownership-transfer" href="gi/gi-GIArgInfo.html#g-arg-info-get-ownership-transfer">
+<ANCHOR id="g-arg-info-get-scope" href="gi/gi-GIArgInfo.html#g-arg-info-get-scope">
+<ANCHOR id="g-arg-info-get-closure" href="gi/gi-GIArgInfo.html#g-arg-info-get-closure">
+<ANCHOR id="g-arg-info-get-destroy" href="gi/gi-GIArgInfo.html#g-arg-info-get-destroy">
+<ANCHOR id="g-arg-info-get-type" href="gi/gi-GIArgInfo.html#g-arg-info-get-type">
+<ANCHOR id="g-arg-info-load-type" href="gi/gi-GIArgInfo.html#g-arg-info-load-type">
+<ANCHOR id="gi-GITypeInfo" href="gi/gi-GITypeInfo.html">
+<ANCHOR id="gi-GITypeInfo.synopsis" href="gi/gi-GITypeInfo.html#gi-GITypeInfo.synopsis">
+<ANCHOR id="gi-GITypeInfo.description" href="gi/gi-GITypeInfo.html#gi-GITypeInfo.description">
+<ANCHOR id="gi-gitypeinfo.struct-hierarchy" href="gi/gi-GITypeInfo.html#gi-gitypeinfo.struct-hierarchy">
+<ANCHOR id="gi-GITypeInfo.details" href="gi/gi-GITypeInfo.html#gi-GITypeInfo.details">
+<ANCHOR id="GI-IS-TYPE-INFO:CAPS" href="gi/gi-GITypeInfo.html#GI-IS-TYPE-INFO:CAPS">
+<ANCHOR id="GIArrayType" href="gi/gi-GITypeInfo.html#GIArrayType">
+<ANCHOR id="GI-ARRAY-TYPE-C:CAPS" href="gi/gi-GITypeInfo.html#GI-ARRAY-TYPE-C:CAPS">
+<ANCHOR id="GI-ARRAY-TYPE-ARRAY:CAPS" href="gi/gi-GITypeInfo.html#GI-ARRAY-TYPE-ARRAY:CAPS">
+<ANCHOR id="GI-ARRAY-TYPE-PTR-ARRAY:CAPS" href="gi/gi-GITypeInfo.html#GI-ARRAY-TYPE-PTR-ARRAY:CAPS">
+<ANCHOR id="GI-ARRAY-TYPE-BYTE-ARRAY:CAPS" href="gi/gi-GITypeInfo.html#GI-ARRAY-TYPE-BYTE-ARRAY:CAPS">
+<ANCHOR id="GITypeInfo" href="gi/gi-GITypeInfo.html#GITypeInfo">
+<ANCHOR id="GITypeTag" href="gi/gi-GITypeInfo.html#GITypeTag">
+<ANCHOR id="GI-TYPE-TAG-VOID:CAPS" href="gi/gi-GITypeInfo.html#GI-TYPE-TAG-VOID:CAPS">
+<ANCHOR id="GI-TYPE-TAG-BOOLEAN:CAPS" href="gi/gi-GITypeInfo.html#GI-TYPE-TAG-BOOLEAN:CAPS">
+<ANCHOR id="GI-TYPE-TAG-INT8:CAPS" href="gi/gi-GITypeInfo.html#GI-TYPE-TAG-INT8:CAPS">
+<ANCHOR id="GI-TYPE-TAG-UINT8:CAPS" href="gi/gi-GITypeInfo.html#GI-TYPE-TAG-UINT8:CAPS">
+<ANCHOR id="GI-TYPE-TAG-INT16:CAPS" href="gi/gi-GITypeInfo.html#GI-TYPE-TAG-INT16:CAPS">
+<ANCHOR id="GI-TYPE-TAG-UINT16:CAPS" href="gi/gi-GITypeInfo.html#GI-TYPE-TAG-UINT16:CAPS">
+<ANCHOR id="GI-TYPE-TAG-INT32:CAPS" href="gi/gi-GITypeInfo.html#GI-TYPE-TAG-INT32:CAPS">
+<ANCHOR id="GI-TYPE-TAG-UINT32:CAPS" href="gi/gi-GITypeInfo.html#GI-TYPE-TAG-UINT32:CAPS">
+<ANCHOR id="GI-TYPE-TAG-INT64:CAPS" href="gi/gi-GITypeInfo.html#GI-TYPE-TAG-INT64:CAPS">
+<ANCHOR id="GI-TYPE-TAG-UINT64:CAPS" href="gi/gi-GITypeInfo.html#GI-TYPE-TAG-UINT64:CAPS">
+<ANCHOR id="GI-TYPE-TAG-FLOAT:CAPS" href="gi/gi-GITypeInfo.html#GI-TYPE-TAG-FLOAT:CAPS">
+<ANCHOR id="GI-TYPE-TAG-DOUBLE:CAPS" href="gi/gi-GITypeInfo.html#GI-TYPE-TAG-DOUBLE:CAPS">
+<ANCHOR id="GI-TYPE-TAG-GTYPE:CAPS" href="gi/gi-GITypeInfo.html#GI-TYPE-TAG-GTYPE:CAPS">
+<ANCHOR id="GI-TYPE-TAG-UTF8:CAPS" href="gi/gi-GITypeInfo.html#GI-TYPE-TAG-UTF8:CAPS">
+<ANCHOR id="GI-TYPE-TAG-FILENAME:CAPS" href="gi/gi-GITypeInfo.html#GI-TYPE-TAG-FILENAME:CAPS">
+<ANCHOR id="GI-TYPE-TAG-ARRAY:CAPS" href="gi/gi-GITypeInfo.html#GI-TYPE-TAG-ARRAY:CAPS">
+<ANCHOR id="GI-TYPE-TAG-INTERFACE:CAPS" href="gi/gi-GITypeInfo.html#GI-TYPE-TAG-INTERFACE:CAPS">
+<ANCHOR id="GI-TYPE-TAG-GLIST:CAPS" href="gi/gi-GITypeInfo.html#GI-TYPE-TAG-GLIST:CAPS">
+<ANCHOR id="GI-TYPE-TAG-GSLIST:CAPS" href="gi/gi-GITypeInfo.html#GI-TYPE-TAG-GSLIST:CAPS">
+<ANCHOR id="GI-TYPE-TAG-GHASH:CAPS" href="gi/gi-GITypeInfo.html#GI-TYPE-TAG-GHASH:CAPS">
+<ANCHOR id="GI-TYPE-TAG-ERROR:CAPS" href="gi/gi-GITypeInfo.html#GI-TYPE-TAG-ERROR:CAPS">
+<ANCHOR id="GI-TYPE-TAG-UNICHAR:CAPS" href="gi/gi-GITypeInfo.html#GI-TYPE-TAG-UNICHAR:CAPS">
+<ANCHOR id="G-TYPE-TAG-IS-BASIC:CAPS" href="gi/gi-GITypeInfo.html#G-TYPE-TAG-IS-BASIC:CAPS">
+<ANCHOR id="g-type-tag-to-string" href="gi/gi-GITypeInfo.html#g-type-tag-to-string">
+<ANCHOR id="g-type-info-is-pointer" href="gi/gi-GITypeInfo.html#g-type-info-is-pointer">
+<ANCHOR id="g-type-info-get-tag" href="gi/gi-GITypeInfo.html#g-type-info-get-tag">
+<ANCHOR id="g-type-info-get-param-type" href="gi/gi-GITypeInfo.html#g-type-info-get-param-type">
+<ANCHOR id="g-type-info-get-interface" href="gi/gi-GITypeInfo.html#g-type-info-get-interface">
+<ANCHOR id="g-type-info-get-array-length" href="gi/gi-GITypeInfo.html#g-type-info-get-array-length">
+<ANCHOR id="g-type-info-get-array-fixed-size" href="gi/gi-GITypeInfo.html#g-type-info-get-array-fixed-size">
+<ANCHOR id="g-type-info-is-zero-terminated" href="gi/gi-GITypeInfo.html#g-type-info-is-zero-terminated">
+<ANCHOR id="g-type-info-get-array-type" href="gi/gi-GITypeInfo.html#g-type-info-get-array-type">
+<ANCHOR id="gi-GIStructInfo" href="gi/gi-GIStructInfo.html">
+<ANCHOR id="gi-GIStructInfo.synopsis" href="gi/gi-GIStructInfo.html#gi-GIStructInfo.synopsis">
+<ANCHOR id="gi-GIStructInfo.description" href="gi/gi-GIStructInfo.html#gi-GIStructInfo.description">
+<ANCHOR id="gi-giobjectinfo.struct-hierarchy" href="gi/gi-GIStructInfo.html#gi-giobjectinfo.struct-hierarchy">
+<ANCHOR id="gi-GIStructInfo.details" href="gi/gi-GIStructInfo.html#gi-GIStructInfo.details">
+<ANCHOR id="GI-IS-STRUCT-INFO:CAPS" href="gi/gi-GIStructInfo.html#GI-IS-STRUCT-INFO:CAPS">
+<ANCHOR id="GIStructInfo" href="gi/gi-GIStructInfo.html#GIStructInfo">
+<ANCHOR id="g-struct-info-get-n-fields" href="gi/gi-GIStructInfo.html#g-struct-info-get-n-fields">
+<ANCHOR id="g-struct-info-get-field" href="gi/gi-GIStructInfo.html#g-struct-info-get-field">
+<ANCHOR id="g-struct-info-get-n-methods" href="gi/gi-GIStructInfo.html#g-struct-info-get-n-methods">
+<ANCHOR id="g-struct-info-get-method" href="gi/gi-GIStructInfo.html#g-struct-info-get-method">
+<ANCHOR id="g-struct-info-find-method" href="gi/gi-GIStructInfo.html#g-struct-info-find-method">
+<ANCHOR id="g-struct-info-get-size" href="gi/gi-GIStructInfo.html#g-struct-info-get-size">
+<ANCHOR id="g-struct-info-get-alignment" href="gi/gi-GIStructInfo.html#g-struct-info-get-alignment">
+<ANCHOR id="g-struct-info-is-gtype-struct" href="gi/gi-GIStructInfo.html#g-struct-info-is-gtype-struct">
+<ANCHOR id="g-struct-info-is-foreign" href="gi/gi-GIStructInfo.html#g-struct-info-is-foreign">
+<ANCHOR id="gi-GIUnionInfo" href="gi/gi-GIUnionInfo.html">
+<ANCHOR id="gi-GIUnionInfo.synopsis" href="gi/gi-GIUnionInfo.html#gi-GIUnionInfo.synopsis">
+<ANCHOR id="gi-GIUnionInfo.description" href="gi/gi-GIUnionInfo.html#gi-GIUnionInfo.description">
+<ANCHOR id="gi-giobjectinfo.struct-hierarchy" href="gi/gi-GIUnionInfo.html#gi-giobjectinfo.struct-hierarchy">
+<ANCHOR id="gi-GIUnionInfo.details" href="gi/gi-GIUnionInfo.html#gi-GIUnionInfo.details">
+<ANCHOR id="GI-IS-UNION-INFO:CAPS" href="gi/gi-GIUnionInfo.html#GI-IS-UNION-INFO:CAPS">
+<ANCHOR id="GIUnionInfo" href="gi/gi-GIUnionInfo.html#GIUnionInfo">
+<ANCHOR id="g-union-info-get-n-fields" href="gi/gi-GIUnionInfo.html#g-union-info-get-n-fields">
+<ANCHOR id="g-union-info-get-field" href="gi/gi-GIUnionInfo.html#g-union-info-get-field">
+<ANCHOR id="g-union-info-get-n-methods" href="gi/gi-GIUnionInfo.html#g-union-info-get-n-methods">
+<ANCHOR id="g-union-info-get-method" href="gi/gi-GIUnionInfo.html#g-union-info-get-method">
+<ANCHOR id="g-union-info-is-discriminated" href="gi/gi-GIUnionInfo.html#g-union-info-is-discriminated">
+<ANCHOR id="g-union-info-get-discriminator-offset" href="gi/gi-GIUnionInfo.html#g-union-info-get-discriminator-offset">
+<ANCHOR id="g-union-info-get-discriminator-type" href="gi/gi-GIUnionInfo.html#g-union-info-get-discriminator-type">
+<ANCHOR id="g-union-info-get-discriminator" href="gi/gi-GIUnionInfo.html#g-union-info-get-discriminator">
+<ANCHOR id="g-union-info-find-method" href="gi/gi-GIUnionInfo.html#g-union-info-find-method">
+<ANCHOR id="g-union-info-get-size" href="gi/gi-GIUnionInfo.html#g-union-info-get-size">
+<ANCHOR id="g-union-info-get-alignment" href="gi/gi-GIUnionInfo.html#g-union-info-get-alignment">
+<ANCHOR id="gi-GIFieldInfo" href="gi/gi-GIFieldInfo.html">
+<ANCHOR id="gi-GIFieldInfo.synopsis" href="gi/gi-GIFieldInfo.html#gi-GIFieldInfo.synopsis">
+<ANCHOR id="gi-GIFieldInfo.description" href="gi/gi-GIFieldInfo.html#gi-GIFieldInfo.description">
+<ANCHOR id="gi-gifieldinfo.struct-hierarchy" href="gi/gi-GIFieldInfo.html#gi-gifieldinfo.struct-hierarchy">
+<ANCHOR id="gi-GIFieldInfo.details" href="gi/gi-GIFieldInfo.html#gi-GIFieldInfo.details">
+<ANCHOR id="GI-IS-FIELD-INFO:CAPS" href="gi/gi-GIFieldInfo.html#GI-IS-FIELD-INFO:CAPS">
+<ANCHOR id="GIFieldInfo" href="gi/gi-GIFieldInfo.html#GIFieldInfo">
+<ANCHOR id="GIFieldInfoFlags" href="gi/gi-GIFieldInfo.html#GIFieldInfoFlags">
+<ANCHOR id="GI-FIELD-IS-READABLE:CAPS" href="gi/gi-GIFieldInfo.html#GI-FIELD-IS-READABLE:CAPS">
+<ANCHOR id="GI-FIELD-IS-WRITABLE:CAPS" href="gi/gi-GIFieldInfo.html#GI-FIELD-IS-WRITABLE:CAPS">
+<ANCHOR id="g-field-info-get-flags" href="gi/gi-GIFieldInfo.html#g-field-info-get-flags">
+<ANCHOR id="g-field-info-get-size" href="gi/gi-GIFieldInfo.html#g-field-info-get-size">
+<ANCHOR id="g-field-info-get-offset" href="gi/gi-GIFieldInfo.html#g-field-info-get-offset">
+<ANCHOR id="g-field-info-get-type" href="gi/gi-GIFieldInfo.html#g-field-info-get-type">
+<ANCHOR id="g-field-info-get-field" href="gi/gi-GIFieldInfo.html#g-field-info-get-field">
+<ANCHOR id="g-field-info-set-field" href="gi/gi-GIFieldInfo.html#g-field-info-set-field">
+<ANCHOR id="gi-GIPropertyInfo" href="gi/gi-GIPropertyInfo.html">
+<ANCHOR id="gi-GIPropertyInfo.synopsis" href="gi/gi-GIPropertyInfo.html#gi-GIPropertyInfo.synopsis">
+<ANCHOR id="gi-GIPropertyInfo.description" href="gi/gi-GIPropertyInfo.html#gi-GIPropertyInfo.description">
+<ANCHOR id="gi-gipropertyinfo.struct-hierarchy" href="gi/gi-GIPropertyInfo.html#gi-gipropertyinfo.struct-hierarchy">
+<ANCHOR id="gi-GIPropertyInfo.details" href="gi/gi-GIPropertyInfo.html#gi-GIPropertyInfo.details">
+<ANCHOR id="GI-IS-PROPERTY-INFO:CAPS" href="gi/gi-GIPropertyInfo.html#GI-IS-PROPERTY-INFO:CAPS">
+<ANCHOR id="GIPropertyInfo" href="gi/gi-GIPropertyInfo.html#GIPropertyInfo">
+<ANCHOR id="g-property-info-get-flags" href="gi/gi-GIPropertyInfo.html#g-property-info-get-flags">
+<ANCHOR id="g-property-info-get-type" href="gi/gi-GIPropertyInfo.html#g-property-info-get-type">
+<ANCHOR id="g-property-info-get-ownership-transfer" href="gi/gi-GIPropertyInfo.html#g-property-info-get-ownership-transfer">
+<ANCHOR id="gi-GIVFuncInfo" href="gi/gi-GIVFuncInfo.html">
+<ANCHOR id="gi-GIVFuncInfo.synopsis" href="gi/gi-GIVFuncInfo.html#gi-GIVFuncInfo.synopsis">
+<ANCHOR id="gi-GIVFuncInfo.description" href="gi/gi-GIVFuncInfo.html#gi-GIVFuncInfo.description">
+<ANCHOR id="gi-givfuncinfo.struct-hierarchy" href="gi/gi-GIVFuncInfo.html#gi-givfuncinfo.struct-hierarchy">
+<ANCHOR id="gi-GIVFuncInfo.details" href="gi/gi-GIVFuncInfo.html#gi-GIVFuncInfo.details">
+<ANCHOR id="GI-IS-VFUNC-INFO:CAPS" href="gi/gi-GIVFuncInfo.html#GI-IS-VFUNC-INFO:CAPS">
+<ANCHOR id="GIVFuncInfo" href="gi/gi-GIVFuncInfo.html#GIVFuncInfo">
+<ANCHOR id="GIVFuncInfoFlags" href="gi/gi-GIVFuncInfo.html#GIVFuncInfoFlags">
+<ANCHOR id="GI-VFUNC-MUST-CHAIN-UP:CAPS" href="gi/gi-GIVFuncInfo.html#GI-VFUNC-MUST-CHAIN-UP:CAPS">
+<ANCHOR id="GI-VFUNC-MUST-OVERRIDE:CAPS" href="gi/gi-GIVFuncInfo.html#GI-VFUNC-MUST-OVERRIDE:CAPS">
+<ANCHOR id="GI-VFUNC-MUST-NOT-OVERRIDE:CAPS" href="gi/gi-GIVFuncInfo.html#GI-VFUNC-MUST-NOT-OVERRIDE:CAPS">
+<ANCHOR id="GI-VFUNC-THROWS:CAPS" href="gi/gi-GIVFuncInfo.html#GI-VFUNC-THROWS:CAPS">
+<ANCHOR id="g-vfunc-info-get-flags" href="gi/gi-GIVFuncInfo.html#g-vfunc-info-get-flags">
+<ANCHOR id="g-vfunc-info-get-offset" href="gi/gi-GIVFuncInfo.html#g-vfunc-info-get-offset">
+<ANCHOR id="g-vfunc-info-get-signal" href="gi/gi-GIVFuncInfo.html#g-vfunc-info-get-signal">
+<ANCHOR id="g-vfunc-info-get-invoker" href="gi/gi-GIVFuncInfo.html#g-vfunc-info-get-invoker">
+<ANCHOR id="gi-GISignalInfo" href="gi/gi-GISignalInfo.html">
+<ANCHOR id="gi-GISignalInfo.synopsis" href="gi/gi-GISignalInfo.html#gi-GISignalInfo.synopsis">
+<ANCHOR id="gi-GISignalInfo.description" href="gi/gi-GISignalInfo.html#gi-GISignalInfo.description">
+<ANCHOR id="gi-gisignalinfo.struct-hierarchy" href="gi/gi-GISignalInfo.html#gi-gisignalinfo.struct-hierarchy">
+<ANCHOR id="gi-GISignalInfo.details" href="gi/gi-GISignalInfo.html#gi-GISignalInfo.details">
+<ANCHOR id="GI-IS-SIGNAL-INFO:CAPS" href="gi/gi-GISignalInfo.html#GI-IS-SIGNAL-INFO:CAPS">
+<ANCHOR id="GISignalInfo" href="gi/gi-GISignalInfo.html#GISignalInfo">
+<ANCHOR id="g-signal-info-get-flags" href="gi/gi-GISignalInfo.html#g-signal-info-get-flags">
+<ANCHOR id="g-signal-info-get-class-closure" href="gi/gi-GISignalInfo.html#g-signal-info-get-class-closure">
+<ANCHOR id="g-signal-info-true-stops-emit" href="gi/gi-GISignalInfo.html#g-signal-info-true-stops-emit">
+<ANCHOR id="gi-GIEnumInfo" href="gi/gi-GIEnumInfo.html">
+<ANCHOR id="gi-GIEnumInfo.synopsis" href="gi/gi-GIEnumInfo.html#gi-GIEnumInfo.synopsis">
+<ANCHOR id="gi-GIEnumInfo.description" href="gi/gi-GIEnumInfo.html#gi-GIEnumInfo.description">
+<ANCHOR id="gi-gienuminfo.struct-hierarchy" href="gi/gi-GIEnumInfo.html#gi-gienuminfo.struct-hierarchy">
+<ANCHOR id="gi-GIEnumInfo.details" href="gi/gi-GIEnumInfo.html#gi-GIEnumInfo.details">
+<ANCHOR id="GI-IS-ENUM-INFO:CAPS" href="gi/gi-GIEnumInfo.html#GI-IS-ENUM-INFO:CAPS">
+<ANCHOR id="GI-IS-VALUE-INFO:CAPS" href="gi/gi-GIEnumInfo.html#GI-IS-VALUE-INFO:CAPS">
+<ANCHOR id="GIEnumInfo" href="gi/gi-GIEnumInfo.html#GIEnumInfo">
+<ANCHOR id="GIValueInfo" href="gi/gi-GIEnumInfo.html#GIValueInfo">
+<ANCHOR id="g-enum-info-get-n-values" href="gi/gi-GIEnumInfo.html#g-enum-info-get-n-values">
+<ANCHOR id="g-enum-info-get-value" href="gi/gi-GIEnumInfo.html#g-enum-info-get-value">
+<ANCHOR id="g-enum-info-get-n-methods" href="gi/gi-GIEnumInfo.html#g-enum-info-get-n-methods">
+<ANCHOR id="g-enum-info-get-method" href="gi/gi-GIEnumInfo.html#g-enum-info-get-method">
+<ANCHOR id="g-enum-info-get-storage-type" href="gi/gi-GIEnumInfo.html#g-enum-info-get-storage-type">
+<ANCHOR id="g-value-info-get-value" href="gi/gi-GIEnumInfo.html#g-value-info-get-value">
+<ANCHOR id="gi-GIRegisteredTypeInfo" href="gi/gi-GIRegisteredTypeInfo.html">
+<ANCHOR id="gi-GIRegisteredTypeInfo.synopsis" href="gi/gi-GIRegisteredTypeInfo.html#gi-GIRegisteredTypeInfo.synopsis">
+<ANCHOR id="gi-GIRegisteredTypeInfo.description" href="gi/gi-GIRegisteredTypeInfo.html#gi-GIRegisteredTypeInfo.description">
+<ANCHOR id="gi-giregisteredtypeinfo.struct-hierarchy" href="gi/gi-GIRegisteredTypeInfo.html#gi-giregisteredtypeinfo.struct-hierarchy">
+<ANCHOR id="gi-GIRegisteredTypeInfo.details" href="gi/gi-GIRegisteredTypeInfo.html#gi-GIRegisteredTypeInfo.details">
+<ANCHOR id="GI-IS-REGISTERED-TYPE-INFO:CAPS" href="gi/gi-GIRegisteredTypeInfo.html#GI-IS-REGISTERED-TYPE-INFO:CAPS">
+<ANCHOR id="GIRegisteredTypeInfo" href="gi/gi-GIRegisteredTypeInfo.html#GIRegisteredTypeInfo">
+<ANCHOR id="g-registered-type-info-get-type-name" href="gi/gi-GIRegisteredTypeInfo.html#g-registered-type-info-get-type-name">
+<ANCHOR id="g-registered-type-info-get-type-init" href="gi/gi-GIRegisteredTypeInfo.html#g-registered-type-info-get-type-init">
+<ANCHOR id="g-registered-type-info-get-g-type" href="gi/gi-GIRegisteredTypeInfo.html#g-registered-type-info-get-g-type">
+<ANCHOR id="gi-GIObjectInfo" href="gi/gi-GIObjectInfo.html">
+<ANCHOR id="gi-GIObjectInfo.synopsis" href="gi/gi-GIObjectInfo.html#gi-GIObjectInfo.synopsis">
+<ANCHOR id="gi-GIObjectInfo.description" href="gi/gi-GIObjectInfo.html#gi-GIObjectInfo.description">
+<ANCHOR id="gi-giobjectinfo.struct-hierarchy" href="gi/gi-GIObjectInfo.html#gi-giobjectinfo.struct-hierarchy">
+<ANCHOR id="gi-GIObjectInfo.details" href="gi/gi-GIObjectInfo.html#gi-GIObjectInfo.details">
+<ANCHOR id="GI-IS-OBJECT-INFO:CAPS" href="gi/gi-GIObjectInfo.html#GI-IS-OBJECT-INFO:CAPS">
+<ANCHOR id="GIObjectInfo" href="gi/gi-GIObjectInfo.html#GIObjectInfo">
+<ANCHOR id="GIObjectInfoGetValueFunction" href="gi/gi-GIObjectInfo.html#GIObjectInfoGetValueFunction">
+<ANCHOR id="GIObjectInfoRefFunction" href="gi/gi-GIObjectInfo.html#GIObjectInfoRefFunction">
+<ANCHOR id="GIObjectInfoSetValueFunction" href="gi/gi-GIObjectInfo.html#GIObjectInfoSetValueFunction">
+<ANCHOR id="GIObjectInfoUnrefFunction" href="gi/gi-GIObjectInfo.html#GIObjectInfoUnrefFunction">
+<ANCHOR id="g-object-info-get-type-name" href="gi/gi-GIObjectInfo.html#g-object-info-get-type-name">
+<ANCHOR id="g-object-info-get-type-init" href="gi/gi-GIObjectInfo.html#g-object-info-get-type-init">
+<ANCHOR id="g-object-info-get-abstract" href="gi/gi-GIObjectInfo.html#g-object-info-get-abstract">
+<ANCHOR id="g-object-info-get-fundamental" href="gi/gi-GIObjectInfo.html#g-object-info-get-fundamental">
+<ANCHOR id="g-object-info-get-parent" href="gi/gi-GIObjectInfo.html#g-object-info-get-parent">
+<ANCHOR id="g-object-info-get-n-interfaces" href="gi/gi-GIObjectInfo.html#g-object-info-get-n-interfaces">
+<ANCHOR id="g-object-info-get-interface" href="gi/gi-GIObjectInfo.html#g-object-info-get-interface">
+<ANCHOR id="g-object-info-get-n-fields" href="gi/gi-GIObjectInfo.html#g-object-info-get-n-fields">
+<ANCHOR id="g-object-info-get-field" href="gi/gi-GIObjectInfo.html#g-object-info-get-field">
+<ANCHOR id="g-object-info-get-n-properties" href="gi/gi-GIObjectInfo.html#g-object-info-get-n-properties">
+<ANCHOR id="g-object-info-get-property" href="gi/gi-GIObjectInfo.html#g-object-info-get-property">
+<ANCHOR id="g-object-info-get-n-methods" href="gi/gi-GIObjectInfo.html#g-object-info-get-n-methods">
+<ANCHOR id="g-object-info-get-method" href="gi/gi-GIObjectInfo.html#g-object-info-get-method">
+<ANCHOR id="g-object-info-find-method" href="gi/gi-GIObjectInfo.html#g-object-info-find-method">
+<ANCHOR id="g-object-info-get-n-signals" href="gi/gi-GIObjectInfo.html#g-object-info-get-n-signals">
+<ANCHOR id="g-object-info-get-signal" href="gi/gi-GIObjectInfo.html#g-object-info-get-signal">
+<ANCHOR id="g-object-info-get-n-vfuncs" href="gi/gi-GIObjectInfo.html#g-object-info-get-n-vfuncs">
+<ANCHOR id="g-object-info-get-vfunc" href="gi/gi-GIObjectInfo.html#g-object-info-get-vfunc">
+<ANCHOR id="g-object-info-get-n-constants" href="gi/gi-GIObjectInfo.html#g-object-info-get-n-constants">
+<ANCHOR id="g-object-info-get-constant" href="gi/gi-GIObjectInfo.html#g-object-info-get-constant">
+<ANCHOR id="g-object-info-get-class-struct" href="gi/gi-GIObjectInfo.html#g-object-info-get-class-struct">
+<ANCHOR id="g-object-info-find-vfunc" href="gi/gi-GIObjectInfo.html#g-object-info-find-vfunc">
+<ANCHOR id="g-object-info-get-unref-function" href="gi/gi-GIObjectInfo.html#g-object-info-get-unref-function">
+<ANCHOR id="g-object-info-get-unref-function-pointer" href="gi/gi-GIObjectInfo.html#g-object-info-get-unref-function-pointer">
+<ANCHOR id="g-object-info-get-ref-function" href="gi/gi-GIObjectInfo.html#g-object-info-get-ref-function">
+<ANCHOR id="g-object-info-get-ref-function-pointer" href="gi/gi-GIObjectInfo.html#g-object-info-get-ref-function-pointer">
+<ANCHOR id="g-object-info-get-set-value-function" href="gi/gi-GIObjectInfo.html#g-object-info-get-set-value-function">
+<ANCHOR id="g-object-info-get-set-value-function-pointer" href="gi/gi-GIObjectInfo.html#g-object-info-get-set-value-function-pointer">
+<ANCHOR id="g-object-info-get-get-value-function" href="gi/gi-GIObjectInfo.html#g-object-info-get-get-value-function">
+<ANCHOR id="g-object-info-get-get-value-function-pointer" href="gi/gi-GIObjectInfo.html#g-object-info-get-get-value-function-pointer">
+<ANCHOR id="gi-GIInterfaceInfo" href="gi/gi-GIInterfaceInfo.html">
+<ANCHOR id="gi-GIInterfaceInfo.synopsis" href="gi/gi-GIInterfaceInfo.html#gi-GIInterfaceInfo.synopsis">
+<ANCHOR id="gi-GIInterfaceInfo.description" href="gi/gi-GIInterfaceInfo.html#gi-GIInterfaceInfo.description">
+<ANCHOR id="gi-giinterfaceinfo.struct-hierarchy" href="gi/gi-GIInterfaceInfo.html#gi-giinterfaceinfo.struct-hierarchy">
+<ANCHOR id="gi-GIInterfaceInfo.details" href="gi/gi-GIInterfaceInfo.html#gi-GIInterfaceInfo.details">
+<ANCHOR id="GI-IS-INTERFACE-INFO:CAPS" href="gi/gi-GIInterfaceInfo.html#GI-IS-INTERFACE-INFO:CAPS">
+<ANCHOR id="GIInterfaceInfo" href="gi/gi-GIInterfaceInfo.html#GIInterfaceInfo">
+<ANCHOR id="g-interface-info-get-n-prerequisites" href="gi/gi-GIInterfaceInfo.html#g-interface-info-get-n-prerequisites">
+<ANCHOR id="g-interface-info-get-prerequisite" href="gi/gi-GIInterfaceInfo.html#g-interface-info-get-prerequisite">
+<ANCHOR id="g-interface-info-get-n-properties" href="gi/gi-GIInterfaceInfo.html#g-interface-info-get-n-properties">
+<ANCHOR id="g-interface-info-get-property" href="gi/gi-GIInterfaceInfo.html#g-interface-info-get-property">
+<ANCHOR id="g-interface-info-get-n-methods" href="gi/gi-GIInterfaceInfo.html#g-interface-info-get-n-methods">
+<ANCHOR id="g-interface-info-get-method" href="gi/gi-GIInterfaceInfo.html#g-interface-info-get-method">
+<ANCHOR id="g-interface-info-find-method" href="gi/gi-GIInterfaceInfo.html#g-interface-info-find-method">
+<ANCHOR id="g-interface-info-get-n-signals" href="gi/gi-GIInterfaceInfo.html#g-interface-info-get-n-signals">
+<ANCHOR id="g-interface-info-get-signal" href="gi/gi-GIInterfaceInfo.html#g-interface-info-get-signal">
+<ANCHOR id="g-interface-info-get-n-vfuncs" href="gi/gi-GIInterfaceInfo.html#g-interface-info-get-n-vfuncs">
+<ANCHOR id="g-interface-info-get-vfunc" href="gi/gi-GIInterfaceInfo.html#g-interface-info-get-vfunc">
+<ANCHOR id="g-interface-info-get-n-constants" href="gi/gi-GIInterfaceInfo.html#g-interface-info-get-n-constants">
+<ANCHOR id="g-interface-info-get-constant" href="gi/gi-GIInterfaceInfo.html#g-interface-info-get-constant">
+<ANCHOR id="g-interface-info-get-iface-struct" href="gi/gi-GIInterfaceInfo.html#g-interface-info-get-iface-struct">
+<ANCHOR id="g-interface-info-find-vfunc" href="gi/gi-GIInterfaceInfo.html#g-interface-info-find-vfunc">
+<ANCHOR id="gi-GIConstantInfo" href="gi/gi-GIConstantInfo.html">
+<ANCHOR id="gi-GIConstantInfo.synopsis" href="gi/gi-GIConstantInfo.html#gi-GIConstantInfo.synopsis">
+<ANCHOR id="gi-GIConstantInfo.description" href="gi/gi-GIConstantInfo.html#gi-GIConstantInfo.description">
+<ANCHOR id="gi-giconstantinfo.struct-hierarchy" href="gi/gi-GIConstantInfo.html#gi-giconstantinfo.struct-hierarchy">
+<ANCHOR id="gi-GIConstantInfo.details" href="gi/gi-GIConstantInfo.html#gi-GIConstantInfo.details">
+<ANCHOR id="GI-IS-CONSTANT-INFO:CAPS" href="gi/gi-GIConstantInfo.html#GI-IS-CONSTANT-INFO:CAPS">
+<ANCHOR id="GIConstantInfo" href="gi/gi-GIConstantInfo.html#GIConstantInfo">
+<ANCHOR id="g-constant-info-get-type" href="gi/gi-GIConstantInfo.html#g-constant-info-get-type">
+<ANCHOR id="g-constant-info-get-value" href="gi/gi-GIConstantInfo.html#g-constant-info-get-value">
+<ANCHOR id="gi-gierrordomaininfo" href="gi/gi-gierrordomaininfo.html">
+<ANCHOR id="gi-gierrordomaininfo.synopsis" href="gi/gi-gierrordomaininfo.html#gi-gierrordomaininfo.synopsis">
+<ANCHOR id="gi-gierrordomaininfo.description" href="gi/gi-gierrordomaininfo.html#gi-gierrordomaininfo.description">
+<ANCHOR id="gi-gierrordomaininfo.details" href="gi/gi-gierrordomaininfo.html#gi-gierrordomaininfo.details">
+<ANCHOR id="gi-gir-api" href="gi/gi-gir-reference.html#gi-gir-api">
+<ANCHOR id="gi-gir-namespace" href="gi/gi-gir-reference.html#gi-gir-namespace">
+<ANCHOR id="gi-gir-class" href="gi/gi-gir-reference.html#gi-gir-class">
+<ANCHOR id="gi-gir-interface" href="gi/gi-gir-reference.html#gi-gir-interface">
+<ANCHOR id="gi-gir-function" href="gi/gi-gir-reference.html#gi-gir-function">
+<ANCHOR id="gi-gtypelib" href="gi/gi-gtypelib.html">
+<ANCHOR id="gi-gtypelib.stability-level" href="gi/gi-gtypelib.html#gi-gtypelib.stability-level">
+<ANCHOR id="gi-gtypelib.synopsis" href="gi/gi-gtypelib.html#gi-gtypelib.synopsis">
+<ANCHOR id="gi-gtypelib.description" href="gi/gi-gtypelib.html#gi-gtypelib.description">
+<ANCHOR id="gi-gtypelib.details" href="gi/gi-gtypelib.html#gi-gtypelib.details">
+<ANCHOR id="G-IR-MAGIC:CAPS" href="gi/gi-gtypelib.html#G-IR-MAGIC:CAPS">
+<ANCHOR id="GTypelibBlobType" href="gi/gi-gtypelib.html#GTypelibBlobType">
+<ANCHOR id="BLOB-TYPE-INVALID:CAPS" href="gi/gi-gtypelib.html#BLOB-TYPE-INVALID:CAPS">
+<ANCHOR id="BLOB-TYPE-FUNCTION:CAPS" href="gi/gi-gtypelib.html#BLOB-TYPE-FUNCTION:CAPS">
+<ANCHOR id="BLOB-TYPE-CALLBACK:CAPS" href="gi/gi-gtypelib.html#BLOB-TYPE-CALLBACK:CAPS">
+<ANCHOR id="BLOB-TYPE-STRUCT:CAPS" href="gi/gi-gtypelib.html#BLOB-TYPE-STRUCT:CAPS">
+<ANCHOR id="BLOB-TYPE-BOXED:CAPS" href="gi/gi-gtypelib.html#BLOB-TYPE-BOXED:CAPS">
+<ANCHOR id="BLOB-TYPE-ENUM:CAPS" href="gi/gi-gtypelib.html#BLOB-TYPE-ENUM:CAPS">
+<ANCHOR id="BLOB-TYPE-FLAGS:CAPS" href="gi/gi-gtypelib.html#BLOB-TYPE-FLAGS:CAPS">
+<ANCHOR id="BLOB-TYPE-OBJECT:CAPS" href="gi/gi-gtypelib.html#BLOB-TYPE-OBJECT:CAPS">
+<ANCHOR id="BLOB-TYPE-INTERFACE:CAPS" href="gi/gi-gtypelib.html#BLOB-TYPE-INTERFACE:CAPS">
+<ANCHOR id="BLOB-TYPE-CONSTANT:CAPS" href="gi/gi-gtypelib.html#BLOB-TYPE-CONSTANT:CAPS">
+<ANCHOR id="BLOB-TYPE-INVALID-0:CAPS" href="gi/gi-gtypelib.html#BLOB-TYPE-INVALID-0:CAPS">
+<ANCHOR id="BLOB-TYPE-UNION:CAPS" href="gi/gi-gtypelib.html#BLOB-TYPE-UNION:CAPS">
+<ANCHOR id="Header" href="gi/gi-gtypelib.html#Header">
+<ANCHOR id="DirEntry" href="gi/gi-gtypelib.html#DirEntry">
+<ANCHOR id="ArgBlob" href="gi/gi-gtypelib.html#ArgBlob">
+<ANCHOR id="SignatureBlob" href="gi/gi-gtypelib.html#SignatureBlob">
+<ANCHOR id="CommonBlob" href="gi/gi-gtypelib.html#CommonBlob">
+<ANCHOR id="FunctionBlob" href="gi/gi-gtypelib.html#FunctionBlob">
+<ANCHOR id="CallbackBlob" href="gi/gi-gtypelib.html#CallbackBlob">
+<ANCHOR id="InterfaceTypeBlob" href="gi/gi-gtypelib.html#InterfaceTypeBlob">
+<ANCHOR id="ParamTypeBlob" href="gi/gi-gtypelib.html#ParamTypeBlob">
+<ANCHOR id="ErrorTypeBlob" href="gi/gi-gtypelib.html#ErrorTypeBlob">
+<ANCHOR id="ValueBlob" href="gi/gi-gtypelib.html#ValueBlob">
+<ANCHOR id="FieldBlob" href="gi/gi-gtypelib.html#FieldBlob">
+<ANCHOR id="RegisteredTypeBlob" href="gi/gi-gtypelib.html#RegisteredTypeBlob">
+<ANCHOR id="StructBlob" href="gi/gi-gtypelib.html#StructBlob">
+<ANCHOR id="UnionBlob" href="gi/gi-gtypelib.html#UnionBlob">
+<ANCHOR id="EnumBlob" href="gi/gi-gtypelib.html#EnumBlob">
+<ANCHOR id="PropertyBlob" href="gi/gi-gtypelib.html#PropertyBlob">
+<ANCHOR id="SignalBlob" href="gi/gi-gtypelib.html#SignalBlob">
+<ANCHOR id="VFuncBlob" href="gi/gi-gtypelib.html#VFuncBlob">
+<ANCHOR id="ObjectBlob" href="gi/gi-gtypelib.html#ObjectBlob">
+<ANCHOR id="InterfaceBlob" href="gi/gi-gtypelib.html#InterfaceBlob">
+<ANCHOR id="ConstantBlob" href="gi/gi-gtypelib.html#ConstantBlob">
+<ANCHOR id="AttributeBlob" href="gi/gi-gtypelib.html#AttributeBlob">
+<ANCHOR id="g-typelib-get-dir-entry" href="gi/gi-gtypelib.html#g-typelib-get-dir-entry">
+<ANCHOR id="g-typelib-check-sanity" href="gi/gi-gtypelib.html#g-typelib-check-sanity">
+<ANCHOR id="g-typelib-get-string" href="gi/gi-gtypelib.html#g-typelib-get-string">
+<ANCHOR id="G-TYPELIB-ERROR:CAPS" href="gi/gi-gtypelib.html#G-TYPELIB-ERROR:CAPS">
+<ANCHOR id="g-typelib-validate" href="gi/gi-gtypelib.html#g-typelib-validate">
+<ANCHOR id="BLOB-IS-REGISTERED-TYPE:CAPS" href="gi/gi-gtypelib.html#BLOB-IS-REGISTERED-TYPE:CAPS">
+<ANCHOR id="annotation-glossterm-out caller-allocates" href="gi/annotation-glossary.html#annotation-glossterm-out caller-allocates">
+<ANCHOR id="annotation-glossterm-out" href="gi/annotation-glossary.html#annotation-glossterm-out">
+<ANCHOR id="annotation-glossterm-allow-none" href="gi/annotation-glossary.html#annotation-glossterm-allow-none">
+<ANCHOR id="annotation-glossterm-element-type" href="gi/annotation-glossary.html#annotation-glossterm-element-type">
+<ANCHOR id="annotation-glossterm-transfer full" href="gi/annotation-glossary.html#annotation-glossterm-transfer full">
+<ANCHOR id="annotation-glossterm-transfer none" href="gi/annotation-glossary.html#annotation-glossterm-transfer none">
diff --git a/docs/reference/html/left.png b/docs/reference/html/left.png
new file mode 100644 (file)
index 0000000..2d05b3d
Binary files /dev/null and b/docs/reference/html/left.png differ
diff --git a/docs/reference/html/overview.png b/docs/reference/html/overview.png
new file mode 100644 (file)
index 0000000..b4a12bd
Binary files /dev/null and b/docs/reference/html/overview.png differ
diff --git a/docs/reference/html/right.png b/docs/reference/html/right.png
new file mode 100644 (file)
index 0000000..92832e3
Binary files /dev/null and b/docs/reference/html/right.png differ
diff --git a/docs/reference/html/style.css b/docs/reference/html/style.css
new file mode 100644 (file)
index 0000000..d6f6c26
--- /dev/null
@@ -0,0 +1,266 @@
+.synopsis, .classsynopsis
+{
+  /* tango:aluminium 1/2 */
+  background: #eeeeec;
+  border: solid 1px #d3d7cf;
+  padding: 0.5em;
+}
+.programlisting
+{
+  /* tango:sky blue 0/1 */
+  background: #e6f3ff;
+  border: solid 1px #729fcf;
+  padding: 0.5em;
+}
+.variablelist
+{
+  padding: 4px;
+  margin-left: 3em;
+}
+.variablelist td:first-child
+{
+  vertical-align: top;
+}
+
+@media screen {
+  sup a.footnote
+  {
+    position: relative;
+    top: 0em ! important;
+    
+  }
+  /* this is needed so that the local anchors are displayed below the naviagtion */
+  div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name]
+  {
+    display: inline-block;
+    position: relative;
+    top:-5em;
+  }
+  /* this seems to be a bug in the xsl style sheets when generating indexes */
+  div.index div.index
+  {
+    top: 0em;
+  }
+  /* make space for the fixed navigation bar and add space at the bottom so that
+   * link targets appear somewhat close to top
+   */
+  body
+  {
+    padding-top: 3.2em;
+    padding-bottom: 20em;
+  }
+  /* style and size the navigation bar */
+  table.navigation#top
+  {
+    position: fixed;
+    /* tango:scarlet red 0/1 */
+    background: #ffe6e6;
+    border: solid 1px #ef2929;
+    margin-top: 0;
+    margin-bottom: 0;
+    top: 0;
+    left: 0;
+    height: 3em;
+    z-index: 10;
+  }
+  .navigation a, .navigation a:visited
+  {
+    /* tango:scarlet red 3 */
+    color: #a40000;
+  }
+  .navigation a:hover
+  {
+    /* tango:scarlet red 1 */
+    color: #ef2929;
+  }
+  td.shortcuts
+  {
+    /* tango:scarlet red 1 */
+    color: #ef2929;
+    font-size: 80%;
+    white-space: nowrap;
+  }
+}
+@media print {
+  table.navigation {
+    visibility: collapse;
+    display: none;
+  }
+  div.titlepage table.navigation {
+    visibility: visible;
+    display: table;
+    /* tango:scarlet red 0/1 */
+    background: #ffe6e6;
+    border: solid 1px #ef2929;
+    margin-top: 0;
+    margin-bottom: 0;
+    top: 0;
+    left: 0;
+    height: 3em;
+  }
+}
+
+.navigation .title
+{
+  font-size: 200%;
+}
+
+div.gallery-float
+{
+  float: left;
+  padding: 10px;
+}
+div.gallery-float img
+{
+  border-style: none;
+}
+div.gallery-spacer
+{
+  clear: both;
+}
+
+a, a:visited
+{
+  text-decoration: none;
+  /* tango:sky blue 2 */
+  color: #3465a4;
+}
+a:hover
+{
+  text-decoration: underline;
+  /* tango:sky blue 1 */
+  color: #729fcf;
+}
+
+div.table table
+{
+  border-collapse: collapse;
+  border-spacing: 0px;
+  /* tango:aluminium 3 */
+  border: solid 1px #babdb6;
+}
+
+div.table table td, div.table table th
+{
+  /* tango:aluminium 3 */
+  border: solid 1px #babdb6;
+  padding: 3px;
+  vertical-align: top;
+}
+
+div.table table th
+{
+  /* tango:aluminium 2 */
+  background-color: #d3d7cf;
+}
+
+hr
+{
+  /* tango:aluminium 3 */
+  color: #babdb6;
+  background: #babdb6;
+  border: none 0px;
+  height: 1px;
+  clear: both;
+}
+
+.footer
+{
+  padding-top: 3.5em;
+  /* tango:aluminium 3 */
+  color: #babdb6;
+  text-align: center;
+  font-size: 80%;
+}
+
+.warning
+{
+  /* tango:orange 0/1 */
+  background: #ffeed9;
+  border-color: #ffb04f;
+}
+.note
+{
+  /* tango:chameleon 0/0.5 */
+  background: #d8ffb2;
+  border-color: #abf562;
+}
+.note, .warning
+{
+  padding: 0.5em;
+  border-width: 1px;
+  border-style: solid;
+}
+.note h3, .warning h3
+{
+  margin-top: 0.0em
+}
+.note p, .warning p
+{
+  margin-bottom: 0.0em
+}
+
+/* blob links */
+h2 .extralinks, h3 .extralinks
+{
+  float: right;
+  /* tango:aluminium 3 */
+  color: #babdb6;
+  font-size: 80%;
+  font-weight: normal;
+}
+
+.annotation
+{
+  /* tango:aluminium 5 */
+  color: #555753;
+  font-size: 80%;
+  font-weight: normal;
+}
+
+/* code listings */
+
+.listing_code .programlisting .cbracket   { color: #a40000; } /* tango: scarlet red 3 */
+.listing_code .programlisting .comment    { color: #a1a39d; } /* tango: aluminium 4 */
+.listing_code .programlisting .function   { color: #000000; font-weight: bold; }
+.listing_code .programlisting .function a { color: #11326b; font-weight: bold; } /* tango: sky blue 4 */
+.listing_code .programlisting .keyword    { color: #4e9a06; } /* tango: chameleon 3  */
+.listing_code .programlisting .linenum    { color: #babdb6; } /* tango: aluminium 3 */
+.listing_code .programlisting .normal     { color: #000000; }
+.listing_code .programlisting .number     { color: #75507b; } /* tango: plum 2 */
+.listing_code .programlisting .preproc    { color: #204a87; } /* tango: sky blue 3  */
+.listing_code .programlisting .string     { color: #c17d11; } /* tango: chocolate 2 */
+.listing_code .programlisting .type       { color: #000000; }
+.listing_code .programlisting .type a     { color: #11326b; } /* tango: sky blue 4 */
+.listing_code .programlisting .symbol     { color: #ce5c00; } /* tango: orange 3 */
+
+.listing_frame {
+  /* tango:sky blue 1 */
+  border: solid 1px #729fcf;
+  padding: 0px;
+}
+
+.listing_lines, .listing_code {
+  margin-top: 0px;
+  margin-bottom: 0px;
+  padding: 0.5em;
+}
+.listing_lines {
+  /* tango:sky blue 0.5 */
+  background: #a6c5e3;
+  /* tango:aluminium 6 */
+  color: #2e3436;
+}
+.listing_code {
+  /* tango:sky blue 0 */
+  background: #e6f3ff;
+}
+.listing_code .programlisting {
+  /* override from previous */
+  border: none 0px;
+  padding: 0px;
+}
+.listing_lines pre, .listing_code pre {
+  margin: 0px;
+}
+
diff --git a/docs/reference/html/up.png b/docs/reference/html/up.png
new file mode 100644 (file)
index 0000000..85b3e2a
Binary files /dev/null and b/docs/reference/html/up.png differ
diff --git a/docs/reference/images/overview.png b/docs/reference/images/overview.png
new file mode 100644 (file)
index 0000000..b4a12bd
Binary files /dev/null and b/docs/reference/images/overview.png differ
diff --git a/docs/reference/version.xml.in b/docs/reference/version.xml.in
new file mode 100644 (file)
index 0000000..d1cc3c7
--- /dev/null
@@ -0,0 +1,2 @@
+@GOBJECT_INTROSPECTION_VERSION@
+@GOBJECT_INTROSPECTION_VERSION@
diff --git a/examples/glib-print.c b/examples/glib-print.c
new file mode 100644 (file)
index 0000000..f187f76
--- /dev/null
@@ -0,0 +1,46 @@
+#include <girepository.h>
+
+int main(void)
+{
+    GIRepository *repository;
+    GError *error = NULL;
+    GIBaseInfo *base_info;
+    GIArgument in_args[5];
+    GIArgument retval;
+
+    g_type_init();
+
+    repository = g_irepository_get_default();
+    g_irepository_require(repository, "GLib", "2.0", 0, &error);
+    if (error) {
+      g_error("ERROR: %s\n", error->message);
+      return 1;
+    }
+
+    base_info = g_irepository_find_by_name(repository, "GLib", "assertion_message");
+    if (!base_info) {
+      g_error("ERROR: %s\n", "Could not find GLib.warn_message");
+      return 1;
+    }
+
+    in_args[0].v_pointer = "domain";
+    in_args[1].v_pointer = "glib-print.c";
+    in_args[2].v_pointer = "30";
+    in_args[3].v_pointer = "main";
+    in_args[4].v_pointer = "hello world";
+
+    if (!g_function_info_invoke ((GIFunctionInfo *)base_info,
+                                 (const GIArgument*)&in_args,
+                                 5,
+                                 NULL,
+                                 0,
+                                 &retval,
+                                 &error)) {
+      g_error("ERROR: %s\n", error->message);
+      return 1;
+    }
+
+    g_base_info_unref (base_info);
+
+    return 0;
+}
diff --git a/gir/DBus-1.0.gir b/gir/DBus-1.0.gir
new file mode 100644 (file)
index 0000000..4ce0309
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<repository version="1.2"
+            xmlns="http://www.gtk.org/introspection/core/1.0"
+            xmlns:c="http://www.gtk.org/introspection/c/1.0"
+            xmlns:glib="http://www.gtk.org/introspection/glib/1.0"
+           c:identifier-prefixes="DBus"
+           c:symbol-prefixes="DBus">
+  <package name="dbus-1"/>
+  <namespace name="DBus"
+             version="1.0"
+             c:prefix="DBus">
+    <enumeration name="BusType" c:type="DBusBusType">
+      <member name="session" value="0" c:identifier="DBUS_BUS_SESSION"/>
+      <member name="system" value="1" c:identifier="DBUS_BUS_SYSTEM"/>
+      <member name="starter" value="2" c:identifier="DBUS_BUS_STARTER"/>
+    </enumeration>
+    <record name="Connection"
+            c:type="DBusConnection"
+            glib:type-name="DBusConnection"
+            glib:get-type="dbus_connection_get_type">
+    </record>
+    <record name="Error" c:type="DBusError">
+    </record>
+    <record name="Message"
+            c:type="DBusMessage">
+    </record>
+    <record name="MessageIter" c:type="DBusMessageIter">
+    </record>
+    <record name="PendingCall" c:type="DBusPendingCall">
+    </record>
+  </namespace>
+</repository>
diff --git a/gir/DBusGLib-1.0.gir b/gir/DBusGLib-1.0.gir
new file mode 100644 (file)
index 0000000..ff61931
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<repository version="1.2"
+            xmlns="http://www.gtk.org/introspection/core/1.0"
+            xmlns:c="http://www.gtk.org/introspection/c/1.0"
+           xmlns:glib="http://www.gtk.org/introspection/glib/1.0"
+           c:identifier-prefixes="DBus"
+           c:symbol-prefixes="DBus">
+  <include name="GObject" version="2.0"/>
+  <package name="dbus-glib-1"/>
+  <namespace name="DBusGLib" version="1.0" c:prefix="DBusG">
+    <record name="Connection" c:type="DBusGConnection"/>
+    <record name="MethodInvocation" c:type="DBusGMethodInvocation"/>
+    <class name="Proxy" c:type="DBusGProxy" parent="GObject.Object"
+      glib:type-name="DBusGProxy" glib:get-type="dbus_g_proxy_get_type">
+    </class>
+    <record name="ProxyClass" c:type="DBusGProxyClass"/>
+  </namespace>
+</repository>
diff --git a/gir/GL-1.0.gir b/gir/GL-1.0.gir
new file mode 100644 (file)
index 0000000..f93100a
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<repository version="1.2"
+            xmlns="http://www.gtk.org/introspection/core/1.0"
+            xmlns:c="http://www.gtk.org/introspection/c/1.0">
+  <namespace name="GL" version="1.0"
+            c:identifier-prefixes="GL"
+            c:symbol-prefixes="gl">
+    <record name="bitfield" c:type="GLbitfield"/>
+    <record name="charARB" c:type="GLcharARB"/>
+    <record name="clampf" c:type="GLclampf"/>
+    <record name="boolean" c:type="GLboolean"/>
+    <record name="enum" c:type="GLenum"/>
+    <record name="float" c:type="GLfloat"/>
+    <record name="handleARB" c:type="GLhandleARB"/>
+    <record name="int" c:type="GLint"/>
+    <record name="intptr" c:type="GLintptr"/>
+    <record name="sizei" c:type="GLsizei"/>
+    <record name="sizeiptr" c:type="GLsizeiptr"/>
+    <record name="uint" c:type="GLuint"/>
+    <record name="void" c:type="GLvoid"/>
+
+    <function name="InitNames" c:identifier="glInitNames">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+      </parameters>
+    </function>
+
+  </namespace>
+</repository>
diff --git a/gir/cairo-1.0.gir.in b/gir/cairo-1.0.gir.in
new file mode 100644 (file)
index 0000000..15e4b12
--- /dev/null
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<repository version="1.2"
+            xmlns="http://www.gtk.org/introspection/core/1.0"
+            xmlns:c="http://www.gtk.org/introspection/c/1.0"
+            xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
+  <package name="%CAIRO_GIR_PACKAGE%"/>
+  <namespace name="cairo" version="1.0"
+            shared-library="%CAIRO_SHARED_LIBRARY%"
+            c:identifier-prefixes="cairo"
+            c:symbol-prefixes="cairo">
+    <record name="Context" c:type="cairo_t" foreign="1"
+           glib:type-name="CairoContext"
+           glib:get-type="cairo_gobject_context_get_type"/>
+    <record name="Surface" c:type="cairo_surface_t" foreign="1"
+           glib:type-name="CairoSurface"
+           glib:get-type="cairo_gobject_surface_get_type"/>
+    <record name="Matrix" c:type="cairo_matrix_t" foreign="1"/>
+    <record name="Pattern" c:type="cairo_pattern_t" foreign="1"
+           glib:type-name="CairoPattern"
+           glib:get-type="cairo_gobject_pattern_get_type"/>
+    <record name="Region" c:type="cairo_region_t" foreign="1"
+           glib:type-name="CairoRegion"
+           glib:get-type="cairo_gobject_region_get_type"/>
+    <enumeration name="Content" c:type="cairo_content_t"
+                glib:type-name="CairoContent"
+                glib:get-type="cairo_gobject_content_get_type">
+      <member name="COLOR"
+              value="4096"
+              c:identifier="CAIRO_CONTENT_COLOR"/>
+      <member name="ALPHA"
+              value="8192"
+              c:identifier="CAIRO_CONTENT_ALPHA"/>
+      <member name="COLOR_ALPHA"
+              value="12288"
+              c:identifier="CAIRO_CONTENT_COLOR_ALPHA"/>
+    </enumeration>
+    <record name="FontOptions" c:type="cairo_font_options_t" foreign="1"/>
+    <record name="FontType" c:type="cairo_font_type_t" foreign="1"/>
+    <record name="FontFace" c:type="cairo_font_face_t" foreign="1"
+                glib:type-name="CairoFontFace"
+                glib:get-type="cairo_gobject_font_face_get_type"/>
+    <record name="ScaledFont" c:type="cairo_scaled_font_t" foreign="1"
+                glib:type-name="CairoScaledFont"
+                glib:get-type="cairo_gobject_scaled_font_get_type"/>
+    <record name="Path" c:type="cairo_path_t" foreign="1"/>
+    <record name="RectangleInt" c:type="cairo_rectangle_int_t"
+           glib:type-name="CairoRectangleInt"
+           glib:get-type="cairo_gobject_rectangle_int_get_type">
+      <field name="x" writable="1">
+       <type name="gint" c:type="gint"/>
+      </field>
+      <field name="y" writable="1">
+       <type name="gint" c:type="gint"/>
+      </field>
+      <field name="width" writable="1">
+       <type name="gint" c:type="gint"/>
+      </field>
+      <field name="height" writable="1">
+       <type name="gint" c:type="gint"/>
+      </field>
+    </record>
+    <function name="image_surface_create" c:identifier="cairo_image_surface_create">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+      </parameters>
+    </function>
+  </namespace>
+</repository>
diff --git a/gir/fontconfig-2.0.gir b/gir/fontconfig-2.0.gir
new file mode 100644 (file)
index 0000000..e7ecd51
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<repository version="1.2"
+            xmlns="http://www.gtk.org/introspection/core/1.0"
+            xmlns:c="http://www.gtk.org/introspection/c/1.0">
+  <namespace name="fontconfig" version="2.0"
+            c:identifier-prefixes="Fc"
+            c:symbol-prefixes="fc">
+    <record name="Pattern" c:type="FcPattern"/>
+    <record name="CharSet" c:type="FcCharSet"/>
+    <function name="init" c:identifier="FcInit">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+      </parameters>
+    </function>
+  </namespace>
+</repository>
diff --git a/gir/freetype2-2.0.gir b/gir/freetype2-2.0.gir
new file mode 100644 (file)
index 0000000..ac74dc8
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<repository version="1.2"
+            xmlns="http://www.gtk.org/introspection/core/1.0"
+            xmlns:c="http://www.gtk.org/introspection/c/1.0">
+  <namespace name="freetype2" version="2.0"
+            c:identifier-prefixes="FT"
+            c:symbol-prefixes="FT">
+    <record name="Bitmap" c:type="FT_Bitmap"/>
+    <record name="Face" c:type="FT_Face"/>
+    <record name="Library" c:type="FT_Library"/>
+    <alias name="Int32" c:type="FT_Int32">
+      <type name="int32"/>
+    </alias>
+    <function name="library_version" c:identifier="FT_Library_Version">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+      </parameters>
+    </function>
+  </namespace>
+</repository>
diff --git a/gir/gio-2.0.c b/gir/gio-2.0.c
new file mode 100644 (file)
index 0000000..16e1476
--- /dev/null
@@ -0,0 +1,41470 @@
+/************************************************************/
+/* THIS FILE IS GENERATED DO NOT EDIT */
+/************************************************************/
+
+/**
+ * GAction:enabled:
+ *
+ * If @action is currently enabled.
+ *
+ * If the action is disabled then calls to g_action_activate() and
+ * g_action_change_state() have no effect.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GAction:name:
+ *
+ * The name of the action.  This is mostly meaningful for identifying
+ * the action once it has been added to a #GActionGroup.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GAction:parameter-type:
+ *
+ * The type of the parameter that must be given when activating the
+ * action.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GAction:state:
+ *
+ * The state of the action, or %NULL if the action is stateless.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GAction:state-type:
+ *
+ * The #GVariantType of the state that the action has, or %NULL if the
+ * action is stateless.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GActionEntry:
+ * @name: the name of the action
+ * @activate: the callback to connect to the "activate" signal of the action
+ * @parameter_type: the type of the parameter that must be passed to the activate function for this action, given as a single GVariant type string (or %NULL for no parameter)
+ * @state: the initial state for this action, given in GVariant text format.  The state is parsed with no extra type information, so type tags must be added to the string if they are necessary.
+ * @change_state: the callback to connect to the "change-state" signal of the action
+ *
+ * This struct defines a single action.  It is for use with
+ * g_action_map_add_action_entries().
+ *
+ * The order of the items in the structure are intended to reflect
+ * frequency of use.  It is permissible to use an incomplete initialiser
+ * in order to leave some of the later values as %NULL.  All values
+ * after @name are optional.  Additional optional fields may be added in
+ * the future.
+ *
+ * See g_action_map_add_action_entries() for an example.
+ */
+
+
+/**
+ * GActionGroup::action-added:
+ * @action_group: the #GActionGroup that changed
+ * @action_name: the name of the action in @action_group
+ *
+ * Signals that a new action was just added to the group.
+ * This signal is emitted after the action has been added
+ * and is now visible.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GActionGroup::action-enabled-changed:
+ * @action_group: the #GActionGroup that changed
+ * @action_name: the name of the action in @action_group
+ * @enabled: whether the action is enabled or not
+ *
+ * Signals that the enabled status of the named action has changed.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GActionGroup::action-removed:
+ * @action_group: the #GActionGroup that changed
+ * @action_name: the name of the action in @action_group
+ *
+ * Signals that an action is just about to be removed from the group.
+ * This signal is emitted before the action is removed, so the action
+ * is still visible and can be queried from the signal handler.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GActionGroup::action-state-changed:
+ * @action_group: the #GActionGroup that changed
+ * @action_name: the name of the action in @action_group
+ * @value: the new value of the state
+ *
+ * Signals that the state of the named action has changed.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GActionGroupInterface:
+ * @has_action: the virtual function pointer for g_action_group_has_action()
+ * @list_actions: the virtual function pointer for g_action_group_list_actions()
+ * @get_action_parameter_type: the virtual function pointer for g_action_group_get_action_parameter_type()
+ * @get_action_state_type: the virtual function pointer for g_action_group_get_action_state_type()
+ * @get_action_state_hint: the virtual function pointer for g_action_group_get_action_state_hint()
+ * @get_action_enabled: the virtual function pointer for g_action_group_get_action_enabled()
+ * @get_action_state: the virtual function pointer for g_action_group_get_action_state()
+ * @change_action_state: the virtual function pointer for g_action_group_change_action_state()
+ * @query_action: the virtual function pointer for g_action_group_query_action()
+ * @activate_action: the virtual function pointer for g_action_group_activate_action()
+ * @action_added: the class closure for the #GActionGroup::action-added signal
+ * @action_removed: the class closure for the #GActionGroup::action-removed signal
+ * @action_enabled_changed: the class closure for the #GActionGroup::action-enabled-changed signal
+ * @action_state_changed: the class closure for the #GActionGroup::action-enabled-changed signal
+ *
+ * The virtual function table for #GActionGroup.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GActionInterface:
+ * @get_name: the virtual function pointer for g_action_get_name()
+ * @get_parameter_type: the virtual function pointer for g_action_get_parameter_type()
+ * @get_state_type: the virtual function pointer for g_action_get_state_type()
+ * @get_state_hint: the virtual function pointer for g_action_get_state_hint()
+ * @get_enabled: the virtual function pointer for g_action_get_enabled()
+ * @get_state: the virtual function pointer for g_action_get_state()
+ * @change_state: the virtual function pointer for g_action_change_state()
+ * @activate: the virtual function pointer for g_action_activate().  Note that #GAction does not have an 'activate' signal but that implementations of it may have one.
+ *
+ * The virtual function table for #GAction.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GActionMapInterface:
+ * @lookup_action: the virtual function pointer for g_action_map_lookup_action()
+ * @add_action: the virtual function pointer for g_action_map_add_action()
+ * @remove_action: the virtual function pointer for g_action_map_remove_action()
+ *
+ * The virtual function table for #GActionMap.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GAppInfo:
+ *
+ * Information about an installed application and methods to launch
+ * it (with file arguments).
+ */
+
+
+/**
+ * GAppInfoCreateFlags:
+ * @G_APP_INFO_CREATE_NONE: No flags.
+ * @G_APP_INFO_CREATE_NEEDS_TERMINAL: Application opens in a terminal window.
+ * @G_APP_INFO_CREATE_SUPPORTS_URIS: Application supports URI arguments.
+ * @G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION: Application supports startup notification. Since 2.26
+ *
+ * Flags used when creating a #GAppInfo.
+ */
+
+
+/**
+ * GAppInfoIface:
+ * @g_iface: The parent interface.
+ * @dup: Copies a #GAppInfo.
+ * @equal: Checks two #GAppInfo<!-- -->s for equality.
+ * @get_id: Gets a string identifier for a #GAppInfo.
+ * @get_name: Gets the name of the application for a #GAppInfo.
+ * @get_description: Gets a short description for the application described by the #GAppInfo.
+ * @get_executable: Gets the executable name for the #GAppInfo.
+ * @get_icon: Gets the #GIcon for the #GAppInfo.
+ * @launch: Launches an application specified by the #GAppInfo.
+ * @supports_uris: Indicates whether the application specified supports launching URIs.
+ * @supports_files: Indicates whether the application specified accepts filename arguments.
+ * @launch_uris: Launches an application with a list of URIs.
+ * @should_show: Returns whether an application should be shown (e.g. when getting a list of installed applications). <ulink url="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt"> <citetitle>FreeDesktop.Org Startup Notification Specification</citetitle></ulink>.
+ * @set_as_default_for_type: Sets an application as default for a given content type.
+ * @set_as_default_for_extension: Sets an application as default for a given file extension.
+ * @add_supports_type: Adds to the #GAppInfo information about supported file types.
+ * @can_remove_supports_type: Checks for support for removing supported file types from a #GAppInfo.
+ * @remove_supports_type: Removes a supported application type from a #GAppInfo.
+ * @can_delete: Checks if a #GAppInfo can be deleted. Since 2.20
+ * @do_delete: Deletes a #GAppInfo. Since 2.20
+ * @get_commandline: Gets the commandline for the #GAppInfo. Since 2.20
+ * @get_display_name: Gets the display name for the #GAppInfo. Since 2.24
+ * @set_as_last_used_for_type: Sets the application as the last used. See g_app_info_set_as_last_used_for_type().
+ *
+ * Application Information interface, for operating system portability.
+ */
+
+
+/**
+ * GAppLaunchContext:
+ *
+ * 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.
+ */
+
+
+/**
+ * GApplication:
+ *
+ *
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GApplication::activate:
+ * @application: the application
+ *
+ * The ::activate signal is emitted on the primary instance when an
+ * activation occurs. See g_application_activate().
+ */
+
+
+/**
+ * GApplication::command-line:
+ * @application: the application
+ * @command_line: a #GApplicationCommandLine representing the passed commandline
+ *
+ * The ::command-line signal is emitted on the primary instance when
+ * a commandline is not handled locally. See g_application_run() and
+ * the #GApplicationCommandLine documentation for more information.
+ *
+ * process. See g_application_command_line_set_exit_status().
+ *
+ * Returns: An integer that is set as the exit status for the calling
+ */
+
+
+/**
+ * GApplication::open:
+ * @application: the application
+ * @files: (array length=n_files) (element-type GFile): an array of #GFiles
+ * @n_files: the length of @files
+ * @hint: a hint provided by the calling instance
+ *
+ * The ::open signal is emitted on the primary instance when there are
+ * files to open. See g_application_open() for more information.
+ */
+
+
+/**
+ * GApplication::shutdown:
+ * @application: the application
+ *
+ * The ::shutdown signal is emitted only on the registered primary instance
+ * immediately after the main loop terminates.
+ */
+
+
+/**
+ * GApplication::startup:
+ * @application: the application
+ *
+ * The ::startup signal is emitted on the primary instance immediately
+ * after registration. See g_application_register().
+ */
+
+
+/**
+ * GApplicationClass:
+ * @startup: invoked on the primary instance immediately after registration
+ * @shutdown: invoked only on the registered primary instance immediately after the main loop terminates
+ * @activate: invoked on the primary instance when an activation occurs
+ * @open: invoked on the primary instance when there are files to open
+ * @command_line: invoked on the primary instance when a command-line is not handled locally
+ * @local_command_line: invoked (locally) when the process has been invoked via commandline execution (as opposed to, say, D-Bus activation - which is not currently supported by GApplication). The virtual function has the chance to inspect (and possibly replace) the list of command line arguments. See g_application_run() for more information.
+ * @before_emit: invoked on the primary instance before 'activate', 'open', 'command-line' or any action invocation, gets the 'platform data' from the calling instance
+ * @after_emit: invoked on the primary instance after 'activate', 'open', 'command-line' or any action invocation, gets the 'platform data' from the calling instance
+ * @add_platform_data: invoked (locally) to add 'platform data' to be sent to the primary instance when activating, opening or invoking actions
+ * @quit_mainloop: Used to be invoked on the primary instance when the use count of the application drops to zero (and after any inactivity timeout, if requested). Not used anymore since 2.32
+ * @run_mainloop: Used to be invoked on the primary instance from g_application_run() if the use-count is non-zero. Since 2.32, GApplication is iterating the main context directly and is not using @run_mainloop anymore
+ *
+ * Virtual function table for #GApplication.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GApplicationCommandLineClass:
+ *
+ * The <structname>GApplicationCommandLineClass</structname> structure
+ * contains private data only
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GApplicationFlags:
+ * @G_APPLICATION_FLAGS_NONE: Default
+ * @G_APPLICATION_IS_SERVICE: Run as a service. In this mode, registration fails if the service is already running, and the application will stay around for a while when the use count falls to zero.
+ * @G_APPLICATION_IS_LAUNCHER: Don't try to become the primary instance.
+ * @G_APPLICATION_HANDLES_OPEN: This application handles opening files (in the primary instance). Note that this flag only affects the default implementation of local_command_line(), and has no effect if %G_APPLICATION_HANDLES_COMMAND_LINE is given. See g_application_run() for details.
+ * @G_APPLICATION_HANDLES_COMMAND_LINE: This application handles command line arguments (in the primary instance). Note that this flag only affect the default implementation of local_command_line(). See g_application_run() for details.
+ * @G_APPLICATION_SEND_ENVIRONMENT: Send the environment of the launching process to the primary instance. Set this flag if your application is expected to behave differently depending on certain environment variables. For instance, an editor might be expected to use the <envar>GIT_COMMITTER_NAME</envar> environment variable when editing a git commit message. The environment is available to the #GApplication::command-line signal handler, via g_application_command_line_getenv().
+ * @G_APPLICATION_NON_UNIQUE: Make no attempts to do any of the typical single-instance application negotiation.  The application neither attempts to become the owner of the application ID nor does it check if an existing owner already exists.  Everything occurs in the local process.  Since: 2.30.
+ *
+ * Flags used to define the behaviour of a #GApplication.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GAskPasswordFlags:
+ * @G_ASK_PASSWORD_NEED_PASSWORD: operation requires a password.
+ * @G_ASK_PASSWORD_NEED_USERNAME: operation requires a username.
+ * @G_ASK_PASSWORD_NEED_DOMAIN: operation requires a domain.
+ * @G_ASK_PASSWORD_SAVING_SUPPORTED: operation supports saving settings.
+ * @G_ASK_PASSWORD_ANONYMOUS_SUPPORTED: operation supports anonymous users.
+ *
+ * #GAskPasswordFlags are used to request specific information from the
+ * user, or to notify the user of their choices in an authentication
+ * situation.
+ */
+
+
+/**
+ * GAsyncInitable:
+ *
+ * Interface for asynchronously initializable objects.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GAsyncInitableIface:
+ * @g_iface: The parent interface.
+ * @init_async: Starts initialization of the object.
+ * @init_finish: Finishes initialization of the object.
+ *
+ * Provides an interface for asynchronous initializing object such that
+ * initialization may fail.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GAsyncReadyCallback:
+ * @source_object: the object the asynchronous operation was started with.
+ * @res: a #GAsyncResult.
+ * @user_data: user data passed to the callback.
+ *
+ * Type definition for a function that will be called back when an asynchronous
+ * operation within GIO has been completed.
+ */
+
+
+/**
+ * GAsyncResult:
+ *
+ * Holds results information for an asynchronous operation,
+ * usually passed directly to a asynchronous _finish() operation.
+ */
+
+
+/**
+ * GAsyncResultIface:
+ * @g_iface: The parent interface.
+ * @get_user_data: Gets the user data passed to the callback.
+ * @get_source_object: Gets the source object that issued the asynchronous operation.
+ *
+ * Interface definition for #GAsyncResult.
+ */
+
+
+/**
+ * GBaseFinalizeFunc:
+ * @g_class: The #GTypeClass structure to finalize.
+ *
+ * A callback function used by the type system to finalize those portions
+ * of a derived types class structure that were setup from the corresponding
+ * GBaseInitFunc() function. Class finalization basically works the inverse
+ * way in which class intialization is performed.
+ * See GClassInitFunc() for a discussion of the class intialization process.
+ */
+
+
+/**
+ * GBaseInitFunc:
+ * @g_class: The #GTypeClass structure to initialize.
+ *
+ * A callback function used by the type system to do base initialization
+ * of the class structures of derived types. It is called as part of the
+ * initialization process of all derived classes and should reallocate
+ * or reset all dynamic class members copied over from the parent class.
+ * For example, class members (such as strings) that are not sufficiently
+ * handled by a plain memory copy of the parent class into the derived class
+ * have to be altered. See GClassInitFunc() for a discussion of the class
+ * intialization process.
+ */
+
+
+/**
+ * GBinding:
+ *
+ * <structname>GBinding</structname> is an opaque structure whose members
+ * cannot be accessed directly.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GBindingFlags:
+ * @G_BINDING_DEFAULT: The default binding; if the source property changes, the target property is updated with its value.
+ * @G_BINDING_BIDIRECTIONAL: Bidirectional binding; if either the property of the source or the property of the target changes, the other is updated.
+ * @G_BINDING_SYNC_CREATE: Synchronize the values of the source and target properties when creating the binding; the direction of the synchronization is always from the source to the target.
+ * @G_BINDING_INVERT_BOOLEAN: If the two properties being bound are booleans, setting one to %TRUE will result in the other being set to %FALSE and vice versa. This flag will only work for boolean properties, and cannot be used when passing custom transformation functions to g_object_bind_property_full().
+ *
+ * Flags to be passed to g_object_bind_property() or
+ * g_object_bind_property_full().
+ *
+ * This enumeration can be extended at later date.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GBindingTransformFunc:
+ * @binding: a #GBinding
+ * @source_value: the value of the source property
+ * @target_value: the value of the target property
+ * @user_data: data passed to the transform function
+ *
+ * A function to be called to transform the source property of @source
+ * from @source_value into the target property of @target
+ * using @target_value.
+ *
+ * otherwise
+ *
+ * Returns: %TRUE if the transformation was successful, and %FALSE
+ * Since: 2.26
+ */
+
+
+/**
+ * GBookmarkFile:
+ *
+ * The <structname>GBookmarkFile</structname> struct contains only
+ * private data and should not be directly accessed.
+ */
+
+
+/**
+ * GBookmarkFileError:
+ * @G_BOOKMARK_FILE_ERROR_INVALID_URI: URI was ill-formed
+ * @G_BOOKMARK_FILE_ERROR_INVALID_VALUE: a requested field was not found
+ * @G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED: a requested application did not register a bookmark
+ * @G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND: a requested URI was not found
+ * @G_BOOKMARK_FILE_ERROR_READ: document was ill formed
+ * @G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING: the text being parsed was in an unknown encoding
+ * @G_BOOKMARK_FILE_ERROR_WRITE: an error occurred while writing
+ * @G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND: requested file was not found
+ *
+ * Error codes returned by bookmark file parsing.
+ */
+
+
+/**
+ * GBoxedCopyFunc:
+ * @boxed: The boxed structure to be copied.
+ *
+ * This function is provided by the user and should produce a copy
+ * of the passed in boxed structure.
+ *
+ * Returns: The newly created copy of the boxed structure.
+ */
+
+
+/**
+ * GBoxedFreeFunc:
+ * @boxed: The boxed structure to be freed.
+ *
+ * This function is provided by the user and should free the boxed
+ * structure passed.
+ */
+
+
+/**
+ * GBufferedInputStream:
+ *
+ * Implements #GFilterInputStream with a sized input buffer.
+ */
+
+
+/**
+ * GBufferedOutputStream:
+ *
+ * An implementation of #GFilterOutputStream with a sized buffer.
+ */
+
+
+/**
+ * GBusAcquiredCallback:
+ * @connection: The #GDBusConnection to a message bus.
+ * @name: The name that is requested to be owned.
+ * @user_data: User data passed to g_bus_own_name().
+ *
+ * Invoked when a connection to a message bus has been obtained.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GBusNameAcquiredCallback:
+ * @connection: The #GDBusConnection on which to acquired the name.
+ * @name: The name being owned.
+ * @user_data: User data passed to g_bus_own_name() or g_bus_own_name_on_connection().
+ *
+ * Invoked when the name is acquired.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GBusNameAppearedCallback:
+ * @connection: The #GDBusConnection the name is being watched on.
+ * @name: The name being watched.
+ * @name_owner: Unique name of the owner of the name being watched.
+ * @user_data: User data passed to g_bus_watch_name().
+ *
+ * Invoked when the name being watched is known to have to have a owner.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GBusNameLostCallback:
+ * @connection: The #GDBusConnection on which to acquire the name or %NULL if the connection was disconnected.
+ * @name: The name being owned.
+ * @user_data: User data passed to g_bus_own_name() or g_bus_own_name_on_connection().
+ *
+ * Invoked when the name is lost or @connection has been closed.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GBusNameOwnerFlags:
+ * @G_BUS_NAME_OWNER_FLAGS_NONE: No flags set.
+ * @G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT: Allow another message bus connection to claim the the name.
+ * @G_BUS_NAME_OWNER_FLAGS_REPLACE: If another message bus connection owns the name and have specified #G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT, then take the name from the other connection.
+ *
+ * Flags used in g_bus_own_name().
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GBusNameVanishedCallback:
+ * @connection: The #GDBusConnection the name is being watched on.
+ * @name: The name being watched.
+ * @user_data: User data passed to g_bus_watch_name().
+ *
+ * Invoked when the name being watched is known not to have to have a owner.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GBusNameWatcherFlags:
+ * @G_BUS_NAME_WATCHER_FLAGS_NONE: No flags set.
+ * @G_BUS_NAME_WATCHER_FLAGS_AUTO_START: If no-one owns the name when beginning to watch the name, ask the bus to launch an owner for the name.
+ *
+ * Flags used in g_bus_watch_name().
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GBusType:
+ * @G_BUS_TYPE_STARTER: An alias for the message bus that activated the process, if any.
+ * @G_BUS_TYPE_NONE: Not a message bus.
+ * @G_BUS_TYPE_SYSTEM: The system-wide message bus.
+ * @G_BUS_TYPE_SESSION: The login session message bus.
+ *
+ * An enumeration for well-known message buses.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GCClosure:
+ * @closure: the #GClosure
+ * @callback: the callback function
+ *
+ * A #GCClosure is a specialization of #GClosure for C function callbacks.
+ */
+
+
+/**
+ * GCallback:
+ *
+ * The type used for callback functions in structure definitions and function
+ * signatures. This doesn't mean that all callback functions must take no
+ * parameters and return void. The required signature of a callback function
+ * is determined by the context in which is used (e.g. the signal to which it
+ * is connected). Use G_CALLBACK() to cast the callback function to a #GCallback.
+ */
+
+
+/**
+ * GCancellable:
+ *
+ * Allows actions to be cancelled.
+ */
+
+
+/**
+ * GCancellable::cancelled:
+ * @cancellable: a #GCancellable.
+ *
+ * Emitted when the operation has been cancelled.
+ *
+ * Can be used by implementations of cancellable operations. If the
+ * operation is cancelled from another thread, the signal will be
+ * emitted in the thread that cancelled the operation, not the
+ * thread that is running the operation.
+ *
+ * Note that disconnecting from this signal (or any signal) in a
+ * multi-threaded program is prone to race conditions. For instance
+ * it is possible that a signal handler may be invoked even
+ * <emphasis>after</emphasis> a call to
+ * g_signal_handler_disconnect() for that handler has already
+ * returned.
+ *
+ * There is also a problem when cancellation happen
+ * right before connecting to the signal. If this happens the
+ * signal will unexpectedly not be emitted, and checking before
+ * connecting to the signal leaves a race condition where this is
+ * still happening.
+ *
+ * In order to make it safe and easy to connect handlers there
+ * are two helper functions: g_cancellable_connect() and
+ * g_cancellable_disconnect() which protect against problems
+ * like this.
+ *
+ * An example of how to us this:
+ * |[
+ * /<!-- -->* Make sure we don't do any unnecessary work if already cancelled *<!-- -->/
+ * if (g_cancellable_set_error_if_cancelled (cancellable))
+ * return;
+ *
+ * /<!-- -->* Set up all the data needed to be able to
+ * * handle cancellation of the operation *<!-- -->/
+ * my_data = my_data_new (...);
+ *
+ * id = 0;
+ * if (cancellable)
+ * id = g_cancellable_connect (cancellable,
+ * G_CALLBACK (cancelled_handler)
+ * data, NULL);
+ *
+ * /<!-- -->* cancellable operation here... *<!-- -->/
+ *
+ * g_cancellable_disconnect (cancellable, id);
+ *
+ * /<!-- -->* cancelled_handler is never called after this, it
+ * * is now safe to free the data *<!-- -->/
+ * my_data_free (my_data);
+ * ]|
+ *
+ * Note that the cancelled signal is emitted in the thread that
+ * the user cancelled from, which may be the main thread. So, the
+ * cancellable signal should not do something that can block.
+ */
+
+
+/**
+ * GCancellableSourceFunc:
+ * @cancellable: the #GCancellable
+ * @user_data: data passed in by the user.
+ *
+ * This is the function type of the callback used for the #GSource
+ * returned by g_cancellable_source_new().
+ *
+ * Returns: it should return %FALSE if the source should be removed.
+ * Since: 2.28
+ */
+
+
+/**
+ * GCharsetConverter:
+ *
+ * Conversions between character sets.
+ */
+
+
+/**
+ * GChecksum:
+ *
+ * An opaque structure representing a checksumming operation.
+ * To create a new GChecksum, use g_checksum_new(). To free
+ * a GChecksum, use g_checksum_free().
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * GChecksumType:
+ * @G_CHECKSUM_MD5: Use the MD5 hashing algorithm
+ * @G_CHECKSUM_SHA1: Use the SHA-1 hashing algorithm
+ * @G_CHECKSUM_SHA256: Use the SHA-256 hashing algorithm
+ *
+ * The hashing algorithm to be used by #GChecksum when performing the
+ * digest of some data.
+ *
+ * Note that the #GChecksumType enumeration may be extended at a later
+ * date to include new hashing algorithm types.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * GChildWatchFunc:
+ * @pid: the process id of the child process
+ * @status: Status information about the child process, see waitpid(2) for more information about this field
+ * @user_data: user data passed to g_child_watch_add()
+ *
+ * The type of functions to be called when a child exists.
+ */
+
+
+/**
+ * GClassFinalizeFunc:
+ * @g_class: The #GTypeClass structure to finalize.
+ * @class_data: The @class_data member supplied via the #GTypeInfo structure.
+ *
+ * A callback function used by the type system to finalize a class.
+ * This function is rarely needed, as dynamically allocated class resources
+ * should be handled by GBaseInitFunc() and GBaseFinalizeFunc().
+ * Also, specification of a GClassFinalizeFunc() in the #GTypeInfo
+ * structure of a static type is invalid, because classes of static types
+ * will never be finalized (they are artificially kept alive when their
+ * reference count drops to zero).
+ */
+
+
+/**
+ * GClassInitFunc:
+ * @g_class: The #GTypeClass structure to initialize.
+ * @class_data: The @class_data member supplied via the #GTypeInfo structure.
+ *
+ * A callback function used by the type system to initialize the class
+ * of a specific type. This function should initialize all static class
+ * members.
+ * The initialization process of a class involves:
+ * <itemizedlist>
+ * <listitem><para>
+ * 1 - Copying common members from the parent class over to the
+ * derived class structure.
+ * </para></listitem>
+ * <listitem><para>
+ * 2 -  Zero initialization of the remaining members not copied
+ * over from the parent class.
+ * </para></listitem>
+ * <listitem><para>
+ * 3 - Invocation of the GBaseInitFunc() initializers of all parent
+ * types and the class' type.
+ * </para></listitem>
+ * <listitem><para>
+ * 4 - Invocation of the class' GClassInitFunc() initializer.
+ * </para></listitem>
+ * </itemizedlist>
+ * Since derived classes are partially initialized through a memory copy
+ * of the parent class, the general rule is that GBaseInitFunc() and
+ * GBaseFinalizeFunc() should take care of necessary reinitialization
+ * and release of those class members that were introduced by the type
+ * that specified these GBaseInitFunc()/GBaseFinalizeFunc().
+ * GClassInitFunc() should only care about initializing static
+ * class members, while dynamic class members (such as allocated strings
+ * or reference counted resources) are better handled by a GBaseInitFunc()
+ * for this type, so proper initialization of the dynamic class members
+ * is performed for class initialization of derived types as well.
+ * An example may help to correspond the intend of the different class
+ * initializers:
+ *
+ * |[
+ * typedef struct {
+ * GObjectClass parent_class;
+ * gint         static_integer;
+ * gchar       *dynamic_string;
+ * } TypeAClass;
+ * static void
+ * type_a_base_class_init (TypeAClass *class)
+ * {
+ * class->dynamic_string = g_strdup ("some string");
+ * }
+ * static void
+ * type_a_base_class_finalize (TypeAClass *class)
+ * {
+ * g_free (class->dynamic_string);
+ * }
+ * static void
+ * type_a_class_init (TypeAClass *class)
+ * {
+ * class->static_integer = 42;
+ * }
+ *
+ * typedef struct {
+ * TypeAClass   parent_class;
+ * gfloat       static_float;
+ * GString     *dynamic_gstring;
+ * } TypeBClass;
+ * static void
+ * type_b_base_class_init (TypeBClass *class)
+ * {
+ * class->dynamic_gstring = g_string_new ("some other string");
+ * }
+ * static void
+ * type_b_base_class_finalize (TypeBClass *class)
+ * {
+ * g_string_free (class->dynamic_gstring);
+ * }
+ * static void
+ * type_b_class_init (TypeBClass *class)
+ * {
+ * class->static_float = 3.14159265358979323846;
+ * }
+ * ]|
+ * Initialization of TypeBClass will first cause initialization of
+ * TypeAClass (derived classes reference their parent classes, see
+ * g_type_class_ref() on this).
+ * Initialization of TypeAClass roughly involves zero-initializing its fields,
+ * then calling its GBaseInitFunc() type_a_base_class_init() to allocate
+ * its dynamic members (dynamic_string), and finally calling its GClassInitFunc()
+ * type_a_class_init() to initialize its static members (static_integer).
+ * The first step in the initialization process of TypeBClass is then
+ * a plain memory copy of the contents of TypeAClass into TypeBClass and
+ * zero-initialization of the remaining fields in TypeBClass.
+ * The dynamic members of TypeAClass within TypeBClass now need
+ * reinitialization which is performed by calling type_a_base_class_init()
+ * with an argument of TypeBClass.
+ * After that, the GBaseInitFunc() of TypeBClass, type_b_base_class_init()
+ * is called to allocate the dynamic members of TypeBClass (dynamic_gstring),
+ * and finally the GClassInitFunc() of TypeBClass, type_b_class_init(),
+ * is called to complete the initialization process with the static members
+ * (static_float).
+ * Corresponding finalization counter parts to the GBaseInitFunc() functions
+ * have to be provided to release allocated resources at class finalization
+ * time.
+ */
+
+
+/**
+ * GClosure:
+ * @in_marshal: Indicates whether the closure is currently being invoked with g_closure_invoke()
+ * @is_invalid: Indicates whether the closure has been invalidated by g_closure_invalidate()
+ *
+ * A #GClosure represents a callback supplied by the programmer.
+ */
+
+
+/**
+ * GClosureMarshal:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: (allow-none): a #GValue to store the return value. May be %NULL if the callback of @closure doesn't return a value.
+ * @n_param_values: the length of the @param_values array
+ * @param_values: (array length=n_param_values): an array of #GValue<!-- -->s holding the arguments on which to invoke the callback of @closure
+ * @invocation_hint: (allow-none): the invocation hint given as the last argument to g_closure_invoke()
+ * @marshal_data: (allow-none): additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
+ *
+ * The type used for marshaller functions.
+ */
+
+
+/**
+ * GClosureNotify:
+ * @data: data specified when registering the notification callback
+ * @closure: the #GClosure on which the notification is emitted
+ *
+ * The type used for the various notification callbacks which can be registered
+ * on closures.
+ */
+
+
+/**
+ * GConnectFlags:
+ * @G_CONNECT_AFTER: whether the handler should be called before or after the default handler of the signal.
+ * @G_CONNECT_SWAPPED: whether the instance and data should be swapped when calling the handler.
+ *
+ * The connection flags are used to specify the behaviour of a signal's
+ * connection.
+ */
+
+
+/**
+ * GConvertError:
+ * @G_CONVERT_ERROR_NO_CONVERSION: Conversion between the requested character sets is not supported.
+ * @G_CONVERT_ERROR_ILLEGAL_SEQUENCE: Invalid byte sequence in conversion input.
+ * @G_CONVERT_ERROR_FAILED: Conversion failed for some reason.
+ * @G_CONVERT_ERROR_PARTIAL_INPUT: Partial character sequence at end of input.
+ * @G_CONVERT_ERROR_BAD_URI: URI is invalid.
+ * @G_CONVERT_ERROR_NOT_ABSOLUTE_PATH: Pathname is not an absolute path.
+ *
+ * Error codes returned by character set conversion routines.
+ */
+
+
+/**
+ * GConverter:
+ *
+ * Seek object for streaming operations.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * GConverterFlags:
+ * @G_CONVERTER_NO_FLAGS: No flags.
+ * @G_CONVERTER_INPUT_AT_END: At end of input data
+ * @G_CONVERTER_FLUSH: Flush data
+ *
+ * Flags used when calling a g_converter_convert().
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * GConverterIface:
+ * @g_iface: The parent interface.
+ * @convert: Converts data.
+ * @reset: Reverts the internal state of the converter to its initial state.
+ *
+ * Provides an interface for converting data from one type
+ * to another type. The conversion can be stateful
+ * and may fail at any place.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * GConverterInputStream:
+ *
+ * An implementation of #GFilterInputStream that allows data
+ * conversion.
+ */
+
+
+/**
+ * GConverterOutputStream:
+ *
+ * An implementation of #GFilterOutputStream that allows data
+ * conversion.
+ */
+
+
+/**
+ * GConverterResult:
+ * @G_CONVERTER_ERROR: There was an error during conversion.
+ * @G_CONVERTER_CONVERTED: Some data was consumed or produced
+ * @G_CONVERTER_FINISHED: The conversion is finished
+ * @G_CONVERTER_FLUSHED: Flushing is finished
+ *
+ * Results returned from g_converter_convert().
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * GCopyFunc:
+ * @src: A pointer to the data which should be copied
+ * @data: Additional data
+ *
+ * A function of this signature is used to copy the node data
+ * when doing a deep-copy of a tree.
+ *
+ * Returns: A pointer to the copy
+ * Since: 2.4
+ */
+
+
+/**
+ * GCredentials:
+ *
+ * The #GCredentials structure contains only private data and
+ * should only be accessed using the provided API.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GCredentialsClass:
+ *
+ * Class structure for #GCredentials.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GCredentialsType:
+ * @G_CREDENTIALS_TYPE_INVALID: Indicates an invalid native credential type.
+ * @G_CREDENTIALS_TYPE_LINUX_UCRED: The native credentials type is a <type>struct ucred</type>.
+ * @G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED: The native credentials type is a <type>struct cmsgcred</type>.
+ * @G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED: The native credentials type is a <type>struct sockpeercred</type>. Added in 2.30.
+ *
+ * Enumeration describing different kinds of native credential types.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusAnnotationInfo:
+ * @ref_count: The reference count or -1 if statically allocated.
+ * @key: The name of the annotation, e.g. "org.freedesktop.DBus.Deprecated".
+ * @value: The value of the annotation.
+ * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
+ *
+ * Information about an annotation.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusArgInfo:
+ * @ref_count: The reference count or -1 if statically allocated.
+ * @name: Name of the argument, e.g. @unix_user_id.
+ * @signature: D-Bus signature of the argument (a single complete type).
+ * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
+ *
+ * Information about an argument for a method or a signal.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusAuthMechanism:credentials:
+ *
+ * If authenticating as a server, this property contains the
+ * received credentials, if any.
+ *
+ * If authenticating as a client, the property contains the
+ * credentials that were sent, if any.
+ */
+
+
+/**
+ * GDBusAuthObserver:
+ *
+ * The #GDBusAuthObserver structure contains only private data and
+ * should only be accessed using the provided API.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusAuthObserver::authorize-authenticated-peer:
+ * @observer: The #GDBusAuthObserver emitting the signal.
+ * @stream: A #GIOStream for the #GDBusConnection.
+ * @credentials: (allow-none): Credentials received from the peer or %NULL.
+ *
+ * Emitted to check if a peer that is successfully authenticated
+ * is authorized.
+ *
+ * Returns: %TRUE if the peer is authorized, %FALSE if not.
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusAuthObserverClass:
+ * @authorize_authenticated_peer: Signal class handler for the #GDBusAuthObserver::authorize-authenticated-peer signal.
+ *
+ * Class structure for #GDBusAuthObserverClass.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusCallFlags:
+ * @G_DBUS_CALL_FLAGS_NONE: No flags set.
+ * @G_DBUS_CALL_FLAGS_NO_AUTO_START: The bus must not launch an owner for the destination name in response to this method invocation.
+ *
+ * Flags used in g_dbus_connection_call() and similar APIs.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusCapabilityFlags:
+ * @G_DBUS_CAPABILITY_FLAGS_NONE: No flags set.
+ * @G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING: The connection supports exchanging UNIX file descriptors with the remote peer.
+ *
+ * Capabilities negotiated with the remote peer.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusConnection:
+ *
+ * The #GDBusConnection structure contains only private data and
+ * should only be accessed using the provided API.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusConnection::closed:
+ * @connection: The #GDBusConnection emitting the signal.
+ * @remote_peer_vanished: %TRUE if @connection is closed because the remote peer closed its end of the connection.
+ * @error: A #GError with more details about the event or %NULL.
+ *
+ * Emitted when the connection is closed.
+ *
+ * The cause of this event can be
+ * <itemizedlist>
+ * <listitem><para>
+ * If g_dbus_connection_close() is called. In this case
+ * @remote_peer_vanished is set to %FALSE and @error is %NULL.
+ * </para></listitem>
+ * <listitem><para>
+ * If the remote peer closes the connection. In this case
+ * @remote_peer_vanished is set to %TRUE and @error is set.
+ * </para></listitem>
+ * <listitem><para>
+ * If the remote peer sends invalid or malformed data. In this
+ * case @remote_peer_vanished is set to %FALSE and @error
+ * is set.
+ * </para></listitem>
+ * </itemizedlist>
+ *
+ * Upon receiving this signal, you should give up your reference to
+ * @connection. You are guaranteed that this signal is emitted only
+ * once.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusConnection:address:
+ *
+ * A D-Bus address specifying potential endpoints that can be used
+ * when establishing the connection.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusConnection:authentication-observer:
+ *
+ * A #GDBusAuthObserver object to assist in the authentication process or %NULL.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusConnection:capabilities:
+ *
+ * Flags from the #GDBusCapabilityFlags enumeration
+ * representing connection features negotiated with the other peer.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusConnection:closed:
+ *
+ * A boolean specifying whether the connection has been closed.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusConnection:exit-on-close:
+ *
+ * A boolean specifying whether the process will be terminated (by
+ * calling <literal>raise(SIGTERM)</literal>) if the connection
+ * is closed by the remote peer.
+ *
+ * Note that #GDBusConnection objects returned by g_bus_get_finish() and
+ * g_bus_get_sync() will (usually) have this property set to %TRUE.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusConnection:flags:
+ *
+ * Flags from the #GDBusConnectionFlags enumeration.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusConnection:guid:
+ *
+ * The GUID of the peer performing the role of server when
+ * authenticating.
+ *
+ * If you are constructing a #GDBusConnection and pass
+ * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER in the
+ * #GDBusConnection:flags property then you MUST also set this
+ * property to a valid guid.
+ *
+ * If you are constructing a #GDBusConnection and pass
+ * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT in the
+ * #GDBusConnection:flags property you will be able to read the GUID
+ * of the other peer here after the connection has been successfully
+ * initialized.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusConnection:locked:
+ *
+ * A boolean specifying whether the message is locked.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusConnection:stream:
+ *
+ * The underlying #GIOStream used for I/O.
+ *
+ * If this is passed on construction and is a #GSocketConnection,
+ * then the corresponding #GSocket will be put into non-blocking mode.
+ *
+ * While the #GDBusConnection is active, it will interact with this
+ * stream from a worker thread, so it is not safe to interact with
+ * the stream directly.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusConnection:unique-name:
+ *
+ * The unique name as assigned by the message bus or %NULL if the
+ * connection is not open or not a message bus connection.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusConnectionClass:
+ * @closed: Signal class handler for the #GDBusConnection::closed signal.
+ *
+ * Class structure for #GDBusConnection.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusConnectionFlags:
+ * @G_DBUS_CONNECTION_FLAGS_NONE: No flags set.
+ * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT: Perform authentication against server.
+ * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER: Perform authentication against client.
+ * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS: When authenticating as a server, allow the anonymous authentication method.
+ * @G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION: Pass this flag if connecting to a peer that is a message bus. This means that the Hello() method will be invoked as part of the connection setup.
+ * @G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING: If set, processing of D-Bus messages is delayed until g_dbus_connection_start_message_processing() is called.
+ *
+ * Flags used when creating a new #GDBusConnection.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusError:
+ *
+ * Certain timeout errors, e.g. while starting a service. Warning: this is
+ * Error codes for the %G_DBUS_ERROR error domain.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusErrorEntry:
+ * @error_code: An error code.
+ * @dbus_error_name: The D-Bus error name to associate with @error_code.
+ *
+ * Struct used in g_dbus_error_register_error_domain().
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusInterface:
+ *
+ * Base type for D-Bus interfaces.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusInterfaceGetPropertyFunc:
+ * @connection: A #GDBusConnection.
+ * @sender: The unique bus name of the remote caller.
+ * @object_path: The object path that the method was invoked on.
+ * @interface_name: The D-Bus interface name for the property.
+ * @property_name: The name of the property to get the value of.
+ * @error: Return location for error.
+ * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
+ *
+ * The type of the @get_property function in #GDBusInterfaceVTable.
+ *
+ * @error is set. If the returned #GVariant is floating, it is
+ * consumed - otherwise its reference count is decreased by one.
+ *
+ * Returns: A #GVariant with the value for @property_name or %NULL if
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusInterfaceIface:
+ * @parent_iface: The parent interface.
+ * @get_info: Returns a #GDBusInterfaceInfo. See g_dbus_interface_get_info().
+ * @get_object: Gets the enclosing #GDBusObject. See g_dbus_interface_get_object().
+ * @set_object: Sets the enclosing #GDBusObject. See g_dbus_interface_set_object().
+ * @dup_object: Gets a reference to the enclosing #GDBusObject. See g_dbus_interface_dup_object(). Added in 2.32.
+ *
+ * Base type for D-Bus interfaces.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusInterfaceInfo:
+ * @ref_count: The reference count or -1 if statically allocated.
+ * @name: The name of the D-Bus interface, e.g. "org.freedesktop.DBus.Properties".
+ * @methods: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusMethodInfo structures or %NULL if there are no methods.
+ * @signals: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusSignalInfo structures or %NULL if there are no signals.
+ * @properties: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusPropertyInfo structures or %NULL if there are no properties.
+ * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
+ *
+ * Information about a D-Bus interface.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusInterfaceMethodCallFunc:
+ * @connection: A #GDBusConnection.
+ * @sender: The unique bus name of the remote caller.
+ * @object_path: The object path that the method was invoked on.
+ * @interface_name: The D-Bus interface name the method was invoked on.
+ * @method_name: The name of the method that was invoked.
+ * @parameters: A #GVariant tuple with parameters.
+ * @invocation: A #GDBusMethodInvocation object that can be used to return a value or error.
+ * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
+ *
+ * The type of the @method_call function in #GDBusInterfaceVTable.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusInterfaceSetPropertyFunc:
+ * @connection: A #GDBusConnection.
+ * @sender: The unique bus name of the remote caller.
+ * @object_path: The object path that the method was invoked on.
+ * @interface_name: The D-Bus interface name for the property.
+ * @property_name: The name of the property to get the value of.
+ * @value: The value to set the property to.
+ * @error: Return location for error.
+ * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
+ *
+ * The type of the @set_property function in #GDBusInterfaceVTable.
+ *
+ * Returns: %TRUE if the property was set to @value, %FALSE if @error is set.
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusInterfaceSkeleton:
+ *
+ * The #GDBusInterfaceSkeleton structure contains private data and should
+ * only be accessed using the provided API.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusInterfaceSkeleton::g-authorize-method:
+ * @interface: The #GDBusInterfaceSkeleton emitting the signal.
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Emitted when a method is invoked by a remote caller and used to
+ * determine if the method call is authorized.
+ *
+ * Note that this signal is emitted in a thread dedicated to
+ * handling the method call so handlers are allowed to perform
+ * blocking IO. This means that it is appropriate to call
+ * e.g. <ulink
+ * url="http://hal.freedesktop.org/docs/polkit/PolkitAuthority.html#polkit-authority-check-authorization-sync">polkit_authority_check_authorization_sync()</ulink>
+ * with the <ulink
+ * url="http://hal.freedesktop.org/docs/polkit/PolkitAuthority.html#POLKIT-CHECK-AUTHORIZATION-FLAGS-ALLOW-USER-INTERACTION:CAPS">POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION</ulink> flag set.
+ *
+ * If %FALSE is returned then no further handlers are run and the
+ * signal handler must take a reference to @invocation and finish
+ * handling the call (e.g. return an error via
+ * g_dbus_method_invocation_return_error()).
+ *
+ * Otherwise, if %TRUE is returned, signal emission continues. If no
+ * handlers return %FALSE, then the method is dispatched. If
+ * @interface has an enclosing #GDBusObjectSkeleton, then the
+ * #GDBusObjectSkeleton::authorize-method signal handlers run before
+ * the handlers for this signal.
+ *
+ * The default class handler just returns %TRUE.
+ *
+ * Please note that the common case is optimized: if no signals
+ * handlers are connected and the default class handler isn't
+ * overridden (for both @interface and the enclosing
+ * #GDBusObjectSkeleton, if any) and #GDBusInterfaceSkeleton:g-flags does
+ * not have the
+ * %G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD
+ * flags set, no dedicated thread is ever used and the call will be
+ * handled in the same thread as the object that @interface belongs
+ * to was exported in.
+ *
+ * Returns: %TRUE if the call is authorized, %FALSE otherwise.
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusInterfaceSkeleton:g-flags:
+ *
+ * Flags from the #GDBusInterfaceSkeletonFlags enumeration.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusInterfaceSkeletonClass:
+ * @parent_class: The parent class.
+ * @get_info: Returns a #GDBusInterfaceInfo. See g_dbus_interface_skeleton_get_info() for details.
+ * @get_vtable: Returns a #GDBusInterfaceVTable. See g_dbus_interface_skeleton_get_vtable() for details.
+ * @get_properties: Returns a #GVariant with all properties. See g_dbus_interface_skeleton_get_properties().
+ * @flush: Emits outstanding changes, if any. See g_dbus_interface_skeleton_flush().
+ * @g_authorize_method: Signal class handler for the #GDBusInterfaceSkeleton::g-authorize-method signal.
+ *
+ * Class structure for #GDBusInterfaceSkeleton.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusInterfaceSkeletonFlags:
+ * @G_DBUS_INTERFACE_SKELETON_FLAGS_NONE: No flags set.
+ * @G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD: Each method invocation is handled in a thread dedicated to the invocation. This means that the method implementation can use blocking IO without blocking any other part of the process. It also means that the method implementation must use locking to access data structures used by other threads.
+ *
+ * Flags describing the behavior of a #GDBusInterfaceSkeleton instance.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusInterfaceVTable:
+ * @method_call: Function for handling incoming method calls.
+ * @get_property: Function for getting a property.
+ * @set_property: Function for setting a property.
+ *
+ * Virtual table for handling properties and method calls for a D-Bus
+ * interface.
+ *
+ * If you want to handle getting/setting D-Bus properties asynchronously, simply
+ * register an object with the <literal>org.freedesktop.DBus.Properties</literal>
+ * D-Bus interface using g_dbus_connection_register_object().
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusMessage:
+ *
+ * The #GDBusMessage structure contains only private data and should
+ * only be accessed using the provided API.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusMessageByteOrder:
+ * @G_DBUS_MESSAGE_BYTE_ORDER_BIG_ENDIAN: The byte order is big endian.
+ * @G_DBUS_MESSAGE_BYTE_ORDER_LITTLE_ENDIAN: The byte order is little endian.
+ *
+ * Enumeration used to describe the byte order of a D-Bus message.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusMessageClass:
+ *
+ * Class structure for #GDBusMessage.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusMessageFilterFunction:
+ * @connection: (transfer none): A #GDBusConnection.
+ * @message: (transfer full): A locked #GDBusMessage that the filter function takes ownership of.
+ * @incoming: %TRUE if it is a message received from the other peer, %FALSE if it is a message to be sent to the other peer.
+ * @user_data: User data passed when adding the filter.
+ *
+ * Signature for function used in g_dbus_connection_add_filter().
+ *
+ * A filter function is passed a #GDBusMessage and expected to return
+ * a #GDBusMessage too. Passive filter functions that don't modify the
+ * message can simply return the @message object:
+ * |[
+ * static GDBusMessage *
+ * passive_filter (GDBusConnection *connection
+ * GDBusMessage    *message,
+ * gboolean         incoming,
+ * gpointer         user_data)
+ * {
+ * /<!-- -->* inspect @message *<!-- -->/
+ * return message;
+ * }
+ * ]|
+ * Filter functions that wants to drop a message can simply return %NULL:
+ * |[
+ * static GDBusMessage *
+ * drop_filter (GDBusConnection *connection
+ * GDBusMessage    *message,
+ * gboolean         incoming,
+ * gpointer         user_data)
+ * {
+ * if (should_drop_message)
+ * {
+ * g_object_unref (message);
+ * message = NULL;
+ * }
+ * return message;
+ * }
+ * ]|
+ * Finally, a filter function may modify a message by copying it:
+ * |[
+ * static GDBusMessage *
+ * modifying_filter (GDBusConnection *connection
+ * GDBusMessage    *message,
+ * gboolean         incoming,
+ * gpointer         user_data)
+ * {
+ * GDBusMessage *copy;
+ * GError *error;
+ *
+ * error = NULL;
+ * copy = g_dbus_message_copy (message, &error);
+ * /<!-- -->* handle @error being is set *<!-- -->/
+ * g_object_unref (message);
+ *
+ * /<!-- -->* modify @copy *<!-- -->/
+ *
+ * return copy;
+ * }
+ * ]|
+ * If the returned #GDBusMessage is different from @message and cannot
+ * be sent on @connection (it could use features, such as file
+ * descriptors, not compatible with @connection), then a warning is
+ * logged to <emphasis>standard error</emphasis>. Applications can
+ * check this ahead of time using g_dbus_message_to_blob() passing a
+ * #GDBusCapabilityFlags value obtained from @connection.
+ *
+ * g_object_unref() or %NULL to drop the message. Passive filter
+ * functions can simply return the passed @message object.
+ *
+ * Returns: (transfer full) (allow-none): A #GDBusMessage that will be freed with
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusMessageFlags:
+ * @G_DBUS_MESSAGE_FLAGS_NONE: No flags set.
+ * @G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED: A reply is not expected.
+ * @G_DBUS_MESSAGE_FLAGS_NO_AUTO_START: The bus must not launch an owner for the destination name in response to this message.
+ *
+ * Message flags used in #GDBusMessage.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusMessageHeaderField:
+ * @G_DBUS_MESSAGE_HEADER_FIELD_INVALID: Not a valid header field.
+ * @G_DBUS_MESSAGE_HEADER_FIELD_PATH: The object path.
+ * @G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE: The interface name.
+ * @G_DBUS_MESSAGE_HEADER_FIELD_MEMBER: The method or signal name.
+ * @G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME: The name of the error that occurred.
+ * @G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL: The serial number the message is a reply to.
+ * @G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION: The name the message is intended for.
+ * @G_DBUS_MESSAGE_HEADER_FIELD_SENDER: Unique name of the sender of the message (filled in by the bus).
+ * @G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE: The signature of the message body.
+ * @G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS: The number of UNIX file descriptors that accompany the message.
+ *
+ * Header fields used in #GDBusMessage.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusMessageType:
+ * @G_DBUS_MESSAGE_TYPE_INVALID: Message is of invalid type.
+ * @G_DBUS_MESSAGE_TYPE_METHOD_CALL: Method call.
+ * @G_DBUS_MESSAGE_TYPE_METHOD_RETURN: Method reply.
+ * @G_DBUS_MESSAGE_TYPE_ERROR: Error reply.
+ * @G_DBUS_MESSAGE_TYPE_SIGNAL: Signal emission.
+ *
+ * Message types used in #GDBusMessage.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusMethodInfo:
+ * @ref_count: The reference count or -1 if statically allocated.
+ * @name: The name of the D-Bus method, e.g. @RequestName.
+ * @in_args: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no in arguments.
+ * @out_args: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no out arguments.
+ * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
+ *
+ * Information about a method on an D-Bus interface.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusMethodInvocation:
+ *
+ * The #GDBusMethodInvocation structure contains only private data and
+ * should only be accessed using the provided API.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusMethodInvocationClass:
+ *
+ * Class structure for #GDBusMethodInvocation.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusNodeInfo:
+ * @ref_count: The reference count or -1 if statically allocated.
+ * @path: The path of the node or %NULL if omitted. Note that this may be a relative path. See the D-Bus specification for more details.
+ * @interfaces: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusInterfaceInfo structures or %NULL if there are no interfaces.
+ * @nodes: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusNodeInfo structures or %NULL if there are no nodes.
+ * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
+ *
+ * Information about nodes in a remote object hierarchy.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusObject::interface-added:
+ * @object: The #GDBusObject emitting the signal.
+ * @interface: The #GDBusInterface that was added.
+ *
+ * Emitted when @interface is added to @object.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObject::interface-removed:
+ * @object: The #GDBusObject emitting the signal.
+ * @interface: The #GDBusInterface that was removed.
+ *
+ * Emitted when @interface is removed from @object.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectIface:
+ * @parent_iface: The parent interface.
+ * @get_object_path: Returns the object path. See g_dbus_object_get_object_path().
+ * @get_interfaces: Returns all interfaces. See g_dbus_object_get_interfaces().
+ * @get_interface: Returns an interface by name. See g_dbus_object_get_interface().
+ * @interface_added: Signal handler for the #GDBusObject::interface-added signal.
+ * @interface_removed: Signal handler for the #GDBusObject::interface-removed signal.
+ *
+ * Base object type for D-Bus objects.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectManager::interface-added:
+ * @manager: The #GDBusObjectManager emitting the signal.
+ * @object: The #GDBusObject on which an interface was added.
+ * @interface: The #GDBusInterface that was added.
+ *
+ * Emitted when @interface is added to @object.
+ *
+ * This signal exists purely as a convenience to avoid having to
+ * connect signals to all objects managed by @manager.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectManager::interface-removed:
+ * @manager: The #GDBusObjectManager emitting the signal.
+ * @object: The #GDBusObject on which an interface was removed.
+ * @interface: The #GDBusInterface that was removed.
+ *
+ * Emitted when @interface has been removed from @object.
+ *
+ * This signal exists purely as a convenience to avoid having to
+ * connect signals to all objects managed by @manager.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectManager::object-added:
+ * @manager: The #GDBusObjectManager emitting the signal.
+ * @object: The #GDBusObject that was added.
+ *
+ * Emitted when @object is added to @manager.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectManager::object-removed:
+ * @manager: The #GDBusObjectManager emitting the signal.
+ * @object: The #GDBusObject that was removed.
+ *
+ * Emitted when @object is removed from @manager.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectManagerClient:
+ *
+ * The #GDBusObjectManagerClient structure contains private data and should
+ * only be accessed using the provided API.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectManagerClient::interface-proxy-properties-changed:
+ * @manager: The #GDBusObjectManagerClient emitting the signal.
+ * @object_proxy: The #GDBusObjectProxy on which an interface has properties that are changing.
+ * @interface_proxy: The #GDBusProxy that has properties that are changing.
+ * @changed_properties: A #GVariant containing the properties that changed.
+ * @invalidated_properties: A %NULL terminated array of properties that was invalidated.
+ *
+ * Emitted when one or more D-Bus properties on proxy changes. The
+ * local cache has already been updated when this signal fires. Note
+ * that both @changed_properties and @invalidated_properties are
+ * guaranteed to never be %NULL (either may be empty though).
+ *
+ * This signal exists purely as a convenience to avoid having to
+ * connect signals to all interface proxies managed by @manager.
+ *
+ * This signal is emitted in the
+ * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
+ * that @manager was constructed in.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectManagerClient::interface-proxy-signal:
+ * @manager: The #GDBusObjectManagerClient emitting the signal.
+ * @object_proxy: The #GDBusObjectProxy on which an interface is emitting a D-Bus signal.
+ * @interface_proxy: The #GDBusProxy that is emitting a D-Bus signal.
+ * @sender_name: The sender of the signal or NULL if the connection is not a bus connection.
+ * @signal_name: The signal name.
+ * @parameters: A #GVariant tuple with parameters for the signal.
+ *
+ * Emitted when a D-Bus signal is received on @interface_proxy.
+ *
+ * This signal exists purely as a convenience to avoid having to
+ * connect signals to all interface proxies managed by @manager.
+ *
+ * This signal is emitted in the
+ * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
+ * that @manager was constructed in.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectManagerClient:bus-type:
+ *
+ * If this property is not %G_BUS_TYPE_NONE, then
+ * #GDBusObjectManagerClient:connection must be %NULL and will be set to the
+ * #GDBusConnection obtained by calling g_bus_get() with the value
+ * of this property.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectManagerClient:connection:
+ *
+ * The #GDBusConnection to use.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectManagerClient:flags:
+ *
+ * Flags from the #GDBusObjectManagerClientFlags enumeration.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectManagerClient:get-proxy-type-destroy-notify:
+ *
+ * A #GDestroyNotify for the #gpointer user_data in #GDBusObjectManagerClient:get-proxy-type-user-data.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectManagerClient:get-proxy-type-func:
+ *
+ * The #GDBusProxyTypeFunc to use when determining what #GType to
+ * use for interface proxies or %NULL.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectManagerClient:get-proxy-type-user-data:
+ *
+ * The #gpointer user_data to pass to #GDBusObjectManagerClient:get-proxy-type-func.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectManagerClient:name:
+ *
+ * The well-known name or unique name that the manager is for.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectManagerClient:name-owner:
+ *
+ * The unique name that owns #GDBusObjectManagerClient:name or %NULL if
+ * no-one is currently owning the name. Connect to the
+ * #GObject::notify signal to track changes to this property.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectManagerClient:object-path:
+ *
+ * The object path the manager is for.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectManagerClientClass:
+ * @parent_class: The parent class.
+ * @interface_proxy_signal: Signal class handler for the #GDBusObjectManagerClient::interface-proxy-signal signal.
+ * @interface_proxy_properties_changed: Signal class handler for the #GDBusObjectManagerClient::interface-proxy-properties-changed signal.
+ *
+ * Class structure for #GDBusObjectManagerClient.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectManagerClientFlags:
+ * @G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_NONE: No flags set.
+ * @G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START: If not set and the manager is for a well-known name, then request the bus to launch an owner for the name if no-one owns the name. This flag can only be used in managers for well-known names.
+ *
+ * Flags used when constructing a #GDBusObjectManagerClient.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectManagerIface:
+ * @parent_iface: The parent interface.
+ * @get_object_path: Virtual function for g_dbus_object_manager_get_object_path().
+ * @get_objects: Virtual function for g_dbus_object_manager_get_objects().
+ * @get_object: Virtual function for g_dbus_object_manager_get_object().
+ * @get_interface: Virtual function for g_dbus_object_manager_get_interface().
+ * @object_added: Signal handler for the #GDBusObjectManager::object-added signal.
+ * @object_removed: Signal handler for the #GDBusObjectManager::object-removed signal.
+ * @interface_added: Signal handler for the #GDBusObjectManager::interface-added signal.
+ * @interface_removed: Signal handler for the #GDBusObjectManager::interface-removed signal.
+ *
+ * Base type for D-Bus object managers.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectManagerServer:
+ *
+ * The #GDBusObjectManagerServer structure contains private data and should
+ * only be accessed using the provided API.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectManagerServer:connection:
+ *
+ * The #GDBusConnection to export objects on.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectManagerServer:object-path:
+ *
+ * The object path to register the manager object at.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectManagerServerClass:
+ * @parent_class: The parent class.
+ *
+ * Class structure for #GDBusObjectManagerServer.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectProxy:
+ *
+ * The #GDBusObjectProxy structure contains private data and should
+ * only be accessed using the provided API.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectProxy:g-connection:
+ *
+ * The connection of the proxy.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectProxy:g-object-path:
+ *
+ * The object path of the proxy.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectProxyClass:
+ * @parent_class: The parent class.
+ *
+ * Class structure for #GDBusObjectProxy.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectSkeleton:
+ *
+ * The #GDBusObjectSkeleton structure contains private data and should only be
+ * accessed using the provided API.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectSkeleton::authorize-method:
+ * @object: The #GDBusObjectSkeleton emitting the signal.
+ * @interface: The #GDBusInterfaceSkeleton that @invocation is for.
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Emitted when a method is invoked by a remote caller and used to
+ * determine if the method call is authorized.
+ *
+ * This signal is like #GDBusInterfaceSkeleton<!-- -->'s
+ * #GDBusInterfaceSkeleton::g-authorize-method signal, except that it is
+ * for the enclosing object.
+ *
+ * The default class handler just returns %TRUE.
+ *
+ * Returns: %TRUE if the call is authorized, %FALSE otherwise.
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectSkeleton:g-object-path:
+ *
+ * The object path where the object is exported.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusObjectSkeletonClass:
+ * @parent_class: The parent class.
+ * @authorize_method: Signal class handler for the #GDBusObjectSkeleton::authorize-method signal.
+ *
+ * Class structure for #GDBusObjectSkeleton.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusPropertyInfo:
+ * @ref_count: The reference count or -1 if statically allocated.
+ * @name: The name of the D-Bus property, e.g. "SupportedFilesystems".
+ * @signature: The D-Bus signature of the property (a single complete type).
+ * @flags: Access control flags for the property.
+ * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
+ *
+ * Information about a D-Bus property on a D-Bus interface.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusPropertyInfoFlags:
+ * @G_DBUS_PROPERTY_INFO_FLAGS_NONE: No flags set.
+ * @G_DBUS_PROPERTY_INFO_FLAGS_READABLE: Property is readable.
+ * @G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE: Property is writable.
+ *
+ * Flags describing the access control of a D-Bus property.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusProxy:
+ *
+ * The #GDBusProxy structure contains only private data and
+ * should only be accessed using the provided API.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusProxy::g-properties-changed:
+ * @proxy: The #GDBusProxy emitting the signal.
+ * @changed_properties: A #GVariant containing the properties that changed
+ * @invalidated_properties: A %NULL terminated array of properties that was invalidated
+ *
+ * Emitted when one or more D-Bus properties on @proxy changes. The
+ * local cache has already been updated when this signal fires. Note
+ * that both @changed_properties and @invalidated_properties are
+ * guaranteed to never be %NULL (either may be empty though).
+ *
+ * If the proxy has the flag
+ * %G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES set, then
+ * @invalidated_properties will always be empty.
+ *
+ * This signal corresponds to the
+ * <literal>PropertiesChanged</literal> D-Bus signal on the
+ * <literal>org.freedesktop.DBus.Properties</literal> interface.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusProxy::g-signal:
+ * @proxy: The #GDBusProxy emitting the signal.
+ * @sender_name: (allow-none): The sender of the signal or %NULL if the connection is not a bus connection.
+ * @signal_name: The name of the signal.
+ * @parameters: A #GVariant tuple with parameters for the signal.
+ *
+ * Emitted when a signal from the remote object and interface that @proxy is for, has been received.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusProxy:g-bus-type:
+ *
+ * If this property is not %G_BUS_TYPE_NONE, then
+ * #GDBusProxy:g-connection must be %NULL and will be set to the
+ * #GDBusConnection obtained by calling g_bus_get() with the value
+ * of this property.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusProxy:g-connection:
+ *
+ * The #GDBusConnection the proxy is for.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusProxy:g-default-timeout:
+ *
+ * The timeout to use if -1 (specifying default timeout) is passed
+ * as @timeout_msec in the g_dbus_proxy_call() and
+ * g_dbus_proxy_call_sync() functions.
+ *
+ * This allows applications to set a proxy-wide timeout for all
+ * remote method invocations on the proxy. If this property is -1,
+ * the default timeout (typically 25 seconds) is used. If set to
+ * %G_MAXINT, then no timeout is used.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusProxy:g-flags:
+ *
+ * Flags from the #GDBusProxyFlags enumeration.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusProxy:g-interface-info:
+ *
+ * Ensure that interactions with this proxy conform to the given
+ * interface. This is mainly to ensure that malformed data received
+ * from the other peer is ignored. The given #GDBusInterfaceInfo is
+ * said to be the <emphasis>expected interface</emphasis>.
+ *
+ * The checks performed are:
+ * <itemizedlist>
+ * <listitem><para>
+ * When completing a method call, if the type signature of
+ * the reply message isn't what's expected, the reply is
+ * discarded and the #GError is set to %G_IO_ERROR_INVALID_ARGUMENT.
+ * </para></listitem>
+ * <listitem><para>
+ * Received signals that have a type signature mismatch are dropped and
+ * a warning is logged via g_warning().
+ * </para></listitem>
+ * <listitem><para>
+ * Properties received via the initial <literal>GetAll()</literal> call
+ * or via the <literal>::PropertiesChanged</literal> signal (on the
+ * <ulink url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties">org.freedesktop.DBus.Properties</ulink> interface) or
+ * set using g_dbus_proxy_set_cached_property() with a type signature
+ * mismatch are ignored and a warning is logged via g_warning().
+ * </para></listitem>
+ * </itemizedlist>
+ * Note that these checks are never done on methods, signals and
+ * properties that are not referenced in the given
+ * #GDBusInterfaceInfo, since extending a D-Bus interface on the
+ * service-side is not considered an ABI break.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusProxy:g-interface-name:
+ *
+ * The D-Bus interface name the proxy is for.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusProxy:g-name:
+ *
+ * The well-known or unique name that the proxy is for.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusProxy:g-name-owner:
+ *
+ * The unique name that owns #GDBusProxy:g-name or %NULL if no-one
+ * currently owns that name. You may connect to #GObject::notify signal to
+ * track changes to this property.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusProxy:g-object-path:
+ *
+ * The object path the proxy is for.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusProxyClass:
+ * @g_properties_changed: Signal class handler for the #GDBusProxy::g-properties-changed signal.
+ * @g_signal: Signal class handler for the #GDBusProxy::g-signal signal.
+ *
+ * Class structure for #GDBusProxy.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusProxyFlags:
+ * @G_DBUS_PROXY_FLAGS_NONE: No flags set.
+ * @G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES: Don't load properties.
+ * @G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS: Don't connect to signals on the remote object.
+ * @G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START: If not set and the proxy if for a well-known name, then request the bus to launch an owner for the name if no-one owns the name. This flag can only be used in proxies for well-known names.
+ * @G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES: If set, the property value for any <emphasis>invalidated property</emphasis> will be (asynchronously) retrieved upon receiving the <ulink url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties">PropertiesChanged</ulink> D-Bus signal and the property will not cause emission of the #GDBusProxy::g-properties-changed signal. When the value is received the #GDBusProxy::g-properties-changed signal is emitted for the property along with the retrieved value. Since 2.32.
+ *
+ * Flags used when constructing an instance of a #GDBusProxy derived class.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusProxyTypeFunc:
+ * @manager: A #GDBusObjectManagerClient.
+ * @object_path: The object path of the remote object.
+ * @interface_name: (allow-none): The interface name of the remote object or %NULL if a #GDBusObjectProxy #GType is requested.
+ * @user_data: User data.
+ *
+ * Function signature for a function used to determine the #GType to
+ * use for an interface proxy (if @interface_name is not %NULL) or
+ * object proxy (if @interface_name is %NULL).
+ *
+ * This function is called in the
+ * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
+ * that @manager was constructed in.
+ *
+ * must be a #GDBusProxy<!-- -->- or #GDBusObjectProxy<!-- -->-derived
+ * type.
+ *
+ * Returns: A #GType to use for the remote object. The returned type
+ * Since: 2.30
+ */
+
+
+/**
+ * GDBusSendMessageFlags:
+ * @G_DBUS_SEND_MESSAGE_FLAGS_NONE: No flags set.
+ * @G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL: Do not automatically assign a serial number from the #GDBusConnection object when sending a message.
+ *
+ * Flags used when sending #GDBusMessage<!-- -->s on a #GDBusConnection.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusServer:
+ *
+ * The #GDBusServer structure contains only private data and
+ * should only be accessed using the provided API.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusServer::new-connection:
+ * @server: The #GDBusServer emitting the signal.
+ * @connection: A #GDBusConnection for the new connection.
+ *
+ * Emitted when a new authenticated connection has been made. Use
+ * g_dbus_connection_get_peer_credentials() to figure out what
+ * identity (if any), was authenticated.
+ *
+ * If you want to accept the connection, take a reference to the
+ * @connection object and return %TRUE. When you are done with the
+ * connection call g_dbus_connection_close() and give up your
+ * reference. Note that the other peer may disconnect at any time -
+ * a typical thing to do when accepting a connection is to listen to
+ * the #GDBusConnection::closed signal.
+ *
+ * If #GDBusServer:flags contains %G_DBUS_SERVER_FLAGS_RUN_IN_THREAD
+ * then the signal is emitted in a new thread dedicated to the
+ * connection. Otherwise the signal is emitted in the <link
+ * linkend="g-main-context-push-thread-default">thread-default main
+ * loop</link> of the thread that @server was constructed in.
+ *
+ * You are guaranteed that signal handlers for this signal runs
+ * before incoming messages on @connection are processed. This means
+ * that it's suitable to call g_dbus_connection_register_object() or
+ * similar from the signal handler.
+ *
+ * run.
+ *
+ * Returns: %TRUE to claim @connection, %FALSE to let other handlers
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusServer:active:
+ *
+ * Whether the server is currently active.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusServer:address:
+ *
+ * The D-Bus address to listen on.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusServer:authentication-observer:
+ *
+ * A #GDBusAuthObserver object to assist in the authentication process or %NULL.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusServer:client-address:
+ *
+ * The D-Bus address that clients can use.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusServer:flags:
+ *
+ * Flags from the #GDBusServerFlags enumeration.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusServer:guid:
+ *
+ * The guid of the server.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusServerClass:
+ * @new_connection: Signal class handler for the #GDBusServer::new-connection signal.
+ *
+ * Class structure for #GDBusServer.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusServerFlags:
+ * @G_DBUS_SERVER_FLAGS_NONE: No flags set.
+ * @G_DBUS_SERVER_FLAGS_RUN_IN_THREAD: All #GDBusServer::new-connection signals will run in separated dedicated threads (see signal for details).
+ * @G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS: Allow the anonymous authentication method.
+ *
+ * Flags used when creating a #GDBusServer.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusSignalCallback:
+ * @connection: A #GDBusConnection.
+ * @sender_name: The unique bus name of the sender of the signal.
+ * @object_path: The object path that the signal was emitted on.
+ * @interface_name: The name of the interface.
+ * @signal_name: The name of the signal.
+ * @parameters: A #GVariant tuple with parameters for the signal.
+ * @user_data: User data passed when subscribing to the signal.
+ *
+ * Signature for callback function used in g_dbus_connection_signal_subscribe().
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusSignalFlags:
+ * @G_DBUS_SIGNAL_FLAGS_NONE: No flags set.
+ * @G_DBUS_SIGNAL_FLAGS_NO_MATCH_RULE: Don't actually send the AddMatch D-Bus call for this signal subscription.  This gives you more control over which match rules you add (but you must add them manually).
+ *
+ * Flags used when subscribing to signals via g_dbus_connection_signal_subscribe().
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusSignalInfo:
+ * @ref_count: The reference count or -1 if statically allocated.
+ * @name: The name of the D-Bus signal, e.g. "NameOwnerChanged".
+ * @args: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no arguments.
+ * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
+ *
+ * Information about a signal on a D-Bus interface.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusSubtreeDispatchFunc:
+ * @connection: A #GDBusConnection.
+ * @sender: The unique bus name of the remote caller.
+ * @object_path: The object path that was registered with g_dbus_connection_register_subtree().
+ * @interface_name: The D-Bus interface name that the method call or property access is for.
+ * @node: A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree.
+ * @out_user_data: Return location for user data to pass to functions in the returned #GDBusInterfaceVTable (never %NULL).
+ * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
+ *
+ * The type of the @dispatch function in #GDBusSubtreeVTable.
+ *
+ * Subtrees are flat.  @node, if non-%NULL, is always exactly one
+ * segment of the object path (ie: it never contains a slash).
+ *
+ * Returns: A #GDBusInterfaceVTable or %NULL if you don't want to handle the methods.
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusSubtreeEnumerateFunc:
+ * @connection: A #GDBusConnection.
+ * @sender: The unique bus name of the remote caller.
+ * @object_path: The object path that was registered with g_dbus_connection_register_subtree().
+ * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
+ *
+ * The type of the @enumerate function in #GDBusSubtreeVTable.
+ *
+ * This function is called when generating introspection data and also
+ * when preparing to dispatch incoming messages in the event that the
+ * %G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is not
+ * specified (ie: to verify that the object path is valid).
+ *
+ * Hierarchies are not supported; the items that you return should not
+ * contain the '/' character.
+ *
+ * The return value will be freed with g_strfreev().
+ *
+ * Returns: A newly allocated array of strings for node names that are children of @object_path.
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusSubtreeFlags:
+ * @G_DBUS_SUBTREE_FLAGS_NONE: No flags set.
+ * @G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES: Method calls to objects not in the enumerated range will still be dispatched. This is useful if you want to dynamically spawn objects in the subtree.
+ *
+ * Flags passed to g_dbus_connection_register_subtree().
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusSubtreeIntrospectFunc:
+ * @connection: A #GDBusConnection.
+ * @sender: The unique bus name of the remote caller.
+ * @object_path: The object path that was registered with g_dbus_connection_register_subtree().
+ * @node: A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree.
+ * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
+ *
+ * The type of the @introspect function in #GDBusSubtreeVTable.
+ *
+ * Subtrees are flat.  @node, if non-%NULL, is always exactly one
+ * segment of the object path (ie: it never contains a slash).
+ *
+ * This function should return %NULL to indicate that there is no object
+ * at this node.
+ *
+ * If this function returns non-%NULL, the return value is expected to
+ * be a %NULL-terminated array of pointers to #GDBusInterfaceInfo
+ * structures describing the interfaces implemented by @node.  This
+ * array will have g_dbus_interface_info_unref() called on each item
+ * before being freed with g_free().
+ *
+ * The difference between returning %NULL and an array containing zero
+ * items is that the standard DBus interfaces will returned to the
+ * remote introspector in the empty array case, but not in the %NULL
+ * case.
+ *
+ * Returns: A %NULL-terminated array of pointers to #GDBusInterfaceInfo, or %NULL.
+ * Since: 2.26
+ */
+
+
+/**
+ * GDBusSubtreeVTable:
+ * @enumerate: Function for enumerating child nodes.
+ * @introspect: Function for introspecting a child node.
+ * @dispatch: Function for dispatching a remote call on a child node.
+ *
+ * Virtual table for handling subtrees registered with g_dbus_connection_register_subtree().
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDataInputStream:
+ *
+ * An implementation of #GBufferedInputStream that allows for high-level
+ * data manipulation of arbitrary data (including binary operations).
+ */
+
+
+/**
+ * GDataOutputStream:
+ *
+ * An implementation of #GBufferedOutputStream that allows for high-level
+ * data manipulation of arbitrary data (including binary operations).
+ */
+
+
+/**
+ * GDataOutputStream:byte-order:
+ *
+ * Determines the byte ordering that is used when writing
+ * multi-byte entities (such as integers) to the stream.
+ */
+
+
+/**
+ * GDataStream:byte-order:
+ *
+ * The ::byte-order property determines the byte ordering that
+ * is used when reading multi-byte entities (such as integers)
+ * from the stream.
+ */
+
+
+/**
+ * GDataStream:newline-type:
+ *
+ * The :newline-type property determines what is considered
+ * as a line ending when reading complete lines from the stream.
+ */
+
+
+/**
+ * GDataStreamByteOrder:
+ * @G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN: Selects Big Endian byte order.
+ * @G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN: Selects Little Endian byte order.
+ * @G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN: Selects endianness based on host machine's architecture.
+ *
+ * #GDataStreamByteOrder is used to ensure proper endianness of streaming data sources
+ * across various machine architectures.
+ */
+
+
+/**
+ * GDataStreamNewlineType:
+ * @G_DATA_STREAM_NEWLINE_TYPE_LF: Selects "LF" line endings, common on most modern UNIX platforms.
+ * @G_DATA_STREAM_NEWLINE_TYPE_CR: Selects "CR" line endings.
+ * @G_DATA_STREAM_NEWLINE_TYPE_CR_LF: Selects "CR, LF" line ending, common on Microsoft Windows.
+ * @G_DATA_STREAM_NEWLINE_TYPE_ANY: Automatically try to handle any line ending type.
+ *
+ * #GDataStreamNewlineType is used when checking for or setting the line endings for a given file.
+ */
+
+
+/**
+ * GDateTime:
+ *
+ * <structname>GDateTime</structname> is an opaque structure whose members
+ * cannot be accessed directly.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDebugKey:
+ * @key: the string
+ * @value: the flag
+ *
+ * Associates a string with a bit flag.
+ * Used in g_parse_debug_string().
+ */
+
+
+/**
+ * GDesktopAppInfo:
+ *
+ * Information about an installed application from a desktop file.
+ */
+
+
+/**
+ * GDesktopAppInfo:filename:
+ *
+ * The origin filename of this #GDesktopAppInfo
+ */
+
+
+/**
+ * GDesktopAppInfoLookup:
+ *
+ * Interface that is used by backends to associate default
+ * handlers with URI schemes.
+ */
+
+
+/**
+ * GDesktopAppLaunchCallback:
+ * @appinfo: a #GDesktopAppInfo
+ * @pid: Process identifier
+ * @user_data: User data
+ *
+ * During invocation, g_desktop_app_info_launch_uris_as_manager() may
+ * create one or more child processes.  This callback is invoked once
+ * for each, providing the process ID.
+ */
+
+
+/**
+ * GDrive:
+ *
+ * Opaque drive object.
+ */
+
+
+/**
+ * GDrive::changed:
+ * @drive: a #GDrive.
+ *
+ * Emitted when the drive's state has changed.
+ */
+
+
+/**
+ * GDrive::disconnected:
+ * @drive: a #GDrive.
+ *
+ * This signal is emitted when the #GDrive have been
+ * disconnected. If the recipient is holding references to the
+ * object they should release them so the object can be
+ * finalized.
+ */
+
+
+/**
+ * GDrive::eject-button:
+ * @drive: a #GDrive.
+ *
+ * Emitted when the physical eject button (if any) of a drive has
+ * been pressed.
+ */
+
+
+/**
+ * GDrive::stop-button:
+ * @drive: a #GDrive.
+ *
+ * Emitted when the physical stop button (if any) of a drive has
+ * been pressed.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GDriveIface:
+ * @g_iface: The parent interface.
+ * @changed: Signal emitted when the drive is changed.
+ * @disconnected: The removed signal that is emitted when the #GDrive have been disconnected. If the recipient is holding references to the object they should release them so the object can be finalized.
+ * @eject_button: Signal emitted when the physical eject button (if any) of a drive have been pressed.
+ * @get_name: Returns the name for the given #GDrive.
+ * @get_icon: Returns a #GIcon for the given #GDrive.
+ * @has_volumes: Returns %TRUE if the #GDrive has mountable volumes.
+ * @get_volumes: Returns a list #GList of #GVolume for the #GDrive.
+ * @is_media_removable: Returns %TRUE if the #GDrive supports removal and insertion of media.
+ * @has_media: Returns %TRUE if the #GDrive has media inserted.
+ * @is_media_check_automatic: Returns %TRUE if the #GDrive is capabable of automatically detecting media changes.
+ * @can_poll_for_media: Returns %TRUE if the #GDrive is capable of manually polling for media change.
+ * @can_eject: Returns %TRUE if the #GDrive can eject media.
+ * @eject: Ejects a #GDrive.
+ * @eject_finish: Finishes an eject operation.
+ * @poll_for_media: Poll for media insertion/removal on a #GDrive.
+ * @poll_for_media_finish: Finishes a media poll operation.
+ * @get_identifier: Returns the identifier of the given kind, or %NULL if the #GDrive doesn't have one.
+ * @enumerate_identifiers: Returns an array strings listing the kinds of identifiers which the #GDrive has.
+ * @get_start_stop_type: Gets a #GDriveStartStopType with details about starting/stopping the drive. Since 2.22.
+ * @can_stop: Returns %TRUE if a #GDrive can be stopped. Since 2.22.
+ * @stop: Stops a #GDrive. Since 2.22.
+ * @stop_finish: Finishes a stop operation. Since 2.22.
+ * @can_start: Returns %TRUE if a #GDrive can be started. Since 2.22.
+ * @can_start_degraded: Returns %TRUE if a #GDrive can be started degraded. Since 2.22.
+ * @start: Starts a #GDrive. Since 2.22.
+ * @start_finish: Finishes a start operation. Since 2.22.
+ * @stop_button: Signal emitted when the physical stop button (if any) of a drive have been pressed. Since 2.22.
+ * @eject_with_operation: Starts ejecting a #GDrive using a #GMountOperation. Since 2.22.
+ * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
+ * @get_sort_key: Gets a key used for sorting #GDrive instances or %NULL if no such key exists. Since 2.32.
+ *
+ * Interface for creating #GDrive implementations.
+ */
+
+
+/**
+ * GDriveStartFlags:
+ * @G_DRIVE_START_NONE: No flags set.
+ *
+ * Flags used when starting a drive.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GDriveStartStopType:
+ * @G_DRIVE_START_STOP_TYPE_UNKNOWN: Unknown or drive doesn't support start/stop.
+ * @G_DRIVE_START_STOP_TYPE_SHUTDOWN: The stop method will physically shut down the drive and e.g. power down the port the drive is attached to.
+ * @G_DRIVE_START_STOP_TYPE_NETWORK: The start/stop methods are used for connecting/disconnect to the drive over the network.
+ * @G_DRIVE_START_STOP_TYPE_MULTIDISK: The start/stop methods will assemble/disassemble a virtual drive from several physical drives.
+ * @G_DRIVE_START_STOP_TYPE_PASSWORD: The start/stop methods will unlock/lock the disk (for example using the ATA <quote>SECURITY UNLOCK DEVICE</quote> command)
+ *
+ * Enumeration describing how a drive can be started/stopped.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GEmblem:
+ *
+ * An object for Emblems
+ */
+
+
+/**
+ * GEmblemOrigin:
+ * @G_EMBLEM_ORIGIN_UNKNOWN: Emblem of unknown origin
+ * @G_EMBLEM_ORIGIN_DEVICE: Emblem adds device-specific information
+ * @G_EMBLEM_ORIGIN_LIVEMETADATA: Emblem depicts live metadata, such as "readonly"
+ * @G_EMBLEM_ORIGIN_TAG: Emblem comes from a user-defined tag, e.g. set by nautilus (in the future)
+ *
+ * GEmblemOrigin is used to add information about the origin of the emblem
+ * to #GEmblem.
+ *
+ * Since: 2.18
+ */
+
+
+/**
+ * GEmblemedIcon:
+ *
+ * An implementation of #GIcon for icons with emblems.
+ */
+
+
+/**
+ * GEnumClass:
+ * @g_type_class: the parent class
+ * @minimum: the smallest possible value.
+ * @maximum: the largest possible value.
+ * @n_values: the number of possible values.
+ * @values: an array of #GEnumValue structs describing the individual values.
+ *
+ * The class of an enumeration type holds information about its
+ * possible values.
+ */
+
+
+/**
+ * GEnumValue:
+ * @value: the enum value
+ * @value_name: the name of the value
+ * @value_nick: the nickname of the value
+ *
+ * A structure which contains a single enum value, its name, and its
+ * nickname.
+ */
+
+
+/**
+ * GError:
+ * @domain: error domain, e.g. #G_FILE_ERROR
+ * @code: error code, e.g. %G_FILE_ERROR_NOENT
+ * @message: human-readable informative error message
+ *
+ * The <structname>GError</structname> structure contains
+ * information about an error that has occurred.
+ */
+
+
+/**
+ * GFile:
+ *
+ * A handle to an object implementing the #GFileIface interface.
+ * Generally stores a location within the file system. Handles do not
+ * necessarily represent files or directories that currently exist.
+ */
+
+
+/**
+ * GFileAttributeInfo:
+ * @name: the name of the attribute.
+ * @type: the #GFileAttributeType type of the attribute.
+ * @flags: a set of #GFileAttributeInfoFlags.
+ *
+ * Information about a specific attribute.
+ */
+
+
+/**
+ * GFileAttributeInfoFlags:
+ * @G_FILE_ATTRIBUTE_INFO_NONE: no flags set.
+ * @G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE: copy the attribute values when the file is copied.
+ * @G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED: copy the attribute values when the file is moved.
+ *
+ * Flags specifying the behaviour of an attribute.
+ */
+
+
+/**
+ * GFileAttributeInfoList:
+ * @infos: an array of #GFileAttributeInfo<!-- -->s.
+ * @n_infos: the number of values in the array.
+ *
+ * Acts as a lightweight registry for possible valid file attributes.
+ * The registry stores Key-Value pair formats as #GFileAttributeInfo<!-- -->s.
+ */
+
+
+/**
+ * GFileAttributeMatcher:
+ *
+ * Determines if a string matches a file attribute.
+ */
+
+
+/**
+ * GFileAttributeStatus:
+ * @G_FILE_ATTRIBUTE_STATUS_UNSET: Attribute value is unset (empty).
+ * @G_FILE_ATTRIBUTE_STATUS_SET: Attribute value is set.
+ * @G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING: Indicates an error in setting the value.
+ *
+ * Used by g_file_set_attributes_from_info() when setting file attributes.
+ */
+
+
+/**
+ * GFileAttributeType:
+ * @G_FILE_ATTRIBUTE_TYPE_INVALID: indicates an invalid or uninitalized type.
+ * @G_FILE_ATTRIBUTE_TYPE_STRING: a null terminated UTF8 string.
+ * @G_FILE_ATTRIBUTE_TYPE_BYTE_STRING: a zero terminated string of non-zero bytes.
+ * @G_FILE_ATTRIBUTE_TYPE_BOOLEAN: a boolean value.
+ * @G_FILE_ATTRIBUTE_TYPE_UINT32: an unsigned 4-byte/32-bit integer.
+ * @G_FILE_ATTRIBUTE_TYPE_INT32: a signed 4-byte/32-bit integer.
+ * @G_FILE_ATTRIBUTE_TYPE_UINT64: an unsigned 8-byte/64-bit integer.
+ * @G_FILE_ATTRIBUTE_TYPE_INT64: a signed 8-byte/64-bit integer.
+ * @G_FILE_ATTRIBUTE_TYPE_OBJECT: a #GObject.
+ * @G_FILE_ATTRIBUTE_TYPE_STRINGV: a %NULL terminated char **. Since 2.22
+ *
+ * The data types for file attributes.
+ */
+
+
+/**
+ * GFileCopyFlags:
+ * @G_FILE_COPY_NONE: No flags set.
+ * @G_FILE_COPY_OVERWRITE: Overwrite any existing files
+ * @G_FILE_COPY_BACKUP: Make a backup of any existing files.
+ * @G_FILE_COPY_NOFOLLOW_SYMLINKS: Don't follow symlinks.
+ * @G_FILE_COPY_ALL_METADATA: Copy all file metadata instead of just default set used for copy (see #GFileInfo).
+ * @G_FILE_COPY_NO_FALLBACK_FOR_MOVE: Don't use copy and delete fallback if native move not supported.
+ * @G_FILE_COPY_TARGET_DEFAULT_PERMS: Leaves target file with default perms, instead of setting the source file perms.
+ *
+ * Flags used when copying or moving files.
+ */
+
+
+/**
+ * GFileCreateFlags:
+ * @G_FILE_CREATE_NONE: No flags set.
+ * @G_FILE_CREATE_PRIVATE: Create a file that can only be accessed by the current user.
+ * @G_FILE_CREATE_REPLACE_DESTINATION: 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. Since 2.20
+ *
+ * Flags used when an operation may create a file.
+ */
+
+
+/**
+ * GFileDescriptorBased:
+ *
+ * An interface for file descriptor based io objects.
+ */
+
+
+/**
+ * GFileDescriptorBasedIface:
+ * @g_iface: The parent interface.
+ *
+ *
+ */
+
+
+/**
+ * GFileEnumerator:
+ *
+ * A per matched file iterator.
+ */
+
+
+/**
+ * GFileIOStream:
+ *
+ * A subclass of GIOStream for opened files. This adds
+ * a few file-specific operations and seeking and truncating.
+ *
+ * #GFileIOStream implements GSeekable.
+ */
+
+
+/**
+ * GFileIcon:
+ *
+ * Gets an icon for a #GFile. Implements #GLoadableIcon.
+ */
+
+
+/**
+ * GFileIcon:file:
+ *
+ * The file containing the icon.
+ */
+
+
+/**
+ * GFileIface:
+ * @g_iface: The parent interface.
+ * @dup: Duplicates a #GFile.
+ * @hash: Creates a hash of a #GFile.
+ * @equal: Checks equality of two given #GFile<!-- -->s.
+ * @is_native: Checks to see if a file is native to the system.
+ * @has_uri_scheme: Checks to see if a #GFile has a given URI scheme.
+ * @get_uri_scheme: Gets the URI scheme for a #GFile.
+ * @get_basename: Gets the basename for a given #GFile.
+ * @get_path: Gets the current path within a #GFile.
+ * @get_uri: Gets a URI for the path within a #GFile.
+ * @get_parse_name: Gets the parsed name for the #GFile.
+ * @get_parent: Gets the parent directory for the #GFile.
+ * @prefix_matches: Checks whether a #GFile contains a specified file.
+ * @get_relative_path: Gets the path for a #GFile relative to a given path.
+ * @resolve_relative_path: Resolves a relative path for a #GFile to an absolute path.
+ * @get_child_for_display_name: Gets the child #GFile for a given display name.
+ * @enumerate_children: Gets a #GFileEnumerator with the children of a #GFile.
+ * @enumerate_children_async: Asynchronously gets a #GFileEnumerator with the children of a #GFile.
+ * @enumerate_children_finish: Finishes asynchronously enumerating the children.
+ * @query_info: Gets the #GFileInfo for a #GFile.
+ * @query_info_async: Asynchronously gets the #GFileInfo for a #GFile.
+ * @query_info_finish: Finishes an asynchronous query info operation.
+ * @query_filesystem_info: Gets a #GFileInfo for the file system #GFile is on.
+ * @query_filesystem_info_async: Asynchronously gets a #GFileInfo for the file system #GFile is on.
+ * @query_filesystem_info_finish: Finishes asynchronously getting the file system info.
+ * @find_enclosing_mount: Gets a #GMount for the #GFile.
+ * @find_enclosing_mount_async: Asynchronously gets the #GMount for a #GFile.
+ * @find_enclosing_mount_finish: Finishes asynchronously getting the volume.
+ * @set_display_name: Sets the display name for a #GFile.
+ * @set_display_name_async: Asynchronously sets a #GFile's display name.
+ * @set_display_name_finish: Finishes asynchronously setting a #GFile's display name.
+ * @query_settable_attributes: Returns a list of #GFileAttribute<!-- -->s that can be set.
+ * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttribute<!-- -->s that can be set.
+ * @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes.
+ * @query_writable_namespaces: Returns a list of #GFileAttribute namespaces that are writable.
+ * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttribute namespaces that are writable.
+ * @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces.
+ * @set_attribute: Sets a #GFileAttribute.
+ * @set_attributes_from_info: Sets a #GFileAttribute with information from a #GFileInfo.
+ * @set_attributes_async: Asynchronously sets a file's attributes.
+ * @set_attributes_finish: Finishes setting a file's attributes asynchronously.
+ * @read_fn: Reads a file asynchronously.
+ * @read_async: Asynchronously reads a file.
+ * @read_finish: Finishes asynchronously reading a file.
+ * @append_to: Writes to the end of a file.
+ * @append_to_async: Asynchronously writes to the end of a file.
+ * @append_to_finish: Finishes an asynchronous file append operation.
+ * @create: Creates a new file.
+ * @create_async: Asynchronously creates a file.
+ * @create_finish: Finishes asynchronously creating a file.
+ * @replace: Replaces the contents of a file.
+ * @replace_async: Asynchronously replaces the contents of a file.
+ * @replace_finish: Finishes asynchronously replacing a file.
+ * @delete_file: Deletes a file.
+ * @_delete_file_async: Asynchronously deletes a file.
+ * @_delete_file_finish: Finishes an asynchronous delete.
+ * @trash: Sends a #GFile to the Trash location.
+ * @_trash_async: Asynchronously sends a #GFile to the Trash location.
+ * @_trash_finish: Finishes an asynchronous file trashing operation.
+ * @make_directory: Makes a directory.
+ * @_make_directory_async: Asynchronously makes a directory.
+ * @_make_directory_finish: Finishes making a directory asynchronously.
+ * @make_symbolic_link: Makes a symbolic link.
+ * @_make_symbolic_link_async: Asynchronously makes a symbolic link
+ * @_make_symbolic_link_finish: Finishes making a symbolic link asynchronously.
+ * @copy: Copies a file.
+ * @copy_async: Asynchronously copies a file.
+ * @copy_finish: Finishes an asynchronous copy operation.
+ * @move: Moves a file.
+ * @_move_async: Asynchronously moves a file.
+ * @_move_finish: Finishes an asynchronous move operation.
+ * @mount_mountable: Mounts a mountable object.
+ * @mount_mountable_finish: Finishes a mounting operation.
+ * @unmount_mountable: Unmounts a mountable object.
+ * @unmount_mountable_finish: Finishes an unmount operation.
+ * @eject_mountable: Ejects a mountable.
+ * @eject_mountable_finish: Finishes an eject operation.
+ * @mount_enclosing_volume: Mounts a specified location.
+ * @mount_enclosing_volume_finish: Finishes mounting a specified location.
+ * @monitor_dir: Creates a #GFileMonitor for the location.
+ * @monitor_file: Creates a #GFileMonitor for the location.
+ * @open_readwrite: Open file read/write. Since 2.22.
+ * @open_readwrite_async: Asynchronously opens file read/write. Since 2.22.
+ * @open_readwrite_finish: Finishes an asynchronous open read/write. Since 2.22.
+ * @create_readwrite: Creates file read/write. Since 2.22.
+ * @create_readwrite_async: Asynchronously creates file read/write. Since 2.22.
+ * @create_readwrite_finish: Finishes an asynchronous creates read/write. Since 2.22.
+ * @replace_readwrite: Replaces file read/write. Since 2.22.
+ * @replace_readwrite_async: Asynchronously replaces file read/write. Since 2.22.
+ * @replace_readwrite_finish: Finishes an asynchronous replace read/write. Since 2.22.
+ * @start_mountable: Starts a mountable object. Since 2.22.
+ * @start_mountable_finish: Finishes an start operation. Since 2.22.
+ * @stop_mountable: Stops a mountable. Since 2.22.
+ * @stop_mountable_finish: Finishes an stop operation. Since 2.22.
+ * @supports_thread_contexts: a boolean that indicates whether the #GFile implementation supports thread-default contexts. Since 2.22.
+ * @unmount_mountable_with_operation: Unmounts a mountable object using a #GMountOperation. Since 2.22.
+ * @unmount_mountable_with_operation_finish: Finishes an unmount operation using a #GMountOperation. Since 2.22.
+ * @eject_mountable_with_operation: Ejects a mountable object using a #GMountOperation. Since 2.22.
+ * @eject_mountable_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
+ * @poll_mountable: Polls a mountable object for media changes. Since 2.22.
+ * @poll_mountable_finish: Finishes an poll operation for media changes. Since 2.22.
+ *
+ * An interface for writing VFS file handles.
+ */
+
+
+/**
+ * GFileInfo:
+ *
+ * Stores information about a file system object referenced by a #GFile.
+ */
+
+
+/**
+ * GFileInputStream:
+ *
+ * A subclass of GInputStream for opened files. This adds
+ * a few file-specific operations and seeking.
+ *
+ * #GFileInputStream implements #GSeekable.
+ */
+
+
+/**
+ * GFileMonitor:
+ *
+ * Watches for changes to a file.
+ */
+
+
+/**
+ * GFileMonitor::changed:
+ * @monitor: a #GFileMonitor.
+ * @file: a #GFile.
+ * @other_file: (allow-none): a #GFile or #NULL.
+ * @event_type: a #GFileMonitorEvent.
+ *
+ * Emitted when @file has been changed.
+ *
+ * If using #G_FILE_MONITOR_SEND_MOVED flag and @event_type is
+ * #G_FILE_MONITOR_EVENT_MOVED, @file will be set to a #GFile containing the
+ * old path, and @other_file will be set to a #GFile containing the new path.
+ *
+ * In all the other cases, @other_file will be set to #NULL.
+ */
+
+
+/**
+ * GFileMonitorEvent:
+ * @G_FILE_MONITOR_EVENT_CHANGED: a file changed.
+ * @G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT: a hint that this was probably the last change in a set of changes.
+ * @G_FILE_MONITOR_EVENT_DELETED: a file was deleted.
+ * @G_FILE_MONITOR_EVENT_CREATED: a file was created.
+ * @G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED: a file attribute was changed.
+ * @G_FILE_MONITOR_EVENT_PRE_UNMOUNT: the file location will soon be unmounted.
+ * @G_FILE_MONITOR_EVENT_UNMOUNTED: the file location was unmounted.
+ * @G_FILE_MONITOR_EVENT_MOVED: the file was moved.
+ *
+ * Specifies what type of event a monitor event is.
+ */
+
+
+/**
+ * GFileMonitorFlags:
+ * @G_FILE_MONITOR_NONE: No flags set.
+ * @G_FILE_MONITOR_WATCH_MOUNTS: Watch for mount events.
+ * @G_FILE_MONITOR_SEND_MOVED: Pair DELETED and CREATED events caused by file renames (moves) and send a single G_FILE_MONITOR_EVENT_MOVED event instead (NB: not supported on all backends; the default behaviour -without specifying this flag- is to send single DELETED and CREATED events).
+ *
+ * Flags used to set what a #GFileMonitor will watch for.
+ */
+
+
+/**
+ * GFileOutputStream:
+ *
+ * A subclass of GOutputStream for opened files. This adds
+ * a few file-specific operations and seeking and truncating.
+ *
+ * #GFileOutputStream implements GSeekable.
+ */
+
+
+/**
+ * GFileProgressCallback:
+ * @current_num_bytes: the current number of bytes in the operation.
+ * @total_num_bytes: the total number of bytes in the operation.
+ * @user_data: user data passed to the callback.
+ *
+ * When doing file operations that may take a while, such as moving
+ * a file or copying a file, a progress callback is used to pass how
+ * far along that operation is to the application.
+ */
+
+
+/**
+ * GFileQueryInfoFlags:
+ * @G_FILE_QUERY_INFO_NONE: No flags set.
+ * @G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS: Don't follow symlinks.
+ *
+ * Flags used when querying a #GFileInfo.
+ */
+
+
+/**
+ * GFileReadMoreCallback:
+ * @file_contents: the data as currently read.
+ * @file_size: the size of the data currently read.
+ * @callback_data: data passed to the callback.
+ *
+ * When loading the partial contents of a file with g_file_load_partial_contents_async(),
+ * it may become necessary to determine if any more data from the file should be loaded.
+ * A #GFileReadMoreCallback function facilitates this by returning %TRUE if more data
+ * should be read, or %FALSE otherwise.
+ *
+ * Returns: %TRUE if more data should be read back. %FALSE otherwise.
+ */
+
+
+/**
+ * GFileType:
+ * @G_FILE_TYPE_UNKNOWN: File's type is unknown.
+ * @G_FILE_TYPE_REGULAR: File handle represents a regular file.
+ * @G_FILE_TYPE_DIRECTORY: File handle represents a directory.
+ * @G_FILE_TYPE_SYMBOLIC_LINK: File handle represents a symbolic link (Unix systems).
+ * @G_FILE_TYPE_SPECIAL: File is a "special" file, such as a socket, fifo, block device, or character device.
+ * @G_FILE_TYPE_SHORTCUT: File is a shortcut (Windows systems).
+ * @G_FILE_TYPE_MOUNTABLE: File is a mountable location.
+ *
+ * Indicates the file's on-disk type.
+ */
+
+
+/**
+ * GFilenameCompleter:
+ *
+ * Completes filenames based on files that exist within the file system.
+ */
+
+
+/**
+ * GFilenameCompleter::got-completion-data:
+ *
+ * Emitted when the file name completion information comes available.
+ */
+
+
+/**
+ * GFilesystemPreviewType:
+ * @G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS: Only preview files if user has explicitly requested it.
+ * @G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL: Preview files if user has requested preview of "local" files.
+ * @G_FILESYSTEM_PREVIEW_TYPE_NEVER: Never preview files.
+ *
+ * Indicates a hint from the file system whether files should be
+ * previewed in a file manager. Returned as the value of the key
+ * #G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW.
+ */
+
+
+/**
+ * GFilterInputStream:
+ *
+ * A base class for all input streams that work on an underlying stream.
+ */
+
+
+/**
+ * GFilterOutputStream:
+ *
+ * A base class for all output streams that work on an underlying stream.
+ */
+
+
+/**
+ * GFlagsClass:
+ * @g_type_class: the parent class
+ * @mask: a mask covering all possible values.
+ * @n_values: the number of possible values.
+ * @values: an array of #GFlagsValue structs describing the individual values.
+ *
+ * The class of a flags type holds information about its
+ * possible values.
+ */
+
+
+/**
+ * GFlagsValue:
+ * @value: the flags value
+ * @value_name: the name of the value
+ * @value_nick: the nickname of the value
+ *
+ * A structure which contains a single flags value, its name, and its
+ * nickname.
+ */
+
+
+/**
+ * GFreeFunc:
+ * @data: a data pointer
+ *
+ * Declares a type of function which takes an arbitrary
+ * data pointer argument and has no return value. It is
+ * not currently used in GLib or GTK+.
+ */
+
+
+/**
+ * GHmac:
+ *
+ * An opaque structure representing a HMAC operation.
+ * To create a new GHmac, use g_hmac_new(). To free
+ * a GHmac, use g_hmac_unref().
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GIOErrorEnum:
+ * @G_IO_ERROR_FAILED: Generic error condition for when any operation fails.
+ * @G_IO_ERROR_NOT_FOUND: File not found.
+ * @G_IO_ERROR_EXISTS: File already exists.
+ * @G_IO_ERROR_IS_DIRECTORY: File is a directory.
+ * @G_IO_ERROR_NOT_DIRECTORY: File is not a directory.
+ * @G_IO_ERROR_NOT_EMPTY: File is a directory that isn't empty.
+ * @G_IO_ERROR_NOT_REGULAR_FILE: File is not a regular file.
+ * @G_IO_ERROR_NOT_SYMBOLIC_LINK: File is not a symbolic link.
+ * @G_IO_ERROR_NOT_MOUNTABLE_FILE: File cannot be mounted.
+ * @G_IO_ERROR_FILENAME_TOO_LONG: Filename is too many characters.
+ * @G_IO_ERROR_INVALID_FILENAME: Filename is invalid or contains invalid characters.
+ * @G_IO_ERROR_TOO_MANY_LINKS: File contains too many symbolic links.
+ * @G_IO_ERROR_NO_SPACE: No space left on drive.
+ * @G_IO_ERROR_INVALID_ARGUMENT: Invalid argument.
+ * @G_IO_ERROR_PERMISSION_DENIED: Permission denied.
+ * @G_IO_ERROR_NOT_SUPPORTED: Operation not supported for the current backend.
+ * @G_IO_ERROR_NOT_MOUNTED: File isn't mounted.
+ * @G_IO_ERROR_ALREADY_MOUNTED: File is already mounted.
+ * @G_IO_ERROR_CLOSED: File was closed.
+ * @G_IO_ERROR_CANCELLED: Operation was cancelled. See #GCancellable.
+ * @G_IO_ERROR_PENDING: Operations are still pending.
+ * @G_IO_ERROR_READ_ONLY: File is read only.
+ * @G_IO_ERROR_CANT_CREATE_BACKUP: Backup couldn't be created.
+ * @G_IO_ERROR_WRONG_ETAG: File's Entity Tag was incorrect.
+ * @G_IO_ERROR_TIMED_OUT: Operation timed out.
+ * @G_IO_ERROR_WOULD_RECURSE: Operation would be recursive.
+ * @G_IO_ERROR_BUSY: File is busy.
+ * @G_IO_ERROR_WOULD_BLOCK: Operation would block.
+ * @G_IO_ERROR_HOST_NOT_FOUND: Host couldn't be found (remote operations).
+ * @G_IO_ERROR_WOULD_MERGE: Operation would merge files.
+ * @G_IO_ERROR_FAILED_HANDLED: Operation failed and a helper program has already interacted with the user. Do not display any error dialog.
+ * @G_IO_ERROR_TOO_MANY_OPEN_FILES: The current process has too many files open and can't open any more. Duplicate descriptors do count toward this limit. Since 2.20
+ * @G_IO_ERROR_NOT_INITIALIZED: The object has not been initialized. Since 2.22
+ * @G_IO_ERROR_ADDRESS_IN_USE: The requested address is already in use. Since 2.22
+ * @G_IO_ERROR_PARTIAL_INPUT: Need more input to finish operation. Since 2.24
+ * @G_IO_ERROR_INVALID_DATA: There input data was invalid. Since 2.24
+ * @G_IO_ERROR_DBUS_ERROR: A remote object generated an error that doesn't correspond to a locally registered #GError error domain. Use g_dbus_error_get_remote_error() to extract the D-Bus error name and g_dbus_error_strip_remote_error() to fix up the message so it matches what was received on the wire. Since 2.26.
+ * @G_IO_ERROR_HOST_UNREACHABLE: Host unreachable. Since 2.26
+ * @G_IO_ERROR_NETWORK_UNREACHABLE: Network unreachable. Since 2.26
+ * @G_IO_ERROR_CONNECTION_REFUSED: Connection refused. Since 2.26
+ * @G_IO_ERROR_PROXY_FAILED: Connection to proxy server failed. Since 2.26
+ * @G_IO_ERROR_PROXY_AUTH_FAILED: Proxy authentication failed. Since 2.26
+ * @G_IO_ERROR_PROXY_NEED_AUTH: Proxy server needs authentication. Since 2.26
+ * @G_IO_ERROR_PROXY_NOT_ALLOWED: Proxy connection is not allowed by ruleset. Since 2.26
+ *
+ * Error codes returned by GIO functions.
+ */
+
+
+/**
+ * GIOModule:
+ *
+ * Opaque module base class for extending GIO.
+ */
+
+
+/**
+ * GIOModuleScope:
+ *
+ * Represents a scope for loading IO modules. A scope can be used for blocking
+ * duplicate modules, or blocking a module you don't want to load.
+ *
+ * The scope can be used with g_io_modules_load_all_in_directory_with_scope()
+ * or g_io_modules_scan_all_in_directory_with_scope().
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GIOModuleScopeFlags:
+ * @G_IO_MODULE_SCOPE_NONE: No module scan flags
+ * @G_IO_MODULE_SCOPE_BLOCK_DUPLICATES: When using this scope to load or scan modules, automatically block a modules which has the same base basename as previously loaded module.
+ *
+ * Flags for use with g_io_module_scope_new().
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GIOSchedulerJob:
+ *
+ * Opaque class for defining and scheduling IO jobs.
+ */
+
+
+/**
+ * GIOSchedulerJobFunc:
+ * @job: a #GIOSchedulerJob.
+ * @cancellable: optional #GCancellable object, %NULL to ignore.
+ * @user_data: the data to pass to callback function
+ *
+ * I/O Job function.
+ *
+ * Long-running jobs should periodically check the @cancellable
+ * to see if they have been cancelled.
+ *
+ * complete the job, %FALSE if the job is complete (or cancelled)
+ *
+ * Returns: %TRUE if this function should be called again to
+ */
+
+
+/**
+ * GIOStream:
+ *
+ * Base class for read-write streams.
+ */
+
+
+/**
+ * GIOStreamSpliceFlags:
+ * @G_IO_STREAM_SPLICE_NONE: Do not close either stream.
+ * @G_IO_STREAM_SPLICE_CLOSE_STREAM1: Close the first stream after the splice.
+ * @G_IO_STREAM_SPLICE_CLOSE_STREAM2: Close the second stream after the splice.
+ * @G_IO_STREAM_SPLICE_WAIT_FOR_BOTH: Wait for both splice operations to finish before calling the callback.
+ *
+ * GIOStreamSpliceFlags determine how streams should be spliced.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GIcon:
+ *
+ * An abstract type that specifies an icon.
+ */
+
+
+/**
+ * GIconIface:
+ * @g_iface: The parent interface.
+ * @hash: A hash for a given #GIcon.
+ * @equal: Checks if two #GIcon<!-- -->s are equal.
+ * @to_tokens: Serializes a #GIcon into tokens. The tokens must not contain any whitespace. Don't implement if the #GIcon can't be serialized (Since 2.20).
+ * @from_tokens: Constructs a #GIcon from tokens. Set the #GError if the tokens are malformed. Don't implement if the #GIcon can't be serialized (Since 2.20).
+ *
+ * GIconIface is used to implement GIcon types for various
+ * different systems. See #GThemedIcon and #GLoadableIcon for
+ * examples of how to implement this interface.
+ */
+
+
+/**
+ * GIconv:
+ *
+ * The <structname>GIConv</structname> struct wraps an
+ * iconv() conversion descriptor. It contains private data
+ * and should only be accessed using the following functions.
+ */
+
+
+/**
+ * GInetAddress:
+ *
+ * An IPv4 or IPv6 internet address.
+ */
+
+
+/**
+ * GInetAddress:is-any:
+ *
+ * Whether this is the "any" address for its family.
+ * See g_inet_address_get_is_any().
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GInetAddress:is-link-local:
+ *
+ * Whether this is a link-local address.
+ * See g_inet_address_get_is_link_local().
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GInetAddress:is-loopback:
+ *
+ * Whether this is the loopback address for its family.
+ * See g_inet_address_get_is_loopback().
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GInetAddress:is-mc-global:
+ *
+ * Whether this is a global multicast address.
+ * See g_inet_address_get_is_mc_global().
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GInetAddress:is-mc-link-local:
+ *
+ * Whether this is a link-local multicast address.
+ * See g_inet_address_get_is_mc_link_local().
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GInetAddress:is-mc-node-local:
+ *
+ * Whether this is a node-local multicast address.
+ * See g_inet_address_get_is_mc_node_local().
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GInetAddress:is-mc-org-local:
+ *
+ * Whether this is an organization-local multicast address.
+ * See g_inet_address_get_is_mc_org_local().
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GInetAddress:is-mc-site-local:
+ *
+ * Whether this is a site-local multicast address.
+ * See g_inet_address_get_is_mc_site_local().
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GInetAddress:is-multicast:
+ *
+ * Whether this is a multicast address.
+ * See g_inet_address_get_is_multicast().
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GInetAddress:is-site-local:
+ *
+ * Whether this is a site-local address.
+ * See g_inet_address_get_is_loopback().
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GInetAddressMask:
+ *
+ * A combination of an IPv4 or IPv6 base address and a length,
+ * representing a range of IP addresses.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GInetSocketAddress:
+ *
+ * An IPv4 or IPv6 socket address, corresponding to a <type>struct
+ * sockaddr_in</type> or <type>struct sockaddr_in6</type>.
+ */
+
+
+/**
+ * GInetSocketAddress:flowinfo:
+ *
+ * The <literal>sin6_flowinfo</literal> field, for IPv6 addresses.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GInetSocketAddress:scope_id:
+ *
+ * The <literal>sin6_scope_id</literal> field, for IPv6 addresses.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GInitable:
+ *
+ * Interface for initializable objects.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GInitableIface:
+ * @g_iface: The parent interface.
+ * @init: Initializes the object.
+ *
+ * Provides an interface for initializing object such that initialization
+ * may fail.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GInitiallyUnowned:
+ *
+ * All the fields in the <structname>GInitiallyUnowned</structname> structure
+ * are private to the #GInitiallyUnowned implementation and should never be
+ * accessed directly.
+ */
+
+
+/**
+ * GInitiallyUnownedClass:
+ *
+ * The class structure for the <structname>GInitiallyUnowned</structname> type.
+ */
+
+
+/**
+ * GInputStream:
+ *
+ * Base class for streaming input operations.
+ */
+
+
+/**
+ * GInputVector:
+ * @buffer: Pointer to a buffer where data will be written.
+ * @size: the available size in @buffer.
+ *
+ * Structure used for scatter/gather data input.
+ * You generally pass in an array of #GInputVector<!-- -->s
+ * and the operation will store the read data starting in the
+ * first buffer, switching to the next as needed.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GInstanceInitFunc:
+ * @instance: The instance to initialize.
+ * @g_class: The class of the type the instance is created for.
+ *
+ * A callback function used by the type system to initialize a new
+ * instance of a type. This function initializes all instance members and
+ * allocates any resources required by it.
+ * Initialization of a derived instance involves calling all its parent
+ * types instance initializers, so the class member of the instance
+ * is altered during its initialization to always point to the class that
+ * belongs to the type the current initializer was introduced for.
+ */
+
+
+/**
+ * GInterfaceFinalizeFunc:
+ * @g_iface: The interface structure to finalize.
+ * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure.
+ *
+ * A callback function used by the type system to finalize an interface.
+ * This function should destroy any internal data and release any resources
+ * allocated by the corresponding GInterfaceInitFunc() function.
+ */
+
+
+/**
+ * GInterfaceInfo:
+ * @interface_init: location of the interface initialization function
+ * @interface_finalize: location of the interface finalization function
+ * @interface_data: user-supplied data passed to the interface init/finalize functions
+ *
+ * A structure that provides information to the type system which is
+ * used specifically for managing interface types.
+ */
+
+
+/**
+ * GInterfaceInitFunc:
+ * @g_iface: The interface structure to initialize.
+ * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure.
+ *
+ * A callback function used by the type system to initialize a new
+ * interface.  This function should initialize all internal data and
+ * allocate any resources required by the interface.
+ */
+
+
+/**
+ * GLIB_CHECK_VERSION:
+ * @major: the major version to check for
+ * @minor: the minor version to check for
+ * @micro: the micro version to check for
+ *
+ * Checks the version of the GLib library that is being compiled
+ * against.
+ *
+ * <example>
+ * <title>Checking the version of the GLib library</title>
+ * <programlisting>
+ * if (!GLIB_CHECK_VERSION (1, 2, 0))
+ * g_error ("GLib version 1.2.0 or above is needed");
+ * </programlisting>
+ * </example>
+ *
+ * See glib_check_version() for a runtime check.
+ *
+ * is the same as or newer than the passed-in version.
+ *
+ * Returns: %TRUE if the version of the GLib header files
+ */
+
+
+/**
+ * GLIB_VERSION_2_26:
+ *
+ * A macro that evaluates to the 2.26 version of GLib, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_2_28:
+ *
+ * A macro that evaluates to the 2.28 version of GLib, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_2_30:
+ *
+ * A macro that evaluates to the 2.30 version of GLib, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_2_32:
+ *
+ * A macro that evaluates to the 2.32 version of GLib, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_MAX_ALLOWED:
+ *
+ * A macro that should be defined by the user prior to including
+ * the glib.h header.
+ * The definition should be one of the predefined GLib version
+ * macros: %GLIB_VERSION_2_26, %GLIB_VERSION_2_28,...
+ *
+ * This macro defines the upper bound for the GLib API to use.
+ *
+ * If a function has been introduced in a newer version of GLib,
+ * it is possible to use this symbol to get compiler warnings when
+ * trying to use that function.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_MIN_REQUIRED:
+ *
+ * A macro that should be defined by the user prior to including
+ * the glib.h header.
+ * The definition should be one of the predefined GLib version
+ * macros: %GLIB_VERSION_2_26, %GLIB_VERSION_2_28,...
+ *
+ * This macro defines the lower bound for the GLib API to use.
+ *
+ * If a function has been deprecated in a newer version of GLib,
+ * it is possible to use this symbol to avoid the compiler warnings
+ * without disabling warning for every deprecated function.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLoadableIcon:
+ *
+ * Generic type for all kinds of icons that can be loaded
+ * as a stream.
+ */
+
+
+/**
+ * GLoadableIconIface:
+ * @g_iface: The parent interface.
+ * @load: Loads an icon.
+ * @load_async: Loads an icon asynchronously.
+ * @load_finish: Finishes an asynchronous icon load.
+ *
+ * Interface for icons that can be loaded as a stream.
+ */
+
+
+/**
+ * GMainContext:
+ *
+ * The <structname>GMainContext</structname> struct is an opaque data
+ * type representing a set of sources to be handled in a main loop.
+ */
+
+
+/**
+ * GMainLoop:
+ *
+ * The <structname>GMainLoop</structname> struct is an opaque data type
+ * representing the main event loop of a GLib or GTK+ application.
+ */
+
+
+/**
+ * GMarkupError:
+ * @G_MARKUP_ERROR_BAD_UTF8: text being parsed was not valid UTF-8
+ * @G_MARKUP_ERROR_EMPTY: document contained nothing, or only whitespace
+ * @G_MARKUP_ERROR_PARSE: document was ill-formed
+ * @G_MARKUP_ERROR_UNKNOWN_ELEMENT: error should be set by #GMarkupParser functions; element wasn't known
+ * @G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE: error should be set by #GMarkupParser functions; attribute wasn't known
+ * @G_MARKUP_ERROR_INVALID_CONTENT: error should be set by #GMarkupParser functions; content was invalid
+ * @G_MARKUP_ERROR_MISSING_ATTRIBUTE: error should be set by #GMarkupParser functions; a required attribute was missing
+ *
+ * Error codes returned by markup parsing.
+ */
+
+
+/**
+ * GMarkupParseContext:
+ *
+ * A parse context is used to parse a stream of bytes that
+ * you expect to contain marked-up text.
+ *
+ * See g_markup_parse_context_new(), #GMarkupParser, and so
+ * on for more details.
+ */
+
+
+/**
+ * GMarkupParseFlags:
+ * @G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG: flag you should not use
+ * @G_MARKUP_TREAT_CDATA_AS_TEXT: When this flag is set, CDATA marked sections are not passed literally to the @passthrough function of the parser. Instead, the content of the section (without the <literal>&lt;![CDATA[</literal> and <literal>]]&gt;</literal>) is passed to the @text function. This flag was added in GLib 2.12
+ * @G_MARKUP_PREFIX_ERROR_POSITION: Normally errors caught by GMarkup itself have line/column information prefixed to them to let the caller know the location of the error. When this flag is set the location information is also prefixed to errors generated by the #GMarkupParser implementation functions
+ *
+ * Flags that affect the behaviour of the parser.
+ */
+
+
+/**
+ * GMarkupParser:
+ * @start_element: Callback to invoke when the opening tag of an element is seen.
+ * @end_element: Callback to invoke when the closing tag of an element is seen. Note that this is also called for empty tags like <literal>&lt;empty/&gt;</literal>.
+ * @text: Callback to invoke when some text is seen (text is always inside an element). Note that the text of an element may be spread over multiple calls of this function. If the %G_MARKUP_TREAT_CDATA_AS_TEXT flag is set, this function is also called for the content of CDATA marked sections.
+ * @passthrough: Callback to invoke for comments, processing instructions and doctype declarations; if you're re-writing the parsed document, write the passthrough text back out in the same position. If the %G_MARKUP_TREAT_CDATA_AS_TEXT flag is not set, this function is also called for CDATA marked sections.
+ * @error: Callback to invoke when an error occurs.
+ *
+ * Any of the fields in #GMarkupParser can be %NULL, in which case they
+ * will be ignored. Except for the @error function, any of these callbacks
+ * can set an error; in particular the %G_MARKUP_ERROR_UNKNOWN_ELEMENT,
+ * %G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, and %G_MARKUP_ERROR_INVALID_CONTENT
+ * errors are intended to be set from these callbacks. If you set an error
+ * from a callback, g_markup_parse_context_parse() will report that error
+ * back to its caller.
+ */
+
+
+/**
+ * GMemVTable:
+ * @malloc: function to use for allocating memory.
+ * @realloc: function to use for reallocating memory.
+ * @free: function to use to free memory.
+ * @calloc: function to use for allocating zero-filled memory.
+ * @try_malloc: function to use for allocating memory without a default error handler.
+ * @try_realloc: function to use for reallocating memory without a default error handler.
+ *
+ * A set of functions used to perform memory allocation. The same #GMemVTable must
+ * be used for all allocations in the same program; a call to g_mem_set_vtable(),
+ * if it exists, should be prior to any use of GLib.
+ */
+
+
+/**
+ * GMemoryInputStream:
+ *
+ * Implements #GInputStream for arbitrary memory chunks.
+ */
+
+
+/**
+ * GMemoryOutputStream:
+ *
+ * Implements #GOutputStream for arbitrary memory chunks.
+ */
+
+
+/**
+ * GMemoryOutputStream:data:
+ *
+ * Pointer to buffer where data will be written.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * GMemoryOutputStream:data-size:
+ *
+ * Size of data written to the buffer.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * GMemoryOutputStream:destroy-function: (skip)
+ *
+ * Function called with the buffer as argument when the stream is destroyed.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * GMemoryOutputStream:realloc-function: (skip)
+ *
+ * Function with realloc semantics called to enlarge the buffer.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * GMemoryOutputStream:size:
+ *
+ * Current size of the data buffer.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * GMenu:
+ *
+ * #GMenu is an opaque structure type.  You must access it using the
+ * functions below.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GMenuAttributeIter:
+ *
+ * #GMenuAttributeIter is an opaque structure type.  You must access it
+ * using the functions below.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GMenuItem:
+ *
+ * #GMenuItem is an opaque structure type.  You must access it using the
+ * functions below.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GMenuLinkIter:
+ *
+ * #GMenuLinkIter is an opaque structure type.  You must access it using
+ * the functions below.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GMenuModel:
+ *
+ * #GMenuModel is an opaque structure type.  You must access it using the
+ * functions below.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GMenuModel::items-changed:
+ * @model: the #GMenuModel that is changing
+ * @position: the position of the change
+ * @removed: the number of items removed
+ * @added: the number of items added
+ *
+ * Emitted when a change has occured to the menu.
+ *
+ * The only changes that can occur to a menu is that items are removed
+ * or added.  Items may not change (except by being removed and added
+ * back in the same location).  This signal is capable of describing
+ * both of those changes (at the same time).
+ *
+ * The signal means that starting at the index @position, @removed
+ * items were removed and @added items were added in their place.  If
+ * @removed is zero then only items were added.  If @added is zero
+ * then only items were removed.
+ *
+ * As an example, if the menu contains items a, b, c, d (in that
+ * order) and the signal (2, 1, 3) occurs then the new composition of
+ * the menu will be a, b, _, _, _, d (with each _ representing some
+ * new item).
+ *
+ * Signal handlers may query the model (particularly the added items)
+ * and expect to see the results of the modification that is being
+ * reported.  The signal is emitted after the modification.
+ */
+
+
+/**
+ * GMount:
+ *
+ * A handle to an object implementing the #GMountIface interface.
+ */
+
+
+/**
+ * GMount::changed:
+ * @mount: the object on which the signal is emitted
+ *
+ * Emitted when the mount has been changed.
+ */
+
+
+/**
+ * GMount::pre-unmount:
+ * @mount: the object on which the signal is emitted
+ *
+ * This signal is emitted when the #GMount is about to be
+ * unmounted.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GMount::unmounted:
+ * @mount: the object on which the signal is emitted
+ *
+ * This signal is emitted when the #GMount have been
+ * unmounted. If the recipient is holding references to the
+ * object they should release them so the object can be
+ * finalized.
+ */
+
+
+/**
+ * GMountIface:
+ * @g_iface: The parent interface.
+ * @changed: Changed signal that is emitted when the mount's state has changed.
+ * @unmounted: The unmounted signal that is emitted when the #GMount have been unmounted. If the recipient is holding references to the object they should release them so the object can be finalized.
+ * @pre_unmount: The ::pre-unmount signal that is emitted when the #GMount will soon be emitted. If the recipient is somehow holding the mount open by keeping an open file on it it should close the file.
+ * @get_root: Gets a #GFile to the root directory of the #GMount.
+ * @get_name: Gets a string containing the name of the #GMount.
+ * @get_icon: Gets a #GIcon for the #GMount.
+ * @get_uuid: Gets the UUID for the #GMount. The reference is typically based on the file system UUID for the mount in question and should be considered an opaque string. Returns %NULL if there is no UUID available.
+ * @get_volume: Gets a #GVolume the mount is located on. Returns %NULL if the #GMount is not associated with a #GVolume.
+ * @get_drive: Gets a #GDrive the volume of the mount is located on. Returns %NULL if the #GMount is not associated with a #GDrive or a #GVolume. This is convenience method for getting the #GVolume and using that to get the #GDrive.
+ * @can_unmount: Checks if a #GMount can be unmounted.
+ * @can_eject: Checks if a #GMount can be ejected.
+ * @unmount: Starts unmounting a #GMount.
+ * @unmount_finish: Finishes an unmounting operation.
+ * @eject: Starts ejecting a #GMount.
+ * @eject_finish: Finishes an eject operation.
+ * @remount: Starts remounting a #GMount.
+ * @remount_finish: Finishes a remounting operation.
+ * @guess_content_type: Starts guessing the type of the content of a #GMount. See g_mount_guess_content_type() for more information on content type guessing. This operation was added in 2.18.
+ * @guess_content_type_finish: Finishes a content type guessing operation. Added in 2.18.
+ * @guess_content_type_sync: Synchronous variant of @guess_content_type. Added in 2.18
+ * @unmount_with_operation: Starts unmounting a #GMount using a #GMountOperation. Since 2.22.
+ * @unmount_with_operation_finish: Finishes an unmounting operation using a #GMountOperation. Since 2.22.
+ * @eject_with_operation: Starts ejecting a #GMount using a #GMountOperation. Since 2.22.
+ * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
+ * @get_default_location: Gets a #GFile indication a start location that can be use as the entry point for this mount. Since 2.24.
+ * @get_sort_key: Gets a key used for sorting #GMount instance or %NULL if no such key exists. Since 2.32.
+ *
+ * Interface for implementing operations for mounts.
+ */
+
+
+/**
+ * GMountMountFlags:
+ * @G_MOUNT_MOUNT_NONE: No flags set.
+ *
+ * Flags used when mounting a mount.
+ */
+
+
+/**
+ * GMountOperation:
+ *
+ * Class for providing authentication methods for mounting operations,
+ * such as mounting a file locally, or authenticating with a server.
+ */
+
+
+/**
+ * GMountOperation::aborted:
+ *
+ * Emitted by the backend when e.g. a device becomes unavailable
+ * while a mount operation is in progress.
+ *
+ * Implementations of GMountOperation should handle this signal
+ * by dismissing open password dialogs.
+ *
+ * Since: 2.20
+ */
+
+
+/**
+ * GMountOperation::ask-password:
+ * @op: a #GMountOperation requesting a password.
+ * @message: string containing a message to display to the user.
+ * @default_user: string containing the default user name.
+ * @default_domain: string containing the default domain.
+ * @flags: a set of #GAskPasswordFlags.
+ *
+ * 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 #GtkMessageDialog.
+ */
+
+
+/**
+ * GMountOperation::ask-question:
+ * @op: a #GMountOperation asking a question.
+ * @message: string containing a message to display to the user.
+ * @choices: an array of strings for each possible choice.
+ *
+ * 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 #GtkMessageDialog.
+ */
+
+
+/**
+ * GMountOperation::reply:
+ * @op: a #GMountOperation.
+ * @result: a #GMountOperationResult indicating how the request was handled
+ *
+ * Emitted when the user has replied to the mount operation.
+ */
+
+
+/**
+ * GMountOperation::show-processes:
+ * @op: a #GMountOperation.
+ * @message: string containing a message to display to the user.
+ * @processes: (element-type GPid): an array of #GPid for processes blocking the operation.
+ * @choices: an array of strings for each possible choice.
+ *
+ * Emitted when one or more processes are blocking an operation
+ * e.g. unmounting/ejecting a #GMount or stopping a #GDrive.
+ *
+ * Note that this signal may be emitted several times to update the
+ * list of blocking processes as processes close files. The
+ * application should only respond with g_mount_operation_reply() to
+ * the latest signal (setting #GMountOperation:choice to the choice
+ * the user made).
+ *
+ * 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 #GtkMessageDialog.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GMountOperation:anonymous:
+ *
+ * Whether to use an anonymous user when authenticating.
+ */
+
+
+/**
+ * GMountOperation:choice:
+ *
+ * The index of the user's choice when a question is asked during the
+ * mount operation. See the #GMountOperation::ask-question signal.
+ */
+
+
+/**
+ * GMountOperation:domain:
+ *
+ * The domain to use for the mount operation.
+ */
+
+
+/**
+ * GMountOperation:password:
+ *
+ * The password that is used for authentication when carrying out
+ * the mount operation.
+ */
+
+
+/**
+ * GMountOperation:password-save:
+ *
+ * Determines if and how the password information should be saved.
+ */
+
+
+/**
+ * GMountOperation:username:
+ *
+ * The user name that is used for authentication when carrying out
+ * the mount operation.
+ */
+
+
+/**
+ * GMountOperationResult:
+ * @G_MOUNT_OPERATION_HANDLED: The request was fulfilled and the user specified data is now available
+ * @G_MOUNT_OPERATION_ABORTED: The user requested the mount operation to be aborted
+ * @G_MOUNT_OPERATION_UNHANDLED: The request was unhandled (i.e. not implemented)
+ *
+ * #GMountOperationResult is returned as a result when a request for
+ * information is send by the mounting operation.
+ */
+
+
+/**
+ * GMountUnmountFlags:
+ * @G_MOUNT_UNMOUNT_NONE: No flags set.
+ * @G_MOUNT_UNMOUNT_FORCE: Unmount even if there are outstanding file operations on the mount.
+ *
+ * Flags used when an unmounting a mount.
+ */
+
+
+/**
+ * GNetworkAddress:
+ *
+ * A #GSocketConnectable for resolving a hostname and connecting to
+ * that host.
+ */
+
+
+/**
+ * GNetworkMonitor:
+ *
+ * #GNetworkMonitor monitors the status of network connections and
+ * indicates when a possibly-user-visible change has occurred.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GNetworkMonitor::network-changed:
+ * @monitor: a #GNetworkMonitor
+ * @available: the current value of #GNetworkMonitor:network-available
+ *
+ * Emitted when the network configuration changes. If @available is
+ * %TRUE, then some hosts may be reachable that were not reachable
+ * before, while others that were reachable before may no longer be
+ * reachable. If @available is %FALSE, then no remote hosts are
+ * reachable.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GNetworkMonitor:network-available:
+ *
+ * Whether the network is considered available. That is, whether the
+ * system has a default route for at least one of IPv4 or IPv6.
+ *
+ * Real-world networks are of course much more complicated than
+ * this; the machine may be connected to a wifi hotspot that
+ * requires payment before allowing traffic through, or may be
+ * connected to a functioning router that has lost its own upstream
+ * connectivity. Some hosts might only be accessible when a VPN is
+ * active. Other hosts might only be accessible when the VPN is
+ * <emphasis>not</emphasis> active. Thus, it is best to use
+ * g_network_monitor_can_reach() or
+ * g_network_monitor_can_reach_async() to test for reachability on a
+ * host-by-host basis. (On the other hand, when the property is
+ * %FALSE, the application can reasonably expect that no remote
+ * hosts at all are reachable, and should indicate this to the user
+ * in its UI.)
+ *
+ * See also #GNetworkMonitor::network-changed.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GNetworkService:
+ *
+ * A #GSocketConnectable for resolving a SRV record and connecting to
+ * that service.
+ */
+
+
+/**
+ * GNormalizeMode:
+ * @G_NORMALIZE_DEFAULT: standardize differences that do not affect the text content, such as the above-mentioned accent representation
+ * @G_NORMALIZE_NFD: another name for %G_NORMALIZE_DEFAULT
+ * @G_NORMALIZE_DEFAULT_COMPOSE: like %G_NORMALIZE_DEFAULT, but with composed forms rather than a maximally decomposed form
+ * @G_NORMALIZE_NFC: another name for %G_NORMALIZE_DEFAULT_COMPOSE
+ * @G_NORMALIZE_ALL: beyond %G_NORMALIZE_DEFAULT also standardize the "compatibility" characters in Unicode, such as SUPERSCRIPT THREE to the standard forms (in this case DIGIT THREE). Formatting information may be lost but for most text operations such characters should be considered the same
+ * @G_NORMALIZE_NFKD: another name for %G_NORMALIZE_ALL
+ * @G_NORMALIZE_ALL_COMPOSE: like %G_NORMALIZE_ALL, but with composed forms rather than a maximally decomposed form
+ * @G_NORMALIZE_NFKC: another name for %G_NORMALIZE_ALL_COMPOSE
+ *
+ * Defines how a Unicode string is transformed in a canonical
+ * form, standardizing such issues as whether a character with
+ * an accent is represented as a base character and combining
+ * accent or as a single precomposed character. Unicode strings
+ * should generally be normalized before comparing them.
+ */
+
+
+/**
+ * GObject:
+ *
+ * All the fields in the <structname>GObject</structname> structure are private
+ * to the #GObject implementation and should never be accessed directly.
+ */
+
+
+/**
+ * GObjectClass:
+ * @g_type_class: the parent class
+ * @constructor: the @constructor function is called by g_object_new () to complete the object initialization after all the construction properties are set. The first thing a @constructor implementation must do is chain up to the @constructor of the parent class. Overriding @constructor should be rarely needed, e.g. to handle construct properties, or to implement singletons.
+ * @set_property: the generic setter for all properties of this type. Should be overridden for every type with properties. Implementations of @set_property don't need to emit property change notification explicitly, this is handled by the type system.
+ * @get_property: the generic getter for all properties of this type. Should be overridden for every type with properties.
+ * @dispose: the @dispose function is supposed to drop all references to other objects, but keep the instance otherwise intact, so that client method invocations still work. It may be run multiple times (due to reference loops). Before returning, @dispose should chain up to the @dispose method of the parent class.
+ * @finalize: instance finalization function, should finish the finalization of the instance begun in @dispose and chain up to the @finalize method of the parent class.
+ * @dispatch_properties_changed: emits property change notification for a bunch of properties. Overriding @dispatch_properties_changed should be rarely needed.
+ * @notify: the class closure for the notify signal
+ * @constructed: the @constructed function is called by g_object_new() as the final step of the object creation process.  At the point of the call, all construction properties have been set on the object.  The purpose of this call is to allow for object initialisation steps that can only be performed after construction properties have been set.  @constructed implementors should chain up to the @constructed call of their parent class to allow it to complete its initialisation.
+ *
+ * The class structure for the <structname>GObject</structname> type.
+ *
+ * <example>
+ * <title>Implementing singletons using a constructor</title>
+ * <programlisting>
+ * static MySingleton *the_singleton = NULL;
+ *
+ * static GObject*
+ * my_singleton_constructor (GType                  type,
+ * guint                  n_construct_params,
+ * GObjectConstructParam *construct_params)
+ * {
+ * GObject *object;
+ *
+ * if (!the_singleton)
+ * {
+ * object = G_OBJECT_CLASS (parent_class)->constructor (type,
+ * n_construct_params,
+ * construct_params);
+ * the_singleton = MY_SINGLETON (object);
+ * }
+ * else
+ * object = g_object_ref (G_OBJECT (the_singleton));
+ *
+ * return object;
+ * }
+ * </programlisting></example>
+ */
+
+
+/**
+ * GObjectConstructParam:
+ * @pspec: the #GParamSpec of the construct parameter
+ * @value: the value to set the parameter to
+ *
+ * The <structname>GObjectConstructParam</structname> struct is an auxiliary
+ * structure used to hand #GParamSpec/#GValue pairs to the @constructor of
+ * a #GObjectClass.
+ */
+
+
+/**
+ * GObjectFinalizeFunc:
+ * @object: the #GObject being finalized
+ *
+ * The type of the @finalize function of #GObjectClass.
+ */
+
+
+/**
+ * GObjectGetPropertyFunc:
+ * @object: a #GObject
+ * @property_id: the numeric id under which the property was registered with g_object_class_install_property().
+ * @value: a #GValue to return the property value in
+ * @pspec: the #GParamSpec describing the property
+ *
+ * The type of the @get_property function of #GObjectClass.
+ */
+
+
+/**
+ * GObjectSetPropertyFunc:
+ * @object: a #GObject
+ * @property_id: the numeric id under which the property was registered with g_object_class_install_property().
+ * @value: the new value for the property
+ * @pspec: the #GParamSpec describing the property
+ *
+ * The type of the @set_property function of #GObjectClass.
+ */
+
+
+/**
+ * GOptionArg:
+ * @G_OPTION_ARG_NONE: No extra argument. This is useful for simple flags.
+ * @G_OPTION_ARG_STRING: The option takes a string argument.
+ * @G_OPTION_ARG_INT: The option takes an integer argument.
+ * @G_OPTION_ARG_CALLBACK: The option provides a callback to parse the extra argument.
+ * @G_OPTION_ARG_FILENAME: The option takes a filename as argument.
+ * @G_OPTION_ARG_STRING_ARRAY: The option takes a string argument, multiple uses of the option are collected into an array of strings.
+ * @G_OPTION_ARG_FILENAME_ARRAY: The option takes a filename as argument, multiple uses of the option are collected into an array of strings.
+ * @G_OPTION_ARG_DOUBLE: The option takes a double argument. The argument can be formatted either for the user's locale or for the "C" locale. Since 2.12
+ * @G_OPTION_ARG_INT64: The option takes a 64-bit integer. Like %G_OPTION_ARG_INT but for larger numbers. The number can be in decimal base, or in hexadecimal (when prefixed with <literal>0x</literal>, for example, <literal>0xffffffff</literal>). Since 2.12
+ *
+ * The #GOptionArg enum values determine which type of extra argument the
+ * options expect to find. If an option expects an extra argument, it
+ * can be specified in several ways; with a short option:
+ * <option>-x arg</option>, with a long option: <option>--name arg</option>
+ * or combined in a single argument: <option>--name=arg</option>.
+ */
+
+
+/**
+ * GOptionArgFunc:
+ * @option_name: The name of the option being parsed. This will be either a single dash followed by a single letter (for a short name) or two dashes followed by a long option name.
+ * @value: The value to be parsed.
+ * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
+ * @error: A return location for errors. The error code %G_OPTION_ERROR_FAILED is intended to be used for errors in #GOptionArgFunc callbacks.
+ *
+ * The type of function to be passed as callback for %G_OPTION_ARG_CALLBACK
+ * options.
+ *
+ * occurred, in which case @error should be set with g_set_error()
+ *
+ * Returns: %TRUE if the option was successfully parsed, %FALSE if an error
+ */
+
+
+/**
+ * GOptionContext:
+ *
+ * A <structname>GOptionContext</structname> struct defines which options
+ * are accepted by the commandline option parser. The struct has only private
+ * fields and should not be directly accessed.
+ */
+
+
+/**
+ * GOptionEntry:
+ * @long_name: The long name of an option can be used to specify it in a commandline as --<replaceable>long_name</replaceable>. Every option must have a long name. To resolve conflicts if multiple option groups contain the same long name, it is also possible to specify the option as --<replaceable>groupname</replaceable>-<replaceable>long_name</replaceable>.
+ * @short_name: If an option has a short name, it can be specified -<replaceable>short_name</replaceable> in a commandline. @short_name must be a printable ASCII character different from '-', or zero if the option has no short name.
+ * @flags: Flags from #GOptionFlags.
+ * @arg: The type of the option, as a #GOptionArg.
+ * @arg_data: If the @arg type is %G_OPTION_ARG_CALLBACK, then @arg_data must point to a #GOptionArgFunc callback function, which will be called to handle the extra argument. Otherwise, @arg_data is a pointer to a location to store the value, the required type of the location depends on the @arg type: <variablelist> <varlistentry> <term>%G_OPTION_ARG_NONE</term> <listitem><para>%gboolean</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_STRING</term> <listitem><para>%gchar*</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_INT</term> <listitem><para>%gint</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_FILENAME</term> <listitem><para>%gchar*</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_STRING_ARRAY</term> <listitem><para>%gchar**</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_FILENAME_ARRAY</term> <listitem><para>%gchar**</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_DOUBLE</term> <listitem><para>%gdouble</para></listitem> </varlistentry> </variablelist> If @arg type is %G_OPTION_ARG_STRING or %G_OPTION_ARG_FILENAME the location will contain a newly allocated string if the option was given. That string needs to be freed by the callee using g_free(). Likewise if @arg type is %G_OPTION_ARG_STRING_ARRAY or %G_OPTION_ARG_FILENAME_ARRAY, the data should be freed using g_strfreev().
+ * @description: the description for the option in <option>--help</option> output. The @description is translated using the @translate_func of the group, see g_option_group_set_translation_domain().
+ * @arg_description: The placeholder to use for the extra argument parsed by the option in <option>--help</option> output. The @arg_description is translated using the @translate_func of the group, see g_option_group_set_translation_domain().
+ *
+ * A <structname>GOptionEntry</structname> defines a single option.
+ * To have an effect, they must be added to a #GOptionGroup with
+ * g_option_context_add_main_entries() or g_option_group_add_entries().
+ */
+
+
+/**
+ * GOptionError:
+ * @G_OPTION_ERROR_UNKNOWN_OPTION: An option was not known to the parser. This error will only be reported, if the parser hasn't been instructed to ignore unknown options, see g_option_context_set_ignore_unknown_options().
+ * @G_OPTION_ERROR_BAD_VALUE: A value couldn't be parsed.
+ * @G_OPTION_ERROR_FAILED: A #GOptionArgFunc callback failed.
+ *
+ * Error codes returned by option parsing.
+ */
+
+
+/**
+ * GOptionErrorFunc:
+ * @context: The active #GOptionContext
+ * @group: The group to which the function belongs
+ * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
+ * @error: The #GError containing details about the parse error
+ *
+ * The type of function to be used as callback when a parse error occurs.
+ */
+
+
+/**
+ * GOptionFlags:
+ * @G_OPTION_FLAG_HIDDEN: The option doesn't appear in <option>--help</option> output.
+ * @G_OPTION_FLAG_IN_MAIN: The option appears in the main section of the <option>--help</option> output, even if it is defined in a group.
+ * @G_OPTION_FLAG_REVERSE: For options of the %G_OPTION_ARG_NONE kind, this flag indicates that the sense of the option is reversed.
+ * @G_OPTION_FLAG_NO_ARG: For options of the %G_OPTION_ARG_CALLBACK kind, this flag indicates that the callback does not take any argument (like a %G_OPTION_ARG_NONE option). Since 2.8
+ * @G_OPTION_FLAG_FILENAME: For options of the %G_OPTION_ARG_CALLBACK kind, this flag indicates that the argument should be passed to the callback in the GLib filename encoding rather than UTF-8. Since 2.8
+ * @G_OPTION_FLAG_OPTIONAL_ARG: For options of the %G_OPTION_ARG_CALLBACK kind, this flag indicates that the argument supply is optional. If no argument is given then data of %GOptionParseFunc will be set to NULL. Since 2.8
+ * @G_OPTION_FLAG_NOALIAS: This flag turns off the automatic conflict resolution which prefixes long option names with <literal>groupname-</literal> if there is a conflict. This option should only be used in situations where aliasing is necessary to model some legacy commandline interface. It is not safe to use this option, unless all option groups are under your direct control. Since 2.8.
+ *
+ * Flags which modify individual options.
+ */
+
+
+/**
+ * GOptionGroup:
+ *
+ * A <structname>GOptionGroup</structname> struct defines the options in a single
+ * group. The struct has only private fields and should not be directly accessed.
+ *
+ * All options in a group share the same translation function. Libraries which
+ * need to parse commandline options are expected to provide a function for
+ * getting a <structname>GOptionGroup</structname> holding their options, which
+ * the application can then add to its #GOptionContext.
+ */
+
+
+/**
+ * GOptionParseFunc:
+ * @context: The active #GOptionContext
+ * @group: The group to which the function belongs
+ * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
+ * @error: A return location for error details
+ *
+ * The type of function that can be called before and after parsing.
+ *
+ * occurred, in which case @error should be set with g_set_error()
+ *
+ * Returns: %TRUE if the function completed successfully, %FALSE if an error
+ */
+
+
+/**
+ * GOutputStream:
+ *
+ * Base class for writing output.
+ *
+ * All classes derived from GOutputStream should implement synchronous
+ * writing, splicing, flushing and closing streams, but may implement
+ * asynchronous versions.
+ */
+
+
+/**
+ * GOutputStreamSpliceFlags:
+ * @G_OUTPUT_STREAM_SPLICE_NONE: Do not close either stream.
+ * @G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE: Close the source stream after the splice.
+ * @G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET: Close the target stream after the splice.
+ *
+ * GOutputStreamSpliceFlags determine how streams should be spliced.
+ */
+
+
+/**
+ * GOutputVector:
+ * @buffer: Pointer to a buffer of data to read.
+ * @size: the size of @buffer.
+ *
+ * Structure used for scatter/gather data output.
+ * You generally pass in an array of #GOutputVector<!-- -->s
+ * and the operation will use all the buffers as if they were
+ * one buffer.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GParamFlags:
+ * @G_PARAM_READABLE: the parameter is readable
+ * @G_PARAM_WRITABLE: the parameter is writable
+ * @G_PARAM_CONSTRUCT: the parameter will be set upon object construction
+ * @G_PARAM_CONSTRUCT_ONLY: the parameter will only be set upon object construction
+ * @G_PARAM_LAX_VALIDATION: upon parameter conversion (see g_param_value_convert()) strict validation is not required
+ * @G_PARAM_STATIC_NAME: the string used as name when constructing the parameter is guaranteed to remain valid and unmodified for the lifetime of the parameter. Since 2.8
+ * @G_PARAM_STATIC_NICK: the string used as nick when constructing the parameter is guaranteed to remain valid and unmmodified for the lifetime of the parameter. Since 2.8
+ * @G_PARAM_STATIC_BLURB: the string used as blurb when constructing the parameter is guaranteed to remain valid and unmodified for the lifetime of the parameter. Since 2.8
+ * @G_PARAM_PRIVATE: internal
+ * @G_PARAM_DEPRECATED: the parameter is deprecated and will be removed in a future version. A warning will be generated if it is used while running with G_ENABLE_DIAGNOSTIC=1. Since: 2.26
+ *
+ * Through the #GParamFlags flag values, certain aspects of parameters
+ * can be configured.
+ */
+
+
+/**
+ * GParamSpec:
+ * @g_type_instance: private #GTypeInstance portion
+ * @name: name of this parameter: always an interned string
+ * @flags: #GParamFlags flags for this parameter
+ * @value_type: the #GValue type for this parameter
+ * @owner_type: #GType type that uses (introduces) this parameter
+ *
+ * All other fields of the <structname>GParamSpec</structname> struct are private and
+ * should not be used directly.
+ */
+
+
+/**
+ * GParamSpecBoolean:
+ * @parent_instance: private #GParamSpec portion
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for boolean properties.
+ */
+
+
+/**
+ * GParamSpecBoxed:
+ * @parent_instance: private #GParamSpec portion
+ *
+ * A #GParamSpec derived structure that contains the meta data for boxed properties.
+ */
+
+
+/**
+ * GParamSpecChar:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for character properties.
+ */
+
+
+/**
+ * GParamSpecClass:
+ * @g_type_class: the parent class
+ * @value_type: the #GValue type for this parameter
+ * @finalize: The instance finalization function (optional), should chain up to the finalize method of the parent class.
+ * @value_set_default: Resets a @value to the default value for this type (recommended, the default is g_value_reset()), see g_param_value_set_default().
+ * @value_validate: Ensures that the contents of @value comply with the specifications set out by this type (optional), see g_param_value_validate().
+ * @values_cmp: Compares @value1 with @value2 according to this type (recommended, the default is memcmp()), see g_param_values_cmp().
+ *
+ * The class structure for the <structname>GParamSpec</structname> type.
+ * Normally, <structname>GParamSpec</structname> classes are filled by
+ * g_param_type_register_static().
+ */
+
+
+/**
+ * GParamSpecDouble:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * @epsilon: values closer than @epsilon will be considered identical by g_param_values_cmp(); the default value is 1e-90.
+ *
+ * A #GParamSpec derived structure that contains the meta data for double properties.
+ */
+
+
+/**
+ * GParamSpecEnum:
+ * @parent_instance: private #GParamSpec portion
+ * @enum_class: the #GEnumClass for the enum
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for enum
+ * properties.
+ */
+
+
+/**
+ * GParamSpecFlags:
+ * @parent_instance: private #GParamSpec portion
+ * @flags_class: the #GFlagsClass for the flags
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for flags
+ * properties.
+ */
+
+
+/**
+ * GParamSpecFloat:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * @epsilon: values closer than @epsilon will be considered identical by g_param_values_cmp(); the default value is 1e-30.
+ *
+ * A #GParamSpec derived structure that contains the meta data for float properties.
+ */
+
+
+/**
+ * GParamSpecGType:
+ * @parent_instance: private #GParamSpec portion
+ * @is_a_type: a #GType whose subtypes can occur as values
+ *
+ * A #GParamSpec derived structure that contains the meta data for #GType properties.
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * GParamSpecInt:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for integer properties.
+ */
+
+
+/**
+ * GParamSpecInt64:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for 64bit integer properties.
+ */
+
+
+/**
+ * GParamSpecLong:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for long integer properties.
+ */
+
+
+/**
+ * GParamSpecObject:
+ * @parent_instance: private #GParamSpec portion
+ *
+ * A #GParamSpec derived structure that contains the meta data for object properties.
+ */
+
+
+/**
+ * GParamSpecOverride:
+ *
+ * This is a type of #GParamSpec type that simply redirects operations to
+ * another paramspec.  All operations other than getting or
+ * setting the value are redirected, including accessing the nick and
+ * blurb, validating a value, and so forth. See
+ * g_param_spec_get_redirect_target() for retrieving the overidden
+ * property. #GParamSpecOverride is used in implementing
+ * g_object_class_override_property(), and will not be directly useful
+ * unless you are implementing a new base type similar to GObject.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * GParamSpecParam:
+ * @parent_instance: private #GParamSpec portion
+ *
+ * A #GParamSpec derived structure that contains the meta data for %G_TYPE_PARAM
+ * properties.
+ */
+
+
+/**
+ * GParamSpecPointer:
+ * @parent_instance: private #GParamSpec portion
+ *
+ * A #GParamSpec derived structure that contains the meta data for pointer properties.
+ */
+
+
+/**
+ * GParamSpecString:
+ * @parent_instance: private #GParamSpec portion
+ * @default_value: default value for the property specified
+ * @cset_first: a string containing the allowed values for the first byte
+ * @cset_nth: a string containing the allowed values for the subsequent bytes
+ * @substitutor: the replacement byte for bytes which don't match @cset_first or @cset_nth.
+ * @null_fold_if_empty: replace empty string by %NULL
+ * @ensure_non_null: replace %NULL strings by an empty string
+ *
+ * A #GParamSpec derived structure that contains the meta data for string
+ * properties.
+ */
+
+
+/**
+ * GParamSpecTypeInfo:
+ * @instance_size: Size of the instance (object) structure.
+ * @n_preallocs: Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the <link linkend="glib-Memory-Slices">slice allocator</link> now.
+ * @instance_init: Location of the instance initialization function (optional).
+ * @value_type: The #GType of values conforming to this #GParamSpec
+ * @finalize: The instance finalization function (optional).
+ * @value_set_default: Resets a @value to the default value for @pspec (recommended, the default is g_value_reset()), see g_param_value_set_default().
+ * @value_validate: Ensures that the contents of @value comply with the specifications set out by @pspec (optional), see g_param_value_validate().
+ * @values_cmp: Compares @value1 with @value2 according to @pspec (recommended, the default is memcmp()), see g_param_values_cmp().
+ *
+ * This structure is used to provide the type system with the information
+ * required to initialize and destruct (finalize) a parameter's class and
+ * instances thereof.
+ * The initialized structure is passed to the g_param_type_register_static()
+ * The type system will perform a deep copy of this structure, so its memory
+ * does not need to be persistent across invocation of
+ * g_param_type_register_static().
+ */
+
+
+/**
+ * GParamSpecUChar:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for unsigned character properties.
+ */
+
+
+/**
+ * GParamSpecUInt:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for unsigned integer properties.
+ */
+
+
+/**
+ * GParamSpecUInt64:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for unsigned 64bit integer properties.
+ */
+
+
+/**
+ * GParamSpecULong:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for unsigned long integer properties.
+ */
+
+
+/**
+ * GParamSpecUnichar:
+ * @parent_instance: private #GParamSpec portion
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for unichar (unsigned integer) properties.
+ */
+
+
+/**
+ * GParamSpecValueArray:
+ * @parent_instance: private #GParamSpec portion
+ * @element_spec: a #GParamSpec describing the elements contained in arrays of this property, may be %NULL
+ * @fixed_n_elements: if greater than 0, arrays of this property will always have this many elements
+ *
+ * A #GParamSpec derived structure that contains the meta data for #GValueArray properties.
+ */
+
+
+/**
+ * GParamSpecVariant:
+ * @parent_instance: private #GParamSpec portion
+ * @type: a #GVariantType, or %NULL
+ * @default_value: a #GVariant, or %NULL
+ *
+ * A #GParamSpec derived structure that contains the meta data for #GVariant properties.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GParameter:
+ * @name: the parameter name
+ * @value: the parameter value
+ *
+ * The <structname>GParameter</structname> struct is an auxiliary structure used
+ * to hand parameter name/value pairs to g_object_newv().
+ */
+
+
+/**
+ * GPasswordSave:
+ * @G_PASSWORD_SAVE_NEVER: never save a password.
+ * @G_PASSWORD_SAVE_FOR_SESSION: save a password for the session.
+ * @G_PASSWORD_SAVE_PERMANENTLY: save a password permanently.
+ *
+ * #GPasswordSave is used to indicate the lifespan of a saved password.
+ *
+ * #Gvfs stores passwords in the Gnome keyring when this flag allows it
+ * to, and later retrieves it again from there.
+ */
+
+
+/**
+ * GPermission:
+ *
+ * #GPermission is an opaque data structure and can only be accessed
+ * using the following functions.
+ */
+
+
+/**
+ * GPermission:allowed:
+ *
+ * %TRUE if the caller currently has permission to perform the action that
+ * @permission represents the permission to perform.
+ */
+
+
+/**
+ * GPermission:can-acquire:
+ *
+ * %TRUE if it is generally possible to acquire the permission by calling
+ * g_permission_acquire().
+ */
+
+
+/**
+ * GPermission:can-release:
+ *
+ * %TRUE if it is generally possible to release the permission by calling
+ * g_permission_release().
+ */
+
+
+/**
+ * GPid:
+ *
+ * A type which is used to hold a process identification.
+ *
+ * On UNIX, processes are identified by a process id (an integer),
+ * while Windows uses process handles (which are pointers).
+ *
+ * GPid is used in GLib only for descendant processes spawned with
+ * the g_spawn functions.
+ */
+
+
+/**
+ * GPollFD:
+ * @fd: the file descriptor to poll (or a <type>HANDLE</type> on Win32)
+ * @events: a bitwise combination from #GIOCondition, specifying which events should be polled for. Typically for reading from a file descriptor you would use %G_IO_IN | %G_IO_HUP | %G_IO_ERR, and for writing you would use %G_IO_OUT | %G_IO_ERR.
+ * @revents: a bitwise combination of flags from #GIOCondition, returned from the poll() function to indicate which events occurred.
+ *
+ * Represents a file descriptor, which events to poll for, and which events
+ * occurred.
+ */
+
+
+/**
+ * GPollFunc:
+ * @ufds: an array of #GPollFD elements
+ * @nfsd: the number of elements in @ufds
+ * @timeout_: the maximum time to wait for an event of the file descriptors. A negative value indicates an infinite timeout.
+ *
+ * Specifies the type of function passed to g_main_context_set_poll_func().
+ * The semantics of the function should match those of the poll() system call.
+ *
+ * reported, or -1 if an error occurred.
+ *
+ * Returns: the number of #GPollFD elements which have events or errors
+ */
+
+
+/**
+ * GPollableInputStream:
+ *
+ * An interface for a #GInputStream that can be polled for readability.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GPollableInputStreamInterface:
+ * @g_iface: The parent interface.
+ * @can_poll: Checks if the #GPollableInputStream instance is actually pollable
+ * @is_readable: Checks if the stream is readable
+ * @create_source: Creates a #GSource to poll the stream
+ * @read_nonblocking: Does a non-blocking read or returns %G_IO_ERROR_WOULD_BLOCK
+ *
+ * The interface for pollable input streams.
+ *
+ * The default implementation of @can_poll always returns %TRUE.
+ *
+ * The default implementation of @read_nonblocking calls
+ * g_pollable_input_stream_is_readable(), and then calls
+ * g_input_stream_read() if it returns %TRUE. This means you only need
+ * to override it if it is possible that your @is_readable
+ * implementation may return %TRUE when the stream is not actually
+ * readable.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GPollableOutputStream:
+ *
+ * An interface for a #GOutputStream that can be polled for readability.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GPollableOutputStreamInterface:
+ * @g_iface: The parent interface.
+ * @can_poll: Checks if the #GPollableOutputStream instance is actually pollable
+ * @is_writable: Checks if the stream is writable
+ * @create_source: Creates a #GSource to poll the stream
+ * @write_nonblocking: Does a non-blocking write or returns %G_IO_ERROR_WOULD_BLOCK
+ *
+ * The interface for pollable output streams.
+ *
+ * The default implementation of @can_poll always returns %TRUE.
+ *
+ * The default implementation of @write_nonblocking calls
+ * g_pollable_output_stream_is_writable(), and then calls
+ * g_output_stream_write() if it returns %TRUE. This means you only
+ * need to override it if it is possible that your @is_writable
+ * implementation may return %TRUE when the stream is not actually
+ * writable.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GPollableSourceFunc:
+ * @pollable_stream: the #GPollableInputStream or #GPollableOutputStream
+ * @user_data: data passed in by the user.
+ *
+ * This is the function type of the callback used for the #GSource
+ * returned by g_pollable_input_stream_create_source() and
+ * g_pollable_output_stream_create_source().
+ *
+ * Returns: it should return %FALSE if the source should be removed.
+ * Since: 2.28
+ */
+
+
+/**
+ * GPrintFunc:
+ * @string: the message to output
+ *
+ * Specifies the type of the print handler functions.
+ * These are called with the complete formatted string to output.
+ */
+
+
+/**
+ * GProxy:
+ *
+ * Interface that handles proxy connection and payload.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GProxyAddress:
+ *
+ * A #GInetSocketAddress representing a connection via a proxy server
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GProxyAddressEnumerator:
+ *
+ * A subclass of #GSocketAddressEnumerator that takes another address
+ * enumerator and wraps its results in #GProxyAddress<!-- -->es as
+ * directed by the default #GProxyResolver.
+ */
+
+
+/**
+ * GProxyInterface:
+ * @g_iface: The parent interface.
+ * @connect: Connect to proxy server and wrap (if required) the #connection to handle payload.
+ * @connect_async: Same as connect() but asynchronous.
+ * @connect_finish: Returns the result of connect_async()
+ * @supports_hostname: Returns whether the proxy supports hostname lookups.
+ *
+ * Provides an interface for handling proxy connection and payload.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GProxyResolver:
+ *
+ * Interface that can be used to resolve proxy address.
+ */
+
+
+/**
+ * GQueue:
+ * @head: a pointer to the first element of the queue
+ * @tail: a pointer to the last element of the queue
+ * @length: the number of elements in the queue
+ *
+ * Contains the public fields of a
+ * <link linkend="glib-Double-ended-Queues">Queue</link>.
+ */
+
+
+/**
+ * GReallocFunc:
+ * @data: memory block to reallocate
+ * @size: size to reallocate @data to
+ *
+ * Changes the size of the memory block pointed to by @data to
+ * @size bytes.
+ *
+ * The function should have the same semantics as realloc().
+ *
+ * Returns: a pointer to the reallocated memory
+ */
+
+
+/**
+ * GRegex:
+ *
+ * A GRegex is the "compiled" form of a regular expression pattern. This
+ * structure is opaque and its fields cannot be accessed directly.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * GRegexCompileFlags:
+ * @G_REGEX_CASELESS: Letters in the pattern match both upper- and lowercase letters. This option can be changed within a pattern by a "(?i)" option setting.
+ * @G_REGEX_MULTILINE: By default, GRegex treats the strings as consisting of a single line of characters (even if it actually contains newlines). The "start of line" metacharacter ("^") matches only at the start of the string, while the "end of line" metacharacter ("$") matches only at the end of the string, or before a terminating newline (unless #G_REGEX_DOLLAR_ENDONLY is set). When #G_REGEX_MULTILINE is set, the "start of line" and "end of line" constructs match immediately following or immediately before any newline in the string, respectively, as well as at the very start and end. This can be changed within a pattern by a "(?m)" option setting.
+ * @G_REGEX_DOTALL: A dot metacharater (".") in the pattern matches all characters, including newlines. Without it, newlines are excluded. This option can be changed within a pattern by a ("?s") option setting.
+ * @G_REGEX_EXTENDED: Whitespace data characters in the pattern are totally ignored except when escaped or inside a character class. Whitespace does not include the VT character (code 11). In addition, characters between an unescaped "#" outside a character class and the next newline character, inclusive, are also ignored. This can be changed within a pattern by a "(?x)" option setting.
+ * @G_REGEX_ANCHORED: The pattern is forced to be "anchored", that is, it is constrained to match only at the first matching point in the string that is being searched. This effect can also be achieved by appropriate constructs in the pattern itself such as the "^" metacharater.
+ * @G_REGEX_DOLLAR_ENDONLY: A dollar metacharacter ("$") in the pattern matches only at the end of the string. Without this option, a dollar also matches immediately before the final character if it is a newline (but not before any other newlines). This option is ignored if #G_REGEX_MULTILINE is set.
+ * @G_REGEX_UNGREEDY: Inverts the "greediness" of the quantifiers so that they are not greedy by default, but become greedy if followed by "?". It can also be set by a "(?U)" option setting within the pattern.
+ * @G_REGEX_RAW: Usually strings must be valid UTF-8 strings, using this flag they are considered as a raw sequence of bytes. @G_REGEX_NO_AUTO_CAPTURE: Disables the use of numbered capturing parentheses in the pattern. Any opening parenthesis that is not followed by "?" behaves as if it were followed by "?:" but named parentheses can still be used for capturing (and they acquire numbers in the usual way).
+ * @G_REGEX_OPTIMIZE: Optimize the regular expression. If the pattern will be used many times, then it may be worth the effort to optimize it to improve the speed of matches.
+ * @G_REGEX_DUPNAMES: Names used to identify capturing subpatterns need not be unique. This can be helpful for certain types of pattern when it is known that only one instance of the named subpattern can ever be matched.
+ * @G_REGEX_NEWLINE_CR: Usually any newline character is recognized, if this option is set, the only recognized newline character is '\r'.
+ * @G_REGEX_NEWLINE_LF: Usually any newline character is recognized, if this option is set, the only recognized newline character is '\n'.
+ * @G_REGEX_NEWLINE_CRLF: Usually any newline character is recognized, if this option is set, the only recognized newline character sequence is '\r\n'.
+ *
+ * Flags specifying compile-time options.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * GRegexError:
+ * @G_REGEX_ERROR_COMPILE: Compilation of the regular expression failed.
+ * @G_REGEX_ERROR_OPTIMIZE: Optimization of the regular expression failed.
+ * @G_REGEX_ERROR_REPLACE: Replacement failed due to an ill-formed replacement string.
+ * @G_REGEX_ERROR_MATCH: The match process failed.
+ * @G_REGEX_ERROR_INTERNAL: Internal error of the regular expression engine. Since 2.16
+ * @G_REGEX_ERROR_STRAY_BACKSLASH: "\\" at end of pattern. Since 2.16
+ * @G_REGEX_ERROR_MISSING_CONTROL_CHAR: "\\c" at end of pattern. Since 2.16
+ * @G_REGEX_ERROR_UNRECOGNIZED_ESCAPE: Unrecognized character follows "\\". Since 2.16
+ * @G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER: Numbers out of order in "{}" quantifier. Since 2.16
+ * @G_REGEX_ERROR_QUANTIFIER_TOO_BIG: Number too big in "{}" quantifier. Since 2.16
+ * @G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS: Missing terminating "]" for character class. Since 2.16
+ * @G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS: Invalid escape sequence in character class. Since 2.16
+ * @G_REGEX_ERROR_RANGE_OUT_OF_ORDER: Range out of order in character class. Since 2.16
+ * @G_REGEX_ERROR_NOTHING_TO_REPEAT: Nothing to repeat. Since 2.16
+ * @G_REGEX_ERROR_UNRECOGNIZED_CHARACTER: Unrecognized character after "(?", "(?&lt;" or "(?P". Since 2.16
+ * @G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS: POSIX named classes are supported only within a class. Since 2.16
+ * @G_REGEX_ERROR_UNMATCHED_PARENTHESIS: Missing terminating ")" or ")" without opening "(". Since 2.16
+ * @G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE: Reference to non-existent subpattern. Since 2.16
+ * @G_REGEX_ERROR_UNTERMINATED_COMMENT: Missing terminating ")" after comment. Since 2.16
+ * @G_REGEX_ERROR_EXPRESSION_TOO_LARGE: Regular expression too large. Since 2.16
+ * @G_REGEX_ERROR_MEMORY_ERROR: Failed to get memory. Since 2.16
+ * @G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND: Lookbehind assertion is not fixed length. Since 2.16
+ * @G_REGEX_ERROR_MALFORMED_CONDITION: Malformed number or name after "(?(". Since 2.16
+ * @G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES: Conditional group contains more than two branches. Since 2.16
+ * @G_REGEX_ERROR_ASSERTION_EXPECTED: Assertion expected after "(?(". Since 2.16
+ * @G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME: Unknown POSIX class name. Since 2.16
+ * @G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED: POSIX collating elements are not supported. Since 2.16
+ * @G_REGEX_ERROR_HEX_CODE_TOO_LARGE: Character value in "\\x{...}" sequence is too large. Since 2.16
+ * @G_REGEX_ERROR_INVALID_CONDITION: Invalid condition "(?(0)". Since 2.16
+ * @G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND: \\C not allowed in lookbehind assertion. Since 2.16
+ * @G_REGEX_ERROR_INFINITE_LOOP: Recursive call could loop indefinitely. Since 2.16
+ * @G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR: Missing terminator in subpattern name. Since 2.16
+ * @G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME: Two named subpatterns have the same name. Since 2.16
+ * @G_REGEX_ERROR_MALFORMED_PROPERTY: Malformed "\\P" or "\\p" sequence. Since 2.16
+ * @G_REGEX_ERROR_UNKNOWN_PROPERTY: Unknown property name after "\\P" or "\\p". Since 2.16
+ * @G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG: Subpattern name is too long (maximum 32 characters). Since 2.16
+ * @G_REGEX_ERROR_TOO_MANY_SUBPATTERNS: Too many named subpatterns (maximum 10,000). Since 2.16
+ * @G_REGEX_ERROR_INVALID_OCTAL_VALUE: Octal value is greater than "\\377". Since 2.16
+ * @G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE: "DEFINE" group contains more than one branch. Since 2.16
+ * @G_REGEX_ERROR_DEFINE_REPETION: Repeating a "DEFINE" group is not allowed. Since 2.16
+ * @G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS: Inconsistent newline options. Since 2.16
+ * @G_REGEX_ERROR_MISSING_BACK_REFERENCE: "\\g" is not followed by a braced name or an optionally braced non-zero number. Since 2.16
+ *
+ * Error codes returned by regular expressions functions.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * GRegexEvalCallback:
+ * @match_info: the #GMatchInfo generated by the match. Use g_match_info_get_regex() and g_match_info_get_string() if you need the #GRegex or the matched string.
+ * @result: a #GString containing the new string
+ * @user_data: user data passed to g_regex_replace_eval()
+ *
+ * Specifies the type of the function passed to g_regex_replace_eval().
+ * It is called for each occurrence of the pattern in the string passed
+ * to g_regex_replace_eval(), and it should append the replacement to
+ * @result.
+ *
+ * Returns: %FALSE to continue the replacement process, %TRUE to stop it
+ * Since: 2.14
+ */
+
+
+/**
+ * GRegexMatchFlags:
+ * @G_REGEX_MATCH_ANCHORED: The pattern is forced to be "anchored", that is, it is constrained to match only at the first matching point in the string that is being searched. This effect can also be achieved by appropriate constructs in the pattern itself such as the "^" metacharater.
+ * @G_REGEX_MATCH_NOTBOL: Specifies that first character of the string is not the beginning of a line, so the circumflex metacharacter should not match before it. Setting this without #G_REGEX_MULTILINE (at compile time) causes circumflex never to match. This option affects only the behaviour of the circumflex metacharacter, it does not affect "\A".
+ * @G_REGEX_MATCH_NOTEOL: Specifies that the end of the subject string is not the end of a line, so the dollar metacharacter should not match it nor (except in multiline mode) a newline immediately before it. Setting this without #G_REGEX_MULTILINE (at compile time) causes dollar never to match. This option affects only the behaviour of the dollar metacharacter, it does not affect "\Z" or "\z".
+ * @G_REGEX_MATCH_NOTEMPTY: An empty string is not considered to be a valid match if this option is set. If there are alternatives in the pattern, they are tried. If all the alternatives match the empty string, the entire match fails. For example, if the pattern "a?b?" is applied to a string not beginning with "a" or "b", it matches the empty string at the start of the string. With this flag set, this match is not valid, so GRegex searches further into the string for occurrences of "a" or "b".
+ * @G_REGEX_MATCH_PARTIAL: Turns on the partial matching feature, for more documentation on partial matching see g_match_info_is_partial_match().
+ * @G_REGEX_MATCH_NEWLINE_CR: Overrides the newline definition set when creating a new #GRegex, setting the '\r' character as line terminator.
+ * @G_REGEX_MATCH_NEWLINE_LF: Overrides the newline definition set when creating a new #GRegex, setting the '\n' character as line terminator.
+ * @G_REGEX_MATCH_NEWLINE_CRLF: Overrides the newline definition set when creating a new #GRegex, setting the '\r\n' characters as line terminator.
+ * @G_REGEX_MATCH_NEWLINE_ANY: Overrides the newline definition set when creating a new #GRegex, any newline character or character sequence is recognized.
+ *
+ * Flags specifying match-time options.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * GRemoteActionGroupInterface:
+ * @activate_action_full: the virtual function pointer for g_remote_action_group_activate_action_full()
+ * @change_action_state_full: the virtual function pointer for g_remote_action_group_change_action_state_full()
+ *
+ * The virtual function table for #GRemoteActionGroup.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GResolver:
+ *
+ * The object that handles DNS resolution. Use g_resolver_get_default()
+ * to get the default resolver.
+ */
+
+
+/**
+ * GResolver::reload:
+ * @resolver: a #GResolver
+ *
+ * Emitted when the resolver notices that the system resolver
+ * configuration has changed.
+ */
+
+
+/**
+ * GResolverError:
+ * @G_RESOLVER_ERROR_NOT_FOUND: the requested name/address/service was not found
+ * @G_RESOLVER_ERROR_TEMPORARY_FAILURE: the requested information could not be looked up due to a network error or similar problem
+ * @G_RESOLVER_ERROR_INTERNAL: unknown error
+ *
+ * An error code used with %G_RESOLVER_ERROR in a #GError returned
+ * from a #GResolver routine.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GResource:
+ *
+ * A resource bundle.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GResourceError:
+ * @G_RESOURCE_ERROR_NOT_FOUND: no file was found at the requested path
+ * @G_RESOURCE_ERROR_INTERNAL: unknown error
+ *
+ * An error code used with %G_RESOURCE_ERROR in a #GError returned
+ * from a #GResource routine.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GResourceFlags:
+ * @G_RESOURCE_FLAGS_NONE: No flags set.
+ * @G_RESOURCE_FLAGS_COMPRESSED: The file is compressed.
+ *
+ * GResourceFlags give information about a particular file inside a resource
+ * bundle.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GResourceLookupFlags:
+ * @G_RESOURCE_LOOKUP_FLAGS_NONE: No flags set.
+ *
+ * GResourceLookupFlags determine how resource path lookups are handled.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GSeekable:
+ *
+ * Seek object for streaming operations.
+ */
+
+
+/**
+ * GSeekableIface:
+ * @g_iface: The parent interface.
+ * @tell: Tells the current location within a stream.
+ * @can_seek: Checks if seeking is supported by the stream.
+ * @seek: Seeks to a location within a stream.
+ * @can_truncate: Checks if truncation is supported by the stream.
+ * @truncate_fn: Truncates a stream.
+ *
+ * Provides an interface for implementing seekable functionality on I/O Streams.
+ */
+
+
+/**
+ * GSettings::change-event:
+ * @settings: the object on which the signal was emitted
+ * @keys: (array length=n_keys) (element-type GQuark) (allow-none):  an array of #GQuark<!-- -->s for the changed keys, or %NULL
+ * @n_keys: the length of the @keys array, or 0
+ *
+ * The "change-event" signal is emitted once per change event that
+ * affects this settings object.  You should connect to this signal
+ * only if you are interested in viewing groups of changes before they
+ * are split out into multiple emissions of the "changed" signal.
+ * For most use cases it is more appropriate to use the "changed" signal.
+ *
+ * In the event that the change event applies to one or more specified
+ * keys, @keys will be an array of #GQuark of length @n_keys.  In the
+ * event that the change event applies to the #GSettings object as a
+ * whole (ie: potentially every key has been changed) then @keys will
+ * be %NULL and @n_keys will be 0.
+ *
+ * The default handler for this signal invokes the "changed" signal
+ * for each affected key.  If any other connected handler returns
+ * %TRUE then this default functionality will be suppressed.
+ *
+ * event. FALSE to propagate the event further.
+ *
+ * Returns: %TRUE to stop other handlers from being invoked for the
+ */
+
+
+/**
+ * GSettings::changed:
+ * @settings: the object on which the signal was emitted
+ * @key: the name of the key that changed
+ *
+ * The "changed" signal is emitted when a key has potentially changed.
+ * You should call one of the g_settings_get() calls to check the new
+ * value.
+ *
+ * This signal supports detailed connections.  You can connect to the
+ * detailed signal "changed::x" in order to only receive callbacks
+ * when key "x" changes.
+ */
+
+
+/**
+ * GSettings::writable-change-event:
+ * @settings: the object on which the signal was emitted
+ * @key: the quark of the key, or 0
+ *
+ * The "writable-change-event" signal is emitted once per writability
+ * change event that affects this settings object.  You should connect
+ * to this signal if you are interested in viewing groups of changes
+ * before they are split out into multiple emissions of the
+ * "writable-changed" signal.  For most use cases it is more
+ * appropriate to use the "writable-changed" signal.
+ *
+ * In the event that the writability change applies only to a single
+ * key, @key will be set to the #GQuark for that key.  In the event
+ * that the writability change affects the entire settings object,
+ * @key will be 0.
+ *
+ * The default handler for this signal invokes the "writable-changed"
+ * and "changed" signals for each affected key.  This is done because
+ * changes in writability might also imply changes in value (if for
+ * example, a new mandatory setting is introduced).  If any other
+ * connected handler returns %TRUE then this default functionality
+ * will be suppressed.
+ *
+ * event. FALSE to propagate the event further.
+ *
+ * Returns: %TRUE to stop other handlers from being invoked for the
+ */
+
+
+/**
+ * GSettings::writable-changed:
+ * @settings: the object on which the signal was emitted
+ * @key: the key
+ *
+ * The "writable-changed" signal is emitted when the writability of a
+ * key has potentially changed.  You should call
+ * g_settings_is_writable() in order to determine the new status.
+ *
+ * This signal supports detailed connections.  You can connect to the
+ * detailed signal "writable-changed::x" in order to only receive
+ * callbacks when the writability of "x" changes.
+ */
+
+
+/**
+ * GSettings:context:
+ *
+ * The name of the context that the settings are stored in.
+ */
+
+
+/**
+ * GSettings:delay-apply:
+ *
+ * Whether the #GSettings object is in 'delay-apply' mode. See
+ * g_settings_delay() for details.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GSettings:has-unapplied:
+ *
+ * If this property is %TRUE, the #GSettings object has outstanding
+ * changes that will be applied when g_settings_apply() is called.
+ */
+
+
+/**
+ * GSettings:path:
+ *
+ * The path within the backend where the settings are stored.
+ */
+
+
+/**
+ * GSettings:schema:
+ *
+ * The name of the schema that describes the types of keys
+ * for this #GSettings object.
+ *
+ * The type of this property is *not* #GSettingsSchema.
+ * #GSettingsSchema has only existed since version 2.32 and
+ * unfortunately this name was used in previous versions to refer to
+ * the schema ID rather than the schema itself.  Take care to use the
+ * 'settings-schema' property if you wish to pass in a
+ * #GSettingsSchema.
+ *
+ * Deprecated:2.32:Use the 'schema-id' property instead.  In a future
+ * version, this property may instead refer to a #GSettingsSchema.
+ */
+
+
+/**
+ * GSettings:schema-id:
+ *
+ * The name of the schema that describes the types of keys
+ * for this #GSettings object.
+ */
+
+
+/**
+ * GSettings:settings-schema:
+ *
+ * The #GSettingsSchema describing the types of keys for this
+ * #GSettings object.
+ *
+ * Ideally, this property would be called 'schema'.  #GSettingsSchema
+ * has only existed since version 2.32, however, and before then the
+ * 'schema' property was used to refer to the ID of the schema rather
+ * than the schema itself.  Take care.
+ */
+
+
+/**
+ * GSettingsBackend:
+ *
+ * An implementation of a settings storage repository.
+ */
+
+
+/**
+ * GSettingsBindFlags:
+ * @G_SETTINGS_BIND_DEFAULT: Equivalent to <literal>G_SETTINGS_BIND_GET|G_SETTINGS_BIND_SET</literal>
+ * @G_SETTINGS_BIND_GET: Update the #GObject property when the setting changes. It is an error to use this flag if the property is not writable.
+ * @G_SETTINGS_BIND_SET: Update the setting when the #GObject property changes. It is an error to use this flag if the property is not readable.
+ * @G_SETTINGS_BIND_NO_SENSITIVITY: Do not try to bind a "sensitivity" property to the writability of the setting
+ * @G_SETTINGS_BIND_GET_NO_CHANGES: When set in addition to #G_SETTINGS_BIND_GET, set the #GObject property value initially from the setting, but do not listen for changes of the setting
+ * @G_SETTINGS_BIND_INVERT_BOOLEAN: When passed to g_settings_bind(), uses a pair of mapping functions that invert the boolean value when mapping between the setting and the property.  The setting and property must both be booleans.  You cannot pass this flag to g_settings_bind_with_mapping().
+ *
+ * Flags used when creating a binding. These flags determine in which
+ * direction the binding works. The default is to synchronize in both
+ * directions.
+ */
+
+
+/**
+ * GSettingsBindGetMapping:
+ * @value: return location for the property value
+ * @variant: the #GVariant
+ * @user_data: user data that was specified when the binding was created
+ *
+ * The type for the function that is used to convert from #GSettings to
+ * an object property. The @value is already initialized to hold values
+ * of the appropriate type.
+ *
+ * Returns: %TRUE if the conversion succeeded, %FALSE in case of an error
+ */
+
+
+/**
+ * GSettingsBindSetMapping:
+ * @value: a #GValue containing the property value to map
+ * @expected_type: the #GVariantType to create
+ * @user_data: user data that was specified when the binding was created
+ *
+ * The type for the function that is used to convert an object property
+ * value to a #GVariant for storing it in #GSettings.
+ *
+ * or %NULL in case of an error
+ *
+ * Returns: a new #GVariant holding the data from @value,
+ */
+
+
+/**
+ * GSettingsGetMapping:
+ * @value: the #GVariant to map, or %NULL
+ * @result: (out): the result of the mapping
+ * @user_data: (closure): the user data that was passed to g_settings_get_mapped()
+ *
+ * The type of the function that is used to convert from a value stored
+ * in a #GSettings to a value that is useful to the application.
+ *
+ * If the value is successfully mapped, the result should be stored at
+ * @result and %TRUE returned.  If mapping fails (for example, if @value
+ * is not in the right format) then %FALSE should be returned.
+ *
+ * If @value is %NULL then it means that the mapping function is being
+ * given a "last chance" to successfully return a valid value.  %TRUE
+ * must be returned in this case.
+ *
+ * Returns: %TRUE if the conversion succeeded, %FALSE in case of an error
+ */
+
+
+/**
+ * GSettingsSchema:
+ *
+ * This is an opaque structure type.  You may not access it directly.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GSettingsSchemaSource:
+ *
+ * This is an opaque structure type.  You may not access it directly.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GSignalAccumulator:
+ * @ihint: Signal invocation hint, see #GSignalInvocationHint.
+ * @return_accu: Accumulator to collect callback return values in, this is the return value of the current signal emission.
+ * @handler_return: A #GValue holding the return value of the signal handler.
+ * @data: Callback data that was specified when creating the signal.
+ *
+ * The signal accumulator is a special callback function that can be used
+ * to collect return values of the various callbacks that are called
+ * during a signal emission. The signal accumulator is specified at signal
+ * creation time, if it is left %NULL, no accumulation of callback return
+ * values is performed. The return value of signal emissions is then the
+ * value returned by the last callback.
+ *
+ * should be aborted. Returning %FALSE means to abort the
+ * current emission and %TRUE is returned for continuation.
+ *
+ * Returns: The accumulator function returns whether the signal emission
+ */
+
+
+/**
+ * GSignalCMarshaller:
+ *
+ * This is the signature of marshaller functions, required to marshall
+ * arrays of parameter values to signal emissions into C language callback
+ * invocations. It is merely an alias to #GClosureMarshal since the #GClosure
+ * mechanism takes over responsibility of actual function invocation for the
+ * signal system.
+ */
+
+
+/**
+ * GSignalCVaMarshaller:
+ *
+ * This is the signature of va_list marshaller functions, an optional
+ * marshaller that can be used in some situations to avoid
+ * marshalling the signal argument into GValues.
+ */
+
+
+/**
+ * GSignalEmissionHook:
+ * @ihint: Signal invocation hint, see #GSignalInvocationHint.
+ * @n_param_values: the number of parameters to the function, including the instance on which the signal was emitted.
+ * @param_values: (array length=n_param_values): the instance on which the signal was emitted, followed by the parameters of the emission.
+ * @data: user data associated with the hook.
+ *
+ * A simple function pointer to get invoked when the signal is emitted. This
+ * allows you to tie a hook to the signal type, so that it will trap all
+ * emissions of that signal, from any object.
+ *
+ * You may not attach these to signals created with the #G_SIGNAL_NO_HOOKS flag.
+ *
+ * hook is disconnected (and destroyed).
+ *
+ * Returns: whether it wants to stay connected. If it returns %FALSE, the signal
+ */
+
+
+/**
+ * GSignalFlags:
+ * @G_SIGNAL_RUN_FIRST: Invoke the object method handler in the first emission stage.
+ * @G_SIGNAL_RUN_LAST: Invoke the object method handler in the third emission stage.
+ * @G_SIGNAL_RUN_CLEANUP: Invoke the object method handler in the last emission stage.
+ * @G_SIGNAL_NO_RECURSE: 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.
+ * @G_SIGNAL_DETAILED: This signal supports "::detail" appendices to the signal name upon handler connections and emissions.
+ * @G_SIGNAL_ACTION: Action signals are signals that may freely be emitted on alive objects from user code via g_signal_emit() 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.
+ * @G_SIGNAL_NO_HOOKS: No emissions hooks are supported for this signal.
+ * @G_SIGNAL_MUST_COLLECT: Varargs signal emission will always collect the arguments, even if there are no signal handlers connected.  Since 2.30.
+ * @G_SIGNAL_DEPRECATED: The signal is deprecated and will be removed in a future version. A warning will be generated if it is connected while running with G_ENABLE_DIAGNOSTIC=1.  Since 2.32.
+ *
+ * The signal flags are used to specify a signal's behaviour, the overall
+ * signal description outlines how especially the RUN flags control the
+ * stages of a signal emission.
+ */
+
+
+/**
+ * GSignalInvocationHint:
+ * @signal_id: The signal id of the signal invoking the callback
+ * @detail: The detail passed on for this emission
+ * @run_type: The stage the signal emission is currently in, this field will contain one of %G_SIGNAL_RUN_FIRST, %G_SIGNAL_RUN_LAST or %G_SIGNAL_RUN_CLEANUP.
+ *
+ * The #GSignalInvocationHint structure is used to pass on additional information
+ * to callbacks during a signal emission.
+ */
+
+
+/**
+ * GSignalMatchType:
+ * @G_SIGNAL_MATCH_ID: The signal id must be equal.
+ * @G_SIGNAL_MATCH_DETAIL: The signal detail be equal.
+ * @G_SIGNAL_MATCH_CLOSURE: The closure must be the same.
+ * @G_SIGNAL_MATCH_FUNC: The C closure callback must be the same.
+ * @G_SIGNAL_MATCH_DATA: The closure data must be the same.
+ * @G_SIGNAL_MATCH_UNBLOCKED: Only unblocked signals may matched.
+ *
+ * The match types specify what g_signal_handlers_block_matched(),
+ * g_signal_handlers_unblock_matched() and g_signal_handlers_disconnect_matched()
+ * match signals by.
+ */
+
+
+/**
+ * GSignalQuery:
+ * @signal_id: The signal id of the signal being queried, or 0 if the signal to be queried was unknown.
+ * @signal_name: The signal name.
+ * @itype: The interface/instance type that this signal can be emitted for.
+ * @signal_flags: The signal flags as passed in to g_signal_new().
+ * @return_type: The return type for user callbacks.
+ * @n_params: The number of parameters that user callbacks take.
+ * @param_types: The individual parameter types for user callbacks, note that the effective callback signature is: <programlisting> @return_type callback (#gpointer     data1, [param_types param_names,] gpointer     data2); </programlisting>
+ *
+ * A structure holding in-depth information for a specific signal. It is
+ * filled in by the g_signal_query() function.
+ */
+
+
+/**
+ * GSimpleAction::activate:
+ * @simple: the #GSimpleAction
+ * @parameter: (allow-none): the parameter to the activation
+ *
+ * Indicates that the action was just activated.
+ *
+ * @parameter will always be of the expected type.  In the event that
+ * an incorrect type was given, no signal will be emitted.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GSimpleAction::change-state:
+ * @simple: the #GSimpleAction
+ * @value: (allow-none): the requested value for the state
+ *
+ * Indicates that the action just received a request to change its
+ * state.
+ *
+ * @value will always be of the correct state type.  In the event that
+ * an incorrect type was given, no signal will be emitted.
+ *
+ * If no handler is connected to this signal then the default
+ * behaviour is to call g_simple_action_set_state() to set the state
+ * to the requested value.  If you connect a signal handler then no
+ * default action is taken.  If the state should change then you must
+ * call g_simple_action_set_state() from the handler.
+ *
+ * <example>
+ * <title>Example 'change-state' handler</title>
+ * <programlisting>
+ * static void
+ * change_volume_state (GSimpleAction *action,
+ * GVariant      *value,
+ * gpointer       user_data)
+ * {
+ * gint requested;
+ *
+ * requested = g_variant_get_int32 (value);
+ *
+ * // Volume only goes from 0 to 10
+ * if (0 <= requested && requested <= 10)
+ * g_simple_action_set_state (action, value);
+ * }
+ * </programlisting>
+ * </example>
+ *
+ * The handler need not set the state to the requested value.  It
+ * could set it to any value at all, or take some other action.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GSimpleAction:enabled:
+ *
+ * If @action is currently enabled.
+ *
+ * If the action is disabled then calls to g_action_activate() and
+ * g_action_change_state() have no effect.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GSimpleAction:name:
+ *
+ * The name of the action.  This is mostly meaningful for identifying
+ * the action once it has been added to a #GSimpleActionGroup.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GSimpleAction:parameter-type:
+ *
+ * The type of the parameter that must be given when activating the
+ * action.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GSimpleAction:state:
+ *
+ * The state of the action, or %NULL if the action is stateless.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GSimpleAction:state-type:
+ *
+ * The #GVariantType of the state that the action has, or %NULL if the
+ * action is stateless.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GSimpleActionGroup:
+ *
+ * The #GSimpleActionGroup structure contains private data and should only be accessed using the provided API.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GSimpleAsyncResult:
+ *
+ * A simple implementation of #GAsyncResult.
+ */
+
+
+/**
+ * GSimpleAsyncThreadFunc:
+ * @res: a #GSimpleAsyncResult.
+ * @object: a #GObject.
+ * @cancellable: optional #GCancellable object, %NULL to ignore.
+ *
+ * Simple thread function that runs an asynchronous operation and
+ * checks for cancellation.
+ */
+
+
+/**
+ * GSimplePermission:
+ *
+ * #GSimplePermission is an opaque data structure.  There are no methods
+ * except for those defined by #GPermission.
+ */
+
+
+/**
+ * GSocket:
+ *
+ * A lowlevel network socket object.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GSocket:broadcast:
+ *
+ * Whether the socket should allow sending to and receiving from broadcast addresses.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GSocket:multicast-loopback:
+ *
+ * Whether outgoing multicast packets loop back to the local host.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GSocket:multicast-ttl:
+ *
+ * Time-to-live out outgoing multicast packets
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GSocket:timeout:
+ *
+ * The timeout in seconds on socket I/O
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GSocket:ttl:
+ *
+ * Time-to-live for outgoing unicast packets
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GSocketAddress:
+ *
+ * A socket endpoint address, corresponding to <type>struct sockaddr</type>
+ * or one of its subtypes.
+ */
+
+
+/**
+ * GSocketAddressEnumerator:
+ *
+ * Enumerator type for objects that contain or generate
+ * #GSocketAddress<!-- -->es.
+ */
+
+
+/**
+ * GSocketClient:
+ *
+ * A helper class for network servers to listen for and accept connections.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GSocketClient::event:
+ * @client: the #GSocketClient
+ * @event: the event that is occurring
+ * @connectable: the #GSocketConnectable that @event is occurring on
+ * @connection: the current representation of the connection
+ *
+ * Emitted when @client's activity on @connectable changes state.
+ * Among other things, this can be used to provide progress
+ * information about a network connection in the UI. The meanings of
+ * the different @event values are as follows:
+ *
+ * <variablelist>
+ * <varlistentry>
+ * <term>%G_SOCKET_CLIENT_RESOLVING:</term>
+ * <listitem><para>
+ * @client is about to look up @connectable in DNS.
+ * @connection will be %NULL.
+ * </para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term>%G_SOCKET_CLIENT_RESOLVED:</term>
+ * <listitem><para>
+ * @client has successfully resolved @connectable in DNS.
+ * @connection will be %NULL.
+ * </para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term>%G_SOCKET_CLIENT_CONNECTING:</term>
+ * <listitem><para>
+ * @client is about to make a connection to a remote host;
+ * either a proxy server or the destination server itself.
+ * @connection is the #GSocketConnection, which is not yet
+ * connected.
+ * </para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term>%G_SOCKET_CLIENT_CONNECTED:</term>
+ * <listitem><para>
+ * @client has successfully connected to a remote host.
+ * @connection is the connected #GSocketConnection.
+ * </para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term>%G_SOCKET_CLIENT_PROXY_NEGOTIATING:</term>
+ * <listitem><para>
+ * @client is about to negotiate with a proxy to get it to
+ * connect to @connectable. @connection is the
+ * #GSocketConnection to the proxy server.
+ * </para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term>%G_SOCKET_CLIENT_PROXY_NEGOTIATED:</term>
+ * <listitem><para>
+ * @client has negotiated a connection to @connectable through
+ * a proxy server. @connection is the stream returned from
+ * g_proxy_connect(), which may or may not be a
+ * #GSocketConnection.
+ * </para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term>%G_SOCKET_CLIENT_TLS_HANDSHAKING:</term>
+ * <listitem><para>
+ * @client is about to begin a TLS handshake. @connection is a
+ * #GTlsClientConnection.
+ * </para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term>%G_SOCKET_CLIENT_TLS_HANDSHAKED:</term>
+ * <listitem><para>
+ * @client has successfully completed the TLS handshake.
+ * @connection is a #GTlsClientConnection.
+ * </para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term>%G_SOCKET_CLIENT_COMPLETE:</term>
+ * <listitem><para>
+ * @client has either successfully connected to @connectable
+ * (in which case @connection is the #GSocketConnection that
+ * it will be returning to the caller) or has failed (in which
+ * case @connection is %NULL and the client is about to return
+ * an error).
+ * </para></listitem>
+ * </varlistentry>
+ * </variablelist>
+ *
+ * Each event except %G_SOCKET_CLIENT_COMPLETE may be emitted
+ * multiple times (or not at all) for a given connectable (in
+ * particular, if @client ends up attempting to connect to more than
+ * one address). However, if @client emits the #GSocketClient::event
+ * signal at all for a given connectable, that it will always emit
+ * it with %G_SOCKET_CLIENT_COMPLETE when it is done.
+ *
+ * Note that there may be additional #GSocketClientEvent values in
+ * the future; unrecognized @event values should be ignored.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GSocketClientEvent:
+ * @G_SOCKET_CLIENT_RESOLVING: The client is doing a DNS lookup.
+ * @G_SOCKET_CLIENT_RESOLVED: The client has completed a DNS lookup.
+ * @G_SOCKET_CLIENT_CONNECTING: The client is connecting to a remote host (either a proxy or the destination server).
+ * @G_SOCKET_CLIENT_CONNECTED: The client has connected to a remote host.
+ * @G_SOCKET_CLIENT_PROXY_NEGOTIATING: The client is negotiating with a proxy to connect to the destination server.
+ * @G_SOCKET_CLIENT_PROXY_NEGOTIATED: The client has negotiated with the proxy server.
+ * @G_SOCKET_CLIENT_TLS_HANDSHAKING: The client is performing a TLS handshake.
+ * @G_SOCKET_CLIENT_TLS_HANDSHAKED: The client has performed a TLS handshake.
+ * @G_SOCKET_CLIENT_COMPLETE: The client is done with a particular #GSocketConnectable.
+ *
+ * Describes an event occurring on a #GSocketClient. See the
+ * #GSocketClient::event signal for more details.
+ *
+ * Additional values may be added to this type in the future.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GSocketConnectable:
+ *
+ * Interface for objects that contain or generate #GSocketAddress<!-- -->es.
+ */
+
+
+/**
+ * GSocketConnectableIface:
+ * @g_iface: The parent interface.
+ * @enumerate: Creates a #GSocketAddressEnumerator
+ * @proxy_enumerate: Creates a #GProxyAddressEnumerator
+ *
+ * Provides an interface for returning a #GSocketAddressEnumerator
+ * and #GProxyAddressEnumerator
+ */
+
+
+/**
+ * GSocketConnection:
+ *
+ * A socket connection GIOStream object for connection-oriented sockets.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GSocketControlMessage:
+ *
+ * Base class for socket-type specific control messages that can be sent and
+ * received over #GSocket.
+ */
+
+
+/**
+ * GSocketControlMessageClass:
+ * @get_size: gets the size of the message.
+ * @get_level: gets the protocol of the message.
+ * @get_type: gets the protocol specific type of the message.
+ * @serialize: Writes out the message data.
+ * @deserialize: Tries to deserialize a message.
+ *
+ *
+ */
+
+
+/**
+ * GSocketFamily:
+ * @G_SOCKET_FAMILY_INVALID: no address family
+ * @G_SOCKET_FAMILY_IPV4: the IPv4 family
+ * @G_SOCKET_FAMILY_IPV6: the IPv6 family
+ * @G_SOCKET_FAMILY_UNIX: the UNIX domain family
+ *
+ * The protocol family of a #GSocketAddress. (These values are
+ * identical to the system defines %AF_INET, %AF_INET6 and %AF_UNIX,
+ * if available.)
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GSocketListenerClass:
+ * @changed: virtual method called when the set of socket listened to changes
+ *
+ *
+ */
+
+
+/**
+ * GSocketMsgFlags:
+ * @G_SOCKET_MSG_NONE: No flags.
+ * @G_SOCKET_MSG_OOB: Request to send/receive out of band data.
+ * @G_SOCKET_MSG_PEEK: Read data from the socket without removing it from the queue.
+ * @G_SOCKET_MSG_DONTROUTE: Don't use a gateway to send out the packet, only send to hosts on directly connected networks.
+ *
+ * Flags used in g_socket_receive_message() and g_socket_send_message().
+ * The flags listed in the enum are some commonly available flags, but the
+ * values used for them are the same as on the platform, and any other flags
+ * are passed in/out as is. So to use a platform specific flag, just include
+ * the right system header and pass in the flag.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GSocketProtocol:
+ * @G_SOCKET_PROTOCOL_UNKNOWN: The protocol type is unknown
+ * @G_SOCKET_PROTOCOL_DEFAULT: The default protocol for the family/type
+ * @G_SOCKET_PROTOCOL_TCP: TCP over IP
+ * @G_SOCKET_PROTOCOL_UDP: UDP over IP
+ * @G_SOCKET_PROTOCOL_SCTP: SCTP over IP
+ *
+ * A protocol identifier is specified when creating a #GSocket, which is a
+ * family/type specific identifier, where 0 means the default protocol for
+ * the particular family/type.
+ *
+ * This enum contains a set of commonly available and used protocols. You
+ * can also pass any other identifiers handled by the platform in order to
+ * use protocols not listed here.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GSocketService:
+ *
+ * A helper class for handling accepting incomming connections in the
+ * glib mainloop.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GSocketService::incoming:
+ * @service: the #GSocketService
+ * @connection: a new #GSocketConnection object
+ * @source_object: (allow-none): the source_object passed to g_socket_listener_add_address()
+ *
+ * The ::incoming signal is emitted when a new incoming connection
+ * to @service needs to be handled. The handler must initiate the
+ * handling of @connection, but may not block; in essence,
+ * asynchronous operations must be used.
+ *
+ * @connection will be unreffed once the signal handler returns,
+ * so you need to ref it yourself if you are planning to use it.
+ *
+ * Returns: %TRUE to stop other handlers from being called
+ * Since: 2.22
+ */
+
+
+/**
+ * GSocketServiceClass:
+ * @incomming: signal emitted when new connections are accepted
+ *
+ *
+ */
+
+
+/**
+ * GSocketSourceFunc:
+ * @socket: the #GSocket
+ * @condition: the current condition at the source fired.
+ * @user_data: data passed in by the user.
+ *
+ * This is the function type of the callback used for the #GSource
+ * returned by g_socket_create_source().
+ *
+ * Returns: it should return %FALSE if the source should be removed.
+ * Since: 2.22
+ */
+
+
+/**
+ * GSocketType:
+ * @G_SOCKET_TYPE_INVALID: Type unknown or wrong
+ * @G_SOCKET_TYPE_STREAM: Reliable connection-based byte streams (e.g. TCP).
+ * @G_SOCKET_TYPE_DATAGRAM: Connectionless, unreliable datagram passing. (e.g. UDP)
+ * @G_SOCKET_TYPE_SEQPACKET: Reliable connection-based passing of datagrams of fixed maximum length (e.g. SCTP).
+ *
+ * Flags used when creating a #GSocket. Some protocols may not implement
+ * all the socket types.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GSource:
+ *
+ * The <structname>GSource</structname> struct is an opaque data type
+ * representing an event source.
+ */
+
+
+/**
+ * GSourceCallbackFuncs:
+ * @ref: Called when a reference is added to the callback object
+ * @unref: Called when a reference to the callback object is dropped
+ * @get: Called to extract the callback function and data from the callback object. The <structname>GSourceCallbackFuncs</structname> struct contains functions for managing callback objects.
+ *
+ *
+ */
+
+
+/**
+ * GSourceDummyMarshal:
+ *
+ * This is just a placeholder for #GClosureMarshal,
+ * which cannot be used here for dependency reasons.
+ */
+
+
+/**
+ * GSourceFunc:
+ * @user_data: data passed to the function, set when the source was created with one of the above functions
+ *
+ * Specifies the type of function passed to g_timeout_add(),
+ * g_timeout_add_full(), g_idle_add(), and g_idle_add_full().
+ *
+ * Returns: %FALSE if the source should be removed
+ */
+
+
+/**
+ * GSourceFuncs:
+ * @prepare: Called before all the file descriptors are polled. If the source can determine that it is ready here (without waiting for the results of the poll() call) it should return %TRUE. It can also return a @timeout_ value which should be the maximum timeout (in milliseconds) which should be passed to the poll() call. The actual timeout used will be -1 if all sources returned -1, or it will be the minimum of all the @timeout_ values returned which were >= 0.
+ * @check: Called after all the file descriptors are polled. The source should return %TRUE if it is ready to be dispatched. Note that some time may have passed since the previous prepare function was called, so the source should be checked again here.
+ * @dispatch: Called to dispatch the event source, after it has returned %TRUE in either its @prepare or its @check function. The @dispatch function is passed in a callback function and data. The callback function may be %NULL if the source was never connected to a callback using g_source_set_callback(). The @dispatch function should call the callback function with @user_data and whatever additional parameters are needed for this type of event source.
+ * @finalize: Called when the source is finalized.
+ *
+ * The <structname>GSourceFuncs</structname> struct contains a table of
+ * functions used to handle event sources in a generic manner.
+ *
+ * For idle sources, the prepare and check functions always return %TRUE
+ * to indicate that the source is always ready to be processed. The prepare
+ * function also returns a timeout value of 0 to ensure that the poll() call
+ * doesn't block (since that would be time wasted which could have been spent
+ * running the idle function).
+ *
+ * For timeout sources, the prepare and check functions both return %TRUE
+ * if the timeout interval has expired. The prepare function also returns
+ * a timeout value to ensure that the poll() call doesn't block too long
+ * and miss the next timeout.
+ *
+ * For file descriptor sources, the prepare function typically returns %FALSE,
+ * since it must wait until poll() has been called before it knows whether
+ * any events need to be processed. It sets the returned timeout to -1 to
+ * indicate that it doesn't mind how long the poll() call blocks. In the
+ * check function, it tests the results of the poll() call to see if the
+ * required condition has been met, and returns %TRUE if so.
+ */
+
+
+/**
+ * GSpawnChildSetupFunc:
+ * @user_data: user data to pass to the function.
+ *
+ * Specifies the type of the setup function passed to g_spawn_async(),
+ * g_spawn_sync() and g_spawn_async_with_pipes(), which can, in very
+ * limited ways, be used to affect the child's execution.
+ *
+ * On POSIX platforms, the function is called in the child after GLib
+ * has performed all the setup it plans to perform, but before calling
+ * exec(). Actions taken in this function will only affect the child,
+ * not the parent.
+ *
+ * On Windows, the function is called in the parent. Its usefulness on
+ * Windows is thus questionable. In many cases executing the child setup
+ * function in the parent can have ill effects, and you should be very
+ * careful when porting software to Windows that uses child setup
+ * functions.
+ *
+ * However, even on POSIX, you are extremely limited in what you can
+ * safely do from a #GSpawnChildSetupFunc, because any mutexes that
+ * were held by other threads in the parent process at the time of the
+ * fork() will still be locked in the child process, and they will
+ * never be unlocked (since the threads that held them don't exist in
+ * the child). POSIX allows only async-signal-safe functions (see
+ * <citerefentry><refentrytitle>signal</refentrytitle><manvolnum>7</manvolnum></citerefentry>)
+ * to be called in the child between fork() and exec(), which
+ * drastically limits the usefulness of child setup functions.
+ *
+ * In particular, it is not safe to call any function which may
+ * call malloc(), which includes POSIX functions such as setenv().
+ * If you need to set up the child environment differently from
+ * the parent, you should use g_get_environ(), g_environ_setenv(),
+ * and g_environ_unsetenv(), and then pass the complete environment
+ * list to the <literal>g_spawn...</literal> function.
+ */
+
+
+/**
+ * GSpawnError:
+ * @G_SPAWN_ERROR_FORK: Fork failed due to lack of memory.
+ * @G_SPAWN_ERROR_READ: Read or select on pipes failed.
+ * @G_SPAWN_ERROR_CHDIR: Changing to working directory failed.
+ * @G_SPAWN_ERROR_ACCES: execv() returned <literal>EACCES</literal>
+ * @G_SPAWN_ERROR_PERM: execv() returned <literal>EPERM</literal>
+ * @G_SPAWN_ERROR_TOO_BIG: execv() returned <literal>E2BIG</literal>
+ * @G_SPAWN_ERROR_2BIG: deprecated alias for %G_SPAWN_ERROR_TOO_BIG
+ * @G_SPAWN_ERROR_NOEXEC: execv() returned <literal>ENOEXEC</literal>
+ * @G_SPAWN_ERROR_NAMETOOLONG: execv() returned <literal>ENAMETOOLONG</literal>
+ * @G_SPAWN_ERROR_NOENT: execv() returned <literal>ENOENT</literal>
+ * @G_SPAWN_ERROR_NOMEM: execv() returned <literal>ENOMEM</literal>
+ * @G_SPAWN_ERROR_NOTDIR: execv() returned <literal>ENOTDIR</literal>
+ * @G_SPAWN_ERROR_LOOP: execv() returned <literal>ELOOP</literal>
+ * @G_SPAWN_ERROR_TXTBUSY: execv() returned <literal>ETXTBUSY</literal>
+ * @G_SPAWN_ERROR_IO: execv() returned <literal>EIO</literal>
+ * @G_SPAWN_ERROR_NFILE: execv() returned <literal>ENFILE</literal>
+ * @G_SPAWN_ERROR_MFILE: execv() returned <literal>EMFILE</literal>
+ * @G_SPAWN_ERROR_INVAL: execv() returned <literal>EINVAL</literal>
+ * @G_SPAWN_ERROR_ISDIR: execv() returned <literal>EISDIR</literal>
+ * @G_SPAWN_ERROR_LIBBAD: execv() returned <literal>ELIBBAD</literal>
+ * @G_SPAWN_ERROR_FAILED: Some other fatal failure, <literal>error-&gt;message</literal> should explain.
+ *
+ * Error codes returned by spawning processes.
+ */
+
+
+/**
+ * GSpawnFlags:
+ * @G_SPAWN_LEAVE_DESCRIPTORS_OPEN: the parent's open file descriptors will be inherited by the child; otherwise all descriptors except stdin/stdout/stderr will be closed before calling exec() in the child.
+ * @G_SPAWN_DO_NOT_REAP_CHILD: the child will not be automatically reaped; you must use g_child_watch_add() yourself (or call waitpid() or handle <literal>SIGCHLD</literal> yourself), or the child will become a zombie.
+ * @G_SPAWN_SEARCH_PATH: <literal>argv[0]</literal> need not be an absolute path, it will be looked for in the user's <envar>PATH</envar>.
+ * @G_SPAWN_STDOUT_TO_DEV_NULL: the child's standard output will be discarded, instead of going to the same location as the parent's standard output.
+ * @G_SPAWN_STDERR_TO_DEV_NULL: the child's standard error will be discarded.
+ * @G_SPAWN_CHILD_INHERITS_STDIN: the child will inherit the parent's standard input (by default, the child's standard input is attached to <filename>/dev/null</filename>).
+ * @G_SPAWN_FILE_AND_ARGV_ZERO: the first element of <literal>argv</literal> is the file to execute, while the remaining elements are the actual argument vector to pass to the file. Normally g_spawn_async_with_pipes() uses <literal>argv[0]</literal> as the file to execute, and passes all of <literal>argv</literal> to the child.
+ *
+ * Flags passed to g_spawn_sync(), g_spawn_async() and g_spawn_async_with_pipes().
+ */
+
+
+/**
+ * GSrvTarget:
+ *
+ * A single target host/port that a network service is running on.
+ */
+
+
+/**
+ * GStrv:
+ *
+ * A C representable type name for #G_TYPE_STRV.
+ */
+
+
+/**
+ * GTcpConnection:
+ *
+ * A #GSocketConnection for UNIX domain socket connections.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GTestLogFatalFunc:
+ * @log_domain: the log domain of the message
+ * @log_level: the log level of the message (including the fatal and recursion flags)
+ * @message: the message to process
+ * @user_data: user data, set in g_test_log_set_fatal_handler()
+ *
+ * Specifies the prototype of fatal log handler functions.
+ *
+ * Returns: %TRUE if the program should abort, %FALSE otherwise
+ * Since: 2.22
+ */
+
+
+/**
+ * GThemedIcon:
+ *
+ * An implementation of #GIcon for themed icons.
+ */
+
+
+/**
+ * GThemedIcon:name:
+ *
+ * The icon name.
+ */
+
+
+/**
+ * GThemedIcon:names:
+ *
+ * A %NULL-terminated array of icon names.
+ */
+
+
+/**
+ * GThemedIcon:use-default-fallbacks:
+ *
+ * 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.
+ *
+ * For example, if the icon name was "gnome-dev-cdrom-audio", the array
+ * would become
+ * |[
+ * {
+ * "gnome-dev-cdrom-audio",
+ * "gnome-dev-cdrom",
+ * "gnome-dev",
+ * "gnome",
+ * NULL
+ * };
+ * ]|
+ */
+
+
+/**
+ * GThreadedSocketService:
+ *
+ * A helper class for handling accepting incoming connections in the
+ * glib mainloop and handling them in a thread.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GThreadedSocketService::run:
+ * @service: the #GThreadedSocketService.
+ * @connection: a new #GSocketConnection object.
+ * @source_object: the source_object passed to g_socket_listener_add_address().
+ *
+ * The ::run signal is emitted in a worker thread in response to an
+ * incoming connection. This thread is dedicated to handling
+ * @connection and may perform blocking IO. The signal handler need
+ * not return until the connection is closed.
+ *
+ * Returns: %TRUE to stop further signal handlers from being called
+ */
+
+
+/**
+ * GTimeSpan:
+ *
+ * A value representing an interval of time, in microseconds.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GTimeType:
+ * @G_TIME_TYPE_STANDARD: the time is in local standard time
+ * @G_TIME_TYPE_DAYLIGHT: the time is in local daylight time
+ * @G_TIME_TYPE_UNIVERSAL: the time is in UTC
+ *
+ * Disambiguates a given time in two ways.
+ *
+ * First, specifies if the given time is in universal or local time.
+ *
+ * Second, if the time is in local time, specifies if it is local
+ * standard time or local daylight time.  This is important for the case
+ * where the same local time occurs twice (during daylight savings time
+ * transitions, for example).
+ */
+
+
+/**
+ * GTlsAuthenticationMode:
+ * @G_TLS_AUTHENTICATION_NONE: client authentication not required
+ * @G_TLS_AUTHENTICATION_REQUESTED: client authentication is requested
+ * @G_TLS_AUTHENTICATION_REQUIRED: client authentication is required
+ *
+ * The client authentication mode for a #GTlsServerConnection.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GTlsBackend:
+ *
+ * TLS (Transport Layer Security, aka SSL) backend. This is an
+ * internal type used to coordinate the different classes implemented
+ * by a TLS backend.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GTlsBackendInterface:
+ * @g_iface: The parent interface.
+ * @supports_tls: returns whether the backend supports TLS.
+ * @get_default_database: returns a default #GTlsDatabase instance.
+ * @get_certificate_type: returns the #GTlsCertificate implementation type
+ * @get_client_connection_type: returns the #GTlsClientConnection implementation type
+ * @get_server_connection_type: returns the #GTlsServerConnection implementation type
+ * @get_file_database_type: returns the #GTlsFileDatabase implementation type.
+ *
+ * Provides an interface for describing TLS-related types.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GTlsCertificate:
+ *
+ * Abstract base class for TLS certificate types.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GTlsCertificate:certificate:
+ *
+ * The DER (binary) encoded representation of the certificate's
+ * public key. This property and the
+ * #GTlsCertificate:certificate-pem property represent the same
+ * data, just in different forms.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GTlsCertificate:certificate-pem:
+ *
+ * The PEM (ASCII) encoded representation of the certificate's
+ * public key. This property and the #GTlsCertificate:certificate
+ * property represent the same data, just in different forms.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GTlsCertificate:issuer:
+ *
+ * A #GTlsCertificate representing the entity that issued this
+ * certificate. If %NULL, this means that the certificate is either
+ * self-signed, or else the certificate of the issuer is not
+ * available.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GTlsCertificate:private-key:
+ *
+ * The DER (binary) encoded representation of the certificate's
+ * private key, in either PKCS#1 format or unencrypted PKCS#8
+ * format. This property (or the #GTlsCertificate:private-key-pem
+ * property) can be set when constructing a key (eg, from a file),
+ * but cannot be read.
+ *
+ * PKCS#8 format is supported since 2.32; earlier releases only
+ * support PKCS#1. You can use the <literal>openssl rsa</literal>
+ * tool to convert PKCS#8 keys to PKCS#1.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GTlsCertificate:private-key-pem:
+ *
+ * The PEM (ASCII) encoded representation of the certificate's
+ * private key in either PKCS#1 format ("<literal>BEGIN RSA PRIVATE
+ * KEY</literal>") or unencrypted PKCS#8 format ("<literal>BEGIN
+ * PRIVATE KEY</literal>"). This property (or the
+ * #GTlsCertificate:private-key property) can be set when
+ * constructing a key (eg, from a file), but cannot be read.
+ *
+ * PKCS#8 format is supported since 2.32; earlier releases only
+ * support PKCS#1. You can use the <literal>openssl rsa</literal>
+ * tool to convert PKCS#8 keys to PKCS#1.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GTlsCertificateFlags:
+ * @G_TLS_CERTIFICATE_UNKNOWN_CA: The signing certificate authority is not known.
+ * @G_TLS_CERTIFICATE_BAD_IDENTITY: The certificate does not match the expected identity of the site that it was retrieved from.
+ * @G_TLS_CERTIFICATE_NOT_ACTIVATED: The certificate's activation time is still in the future
+ * @G_TLS_CERTIFICATE_EXPIRED: The certificate has expired
+ * @G_TLS_CERTIFICATE_REVOKED: The certificate has been revoked according to the #GTlsConnection's certificate revocation list.
+ * @G_TLS_CERTIFICATE_INSECURE: The certificate's algorithm is considered insecure.
+ * @G_TLS_CERTIFICATE_GENERIC_ERROR: Some other error occurred validating the certificate
+ * @G_TLS_CERTIFICATE_VALIDATE_ALL: the combination of all of the above flags
+ *
+ * A set of flags describing TLS certification validation. This can be
+ * used to set which validation steps to perform (eg, with
+ * g_tls_client_connection_set_validation_flags()), or to describe why
+ * a particular certificate was rejected (eg, in
+ * #GTlsConnection::accept-certificate).
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GTlsClientConnection:
+ *
+ * TLS client-side connection; the client-side implementation of a
+ * #GTlsConnection
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GTlsClientConnection:accepted-cas:
+ *
+ * A list of the distinguished names of the Certificate Authorities
+ * that the server will accept client certificates signed by. If the
+ * server requests a client certificate during the handshake, then
+ * this property will be set after the handshake completes.
+ *
+ * Each item in the list is a #GByteArray which contains the complete
+ * subject DN of the certificate authority.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GTlsClientConnection:server-identity:
+ *
+ * A #GSocketConnectable describing the identity of the server that
+ * is expected on the other end of the connection.
+ *
+ * If the %G_TLS_CERTIFICATE_BAD_IDENTITY flag is set in
+ * #GTlsClientConnection:validation-flags, this object will be used
+ * to determine the expected identify of the remote end of the
+ * connection; if #GTlsClientConnection:server-identity is not set,
+ * or does not match the identity presented by the server, then the
+ * %G_TLS_CERTIFICATE_BAD_IDENTITY validation will fail.
+ *
+ * In addition to its use in verifying the server certificate,
+ * this is also used to give a hint to the server about what
+ * certificate we expect, which is useful for servers that serve
+ * virtual hosts.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GTlsClientConnection:use-ssl3:
+ *
+ * If %TRUE, tells the connection to use SSL 3.0 rather than trying
+ * to negotiate the best version of TLS or SSL to use. This can be
+ * used when talking to servers that don't implement version
+ * negotiation correctly and therefore refuse to handshake at all with
+ * a "modern" TLS handshake.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GTlsClientConnection:validation-flags:
+ *
+ * What steps to perform when validating a certificate received from
+ * a server. Server certificates that fail to validate in all of the
+ * ways indicated here will be rejected unless the application
+ * overrides the default via #GTlsConnection::accept-certificate.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GTlsConnection:
+ *
+ * TLS connection. This is an abstract type that will be subclassed by
+ * a TLS-library-specific subtype.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GTlsConnection::accept-certificate:
+ * @conn: a #GTlsConnection
+ * @peer_cert: the peer's #GTlsCertificate
+ * @errors: the problems with @peer_cert.
+ *
+ * Emitted during the TLS handshake after the peer certificate has
+ * been received. You can examine @peer_cert's certification path by
+ * calling g_tls_certificate_get_issuer() on it.
+ *
+ * For a client-side connection, @peer_cert is the server's
+ * certificate, and the signal will only be emitted if the
+ * certificate was not acceptable according to @conn's
+ * #GTlsClientConnection:validation_flags. If you would like the
+ * certificate to be accepted despite @errors, return %TRUE from the
+ * signal handler. Otherwise, if no handler accepts the certificate,
+ * the handshake will fail with %G_TLS_ERROR_BAD_CERTIFICATE.
+ *
+ * For a server-side connection, @peer_cert is the certificate
+ * presented by the client, if this was requested via the server's
+ * #GTlsServerConnection:authentication_mode. On the server side,
+ * the signal is always emitted when the client presents a
+ * certificate, and the certificate will only be accepted if a
+ * handler returns %TRUE.
+ *
+ * Note that if this signal is emitted as part of asynchronous I/O
+ * in the main thread, then you should not attempt to interact with
+ * the user before returning from the signal handler. If you want to
+ * let the user decide whether or not to accept the certificate, you
+ * would have to return %FALSE from the signal handler on the first
+ * attempt, and then after the connection attempt returns a
+ * %G_TLS_ERROR_HANDSHAKE, you can interact with the user, and if
+ * the user decides to accept the certificate, remember that fact,
+ * create a new connection, and return %TRUE from the signal handler
+ * the next time.
+ *
+ * If you are doing I/O in another thread, you do not
+ * need to worry about this, and can simply block in the signal
+ * handler until the UI thread returns an answer.
+ *
+ * immediately end the signal emission). %FALSE to allow the signal
+ * emission to continue, which will cause the handshake to fail if
+ * no one else overrides it.
+ *
+ * Returns: %TRUE to accept @peer_cert (which will also
+ * Since: 2.28
+ */
+
+
+/**
+ * GTlsConnection:base-io-stream:
+ *
+ * The #GIOStream that the connection wraps
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GTlsConnection:certificate:
+ *
+ * The connection's certificate; see
+ * g_tls_connection_set_certificate().
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GTlsConnection:database:
+ *
+ * The certificate database to use when verifying this TLS connection.
+ * If no cerificate database is set, then the default database will be
+ * used. See g_tls_backend_get_default_database().
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GTlsConnection:interaction:
+ *
+ * A #GTlsInteraction object to be used when the connection or certificate
+ * database need to interact with the user. This will be used to prompt the
+ * user for passwords where necessary.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GTlsConnection:peer-certificate:
+ *
+ * The connection's peer's certificate, after the TLS handshake has
+ * completed and the certificate has been accepted. Note in
+ * particular that this is not yet set during the emission of
+ * #GTlsConnection::accept-certificate.
+ *
+ * (You can watch for a #GObject::notify signal on this property to
+ * detect when a handshake has occurred.)
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GTlsConnection:peer-certificate-errors:
+ *
+ * The errors noticed-and-ignored while verifying
+ * #GTlsConnection:peer-certificate. Normally this should be 0, but
+ * it may not be if #GTlsClientConnection:validation-flags is not
+ * %G_TLS_CERTIFICATE_VALIDATE_ALL, or if
+ * #GTlsConnection::accept-certificate overrode the default
+ * behavior.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GTlsConnection:rehandshake-mode:
+ *
+ * The rehandshaking mode. See
+ * g_tls_connection_set_rehandshake_mode().
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GTlsConnection:require-close-notify:
+ *
+ * Whether or not proper TLS close notification is required.
+ * See g_tls_connection_set_require_close_notify().
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GTlsConnection:use-system-certdb:
+ *
+ * Whether or not the system certificate database will be used to
+ * verify peer certificates. See
+ * g_tls_connection_set_use_system_certdb().
+ *
+ * Deprecated: 2.30: Use GTlsConnection:database instead
+ */
+
+
+/**
+ * GTlsDatabase:
+ *
+ * Abstract base class for the backend-specific database types.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GTlsDatabaseLookupFlags:
+ * @G_TLS_DATABASE_LOOKUP_NONE: No lookup flags
+ * @G_TLS_DATABASE_LOOKUP_KEYPAIR: Restrict lookup to certificates that have a private key.
+ *
+ * Flags for g_tls_database_lookup_certificate_handle(),
+ * g_tls_database_lookup_certificate_issuer(),
+ * and g_tls_database_lookup_certificates_issued_by().
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GTlsDatabaseVerifyFlags:
+ * @G_TLS_DATABASE_VERIFY_NONE: No verification flags
+ *
+ * Flags for g_tls_database_verify_chain().
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GTlsError:
+ * @G_TLS_ERROR_UNAVAILABLE: No TLS provider is available
+ * @G_TLS_ERROR_MISC: Miscellaneous TLS error
+ * @G_TLS_ERROR_BAD_CERTIFICATE: A certificate could not be parsed
+ * @G_TLS_ERROR_NOT_TLS: The TLS handshake failed because the peer does not seem to be a TLS server.
+ * @G_TLS_ERROR_HANDSHAKE: The TLS handshake failed because the peer's certificate was not acceptable.
+ * @G_TLS_ERROR_CERTIFICATE_REQUIRED: The TLS handshake failed because the server requested a client-side certificate, but none was provided. See g_tls_connection_set_certificate().
+ * @G_TLS_ERROR_EOF: The TLS connection was closed without proper notice, which may indicate an attack. See g_tls_connection_set_require_close_notify().
+ *
+ * An error code used with %G_TLS_ERROR in a #GError returned from a
+ * TLS-related routine.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GTlsFileDatabase:
+ *
+ * Implemented by a #GTlsDatabase which allows you to load certificates
+ * from a file.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GTlsFileDatabase:anchors:
+ *
+ * The path to a file containing PEM encoded certificate authority
+ * root anchors. The certificates in this file will be treated as
+ * root authorities for the purpose of verifying other certificates
+ * via the g_tls_database_verify_chain() operation.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GTlsFileDatabaseInterface:
+ * @g_iface: The parent interface.
+ *
+ * Provides an interface for #GTlsFileDatabase implementations.
+ */
+
+
+/**
+ * GTlsInteraction:
+ *
+ * An object representing interaction that the TLS connection and database
+ * might have with the user.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GTlsInteractionClass:
+ * @ask_password: ask for a password synchronously. If the implementation returns %G_TLS_INTERACTION_HANDLED, then the password argument should have been filled in by using g_tls_password_set_value() or a similar function.
+ * @ask_password_async: ask for a password asynchronously.
+ * @ask_password_finish: complete operation to ask for a password asynchronously. If the implementation returns %G_TLS_INTERACTION_HANDLED, then the password argument of the async method should have been filled in by using g_tls_password_set_value() or a similar function.
+ *
+ * The class for #GTlsInteraction. Derived classes implement the various
+ * virtual interaction methods to handle TLS interactions.
+ *
+ * Derived classes can choose to implement whichever interactions methods they'd
+ * like to support by overriding those virtual methods in their class
+ * initialization function. If a derived class implements an async method,
+ * it must also implement the corresponding finish method.
+ *
+ * The synchronous interaction methods should implement to display modal dialogs,
+ * and the asynchronous methods to display modeless dialogs.
+ *
+ * If the user cancels an interaction, then the result should be
+ * %G_TLS_INTERACTION_FAILED and the error should be set with a domain of
+ * %G_IO_ERROR and code of %G_IO_ERROR_CANCELLED.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GTlsInteractionResult:
+ * @G_TLS_INTERACTION_UNHANDLED: The interaction was unhandled (i.e. not implemented).
+ * @G_TLS_INTERACTION_HANDLED: The interaction completed, and resulting data is available.
+ * @G_TLS_INTERACTION_FAILED: The interaction has failed, or was cancelled. and the operation should be aborted.
+ *
+ * #GTlsInteractionResult is returned by various functions in #GTlsInteraction
+ * when finishing an interaction request.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GTlsPassword:
+ *
+ * An abstract interface representing a password used in TLS. Often used in
+ * user interaction such as unlocking a key storage token.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GTlsPasswordFlags:
+ * @G_TLS_PASSWORD_NONE: No flags
+ * @G_TLS_PASSWORD_RETRY: The password was wrong, and the user should retry.
+ * @G_TLS_PASSWORD_MANY_TRIES: Hint to the user that the password has been wrong many times, and the user may not have many chances left.
+ * @G_TLS_PASSWORD_FINAL_TRY: Hint to the user that this is the last try to get this password right.
+ *
+ * Various flags for the password.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GTlsRehandshakeMode:
+ * @G_TLS_REHANDSHAKE_NEVER: Never allow rehandshaking
+ * @G_TLS_REHANDSHAKE_SAFELY: Allow safe rehandshaking only
+ * @G_TLS_REHANDSHAKE_UNSAFELY: Allow unsafe rehandshaking
+ *
+ * When to allow rehandshaking. See
+ * g_tls_connection_set_rehandshake_mode().
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GTlsServerConnection:
+ *
+ * TLS server-side connection. This is the server-side implementation
+ * of a #GTlsConnection.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GTlsServerConnection:authentication-mode:
+ *
+ * The #GTlsAuthenticationMode for the server. This can be changed
+ * before calling g_tls_connection_handshake() if you want to
+ * rehandshake with a different mode from the initial handshake.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GToggleNotify:
+ * @data: Callback data passed to g_object_add_toggle_ref()
+ * @object: The object on which g_object_add_toggle_ref() was called.
+ * @is_last_ref: %TRUE if the toggle reference is now the last reference to the object. %FALSE if the toggle reference was the last reference and there are now other references.
+ *
+ * A callback function used for notification when the state
+ * of a toggle reference changes. See g_object_add_toggle_ref().
+ */
+
+
+/**
+ * GTranslateFunc:
+ * @str: the untranslated string
+ * @data: user data specified when installing the function, e.g. in g_option_group_set_translate_func()
+ *
+ * The type of functions which are used to translate user-visible
+ * strings, for <option>--help</option> output.
+ *
+ * The returned string is owned by GLib and must not be freed.
+ *
+ * Returns: a translation of the string for the current locale.
+ */
+
+
+/**
+ * GType:
+ *
+ * A numerical value which represents the unique identifier of a registered
+ * type.
+ */
+
+
+/**
+ * GTypeClass:
+ *
+ * An opaque structure used as the base of all classes.
+ */
+
+
+/**
+ * GTypeClassCacheFunc:
+ * @cache_data: data that was given to the g_type_add_class_cache_func() call
+ * @g_class: The #GTypeClass structure which is unreferenced
+ *
+ * A callback function which is called when the reference count of a class
+ * drops to zero. It may use g_type_class_ref() to prevent the class from
+ * being freed. You should not call g_type_class_unref() from a
+ * #GTypeClassCacheFunc function to prevent infinite recursion, use
+ * g_type_class_unref_uncached() instead.
+ *
+ * The functions have to check the class id passed in to figure
+ * whether they actually want to cache the class of this type, since all
+ * classes are routed through the same #GTypeClassCacheFunc chain.
+ *
+ * called, %FALSE to continue.
+ *
+ * Returns: %TRUE to stop further #GTypeClassCacheFunc<!-- -->s from being
+ */
+
+
+/**
+ * GTypeDebugFlags:
+ * @G_TYPE_DEBUG_NONE: Print no messages.
+ * @G_TYPE_DEBUG_OBJECTS: Print messages about object bookkeeping.
+ * @G_TYPE_DEBUG_SIGNALS: Print messages about signal emissions.
+ * @G_TYPE_DEBUG_MASK: Mask covering all debug flags.
+ *
+ * The <type>GTypeDebugFlags</type> enumeration values can be passed to
+ * g_type_init_with_debug_flags() to trigger debugging messages during runtime.
+ * Note that the messages can also be triggered by setting the
+ * <envar>GOBJECT_DEBUG</envar> environment variable to a ':'-separated list of
+ * "objects" and "signals".
+ */
+
+
+/**
+ * GTypeFlags:
+ * @G_TYPE_FLAG_ABSTRACT: Indicates an abstract type. No instances can be created for an abstract type.
+ * @G_TYPE_FLAG_VALUE_ABSTRACT: Indicates an abstract value type, i.e. a type that introduces a value table, but can't be used for g_value_init().
+ *
+ * Bit masks used to check or determine characteristics of a type.
+ */
+
+
+/**
+ * GTypeFundamentalFlags:
+ * @G_TYPE_FLAG_CLASSED: Indicates a classed type.
+ * @G_TYPE_FLAG_INSTANTIATABLE: Indicates an instantiable type (implies classed).
+ * @G_TYPE_FLAG_DERIVABLE: Indicates a flat derivable type.
+ * @G_TYPE_FLAG_DEEP_DERIVABLE: Indicates a deep derivable type (implies derivable).
+ *
+ * Bit masks used to check or determine specific characteristics of a
+ * fundamental type.
+ */
+
+
+/**
+ * GTypeFundamentalInfo:
+ * @type_flags: #GTypeFundamentalFlags describing the characteristics of the fundamental type
+ *
+ * A structure that provides information to the type system which is
+ * used specifically for managing fundamental types.
+ */
+
+
+/**
+ * GTypeInfo:
+ * @class_size: Size of the class structure (required for interface, classed and instantiatable types).
+ * @base_init: Location of the base initialization function (optional).
+ * @base_finalize: Location of the base finalization function (optional).
+ * @class_init: Location of the class initialization function for classed and instantiatable types. Location of the default vtable inititalization function for interface types. (optional) This function is used both to fill in virtual functions in the class or default vtable, and to do type-specific setup such as registering signals and object properties.
+ * @class_finalize: Location of the class finalization function for classed and instantiatable types. Location fo the default vtable finalization function for interface types. (optional)
+ * @class_data: User-supplied data passed to the class init/finalize functions.
+ * @instance_size: Size of the instance (object) structure (required for instantiatable types only).
+ * @n_preallocs: Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the <link linkend="glib-Memory-Slices">slice allocator</link> now.
+ * @instance_init: Location of the instance initialization function (optional, for instantiatable types only).
+ * @value_table: A #GTypeValueTable function table for generic handling of GValues of this type (usually only useful for fundamental types).
+ *
+ * This structure is used to provide the type system with the information
+ * required to initialize and destruct (finalize) a type's class and
+ * its instances.
+ * The initialized structure is passed to the g_type_register_static() function
+ * (or is copied into the provided #GTypeInfo structure in the
+ * g_type_plugin_complete_type_info()). The type system will perform a deep
+ * copy of this structure, so its memory does not need to be persistent
+ * across invocation of g_type_register_static().
+ */
+
+
+/**
+ * GTypeInstance:
+ *
+ * An opaque structure used as the base of all type instances.
+ */
+
+
+/**
+ * GTypeInterface:
+ *
+ * An opaque structure used as the base of all interface types.
+ */
+
+
+/**
+ * GTypeInterfaceCheckFunc:
+ * @check_data: data passed to g_type_add_interface_check().
+ * @g_iface: the interface that has been initialized
+ *
+ * A callback called after an interface vtable is initialized.
+ * See g_type_add_interface_check().
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * GTypeModule:
+ * @name: the name of the module
+ *
+ * The members of the <structname>GTypeModule</structname> structure should not
+ * be accessed directly, except for the @name field.
+ */
+
+
+/**
+ * GTypeModuleClass:
+ * @parent_class: the parent class
+ * @load: loads the module and registers one or more types using g_type_module_register_type().
+ * @unload: unloads the module
+ *
+ * In order to implement dynamic loading of types based on #GTypeModule,
+ * the @load and @unload functions in #GTypeModuleClass must be implemented.
+ */
+
+
+/**
+ * GTypePlugin:
+ *
+ * The <structname>GTypePlugin</structname> typedef is used as a placeholder
+ * for objects that implement the <structname>GTypePlugin</structname>
+ * interface.
+ */
+
+
+/**
+ * GTypePluginClass:
+ * @use_plugin: Increases the use count of the plugin.
+ * @unuse_plugin: Decreases the use count of the plugin.
+ * @complete_type_info: Fills in the #GTypeInfo and #GTypeValueTable structs for the type. The structs are initialized with <literal>memset(s, 0, sizeof (s))</literal> before calling this function.
+ * @complete_interface_info: Fills in missing parts of the #GInterfaceInfo for the interface. The structs is initialized with <literal>memset(s, 0, sizeof (s))</literal> before calling this function.
+ *
+ * The #GTypePlugin interface is used by the type system in order to handle
+ * the lifecycle of dynamically loaded types.
+ */
+
+
+/**
+ * GTypePluginCompleteInterfaceInfo:
+ * @plugin: the #GTypePlugin
+ * @instance_type: the #GType of an instantiable type to which the interface is added
+ * @interface_type: the #GType of the interface whose info is completed
+ * @info: the #GInterfaceInfo to fill in
+ *
+ * The type of the @complete_interface_info function of #GTypePluginClass.
+ */
+
+
+/**
+ * GTypePluginCompleteTypeInfo:
+ * @plugin: the #GTypePlugin
+ * @g_type: the #GType whose info is completed
+ * @info: the #GTypeInfo struct to fill in
+ * @value_table: the #GTypeValueTable to fill in
+ *
+ * The type of the @complete_type_info function of #GTypePluginClass.
+ */
+
+
+/**
+ * GTypePluginUnuse:
+ * @plugin: the #GTypePlugin whose use count should be decreased
+ *
+ * The type of the @unuse_plugin function of #GTypePluginClass.
+ */
+
+
+/**
+ * GTypePluginUse:
+ * @plugin: the #GTypePlugin whose use count should be increased
+ *
+ * The type of the @use_plugin function of #GTypePluginClass, which gets called
+ * to increase the use count of @plugin.
+ */
+
+
+/**
+ * GTypeQuery:
+ * @type: the #GType value of the type.
+ * @type_name: the name of the type.
+ * @class_size: the size of the class structure.
+ * @instance_size: the size of the instance structure.
+ *
+ * A structure holding information for a specific type. It is
+ * filled in by the g_type_query() function.
+ */
+
+
+/**
+ * GTypeValueTable:
+ * @value_init: Default initialize @values contents by poking values directly into the value->data array. The data array of the #GValue passed into this function was zero-filled with <function>memset()</function>, so no care has to be taken to free any old contents. E.g. for the implementation of a string value that may never be %NULL, the implementation might look like: |[ value->data[0].v_pointer = g_strdup (""); ]|
+ * @value_free: Free any old contents that might be left in the data array of the passed in @value. No resources may remain allocated through the #GValue contents after this function returns. E.g. for our above string type: |[ // only free strings without a specific flag for static storage if (!(value->data[1].v_uint & G_VALUE_NOCOPY_CONTENTS)) g_free (value->data[0].v_pointer); ]|
+ * @value_copy: @dest_value is a #GValue with zero-filled data section and @src_value is a properly setup #GValue of same or derived type. The purpose of this function is to copy the contents of @src_value into @dest_value in a way, that even after @src_value has been freed, the contents of @dest_value remain valid. String type example: |[ dest_value->data[0].v_pointer = g_strdup (src_value->data[0].v_pointer); ]|
+ * @value_peek_pointer: If the value contents fit into a pointer, such as objects or strings, return this pointer, so the caller can peek at the current contents. To extend on our above string example: |[ return value->data[0].v_pointer; ]|
+ * @collect_format: A string format describing how to collect the contents of this value bit-by-bit. Each character in the format represents an argument to be collected, and the characters themselves indicate the type of the argument. Currently supported arguments are: <variablelist> <varlistentry><term /><listitem><para> 'i' - Integers. passed as collect_values[].v_int. </para></listitem></varlistentry> <varlistentry><term /><listitem><para> 'l' - Longs. passed as collect_values[].v_long. </para></listitem></varlistentry> <varlistentry><term /><listitem><para> 'd' - Doubles. passed as collect_values[].v_double. </para></listitem></varlistentry> <varlistentry><term /><listitem><para> 'p' - Pointers. passed as collect_values[].v_pointer. </para></listitem></varlistentry> </variablelist> It should be noted that for variable argument list construction, ANSI C promotes every type smaller than an integer to an int, and floats to doubles. So for collection of short int or char, 'i' needs to be used, and for collection of floats 'd'.
+ * @collect_value: The collect_value() function is responsible for converting the values collected from a variable argument list into contents suitable for storage in a GValue. This function should setup @value similar to value_init(); e.g. for a string value that does not allow %NULL pointers, it needs to either spew an error, or do an implicit conversion by storing an empty string. The @value passed in to this function has a zero-filled data array, so just like for value_init() it is guaranteed to not contain any old contents that might need freeing. @n_collect_values is exactly the string length of @collect_format, and @collect_values is an array of unions #GTypeCValue with length @n_collect_values, containing the collected values according to @collect_format. @collect_flags is an argument provided as a hint by the caller. It may contain the flag %G_VALUE_NOCOPY_CONTENTS indicating, that the collected value contents may be considered "static" for the duration of the @value lifetime. Thus an extra copy of the contents stored in @collect_values is not required for assignment to @value. For our above string example, we continue with: |[ if (!collect_values[0].v_pointer) value->data[0].v_pointer = g_strdup (""); else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { value->data[0].v_pointer = collect_values[0].v_pointer; // keep a flag for the value_free() implementation to not free this string value->data[1].v_uint = G_VALUE_NOCOPY_CONTENTS; } else value->data[0].v_pointer = g_strdup (collect_values[0].v_pointer); return NULL; ]| It should be noted, that it is generally a bad idea to follow the #G_VALUE_NOCOPY_CONTENTS hint for reference counted types. Due to reentrancy requirements and reference count assertions performed by the signal emission code, reference counts should always be incremented for reference counted contents stored in the value->data array.  To deviate from our string example for a moment, and taking a look at an exemplary implementation for collect_value() of #GObject: |[ if (collect_values[0].v_pointer) { GObject *object = G_OBJECT (collect_values[0].v_pointer); // never honour G_VALUE_NOCOPY_CONTENTS for ref-counted types value->data[0].v_pointer = g_object_ref (object); return NULL; } else return g_strdup_printf ("Object passed as invalid NULL pointer"); } ]| The reference count for valid objects is always incremented, regardless of @collect_flags. For invalid objects, the example returns a newly allocated string without altering @value. Upon success, collect_value() needs to return %NULL. If, however, an error condition occurred, collect_value() may spew an error by returning a newly allocated non-%NULL string, giving a suitable description of the error condition. The calling code makes no assumptions about the @value contents being valid upon error returns, @value is simply thrown away without further freeing. As such, it is a good idea to not allocate #GValue contents, prior to returning an error, however, collect_values() is not obliged to return a correctly setup @value for error returns, simply because any non-%NULL return is considered a fatal condition so further program behaviour is undefined.
+ * @lcopy_format: Format description of the arguments to collect for @lcopy_value, analogous to @collect_format. Usually, @lcopy_format string consists only of 'p's to provide lcopy_value() with pointers to storage locations.
+ * @lcopy_value: This function is responsible for storing the @value contents into arguments passed through a variable argument list which got collected into @collect_values according to @lcopy_format. @n_collect_values equals the string length of @lcopy_format, and @collect_flags may contain %G_VALUE_NOCOPY_CONTENTS. In contrast to collect_value(), lcopy_value() is obliged to always properly support %G_VALUE_NOCOPY_CONTENTS. Similar to collect_value() the function may prematurely abort by returning a newly allocated string describing an error condition. To complete the string example: |[ gchar **string_p = collect_values[0].v_pointer; if (!string_p) return g_strdup_printf ("string location passed as NULL"); if (collect_flags & G_VALUE_NOCOPY_CONTENTS) *string_p = value->data[0].v_pointer; else *string_p = g_strdup (value->data[0].v_pointer); ]| And an illustrative version of lcopy_value() for reference-counted types: |[ GObject **object_p = collect_values[0].v_pointer; if (!object_p) return g_strdup_printf ("object location passed as NULL"); if (!value->data[0].v_pointer) *object_p = NULL; else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) /&ast; always honour &ast;/ *object_p = value->data[0].v_pointer; else *object_p = g_object_ref (value->data[0].v_pointer); return NULL; ]|
+ *
+ * The #GTypeValueTable provides the functions required by the #GValue implementation,
+ * to serve as a container for values of a type.
+ */
+
+
+/**
+ * GUnicodeBreakType:
+ * @G_UNICODE_BREAK_MANDATORY: Mandatory Break (BK)
+ * @G_UNICODE_BREAK_CARRIAGE_RETURN: Carriage Return (CR)
+ * @G_UNICODE_BREAK_LINE_FEED: Line Feed (LF)
+ * @G_UNICODE_BREAK_COMBINING_MARK: Attached Characters and Combining Marks (CM)
+ * @G_UNICODE_BREAK_SURROGATE: Surrogates (SG)
+ * @G_UNICODE_BREAK_ZERO_WIDTH_SPACE: Zero Width Space (ZW)
+ * @G_UNICODE_BREAK_INSEPARABLE: Inseparable (IN)
+ * @G_UNICODE_BREAK_NON_BREAKING_GLUE: Non-breaking ("Glue") (GL)
+ * @G_UNICODE_BREAK_CONTINGENT: Contingent Break Opportunity (CB)
+ * @G_UNICODE_BREAK_SPACE: Space (SP)
+ * @G_UNICODE_BREAK_AFTER: Break Opportunity After (BA)
+ * @G_UNICODE_BREAK_BEFORE: Break Opportunity Before (BB)
+ * @G_UNICODE_BREAK_BEFORE_AND_AFTER: Break Opportunity Before and After (B2)
+ * @G_UNICODE_BREAK_HYPHEN: Hyphen (HY)
+ * @G_UNICODE_BREAK_NON_STARTER: Nonstarter (NS)
+ * @G_UNICODE_BREAK_OPEN_PUNCTUATION: Opening Punctuation (OP)
+ * @G_UNICODE_BREAK_CLOSE_PUNCTUATION: Closing Punctuation (CL)
+ * @G_UNICODE_BREAK_QUOTATION: Ambiguous Quotation (QU)
+ * @G_UNICODE_BREAK_EXCLAMATION: Exclamation/Interrogation (EX)
+ * @G_UNICODE_BREAK_IDEOGRAPHIC: Ideographic (ID)
+ * @G_UNICODE_BREAK_NUMERIC: Numeric (NU)
+ * @G_UNICODE_BREAK_INFIX_SEPARATOR: Infix Separator (Numeric) (IS)
+ * @G_UNICODE_BREAK_SYMBOL: Symbols Allowing Break After (SY)
+ * @G_UNICODE_BREAK_ALPHABETIC: Ordinary Alphabetic and Symbol Characters (AL)
+ * @G_UNICODE_BREAK_PREFIX: Prefix (Numeric) (PR)
+ * @G_UNICODE_BREAK_POSTFIX: Postfix (Numeric) (PO)
+ * @G_UNICODE_BREAK_COMPLEX_CONTEXT: Complex Content Dependent (South East Asian) (SA)
+ * @G_UNICODE_BREAK_AMBIGUOUS: Ambiguous (Alphabetic or Ideographic) (AI)
+ * @G_UNICODE_BREAK_UNKNOWN: Unknown (XX)
+ * @G_UNICODE_BREAK_NEXT_LINE: Next Line (NL)
+ * @G_UNICODE_BREAK_WORD_JOINER: Word Joiner (WJ)
+ * @G_UNICODE_BREAK_HANGUL_L_JAMO: Hangul L Jamo (JL)
+ * @G_UNICODE_BREAK_HANGUL_V_JAMO: Hangul V Jamo (JV)
+ * @G_UNICODE_BREAK_HANGUL_T_JAMO: Hangul T Jamo (JT)
+ * @G_UNICODE_BREAK_HANGUL_LV_SYLLABLE: Hangul LV Syllable (H2)
+ * @G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE: Hangul LVT Syllable (H3)
+ * @G_UNICODE_BREAK_CLOSE_PARANTHESIS: Closing Parenthesis (CP). Since 2.28
+ * @G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER: Conditional Japanese Starter (CJ). Since: 2.32
+ * @G_UNICODE_BREAK_HEBREW_LETTER: Hebrew Letter (HL). Since: 2.32
+ *
+ * These are the possible line break classifications.
+ *
+ * The five Hangul types were added in Unicode 4.1, so, has been
+ * introduced in GLib 2.10. Note that new types may be added in the future.
+ * Applications should be ready to handle unknown values.
+ * They may be regarded as %G_UNICODE_BREAK_UNKNOWN.
+ *
+ * See <ulink url="http://www.unicode.org/unicode/reports/tr14/">http://www.unicode.org/unicode/reports/tr14/</ulink>.
+ */
+
+
+/**
+ * GUnicodeScript:
+ * @G_UNICODE_SCRIPT_COMMON: a character used by multiple different scripts
+ * @G_UNICODE_SCRIPT_INHERITED: a mark glyph that takes its script from the i                             base glyph to which it is attached
+ * @G_UNICODE_SCRIPT_ARABIC: Arabic
+ * @G_UNICODE_SCRIPT_ARMENIAN: Armenian
+ * @G_UNICODE_SCRIPT_BENGALI: Bengali
+ * @G_UNICODE_SCRIPT_BOPOMOFO: Bopomofo
+ * @G_UNICODE_SCRIPT_CHEROKEE: Cherokee
+ * @G_UNICODE_SCRIPT_COPTIC: Coptic
+ * @G_UNICODE_SCRIPT_CYRILLIC: Cyrillic
+ * @G_UNICODE_SCRIPT_DESERET: Deseret
+ * @G_UNICODE_SCRIPT_DEVANAGARI: Devanagari
+ * @G_UNICODE_SCRIPT_ETHIOPIC: Ethiopic
+ * @G_UNICODE_SCRIPT_GEORGIAN: Georgian
+ * @G_UNICODE_SCRIPT_GOTHIC: Gothic
+ * @G_UNICODE_SCRIPT_GREEK: Greek
+ * @G_UNICODE_SCRIPT_GUJARATI: Gujarati
+ * @G_UNICODE_SCRIPT_GURMUKHI: Gurmukhi
+ * @G_UNICODE_SCRIPT_HAN: Han
+ * @G_UNICODE_SCRIPT_HANGUL: Hangul
+ * @G_UNICODE_SCRIPT_HEBREW: Hebrew
+ * @G_UNICODE_SCRIPT_HIRAGANA: Hiragana
+ * @G_UNICODE_SCRIPT_KANNADA: Kannada
+ * @G_UNICODE_SCRIPT_KATAKANA: Katakana
+ * @G_UNICODE_SCRIPT_KHMER: Khmer
+ * @G_UNICODE_SCRIPT_LAO: Lao
+ * @G_UNICODE_SCRIPT_LATIN: Latin
+ * @G_UNICODE_SCRIPT_MALAYALAM: Malayalam
+ * @G_UNICODE_SCRIPT_MONGOLIAN: Mongolian
+ * @G_UNICODE_SCRIPT_MYANMAR: Myanmar
+ * @G_UNICODE_SCRIPT_OGHAM: Ogham
+ * @G_UNICODE_SCRIPT_OLD_ITALIC: Old Italic
+ * @G_UNICODE_SCRIPT_ORIYA: Oriya
+ * @G_UNICODE_SCRIPT_RUNIC: Runic
+ * @G_UNICODE_SCRIPT_SINHALA: Sinhala
+ * @G_UNICODE_SCRIPT_SYRIAC: Syriac
+ * @G_UNICODE_SCRIPT_TAMIL: Tamil
+ * @G_UNICODE_SCRIPT_TELUGU: Telugu
+ * @G_UNICODE_SCRIPT_THAANA: Thaana
+ * @G_UNICODE_SCRIPT_THAI: Thai
+ * @G_UNICODE_SCRIPT_TIBETAN: Tibetan Canadian Aboriginal
+ * @G_UNICODE_SCRIPT_YI: Yi
+ * @G_UNICODE_SCRIPT_TAGALOG: Tagalog
+ * @G_UNICODE_SCRIPT_HANUNOO: Hanunoo
+ * @G_UNICODE_SCRIPT_BUHID: Buhid
+ * @G_UNICODE_SCRIPT_TAGBANWA: Tagbanwa
+ * @G_UNICODE_SCRIPT_BRAILLE: Braille
+ * @G_UNICODE_SCRIPT_CYPRIOT: Cypriot
+ * @G_UNICODE_SCRIPT_LIMBU: Limbu
+ * @G_UNICODE_SCRIPT_OSMANYA: Osmanya
+ * @G_UNICODE_SCRIPT_SHAVIAN: Shavian
+ * @G_UNICODE_SCRIPT_LINEAR_B: Linear B
+ * @G_UNICODE_SCRIPT_TAI_LE: Tai Le
+ * @G_UNICODE_SCRIPT_UGARITIC: Ugaritic New Tai Lue
+ * @G_UNICODE_SCRIPT_BUGINESE: Buginese
+ * @G_UNICODE_SCRIPT_GLAGOLITIC: Glagolitic
+ * @G_UNICODE_SCRIPT_TIFINAGH: Tifinagh Syloti Nagri Old Persian
+ * @G_UNICODE_SCRIPT_KHAROSHTHI: Kharoshthi
+ * @G_UNICODE_SCRIPT_UNKNOWN: an unassigned code point
+ * @G_UNICODE_SCRIPT_BALINESE: Balinese
+ * @G_UNICODE_SCRIPT_CUNEIFORM: Cuneiform
+ * @G_UNICODE_SCRIPT_PHOENICIAN: Phoenician
+ * @G_UNICODE_SCRIPT_PHAGS_PA: Phags-pa
+ * @G_UNICODE_SCRIPT_NKO: N'Ko
+ * @G_UNICODE_SCRIPT_KAYAH_LI: Kayah Li. Since 2.16.3
+ * @G_UNICODE_SCRIPT_LEPCHA: Lepcha. Since 2.16.3
+ * @G_UNICODE_SCRIPT_REJANG: Rejang. Since 2.16.3
+ * @G_UNICODE_SCRIPT_SUNDANESE: Sundanese. Since 2.16.3
+ * @G_UNICODE_SCRIPT_SAURASHTRA: Saurashtra. Since 2.16.3
+ * @G_UNICODE_SCRIPT_CHAM: Cham. Since 2.16.3
+ * @G_UNICODE_SCRIPT_OL_CHIKI: Ol Chiki. Since 2.16.3
+ * @G_UNICODE_SCRIPT_VAI: Vai. Since 2.16.3
+ * @G_UNICODE_SCRIPT_CARIAN: Carian. Since 2.16.3
+ * @G_UNICODE_SCRIPT_LYCIAN: Lycian. Since 2.16.3
+ * @G_UNICODE_SCRIPT_LYDIAN: Lydian. Since 2.16.3
+ * @G_UNICODE_SCRIPT_AVESTAN: Avestan. Since 2.26
+ * @G_UNICODE_SCRIPT_BAMUM: Bamum. Since 2.26 Egyptian Hieroglpyhs. Since 2.26 Imperial Aramaic. Since 2.26 Inscriptional Pahlavi. Since 2.26 Inscriptional Parthian. Since 2.26
+ * @G_UNICODE_SCRIPT_JAVANESE: Javanese. Since 2.26
+ * @G_UNICODE_SCRIPT_KAITHI: Kaithi. Since 2.26
+ * @G_UNICODE_SCRIPT_LISU: Lisu. Since 2.26 Meetei Mayek. Since 2.26 Old South Arabian. Since 2.26
+ * @G_UNICODE_SCRIPT_OLD_TURKIC: Old Turkic. Since 2.28
+ * @G_UNICODE_SCRIPT_SAMARITAN: Samaritan. Since 2.26
+ * @G_UNICODE_SCRIPT_TAI_THAM: Tai Tham. Since 2.26
+ * @G_UNICODE_SCRIPT_TAI_VIET: Tai Viet. Since 2.26
+ * @G_UNICODE_SCRIPT_BATAK: Batak. Since 2.28
+ * @G_UNICODE_SCRIPT_BRAHMI: Brahmi. Since 2.28
+ * @G_UNICODE_SCRIPT_MANDAIC: Mandaic. Since 2.28
+ * @G_UNICODE_SCRIPT_CHAKMA: Chakma. Since: 2.32
+ * @G_UNICODE_SCRIPT_MEROITIC_CURSIVE: Meroitic Cursive. Since: 2.32
+ * @G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS, Meroitic Hieroglyphs. Since: 2.32
+ * @G_UNICODE_SCRIPT_MIAO: Miao. Since: 2.32
+ * @G_UNICODE_SCRIPT_SHARADA: Sharada. Since: 2.32
+ * @G_UNICODE_SCRIPT_SORA_SOMPENG: Sora Sompeng. Since: 2.32
+ * @G_UNICODE_SCRIPT_TAKRI: Takri. Since: 2.32
+ *
+ * The #GUnicodeScript enumeration identifies different writing
+ * systems. The values correspond to the names as defined in the
+ * Unicode standard. The enumeration has been added in GLib 2.14,
+ * and is interchangeable with #PangoScript.
+ *
+ * Note that new types may be added in the future. Applications
+ * should be ready to handle unknown values.
+ * See <ulink
+ * url="http://www.unicode.org/reports/tr24/">Unicode Standard Annex
+ * #24: Script names</ulink>.
+ */
+
+
+/**
+ * GUnicodeType:
+ * @G_UNICODE_CONTROL: General category "Other, Control" (Cc)
+ * @G_UNICODE_FORMAT: General category "Other, Format" (Cf)
+ * @G_UNICODE_UNASSIGNED: General category "Other, Not Assigned" (Cn)
+ * @G_UNICODE_PRIVATE_USE: General category "Other, Private Use" (Co)
+ * @G_UNICODE_SURROGATE: General category "Other, Surrogate" (Cs)
+ * @G_UNICODE_LOWERCASE_LETTER: General category "Letter, Lowercase" (Ll)
+ * @G_UNICODE_MODIFIER_LETTER: General category "Letter, Modifier" (Lm)
+ * @G_UNICODE_OTHER_LETTER: General category "Letter, Other" (Lo)
+ * @G_UNICODE_TITLECASE_LETTER: General category "Letter, Titlecase" (Lt)
+ * @G_UNICODE_UPPERCASE_LETTER: General category "Letter, Uppercase" (Lu)
+ * @G_UNICODE_SPACING_MARK: General category "Mark, Spacing" (Mc)
+ * @G_UNICODE_ENCLOSING_MARK: General category "Mark, Enclosing" (Me)
+ * @G_UNICODE_NON_SPACING_MARK: General category "Mark, Nonspacing" (Mn)
+ * @G_UNICODE_DECIMAL_NUMBER: General category "Number, Decimal Digit" (Nd)
+ * @G_UNICODE_LETTER_NUMBER: General category "Number, Letter" (Nl)
+ * @G_UNICODE_OTHER_NUMBER: General category "Number, Other" (No)
+ * @G_UNICODE_CONNECT_PUNCTUATION: General category "Punctuation, Connector" (Pc)
+ * @G_UNICODE_DASH_PUNCTUATION: General category "Punctuation, Dash" (Pd)
+ * @G_UNICODE_CLOSE_PUNCTUATION: General category "Punctuation, Close" (Pe)
+ * @G_UNICODE_FINAL_PUNCTUATION: General category "Punctuation, Final quote" (Pf)
+ * @G_UNICODE_INITIAL_PUNCTUATION: General category "Punctuation, Initial quote" (Pi)
+ * @G_UNICODE_OTHER_PUNCTUATION: General category "Punctuation, Other" (Po)
+ * @G_UNICODE_OPEN_PUNCTUATION: General category "Punctuation, Open" (Ps)
+ * @G_UNICODE_CURRENCY_SYMBOL: General category "Symbol, Currency" (Sc)
+ * @G_UNICODE_MODIFIER_SYMBOL: General category "Symbol, Modifier" (Sk)
+ * @G_UNICODE_MATH_SYMBOL: General category "Symbol, Math" (Sm)
+ * @G_UNICODE_OTHER_SYMBOL: General category "Symbol, Other" (So)
+ * @G_UNICODE_LINE_SEPARATOR: General category "Separator, Line" (Zl)
+ * @G_UNICODE_PARAGRAPH_SEPARATOR: General category "Separator, Paragraph" (Zp)
+ * @G_UNICODE_SPACE_SEPARATOR: General category "Separator, Space" (Zs)
+ *
+ * These are the possible character classifications from the
+ * Unicode specification.
+ * See <ulink url="http://www.unicode.org/Public/UNIDATA/UnicodeData.html">http://www.unicode.org/Public/UNIDATA/UnicodeData.html</ulink>.
+ */
+
+
+/**
+ * GUnixCredentialsMessage:
+ *
+ * The #GUnixCredentialsMessage structure contains only private data
+ * and should only be accessed using the provided API.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GUnixCredentialsMessage:credentials:
+ *
+ * The credentials stored in the message.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GUnixCredentialsMessageClass:
+ *
+ * Class structure for #GUnixCredentialsMessage.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GUnixInputStream:
+ *
+ * Implements #GInputStream for reading from selectable unix file descriptors
+ */
+
+
+/**
+ * GUnixInputStream:close-fd:
+ *
+ * Whether to close the file descriptor when the stream is closed.
+ *
+ * Since: 2.20
+ */
+
+
+/**
+ * GUnixInputStream:fd:
+ *
+ * The file descriptor that the stream reads from.
+ *
+ * Since: 2.20
+ */
+
+
+/**
+ * GUnixMountEntry:
+ *
+ * Defines a Unix mount entry (e.g. <filename>/media/cdrom</filename>).
+ * This corresponds roughly to a mtab entry.
+ */
+
+
+/**
+ * GUnixMountMonitor:
+ *
+ * Watches #GUnixMount<!-- -->s for changes.
+ */
+
+
+/**
+ * GUnixMountMonitor::mountpoints-changed:
+ * @monitor: the object on which the signal is emitted
+ *
+ * Emitted when the unix mount points have changed.
+ */
+
+
+/**
+ * GUnixMountMonitor::mounts-changed:
+ * @monitor: the object on which the signal is emitted
+ *
+ * Emitted when the unix mounts have changed.
+ */
+
+
+/**
+ * GUnixMountPoint:
+ *
+ * Defines a Unix mount point (e.g. <filename>/dev</filename>).
+ * This corresponds roughly to a fstab entry.
+ */
+
+
+/**
+ * GUnixOutputStream:
+ *
+ * Implements #GOutputStream for outputting to selectable unix file descriptors
+ */
+
+
+/**
+ * GUnixOutputStream:close-fd:
+ *
+ * Whether to close the file descriptor when the stream is closed.
+ *
+ * Since: 2.20
+ */
+
+
+/**
+ * GUnixOutputStream:fd:
+ *
+ * The file descriptor that the stream writes to.
+ *
+ * Since: 2.20
+ */
+
+
+/**
+ * GUnixSocketAddress:
+ *
+ * A UNIX-domain (local) socket address, corresponding to a
+ * <type>struct sockaddr_un</type>.
+ */
+
+
+/**
+ * GUnixSocketAddress:abstract:
+ *
+ * Whether or not this is an abstract address
+ *
+ * distinguishes between zero-padded and non-zero-padded
+ * abstract addresses.
+ *
+ * Deprecated: Use #GUnixSocketAddress:address-type, which
+ */
+
+
+/**
+ * GUnixSocketAddressType:
+ * @G_UNIX_SOCKET_ADDRESS_INVALID: invalid
+ * @G_UNIX_SOCKET_ADDRESS_ANONYMOUS: anonymous
+ * @G_UNIX_SOCKET_ADDRESS_PATH: a filesystem path
+ * @G_UNIX_SOCKET_ADDRESS_ABSTRACT: an abstract name
+ * @G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED: an abstract name, 0-padded to the full length of a unix socket name
+ *
+ * The type of name used by a #GUnixSocketAddress.
+ * %G_UNIX_SOCKET_ADDRESS_PATH indicates a traditional unix domain
+ * socket bound to a filesystem path. %G_UNIX_SOCKET_ADDRESS_ANONYMOUS
+ * indicates a socket not bound to any name (eg, a client-side socket,
+ * or a socket created with socketpair()).
+ *
+ * For abstract sockets, there are two incompatible ways of naming
+ * them; the man pages suggest using the entire <literal>struct
+ * sockaddr_un</literal> as the name, padding the unused parts of the
+ * %sun_path field with zeroes; this corresponds to
+ * %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED. However, many programs
+ * instead just use a portion of %sun_path, and pass an appropriate
+ * smaller length to bind() or connect(). This is
+ * %G_UNIX_SOCKET_ADDRESS_ABSTRACT.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GUserDirectory:
+ * @G_USER_DIRECTORY_DESKTOP: the user's Desktop directory
+ * @G_USER_DIRECTORY_DOCUMENTS: the user's Documents directory
+ * @G_USER_DIRECTORY_DOWNLOAD: the user's Downloads directory
+ * @G_USER_DIRECTORY_MUSIC: the user's Music directory
+ * @G_USER_DIRECTORY_PICTURES: the user's Pictures directory
+ * @G_USER_DIRECTORY_PUBLIC_SHARE: the user's shared directory
+ * @G_USER_DIRECTORY_TEMPLATES: the user's Templates directory
+ * @G_USER_DIRECTORY_VIDEOS: the user's Movies directory
+ * @G_USER_N_DIRECTORIES: the number of enum values
+ *
+ * These are logical ids for special directories which are defined
+ * depending on the platform used. You should use g_get_user_special_dir()
+ * to retrieve the full path associated to the logical id.
+ *
+ * The #GUserDirectory enumeration can be extended at later date. Not
+ * every platform has a directory for every logical id in this
+ * enumeration.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * GValue:
+ *
+ * An opaque structure used to hold different types of values.
+ * The data within the structure has protected scope: it is accessible only
+ * to functions within a #GTypeValueTable structure, or implementations of
+ * the g_value_*() API. That is, code portions which implement new fundamental
+ * types.
+ * #GValue users cannot make any assumptions about how data is stored
+ * within the 2 element @data union, and the @g_type member should
+ * only be accessed through the G_VALUE_TYPE() macro.
+ */
+
+
+/**
+ * GValueArray:
+ * @n_values: number of values contained in the array
+ * @values: array of values
+ *
+ * A #GValueArray contains an array of #GValue elements.
+ */
+
+
+/**
+ * GValueTransform:
+ * @src_value: Source value.
+ * @dest_value: Target value.
+ *
+ * The type of value transformation functions which can be registered with
+ * g_value_register_transform_func().
+ */
+
+
+/**
+ * GVariantType:
+ *
+ * A type in the GVariant type system.
+ *
+ * Two types may not be compared by value; use g_variant_type_equal() or
+ * g_variant_type_is_subtype_of().  May be copied using
+ * g_variant_type_copy() and freed using g_variant_type_free().
+ */
+
+
+/**
+ * GVfs:
+ *
+ * Virtual File System object.
+ */
+
+
+/**
+ * GVoidFunc:
+ *
+ * Declares a type of function which takes no arguments
+ * and has no return value. It is used to specify the type
+ * function passed to g_atexit().
+ */
+
+
+/**
+ * GVolume:
+ *
+ * Opaque mountable volume object.
+ */
+
+
+/**
+ * GVolume::changed:
+ *
+ * Emitted when the volume has been changed.
+ */
+
+
+/**
+ * GVolume::removed:
+ *
+ * This signal is emitted when the #GVolume have been removed. If
+ * the recipient is holding references to the object they should
+ * release them so the object can be finalized.
+ */
+
+
+/**
+ * GVolumeIface:
+ * @g_iface: The parent interface.
+ * @changed: Changed signal that is emitted when the volume's state has changed.
+ * @removed: The removed signal that is emitted when the #GVolume have been removed. If the recipient is holding references to the object they should release them so the object can be finalized.
+ * @get_name: Gets a string containing the name of the #GVolume.
+ * @get_icon: Gets a #GIcon for the #GVolume.
+ * @get_uuid: Gets the UUID for the #GVolume. The reference is typically based on the file system UUID for the mount in question and should be considered an opaque string. Returns %NULL if there is no UUID available.
+ * @get_drive: Gets a #GDrive the volume is located on. Returns %NULL if the #GVolume is not associated with a #GDrive.
+ * @get_mount: Gets a #GMount representing the mounted volume. Returns %NULL if the #GVolume is not mounted.
+ * @can_mount: Returns %TRUE if the #GVolume can be mounted.
+ * @can_eject: Checks if a #GVolume can be ejected.
+ * @mount_fn: Mounts a given #GVolume. #GVolume implementations must emit the #GMountOperation::aborted signal before completing a mount operation that is aborted while awaiting input from the user through a #GMountOperation instance.
+ * @mount_finish: Finishes a mount operation.
+ * @eject: Ejects a given #GVolume.
+ * @eject_finish: Finishes an eject operation.
+ * @get_identifier: Returns the <link linkend="volume-identifier">identifier</link> of the given kind, or %NULL if the #GVolume doesn't have one.
+ * @enumerate_identifiers: Returns an array strings listing the kinds of <link linkend="volume-identifier">identifiers</link> which the #GVolume has.
+ * @should_automount: Returns %TRUE if the #GVolume should be automatically mounted.
+ * @get_activation_root: Returns the activation root for the #GVolume if it is known in advance or %NULL if it is not known.
+ * @eject_with_operation: Starts ejecting a #GVolume using a #GMountOperation. Since 2.22.
+ * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
+ * @get_sort_key: Gets a key used for sorting #GVolume instance or %NULL if no such key exists. Since 2.32.
+ *
+ * Interface for implementing operations for mountable volumes.
+ */
+
+
+/**
+ * GVolumeMonitor:
+ *
+ * A Volume Monitor that watches for volume events.
+ */
+
+
+/**
+ * GVolumeMonitor::drive-changed:
+ * @volume_monitor: The volume monitor emitting the signal.
+ * @drive: the drive that changed
+ *
+ * Emitted when a drive changes.
+ */
+
+
+/**
+ * GVolumeMonitor::drive-connected:
+ * @volume_monitor: The volume monitor emitting the signal.
+ * @drive: a #GDrive that was connected.
+ *
+ * Emitted when a drive is connected to the system.
+ */
+
+
+/**
+ * GVolumeMonitor::drive-disconnected:
+ * @volume_monitor: The volume monitor emitting the signal.
+ * @drive: a #GDrive that was disconnected.
+ *
+ * Emitted when a drive is disconnected from the system.
+ */
+
+
+/**
+ * GVolumeMonitor::drive-eject-button:
+ * @volume_monitor: The volume monitor emitting the signal.
+ * @drive: the drive where the eject button was pressed
+ *
+ * Emitted when the eject button is pressed on @drive.
+ *
+ * Since: 2.18
+ */
+
+
+/**
+ * GVolumeMonitor::drive-stop-button:
+ * @volume_monitor: The volume monitor emitting the signal.
+ * @drive: the drive where the stop button was pressed
+ *
+ * Emitted when the stop button is pressed on @drive.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * GVolumeMonitor::mount-added:
+ * @volume_monitor: The volume monitor emitting the signal.
+ * @mount: a #GMount that was added.
+ *
+ * Emitted when a mount is added.
+ */
+
+
+/**
+ * GVolumeMonitor::mount-changed:
+ * @volume_monitor: The volume monitor emitting the signal.
+ * @mount: a #GMount that changed.
+ *
+ * Emitted when a mount changes.
+ */
+
+
+/**
+ * GVolumeMonitor::mount-pre-unmount:
+ * @volume_monitor: The volume monitor emitting the signal.
+ * @mount: a #GMount that is being unmounted.
+ *
+ * Emitted when a mount is about to be removed.
+ */
+
+
+/**
+ * GVolumeMonitor::mount-removed:
+ * @volume_monitor: The volume monitor emitting the signal.
+ * @mount: a #GMount that was removed.
+ *
+ * Emitted when a mount is removed.
+ */
+
+
+/**
+ * GVolumeMonitor::volume-added:
+ * @volume_monitor: The volume monitor emitting the signal.
+ * @volume: a #GVolume that was added.
+ *
+ * Emitted when a mountable volume is added to the system.
+ */
+
+
+/**
+ * GVolumeMonitor::volume-changed:
+ * @volume_monitor: The volume monitor emitting the signal.
+ * @volume: a #GVolume that changed.
+ *
+ * Emitted when mountable volume is changed.
+ */
+
+
+/**
+ * GVolumeMonitor::volume-removed:
+ * @volume_monitor: The volume monitor emitting the signal.
+ * @volume: a #GVolume that was removed.
+ *
+ * Emitted when a mountable volume is removed from the system.
+ */
+
+
+/**
+ * GWeakNotify:
+ * @data: data that was provided when the weak reference was established
+ * @where_the_object_was: the object being finalized
+ *
+ * A #GWeakNotify function can be added to an object as a callback that gets
+ * triggered when the object is finalized. Since the object is already being
+ * finalized when the #GWeakNotify is called, there's not much you could do
+ * with the object, apart from e.g. using its address as hash-index or the like.
+ */
+
+
+/**
+ * GWin32InputStream:close-handle:
+ *
+ * Whether to close the file handle when the stream is closed.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GWin32InputStream:handle:
+ *
+ * The handle that the stream reads from.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GWin32OutputStream:close-handle:
+ *
+ * Whether to close the file handle when the stream is closed.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GWin32OutputStream:handle:
+ *
+ * The file handle that the stream writes to.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GZlibCompressor:
+ *
+ * Zlib decompression
+ */
+
+
+/**
+ * GZlibCompressor:file-info:
+ *
+ * If set to a non-%NULL #GFileInfo object, and #GZlibCompressor:format is
+ * %G_ZLIB_COMPRESSOR_FORMAT_GZIP, the compressor will write the file name
+ * and modification time from the file info to the the GZIP header.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GZlibCompressorFormat:
+ * @G_ZLIB_COMPRESSOR_FORMAT_ZLIB: deflate compression with zlib header
+ * @G_ZLIB_COMPRESSOR_FORMAT_GZIP: gzip file format
+ * @G_ZLIB_COMPRESSOR_FORMAT_RAW: deflate compression with no header
+ *
+ * Used to select the type of data format to use for #GZlibDecompressor
+ * and #GZlibCompressor.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * GZlibDecompressor:
+ *
+ * Zlib decompression
+ */
+
+
+/**
+ * GZlibDecompressor:file-info:
+ *
+ * A #GFileInfo containing the information found in the GZIP header
+ * of the data stream processed, or %NULL if the header was not yet
+ * fully processed, is not present at all, or the compressor's
+ * #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_BOOKMARK_FILE_ERROR:
+ *
+ * Error domain for bookmark file parsing.
+ * Errors in this domain will be from the #GBookmarkFileError
+ * enumeration. See #GError for information on error domains.
+ */
+
+
+/**
+ * G_BREAKPOINT:
+ *
+ * Inserts a breakpoint instruction into the code.
+ *
+ * On x86 and alpha systems this is implemented as a soft interrupt
+ * and on other architectures it raises a <literal>SIGTRAP</literal> signal.
+ */
+
+
+/**
+ * G_CALLBACK:
+ * @f: a function pointer.
+ *
+ * Cast a function pointer to a #GCallback.
+ */
+
+
+/**
+ * G_CCLOSURE_SWAP_DATA:
+ * @cclosure: a #GCClosure
+ *
+ * Checks whether the user data of the #GCClosure should be passed as the
+ * first parameter to the callback. See g_cclosure_new_swap().
+ *
+ * Returns: %TRUE if data has to be swapped.
+ */
+
+
+/**
+ * G_CLOSURE_NEEDS_MARSHAL:
+ * @closure: a #GClosure
+ *
+ * Check if the closure still needs a marshaller. See g_closure_set_marshal().
+ *
+ * @closure.
+ *
+ * Returns: %TRUE if a #GClosureMarshal marshaller has not yet been set on
+ */
+
+
+/**
+ * G_CLOSURE_N_NOTIFIERS:
+ * @cl: a #GClosure
+ *
+ * Get the total number of notifiers connected with the closure @cl.
+ * The count includes the meta marshaller, the finalize and invalidate notifiers
+ * and the marshal guards. Note that each guard counts as two notifiers.
+ * See g_closure_set_meta_marshal(), g_closure_add_finalize_notifier(),
+ * g_closure_add_invalidate_notifier() and g_closure_add_marshal_guards().
+ *
+ * Returns: number of notifiers
+ */
+
+
+/**
+ * G_CONVERT_ERROR:
+ *
+ * Error domain for character set conversions. Errors in this domain will
+ * be from the #GConvertError enumeration. See #GError for information on
+ * error domains.
+ */
+
+
+/**
+ * G_DATALIST_FLAGS_MASK:
+ *
+ * A bitmask that restricts the possible flags passed to
+ * g_datalist_set_flags(). Passing a flags value where
+ * flags & ~G_DATALIST_FLAGS_MASK != 0 is an error.
+ */
+
+
+/**
+ * G_DBUS_ERROR:
+ *
+ * Error domain for errors generated by a remote message bus. Errors
+ * in this domain will be from the #GDBusError enumeration.  See
+ * #GError for more information on error domains.
+ *
+ * Note that errors in this error domain is intended only for
+ * returning errors from a remote message bus process. Errors
+ * generated locally in-process by e.g. #GDBusConnection is from the
+ * %G_IO_ERROR domain.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_DEFINE_ABSTRACT_TYPE:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type, in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the parent type.
+ *
+ * A convenience macro for type implementations.
+ * Similar to G_DEFINE_TYPE(), but defines an abstract type.
+ * See G_DEFINE_TYPE_EXTENDED() for an example.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_DEFINE_ABSTRACT_TYPE_WITH_CODE:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type, in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the parent type.
+ * @_C_: Custom code that gets inserted in the @type_name_get_type() function.
+ *
+ * A convenience macro for type implementations.
+ * Similar to G_DEFINE_TYPE_WITH_CODE(), but defines an abstract type and allows you to
+ * insert custom code into the *_get_type() function, e.g. interface implementations
+ * via G_IMPLEMENT_INTERFACE(). See G_DEFINE_TYPE_EXTENDED() for an example.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_DEFINE_BOXED_TYPE:
+ * @TypeName: The name of the new type, in Camel case.
+ * @type_name: The name of the new type, in lowercase, with words separated by '_'.
+ * @copy_func: the #GBoxedCopyFunc for the new type
+ * @free_func: the #GBoxedFreeFunc for the new type
+ *
+ * A convenience macro for boxed type implementations, which defines a
+ * type_name_get_type() function registering the boxed type.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_DEFINE_BOXED_TYPE_WITH_CODE:
+ * @TypeName: The name of the new type, in Camel case.
+ * @type_name: The name of the new type, in lowercase, with words separated by '_'.
+ * @copy_func: the #GBoxedCopyFunc for the new type
+ * @free_func: the #GBoxedFreeFunc for the new type
+ * @_C_: Custom code that gets inserted in the *_get_type() function.
+ *
+ * A convenience macro for boxed type implementations.
+ * Similar to G_DEFINE_BOXED_TYPE(), but allows to insert custom code into the
+ * type_name_get_type() function, e.g. to register value transformations with
+ * g_value_register_transform_func().
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_DEFINE_DYNAMIC_TYPE:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type, in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the parent type.
+ *
+ * A convenience macro for dynamic type implementations, which declares a
+ * class initialization function, an instance initialization function (see
+ * #GTypeInfo for information about these) and a static variable named
+ * @t_n<!-- -->_parent_class pointing to the parent class. Furthermore,
+ * it defines a <function>*_get_type()</function> and a static
+ * <function>*_register_type()</function> function for use in your
+ * <function>module_init()</function>.
+ * See G_DEFINE_DYNAMIC_TYPE_EXTENDED() for an example.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_DEFINE_DYNAMIC_TYPE_EXTENDED:
+ * @TypeName: The name of the new type, in Camel case.
+ * @type_name: The name of the new type, in lowercase, with words separated by '_'.
+ * @TYPE_PARENT: The #GType of the parent type.
+ * @flags: #GTypeFlags to pass to g_type_module_register_type()
+ * @CODE: Custom code that gets inserted in the *_get_type() function.
+ *
+ * A more general version of G_DEFINE_DYNAMIC_TYPE() which
+ * allows to specify #GTypeFlags and custom code.
+ *
+ * |[
+ * G_DEFINE_DYNAMIC_TYPE_EXTENDED (GtkGadget,
+ * gtk_gadget,
+ * GTK_TYPE_THING,
+ * 0,
+ * G_IMPLEMENT_INTERFACE_DYNAMIC (TYPE_GIZMO,
+ * gtk_gadget_gizmo_init));
+ * ]|
+ * expands to
+ * |[
+ * static void     gtk_gadget_init              (GtkGadget      *self);
+ * static void     gtk_gadget_class_init        (GtkGadgetClass *klass);
+ * static void     gtk_gadget_class_finalize    (GtkGadgetClass *klass);
+ *
+ * static gpointer gtk_gadget_parent_class = NULL;
+ * static GType    gtk_gadget_type_id = 0;
+ *
+ * static void     gtk_gadget_class_intern_init (gpointer klass)
+ * {
+ * gtk_gadget_parent_class = g_type_class_peek_parent (klass);
+ * gtk_gadget_class_init ((GtkGadgetClass*) klass);
+ * }
+ *
+ * GType
+ * gtk_gadget_get_type (void)
+ * {
+ * return gtk_gadget_type_id;
+ * }
+ *
+ * static void
+ * gtk_gadget_register_type (GTypeModule *type_module)
+ * {
+ * const GTypeInfo g_define_type_info = {
+ * sizeof (GtkGadgetClass),
+ * (GBaseInitFunc) NULL,
+ * (GBaseFinalizeFunc) NULL,
+ * (GClassInitFunc) gtk_gadget_class_intern_init,
+ * (GClassFinalizeFunc) gtk_gadget_class_finalize,
+ * NULL,   // class_data
+ * sizeof (GtkGadget),
+ * 0,      // n_preallocs
+ * (GInstanceInitFunc) gtk_gadget_init,
+ * NULL    // value_table
+ * };
+ * gtk_gadget_type_id = g_type_module_register_type (type_module,
+ * GTK_TYPE_THING,
+ * GtkGadget,
+ * &g_define_type_info,
+ * (GTypeFlags) flags);
+ * {
+ * const GInterfaceInfo g_implement_interface_info = {
+ * (GInterfaceInitFunc) gtk_gadget_gizmo_init
+ * };
+ * g_type_module_add_interface (type_module, g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
+ * }
+ * }
+ * ]|
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_DEFINE_INTERFACE:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type, in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the prerequisite type for the interface, or 0 (%G_TYPE_INVALID) for no prerequisite type.
+ *
+ * A convenience macro for #GTypeInterface definitions, which declares
+ * a default vtable initialization function and defines a *_get_type()
+ * function.
+ *
+ * The macro expects the interface initialization function to have the
+ * name <literal>t_n ## _default_init</literal>, and the interface
+ * structure to have the name <literal>TN ## Interface</literal>.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * G_DEFINE_INTERFACE_WITH_CODE:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type, in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the prerequisite type for the interface, or 0 (%G_TYPE_INVALID) for no prerequisite type.
+ * @_C_: Custom code that gets inserted in the *_get_type() function.
+ *
+ * A convenience macro for #GTypeInterface definitions. Similar to
+ * G_DEFINE_INTERFACE(), but allows you to insert custom code into the
+ * *_get_type() function, e.g. additional interface implementations
+ * via G_IMPLEMENT_INTERFACE(), or additional prerequisite types. See
+ * G_DEFINE_TYPE_EXTENDED() for a similar example using
+ * G_DEFINE_TYPE_WITH_CODE().
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * G_DEFINE_POINTER_TYPE:
+ * @TypeName: The name of the new type, in Camel case.
+ * @type_name: The name of the new type, in lowercase, with words separated by '_'.
+ *
+ * A convenience macro for pointer type implementations, which defines a
+ * type_name_get_type() function registering the pointer type.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_DEFINE_POINTER_TYPE_WITH_CODE:
+ * @TypeName: The name of the new type, in Camel case.
+ * @type_name: The name of the new type, in lowercase, with words separated by '_'.
+ * @_C_: Custom code that gets inserted in the *_get_type() function.
+ *
+ * A convenience macro for pointer type implementations.
+ * Similar to G_DEFINE_POINTER_TYPE(), but allows to insert custom code into the
+ * type_name_get_type() function.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_DEFINE_TYPE:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type, in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the parent type.
+ *
+ * A convenience macro for type implementations, which declares a
+ * class initialization function, an instance initialization function (see #GTypeInfo for information about
+ * these) and a static variable named @t_n<!-- -->_parent_class pointing to the parent class. Furthermore, it defines
+ * a *_get_type() function. See G_DEFINE_TYPE_EXTENDED() for an example.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_DEFINE_TYPE_EXTENDED:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type, in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the parent type.
+ * @_f_: #GTypeFlags to pass to g_type_register_static()
+ * @_C_: Custom code that gets inserted in the *_get_type() function.
+ *
+ * The most general convenience macro for type implementations, on which
+ * G_DEFINE_TYPE(), etc are based.
+ *
+ * |[
+ * G_DEFINE_TYPE_EXTENDED (GtkGadget,
+ * gtk_gadget,
+ * GTK_TYPE_WIDGET,
+ * 0,
+ * G_IMPLEMENT_INTERFACE (TYPE_GIZMO,
+ * gtk_gadget_gizmo_init));
+ * ]|
+ * expands to
+ * |[
+ * static void     gtk_gadget_init       (GtkGadget      *self);
+ * static void     gtk_gadget_class_init (GtkGadgetClass *klass);
+ * static gpointer gtk_gadget_parent_class = NULL;
+ * static void     gtk_gadget_class_intern_init (gpointer klass)
+ * {
+ * gtk_gadget_parent_class = g_type_class_peek_parent (klass);
+ * gtk_gadget_class_init ((GtkGadgetClass*) klass);
+ * }
+ *
+ * GType
+ * gtk_gadget_get_type (void)
+ * {
+ * static volatile gsize g_define_type_id__volatile = 0;
+ * if (g_once_init_enter (&g_define_type_id__volatile))
+ * {
+ * GType g_define_type_id =
+ * g_type_register_static_simple (GTK_TYPE_WIDGET,
+ * g_intern_static_string ("GtkGadget"),
+ * sizeof (GtkGadgetClass),
+ * (GClassInitFunc) gtk_gadget_class_intern_init,
+ * sizeof (GtkGadget),
+ * (GInstanceInitFunc) gtk_gadget_init,
+ * (GTypeFlags) flags);
+ * {
+ * const GInterfaceInfo g_implement_interface_info = {
+ * (GInterfaceInitFunc) gtk_gadget_gizmo_init
+ * };
+ * g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
+ * }
+ * g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ * }
+ * return g_define_type_id__volatile;
+ * }
+ * ]|
+ * The only pieces which have to be manually provided are the definitions of
+ * the instance and class structure and the definitions of the instance and
+ * class init functions.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_DEFINE_TYPE_WITH_CODE:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the parent type.
+ * @_C_: Custom code that gets inserted in the *_get_type() function.
+ *
+ * A convenience macro for type implementations.
+ * Similar to G_DEFINE_TYPE(), but allows you to insert custom code into the
+ * *_get_type() function, e.g. interface implementations via G_IMPLEMENT_INTERFACE().
+ * See G_DEFINE_TYPE_EXTENDED() for an example.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME:
+ *
+ * Extension point for default handler to URI association. See
+ * <link linkend="extending-gio">Extending GIO</link>.
+ */
+
+
+/**
+ * G_ENUM_CLASS:
+ * @class: a valid #GEnumClass
+ *
+ * Casts a derived #GEnumClass structure into a #GEnumClass structure.
+ */
+
+
+/**
+ * G_ENUM_CLASS_TYPE:
+ * @class: a #GEnumClass
+ *
+ * Get the type identifier from a given #GEnumClass structure.
+ *
+ * Returns: the #GType
+ */
+
+
+/**
+ * G_ENUM_CLASS_TYPE_NAME:
+ * @class: a #GEnumClass
+ *
+ * Get the static type name from a given #GEnumClass structure.
+ *
+ * Returns: the type name.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE:
+ *
+ * A key in the "access" namespace for checking deletion privileges.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ * This attribute will be %TRUE if the user is able to delete the file.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE:
+ *
+ * A key in the "access" namespace for getting execution privileges.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ * This attribute will be %TRUE if the user is able to execute the file.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_ACCESS_CAN_READ:
+ *
+ * A key in the "access" namespace for getting read privileges.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ * This attribute will be %TRUE if the user is able to read the file.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME:
+ *
+ * A key in the "access" namespace for checking renaming privileges.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ * This attribute will be %TRUE if the user is able to rename the file.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH:
+ *
+ * A key in the "access" namespace for checking trashing privileges.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ * This attribute will be %TRUE if the user is able to move the file to
+ * the trash.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE:
+ *
+ * A key in the "access" namespace for getting write privileges.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ * This attribute will be %TRUE if the user is able to write to the file.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE:
+ *
+ * A key in the "dos" namespace for checking if the file's archive flag
+ * is set. This attribute is %TRUE if the archive flag is set. This attribute
+ * is only available for DOS file systems. Corresponding #GFileAttributeType
+ * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_DOS_IS_SYSTEM:
+ *
+ * A key in the "dos" namespace for checking if the file's backup flag
+ * is set. This attribute is %TRUE if the backup flag is set. This attribute
+ * is only available for DOS file systems. Corresponding #GFileAttributeType
+ * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_ETAG_VALUE:
+ *
+ * A key in the "etag" namespace for getting the value of the file's
+ * entity tag. Corresponding #GFileAttributeType is
+ * %G_FILE_ATTRIBUTE_TYPE_STRING.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_FILESYSTEM_FREE:
+ *
+ * A key in the "filesystem" namespace for getting the number of bytes of free space left on the
+ * file system. Corresponding #GFileAttributeType is
+ * %G_FILE_ATTRIBUTE_TYPE_UINT64.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_FILESYSTEM_READONLY:
+ *
+ * A key in the "filesystem" namespace for checking if the file system
+ * is read only. Is set to %TRUE if the file system is read only.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_FILESYSTEM_SIZE:
+ *
+ * A key in the "filesystem" namespace for getting the total size (in bytes) of the file system,
+ * used in g_file_query_filesystem_info(). Corresponding #GFileAttributeType
+ * is %G_FILE_ATTRIBUTE_TYPE_UINT64.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_FILESYSTEM_TYPE:
+ *
+ * A key in the "filesystem" namespace for getting the file system's type.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_FILESYSTEM_USED:
+ *
+ * A key in the "filesystem" namespace for getting the number of bytes of used on the
+ * file system. Corresponding #GFileAttributeType is
+ * %G_FILE_ATTRIBUTE_TYPE_UINT64.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_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.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_GVFS_BACKEND:
+ *
+ * A key in the "gvfs" namespace that gets the name of the current
+ * GVFS backend in use. Corresponding #GFileAttributeType is
+ * %G_FILE_ATTRIBUTE_TYPE_STRING.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_ID_FILE:
+ *
+ * A key in the "id" namespace for getting a file identifier.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
+ * An example use would be during listing files, to avoid recursive
+ * directory scanning.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_ID_FILESYSTEM:
+ *
+ * A key in the "id" namespace for getting the file system identifier.
+ * Corresponding #GFileAttributeType is %G_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).
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT:
+ *
+ * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT:
+ *
+ * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is mountable.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL:
+ *
+ * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be polled.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START:
+ *
+ * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED:
+ *
+ * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started
+ * degraded.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP:
+ *
+ * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be stopped.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT:
+ *
+ * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE)  is unmountable.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI:
+ *
+ * A key in the "mountable" namespace for getting the HAL UDI for the mountable
+ * file. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC:
+ *
+ * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE)
+ * is automatically polled for media.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE:
+ *
+ * A key in the "mountable" namespace for getting the #GDriveStartStopType.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE:
+ *
+ * A key in the "mountable" namespace for getting the unix device.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE:
+ *
+ * A key in the "mountable" namespace for getting the unix device file.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_OWNER_GROUP:
+ *
+ * A key in the "owner" namespace for getting the file owner's group.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_OWNER_USER:
+ *
+ * A key in the "owner" namespace for getting the user name of the
+ * file's owner. Corresponding #GFileAttributeType is
+ * %G_FILE_ATTRIBUTE_TYPE_STRING.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_OWNER_USER_REAL:
+ *
+ * A key in the "owner" namespace for getting the real name of the
+ * user that owns the file. Corresponding #GFileAttributeType is
+ * %G_FILE_ATTRIBUTE_TYPE_STRING.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_PREVIEW_ICON:
+ *
+ * A key in the "preview" namespace for getting a #GIcon that can be
+ * used to get preview of the file. For example, it may be a low
+ * resolution thumbnail without metadata. Corresponding
+ * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.  The value
+ * for this key should contain a #GIcon.
+ *
+ * Since: 2.20
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_SELINUX_CONTEXT:
+ *
+ * A key in the "selinux" namespace for getting the file's SELinux
+ * context. Corresponding #GFileAttributeType is
+ * %G_FILE_ATTRIBUTE_TYPE_STRING. Note that this attribute is only
+ * available if GLib has been built with SELinux support.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE:
+ *
+ * A key in the "standard" namespace for getting the amount of disk space
+ * that is consumed by the file (in bytes).  This will generally be larger
+ * than the file size (due to block size overhead) but can occasionally be
+ * smaller (for example, for sparse files).
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
+ *
+ * Since: 2.20
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE:
+ *
+ * A key in the "standard" namespace for getting the content type of the file.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
+ * The value for this key should contain a valid content type.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_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 #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_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 #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_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 #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_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 #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_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 #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_STANDARD_ICON:
+ *
+ * A key in the "standard" namespace for getting the icon for the file.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.
+ * The value for this key should contain a #GIcon.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP:
+ *
+ * A key in the "standard" namespace for checking if a file is a backup file.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN:
+ *
+ * A key in the "standard" namespace for checking if a file is hidden.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_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 #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL:
+ *
+ * A key in the "standard" namespace for checking if a file is virtual.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_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 #G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the
+ * name in a user interface.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_STANDARD_SIZE:
+ *
+ * A key in the "standard" namespace for getting the file's size (in bytes).
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER:
+ *
+ * A key in the "standard" namespace for setting the sort order of a file.
+ * Corresponding #GFileAttributeType is %G_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.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET:
+ *
+ * A key in the "standard" namespace for getting the symlink target, if the file
+ * is a symlink. Corresponding #GFileAttributeType is
+ * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_STANDARD_TARGET_URI:
+ *
+ * A key in the "standard" namespace for getting the target URI for the file, in
+ * the case of %G_FILE_TYPE_SHORTCUT or %G_FILE_TYPE_MOUNTABLE files.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_STANDARD_TYPE:
+ *
+ * A key in the "standard" namespace for storing file types.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
+ * The value for this key should contain a #GFileType.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_THUMBNAILING_FAILED:
+ *
+ * A key in the "thumbnail" namespace for checking if thumbnailing failed.
+ * This attribute is %TRUE if thumbnailing failed. Corresponding
+ * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_THUMBNAIL_PATH:
+ *
+ * A key in the "thumbnail" namespace for getting the path to the thumbnail
+ * image. Corresponding #GFileAttributeType is
+ * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_TIME_ACCESS:
+ *
+ * A key in the "time" namespace for getting the time the file was last
+ * accessed. Corresponding #GFileAttributeType is
+ * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the
+ * file was last accessed.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_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 #GFileAttributeType is
+ * %G_FILE_ATTRIBUTE_TYPE_UINT32.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_TIME_CHANGED:
+ *
+ * A key in the "time" namespace for getting the time the file was last
+ * changed. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64,
+ * and contains the UNIX time since the file was last changed.
+ *
+ * This corresponds to the traditional UNIX ctime.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_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 #GFileAttributeType is
+ * %G_FILE_ATTRIBUTE_TYPE_UINT32.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_TIME_CREATED:
+ *
+ * A key in the "time" namespace for getting the time the file was created.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64,
+ * and contains the UNIX time since the file was created.
+ *
+ * This corresponds to the NTFS ctime.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_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 #GFileAttributeType is
+ * %G_FILE_ATTRIBUTE_TYPE_UINT32.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_TIME_MODIFIED:
+ *
+ * A key in the "time" namespace for getting the time the file was last
+ * modified. Corresponding #GFileAttributeType is
+ * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the
+ * file was modified.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_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 #GFileAttributeType is
+ * %G_FILE_ATTRIBUTE_TYPE_UINT32.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_TRASH_DELETION_DATE:
+ *
+ * A key in the "trash" namespace.  When requested against
+ * items in "trash:///", will return the date and time when the file
+ * was trashed. The format of the returned string is YYYY-MM-DDThh:mm:ss.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
+ *
+ * Since: 2.24.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT:
+ *
+ * A key in the "trash" namespace.  When requested against
+ * "trash:///" returns the number of (toplevel) items in the trash folder.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_TRASH_ORIG_PATH:
+ *
+ * A key in the "trash" namespace.  When requested against
+ * items in "trash:///", will return the original path to the file before it
+ * was trashed. Corresponding #GFileAttributeType is
+ * %G_FILE_ATTRIBUTE_TYPE_STRING.
+ *
+ * Since: 2.24.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_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 #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_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 #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_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 #GFileAttributeType is
+ * %G_FILE_ATTRIBUTE_TYPE_UINT32.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_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 #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_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
+ * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT:
+ *
+ * A key in the "unix" namespace for checking if the file represents a
+ * UNIX mount point. This attribute is %TRUE if the file is a UNIX mount
+ * point. This attribute is only available for UNIX file systems.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_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 #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_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 #GFileAttributeType is
+ * %G_FILE_ATTRIBUTE_TYPE_UINT32.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_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 #GFileAttributeType
+ * is %G_FILE_ATTRIBUTE_TYPE_UINT32.
+ */
+
+
+/**
+ * G_FILE_ATTRIBUTE_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 #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
+ */
+
+
+/**
+ * G_FLAGS_CLASS:
+ * @class: a valid #GFlagsClass
+ *
+ * Casts a derived #GFlagsClass structure into a #GFlagsClass structure.
+ */
+
+
+/**
+ * G_FLAGS_CLASS_TYPE:
+ * @class: a #GFlagsClass
+ *
+ * Get the type identifier from a given #GFlagsClass structure.
+ *
+ * Returns: the #GType
+ */
+
+
+/**
+ * G_FLAGS_CLASS_TYPE_NAME:
+ * @class: a #GFlagsClass
+ *
+ * Get the static type name from a given #GFlagsClass structure.
+ *
+ * Returns: the type name.
+ */
+
+
+/**
+ * G_IMPLEMENT_INTERFACE:
+ * @TYPE_IFACE: The #GType of the interface to add
+ * @iface_init: The interface init function
+ *
+ * A convenience macro to ease interface addition in the @_C_ section
+ * of G_DEFINE_TYPE_WITH_CODE() or G_DEFINE_ABSTRACT_TYPE_WITH_CODE().
+ * See G_DEFINE_TYPE_EXTENDED() for an example.
+ *
+ * Note that this macro can only be used together with the G_DEFINE_TYPE_*
+ * macros, since it depends on variable names from those macros.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_IMPLEMENT_INTERFACE_DYNAMIC:
+ * @TYPE_IFACE: The #GType of the interface to add
+ * @iface_init: The interface init function
+ *
+ * A convenience macro to ease interface addition in the @_C_ section
+ * of G_DEFINE_DYNAMIC_TYPE_EXTENDED(). See G_DEFINE_DYNAMIC_TYPE_EXTENDED()
+ * for an example.
+ *
+ * Note that this macro can only be used together with the
+ * G_DEFINE_DYNAMIC_TYPE_EXTENDED macros, since it depends on variable
+ * names from that macro.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * G_INITIALLY_UNOWNED:
+ * @object: Object which is subject to casting.
+ *
+ * Casts a #GInitiallyUnowned or derived pointer into a (GInitiallyUnowned*)
+ * pointer. Depending on the current debugging level, this function may invoke
+ * certain runtime checks to identify invalid casts.
+ */
+
+
+/**
+ * G_INITIALLY_UNOWNED_CLASS:
+ * @class: a valid #GInitiallyUnownedClass
+ *
+ * Casts a derived #GInitiallyUnownedClass structure into a
+ * #GInitiallyUnownedClass structure.
+ */
+
+
+/**
+ * G_INITIALLY_UNOWNED_GET_CLASS:
+ * @object: a #GInitiallyUnowned instance.
+ *
+ * Get the class structure associated to a #GInitiallyUnowned instance.
+ *
+ * Returns: pointer to object class structure.
+ */
+
+
+/**
+ * G_IO_ERROR:
+ *
+ * Error domain for GIO. Errors in this domain will be from the #GIOErrorEnum enumeration.
+ * See #GError for more information on error domains.
+ */
+
+
+/**
+ * G_IS_ENUM_CLASS:
+ * @class: a #GEnumClass
+ *
+ * Checks whether @class "is a" valid #GEnumClass structure of type %G_TYPE_ENUM
+ * or derived.
+ */
+
+
+/**
+ * G_IS_FLAGS_CLASS:
+ * @class: a #GFlagsClass
+ *
+ * Checks whether @class "is a" valid #GFlagsClass structure of type %G_TYPE_FLAGS
+ * or derived.
+ */
+
+
+/**
+ * G_IS_INITIALLY_UNOWNED:
+ * @object: Instance to check for being a %G_TYPE_INITIALLY_UNOWNED.
+ *
+ * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_INITIALLY_UNOWNED.
+ */
+
+
+/**
+ * G_IS_INITIALLY_UNOWNED_CLASS:
+ * @class: a #GInitiallyUnownedClass
+ *
+ * Checks whether @class "is a" valid #GInitiallyUnownedClass structure of type
+ * %G_TYPE_INITIALLY_UNOWNED or derived.
+ */
+
+
+/**
+ * G_IS_OBJECT:
+ * @object: Instance to check for being a %G_TYPE_OBJECT.
+ *
+ * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_OBJECT.
+ */
+
+
+/**
+ * G_IS_OBJECT_CLASS:
+ * @class: a #GObjectClass
+ *
+ * Checks whether @class "is a" valid #GObjectClass structure of type
+ * %G_TYPE_OBJECT or derived.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC:
+ * @pspec: a #GParamSpec
+ *
+ * Checks whether @pspec "is a" valid #GParamSpec structure of type %G_TYPE_PARAM
+ * or derived.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_BOOLEAN:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOOLEAN.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_BOXED:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOXED.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_CHAR:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_CHAR.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_CLASS:
+ * @pclass: a #GParamSpecClass
+ *
+ * Checks whether @pclass "is a" valid #GParamSpecClass structure of type
+ * %G_TYPE_PARAM or derived.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_DOUBLE:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_DOUBLE.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_ENUM:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ENUM.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_FLAGS:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLAGS.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_FLOAT:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLOAT.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_GTYPE:
+ * @pspec: a #GParamSpec
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_GTYPE.
+ *
+ * Since: 2.10
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_INT:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_INT64:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT64.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_LONG:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_LONG.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_OBJECT:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OBJECT.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_OVERRIDE:
+ * @pspec: a #GParamSpec
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OVERRIDE.
+ *
+ * Since: 2.4
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_PARAM:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_PARAM.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_POINTER:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_POINTER.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_STRING:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_STRING.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_UCHAR:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UCHAR.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_UINT:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_UINT64:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT64.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_ULONG:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ULONG.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_UNICHAR:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UNICHAR.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_VALUE_ARRAY:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VALUE_ARRAY.
+ *
+ * Returns: %TRUE on success.
+ * Deprecated: 2.32: Use #GArray instead of #GValueArray
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_VARIANT:
+ * @pspec: a #GParamSpec
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VARIANT.
+ *
+ * Returns: %TRUE on success
+ * Since: 2.26
+ */
+
+
+/**
+ * G_IS_VALUE:
+ * @value: A #GValue structure.
+ *
+ * Checks if @value is a valid and initialized #GValue structure.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_MARKUP_ERROR:
+ *
+ * Error domain for markup parsing.
+ * Errors in this domain will be from the #GMarkupError enumeration.
+ * See #GError for information on error domains.
+ */
+
+
+/**
+ * G_NETWORK_MONITOR_EXTENSION_POINT_NAME:
+ *
+ * Extension point for network status monitoring functionality.
+ * See <link linkend="extending-gio">Extending GIO</link>.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * G_NODE_IS_LEAF:
+ * @node: a #GNode
+ *
+ * Returns %TRUE if a #GNode is a leaf node.
+ *
+ * (i.e. it has no children)
+ *
+ * Returns: %TRUE if the #GNode is a leaf node
+ */
+
+
+/**
+ * G_NODE_IS_ROOT:
+ * @node: a #GNode
+ *
+ * Returns %TRUE if a #GNode is the root of a tree.
+ *
+ * (i.e. it has no parent or siblings)
+ *
+ * Returns: %TRUE if the #GNode is the root of a tree
+ */
+
+
+/**
+ * G_OBJECT:
+ * @object: Object which is subject to casting.
+ *
+ * Casts a #GObject or derived pointer into a (GObject*) pointer.
+ * Depending on the current debugging level, this function may invoke
+ * certain runtime checks to identify invalid casts.
+ */
+
+
+/**
+ * G_OBJECT_CLASS:
+ * @class: a valid #GObjectClass
+ *
+ * Casts a derived #GObjectClass structure into a #GObjectClass structure.
+ */
+
+
+/**
+ * G_OBJECT_CLASS_NAME:
+ * @class: a valid #GObjectClass
+ *
+ * Return the name of a class structure's type.
+ *
+ * should not be freed.
+ *
+ * Returns: Type name of @class. The string is owned by the type system and
+ */
+
+
+/**
+ * G_OBJECT_CLASS_TYPE:
+ * @class: a valid #GObjectClass
+ *
+ * Get the type id of a class structure.
+ *
+ * Returns: Type id of @class.
+ */
+
+
+/**
+ * G_OBJECT_GET_CLASS:
+ * @object: a #GObject instance.
+ *
+ * Get the class structure associated to a #GObject instance.
+ *
+ * Returns: pointer to object class structure.
+ */
+
+
+/**
+ * G_OBJECT_TYPE:
+ * @object: Object to return the type id for.
+ *
+ * Get the type id of an object.
+ *
+ * Returns: Type id of @object.
+ */
+
+
+/**
+ * G_OBJECT_TYPE_NAME:
+ * @object: Object to return the type name for.
+ *
+ * Get the name of an object's type.
+ *
+ * should not be freed.
+ *
+ * Returns: Type name of @object. The string is owned by the type system and
+ */
+
+
+/**
+ * G_OBJECT_WARN_INVALID_PROPERTY_ID:
+ * @object: the #GObject on which set_property() or get_property() was called
+ * @property_id: the numeric id of the property
+ * @pspec: the #GParamSpec of the property
+ *
+ * This macro should be used to emit a standard warning about unexpected
+ * properties in set_property() and get_property() implementations.
+ */
+
+
+/**
+ * G_OPTION_ERROR:
+ *
+ * Error domain for option parsing. Errors in this domain will
+ * be from the #GOptionError enumeration. See #GError for information on
+ * error domains.
+ */
+
+
+/**
+ * G_OPTION_REMAINING:
+ *
+ * If a long option in the main group has this name, it is not treated as a
+ * regular option. Instead it collects all non-option arguments which would
+ * otherwise be left in <literal>argv</literal>. The option must be of type
+ * %G_OPTION_ARG_CALLBACK, %G_OPTION_ARG_STRING_ARRAY
+ * or %G_OPTION_ARG_FILENAME_ARRAY.
+ *
+ *
+ * Using #G_OPTION_REMAINING instead of simply scanning <literal>argv</literal>
+ * for leftover arguments has the advantage that GOption takes care of
+ * necessary encoding conversions for strings or filenames.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * G_PARAM_MASK:
+ *
+ * Mask containing the bits of #GParamSpec.flags which are reserved for GLib.
+ */
+
+
+/**
+ * G_PARAM_READWRITE:
+ *
+ * #GParamFlags value alias for %G_PARAM_READABLE | %G_PARAM_WRITABLE.
+ */
+
+
+/**
+ * G_PARAM_SPEC:
+ * @pspec: a valid #GParamSpec
+ *
+ * Casts a derived #GParamSpec object (e.g. of type #GParamSpecInt) into
+ * a #GParamSpec object.
+ */
+
+
+/**
+ * G_PARAM_SPEC_BOOLEAN:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecBoolean.
+ */
+
+
+/**
+ * G_PARAM_SPEC_BOXED:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecBoxed.
+ */
+
+
+/**
+ * G_PARAM_SPEC_CHAR:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecChar.
+ */
+
+
+/**
+ * G_PARAM_SPEC_CLASS:
+ * @pclass: a valid #GParamSpecClass
+ *
+ * Casts a derived #GParamSpecClass structure into a #GParamSpecClass structure.
+ */
+
+
+/**
+ * G_PARAM_SPEC_DOUBLE:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecDouble.
+ */
+
+
+/**
+ * G_PARAM_SPEC_ENUM:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecEnum.
+ */
+
+
+/**
+ * G_PARAM_SPEC_FLAGS:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecFlags.
+ */
+
+
+/**
+ * G_PARAM_SPEC_FLOAT:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecFloat.
+ */
+
+
+/**
+ * G_PARAM_SPEC_GET_CLASS:
+ * @pspec: a valid #GParamSpec
+ *
+ * Retrieves the #GParamSpecClass of a #GParamSpec.
+ */
+
+
+/**
+ * G_PARAM_SPEC_GTYPE:
+ * @pspec: a #GParamSpec
+ *
+ * Casts a #GParamSpec into a #GParamSpecGType.
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * G_PARAM_SPEC_INT:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecInt.
+ */
+
+
+/**
+ * G_PARAM_SPEC_INT64:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecInt64.
+ */
+
+
+/**
+ * G_PARAM_SPEC_LONG:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecLong.
+ */
+
+
+/**
+ * G_PARAM_SPEC_OBJECT:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Casts a #GParamSpec instance into a #GParamSpecObject.
+ */
+
+
+/**
+ * G_PARAM_SPEC_OVERRIDE:
+ * @pspec: a #GParamSpec
+ *
+ * Casts a #GParamSpec into a #GParamSpecOverride.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_PARAM_SPEC_PARAM:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Casts a #GParamSpec instance into a #GParamSpecParam.
+ */
+
+
+/**
+ * G_PARAM_SPEC_POINTER:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Casts a #GParamSpec instance into a #GParamSpecPointer.
+ */
+
+
+/**
+ * G_PARAM_SPEC_STRING:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Casts a #GParamSpec instance into a #GParamSpecString.
+ */
+
+
+/**
+ * G_PARAM_SPEC_TYPE:
+ * @pspec: a valid #GParamSpec
+ *
+ * Retrieves the #GType of this @pspec.
+ */
+
+
+/**
+ * G_PARAM_SPEC_TYPE_NAME:
+ * @pspec: a valid #GParamSpec
+ *
+ * Retrieves the #GType name of this @pspec.
+ */
+
+
+/**
+ * G_PARAM_SPEC_UCHAR:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecUChar.
+ */
+
+
+/**
+ * G_PARAM_SPEC_UINT:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecUInt.
+ */
+
+
+/**
+ * G_PARAM_SPEC_UINT64:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecUInt64.
+ */
+
+
+/**
+ * G_PARAM_SPEC_ULONG:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecULong.
+ */
+
+
+/**
+ * G_PARAM_SPEC_UNICHAR:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecUnichar.
+ */
+
+
+/**
+ * G_PARAM_SPEC_VALUE_ARRAY:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecValueArray.
+ *
+ * Deprecated: 2.32: Use #GArray instead of #GValueArray
+ */
+
+
+/**
+ * G_PARAM_SPEC_VALUE_TYPE:
+ * @pspec: a valid #GParamSpec
+ *
+ * Retrieves the #GType to initialize a #GValue for this parameter.
+ */
+
+
+/**
+ * G_PARAM_SPEC_VARIANT:
+ * @pspec: a #GParamSpec
+ *
+ * Casts a #GParamSpec into a #GParamSpecVariant.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_PARAM_STATIC_STRINGS:
+ *
+ * #GParamFlags value alias for %G_PARAM_STATIC_NAME | %G_PARAM_STATIC_NICK | %G_PARAM_STATIC_BLURB.
+ *
+ * Since 2.13.0
+ */
+
+
+/**
+ * G_PARAM_USER_SHIFT:
+ *
+ * Minimum shift count to be used for user defined flags, to be stored in
+ * #GParamSpec.flags. The maximum allowed is 30 + G_PARAM_USER_SHIFT.
+ */
+
+
+/**
+ * G_PRIORITY_DEFAULT:
+ *
+ * Use this for default priority event sources.
+ *
+ * In GLib this priority is used when adding timeout functions
+ * with g_timeout_add(). In GDK this priority is used for events
+ * from the X server.
+ */
+
+
+/**
+ * G_PRIORITY_DEFAULT_IDLE:
+ *
+ * Use this for default priority idle functions.
+ *
+ * In GLib this priority is used when adding idle functions with
+ * g_idle_add().
+ */
+
+
+/**
+ * G_PRIORITY_HIGH:
+ *
+ * Use this for high priority event sources.
+ *
+ * It is not used within GLib or GTK+.
+ */
+
+
+/**
+ * G_PRIORITY_HIGH_IDLE:
+ *
+ * Use this for high priority idle functions.
+ *
+ * GTK+ uses #G_PRIORITY_HIGH_IDLE + 10 for resizing operations,
+ * and #G_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.)
+ */
+
+
+/**
+ * G_PRIORITY_LOW:
+ *
+ * Use this for very low priority background tasks.
+ *
+ * It is not used within GLib or GTK+.
+ */
+
+
+/**
+ * G_PROXY_EXTENSION_POINT_NAME:
+ *
+ * Extension point for proxy functionality.
+ * See <link linkend="extending-gio">Extending GIO</link>.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_PROXY_RESOLVER_EXTENSION_POINT_NAME:
+ *
+ * Extension point for proxy resolving functionality.
+ * See <link linkend="extending-gio">Extending GIO</link>.
+ */
+
+
+/**
+ * G_QUEUE_INIT:
+ *
+ * A statically-allocated #GQueue must be initialized with this
+ * macro before it can be used. This macro can be used to initialize
+ * a variable, but it cannot be assigned to a variable. In that case
+ * you have to use g_queue_init().
+ *
+ * |[
+ * GQueue my_queue = G_QUEUE_INIT;
+ * ]|
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_REGEX_ERROR:
+ *
+ * Error domain for regular expressions. Errors in this domain will be
+ * from the #GRegexError enumeration. See #GError for information on
+ * error domains.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_RESOLVER_ERROR:
+ *
+ * Error domain for #GResolver. Errors in this domain will be from the
+ * #GResolverError enumeration. See #GError for more information on
+ * error domains.
+ */
+
+
+/**
+ * G_RESOURCE_ERROR:
+ *
+ * Error domain for #GResource. Errors in this domain will be from the
+ * #GResourceError enumeration. See #GError for more information on
+ * error domains.
+ */
+
+
+/**
+ * G_SETTINGS_BACKEND_EXTENSION_POINT_NAME:
+ *
+ * Extension point for #GSettingsBackend functionality.
+ */
+
+
+/**
+ * G_SIGNAL_FLAGS_MASK:
+ *
+ * A mask for all #GSignalFlags bits.
+ */
+
+
+/**
+ * G_SIGNAL_MATCH_MASK:
+ *
+ * A mask for all #GSignalMatchType bits.
+ */
+
+
+/**
+ * G_SIGNAL_TYPE_STATIC_SCOPE:
+ *
+ * This macro flags signal argument types for which the signal system may
+ * assume that instances thereof remain persistent across all signal emissions
+ * they are used in. This is only useful for non ref-counted, value-copy types.
+ *
+ * To flag a signal argument in this way, add
+ * <literal>| G_SIGNAL_TYPE_STATIC_SCOPE</literal> to the corresponding argument
+ * of g_signal_new().
+ * |[
+ * g_signal_new ("size_request",
+ * G_TYPE_FROM_CLASS (gobject_class),
+ * G_SIGNAL_RUN_FIRST,
+ * G_STRUCT_OFFSET (GtkWidgetClass, size_request),
+ * NULL, NULL,
+ * _gtk_marshal_VOID__BOXED,
+ * G_TYPE_NONE, 1,
+ * GTK_TYPE_REQUISITION | G_SIGNAL_TYPE_STATIC_SCOPE);
+ * ]|
+ */
+
+
+/**
+ * G_SOURCE_CONTINUE:
+ *
+ * Use this macro as the return value of a #GSourceFunc to leave
+ * the #GSource in the main loop.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * G_SOURCE_REMOVE:
+ *
+ * Use this macro as the return value of a #GSourceFunc to remove
+ * the #GSource from the main loop.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * G_SPAWN_ERROR:
+ *
+ * Error domain for spawning processes. Errors in this domain will
+ * be from the #GSpawnError enumeration. See #GError for information on
+ * error domains.
+ */
+
+
+/**
+ * G_TIME_SPAN_DAY:
+ *
+ * Evaluates to a time span of one day.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TIME_SPAN_HOUR:
+ *
+ * Evaluates to a time span of one hour.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TIME_SPAN_MILLISECOND:
+ *
+ * Evaluates to a time span of one millisecond.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TIME_SPAN_MINUTE:
+ *
+ * Evaluates to a time span of one minute.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TIME_SPAN_SECOND:
+ *
+ * Evaluates to a time span of one second.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TLS_BACKEND_EXTENSION_POINT_NAME:
+ *
+ * Extension point for TLS functionality via #GTlsBackend.
+ * See <link linkend="extending-gio">Extending GIO</link>.
+ */
+
+
+/**
+ * G_TLS_DATABASE_PURPOSE_AUTHENTICATE_CLIENT:
+ *
+ * The purpose used to verify the client certificate in a TLS connection.
+ * Used by TLS servers.
+ */
+
+
+/**
+ * G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER:
+ *
+ * The purpose used to verify the server certificate in a TLS connection. This
+ * is the most common purpose in use. Used by TLS clients.
+ */
+
+
+/**
+ * G_TLS_ERROR:
+ *
+ * Error domain for TLS. Errors in this domain will be from the
+ * #GTlsError enumeration. See #GError for more information on error
+ * domains.
+ */
+
+
+/**
+ * G_TYPE_ARRAY:
+ *
+ * The #GType for a boxed type holding a #GArray reference.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * G_TYPE_BOOLEAN:
+ *
+ * The fundamental type corresponding to #gboolean.
+ */
+
+
+/**
+ * G_TYPE_BOXED:
+ *
+ * The fundamental type from which all boxed types are derived.
+ */
+
+
+/**
+ * G_TYPE_BYTES:
+ *
+ * The #GType for #GBytes.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * G_TYPE_BYTE_ARRAY:
+ *
+ * The #GType for a boxed type holding a #GByteArray reference.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * G_TYPE_CHAR:
+ *
+ * The fundamental type corresponding to #gchar.
+ * The type designated by G_TYPE_CHAR is unconditionally an 8-bit signed integer.
+ * This may or may not be the same type a the C type "gchar".
+ */
+
+
+/**
+ * G_TYPE_CHECK_CLASS_CAST:
+ * @g_class: Location of a #GTypeClass structure.
+ * @g_type: The type to be returned.
+ * @c_type: The corresponding C type of class structure of @g_type.
+ *
+ * Checks that @g_class is a class structure of the type identified by @g_type
+ * and issues a warning if this is not the case. Returns @g_class casted
+ * to a pointer to @c_type.
+ *
+ * This macro should only be used in type implementations.
+ */
+
+
+/**
+ * G_TYPE_CHECK_CLASS_TYPE:
+ * @g_class: Location of a #GTypeClass structure.
+ * @g_type: The type to be checked.
+ *
+ * Checks if @g_class is a class structure of the type identified by
+ * @g_type.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_CHECK_INSTANCE:
+ * @instance: Location of a #GTypeInstance structure.
+ *
+ * Checks if @instance is a valid #GTypeInstance structure,
+ * otherwise issues a warning and returns %FALSE.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_CHECK_INSTANCE_CAST:
+ * @instance: Location of a #GTypeInstance structure.
+ * @g_type: The type to be returned.
+ * @c_type: The corresponding C type of @g_type.
+ *
+ * Checks that @instance is an instance of the type identified by @g_type
+ * and issues a warning if this is not the case. Returns @instance casted
+ * to a pointer to @c_type.
+ *
+ * This macro should only be used in type implementations.
+ */
+
+
+/**
+ * G_TYPE_CHECK_INSTANCE_TYPE:
+ * @instance: Location of a #GTypeInstance structure.
+ * @g_type: The type to be checked
+ *
+ * Checks if @instance is an instance of the type identified by @g_type.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_CHECK_VALUE:
+ * @value: a #GValue
+ *
+ * Checks if @value has been initialized to hold values
+ * of a value type.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_CHECK_VALUE_TYPE:
+ * @value: a #GValue
+ * @g_type: The type to be checked.
+ *
+ * Checks if @value has been initialized to hold values
+ * of type @g_type.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_CLASS_GET_PRIVATE:
+ * @klass: the class of a type deriving from @private_type.
+ * @g_type: the type identifying which private data to retrieve.
+ * @c_type: The C type for the private structure.
+ *
+ * Gets the private class structure for a particular type.
+ * The private structure must have been registered in the
+ * get_type() function with g_type_add_class_private().
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Since: 2.24
+ * Returns: a pointer to the private data structure.
+ */
+
+
+/**
+ * G_TYPE_CLOSURE:
+ *
+ * The #GType for #GClosure.
+ */
+
+
+/**
+ * G_TYPE_DATE:
+ *
+ * The #GType for #GDate.
+ */
+
+
+/**
+ * G_TYPE_DATE_TIME:
+ *
+ * The #GType for a boxed type holding a #GDateTime.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TYPE_DBUS_ANNOTATION_INFO:
+ *
+ * The #GType for a boxed type holding a #GDBusAnnotationInfo.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TYPE_DBUS_ARG_INFO:
+ *
+ * The #GType for a boxed type holding a #GDBusArgInfo.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TYPE_DBUS_INTERFACE_INFO:
+ *
+ * The #GType for a boxed type holding a #GDBusInterfaceInfo.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TYPE_DBUS_METHOD_INFO:
+ *
+ * The #GType for a boxed type holding a #GDBusMethodInfo.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TYPE_DBUS_NODE_INFO:
+ *
+ * The #GType for a boxed type holding a #GDBusNodeInfo.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TYPE_DBUS_PROPERTY_INFO:
+ *
+ * The #GType for a boxed type holding a #GDBusPropertyInfo.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TYPE_DBUS_SIGNAL_INFO:
+ *
+ * The #GType for a boxed type holding a #GDBusSignalInfo.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TYPE_DOUBLE:
+ *
+ * The fundamental type corresponding to #gdouble.
+ */
+
+
+/**
+ * G_TYPE_ENUM:
+ *
+ * The fundamental type from which all enumeration types are derived.
+ */
+
+
+/**
+ * G_TYPE_ERROR:
+ *
+ * The #GType for a boxed type holding a #GError.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TYPE_FLAGS:
+ *
+ * The fundamental type from which all flags types are derived.
+ */
+
+
+/**
+ * G_TYPE_FLAG_RESERVED_ID_BIT:
+ *
+ * A bit in the type number that's supposed to be left untouched.
+ */
+
+
+/**
+ * G_TYPE_FLOAT:
+ *
+ * The fundamental type corresponding to #gfloat.
+ */
+
+
+/**
+ * G_TYPE_FROM_CLASS:
+ * @g_class: Location of a valid #GTypeClass structure.
+ *
+ * Get the type identifier from a given @class structure.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: the #GType
+ */
+
+
+/**
+ * G_TYPE_FROM_INSTANCE:
+ * @instance: Location of a valid #GTypeInstance structure.
+ *
+ * Get the type identifier from a given @instance structure.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: the #GType
+ */
+
+
+/**
+ * G_TYPE_FROM_INTERFACE:
+ * @g_iface: Location of a valid #GTypeInterface structure.
+ *
+ * Get the type identifier from a given @interface structure.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: the #GType
+ */
+
+
+/**
+ * G_TYPE_FUNDAMENTAL:
+ * @type: A #GType value.
+ *
+ * The fundamental type which is the ancestor of @type.
+ * Fundamental types are types that serve as ultimate bases for the derived types,
+ * thus they are the roots of distinct inheritance hierarchies.
+ */
+
+
+/**
+ * G_TYPE_FUNDAMENTAL_MAX:
+ *
+ * An integer constant that represents the number of identifiers reserved
+ * for types that are assigned at compile-time.
+ */
+
+
+/**
+ * G_TYPE_FUNDAMENTAL_SHIFT:
+ *
+ * Shift value used in converting numbers to type IDs.
+ */
+
+
+/**
+ * G_TYPE_GSTRING:
+ *
+ * The #GType for #GString.
+ */
+
+
+/**
+ * G_TYPE_GTYPE:
+ *
+ * The type for #GType.
+ */
+
+
+/**
+ * G_TYPE_HASH_TABLE:
+ *
+ * The #GType for a boxed type holding a #GHashTable reference.
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * G_TYPE_HAS_VALUE_TABLE:
+ * @type: A #GType value.
+ *
+ * Checks if @type has a #GTypeValueTable.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_INITIALLY_UNOWNED:
+ *
+ * The type for #GInitiallyUnowned.
+ */
+
+
+/**
+ * G_TYPE_INSTANCE_GET_CLASS:
+ * @instance: Location of the #GTypeInstance structure.
+ * @g_type: The #GType of the class to be returned.
+ * @c_type: The C type of the class structure.
+ *
+ * Get the class structure of a given @instance, casted
+ * to a specified ancestor type @g_type of the instance.
+ *
+ * Note that while calling a GInstanceInitFunc(), the class pointer gets
+ * modified, so it might not always return the expected pointer.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: a pointer to the class structure
+ */
+
+
+/**
+ * G_TYPE_INSTANCE_GET_INTERFACE:
+ * @instance: Location of the #GTypeInstance structure.
+ * @g_type: The #GType of the interface to be returned.
+ * @c_type: The C type of the interface structure.
+ *
+ * Get the interface structure for interface @g_type of a given @instance.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: a pointer to the interface structure
+ */
+
+
+/**
+ * G_TYPE_INSTANCE_GET_PRIVATE:
+ * @instance: the instance of a type deriving from @private_type.
+ * @g_type: the type identifying which private data to retrieve.
+ * @c_type: The C type for the private structure.
+ *
+ * Gets the private structure for a particular type.
+ * The private structure must have been registered in the
+ * class_init function with g_type_class_add_private().
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Since: 2.4
+ * Returns: a pointer to the private data structure.
+ */
+
+
+/**
+ * G_TYPE_INT:
+ *
+ * The fundamental type corresponding to #gint.
+ */
+
+
+/**
+ * G_TYPE_INT64:
+ *
+ * The fundamental type corresponding to #gint64.
+ */
+
+
+/**
+ * G_TYPE_INTERFACE:
+ *
+ * The fundamental type from which all interfaces are derived.
+ */
+
+
+/**
+ * G_TYPE_INVALID:
+ *
+ * An invalid #GType used as error return value in some functions which return
+ * a #GType.
+ */
+
+
+/**
+ * G_TYPE_IO_CHANNEL:
+ *
+ * The #GType for #GIOChannel.
+ */
+
+
+/**
+ * G_TYPE_IO_CONDITION:
+ *
+ * The #GType for #GIOCondition.
+ */
+
+
+/**
+ * G_TYPE_IS_ABSTRACT:
+ * @type: A #GType value.
+ *
+ * Checks if @type is an abstract type.  An abstract type cannot be
+ * instantiated and is normally used as an abstract base class for
+ * derived classes.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_IS_CLASSED:
+ * @type: A #GType value.
+ *
+ * Checks if @type is a classed type.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_IS_DEEP_DERIVABLE:
+ * @type: A #GType value.
+ *
+ * Checks if @type is a deep derivable type.  A deep derivable type
+ * can be used as the base class of a deep (multi-level) class hierarchy.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_IS_DERIVABLE:
+ * @type: A #GType value.
+ *
+ * Checks if @type is a derivable type.  A derivable type can
+ * be used as the base class of a flat (single-level) class hierarchy.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_IS_DERIVED:
+ * @type: A #GType value.
+ *
+ * Checks if @type is derived (or in object-oriented terminology:
+ * inherited) from another type (this holds true for all non-fundamental
+ * types).
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_IS_ENUM:
+ * @type: a #GType ID.
+ *
+ * Checks whether @type "is a" %G_TYPE_ENUM.
+ *
+ * Returns: %TRUE if @type "is a" %G_TYPE_ENUM.
+ */
+
+
+/**
+ * G_TYPE_IS_FLAGS:
+ * @type: a #GType ID.
+ *
+ * Checks whether @type "is a" %G_TYPE_FLAGS.
+ *
+ * Returns: %TRUE if @type "is a" %G_TYPE_FLAGS.
+ */
+
+
+/**
+ * G_TYPE_IS_FUNDAMENTAL:
+ * @type: A #GType value.
+ *
+ * Checks if @type is a fundamental type.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_IS_INSTANTIATABLE:
+ * @type: A #GType value.
+ *
+ * Checks if @type can be instantiated.  Instantiation is the
+ * process of creating an instance (object) of this type.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_IS_INTERFACE:
+ * @type: A #GType value.
+ *
+ * Checks if @type is an interface type.
+ * An interface type provides a pure API, the implementation
+ * of which is provided by another type (which is then said to conform
+ * to the interface).  GLib interfaces are somewhat analogous to Java
+ * interfaces and C++ classes containing only pure virtual functions,
+ * with the difference that GType interfaces are not derivable (but see
+ * g_type_interface_add_prerequisite() for an alternative).
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_IS_OBJECT:
+ * @type: Type id to check
+ *
+ * Check if the passed in type id is a %G_TYPE_OBJECT or derived from it.
+ *
+ * Returns: %FALSE or %TRUE, indicating whether @type is a %G_TYPE_OBJECT.
+ */
+
+
+/**
+ * G_TYPE_IS_PARAM:
+ * @type: a #GType ID
+ *
+ * Checks whether @type "is a" %G_TYPE_PARAM.
+ */
+
+
+/**
+ * G_TYPE_IS_VALUE:
+ * @type: A #GType value.
+ *
+ * Checks whether the passed in type ID can be used for g_value_init().
+ * That is, this macro checks whether this type provides an implementation
+ * of the #GTypeValueTable functions required for a type to create a #GValue of.
+ *
+ * Returns: Whether @type is suitable as a #GValue type.
+ */
+
+
+/**
+ * G_TYPE_IS_VALUE_ABSTRACT:
+ * @type: A #GType value.
+ *
+ * Checks if @type is an abstract value type.  An abstract value type introduces
+ * a value table, but can't be used for g_value_init() and is normally used as
+ * an abstract base type for derived value types.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_IS_VALUE_TYPE:
+ * @type: A #GType value.
+ *
+ * Checks if @type is a value type and can be used with g_value_init().
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_KEY_FILE:
+ *
+ * The #GType for a boxed type holding a #GKeyFile.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * G_TYPE_LONG:
+ *
+ * The fundamental type corresponding to #glong.
+ */
+
+
+/**
+ * G_TYPE_MAIN_CONTEXT:
+ *
+ * The #GType for a boxed type holding a #GMainContext.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * G_TYPE_MAIN_LOOP:
+ *
+ * The #GType for a boxed type holding a #GMainLoop.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * G_TYPE_MAKE_FUNDAMENTAL:
+ * @x: the fundamental type number.
+ *
+ * Get the type ID for the fundamental type number @x.
+ * Use g_type_fundamental_next() instead of this macro to create new fundamental
+ * types.
+ *
+ * Returns: the GType
+ */
+
+
+/**
+ * G_TYPE_MATCH_INFO:
+ *
+ * The #GType for a boxed type holding a #GMatchInfo reference.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * G_TYPE_NONE:
+ *
+ * A fundamental type which is used as a replacement for the C
+ * <literal>void</literal> return type.
+ */
+
+
+/**
+ * G_TYPE_OBJECT:
+ *
+ * The fundamental type for #GObject.
+ */
+
+
+/**
+ * G_TYPE_PARAM:
+ *
+ * The fundamental type from which all #GParamSpec types are derived.
+ */
+
+
+/**
+ * G_TYPE_PARAM_BOOLEAN:
+ *
+ * The #GType of #GParamSpecBoolean.
+ */
+
+
+/**
+ * G_TYPE_PARAM_BOXED:
+ *
+ * The #GType of #GParamSpecBoxed.
+ */
+
+
+/**
+ * G_TYPE_PARAM_CHAR:
+ *
+ * The #GType of #GParamSpecChar.
+ */
+
+
+/**
+ * G_TYPE_PARAM_DOUBLE:
+ *
+ * The #GType of #GParamSpecDouble.
+ */
+
+
+/**
+ * G_TYPE_PARAM_ENUM:
+ *
+ * The #GType of #GParamSpecEnum.
+ */
+
+
+/**
+ * G_TYPE_PARAM_FLAGS:
+ *
+ * The #GType of #GParamSpecFlags.
+ */
+
+
+/**
+ * G_TYPE_PARAM_FLOAT:
+ *
+ * The #GType of #GParamSpecFloat.
+ */
+
+
+/**
+ * G_TYPE_PARAM_GTYPE:
+ *
+ * The #GType of #GParamSpecGType.
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * G_TYPE_PARAM_INT:
+ *
+ * The #GType of #GParamSpecInt.
+ */
+
+
+/**
+ * G_TYPE_PARAM_INT64:
+ *
+ * The #GType of #GParamSpecInt64.
+ */
+
+
+/**
+ * G_TYPE_PARAM_LONG:
+ *
+ * The #GType of #GParamSpecLong.
+ */
+
+
+/**
+ * G_TYPE_PARAM_OBJECT:
+ *
+ * The #GType of #GParamSpecObject.
+ */
+
+
+/**
+ * G_TYPE_PARAM_OVERRIDE:
+ *
+ * The #GType of #GParamSpecOverride.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_TYPE_PARAM_PARAM:
+ *
+ * The #GType of #GParamSpecParam.
+ */
+
+
+/**
+ * G_TYPE_PARAM_POINTER:
+ *
+ * The #GType of #GParamSpecPointer.
+ */
+
+
+/**
+ * G_TYPE_PARAM_STRING:
+ *
+ * The #GType of #GParamSpecString.
+ */
+
+
+/**
+ * G_TYPE_PARAM_UCHAR:
+ *
+ * The #GType of #GParamSpecUChar.
+ */
+
+
+/**
+ * G_TYPE_PARAM_UINT:
+ *
+ * The #GType of #GParamSpecUInt.
+ */
+
+
+/**
+ * G_TYPE_PARAM_UINT64:
+ *
+ * The #GType of #GParamSpecUInt64.
+ */
+
+
+/**
+ * G_TYPE_PARAM_ULONG:
+ *
+ * The #GType of #GParamSpecULong.
+ */
+
+
+/**
+ * G_TYPE_PARAM_UNICHAR:
+ *
+ * The #GType of #GParamSpecUnichar.
+ */
+
+
+/**
+ * G_TYPE_PARAM_VALUE_ARRAY:
+ *
+ * The #GType of #GParamSpecValueArray.
+ *
+ * Deprecated: 2.32: Use #GArray instead of #GValueArray
+ */
+
+
+/**
+ * G_TYPE_PARAM_VARIANT:
+ *
+ * The #GType of #GParamSpecVariant.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TYPE_POINTER:
+ *
+ * The fundamental type corresponding to #gpointer.
+ */
+
+
+/**
+ * G_TYPE_PTR_ARRAY:
+ *
+ * The #GType for a boxed type holding a #GPtrArray reference.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * G_TYPE_REGEX:
+ *
+ * The #GType for a boxed type holding a #GRegex reference.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_TYPE_RESERVED_BSE_FIRST:
+ *
+ * First fundamental type number to create a new fundamental type id with
+ * G_TYPE_MAKE_FUNDAMENTAL() reserved for BSE.
+ */
+
+
+/**
+ * G_TYPE_RESERVED_BSE_LAST:
+ *
+ * Last fundamental type number reserved for BSE.
+ */
+
+
+/**
+ * G_TYPE_RESERVED_GLIB_FIRST:
+ *
+ * First fundamental type number to create a new fundamental type id with
+ * G_TYPE_MAKE_FUNDAMENTAL() reserved for GLib.
+ */
+
+
+/**
+ * G_TYPE_RESERVED_GLIB_LAST:
+ *
+ * Last fundamental type number reserved for GLib.
+ */
+
+
+/**
+ * G_TYPE_RESERVED_USER_FIRST:
+ *
+ * First available fundamental type number to create new fundamental
+ * type id with G_TYPE_MAKE_FUNDAMENTAL().
+ */
+
+
+/**
+ * G_TYPE_RESOURCE:
+ *
+ * The #GType for #GResource.
+ */
+
+
+/**
+ * G_TYPE_SETTINGS_SCHEMA:
+ *
+ * A boxed #GType corresponding to #GSettingsSchema.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * G_TYPE_SETTINGS_SCHEMA_SOURCE:
+ *
+ * A boxed #GType corresponding to #GSettingsSchemaSource.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * G_TYPE_SOURCE:
+ *
+ * The #GType for a boxed type holding a #GSource.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * G_TYPE_STRING:
+ *
+ * The fundamental type corresponding to nul-terminated C strings.
+ */
+
+
+/**
+ * G_TYPE_STRV:
+ *
+ * The #GType for a boxed type holding a %NULL-terminated array of strings.
+ *
+ * The code fragments in the following example show the use of a property of
+ * type #G_TYPE_STRV with g_object_class_install_property(), g_object_set()
+ * and g_object_get().
+ *
+ * |[
+ * g_object_class_install_property (object_class,
+ * PROP_AUTHORS,
+ * g_param_spec_boxed ("authors",
+ * _("Authors"),
+ * _("List of authors"),
+ * G_TYPE_STRV,
+ * G_PARAM_READWRITE));
+ *
+ * gchar *authors[] = { "Owen", "Tim", NULL };
+ * g_object_set (obj, "authors", authors, NULL);
+ *
+ * gchar *writers[];
+ * g_object_get (obj, "authors", &writers, NULL);
+ * /&ast; do something with writers &ast;/
+ * g_strfreev (writers);
+ * ]|
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_TYPE_UCHAR:
+ *
+ * The fundamental type corresponding to #guchar.
+ */
+
+
+/**
+ * G_TYPE_UINT:
+ *
+ * The fundamental type corresponding to #guint.
+ */
+
+
+/**
+ * G_TYPE_UINT64:
+ *
+ * The fundamental type corresponding to #guint64.
+ */
+
+
+/**
+ * G_TYPE_ULONG:
+ *
+ * The fundamental type corresponding to #gulong.
+ */
+
+
+/**
+ * G_TYPE_VALUE:
+ *
+ * The type ID of the "GValue" type which is a boxed type,
+ * used to pass around pointers to GValues.
+ */
+
+
+/**
+ * G_TYPE_VALUE_ARRAY:
+ *
+ * The type ID of the "GValueArray" type which is a boxed type,
+ * used to pass around pointers to GValueArrays.
+ *
+ * Deprecated: 2.32: Use #GArray instead of #GValueArray
+ */
+
+
+/**
+ * G_TYPE_VARIANT:
+ *
+ * The fundamental type corresponding to #GVariant.
+ *
+ * All floating #GVariant instances passed through the #GType system are
+ * consumed.
+ *
+ * Note that callbacks in closures, and signal handlers
+ * for signals of return type %G_TYPE_VARIANT, must never return floating
+ * variants.
+ *
+ * Note: GLib 2.24 did include a boxed type with this name. It was replaced
+ * with this fundamental type in 2.26.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TYPE_VARIANT_BUILDER:
+ *
+ * The #GType for a boxed type holding a #GVariantBuilder.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * G_TYPE_VARIANT_TYPE:
+ *
+ * The #GType for a boxed type holding a #GVariantType.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * G_UNICHAR_MAX_DECOMPOSITION_LENGTH:
+ *
+ * The maximum length (in codepoints) of a compatibility or canonical
+ * decomposition of a single Unicode character.
+ *
+ * This is as defined by Unicode 6.1.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * G_UNICODE_COMBINING_MARK:
+ *
+ * Older name for %G_UNICODE_SPACING_MARK.
+ *
+ * Deprecated: 2.30: Use %G_UNICODE_SPACING_MARK.
+ */
+
+
+/**
+ * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH:
+ *
+ * Allowed characters in a path. Includes "!$&'()*+,;=:@/".
+ */
+
+
+/**
+ * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT:
+ *
+ * Allowed characters in path elements. Includes "!$&'()*+,;=:@".
+ */
+
+
+/**
+ * G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO:
+ *
+ * Allowed characters in userinfo as defined in RFC 3986. Includes "!$&'()*+,;=:".
+ */
+
+
+/**
+ * G_URI_RESERVED_CHARS_GENERIC_DELIMITERS:
+ *
+ * Generic delimiters characters as defined in RFC 3986. Includes ":/?#[]@".
+ */
+
+
+/**
+ * G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS:
+ *
+ * Subcomponent delimiter characters as defined in RFC 3986. Includes "!$&'()*+,;=".
+ */
+
+
+/**
+ * G_VALUE_HOLDS:
+ * @value: A #GValue structure.
+ * @type: A #GType value.
+ *
+ * Checks if @value holds (or contains) a value of @type.
+ * This macro will also check for @value != %NULL and issue a
+ * warning if the check fails.
+ *
+ * Returns: %TRUE if @value holds the @type.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_BOOLEAN:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_BOOLEAN.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_BOXED:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values derived
+ * from type %G_TYPE_BOXED.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_CHAR:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_CHAR.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_DOUBLE:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_DOUBLE.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_ENUM:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values derived from type %G_TYPE_ENUM.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_FLAGS:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values derived from type %G_TYPE_FLAGS.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_FLOAT:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_FLOAT.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_GTYPE:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_GTYPE.
+ *
+ * Since: 2.12
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_INT:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_INT.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_INT64:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_INT64.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_LONG:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_LONG.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_OBJECT:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values derived from type %G_TYPE_OBJECT.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_PARAM:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values derived from type %G_TYPE_PARAM.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_POINTER:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_POINTER.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_STRING:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_STRING.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_UCHAR:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_UCHAR.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_UINT:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_UINT.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_UINT64:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_UINT64.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_ULONG:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_ULONG.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_VARIANT:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_VARIANT.
+ *
+ * Returns: %TRUE on success.
+ * Since: 2.26
+ */
+
+
+/**
+ * G_VALUE_INIT:
+ *
+ * A #GValue must be initialized before it can be used.
+ * This macro can be used as initializer instead of an explicit
+ * <literal>{ 0 }</literal> when declaring a variable,
+ * but it cannot be assigned to a variable.
+ *
+ * |[
+ * GValue value = G_VALUE_INIT;
+ * ]|
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * G_VALUE_NOCOPY_CONTENTS:
+ *
+ * If passed to G_VALUE_COLLECT(), allocated data won't be copied
+ * but used verbatim. This does not affect ref-counted types like
+ * objects.
+ */
+
+
+/**
+ * G_VALUE_TYPE:
+ * @value: A #GValue structure.
+ *
+ * Get the type identifier of @value.
+ *
+ * Returns: the #GType.
+ */
+
+
+/**
+ * G_VALUE_TYPE_NAME:
+ * @value: A #GValue structure.
+ *
+ * Gets the the type name of @value.
+ *
+ * Returns: the type name.
+ */
+
+
+/**
+ * G_VARIANT_TYPE:
+ * @type_string: a well-formed #GVariantType type string
+ *
+ * Converts a string to a const #GVariantType.  Depending on the
+ * current debugging level, this function may perform a runtime check
+ * to ensure that @string is a valid GVariant type string.
+ *
+ * It is always a programmer error to use this macro with an invalid
+ * type string. If in doubt, use g_variant_type_string_is_valid() to
+ * check if the string is valid.
+ *
+ * Since 2.24
+ */
+
+
+/**
+ * G_VARIANT_TYPE_ANY:
+ *
+ * An indefinite type that is a supertype of every type (including
+ * itself).
+ */
+
+
+/**
+ * G_VARIANT_TYPE_ARRAY:
+ *
+ * An indefinite type that is a supertype of every array type.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_BASIC:
+ *
+ * An indefinite type that is a supertype of every basic (ie:
+ * non-container) type.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_BOOLEAN:
+ *
+ * The type of a value that can be either %TRUE or %FALSE.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_BYTE:
+ *
+ * The type of an integer value that can range from 0 to 255.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_BYTESTRING:
+ *
+ * The type of an array of bytes.  This type is commonly used to pass
+ * around strings that may not be valid utf8.  In that case, the
+ * convention is that the nul terminator character should be included as
+ * the last character in the array.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_BYTESTRING_ARRAY:
+ *
+ * The type of an array of byte strings (an array of arrays of bytes).
+ */
+
+
+/**
+ * G_VARIANT_TYPE_DICTIONARY:
+ *
+ * An indefinite type that is a supertype of every dictionary type --
+ * that is, any array type that has an element type equal to any
+ * dictionary entry type.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_DICT_ENTRY:
+ *
+ * An indefinite type that is a supertype of every dictionary entry
+ * type.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_DOUBLE:
+ *
+ * The type of a double precision IEEE754 floating point number.
+ * These guys go up to about 1.80e308 (plus and minus) but miss out on
+ * some numbers in between.  In any case, that's far greater than the
+ * estimated number of fundamental particles in the observable
+ * universe.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_HANDLE:
+ *
+ * The type of a 32bit signed integer value, that by convention, is used
+ * as an index into an array of file descriptors that are sent alongside
+ * a D-Bus message.
+ *
+ * If you are not interacting with D-Bus, then there is no reason to make
+ * use of this type.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_INT16:
+ *
+ * The type of an integer value that can range from -32768 to 32767.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_INT32:
+ *
+ * The type of an integer value that can range from -2147483648 to
+ * 2147483647.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_INT64:
+ *
+ * The type of an integer value that can range from
+ * -9223372036854775808 to 9223372036854775807.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_MAYBE:
+ *
+ * An indefinite type that is a supertype of every maybe type.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_OBJECT_PATH:
+ *
+ * The type of a D-Bus object reference.  These are strings of a
+ * specific format used to identify objects at a given destination on
+ * the bus.
+ *
+ * If you are not interacting with D-Bus, then there is no reason to make
+ * use of this type.  If you are, then the D-Bus specification contains a
+ * precise description of valid object paths.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_OBJECT_PATH_ARRAY:
+ *
+ * The type of an array of object paths.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_SIGNATURE:
+ *
+ * The type of a D-Bus type signature.  These are strings of a specific
+ * format used as type signatures for D-Bus methods and messages.
+ *
+ * If you are not interacting with D-Bus, then there is no reason to make
+ * use of this type.  If you are, then the D-Bus specification contains a
+ * precise description of valid signature strings.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_STRING:
+ *
+ * The type of a string.  "" is a string.  %NULL is not a string.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_STRING_ARRAY:
+ *
+ * The type of an array of strings.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_TUPLE:
+ *
+ * An indefinite type that is a supertype of every tuple type,
+ * regardless of the number of items in the tuple.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_UINT16:
+ *
+ * The type of an integer value that can range from 0 to 65535.
+ * There were about this many people living in Toronto in the 1870s.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_UINT32:
+ *
+ * The type of an integer value that can range from 0 to 4294967295.
+ * That's one number for everyone who was around in the late 1970s.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_UINT64:
+ *
+ * The type of an integer value that can range from 0 to
+ * 18446744073709551616.  That's a really big number, but a Rubik's
+ * cube can have a bit more than twice as many possible positions.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_UNIT:
+ *
+ * The empty tuple type.  Has only one instance.  Known also as "triv"
+ * or "void".
+ */
+
+
+/**
+ * G_VARIANT_TYPE_VARDICT:
+ *
+ * The type of a dictionary mapping strings to variants (the ubiquitous
+ * "a{sv}" type).
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * G_VARIANT_TYPE_VARIANT:
+ *
+ * The type of a box that contains any other value (including another
+ * variant).
+ */
+
+
+/**
+ * G_VFS_EXTENSION_POINT_NAME:
+ *
+ * Extension point for #GVfs functionality.
+ * See <link linkend="extending-gio">Extending GIO</link>.
+ */
+
+
+/**
+ * G_VOLUME_IDENTIFIER_KIND_CLASS:
+ *
+ * The string used to obtain the volume <emphasis>class</emphasis>
+ * with g_volume_get_identifier().
+ *
+ * Known volume classes include <literal>device</literal> and
+ * <literal>network</literal>. Other classes may be added in the
+ * future.
+ *
+ * This is intended to be used by applications to classify #GVolume
+ * instances into different sections - for example a file manager or
+ * file chooser can use this information to show
+ * <literal>network</literal> volumes under a "Network" heading and
+ * <literal>device</literal> volumes under a "Devices" heading.
+ */
+
+
+/**
+ * G_VOLUME_IDENTIFIER_KIND_HAL_UDI:
+ *
+ * The string used to obtain a Hal UDI with g_volume_get_identifier().
+ */
+
+
+/**
+ * G_VOLUME_IDENTIFIER_KIND_LABEL:
+ *
+ * The string used to obtain a filesystem label with g_volume_get_identifier().
+ */
+
+
+/**
+ * G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT:
+ *
+ * The string used to obtain a NFS mount with g_volume_get_identifier().
+ */
+
+
+/**
+ * G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE:
+ *
+ * The string used to obtain a Unix device path with g_volume_get_identifier().
+ */
+
+
+/**
+ * G_VOLUME_IDENTIFIER_KIND_UUID:
+ *
+ * The string used to obtain a UUID with g_volume_get_identifier().
+ */
+
+
+/**
+ * G_VOLUME_MONITOR_EXTENSION_POINT_NAME:
+ *
+ * Extension point for volume monitor functionality.
+ * See <link linkend="extending-gio">Extending GIO</link>.
+ */
+
+
+/**
+ * SECTION:extensionpoints
+ * @short_description: Extension Points
+ * @include: gio.h
+ * @see_also: <link linkend="extending-gio">Extending GIO</link>
+ *
+ * #GIOExtensionPoint provides a mechanism for modules to extend the
+ * functionality of the library or application that loaded it in an
+ * organized fashion.
+ *
+ * An extension point is identified by a name, and it may optionally
+ * require that any implementation must by of a certain type (or derived
+ * thereof). Use g_io_extension_point_register() to register an
+ * extension point, and g_io_extension_point_set_required_type() to
+ * set a required type.
+ *
+ * A module can implement an extension point by specifying the #GType
+ * that implements the functionality. Additionally, each implementation
+ * of an extension point has a name, and a priority. Use
+ * g_io_extension_point_implement() to implement an extension point.
+ *
+ * |[
+ * GIOExtensionPoint *ep;
+ *
+ * /&ast; Register an extension point &ast;/
+ * ep = g_io_extension_point_register ("my-extension-point");
+ * g_io_extension_point_set_required_type (ep, MY_TYPE_EXAMPLE);
+ * ]|
+ *
+ * |[
+ * /&ast; Implement an extension point &ast;/
+ * G_DEFINE_TYPE (MyExampleImpl, my_example_impl, MY_TYPE_EXAMPLE);
+ * g_io_extension_point_implement ("my-extension-point",
+ * my_example_impl_get_type (),
+ * "my-example",
+ * 10);
+ * ]|
+ *
+ * It is up to the code that registered the extension point how
+ * it uses the implementations that have been associated with it.
+ * Depending on the use case, it may use all implementations, or
+ * only the one with the highest priority, or pick a specific
+ * one by name.
+ *
+ * To avoid opening all modules just to find out what extension
+ * points they implement, GIO makes use of a caching mechanism,
+ * see <link linkend="gio-querymodules">gio-querymodules</link>.
+ * You are expected to run this command after installing a
+ * GIO module.
+ *
+ * The <envar>GIO_EXTRA_MODULES</envar> environment variable can be
+ * used to specify additional directories to automatically load modules
+ * from. This environment variable has the same syntax as the
+ * <envar>PATH</envar>. If two modules have the same base name in different
+ * directories, then the latter one will be ignored. If additional
+ * directories are specified GIO will load modules from the built-in
+ * directory last.
+ */
+
+
+/**
+ * SECTION:gaction
+ * @title: GAction
+ * @short_description: An action interface
+ *
+ * #GAction represents a single named action.
+ *
+ * The main interface to an action is that it can be activated with
+ * g_action_activate().  This results in the 'activate' signal being
+ * emitted.  An activation has a #GVariant parameter (which may be
+ * %NULL).  The correct type for the parameter is determined by a static
+ * parameter type (which is given at construction time).
+ *
+ * An action may optionally have a state, in which case the state may be
+ * set with g_action_change_state().  This call takes a #GVariant.  The
+ * correct type for the state is determined by a static state type
+ * (which is given at construction time).
+ *
+ * The state may have a hint associated with it, specifying its valid
+ * range.
+ *
+ * #GAction is merely the interface to the concept of an action, as
+ * described above.  Various implementations of actions exist, including
+ * #GSimpleAction and #GtkAction.
+ *
+ * In all cases, the implementing class is responsible for storing the
+ * name of the action, the parameter type, the enabled state, the
+ * optional state type and the state and emitting the appropriate
+ * signals when these change.  The implementor responsible for filtering
+ * calls to g_action_activate() and g_action_change_state() for type
+ * safety and for the state being enabled.
+ *
+ * Probably the only useful thing to do with a #GAction is to put it
+ * inside of a #GSimpleActionGroup.
+ */
+
+
+/**
+ * SECTION:gactiongroup
+ * @title: GActionGroup
+ * @short_description: A group of actions
+ * @see_also: #GAction
+ *
+ * #GActionGroup represents a group of actions. Actions can be used to
+ * expose functionality in a structured way, either from one part of a
+ * program to another, or to the outside world. Action groups are often
+ * used together with a #GMenuModel that provides additional
+ * representation data for displaying the actions to the user, e.g. in
+ * a menu.
+ *
+ * The main way to interact with the actions in a GActionGroup is to
+ * activate them with g_action_group_activate_action(). Activating an
+ * action may require a #GVariant parameter. The required type of the
+ * parameter can be inquired with g_action_group_get_action_parameter_type().
+ * Actions may be disabled, see g_action_group_get_action_enabled().
+ * Activating a disabled action has no effect.
+ *
+ * Actions may optionally have a state in the form of a #GVariant. The
+ * current state of an action can be inquired with
+ * g_action_group_get_action_state(). Activating a stateful action may
+ * change its state, but it is also possible to set the state by calling
+ * g_action_group_change_action_state().
+ *
+ * As typical example, consider a text editing application which has an
+ * option to change the current font to 'bold'. A good way to represent
+ * this would be a stateful action, with a boolean state. Activating the
+ * action would toggle the state.
+ *
+ * Each action in the group has a unique name (which is a string).  All
+ * method calls, except g_action_group_list_actions() take the name of
+ * an action as an argument.
+ *
+ * The #GActionGroup API is meant to be the 'public' API to the action
+ * group.  The calls here are exactly the interaction that 'external
+ * forces' (eg: UI, incoming D-Bus messages, etc.) are supposed to have
+ * with actions.  'Internal' APIs (ie: ones meant only to be accessed by
+ * the action group implementation) are found on subclasses.  This is
+ * why you will find - for example - g_action_group_get_action_enabled()
+ * but not an equivalent <function>set()</function> call.
+ *
+ * Signals are emitted on the action group in response to state changes
+ * on individual actions.
+ *
+ * Implementations of #GActionGroup should provide implementations for
+ * the virtual functions g_action_group_list_actions() and
+ * g_action_group_query_action().  The other virtual functions should
+ * not be implemented - their "wrappers" are actually implemented with
+ * calls to g_action_group_query_action().
+ */
+
+
+/**
+ * SECTION:gactiongroupexporter
+ * @title: GActionGroup exporter
+ * @short_description: Export GActionGroups on D-Bus
+ * @see_also: #GActionGroup, #GDBusActionGroup
+ *
+ * These functions support exporting a #GActionGroup on D-Bus.
+ * The D-Bus interface that is used is a private implementation
+ * detail.
+ *
+ * To access an exported #GActionGroup remotely, use
+ * g_dbus_action_group_get() to obtain a #GDBusActionGroup.
+ */
+
+
+/**
+ * SECTION:gactionmap
+ * @title: GActionMap
+ * @short_description: Interface for action containers
+ *
+ * The GActionMap interface is implemented by #GActionGroup
+ * implementations that operate by containing a number of
+ * named #GAction instances, such as #GSimpleActionGroup.
+ *
+ * One useful application of this interface is to map the
+ * names of actions from various action groups to unique,
+ * prefixed names (e.g. by prepending "app." or "win.").
+ * This is the motivation for the 'Map' part of the interface
+ * name.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * SECTION:gappinfo
+ * @short_description: Application information and launch contexts
+ * @include: gio/gio.h
+ *
+ * #GAppInfo and #GAppLaunchContext are used for describing and launching
+ * applications installed on the system.
+ *
+ * As of GLib 2.20, URIs will always be converted to POSIX paths
+ * (using g_file_get_path()) when using g_app_info_launch() even if
+ * the application requested an URI and not a POSIX path. For example
+ * for an desktop-file based application with Exec key <literal>totem
+ * &percnt;U</literal> and a single URI,
+ * <literal>sftp://foo/file.avi</literal>, then
+ * <literal>/home/user/.gvfs/sftp on foo/file.avi</literal> 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
+ * <literal>mailto:</literal>, 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.
+ *
+ * Specifically for gvfs 2.26 and later, the POSIX URI will be mapped
+ * back to the GIO URI in the #GFile constructors (since gvfs
+ * implements the #GVfs extension point). As such, if the application
+ * needs to examine the URI, it needs to use g_file_get_uri() or
+ * similar on #GFile. In other words, an application cannot assume
+ * that the URI passed to e.g. g_file_new_for_commandline_arg() is
+ * equal to the result of g_file_get_uri(). The following snippet
+ * illustrates this:
+ *
+ * <programlisting>
+ * GFile *f;
+ * char *uri;
+ *
+ * file = g_file_new_for_commandline_arg (uri_from_commandline);
+ *
+ * uri = g_file_get_uri (file);
+ * strcmp (uri, uri_from_commandline) == 0; // FALSE
+ * g_free (uri);
+ *
+ * if (g_file_has_uri_scheme (file, "cdda"))
+ * {
+ * // do something special with uri
+ * }
+ * g_object_unref (file);
+ * </programlisting>
+ *
+ * This code will work when both <literal>cdda://sr0/Track
+ * 1.wav</literal> and <literal>/home/user/.gvfs/cdda on sr0/Track
+ * 1.wav</literal> is passed to the application. It should be noted
+ * that it's generally not safe for applications to rely on the format
+ * of a particular URIs. Different launcher applications (e.g. file
+ * managers) may have different ideas of what a given URI means.
+ */
+
+
+/**
+ * SECTION:gapplication
+ * @title: GApplication
+ * @short_description: Core application class
+ *
+ * A #GApplication is the foundation of an application, unique for a
+ * given application identifier.  The GApplication class wraps some
+ * low-level platform-specific services and is intended to act as the
+ * foundation for higher-level application classes such as
+ * #GtkApplication or #MxApplication.  In general, you should not use
+ * this class outside of a higher level framework.
+ *
+ * One of the core features that GApplication provides is process
+ * uniqueness, in the context of a "session".  The session concept is
+ * platform-dependent, but corresponds roughly to a graphical desktop
+ * login.  When your application is launched again, its arguments
+ * are passed through platform communication to the already running
+ * program. The already running instance of the program is called the
+ * <firstterm>primary instance</firstterm>. On Linux, the D-Bus session
+ * bus is used for communication.
+ *
+ * GApplication provides convenient life cycle management by maintaining
+ * a <firstterm>use count</firstterm> for the primary application instance.
+ * The use count can be changed using g_application_hold() and
+ * g_application_release(). If it drops to zero, the application exits.
+ * Higher-level classes such as #GtkApplication employ the use count to
+ * ensure that the application stays alive as long as it has any opened
+ * windows.
+ *
+ * Before using GApplication, you must choose an "application identifier".
+ * The expected form of an application identifier is very close to that of
+ * of a <ulink url="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-interface">DBus bus name</ulink>.
+ * Examples include: "com.example.MyApp", "org.example.internal-apps.Calculator".
+ * For details on valid application identifiers, see g_application_id_is_valid().
+ *
+ * On Linux, the application identifier is claimed as a well-known bus name
+ * on the user's session bus.  This means that the uniqueness of your
+ * application is scoped to the current session.  It also means that your
+ * application may provide additional services (through registration of other
+ * object paths) at that bus name.  The registration of these object paths
+ * should be done with the shared GDBus session bus.  Note that due to the
+ * internal architecture of GDBus, method calls can be dispatched at any time
+ * (even if a main loop is not running).  For this reason, you must ensure that
+ * any object paths that you wish to register are registered before #GApplication
+ * attempts to acquire the bus name of your application (which happens in
+ * g_application_register()).  Unfortunately, this means that you cannot use
+ * g_application_get_is_remote() to decide if you want to register object paths.
+ *
+ * GApplication also implements the #GActionGroup and #GActionMap
+ * interfaces and lets you easily export actions by adding them with
+ * g_action_map_add_action(). When invoking an action by calling
+ * g_action_group_activate_action() on the application, it is always
+ * invoked in the primary instance. The actions are also exported on
+ * the session bus, and GIO provides the #GDBusActionGroup wrapper to
+ * conveniently access them remotely. GIO provides a #GDBusMenuModel wrapper
+ * for remote access to exported #GMenuModels.
+ *
+ * There is a number of different entry points into a GApplication:
+ * <itemizedlist>
+ * <listitem>via 'Activate' (i.e. just starting the application)</listitem>
+ * <listitem>via 'Open' (i.e. opening some files)</listitem>
+ * <listitem>by handling a command-line</listitem>
+ * <listitem>via activating an action</listitem>
+ * </itemizedlist>
+ * The #GApplication::startup signal lets you handle the application
+ * initialization for all of these in a single place.
+ *
+ * Regardless of which of these entry points is used to start the application,
+ * GApplication passes some <firstterm id="platform-data">platform
+ * data</firstterm> from the launching instance to the primary instance,
+ * in the form of a #GVariant dictionary mapping strings to variants.
+ * To use platform data, override the @before_emit or @after_emit virtual
+ * functions in your #GApplication subclass. When dealing with
+ * #GApplicationCommandLine objects, the platform data is directly
+ * available via g_application_command_line_get_cwd(),
+ * g_application_command_line_get_environ() and
+ * g_application_command_line_get_platform_data().
+ *
+ * As the name indicates, the platform data may vary depending on the
+ * operating system, but it always includes the current directory (key
+ * "cwd"), and optionally the environment (ie the set of environment
+ * variables and their values) of the calling process (key "environ").
+ * The environment is only added to the platform data if the
+ * %G_APPLICATION_SEND_ENVIRONMENT flag is set. #GApplication subclasses
+ * can add their own platform data by overriding the @add_platform_data
+ * virtual function. For instance, #GtkApplication adds startup notification
+ * data in this way.
+ *
+ * To parse commandline arguments you may handle the
+ * #GApplication::command-line signal or override the local_command_line()
+ * vfunc, to parse them in either the primary instance or the local instance,
+ * respectively.
+ *
+ * <example id="gapplication-example-open"><title>Opening files with a GApplication</title>
+ * <programlisting>
+ * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-open.c">
+ * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
+ * </xi:include>
+ * </programlisting>
+ * </example>
+ *
+ * <example id="gapplication-example-actions"><title>A GApplication with actions</title>
+ * <programlisting>
+ * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-actions.c">
+ * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
+ * </xi:include>
+ * </programlisting>
+ * </example>
+ *
+ * <example id="gapplication-example-menu"><title>A GApplication with menus</title>
+ * <programlisting>
+ * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-menu.c">
+ * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
+ * </xi:include>
+ * </programlisting>
+ * </example>
+ */
+
+
+/**
+ * SECTION:gapplicationcommandline
+ * @title: GApplicationCommandLine
+ * @short_description: A command-line invocation of an application
+ * @see_also: #GApplication
+ *
+ * #GApplicationCommandLine represents a command-line invocation of
+ * an application.  It is created by #GApplication and emitted
+ * in the #GApplication::command-line signal and virtual function.
+ *
+ * The class contains the list of arguments that the program was invoked
+ * with.  It is also possible to query if the commandline invocation was
+ * local (ie: the current process is running in direct response to the
+ * invocation) or remote (ie: some other process forwarded the
+ * commandline to this process).
+ *
+ * The GApplicationCommandLine object can provide the @argc and @argv
+ * parameters for use with the #GOptionContext command-line parsing API,
+ * with the g_application_command_line_get_arguments() function. See
+ * <xref linkend="gapplication-example-cmdline3"/> for an example.
+ *
+ * The exit status of the originally-invoked process may be set and
+ * messages can be printed to stdout or stderr of that process.  The
+ * lifecycle of the originally-invoked process is tied to the lifecycle
+ * of this object (ie: the process exits when the last reference is
+ * dropped).
+ *
+ * The main use for #GApplicationCommandLine (and the
+ * #GApplication::command-line signal) is 'Emacs server' like use cases:
+ * You can set the <envar>EDITOR</envar> environment variable to have
+ * e.g. git use your favourite editor to edit commit messages, and if you
+ * already have an instance of the editor running, the editing will happen
+ * in the running instance, instead of opening a new one. An important
+ * aspect of this use case is that the process that gets started by git
+ * does not return until the editing is done.
+ *
+ * <example id="gapplication-example-cmdline"><title>Handling commandline arguments with GApplication</title>
+ * <para>
+ * A simple example where the commandline is completely handled
+ * in the #GApplication::command-line handler. The launching instance exits
+ * once the signal handler in the primary instance has returned, and the
+ * return value of the signal handler becomes the exit status of the launching
+ * instance.
+ * </para>
+ * <programlisting>
+ * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline.c">
+ * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
+ * </xi:include>
+ * </programlisting>
+ * </example>
+ *
+ * <example id="gapplication-example-cmdline2"><title>Split commandline handling</title>
+ * <para>
+ * An example of split commandline handling. Options that start with
+ * <literal>--local-</literal> are handled locally, all other options are
+ * passed to the #GApplication::command-line handler which runs in the primary
+ * instance.
+ * </para>
+ * <programlisting>
+ * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline2.c">
+ * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
+ * </xi:include>
+ * </programlisting>
+ * </example>
+ *
+ * <example id="gapplication-example-cmdline3"><title>Deferred commandline handling</title>
+ * <para>
+ * An example of deferred commandline handling. Here, the commandline is
+ * not completely handled before the #GApplication::command-line handler
+ * returns. Instead, we keep a reference to the GApplicationCommandLine
+ * object and handle it later(in this example, in an idle). Note that it
+ * is necessary to hold the application until you are done with the
+ * commandline.
+ * </para>
+ * <para>
+ * This example also shows how to use #GOptionContext for parsing the
+ * commandline arguments. Note that it is necessary to disable the
+ * built-in help-handling of #GOptionContext, since it calls exit()
+ * after printing help, which is not what you want to happen in
+ * the primary instance.
+ * </para>
+ * <programlisting>
+ * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline3.c">
+ * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
+ * </xi:include>
+ * </programlisting>
+ * </example>
+ */
+
+
+/**
+ * SECTION:gasyncinitable
+ * @short_description: Asynchronously failable object initialization interface
+ * @include: gio/gio.h
+ * @see_also: #GInitable
+ *
+ * This is the asynchronous version of #GInitable; it behaves the same
+ * in all ways except that initialization is asynchronous. For more details
+ * see the descriptions on #GInitable.
+ *
+ * A class may implement both the #GInitable and #GAsyncInitable interfaces.
+ *
+ * Users of objects implementing this are not intended to use the interface
+ * method directly; instead it will be used automatically in various ways.
+ * For C applications you generally just call g_async_initable_new_async()
+ * directly, or indirectly via a foo_thing_new_async() wrapper. This will call
+ * g_async_initable_init_async() under the cover, calling back with %NULL and
+ * a set %GError on failure.
+ *
+ * A typical implementation might look something like this:
+ *
+ * |[
+ * enum {
+ * NOT_INITIALIZED,
+ * INITIALIZING,
+ * INITIALIZED
+ * };
+ *
+ * static void
+ * _foo_ready_cb (Foo *self)
+ * {
+ * GList *l;
+ *
+ * self->priv->state = INITIALIZED;
+ *
+ * for (l = self->priv->init_results; l != NULL; l = l->next)
+ * {
+ * GSimpleAsyncResult *simple = l->data;
+ *
+ * if (!self->priv->success)
+ * g_simple_async_result_set_error (simple, ...);
+ *
+ * g_simple_async_result_complete (simple);
+ * g_object_unref (simple);
+ * }
+ *
+ * g_list_free (self->priv->init_results);
+ * self->priv->init_results = NULL;
+ * }
+ *
+ * static void
+ * foo_init_async (GAsyncInitable       *initable,
+ * int                   io_priority,
+ * GCancellable         *cancellable,
+ * GAsyncReadyCallback   callback,
+ * gpointer              user_data)
+ * {
+ * Foo *self = FOO (initable);
+ * GSimpleAsyncResult *simple;
+ *
+ * simple = g_simple_async_result_new (G_OBJECT (initable)
+ * callback,
+ * user_data,
+ * foo_init_async);
+ *
+ * switch (self->priv->state)
+ * {
+ * case NOT_INITIALIZED:
+ * _foo_get_ready (self);
+ * self->priv->init_results = g_list_append (self->priv->init_results,
+ * simple);
+ * self->priv->state = INITIALIZING;
+ * break;
+ * case INITIALIZING:
+ * self->priv->init_results = g_list_append (self->priv->init_results,
+ * simple);
+ * break;
+ * case INITIALIZED:
+ * if (!self->priv->success)
+ * g_simple_async_result_set_error (simple, ...);
+ *
+ * g_simple_async_result_complete_in_idle (simple);
+ * g_object_unref (simple);
+ * break;
+ * }
+ * }
+ *
+ * static gboolean
+ * foo_init_finish (GAsyncInitable       *initable,
+ * GAsyncResult         *result,
+ * GError              **error)
+ * {
+ * g_return_val_if_fail (g_simple_async_result_is_valid (result,
+ * G_OBJECT (initable), foo_init_async), FALSE);
+ *
+ * if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result),
+ * error))
+ * return FALSE;
+ *
+ * return TRUE;
+ * }
+ *
+ * static void
+ * foo_async_initable_iface_init (gpointer g_iface,
+ * gpointer data)
+ * {
+ * GAsyncInitableIface *iface = g_iface;
+ *
+ * iface->init_async = foo_init_async;
+ * iface->init_finish = foo_init_finish;
+ * }
+ * ]|
+ */
+
+
+/**
+ * SECTION:gasyncresult
+ * @short_description: Asynchronous Function Results
+ * @include: gio/gio.h
+ * @see_also: #GSimpleAsyncResult
+ *
+ * Provides a base class for implementing asynchronous function results.
+ *
+ * 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, passing the object the
+ * function was called for, the #GAsyncResult instance, and (optionally)
+ * an @error to grab any error conditions that may have occurred.
+ *
+ * The "_finish()" function for an operation takes the generic result
+ * (of type #GAsyncResult) and returns the specific result that the
+ * operation in question yields (e.g. a #GFileEnumerator 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. You can pass
+ * %NULL for the #GAsyncReadyCallback if you don't need to take any
+ * action at all after the operation completes. Applications may also
+ * take a reference to the #GAsyncResult and call "_finish()" later;
+ * however, the "_finish()" function may be called at most once.
+ *
+ * Example of a typical asynchronous operation flow:
+ * |[
+ * void _theoretical_frobnitz_async (Theoretical         *t,
+ * GCancellable        *c,
+ * GAsyncReadyCallback *cb,
+ * gpointer             u);
+ *
+ * gboolean _theoretical_frobnitz_finish (Theoretical   *t,
+ * GAsyncResult  *res,
+ * GError       **e);
+ *
+ * static void
+ * frobnitz_result_func (GObject      *source_object,
+ * GAsyncResult *res,
+ * gpointer      user_data)
+ * {
+ * gboolean success = FALSE;
+ *
+ * success = _theoretical_frobnitz_finish (source_object, res, NULL);
+ *
+ * if (success)
+ * g_printf ("Hurray!\n");
+ * else
+ * g_printf ("Uh oh!\n");
+ *
+ * /<!-- -->* ... *<!-- -->/
+ *
+ * }
+ *
+ * int main (int argc, void *argv[])
+ * {
+ * /<!-- -->* ... *<!-- -->/
+ *
+ * _theoretical_frobnitz_async (theoretical_data,
+ * NULL,
+ * frobnitz_result_func,
+ * NULL);
+ *
+ * /<!-- -->* ... *<!-- -->/
+ * }
+ * ]|
+ *
+ * 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 %G_IO_ERROR_CANCELLED error.
+ */
+
+
+/**
+ * SECTION:gbufferedinputstream
+ * @short_description: Buffered Input Stream
+ * @include: gio/gio.h
+ * @see_also: #GFilterInputStream, #GInputStream
+ *
+ * Buffered input stream implements #GFilterInputStream and provides
+ * for buffered reads.
+ *
+ * By default, #GBufferedInputStream's buffer size is set at 4 kilobytes.
+ *
+ * To create a buffered input stream, use g_buffered_input_stream_new(),
+ * or g_buffered_input_stream_new_sized() to specify the buffer's size at
+ * construction.
+ *
+ * To get the size of a buffer within a buffered input stream, use
+ * g_buffered_input_stream_get_buffer_size(). To change the size of a
+ * buffered input stream's buffer, use
+ * g_buffered_input_stream_set_buffer_size(). Note that the buffer's size
+ * cannot be reduced below the size of the data within the buffer.
+ */
+
+
+/**
+ * SECTION:gbufferedoutputstream
+ * @short_description: Buffered Output Stream
+ * @include: gio/gio.h
+ * @see_also: #GFilterOutputStream, #GOutputStream
+ *
+ * Buffered output stream implements #GFilterOutputStream and provides
+ * for buffered writes.
+ *
+ * By default, #GBufferedOutputStream's buffer size is set at 4 kilobytes.
+ *
+ * To create a buffered output stream, use g_buffered_output_stream_new(),
+ * or g_buffered_output_stream_new_sized() to specify the buffer's size
+ * at construction.
+ *
+ * To get the size of a buffer within a buffered input stream, use
+ * g_buffered_output_stream_get_buffer_size(). To change the size of a
+ * buffered output stream's buffer, use
+ * g_buffered_output_stream_set_buffer_size(). Note that the buffer's
+ * size cannot be reduced below the size of the data within the buffer.
+ */
+
+
+/**
+ * SECTION:gcancellable
+ * @short_description: Thread-safe Operation Cancellation Stack
+ * @include: gio/gio.h
+ *
+ * GCancellable is a thread-safe operation cancellation stack used
+ * throughout GIO to allow for cancellation of synchronous and
+ * asynchronous operations.
+ */
+
+
+/**
+ * SECTION:gcharsetconverter
+ * @short_description: Convert between charsets
+ * @include: gio/gio.h
+ *
+ * #GCharsetConverter is an implementation of #GConverter based on
+ * GIConv.
+ */
+
+
+/**
+ * SECTION:gcontenttype
+ * @short_description: Platform-specific content typing
+ * @include: gio/gio.h
+ *
+ * A content type is a platform specific string that defines the type
+ * of a file. On UNIX it is a <ulink url="http://www.wikipedia.org/wiki/Internet_media_type">mime type</ulink> like "text/plain" or "image/png".
+ * On Win32 it is an extension string like ".doc", ".txt" or a perceived
+ * string like "audio". Such strings can be looked up in the registry at
+ * HKEY_CLASSES_ROOT.
+ */
+
+
+/**
+ * SECTION:gconverter
+ * @short_description: Data conversion interface
+ * @include: gio/gio.h
+ * @see_also: #GInputStream, #GOutputStream
+ *
+ * #GConverter is implemented by objects that convert
+ * binary data in various ways. The conversion can be
+ * stateful and may fail at any place.
+ *
+ * Some example conversions are: character set conversion,
+ * compression, decompression and regular expression
+ * replace.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * SECTION:gconverterinputstream
+ * @short_description: Converter Input Stream
+ * @include: gio/gio.h
+ * @see_also: #GInputStream, #GConverter
+ *
+ * Converter input stream implements #GInputStream and allows
+ * conversion of data of various types during reading.
+ */
+
+
+/**
+ * SECTION:gconverteroutputstream
+ * @short_description: Converter Output Stream
+ * @include: gio/gio.h
+ * @see_also: #GOutputStream, #GConverter
+ *
+ * Converter output stream implements #GOutputStream and allows
+ * conversion of data of various types during reading.
+ */
+
+
+/**
+ * SECTION:gcredentials
+ * @short_description: An object containing credentials
+ * @include: gio/gio.h
+ *
+ * The #GCredentials type is a reference-counted wrapper for native
+ * credentials. This information is typically used for identifying,
+ * authenticating and authorizing other processes.
+ *
+ * Some operating systems supports looking up the credentials of the
+ * remote peer of a communication endpoint - see e.g.
+ * g_socket_get_credentials().
+ *
+ * Some operating systems supports securely sending and receiving
+ * credentials over a Unix Domain Socket, see
+ * #GUnixCredentialsMessage, g_unix_connection_send_credentials() and
+ * g_unix_connection_receive_credentials() for details.
+ *
+ * On Linux, the native credential type is a <type>struct ucred</type>
+ * - see the
+ * <citerefentry><refentrytitle>unix</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ * man page for details. This corresponds to
+ * %G_CREDENTIALS_TYPE_LINUX_UCRED.
+ *
+ * On FreeBSD, the native credential type is a <type>struct cmsgcred</type>.
+ * This corresponds to %G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED.
+ *
+ * On OpenBSD, the native credential type is a <type>struct sockpeercred</type>.
+ * This corresponds to %G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED.
+ */
+
+
+/**
+ * SECTION:gdatainputstream
+ * @short_description: Data Input Stream
+ * @include: gio/gio.h
+ * @see_also: #GInputStream
+ *
+ * Data input stream implements #GInputStream and includes functions for
+ * reading structured data directly from a binary input stream.
+ */
+
+
+/**
+ * SECTION:gdataoutputstream
+ * @short_description: Data Output Stream
+ * @include: gio/gio.h
+ * @see_also: #GOutputStream
+ *
+ * Data output stream implements #GOutputStream and includes functions for
+ * writing data directly to an output stream.
+ */
+
+
+/**
+ * SECTION:gdbusactiongroup
+ * @title: GDBusActionGroup
+ * @short_description: A D-Bus GActionGroup implementation
+ * @see_also: <link linkend="gio-GActionGroup-exporter">GActionGroup exporter</link>
+ *
+ * #GDBusActionGroup is an implementation of the #GActionGroup
+ * interface that can be used as a proxy for an action group
+ * that is exported over D-Bus with g_dbus_connection_export_action_group().
+ */
+
+
+/**
+ * SECTION:gdbusaddress
+ * @title: D-Bus Addresses
+ * @short_description: D-Bus connection endpoints
+ * @include: gio/gio.h
+ *
+ * Routines for working with D-Bus addresses. A D-Bus address is a string
+ * like "unix:tmpdir=/tmp/my-app-name". The exact format of addresses
+ * is explained in detail in the <link linkend="http://dbus.freedesktop.org/doc/dbus-specification.html&num;addresses">D-Bus specification</link>.
+ */
+
+
+/**
+ * SECTION:gdbusauthobserver
+ * @short_description: Object used for authenticating connections
+ * @include: gio/gio.h
+ *
+ * The #GDBusAuthObserver type provides a mechanism for participating
+ * in how a #GDBusServer (or a #GDBusConnection) authenticates remote
+ * peers. Simply instantiate a #GDBusAuthObserver and connect to the
+ * signals you are interested in. Note that new signals may be added
+ * in the future
+ *
+ * For example, if you only want to allow D-Bus connections from
+ * processes owned by the same uid as the server, you would use a
+ * signal handler like the following:
+ * <example id="auth-observer"><title>Controlling Authentication</title><programlisting>
+ * static gboolean
+ * on_authorize_authenticated_peer (GDBusAuthObserver *observer,
+ * GIOStream         *stream,
+ * GCredentials      *credentials,
+ * gpointer           user_data)
+ * {
+ * gboolean authorized;
+ *
+ * authorized = FALSE;
+ * if (credentials != NULL)
+ * {
+ * GCredentials *own_credentials;
+ * own_credentials = g_credentials_new ();
+ * if (g_credentials_is_same_user (credentials, own_credentials, NULL))
+ * authorized = TRUE;
+ * g_object_unref (own_credentials);
+ * }
+ *
+ * return authorized;
+ * }
+ * </programlisting></example>
+ */
+
+
+/**
+ * SECTION:gdbusconnection
+ * @short_description: D-Bus Connections
+ * @include: gio/gio.h
+ *
+ * The #GDBusConnection type is used for D-Bus connections to remote
+ * peers such as a message buses. It is a low-level API that offers a
+ * lot of flexibility. For instance, it lets you establish a connection
+ * over any transport that can by represented as an #GIOStream.
+ *
+ * This class is rarely used directly in D-Bus clients. If you are writing
+ * an D-Bus client, it is often easier to use the g_bus_own_name(),
+ * g_bus_watch_name() or g_dbus_proxy_new_for_bus() APIs.
+ *
+ * As an exception to the usual GLib rule that a particular object must not be
+ * used by two threads at the same time, #GDBusConnection's methods may be
+ * called from any thread<footnote>
+ * <para>
+ * This is so that g_bus_get() and g_bus_get_sync() can safely return the
+ * same #GDBusConnection when called from any thread.
+ * </para>
+ * </footnote>.
+ *
+ * Most of the ways to obtain a #GDBusConnection automatically initialize it
+ * (i.e. connect to D-Bus): for instance, g_dbus_connection_new() and
+ * g_bus_get(), and the synchronous versions of those methods, give you an
+ * initialized connection. Language bindings for GIO should use
+ * g_initable_new() or g_async_initable_new_async(), which also initialize the
+ * connection.
+ *
+ * If you construct an uninitialized #GDBusConnection, such as via
+ * g_object_new(), you must initialize it via g_initable_init() or
+ * g_async_initable_init_async() before using its methods or properties.
+ * Calling methods or accessing properties on a #GDBusConnection that has not
+ * completed initialization successfully is considered to be invalid, and leads
+ * to undefined behaviour. In particular, if initialization fails with a
+ * #GError, the only valid thing you can do with that #GDBusConnection is to
+ * free it with g_object_unref().
+ *
+ * <example id="gdbus-server"><title>D-Bus server example</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-server.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
+ *
+ * <example id="gdbus-subtree-server"><title>D-Bus subtree example</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-subtree.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
+ *
+ * <example id="gdbus-unix-fd-client"><title>D-Bus UNIX File Descriptor example</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-unix-fd-client.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
+ *
+ * <example id="gdbus-export"><title>Exporting a GObject</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-export.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
+ */
+
+
+/**
+ * SECTION:gdbuserror
+ * @title: GDBusError
+ * @short_description: Mapping D-Bus errors to and from GError
+ * @include: gio/gio.h
+ *
+ * All facilities that return errors from remote methods (such as
+ * g_dbus_connection_call_sync()) use #GError to represent both D-Bus
+ * errors (e.g. errors returned from the other peer) and locally
+ * in-process generated errors.
+ *
+ * To check if a returned #GError is an error from a remote peer, use
+ * g_dbus_error_is_remote_error(). To get the actual D-Bus error name,
+ * use g_dbus_error_get_remote_error(). Before presenting an error,
+ * always use g_dbus_error_strip_remote_error().
+ *
+ * In addition, facilities used to return errors to a remote peer also
+ * use #GError. See g_dbus_method_invocation_return_error() for
+ * discussion about how the D-Bus error name is set.
+ *
+ * Applications can associate a #GError error domain with a set of D-Bus errors in order to
+ * automatically map from D-Bus errors to #GError and back. This
+ * is typically done in the function returning the #GQuark for the
+ * error domain:
+ * <example id="error-registration"><title>Error Registration</title><programlisting>
+ * /<!-- -->* foo-bar-error.h: *<!-- -->/
+ *
+ * #define FOO_BAR_ERROR (foo_bar_error_quark ())
+ * GQuark foo_bar_error_quark (void);
+ *
+ * typedef enum
+ * {
+ * FOO_BAR_ERROR_FAILED,
+ * FOO_BAR_ERROR_ANOTHER_ERROR,
+ * FOO_BAR_ERROR_SOME_THIRD_ERROR,
+ * } FooBarError;
+ *
+ * /<!-- -->* foo-bar-error.c: *<!-- -->/
+ *
+ * static const GDBusErrorEntry foo_bar_error_entries[] =
+ * {
+ * {FOO_BAR_ERROR_FAILED,           "org.project.Foo.Bar.Error.Failed"},
+ * {FOO_BAR_ERROR_ANOTHER_ERROR,    "org.project.Foo.Bar.Error.AnotherError"},
+ * {FOO_BAR_ERROR_SOME_THIRD_ERROR, "org.project.Foo.Bar.Error.SomeThirdError"},
+ * };
+ *
+ * GQuark
+ * foo_bar_error_quark (void)
+ * {
+ * static volatile gsize quark_volatile = 0;
+ * g_dbus_error_register_error_domain ("foo-bar-error-quark",
+ * &quark_volatile,
+ * foo_bar_error_entries,
+ * G_N_ELEMENTS (foo_bar_error_entries));
+ * G_STATIC_ASSERT (G_N_ELEMENTS (foo_bar_error_entries) - 1 == FOO_BAR_ERROR_SOME_THIRD_ERROR);
+ * return (GQuark) quark_volatile;
+ * }
+ * </programlisting></example>
+ * With this setup, a D-Bus peer can transparently pass e.g. %FOO_BAR_ERROR_ANOTHER_ERROR and
+ * other peers will see the D-Bus error name <literal>org.project.Foo.Bar.Error.AnotherError</literal>.
+ * If the other peer is using GDBus, the peer will see also %FOO_BAR_ERROR_ANOTHER_ERROR instead
+ * of %G_IO_ERROR_DBUS_ERROR. Note that GDBus clients can still recover
+ * <literal>org.project.Foo.Bar.Error.AnotherError</literal> using g_dbus_error_get_remote_error().
+ *
+ * Note that errors in the %G_DBUS_ERROR error domain is intended only
+ * for returning errors from a remote message bus process. Errors
+ * generated locally in-process by e.g. #GDBusConnection is from the
+ * %G_IO_ERROR domain.
+ */
+
+
+/**
+ * SECTION:gdbusinterface
+ * @short_description: Base type for D-Bus interfaces
+ * @include: gio/gio.h
+ *
+ * The #GDBusInterface type is the base type for D-Bus interfaces both
+ * on the service side (see #GDBusInterfaceSkeleton) and client side
+ * (see #GDBusProxy).
+ */
+
+
+/**
+ * SECTION:gdbusinterfaceskeleton
+ * @short_description: Service-side D-Bus interface
+ * @include: gio/gio.h
+ *
+ * Abstract base class for D-Bus interfaces on the service side.
+ */
+
+
+/**
+ * SECTION:gdbusintrospection
+ * @title: D-Bus Introspection Data
+ * @short_description: Node and interface description data structures
+ * @include: gio/gio.h
+ *
+ * Various data structures and convenience routines to parse and
+ * generate D-Bus introspection XML. Introspection information is
+ * used when registering objects with g_dbus_connection_register_object().
+ *
+ * The format of D-Bus introspection XML is specified in the
+ * <ulink url="http://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format">D-Bus specification</ulink>.
+ */
+
+
+/**
+ * SECTION:gdbusmenumodel
+ * @title: GDBusMenuModel
+ * @short_description: A D-Bus GMenuModel implementation
+ * @see_also: <link linkend="gio-GMenuModel-exporter">GMenuModel Exporter</link>
+ *
+ * #GDBusMenuModel is an implementation of #GMenuModel that can be used
+ * as a proxy for a menu model that is exported over D-Bus with
+ * g_dbus_connection_export_menu_model().
+ */
+
+
+/**
+ * SECTION:gdbusmessage
+ * @short_description: D-Bus Message
+ * @include: gio/gio.h
+ *
+ * A type for representing D-Bus messages that can be sent or received
+ * on a #GDBusConnection.
+ */
+
+
+/**
+ * SECTION:gdbusmethodinvocation
+ * @short_description: Object for handling remote calls
+ * @include: gio/gio.h
+ *
+ * Instances of the #GDBusMethodInvocation class are used when
+ * handling D-Bus method calls. It provides a way to asynchronously
+ * return results and errors.
+ *
+ * The normal way to obtain a #GDBusMethodInvocation object is to receive
+ * it as an argument to the handle_method_call() function in a
+ * #GDBusInterfaceVTable that was passed to g_dbus_connection_register_object().
+ */
+
+
+/**
+ * SECTION:gdbusnameowning
+ * @title: Owning Bus Names
+ * @short_description: Simple API for owning bus names
+ * @include: gio/gio.h
+ *
+ * Convenience API for owning bus names.
+ *
+ * <example id="gdbus-owning-names"><title>Simple application owning a name</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-own-name.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
+ */
+
+
+/**
+ * SECTION:gdbusnamewatching
+ * @title: Watching Bus Names
+ * @short_description: Simple API for watching bus names
+ * @include: gio/gio.h
+ *
+ * Convenience API for watching bus names.
+ *
+ * <example id="gdbus-watching-names"><title>Simple application watching a name</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-watch-name.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
+ */
+
+
+/**
+ * SECTION:gdbusobject
+ * @short_description: Base type for D-Bus objects
+ * @include: gio/gio.h
+ *
+ * The #GDBusObject type is the base type for D-Bus objects on both
+ * the service side (see #GDBusObjectSkeleton) and the client side
+ * (see #GDBusObjectProxy). It is essentially just a container of
+ * interfaces.
+ */
+
+
+/**
+ * SECTION:gdbusobjectmanager
+ * @short_description: Base type for D-Bus object managers
+ * @include: gio/gio.h
+ *
+ * The #GDBusObjectManager type is the base type for service- and
+ * client-side implementations of the standardized <ulink
+ * url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager">org.freedesktop.DBus.ObjectManager</ulink>
+ * interface.
+ *
+ * See #GDBusObjectManagerClient for the client-side implementation
+ * and #GDBusObjectManagerServer for the service-side implementation.
+ */
+
+
+/**
+ * SECTION:gdbusobjectmanagerclient
+ * @short_description: Client-side object manager
+ * @include: gio/gio.h
+ *
+ * #GDBusObjectManagerClient is used to create, monitor and delete object
+ * proxies for remote objects exported by a #GDBusObjectManagerServer (or any
+ * code implementing the <ulink
+ * url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager">org.freedesktop.DBus.ObjectManager</ulink>
+ * interface).
+ *
+ * Once an instance of this type has been created, you can connect to
+ * the #GDBusObjectManager::object-added and
+ * #GDBusObjectManager::object-removed signals and inspect the
+ * #GDBusObjectProxy objects returned by
+ * g_dbus_object_manager_get_objects().
+ *
+ * If the name for a #GDBusObjectManagerClient is not owned by anyone at
+ * object construction time, the default behavior is to request the
+ * message bus to launch an owner for the name. This behavior can be
+ * disabled using the %G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START
+ * flag. It's also worth noting that this only works if the name of
+ * interest is activatable in the first place. E.g. in some cases it
+ * is not possible to launch an owner for the requested name. In this
+ * case, #GDBusObjectManagerClient object construction still succeeds but
+ * there will be no object proxies
+ * (e.g. g_dbus_object_manager_get_objects() returns the empty list) and
+ * the #GDBusObjectManagerClient:name-owner property is %NULL.
+ *
+ * The owner of the requested name can come and go (for example
+ * consider a system service being restarted) â€“ #GDBusObjectManagerClient
+ * handles this case too; simply connect to the #GObject::notify
+ * signal to watch for changes on the #GDBusObjectManagerClient:name-owner
+ * property. When the name owner vanishes, the behavior is that
+ * #GDBusObjectManagerClient:name-owner is set to %NULL (this includes
+ * emission of the #GObject::notify signal) and then
+ * #GDBusObjectManager::object-removed signals are synthesized
+ * for all currently existing object proxies. Since
+ * #GDBusObjectManagerClient:name-owner is %NULL when this happens, you can
+ * use this information to disambiguate a synthesized signal from a
+ * genuine signal caused by object removal on the remote
+ * #GDBusObjectManager. Similarly, when a new name owner appears,
+ * #GDBusObjectManager::object-added signals are synthesized
+ * while #GDBusObjectManagerClient:name-owner is still %NULL. Only when all
+ * object proxies have been added, the #GDBusObjectManagerClient:name-owner
+ * is set to the new name owner (this includes emission of the
+ * #GObject::notify signal).  Furthermore, you are guaranteed that
+ * #GDBusObjectManagerClient:name-owner will alternate between a name owner
+ * (e.g. <literal>:1.42</literal>) and %NULL even in the case where
+ * the name of interest is atomically replaced
+ *
+ * Ultimately, #GDBusObjectManagerClient is used to obtain #GDBusProxy
+ * instances. All signals (including the
+ * <literal>org.freedesktop.DBus.Properties::PropertiesChanged</literal>
+ * signal) delivered to #GDBusProxy instances are guaranteed to
+ * originate from the name owner. This guarantee along with the
+ * behavior described above, means that certain race conditions
+ * including the <emphasis><quote>half the proxy is from the old owner
+ * and the other half is from the new owner</quote></emphasis> problem
+ * cannot happen.
+ *
+ * To avoid having the application connect to signals on the returned
+ * #GDBusObjectProxy and #GDBusProxy objects, the
+ * #GDBusObject::interface-added,
+ * #GDBusObject::interface-removed,
+ * #GDBusProxy::g-properties-changed and
+ * #GDBusProxy::g-signal signals
+ * are also emitted on the #GDBusObjectManagerClient instance managing these
+ * objects. The signals emitted are
+ * #GDBusObjectManager::interface-added,
+ * #GDBusObjectManager::interface-removed,
+ * #GDBusObjectManagerClient::interface-proxy-properties-changed and
+ * #GDBusObjectManagerClient::interface-proxy-signal.
+ *
+ * Note that all callbacks and signals are emitted in the
+ * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
+ * that the #GDBusObjectManagerClient object was constructed
+ * in. Additionally, the #GDBusObjectProxy and #GDBusProxy objects
+ * originating from the #GDBusObjectManagerClient object will be created in
+ * the same context and, consequently, will deliver signals in the
+ * same main loop.
+ */
+
+
+/**
+ * SECTION:gdbusobjectmanagerserver
+ * @short_description: Service-side object manager
+ * @include: gio/gio.h
+ *
+ * #GDBusObjectManagerServer is used to export #GDBusObject instances using
+ * the standardized <ulink
+ * url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager">org.freedesktop.DBus.ObjectManager</ulink>
+ * interface. For example, remote D-Bus clients can get all objects
+ * and properties in a single call. Additionally, any change in the
+ * object hierarchy is broadcast using signals. This means that D-Bus
+ * clients can keep caches up to date by only listening to D-Bus
+ * signals.
+ *
+ * See #GDBusObjectManagerClient for the client-side code that is
+ * intended to be used with #GDBusObjectManagerServer or any D-Bus
+ * object implementing the org.freedesktop.DBus.ObjectManager
+ * interface.
+ */
+
+
+/**
+ * SECTION:gdbusobjectproxy
+ * @short_description: Client-side D-Bus object
+ * @include: gio/gio.h
+ *
+ * A #GDBusObjectProxy is an object used to represent a remote object
+ * with one or more D-Bus interfaces. Normally, you don't instantiate
+ * a #GDBusObjectProxy yourself - typically #GDBusObjectManagerClient
+ * is used to obtain it.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * SECTION:gdbusobjectskeleton
+ * @short_description: Service-side D-Bus object
+ * @include: gio/gio.h
+ *
+ * A #GDBusObjectSkeleton instance is essentially a group of D-Bus
+ * interfaces. The set of exported interfaces on the object may be
+ * dynamic and change at runtime.
+ *
+ * This type is intended to be used with #GDBusObjectManager.
+ */
+
+
+/**
+ * SECTION:gdbusproxy
+ * @short_description: Client-side D-Bus interface proxy
+ * @include: gio/gio.h
+ *
+ * #GDBusProxy is a base class used for proxies to access a D-Bus
+ * interface on a remote object. A #GDBusProxy can be constructed for
+ * both well-known and unique names.
+ *
+ * By default, #GDBusProxy will cache all properties (and listen to
+ * changes) of the remote object, and proxy all signals that gets
+ * emitted. This behaviour can be changed by passing suitable
+ * #GDBusProxyFlags when the proxy is created. If the proxy is for a
+ * well-known name, the property cache is flushed when the name owner
+ * vanishes and reloaded when a name owner appears.
+ *
+ * If a #GDBusProxy is used for a well-known name, the owner of the
+ * name is tracked and can be read from
+ * #GDBusProxy:g-name-owner. Connect to the #GObject::notify signal to
+ * get notified of changes. Additionally, only signals and property
+ * changes emitted from the current name owner are considered and
+ * calls are always sent to the current name owner. This avoids a
+ * number of race conditions when the name is lost by one owner and
+ * claimed by another. However, if no name owner currently exists,
+ * then calls will be sent to the well-known name which may result in
+ * the message bus launching an owner (unless
+ * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is set).
+ *
+ * The generic #GDBusProxy::g-properties-changed and
+ * #GDBusProxy::g-signal signals are not very convenient to work
+ * with. Therefore, the recommended way of working with proxies is to
+ * subclass #GDBusProxy, and have more natural properties and signals
+ * in your derived class. See <xref linkend="gdbus-example-gdbus-codegen"/>
+ * for how this can easily be done using the
+ * <command><link linkend="gdbus-codegen">gdbus-codegen</link></command>
+ * tool.
+ *
+ * A #GDBusProxy instance can be used from multiple threads but note
+ * that all signals (e.g. #GDBusProxy::g-signal, #GDBusProxy::g-properties-changed
+ * and #GObject::notify) are emitted in the
+ * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
+ * of the thread where the instance was constructed.
+ *
+ * <example id="gdbus-wellknown-proxy"><title>GDBusProxy for a well-known-name</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-watch-proxy.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
+ */
+
+
+/**
+ * SECTION:gdbusserver
+ * @short_description: Helper for accepting connections
+ * @include: gio/gio.h
+ *
+ * #GDBusServer is a helper for listening to and accepting D-Bus
+ * connections. This can be used to create a new D-Bus server, allowing two
+ * peers to use the D-Bus protocol for their own specialized communication.
+ * A server instance provided in this way will not perform message routing or
+ * implement the org.freedesktop.DBus interface.
+ *
+ * To just export an object on a well-known name on a message bus, such as the
+ * session or system bus, you should instead use g_bus_own_name().
+ *
+ * <example id="gdbus-peer-to-peer"><title>D-Bus peer-to-peer example</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-peer.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
+ */
+
+
+/**
+ * SECTION:gdbusutils
+ * @title: D-Bus Utilities
+ * @short_description: Various utilities related to D-Bus.
+ * @include: gio/gio.h
+ *
+ * Various utility routines related to D-Bus.
+ */
+
+
+/**
+ * SECTION:gdesktopappinfo
+ * @title: GDesktopAppInfo
+ * @short_description: Application information from desktop files
+ * @include: gio/gdesktopappinfo.h
+ *
+ * #GDesktopAppInfo is an implementation of #GAppInfo based on
+ * desktop files.
+ *
+ * Note that <filename>&lt;gio/gdesktopappinfo.h&gt;</filename> belongs to
+ * the UNIX-specific GIO interfaces, thus you have to use the
+ * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
+ */
+
+
+/**
+ * SECTION:gdrive
+ * @short_description: Drive management
+ * @include: gio/gio.h
+ *
+ * #GDrive - this represent a piece of hardware connected to the machine.
+ * It's generally only created for removable hardware or hardware with
+ * removable media.
+ *
+ * #GDrive is a container class for #GVolume objects that stem from
+ * the same piece of media. As such, #GDrive 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.
+ *
+ * If the #GDrive 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.
+ *
+ * #GDrive supports starting and stopping drives with authentication
+ * support for the former. This can be used to support a diverse set
+ * of use cases including connecting/disconnecting iSCSI devices,
+ * powering down external disk enclosures and starting/stopping
+ * multi-disk devices such as RAID devices. Note that the actual
+ * semantics and side-effects of starting/stopping a #GDrive may vary
+ * according to implementation. To choose the correct verbs in e.g. a
+ * file manager, use g_drive_get_start_stop_type().
+ *
+ * For porting from GnomeVFS note that there is no equivalent of
+ * #GDrive in that API.
+ */
+
+
+/**
+ * SECTION:gemblem
+ * @short_description: An object for emblems
+ * @include: gio/gio.h
+ * @see_also: #GIcon, #GEmblemedIcon, #GLoadableIcon, #GThemedIcon
+ *
+ * #GEmblem is an implementation of #GIcon that supports
+ * having an emblem, which is an icon with additional properties.
+ * It can than be added to a #GEmblemedIcon.
+ *
+ * Currently, only metainformation about the emblem's origin is
+ * supported. More may be added in the future.
+ */
+
+
+/**
+ * SECTION:gemblemedicon
+ * @short_description: Icon with emblems
+ * @include: gio/gio.h
+ * @see_also: #GIcon, #GLoadableIcon, #GThemedIcon, #GEmblem
+ *
+ * #GEmblemedIcon is an implementation of #GIcon that supports
+ * adding an emblem to an icon. Adding multiple emblems to an
+ * icon is ensured via g_emblemed_icon_add_emblem().
+ *
+ * Note that #GEmblemedIcon allows no control over the position
+ * of the emblems. See also #GEmblem for more information.
+ */
+
+
+/**
+ * SECTION:gfile
+ * @short_description: File and Directory Handling
+ * @include: gio/gio.h
+ * @see_also: #GFileInfo, #GFileEnumerator
+ *
+ * #GFile is a high level abstraction for manipulating files on a
+ * virtual file system. #GFile<!-- -->s are lightweight, immutable
+ * objects that do no I/O upon creation. It is necessary to understand that
+ * #GFile objects do not represent files, merely an identifier for a file. All
+ * file content I/O is implemented as streaming operations (see #GInputStream and
+ * #GOutputStream).
+ *
+ * To construct a #GFile, you can use:
+ * g_file_new_for_path() if you have a path.
+ * g_file_new_for_uri() if you have a URI.
+ * g_file_new_for_commandline_arg() for a command line argument.
+ * g_file_new_tmp() to create a temporary file from a template.
+ * g_file_parse_name() from a utf8 string gotten from g_file_get_parse_name().
+ *
+ * One way to think of a #GFile is as an abstraction of a pathname. For normal
+ * files the system pathname is what is stored internally, but as #GFile<!-- -->s
+ * are extensible it could also be something else that corresponds to a pathname
+ * in a userspace implementation of a filesystem.
+ *
+ * #GFile<!-- -->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
+ * g_file_get_parent() to get an identifier for the parent directory, g_file_get_child()
+ * to get a child within a directory, g_file_resolve_relative_path() to resolve a relative
+ * path between two #GFile<!-- -->s. There can be multiple hierarchies, so you may not
+ * end up at the same root if you repeatedly call g_file_get_parent() on two different
+ * files.
+ *
+ * All #GFile<!-- -->s have a basename (get with g_file_get_basename()). 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
+ * %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with g_file_query_info().
+ * 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.
+ *
+ * Using #GFile 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 #GFile<!-- -->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 #GFile<!-- -->s point to the same file you can query for the
+ * %G_FILE_ATTRIBUTE_ID_FILE attribute. Note that #GFile 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 #GFile<!-- -->s.
+ *
+ * Many #GFile 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.
+ *
+ * Some #GFile 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:
+ * g_file_mount_mountable() to mount a mountable file.
+ * g_file_unmount_mountable_with_operation() to unmount a mountable file.
+ * g_file_eject_mountable_with_operation() to eject a mountable file.
+ *
+ * <para id="gfile-etag"><indexterm><primary>entity tag</primary></indexterm>
+ * One notable feature of #GFile<!-- -->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
+ * <ulink url="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">specification</ulink>
+ * for HTTP Etag headers, which are a very similar concept.
+ * </para>
+ */
+
+
+/**
+ * SECTION:gfileattribute
+ * @short_description: Key-Value Paired File Attributes
+ * @include: gio/gio.h
+ * @see_also: #GFile, #GFileInfo
+ *
+ * File attributes in GIO consist of a list of key-value pairs.
+ *
+ * Keys are strings that contain a key namespace and a key name, separated
+ * by a colon, e.g. "namespace:keyname". Namespaces are included to sort
+ * key-value pairs by namespaces for relevance. Keys can be retrived
+ * using wildcards, e.g. "standard::*" will return all of the keys in the
+ * "standard" namespace.
+ *
+ * The list of possible attributes for a filesystem (pointed to by a #GFile) is
+ * available as a #GFileAttributeInfoList. This list is queryable by key names
+ * as indicated earlier.
+ *
+ * Information is stored within the list in #GFileAttributeInfo structures.
+ * The info structure can store different types, listed in the enum
+ * #GFileAttributeType. Upon creation of a #GFileAttributeInfo, the type will
+ * be set to %G_FILE_ATTRIBUTE_TYPE_INVALID.
+ *
+ * Classes that implement #GFileIface will create a #GFileAttributeInfoList and
+ * install default keys and values for their given file system, architecture,
+ * and other possible implementation details (e.g., on a UNIX system, a file
+ * attribute key will be registered for the user id for a given file).
+ *
+ * <para>
+ * <table>
+ * <title>GFileAttributes Default Namespaces</title>
+ * <tgroup cols='2' align='left'><thead>
+ * <row><entry>Namspace</entry><entry>Description</entry></row>
+ * </thead>
+ * <tbody>
+ * <row><entry>"standard"</entry><entry>The "Standard" namespace. General file
+ * information that any application may need should be put in this namespace.
+ * Examples include the file's name, type, and size.</entry></row>
+ * <row><entry>"etag"</entry><entry>The <link linkend="gfile-etag">"Entity Tag"</link>
+ * namespace. Currently, the only key in this namespace is "value", which contains
+ * the value of the current entity tag.</entry></row>
+ * <row><entry>"id"</entry><entry>The "Identification" namespace. This
+ * namespace is used by file managers and applications that list directories
+ * to check for loops and to uniquely identify files.</entry></row>
+ * <row><entry>"access"</entry><entry>The "Access" namespace. Used to check
+ * if a user has the proper privilidges to access files and perform
+ * file operations. Keys in this namespace are made to be generic
+ * and easily understood, e.g. the "can_read" key is %TRUE if
+ * the current user has permission to read the file. UNIX permissions and
+ * NTFS ACLs in Windows should be mapped to these values.</entry></row>
+ * <row><entry>"mountable"</entry><entry>The "Mountable" namespace. Includes
+ * simple boolean keys for checking if a file or path supports mount operations, e.g.
+ * mount, unmount, eject. These are used for files of type %G_FILE_TYPE_MOUNTABLE.</entry></row>
+ * <row><entry>"time"</entry><entry>The "Time" namespace. Includes file
+ * access, changed, created times. </entry></row>
+ * <row><entry>"unix"</entry><entry>The "Unix" namespace. Includes UNIX-specific
+ * information and may not be available for all files. Examples include
+ * the UNIX "UID", "GID", etc.</entry></row>
+ * <row><entry>"dos"</entry><entry>The "DOS" namespace. Includes DOS-specific
+ * information and may not be available for all files. Examples include
+ * "is_system" for checking if a file is marked as a system file, and "is_archive"
+ * for checking if a file is marked as an archive file.</entry></row>
+ * <row><entry>"owner"</entry><entry>The "Owner" namespace. Includes information
+ * about who owns a file. May not be available for all file systems. Examples include
+ * "user" for getting the user name of the file owner. This information is often mapped from
+ * some backend specific data such as a unix UID.</entry></row>
+ * <row><entry>"thumbnail"</entry><entry>The "Thumbnail" namespace. Includes
+ * information about file thumbnails and their location within the file system. Examples of
+ * keys in this namespace include "path" to get the location of a thumbnail, and "failed"
+ * to check if thumbnailing of the file failed.</entry></row>
+ * <row><entry>"filesystem"</entry><entry>The "Filesystem" namespace. Gets information
+ * about the file system where a file is located, such as its type, how much
+ * space is left available, and the overall size of the file system.</entry></row>
+ * <row><entry>"gvfs"</entry><entry>The "GVFS" namespace. Keys in this namespace
+ * contain information about the current GVFS backend in use. </entry></row>
+ * <row><entry>"xattr"</entry><entry>The "xattr" namespace. Gets information
+ * about extended user attributes. See attr(5). The "user." prefix of the
+ * extended user attribute name is stripped away when constructing keys in
+ * this namespace, e.g. "xattr::mime_type" for the extended attribute with
+ * the name "user.mime_type". Note that this information is only available
+ * if GLib has been built with extended attribute support.</entry></row>
+ * <row><entry>"xattr-sys"</entry><entry>The "xattr-sys" namespace.
+ * Gets information about extended attributes which are not user-specific.
+ * See attr(5). Note that this information is only available if GLib
+ * has been built with extended attribute support.</entry></row>
+ * <row><entry>"selinux"</entry><entry>The "SELinux" namespace. Includes
+ * information about the SELinux context of files. Note that this information
+ * is only available if GLib has been built with SELinux support.</entry></row>
+ * </tbody>
+ * </tgroup>
+ * </table>
+ * </para>
+ *
+ * Please note that these are not all of the possible namespaces.
+ * More namespaces can be added from GIO modules or by individual applications.
+ * For more information about writing GIO modules, see #GIOModule.
+ *
+ * <!-- TODO: Implementation note about using extended attributes on supported
+ * file systems -->
+ *
+ * <para><table>
+ * <title>GFileAttributes Built-in Keys and Value Types</title>
+ * <tgroup cols='3' align='left'><thead>
+ * <row><entry>Enum Value</entry><entry>Namespace:Key</entry><entry>Value Type</entry></row>
+ * </thead><tbody>
+ * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_TYPE</entry><entry>standard::type</entry><entry>uint32 (#GFileType)</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN</entry><entry>standard::is-hidden</entry><entry>boolean</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP</entry><entry>standard::is-backup</entry><entry>boolean</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK</entry><entry>standard::is-symlink</entry><entry>boolean</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL</entry><entry>standard::is-virtual</entry><entry>boolean</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_NAME</entry><entry>standard::name</entry><entry>byte string</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</entry><entry>standard::display-name</entry><entry>string</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME</entry><entry>standard::edit-name</entry><entry>string</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_ICON</entry><entry>standard::icon</entry><entry>object (#GIcon)</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE</entry><entry>standard::content-type</entry><entry>string</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE</entry><entry>standard::fast-content-type</entry><entry>string</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SIZE</entry><entry>standard::size</entry><entry>uint64</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE</entry><entry>standard::allocated-size</entry><entry>uint64</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET</entry><entry>standard::symlink-target</entry><entry>byte string</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_TARGET_URI</entry><entry>standard::target-uri</entry><entry>string</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER</entry><entry>standard::sort-order</entry><entry>int32</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_ETAG_VALUE</entry><entry>etag::value</entry><entry>string</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_ID_FILE</entry><entry>id::file</entry><entry>string</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_ID_FILESYSTEM</entry><entry>id::filesystem</entry><entry>string</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_READ</entry><entry>access::can-read</entry><entry>boolean</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE</entry><entry>access::can-write</entry><entry>boolean</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE</entry><entry>access::can-execute</entry><entry>boolean</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE</entry><entry>access::can-delete</entry><entry>boolean</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH</entry><entry>access::can-trash</entry><entry>boolean</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME</entry><entry>access::can-rename</entry><entry>boolean</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT</entry><entry>mountable::can-mount</entry><entry>boolean</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT</entry><entry>mountable::can-unmount</entry><entry>boolean</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT</entry><entry>mountable::can-eject</entry><entry>boolean</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE</entry><entry>mountable::unix-device</entry><entry>uint32</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE</entry><entry>mountable::unix-device-file</entry><entry>string</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI</entry><entry>mountable::hal-udi</entry><entry>string</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_TIME_MODIFIED</entry><entry>time::modified</entry><entry>uint64</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC</entry><entry>time::modified-usec</entry><entry>uint32</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_TIME_ACCESS</entry><entry>time::access</entry><entry>uint64</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_TIME_ACCESS_USEC</entry><entry>time::access-usec</entry><entry>uint32</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_TIME_CHANGED</entry><entry>time::changed</entry><entry>uint64</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_TIME_CHANGED_USEC</entry><entry>time::changed-usec</entry><entry>uint32</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_TIME_CREATED</entry><entry>time::created</entry><entry>uint64</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_TIME_CREATED_USEC</entry><entry>time::created-usec</entry><entry>uint32</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_UNIX_DEVICE</entry><entry>unix::device</entry><entry>uint32</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_UNIX_INODE</entry><entry>unix::inode</entry><entry>uint64</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_UNIX_MODE</entry><entry>unix::mode</entry><entry>uint32</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_UNIX_NLINK</entry><entry>unix::nlink</entry><entry>uint32</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_UNIX_UID</entry><entry>unix::uid</entry><entry>uint32</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_UNIX_GID</entry><entry>unix::gid</entry><entry>uint32</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_UNIX_RDEV</entry><entry>unix::rdev</entry><entry>uint32</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE</entry><entry>unix::block-size</entry><entry>uint32</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_UNIX_BLOCKS</entry><entry>unix::blocks</entry><entry>uint64</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT</entry><entry>unix::is-mountpoint</entry><entry>boolean</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE</entry><entry>dos::is-archive</entry><entry>boolean</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_DOS_IS_SYSTEM</entry><entry>dos::is-system</entry><entry>boolean</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_OWNER_USER</entry><entry>owner::user</entry><entry>string</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_OWNER_USER_REAL</entry><entry>owner::user-real</entry><entry>string</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_OWNER_GROUP</entry><entry>owner::group</entry><entry>string</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_THUMBNAIL_PATH</entry><entry>thumbnail::path</entry><entry>bytestring</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_THUMBNAILING_FAILED</entry><entry>thumbnail::failed</entry><entry>boolean</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_PREVIEW_ICON</entry><entry>preview::icon</entry><entry>object (#GIcon)</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_SIZE</entry><entry>filesystem::size</entry><entry>uint64</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_FREE</entry><entry>filesystem::free</entry><entry>uint64</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_USED</entry><entry>filesystem::used</entry><entry>uint64</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_TYPE</entry><entry>filesystem::type</entry><entry>string</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_READONLY</entry><entry>filesystem::readonly</entry><entry>boolean</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_GVFS_BACKEND</entry><entry>gvfs::backend</entry><entry>string</entry></row>
+ * <row><entry>%G_FILE_ATTRIBUTE_SELINUX_CONTEXT</entry><entry>selinux::context</entry><entry>string</entry></row>
+ * </tbody></tgroup></table></para>
+ *
+ * Note that there are no predefined keys in the "xattr" and "xattr-sys"
+ * namespaces. Keys for the "xattr" namespace are constructed by stripping
+ * away the "user." prefix from the extended user attribute, and prepending
+ * "xattr::". Keys for the "xattr-sys" namespace are constructed by
+ * concatenating "xattr-sys::" with the extended attribute name. All extended
+ * attribute values are returned as hex-encoded strings in which bytes outside
+ * the ASCII range are encoded as hexadecimal escape sequences of the form
+ * \x<replaceable>nn</replaceable>.
+ */
+
+
+/**
+ * SECTION:gfiledescriptorbased
+ * @short_description: Interface for file descriptor based IO
+ * @include: gio/gfiledescriptorbased.h
+ * @see_also: #GInputStream, #GOutputStream
+ *
+ * #GFileDescriptorBased is implemented by streams (implementations of
+ * #GInputStream or #GOutputStream) that are based on file descriptors.
+ *
+ * Note that <filename>&lt;gio/gfiledescriptorbased.h&gt;</filename> belongs to
+ * the UNIX-specific GIO interfaces, thus you have to use the
+ * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * SECTION:gfileenumerator
+ * @short_description: Enumerated Files Routines
+ * @include: gio/gio.h
+ *
+ * #GFileEnumerator allows you to operate on a set of #GFile<!-- -->s,
+ * returning a #GFileInfo structure for each file enumerated (e.g.
+ * g_file_enumerate_children() will return a #GFileEnumerator for each
+ * of the children within a directory).
+ *
+ * To get the next file's information from a #GFileEnumerator, use
+ * g_file_enumerator_next_file() or its asynchronous version,
+ * g_file_enumerator_next_files_async(). Note that the asynchronous
+ * version will return a list of #GFileInfo<!---->s, whereas the
+ * synchronous will only return the next file in the enumerator.
+ *
+ * To close a #GFileEnumerator, use g_file_enumerator_close(), or
+ * its asynchronous version, g_file_enumerator_close_async(). Once
+ * a #GFileEnumerator is closed, no further actions may be performed
+ * on it, and it should be freed with g_object_unref().
+ */
+
+
+/**
+ * SECTION:gfileicon
+ * @short_description: Icons pointing to an image file
+ * @include: gio/gio.h
+ * @see_also: #GIcon, #GLoadableIcon
+ *
+ * #GFileIcon specifies an icon by pointing to an image file
+ * to be used as icon.
+ */
+
+
+/**
+ * SECTION:gfileinfo
+ * @short_description: File Information and Attributes
+ * @include: gio/gio.h
+ * @see_also: #GFile, <link linkend="gio-GFileAttribute">GFileAttribute</link>
+ *
+ * Functionality for manipulating basic metadata for files. #GFileInfo
+ * implements methods for getting information that all files should
+ * contain, and allows for manipulation of extended attributes.
+ *
+ * See <link linkend="gio-GFileAttribute">GFileAttribute</link> for more
+ * information on how GIO handles file attributes.
+ *
+ * To obtain a #GFileInfo for a #GFile, use g_file_query_info() (or its
+ * async variant). To obtain a #GFileInfo for a file input or output
+ * stream, use g_file_input_stream_query_info() or
+ * g_file_output_stream_query_info() (or their async variants).
+ *
+ * To change the actual attributes of a file, you should then set the
+ * attribute in the #GFileInfo and call g_file_set_attributes_from_info()
+ * or g_file_set_attributes_async() on a GFile.
+ *
+ * However, not all attributes can be changed in the file. For instance,
+ * the actual size of a file cannot be changed via g_file_info_set_size().
+ * You may call g_file_query_settable_attributes() and
+ * g_file_query_writable_namespaces() to discover the settable attributes
+ * of a particular file at runtime.
+ *
+ * #GFileAttributeMatcher allows for searching through a #GFileInfo for
+ * attributes.
+ */
+
+
+/**
+ * SECTION:gfileinputstream
+ * @short_description: File input streaming operations
+ * @include: gio/gio.h
+ * @see_also: #GInputStream, #GDataInputStream, #GSeekable
+ *
+ * GFileInputStream provides input streams that take their
+ * content from a file.
+ *
+ * GFileInputStream implements #GSeekable, which allows the input
+ * stream to jump to arbitrary positions in the file, provided the
+ * filesystem of the file allows it. To find the position of a file
+ * input stream, use g_seekable_tell(). To find out if a file input
+ * stream supports seeking, use g_seekable_can_seek().
+ * To position a file input stream, use g_seekable_seek().
+ */
+
+
+/**
+ * SECTION:gfileiostream
+ * @short_description: File read and write streaming operations
+ * @include: gio/gio.h
+ * @see_also: #GIOStream, #GFileInputStream, #GFileOutputStream, #GSeekable
+ *
+ * GFileIOStream provides io streams that both read and write to the same
+ * file handle.
+ *
+ * GFileIOStream implements #GSeekable, which allows the io
+ * stream to jump to arbitrary positions in the file and to truncate
+ * the file, provided the filesystem of the file supports these
+ * operations.
+ *
+ * To find the position of a file io stream, use
+ * g_seekable_tell().
+ *
+ * To find out if a file io stream supports seeking, use g_seekable_can_seek().
+ * To position a file io stream, use g_seekable_seek().
+ * To find out if a file io stream supports truncating, use
+ * g_seekable_can_truncate(). To truncate a file io
+ * stream, use g_seekable_truncate().
+ *
+ * The default implementation of all the #GFileIOStream operations
+ * and the implementation of #GSeekable just call into the same operations
+ * on the output stream.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * SECTION:gfilemonitor
+ * @short_description: File Monitor
+ * @include: gio/gio.h
+ *
+ * Monitors a file or directory for changes.
+ *
+ * To obtain a #GFileMonitor for a file or directory, use
+ * g_file_monitor(), g_file_monitor_file(), or
+ * g_file_monitor_directory().
+ *
+ * To get informed about changes to the file or directory you are
+ * monitoring, connect to the #GFileMonitor::changed signal. The
+ * signal will be emitted in the <link
+ * linkend="g-main-context-push-thread-default">thread-default main
+ * context</link> of the thread that the monitor was created in
+ * (though if the global default main context is blocked, this may
+ * cause notifications to be blocked even if the thread-default
+ * context is still running).
+ */
+
+
+/**
+ * SECTION:gfilenamecompleter
+ * @short_description: Filename Completer
+ * @include: gio/gio.h
+ *
+ * Completes partial file and directory names given a partial string by
+ * looking in the file system for clues. Can return a list of possible
+ * completion strings for widget implementations.
+ */
+
+
+/**
+ * SECTION:gfileoutputstream
+ * @short_description: File output streaming operations
+ * @include: gio/gio.h
+ * @see_also: #GOutputStream, #GDataOutputStream, #GSeekable
+ *
+ * GFileOutputStream provides output streams that write their
+ * content to a file.
+ *
+ * GFileOutputStream implements #GSeekable, 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.
+ *
+ * To find the position of a file output stream, use g_seekable_tell().
+ * To find out if a file output stream supports seeking, use
+ * g_seekable_can_seek().To position a file output stream, use
+ * g_seekable_seek(). To find out if a file output stream supports
+ * truncating, use g_seekable_can_truncate(). To truncate a file output
+ * stream, use g_seekable_truncate().
+ */
+
+
+/**
+ * SECTION:gfilterinputstream
+ * @short_description: Filter Input Stream
+ * @include: gio/gio.h
+ *
+ * Base class for input stream implementations that perform some
+ * kind of filtering operation on a base stream. Typical examples
+ * of filtering operations are character set conversion, compression
+ * and byte order flipping.
+ */
+
+
+/**
+ * SECTION:gfilteroutputstream
+ * @short_description: Filter Output Stream
+ * @include: gio/gio.h
+ *
+ * Base class for output stream implementations that perform some
+ * kind of filtering operation on a base stream. Typical examples
+ * of filtering operations are character set conversion, compression
+ * and byte order flipping.
+ */
+
+
+/**
+ * SECTION:gicon
+ * @short_description: Interface for icons
+ * @include: gio/gio.h
+ *
+ * #GIcon 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.
+ *
+ * #GIcon does not provide the actual pixmap for the icon as this is out
+ * of GIO's scope, however implementations of #GIcon may contain the name
+ * of an icon (see #GThemedIcon), or the path to an icon (see #GLoadableIcon).
+ *
+ * To obtain a hash of a #GIcon, see g_icon_hash().
+ *
+ * To check if two #GIcons are equal, see g_icon_equal().
+ *
+ * For serializing a #GIcon, use g_icon_to_string() and
+ * g_icon_new_for_string().
+ *
+ * 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 g_icon_new_for_string().
+ */
+
+
+/**
+ * SECTION:ginetaddress
+ * @short_description: An IPv4/IPv6 address
+ *
+ * #GInetAddress represents an IPv4 or IPv6 internet address. Use
+ * g_resolver_lookup_by_name() or g_resolver_lookup_by_name_async() to
+ * look up the #GInetAddress for a hostname. Use
+ * g_resolver_lookup_by_address() or
+ * g_resolver_lookup_by_address_async() to look up the hostname for a
+ * #GInetAddress.
+ *
+ * To actually connect to a remote host, you will need a
+ * #GInetSocketAddress (which includes a #GInetAddress as well as a
+ * port number).
+ */
+
+
+/**
+ * SECTION:ginetaddressmask
+ * @short_description: An IPv4/IPv6 address mask
+ *
+ * #GInetAddressMask represents a range of IPv4 or IPv6 addresses
+ * described by a base address and a length indicating how many bits
+ * of the base address are relevant for matching purposes. These are
+ * often given in string form. Eg, "10.0.0.0/8", or "fe80::/10".
+ */
+
+
+/**
+ * SECTION:ginetsocketaddress
+ * @short_description: Internet GSocketAddress
+ *
+ * An IPv4 or IPv6 socket address; that is, the combination of a
+ * #GInetAddress and a port number.
+ */
+
+
+/**
+ * SECTION:ginitable
+ * @short_description: Failable object initialization interface
+ * @include: gio/gio.h
+ * @see_also: #GAsyncInitable
+ *
+ * #GInitable is implemented by objects that can fail during
+ * initialization. If an object implements this interface then
+ * it must be initialized as the first thing after construction,
+ * either via g_initable_init() or g_async_initable_init_async()
+ * (the latter is only available if it also implements #GAsyncInitable).
+ *
+ * If the object is not initialized, or initialization returns with an
+ * error, then all operations on the object except g_object_ref() and
+ * g_object_unref() are considered to be invalid, and have undefined
+ * behaviour. They will often fail with g_critical() or g_warning(), but
+ * this must not be relied on.
+ *
+ * Users of objects implementing this are not intended to use
+ * the interface method directly, instead it will be used automatically
+ * in various ways. For C applications you generally just call
+ * g_initable_new() directly, or indirectly via a foo_thing_new() wrapper.
+ * This will call g_initable_init() under the cover, returning %NULL and
+ * setting a #GError on failure (at which point the instance is
+ * unreferenced).
+ *
+ * For bindings in languages where the native constructor supports
+ * exceptions the binding could check for objects implemention %GInitable
+ * during normal construction and automatically initialize them, throwing
+ * an exception on failure.
+ */
+
+
+/**
+ * SECTION:ginputstream
+ * @short_description: Base class for implementing streaming input
+ * @include: gio/gio.h
+ *
+ * GInputStream has functions to read from a stream (g_input_stream_read()),
+ * to close a stream (g_input_stream_close()) and to skip some content
+ * (g_input_stream_skip()).
+ *
+ * To copy the content of an input stream to an output stream without
+ * manually handling the reads and writes, use g_output_stream_splice().
+ *
+ * All of these functions have async variants too.
+ */
+
+
+/**
+ * SECTION:gioerror
+ * @short_description: Error helper functions
+ * @include: gio/gio.h
+ *
+ * Contains helper functions for reporting errors to the user.
+ */
+
+
+/**
+ * SECTION:giomodule
+ * @short_description: Loadable GIO Modules
+ * @include: gio/gio.h
+ *
+ * Provides an interface and default functions for loading and unloading
+ * modules. This is used internally to make GIO extensible, but can also
+ * be used by others to implement module loading.
+ */
+
+
+/**
+ * SECTION:gioscheduler
+ * @short_description: I/O Scheduler
+ * @include: gio/gio.h
+ *
+ * Schedules asynchronous I/O operations. #GIOScheduler integrates
+ * into the main event loop (#GMainLoop) and uses threads.
+ *
+ * <para id="io-priority"><indexterm><primary>I/O priority</primary></indexterm>
+ * Each I/O operation has a priority, and the scheduler uses the priorities
+ * to determine the order in which operations are executed. They are
+ * <emphasis>not</emphasis> used to determine system-wide I/O scheduling.
+ * Priorities are integers, with lower numbers indicating higher priority.
+ * It is recommended to choose priorities between %G_PRIORITY_LOW and
+ * %G_PRIORITY_HIGH, with %G_PRIORITY_DEFAULT as a default.
+ * </para>
+ */
+
+
+/**
+ * SECTION:giostream
+ * @short_description: Base class for implementing read/write streams
+ * @include: gio/gio.h
+ * @see_also: #GInputStream, #GOutputStream
+ *
+ * GIOStream represents an object that has both read and write streams.
+ * Generally the two streams acts as separate input and output streams,
+ * but they share some common resources and state. For instance, for
+ * seekable streams they may use the same position in both streams.
+ *
+ * Examples of #GIOStream objects are #GSocketConnection which represents
+ * a two-way network connection, and #GFileIOStream which represent a
+ * file handle opened in read-write mode.
+ *
+ * To do the actual reading and writing you need to get the substreams
+ * with g_io_stream_get_input_stream() and g_io_stream_get_output_stream().
+ *
+ * The #GIOStream object owns the input and the output streams, not the other
+ * way around, so keeping the substreams alive will not keep the #GIOStream
+ * object alive. If the #GIOStream object is freed it will be closed, thus
+ * closing the substream, so even if the substreams stay alive they will
+ * always just return a %G_IO_ERROR_CLOSED for all operations.
+ *
+ * To close a stream use g_io_stream_close() which will close the common
+ * stream object and also the individual substreams. You can also close
+ * the substreams themselves. In most cases this only marks the
+ * substream as closed, so further I/O on it fails. However, some streams
+ * may support "half-closed" states where one direction of the stream
+ * is actually shut down.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * SECTION:gloadableicon
+ * @short_description: Loadable Icons
+ * @include: gio/gio.h
+ * @see_also: #GIcon, #GThemedIcon
+ *
+ * Extends the #GIcon interface and adds the ability to
+ * load icons from streams.
+ */
+
+
+/**
+ * SECTION:gmemoryinputstream
+ * @short_description: Streaming input operations on memory chunks
+ * @include: gio/gio.h
+ * @see_also: #GMemoryOutputStream
+ *
+ * #GMemoryInputStream is a class for using arbitrary
+ * memory chunks as input for GIO streaming input operations.
+ */
+
+
+/**
+ * SECTION:gmemoryoutputstream
+ * @short_description: Streaming output operations on memory chunks
+ * @include: gio/gio.h
+ * @see_also: #GMemoryInputStream
+ *
+ * #GMemoryOutputStream is a class for using arbitrary
+ * memory chunks as output for GIO streaming output operations.
+ */
+
+
+/**
+ * SECTION:gmenu
+ * @title: GMenu
+ * @short_description: A simple implementation of GMenuModel
+ *
+ * #GMenu is a simple implementation of #GMenuModel.
+ * You populate a #GMenu by adding #GMenuItem instances to it.
+ *
+ * There are some convenience functions to allow you to directly
+ * add items (avoiding #GMenuItem) for the common cases. To add
+ * a regular item, use g_menu_insert(). To add a section, use
+ * g_menu_insert_section(). To add a submenu, use
+ * g_menu_insert_submenu().
+ */
+
+
+/**
+ * SECTION:gmenuexporter
+ * @title: GMenuModel exporter
+ * @short_description: Export GMenuModels on D-Bus
+ * @see_also: #GMenuModel, #GDBusMenuModel
+ *
+ * These functions support exporting a #GMenuModel on D-Bus.
+ * The D-Bus interface that is used is a private implementation
+ * detail.
+ *
+ * To access an exported #GMenuModel remotely, use
+ * g_dbus_menu_model_get() to obtain a #GDBusMenuModel.
+ */
+
+
+/**
+ * SECTION:gmenumodel
+ * @title: GMenuModel
+ * @short_description: An abstract class representing the contents of a menu
+ * @see_also: #GActionGroup
+ *
+ * #GMenuModel represents the contents of a menu -- an ordered list of
+ * menu items. The items are associated with actions, which can be
+ * activated through them. Items can be grouped in sections, and may
+ * have submenus associated with them. Both items and sections usually
+ * have some representation data, such as labels or icons. The type of
+ * the associated action (ie whether it is stateful, and what kind of
+ * state it has) can influence the representation of the item.
+ *
+ * The conceptual model of menus in #GMenuModel is hierarchical:
+ * sections and submenus are again represented by #GMenuModels.
+ * Menus themselves do not define their own roles. Rather, the role
+ * of a particular #GMenuModel is defined by the item that references
+ * it (or, in the case of the 'root' menu, is defined by the context
+ * in which it is used).
+ *
+ * As an example, consider the visible portions of the menu in
+ * <xref linkend="menu-example"/>.
+ *
+ * <figure id="menu-example">
+ * <title>An example menu</title>
+ * <graphic fileref="menu-example.png" format="PNG"></graphic>
+ * </figure>
+ *
+ * There are 8 "menus" visible in the screenshot: one menubar, two
+ * submenus and 5 sections:
+ * <itemizedlist>
+ * <listitem>the toplevel menubar (containing 4 items)</listitem>
+ * <listitem>the View submenu (containing 3 sections)</listitem>
+ * <listitem>the first section of the View submenu (containing 2 items)</listitem>
+ * <listitem>the second section of the View submenu (containing 1 item)</listitem>
+ * <listitem>the final section of the View submenu (containing 1 item)</listitem>
+ * <listitem>the Highlight Mode submenu (containing 2 sections)</listitem>
+ * <listitem>the Sources section (containing 2 items)</listitem>
+ * <listitem>the Markup section (containing 2 items)</listitem>
+ * </itemizedlist>
+ *
+ * <xref linkend="menu-model"/> illustrates the conceptual connection between
+ * these 8 menus. Each large block in the figure represents a menu and the
+ * smaller blocks within the large block represent items in that menu. Some
+ * items contain references to other menus.
+ *
+ * <figure id="menu-model">
+ * <title>A menu model</title>
+ * <graphic fileref="menu-model.png" format="PNG"></graphic>
+ * </figure>
+ *
+ * Notice that the separators visible in <xref linkend="menu-example"/>
+ * appear nowhere in <xref linkend="menu-model"/>. This is because
+ * separators are not explicitly represented in the menu model. Instead,
+ * a separator is inserted between any two non-empty sections of a menu.
+ * Section items can have labels just like any other item. In that case,
+ * a display system may show a section header instead of a separator.
+ *
+ * The motivation for this abstract model of application controls is
+ * that modern user interfaces tend to make these controls available
+ * outside the application. Examples include global menus, jumplists,
+ * dash boards, etc. To support such uses, it is necessary to 'export'
+ * information about actions and their representation in menus, which
+ * is exactly what the
+ * <link linkend="gio-GActionGroup-exporter">GActionGroup exporter</link>
+ * and the
+ * <link linkend="gio-GMenuModel-exporter">GMenuModel exporter</link>
+ * do for #GActionGroup and #GMenuModel. The client-side counterparts
+ * to make use of the exported information are #GDBusActionGroup and
+ * #GDBusMenuModel.
+ *
+ * The API of #GMenuModel is very generic, with iterators for the
+ * attributes and links of an item, see g_menu_model_iterate_item_attributes()
+ * and g_menu_model_iterate_item_links(). The 'standard' attributes and
+ * link types have predefined names: %G_MENU_ATTRIBUTE_LABEL,
+ * %G_MENU_ATTRIBUTE_ACTION, %G_MENU_ATTRIBUTE_TARGET, %G_MENU_LINK_SECTION
+ * and %G_MENU_LINK_SUBMENU.
+ *
+ * Items in a #GMenuModel represent active controls if they refer to
+ * an action that can get activated when the user interacts with the
+ * menu item. The reference to the action is encoded by the string id
+ * in the %G_MENU_ATTRIBUTE_ACTION attribute. An action id uniquely
+ * identifies an action in an action group. Which action group(s) provide
+ * actions depends on the context in which the menu model is used.
+ * E.g. when the model is exported as the application menu of a
+ * #GtkApplication, actions can be application-wide or window-specific
+ * (and thus come from two different action groups). By convention, the
+ * application-wide actions have names that start with "app.", while the
+ * names of window-specific actions start with "win.".
+ *
+ * While a wide variety of stateful actions is possible, the following
+ * is the minimum that is expected to be supported by all users of exported
+ * menu information:
+ * <itemizedlist>
+ * <listitem>an action with no parameter type and no state</listitem>
+ * <listitem>an action with no parameter type and boolean state</listitem>
+ * <listitem>an action with string parameter type and string state</listitem>
+ * </itemizedlist>
+ *
+ * <formalpara><title>Stateless</title>
+ * <para>
+ * A stateless action typically corresponds to an ordinary menu item.
+ * </para>
+ * <para>
+ * Selecting such a menu item will activate the action (with no parameter).
+ * </para>
+ * </formalpara>
+ *
+ * <formalpara><title>Boolean State</title>
+ * <para>
+ * An action with a boolean state will most typically be used with a "toggle"
+ * or "switch" menu item. The state can be set directly, but activating the
+ * action (with no parameter) results in the state being toggled.
+ * </para>
+ * <para>
+ * Selecting a toggle menu item will activate the action. The menu item should
+ * be rendered as "checked" when the state is true.
+ * </para>
+ * </formalpara>
+ *
+ * <formalpara><title>String Parameter and State</title>
+ * <para>
+ * Actions with string parameters and state will most typically be used to
+ * represent an enumerated choice over the items available for a group of
+ * radio menu items. Activating the action with a string parameter is
+ * equivalent to setting that parameter as the state.
+ * </para>
+ * <para>
+ * Radio menu items, in addition to being associated with the action, will
+ * have a target value. Selecting that menu item will result in activation
+ * of the action with the target value as the parameter. The menu item should
+ * be rendered as "selected" when the state of the action is equal to the
+ * target value of the menu item.
+ * </para>
+ * </formalpara>
+ */
+
+
+/**
+ * SECTION:gmount
+ * @short_description: Mount management
+ * @include: gio/gio.h
+ * @see_also: GVolume, GUnixMountEntry, GUnixMountPoint
+ *
+ * The #GMount interface represents user-visible mounts. Note, when
+ * porting from GnomeVFS, #GMount is the moral equivalent of #GnomeVFSVolume.
+ *
+ * #GMount 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.
+ *
+ * Unmounting a #GMount instance is an asynchronous operation. For
+ * more information about asynchronous operations, see #GAsyncResult
+ * and #GSimpleAsyncResult. To unmount a #GMount instance, first call
+ * g_mount_unmount_with_operation() 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_with_operation_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_with_operation_finish()
+ * is called, then it will be filled with any error information.
+ */
+
+
+/**
+ * SECTION:gmountoperation
+ * @short_description: Object used for authentication and user interaction
+ * @include: gio/gio.h
+ *
+ * #GMountOperation provides a mechanism for interacting with the user.
+ * It can be used for authenticating mountable operations, such as loop
+ * mounting files, hard drive partitions or server locations. It can
+ * also be used to ask the user questions or show a list of applications
+ * preventing unmount or eject operations from completing.
+ *
+ * Note that #GMountOperation is used for more than just #GMount
+ * objects â€“ for example it is also used in g_drive_start() and
+ * g_drive_stop().
+ *
+ * Users should instantiate a subclass of this that implements all the
+ * various callbacks to show the required dialogs, such as
+ * #GtkMountOperation. If no user interaction is desired (for example
+ * when automounting filesystems at login time), usually %NULL can be
+ * passed, see each method taking a #GMountOperation for details.
+ */
+
+
+/**
+ * SECTION:gnetworkaddress
+ * @short_description: A GSocketConnectable for resolving hostnames
+ * @include: gio/gio.h
+ *
+ * #GNetworkAddress provides an easy way to resolve a hostname and
+ * then attempt to connect to that host, handling the possibility of
+ * multiple IP addresses and multiple address families.
+ *
+ * See #GSocketConnectable for and example of using the connectable
+ * interface.
+ */
+
+
+/**
+ * SECTION:gnetworkmonitor
+ * @title: GNetworkMonitor
+ * @short_description: Network status monitor
+ * @include: gio/gio.h
+ *
+ * #GNetworkMonitor provides an easy-to-use cross-platform API
+ * for monitoring network connectivity. On Linux, the implementation
+ * is based on the kernels netlink interface.
+ */
+
+
+/**
+ * SECTION:gnetworkservice
+ * @short_description: A GSocketConnectable for resolving SRV records
+ * @include: gio/gio.h
+ *
+ * Like #GNetworkAddress does with hostnames, #GNetworkService
+ * provides an easy way to resolve a SRV record, and then attempt to
+ * connect to one of the hosts that implements that service, handling
+ * service priority/weighting, multiple IP addresses, and multiple
+ * address families.
+ *
+ * See #GSrvTarget for more information about SRV records, and see
+ * #GSocketConnectable for and example of using the connectable
+ * interface.
+ */
+
+
+/**
+ * SECTION:goutputstream
+ * @short_description: Base class for implementing streaming output
+ * @include: gio/gio.h
+ *
+ * GOutputStream has functions to write to a stream (g_output_stream_write()),
+ * to close a stream (g_output_stream_close()) and to flush pending writes
+ * (g_output_stream_flush()).
+ *
+ * To copy the content of an input stream to an output stream without
+ * manually handling the reads and writes, use g_output_stream_splice().
+ *
+ * All of these functions have async variants too.
+ */
+
+
+/**
+ * SECTION:gpermission
+ * @title: GPermission
+ * @short_description: An object representing the permission to perform a certain action
+ *
+ * A #GPermission represents the status of the caller's permission to
+ * perform a certain action.
+ *
+ * You can query if the action is currently allowed and if it is
+ * possible to acquire the permission so that the action will be allowed
+ * in the future.
+ *
+ * There is also an API to actually acquire the permission and one to
+ * release it.
+ *
+ * As an example, a #GPermission might represent the ability for the
+ * user to write to a #GSettings object.  This #GPermission object could
+ * then be used to decide if it is appropriate to show a "Click here to
+ * unlock" button in a dialog and to provide the mechanism to invoke
+ * when that button is clicked.
+ */
+
+
+/**
+ * SECTION:gpollableinputstream
+ * @short_description: Interface for pollable input streams
+ * @include: gio/gio.h
+ * @see_also: #GInputStream, #GPollableOutputStream, #GFileDescriptorBased
+ *
+ * #GPollableInputStream is implemented by #GInputStream<!-- -->s that
+ * can be polled for readiness to read. This can be used when
+ * interfacing with a non-GIO API that expects
+ * UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * SECTION:gpollableoutputstream
+ * @short_description: Interface for pollable output streams
+ * @include: gio/gio.h
+ * @see_also: #GOutputStream, #GFileDescriptorBased, #GPollableInputStream
+ *
+ * #GPollableOutputStream is implemented by #GOutputStream<!-- -->s that
+ * can be polled for readiness to write. This can be used when
+ * interfacing with a non-GIO API that expects
+ * UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * SECTION:gproxy
+ * @short_description: Interface for proxy handling
+ *
+ * A #GProxy handles connecting to a remote host via a given type of
+ * proxy server. It is implemented by the 'gio-proxy' extension point.
+ * The extensions are named after their proxy protocol name. As an
+ * example, a SOCKS5 proxy implementation can be retrieved with the
+ * name 'socks5' using the function
+ * g_io_extension_point_get_extension_by_name().
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * SECTION:gproxyaddress
+ * @short_description: An internet address with proxy information
+ *
+ * Support for proxied #GInetSocketAddress.
+ */
+
+
+/**
+ * SECTION:gproxyresolver
+ * @short_description: Asynchronous and cancellable network proxy resolver
+ * @include: gio/gio.h
+ *
+ * #GProxyResolver provides synchronous and asynchronous network proxy
+ * resolution. #GProxyResolver is used within #GSocketClient through
+ * the method g_socket_connectable_proxy_enumerate().
+ */
+
+
+/**
+ * SECTION:gremoteactiongroup
+ * @title: GRemoteActionGroup
+ * @short_description: a #GActionGroup that interacts with other processes
+ *
+ * The GRemoteActionGroup interface is implemented by #GActionGroup
+ * instances that either transmit action invocations to other processes
+ * or receive action invocations in the local process from other
+ * processes.
+ *
+ * The interface has <literal>_full</literal> variants of the two
+ * methods on #GActionGroup used to activate actions:
+ * g_action_group_activate_action() and
+ * g_action_group_change_action_state().  These variants allow a
+ * "platform data" #GVariant to be specified: a dictionary providing
+ * context for the action invocation (for example: timestamps, startup
+ * notification IDs, etc).
+ *
+ * #GDBusActionGroup implements #GRemoteActionGroup.  This provides a
+ * mechanism to send platform data for action invocations over D-Bus.
+ *
+ * Additionally, g_dbus_connection_export_action_group() will check if
+ * the exported #GActionGroup implements #GRemoteActionGroup and use the
+ * <literal>_full</literal> variants of the calls if available.  This
+ * provides a mechanism by which to receive platform data for action
+ * invocations that arrive by way of D-Bus.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * SECTION:gresolver
+ * @short_description: Asynchronous and cancellable DNS resolver
+ * @include: gio/gio.h
+ *
+ * #GResolver provides cancellable synchronous and asynchronous DNS
+ * resolution, for hostnames (g_resolver_lookup_by_address(),
+ * g_resolver_lookup_by_name() and their async variants) and SRV
+ * (service) records (g_resolver_lookup_service()).
+ *
+ * #GNetworkAddress and #GNetworkService provide wrappers around
+ * #GResolver functionality that also implement #GSocketConnectable,
+ * making it easy to connect to a remote host/service.
+ */
+
+
+/**
+ * SECTION:gresource
+ * @short_description: Resource framework
+ * @include: gio/gio.h
+ *
+ * Applications and libraries often contain binary or textual data that is really part of the
+ * application, rather than user data. For instance #GtkBuilder .ui files, splashscreen images,
+ * GMenu markup xml, CSS files, icons, etc. These are often shipped as files in <filename>$datadir/appname</filename>, or
+ * manually included as literal strings in the code.
+ *
+ * The #GResource API and the <link linkend="glib-compile-resources">glib-compile-resources</link> program
+ * provide a convenient and efficient alternative to this which has some nice properties. You
+ * maintain the files as normal files, so its easy to edit them, but during the build the files
+ * are combined into a binary bundle that is linked into the executable. This means that loading
+ * the resource files are efficient (as they are already in memory, shared with other instances) and
+ * simple (no need to check for things like I/O errors or locate the files in the filesystem). It
+ * also makes it easier to create relocatable applications.
+ *
+ * Resource files can also be marked as compresses. Such files will be included in the resource bundle
+ * in a compressed form, but will be automatically uncompressed when the resource is used. This
+ * is very useful e.g. for larger text files that are parsed once (or rarely) and then thrown away.
+ *
+ * Resource files can also be marked to be preprocessed, by setting the value of the
+ * <literal>preprocess</literal> attribute to a comma-separated list of preprocessing options.
+ * The only options currently supported are:
+ *
+ * <literal>xml-stripblanks</literal> which will use <command>xmllint</command> to strip
+ * ignorable whitespace from the xml file. For this to work, the <envar>XMLLINT</envar>
+ * environment variable must be set to the full path to the xmllint executable, or xmllint
+ * must be in the PATH; otherwise the preprocessing step is skipped.
+ *
+ * <literal>to-pixdata</literal> which will use <command>gdk-pixbuf-pixdata</command> to convert
+ * images to the GdkPixdata format, which allows you to create pixbufs directly using the data inside
+ * the resource file, rather than an (uncompressed) copy if it. For this, the gdk-pixbuf-pixdata
+ * program must be in the PATH, or the <envar>GDK_PIXBUF_PIXDATA</envar> environment variable must be
+ * set to the full path to the gdk-pixbuf-pixdata executable; otherwise the resource compiler will
+ * abort.
+ *
+ * Resource bundles are created by the <link linkend="glib-compile-resources">glib-compile-resources</link> program
+ * which takes an xml file that describes the bundle, and a set of files that the xml references. These
+ * are combined into a binary resource bundle.
+ *
+ * <example id="resource-example"><title>Example resource description</title>
+ * <programlisting><![CDATA[
+ * <?xml version="1.0" encoding="UTF-8"?>
+ * <gresources>
+ * <gresource prefix="/org/gtk/Example">
+ * <file>data/splashscreen.png</file>
+ * <file compressed="true">dialog.ui</file>
+ * <file preprocess="xml-stripblanks">menumarkup.xml</file>
+ * </gresource>
+ * </gresources>
+ * ]]></programlisting></example>
+ *
+ * This will create a resource bundle with the following files:
+ * <programlisting><![CDATA[
+ * /org/gtk/Example/data/splashscreen.png
+ * /org/gtk/Example/dialog.ui
+ * /org/gtk/Example/menumarkup.xml
+ * ]]></programlisting>
+ *
+ * Note that all resources in the process share the same namespace, so use java-style
+ * path prefixes (like in the above example) to avoid conflicts.
+ *
+ * You can then use <link linkend="glib-compile-resources">glib-compile-resources</link> to compile the xml to a
+ * binary bundle that you can load with g_resource_load(). However, its more common to use the --generate-source and
+ * --generate-header arguments to create a source file and header to link directly into your application.
+ *
+ * Once a #GResource has been created and registered all the data in it can be accessed globally in the process by
+ * using API calls like g_resources_open_stream() to stream the data or g_resources_lookup_data() to get a direct pointer
+ * to the data. You can also use uris like "resource:///org/gtk/Example/data/splashscreen.png" with #GFile to access
+ * the resource data.
+ *
+ * There are two forms of the generated source, the default version uses the compiler support for constructor
+ * and destructor functions (where available) to automatically create and register the #GResource on startup
+ * or library load time. If you pass --manual-register two functions to register/unregister the resource is instead
+ * created. This requires an explicit initialization call in your application/library, but it works on all platforms,
+ * even on the minor ones where this is not available. (Constructor support is available for at least Win32, MacOS and Linux.)
+ *
+ * Note that resource data can point directly into the data segment of e.g. a library, so if you are unloading libraries
+ * during runtime you need to be very careful with keeping around pointers to data from a resource, as this goes away
+ * when the library is unloaded. However, in practice this is not generally a problem, since most resource accesses
+ * is for your own resources, and resource data is often used once, during parsing, and then released.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * SECTION:gseekable
+ * @short_description: Stream seeking interface
+ * @include: gio/gio.h
+ * @see_also: #GInputStream, #GOutputStream
+ *
+ * #GSeekable is implemented by streams (implementations of
+ * #GInputStream or #GOutputStream) that support seeking.
+ */
+
+
+/**
+ * SECTION:gsettings
+ * @short_description: High-level API for application settings
+ *
+ * The #GSettings class provides a convenient API for storing and retrieving
+ * application settings.
+ *
+ * Reads and writes can be considered to be non-blocking.  Reading
+ * settings with #GSettings is typically extremely fast: on
+ * approximately the same order of magnitude (but slower than) a
+ * #GHashTable lookup.  Writing settings is also extremely fast in terms
+ * of time to return to your application, but can be extremely expensive
+ * for other threads and other processes.  Many settings backends
+ * (including dconf) have lazy initialisation which means in the common
+ * case of the user using their computer without modifying any settings
+ * a lot of work can be avoided.  For dconf, the D-Bus service doesn't
+ * even need to be started in this case.  For this reason, you should
+ * only ever modify #GSettings keys in response to explicit user action.
+ * Particular care should be paid to ensure that modifications are not
+ * made during startup -- for example, when setting the initial value
+ * of preferences widgets.  The built-in g_settings_bind() functionality
+ * is careful not to write settings in response to notify signals as a
+ * result of modifications that it makes to widgets.
+ *
+ * When creating a GSettings instance, you have to specify a schema
+ * that describes the keys in your settings and their types and default
+ * values, as well as some other information.
+ *
+ * Normally, a schema has as fixed path that determines where the settings
+ * are stored in the conceptual global tree of settings. However, schemas
+ * can also be 'relocatable', i.e. not equipped with a fixed path. This is
+ * useful e.g. when the schema describes an 'account', and you want to be
+ * able to store a arbitrary number of accounts.
+ *
+ * Unlike other configuration systems (like GConf), GSettings does not
+ * restrict keys to basic types like strings and numbers. GSettings stores
+ * values as #GVariant, and allows any #GVariantType for keys. Key names
+ * are restricted to lowercase characters, numbers and '-'. Furthermore,
+ * the names must begin with a lowercase character, must not end
+ * with a '-', and must not contain consecutive dashes.
+ *
+ * Similar to GConf, the default values in GSettings schemas can be
+ * localized, but the localized values are stored in gettext catalogs
+ * and looked up with the domain that is specified in the
+ * <tag class="attribute">gettext-domain</tag> attribute of the
+ * <tag class="starttag">schemalist</tag> or <tag class="starttag">schema</tag>
+ * elements and the category that is specified in the l10n attribute of the
+ * <tag class="starttag">key</tag> element.
+ *
+ * GSettings uses schemas in a compact binary form that is created
+ * by the <link linkend="glib-compile-schemas">glib-compile-schemas</link>
+ * utility. The input is a schema description in an XML format that can be
+ * described by the following DTD:
+ * |[<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/gschema.dtd"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include>]|
+ *
+ * glib-compile-schemas expects schema files to have the extension <filename>.gschema.xml</filename>
+ *
+ * At runtime, schemas are identified by their id (as specified
+ * in the <tag class="attribute">id</tag> attribute of the
+ * <tag class="starttag">schema</tag> element). The
+ * convention for schema ids is to use a dotted name, similar in
+ * style to a D-Bus bus name, e.g. "org.gnome.SessionManager". In particular,
+ * if the settings are for a specific service that owns a D-Bus bus name,
+ * the D-Bus bus name and schema id should match. For schemas which deal
+ * with settings not associated with one named application, the id should
+ * not use StudlyCaps, e.g. "org.gnome.font-rendering".
+ *
+ * In addition to #GVariant types, keys can have types that have enumerated
+ * types. These can be described by a <tag class="starttag">choice</tag>,
+ * <tag class="starttag">enum</tag> or <tag class="starttag">flags</tag> element, see
+ * <xref linkend="schema-enumerated"/>. The underlying type of
+ * such a key is string, but you can use g_settings_get_enum(),
+ * g_settings_set_enum(), g_settings_get_flags(), g_settings_set_flags()
+ * access the numeric values corresponding to the string value of enum
+ * and flags keys.
+ *
+ * <example id="schema-default-values"><title>Default values</title>
+ * <programlisting><![CDATA[
+ * <schemalist>
+ * <schema id="org.gtk.Test" path="/tests/" gettext-domain="test">
+ *
+ * <key name="greeting" type="s">
+ * <default l10n="messages">"Hello, earthlings"</default>
+ * <summary>A greeting</summary>
+ * <description>
+ * Greeting of the invading martians
+ * </description>
+ * </key>
+ *
+ * <key name="box" type="(ii)">
+ * <default>(20,30)</default>
+ * </key>
+ *
+ * </schema>
+ * </schemalist>
+ * ]]></programlisting></example>
+ *
+ * <example id="schema-enumerated"><title>Ranges, choices and enumerated types</title>
+ * <programlisting><![CDATA[
+ * <schemalist>
+ *
+ * <enum id="org.gtk.Test.myenum">
+ * <value nick="first" value="1"/>
+ * <value nick="second" value="2"/>
+ * </enum>
+ *
+ * <flags id="org.gtk.Test.myflags">
+ * <value nick="flag1" value="1"/>
+ * <value nick="flag2" value="2"/>
+ * <value nick="flag3" value="4"/>
+ * </flags>
+ *
+ * <schema id="org.gtk.Test">
+ *
+ * <key name="key-with-range" type="i">
+ * <range min="1" max="100"/>
+ * <default>10</default>
+ * </key>
+ *
+ * <key name="key-with-choices" type="s">
+ * <choices>
+ * <choice value='Elisabeth'/>
+ * <choice value='Annabeth'/>
+ * <choice value='Joe'/>
+ * </choices>
+ * <aliases>
+ * <alias value='Anna' target='Annabeth'/>
+ * <alias value='Beth' target='Elisabeth'/>
+ * </aliases>
+ * <default>'Joe'</default>
+ * </key>
+ *
+ * <key name='enumerated-key' enum='org.gtk.Test.myenum'>
+ * <default>'first'</default>
+ * </key>
+ *
+ * <key name='flags-key' flags='org.gtk.Test.myflags'>
+ * <default>["flag1",flag2"]</default>
+ * </key>
+ * </schema>
+ * </schemalist>
+ * ]]></programlisting></example>
+ *
+ * <refsect2>
+ * <title>Vendor overrides</title>
+ * <para>
+ * Default values are defined in the schemas that get installed by
+ * an application. Sometimes, it is necessary for a vendor or distributor
+ * to adjust these defaults. Since patching the XML source for the schema
+ * is inconvenient and error-prone,
+ * <link linkend="glib-compile-schemas">glib-compile-schemas</link> reads
+ * so-called 'vendor override' files. These are keyfiles in the same
+ * directory as the XML schema sources which can override default values.
+ * The schema id serves as the group name in the key file, and the values
+ * are expected in serialized GVariant form, as in the following example:
+ * <informalexample><programlisting>
+ * [org.gtk.Example]
+ * key1='string'
+ * key2=1.5
+ * </programlisting></informalexample>
+ * </para>
+ * <para>
+ * glib-compile-schemas expects schema files to have the extension
+ * <filename>.gschema.override</filename>
+ * </para>
+ * </refsect2>
+ *
+ * <refsect2>
+ * <title>Binding</title>
+ * <para>
+ * A very convenient feature of GSettings lets you bind #GObject properties
+ * directly to settings, using g_settings_bind(). Once a GObject property
+ * has been bound to a setting, changes on either side are automatically
+ * propagated to the other side. GSettings handles details like
+ * mapping between GObject and GVariant types, and preventing infinite
+ * cycles.
+ * </para>
+ * <para>
+ * This makes it very easy to hook up a preferences dialog to the
+ * underlying settings. To make this even more convenient, GSettings
+ * looks for a boolean property with the name "sensitivity" and
+ * automatically binds it to the writability of the bound setting.
+ * If this 'magic' gets in the way, it can be suppressed with the
+ * #G_SETTINGS_BIND_NO_SENSITIVITY flag.
+ * </para>
+ * </refsect2>
+ */
+
+
+/**
+ * SECTION:gsettingsbackend
+ * @title: GSettingsBackend
+ * @short_description: Interface for settings backend implementations
+ * @include: gio/gsettingsbackend.h
+ * @see_also: #GSettings, #GIOExtensionPoint
+ *
+ * The #GSettingsBackend interface defines a generic interface for
+ * non-strictly-typed data that is stored in a hierarchy. To implement
+ * an alternative storage backend for #GSettings, you need to implement
+ * the #GSettingsBackend interface and then make it implement the
+ * extension point #G_SETTINGS_BACKEND_EXTENSION_POINT_NAME.
+ *
+ * The interface defines methods for reading and writing values, a
+ * method for determining if writing of certain values will fail
+ * (lockdown) and a change notification mechanism.
+ *
+ * The semantics of the interface are very precisely defined and
+ * implementations must carefully adhere to the expectations of
+ * callers that are documented on each of the interface methods.
+ *
+ * Some of the GSettingsBackend functions accept or return a #GTree.
+ * These trees always have strings as keys and #GVariant as values.
+ * g_settings_backend_create_tree() is a convenience function to create
+ * suitable trees.
+ *
+ * <note><para>
+ * The #GSettingsBackend API is exported to allow third-party
+ * implementations, but does not carry the same stability guarantees
+ * as the public GIO API. For this reason, you have to define the
+ * C preprocessor symbol #G_SETTINGS_ENABLE_BACKEND before including
+ * <filename>gio/gsettingsbackend.h</filename>
+ * </para></note>
+ */
+
+
+/**
+ * SECTION:gsettingsschema
+ * @short_description: introspecting and controlling the loading of #GSettings schemas
+ *
+ * The #GSettingsSchemaSource and #GSettingsSchema APIs provide a
+ * mechanism for advanced control over the loading of schemas and a
+ * mechanism for introspecting their content.
+ *
+ * Plugin loading systems that wish to provide plugins a way to access
+ * settings face the problem of how to make the schemas for these
+ * settings visible to GSettings.  Typically, a plugin will want to ship
+ * the schema along with itself and it won't be installed into the
+ * standard system directories for schemas.
+ *
+ * #GSettingsSchemaSource provides a mechanism for dealing with this by
+ * allowing the creation of a new 'schema source' from which schemas can
+ * be acquired.  This schema source can then become part of the metadata
+ * associated with the plugin and queried whenever the plugin requires
+ * access to some settings.
+ *
+ * Consider the following example:
+ *
+ * |[
+ * typedef struct
+ * {
+ * ...
+ * GSettingsSchemaSource *schema_source;
+ * ...
+ * } Plugin;
+ *
+ * Plugin *
+ * initialise_plugin (const gchar *dir)
+ * {
+ * Plugin *plugin;
+ *
+ * ...
+ *
+ * plugin->schema_source =
+ * g_settings_new_schema_source_from_directory (dir,
+ * g_settings_schema_source_get_default (), FALSE, NULL);
+ *
+ * ...
+ *
+ * return plugin;
+ * }
+ *
+ * ...
+ *
+ * GSettings *
+ * plugin_get_settings (Plugin      *plugin,
+ * const gchar *schema_id)
+ * {
+ * GSettingsSchema *schema;
+ *
+ * if (schema_id == NULL)
+ * schema_id = plugin->identifier;
+ *
+ * schema = g_settings_schema_source_lookup (plugin->schema_source,
+ * schema_id, FALSE);
+ *
+ * if (schema == NULL)
+ * {
+ * ... disable the plugin or abort, etc ...
+ * }
+ *
+ * return g_settings_new_full (schema, NULL, NULL);
+ * }
+ * ]|
+ *
+ * The code above shows how hooks should be added to the code that
+ * initialises (or enables) the plugin to create the schema source and
+ * how an API can be added to the plugin system to provide a convenient
+ * way for the plugin to access its settings, using the schemas that it
+ * ships.
+ *
+ * From the standpoint of the plugin, it would need to ensure that it
+ * ships a gschemas.compiled file as part of itself, and then simply do
+ * the following:
+ *
+ * |[
+ * {
+ * GSettings *settings;
+ * gint some_value;
+ *
+ * settings = plugin_get_settings (self, NULL);
+ * some_value = g_settings_get_int (settings, "some-value");
+ * ...
+ * }
+ * ]|
+ *
+ * It's also possible that the plugin system expects the schema source
+ * files (ie: .gschema.xml files) instead of a gschemas.compiled file.
+ * In that case, the plugin loading system must compile the schemas for
+ * itself before attempting to create the settings source.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * SECTION:gsimpleaction
+ * @title: GSimpleAction
+ * @short_description: A simple GAction implementation
+ *
+ * A #GSimpleAction is the obvious simple implementation of the #GAction
+ * interface. This is the easiest way to create an action for purposes of
+ * adding it to a #GSimpleActionGroup.
+ *
+ * See also #GtkAction.
+ */
+
+
+/**
+ * SECTION:gsimpleactiongroup
+ * @title: GSimpleActionGroup
+ * @short_description: A simple GActionGroup implementation
+ *
+ * #GSimpleActionGroup is a hash table filled with #GAction objects,
+ * implementing the #GActionGroup and #GActionMap interfaces.
+ */
+
+
+/**
+ * SECTION:gsimpleasyncresult
+ * @short_description: Simple asynchronous results implementation
+ * @include: gio/gio.h
+ * @see_also: #GAsyncResult
+ *
+ * Implements #GAsyncResult 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.
+ *
+ * GSimpleAsyncResult handles #GAsyncReadyCallback<!-- -->s, 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.
+ *
+ * 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.
+ *
+ * GSimpleAsyncResults are tagged with the calling function to ensure
+ * that asynchronous functions and their finishing functions are used
+ * together correctly.
+ *
+ * To create a new #GSimpleAsyncResult, call g_simple_async_result_new().
+ * If the result needs to be created for a #GError, use
+ * g_simple_async_result_new_from_error() or
+ * g_simple_async_result_new_take_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 propagated through the use of
+ * g_simple_async_result_propagate_error().
+ *
+ * An asynchronous operation can be made to ignore a cancellation event by
+ * calling g_simple_async_result_set_handle_cancellation() with a
+ * #GSimpleAsyncResult for the operation and %FALSE. This is useful for
+ * operations that are dangerous to cancel, such as close (which would
+ * cause a leak if cancelled before being run).
+ *
+ * GSimpleAsyncResult can integrate into GLib's event loop, #GMainLoop,
+ * or it can use #GThread<!-- -->s.
+ * g_simple_async_result_complete() will finish an I/O task directly
+ * from the point where it is called. g_simple_async_result_complete_in_idle()
+ * will finish it from an idle handler in the <link
+ * linkend="g-main-context-push-thread-default">thread-default main
+ * context</link>. g_simple_async_result_run_in_thread() will run the
+ * job in a separate thread and then deliver the result to the
+ * thread-default main context.
+ *
+ * To set the results of an asynchronous function,
+ * g_simple_async_result_set_op_res_gpointer(),
+ * g_simple_async_result_set_op_res_gboolean(), and
+ * g_simple_async_result_set_op_res_gssize()
+ * are provided, setting the operation's result to a gpointer, gboolean, or
+ * gssize, respectively.
+ *
+ * Likewise, to get the result of an asynchronous function,
+ * g_simple_async_result_get_op_res_gpointer(),
+ * g_simple_async_result_get_op_res_gboolean(), and
+ * g_simple_async_result_get_op_res_gssize() are
+ * provided, getting the operation's result as a gpointer, gboolean, and
+ * gssize, respectively.
+ *
+ * For the details of the requirements implementations must respect, see
+ * #GAsyncResult.  A typical implementation of an asynchronous operation
+ * using GSimpleAsyncResult looks something like this:
+ *
+ * |[
+ * static void
+ * baked_cb (Cake    *cake,
+ * gpointer user_data)
+ * {
+ * /&ast; In this example, this callback is not given a reference to the cake, so
+ * &ast; the GSimpleAsyncResult has to take a reference to it.
+ * &ast;/
+ * GSimpleAsyncResult *result = user_data;
+ *
+ * if (cake == NULL)
+ * g_simple_async_result_set_error (result,
+ * BAKER_ERRORS,
+ * BAKER_ERROR_NO_FLOUR,
+ * "Go to the supermarket");
+ * else
+ * g_simple_async_result_set_op_res_gpointer (result,
+ * g_object_ref (cake),
+ * g_object_unref);
+ *
+ *
+ * /&ast; In this example, we assume that baked_cb is called as a callback from
+ * &ast; the mainloop, so it's safe to complete the operation synchronously here.
+ * &ast; If, however, _baker_prepare_cake () might call its callback without
+ * &ast; first returning to the mainloop â€” inadvisable, but some APIs do so â€”
+ * &ast; we would need to use g_simple_async_result_complete_in_idle().
+ * &ast;/
+ * g_simple_async_result_complete (result);
+ * g_object_unref (result);
+ * }
+ *
+ * void
+ * baker_bake_cake_async (Baker              *self,
+ * guint               radius,
+ * GAsyncReadyCallback callback,
+ * gpointer            user_data)
+ * {
+ * GSimpleAsyncResult *simple;
+ * Cake               *cake;
+ *
+ * if (radius < 3)
+ * {
+ * g_simple_async_report_error_in_idle (G_OBJECT (self),
+ * callback,
+ * user_data,
+ * BAKER_ERRORS,
+ * BAKER_ERROR_TOO_SMALL,
+ * "%ucm radius cakes are silly",
+ * radius);
+ * return;
+ * }
+ *
+ * simple = g_simple_async_result_new (G_OBJECT (self),
+ * callback,
+ * user_data,
+ * baker_bake_cake_async);
+ * cake = _baker_get_cached_cake (self, radius);
+ *
+ * if (cake != NULL)
+ * {
+ * g_simple_async_result_set_op_res_gpointer (simple,
+ * g_object_ref (cake),
+ * g_object_unref);
+ * g_simple_async_result_complete_in_idle (simple);
+ * g_object_unref (simple);
+ * /&ast; Drop the reference returned by _baker_get_cached_cake(); the
+ * &ast; GSimpleAsyncResult has taken its own reference.
+ * &ast;/
+ * g_object_unref (cake);
+ * return;
+ * }
+ *
+ * _baker_prepare_cake (self, radius, baked_cb, simple);
+ * }
+ *
+ * Cake *
+ * baker_bake_cake_finish (Baker        *self,
+ * GAsyncResult *result,
+ * GError      **error)
+ * {
+ * GSimpleAsyncResult *simple;
+ * Cake               *cake;
+ *
+ * g_return_val_if_fail (g_simple_async_result_is_valid (result,
+ * G_OBJECT (self),
+ * baker_bake_cake_async),
+ * NULL);
+ *
+ * simple = (GSimpleAsyncResult *) result;
+ *
+ * if (g_simple_async_result_propagate_error (simple, error))
+ * return NULL;
+ *
+ * cake = CAKE (g_simple_async_result_get_op_res_gpointer (simple));
+ * return g_object_ref (cake);
+ * }
+ * ]|
+ */
+
+
+/**
+ * SECTION:gsimplepermission
+ * @title: GSimplePermission
+ * @short_description: A GPermission that doesn't change value
+ *
+ * #GSimplePermission is a trivial implementation of #GPermission that
+ * represents a permission that is either always or never allowed.  The
+ * value is given at construction and doesn't change.
+ *
+ * Calling request or release will result in errors.
+ */
+
+
+/**
+ * SECTION:gsocket
+ * @short_description: Low-level socket object
+ * @include: gio/gio.h
+ * @see_also: #GInitable
+ *
+ * A #GSocket is a low-level networking primitive. It is a more or less
+ * direct mapping of the BSD socket API in a portable GObject based API.
+ * It supports both the UNIX socket implementations and winsock2 on Windows.
+ *
+ * #GSocket is the platform independent base upon which the higher level
+ * network primitives are based. Applications are not typically meant to
+ * use it directly, but rather through classes like #GSocketClient,
+ * #GSocketService and #GSocketConnection. However there may be cases where
+ * direct use of #GSocket is useful.
+ *
+ * #GSocket implements the #GInitable interface, so if it is manually constructed
+ * by e.g. g_object_new() you must call g_initable_init() and check the
+ * results before using the object. This is done automatically in
+ * g_socket_new() and g_socket_new_from_fd(), so these functions can return
+ * %NULL.
+ *
+ * Sockets operate in two general modes, blocking or non-blocking. When
+ * in blocking mode all operations block until the requested operation
+ * is finished or there is an error. In non-blocking mode all calls that
+ * would block return immediately with a %G_IO_ERROR_WOULD_BLOCK error.
+ * To know when a call would successfully run you can call g_socket_condition_check(),
+ * or g_socket_condition_wait(). You can also use g_socket_create_source() and
+ * attach it to a #GMainContext to get callbacks when I/O is possible.
+ * Note that all sockets are always set to non blocking mode in the system, and
+ * blocking mode is emulated in GSocket.
+ *
+ * When working in non-blocking mode applications should always be able to
+ * handle getting a %G_IO_ERROR_WOULD_BLOCK error even when some other
+ * function said that I/O was possible. This can easily happen in case
+ * of a race condition in the application, but it can also happen for other
+ * reasons. For instance, on Windows a socket is always seen as writable
+ * until a write returns %G_IO_ERROR_WOULD_BLOCK.
+ *
+ * #GSocket<!-- -->s can be either connection oriented or datagram based.
+ * For connection oriented types you must first establish a connection by
+ * either connecting to an address or accepting a connection from another
+ * address. For connectionless socket types the target/source address is
+ * specified or received in each I/O operation.
+ *
+ * All socket file descriptors are set to be close-on-exec.
+ *
+ * Note that creating a #GSocket causes the signal %SIGPIPE to be
+ * ignored for the remainder of the program. If you are writing a
+ * command-line utility that uses #GSocket, you may need to take into
+ * account the fact that your program will not automatically be killed
+ * if it tries to write to %stdout after it has been closed.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * SECTION:gsocketaddress
+ * @short_description: Abstract base class representing endpoints for socket communication
+ *
+ * #GSocketAddress is the equivalent of <type>struct sockaddr</type>
+ * in the BSD sockets API. This is an abstract class; use
+ * #GInetSocketAddress for internet sockets, or #GUnixSocketAddress
+ * for UNIX domain sockets.
+ */
+
+
+/**
+ * SECTION:gsocketclient
+ * @short_description: Helper for connecting to a network service
+ * @include: gio/gio.h
+ * @see_also: #GSocketConnection, #GSocketListener
+ *
+ * #GSocketClient is a lightweight high-level utility class for connecting to
+ * a network host using a connection oriented socket type.
+ *
+ * You create a #GSocketClient object, set any options you want, and then
+ * call a sync or async connect operation, which returns a #GSocketConnection
+ * subclass on success.
+ *
+ * The type of the #GSocketConnection object returned depends on the type of
+ * the underlying socket that is in use. For instance, for a TCP/IP connection
+ * it will be a #GTcpConnection.
+ *
+ * As #GSocketClient is a lightweight object, you don't need to cache it. You
+ * can just create a new one any time you need one.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * SECTION:gsocketconnectable
+ * @short_description: Interface for potential socket endpoints
+ *
+ * Objects that describe one or more potential socket endpoints
+ * implement #GSocketConnectable. Callers can then use
+ * g_socket_connectable_enumerate() to get a #GSocketAddressEnumerator
+ * to try out each socket address in turn until one succeeds, as shown
+ * in the sample code below.
+ *
+ * |[
+ * MyConnectionType *
+ * connect_to_host (const char    *hostname,
+ * guint16        port,
+ * GCancellable  *cancellable,
+ * GError       **error)
+ * {
+ * MyConnection *conn = NULL;
+ * GSocketConnectable *addr;
+ * GSocketAddressEnumerator *enumerator;
+ * GSocketAddress *sockaddr;
+ * GError *conn_error = NULL;
+ *
+ * addr = g_network_address_new ("www.gnome.org", 80);
+ * enumerator = g_socket_connectable_enumerate (addr);
+ * g_object_unref (addr);
+ *
+ * /<!-- -->* Try each sockaddr until we succeed. Record the first
+ * * connection error, but not any further ones (since they'll probably
+ * * be basically the same as the first).
+ * *<!-- -->/
+ * while (!conn && (sockaddr = g_socket_address_enumerator_next (enumerator, cancellable, error))
+ * {
+ * conn = connect_to_sockaddr (sockaddr, conn_error ? NULL : &conn_error);
+ * g_object_unref (sockaddr);
+ * }
+ * g_object_unref (enumerator);
+ *
+ * if (conn)
+ * {
+ * if (conn_error)
+ * {
+ * /<!-- -->* We couldn't connect to the first address, but we succeeded
+ * * in connecting to a later address.
+ * *<!-- -->/
+ * g_error_free (conn_error);
+ * }
+ * return conn;
+ * }
+ * else if (error)
+ * {
+ * /<!-- -->* Either the initial lookup failed, or else the caller
+ * * cancelled us.
+ * *<!-- -->/
+ * if (conn_error)
+ * g_error_free (conn_error);
+ * return NULL;
+ * }
+ * else
+ * {
+ * g_error_propagate (error, conn_error);
+ * return NULL;
+ * }
+ * }
+ * ]|
+ */
+
+
+/**
+ * SECTION:gsocketconnection
+ * @short_description: A socket connection
+ * @include: gio/gio.h
+ * @see_also: #GIOStream, #GSocketClient, #GSocketListener
+ *
+ * #GSocketConnection is a #GIOStream for a connected socket. They
+ * can be created either by #GSocketClient when connecting to a host,
+ * or by #GSocketListener when accepting a new client.
+ *
+ * The type of the #GSocketConnection object returned from these calls
+ * depends on the type of the underlying socket that is in use. For
+ * instance, for a TCP/IP connection it will be a #GTcpConnection.
+ *
+ * Choosing what type of object to construct is done with the socket
+ * connection factory, and it is possible for 3rd parties to register
+ * custom socket connection types for specific combination of socket
+ * family/type/protocol using g_socket_connection_factory_register_type().
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * SECTION:gsocketcontrolmessage
+ * @title: GSocketControlMessage
+ * @short_description: A GSocket control message
+ * @see_also: #GSocket.
+ *
+ * A #GSocketControlMessage is a special-purpose utility message that
+ * can be sent to or received from a #GSocket. These types of
+ * messages are often called "ancillary data".
+ *
+ * The message can represent some sort of special instruction to or
+ * information from the socket or can represent a special kind of
+ * transfer to the peer (for example, sending a file description over
+ * a UNIX socket).
+ *
+ * These messages are sent with g_socket_send_message() and received
+ * with g_socket_receive_message().
+ *
+ * To extend the set of control message that can be sent, subclass this
+ * class and override the get_size, get_level, get_type and serialize
+ * methods.
+ *
+ * To extend the set of control messages that can be received, subclass
+ * this class and implement the deserialize method. Also, make sure your
+ * class is registered with the GType typesystem before calling
+ * g_socket_receive_message() to read such a message.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * SECTION:gsocketlistener
+ * @title: GSocketListener
+ * @short_description: Helper for accepting network client connections
+ * @see_also: #GThreadedSocketService, #GSocketService.
+ *
+ * A #GSocketListener is an object that keeps track of a set
+ * of server sockets and helps you accept sockets from any of the
+ * socket, either sync or async.
+ *
+ * If you want to implement a network server, also look at #GSocketService
+ * and #GThreadedSocketService which are subclass of #GSocketListener
+ * that makes this even easier.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * SECTION:gsocketservice
+ * @title: GSocketService
+ * @short_description: Make it easy to implement a network service
+ * @see_also: #GThreadedSocketService, #GSocketListener.
+ *
+ * A #GSocketService is an object that represents a service that
+ * is provided to the network or over local sockets.  When a new
+ * connection is made to the service the #GSocketService::incoming
+ * signal is emitted.
+ *
+ * A #GSocketService is a subclass of #GSocketListener and you need
+ * to add the addresses you want to accept connections on with the
+ * #GSocketListener APIs.
+ *
+ * There are two options for implementing a network service based on
+ * #GSocketService. The first is to create the service using
+ * g_socket_service_new() and to connect to the #GSocketService::incoming
+ * signal. The second is to subclass #GSocketService and override the
+ * default signal handler implementation.
+ *
+ * In either case, the handler must immediately return, or else it
+ * will block additional incoming connections from being serviced.
+ * If you are interested in writing connection handlers that contain
+ * blocking code then see #GThreadedSocketService.
+ *
+ * The socket service runs on the main loop of the <link
+ * linkend="g-main-context-push-thread-default-context">thread-default
+ * context</link> of the thread it is created in, and is not
+ * threadsafe in general. However, the calls to start and stop the
+ * service are thread-safe so these can be used from threads that
+ * handle incoming clients.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * SECTION:gsrvtarget
+ * @short_description: DNS SRV record target
+ * @include: gio/gio.h
+ *
+ * SRV (service) records are used by some network protocols to provide
+ * service-specific aliasing and load-balancing. For example, XMPP
+ * (Jabber) uses SRV records to locate the XMPP server for a domain;
+ * rather than connecting directly to "example.com" or assuming a
+ * specific server hostname like "xmpp.example.com", an XMPP client
+ * would look up the "xmpp-client" SRV record for "example.com", and
+ * then connect to whatever host was pointed to by that record.
+ *
+ * You can use g_resolver_lookup_service() or
+ * g_resolver_lookup_service_async() to find the #GSrvTarget<!-- -->s
+ * for a given service. However, if you are simply planning to connect
+ * to the remote service, you can use #GNetworkService's
+ * #GSocketConnectable interface and not need to worry about
+ * #GSrvTarget at all.
+ */
+
+
+/**
+ * SECTION:gtcpconnection
+ * @title: GTcpConnection
+ * @short_description: A TCP GSocketConnection
+ * @see_also: #GSocketConnection.
+ *
+ * This is the subclass of #GSocketConnection that is created
+ * for TCP/IP sockets.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * SECTION:gtcpwrapperconnection
+ * @title: GTcpWrapperConnection
+ * @short_description: wrapper for non-GSocketConnection-based, GSocket-based GIOStreams
+ * @see_also: #GSocketConnection.
+ *
+ * A #GTcpWrapperConnection can be used to wrap a #GIOStream that is
+ * based on a #GSocket, but which is not actually a
+ * #GSocketConnection. This is used by #GSocketClient so that it can
+ * always return a #GSocketConnection, even when the connection it has
+ * actually created is not directly a #GSocketConnection.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * SECTION:gthemedicon
+ * @short_description: Icon theming support
+ * @include: gio/gio.h
+ * @see_also: #GIcon, #GLoadableIcon
+ *
+ * #GThemedIcon is an implementation of #GIcon 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. #GThemedIcon does
+ * not provide actual pixmaps for icons, just the icon names.
+ * Ideally something like gtk_icon_theme_choose_icon() should be used to
+ * resolve the list of names so that fallback icons work nicely with
+ * themes that inherit other themes.
+ */
+
+
+/**
+ * SECTION:gthreadedsocketservice
+ * @title: GThreadedSocketService
+ * @short_description: A threaded GSocketService
+ * @see_also: #GSocketService.
+ *
+ * A #GThreadedSocketService is a simple subclass of #GSocketService
+ * that handles incoming connections by creating a worker thread and
+ * dispatching the connection to it by emitting the
+ * #GThreadedSocketService::run signal in the new thread.
+ *
+ * The signal handler may perform blocking IO and need not return
+ * until the connection is closed.
+ *
+ * The service is implemented using a thread pool, so there is a
+ * limited amount of threads available to serve incoming requests.
+ * The service automatically stops the #GSocketService from accepting
+ * new connections when all threads are busy.
+ *
+ * As with #GSocketService, you may connect to #GThreadedSocketService::run,
+ * or subclass and override the default handler.
+ */
+
+
+/**
+ * SECTION:gtls
+ * @title: TLS Overview
+ * @short_description: TLS (aka SSL) support for GSocketConnection
+ * @include: gio/gio.h
+ *
+ * #GTlsConnection and related classes provide TLS (Transport Layer
+ * Security, previously known as SSL, Secure Sockets Layer) support for
+ * gio-based network streams.
+ *
+ * In the simplest case, for a client connection, you can just set the
+ * #GSocketClient:tls flag on a #GSocketClient, and then any
+ * connections created by that client will have TLS negotiated
+ * automatically, using appropriate default settings, and rejecting
+ * any invalid or self-signed certificates (unless you change that
+ * default by setting the #GSocketClient:tls-validation-flags
+ * property). The returned object will be a #GTcpWrapperConnection,
+ * which wraps the underlying #GTlsClientConnection.
+ *
+ * For greater control, you can create your own #GTlsClientConnection,
+ * wrapping a #GSocketConnection (or an arbitrary #GIOStream with
+ * pollable input and output streams) and then connect to its signals,
+ * such as #GTlsConnection::accept-certificate, before starting the
+ * handshake.
+ *
+ * Server-side TLS is similar, using #GTlsServerConnection. At the
+ * moment, there is no support for automatically wrapping server-side
+ * connections in the way #GSocketClient does for client-side
+ * connections.
+ */
+
+
+/**
+ * SECTION:gtlsbackend
+ * @title: GTlsBackend
+ * @short_description: TLS backend implementation
+ * @include: gio/gio.h
+ *
+ *
+ */
+
+
+/**
+ * SECTION:gtlscertificate
+ * @title: GTlsCertificate
+ * @short_description: TLS certificate
+ * @see_also: #GTlsConnection
+ *
+ * A certificate used for TLS authentication and encryption.
+ * This can represent either a public key only (eg, the certificate
+ * received by a client from a server), or the combination of
+ * a public key and a private key (which is needed when acting as a
+ * #GTlsServerConnection).
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * SECTION:gtlsclientconnection
+ * @short_description: TLS client-side connection
+ * @include: gio/gio.h
+ *
+ * #GTlsClientConnection is the client-side subclass of
+ * #GTlsConnection, representing a client-side TLS connection.
+ */
+
+
+/**
+ * SECTION:gtlsconnection
+ * @short_description: TLS connection type
+ * @include: gio/gio.h
+ *
+ * #GTlsConnection is the base TLS connection class type, which wraps
+ * a #GIOStream and provides TLS encryption on top of it. Its
+ * subclasses, #GTlsClientConnection and #GTlsServerConnection,
+ * implement client-side and server-side TLS, respectively.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * SECTION:gtlsdatabase
+ * @short_description: TLS database type
+ * @include: gio/gio.h
+ *
+ * #GTlsDatabase is used to lookup certificates and other information
+ * from a certificate or key store. It is an abstract base class which
+ * TLS library specific subtypes override.
+ *
+ * Most common client applications will not directly interact with
+ * #GTlsDatabase. It is used internally by #GTlsConnection.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * SECTION:gtlsfiledatabase
+ * @short_description: TLS file based database type
+ * @include: gio/gio.h
+ *
+ * #GTlsFileDatabase is implemented by #GTlsDatabase objects which load
+ * their certificate information from a file. It is in interface which
+ * TLS library specific subtypes implement.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * SECTION:gtlsinteraction
+ * @short_description: Interaction with the user during TLS operations.
+ * @include: gio/gio.h
+ *
+ * #GTlsInteraction provides a mechanism for the TLS connection and database
+ * code to interact with the user. It can be used to ask the user for passwords.
+ *
+ * To use a #GTlsInteraction with a TLS connection use
+ * g_tls_connection_set_interaction().
+ *
+ * Callers should instantiate a derived class that implements the various
+ * interaction methods to show the required dialogs.
+ *
+ * Callers should use the 'invoke' functions like
+ * g_tls_interaction_invoke_ask_password() to run interaction methods. These
+ * functions make sure that the interaction is invoked in the main loop
+ * and not in the current thread, if the current thread is not running the
+ * main loop.
+ *
+ * Derived classes can choose to implement whichever interactions methods they'd
+ * like to support by overriding those virtual methods in their class
+ * initialization function. Any interactions not implemented will return
+ * %G_TLS_INTERACTION_UNHANDLED. If a derived class implements an async method,
+ * it must also implement the corresponding finish method.
+ */
+
+
+/**
+ * SECTION:gtlspassword
+ * @title: GTlsPassword
+ * @short_description: TLS Passwords for prompting
+ * @include: gio/gio.h
+ *
+ * Holds a password used in TLS.
+ */
+
+
+/**
+ * SECTION:gtlsserverconnection
+ * @short_description: TLS server-side connection
+ * @include: gio/gio.h
+ *
+ * #GTlsServerConnection is the server-side subclass of #GTlsConnection,
+ * representing a server-side TLS connection.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * SECTION:gunixconnection
+ * @title: GUnixConnection
+ * @short_description: A UNIX domain GSocketConnection
+ * @include: gio/gunixconnection.h
+ * @see_also: #GSocketConnection.
+ *
+ * This is the subclass of #GSocketConnection that is created
+ * for UNIX domain sockets.
+ *
+ * It contains functions to do some of the UNIX socket specific
+ * functionality like passing file descriptors.
+ *
+ * Note that <filename>&lt;gio/gunixconnection.h&gt;</filename> belongs to
+ * the UNIX-specific GIO interfaces, thus you have to use the
+ * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * SECTION:gunixcredentialsmessage
+ * @title: GUnixCredentialsMessage
+ * @short_description: A GSocketControlMessage containing credentials
+ * @include: gio/gunixcredentialsmessage.h
+ * @see_also: #GUnixConnection, #GSocketControlMessage
+ *
+ * This #GSocketControlMessage contains a #GCredentials instance.  It
+ * may be sent using g_socket_send_message() and received using
+ * g_socket_receive_message() over UNIX sockets (ie: sockets in the
+ * %G_SOCKET_FAMILY_UNIX family).
+ *
+ * For an easier way to send and receive credentials over
+ * stream-oriented UNIX sockets, see
+ * g_unix_connection_send_credentials() and
+ * g_unix_connection_receive_credentials(). To receive credentials of
+ * a foreign process connected to a socket, use
+ * g_socket_get_credentials().
+ */
+
+
+/**
+ * SECTION:gunixfdlist
+ * @title: GUnixFDList
+ * @short_description: An object containing a set of UNIX file descriptors
+ * @include: gio/gunixfdlist.h
+ * @see_also: #GUnixFDMessage
+ *
+ * A #GUnixFDList contains a list of file descriptors.  It owns the file
+ * descriptors that it contains, closing them when finalized.
+ *
+ * It may be wrapped in a #GUnixFDMessage and sent over a #GSocket in
+ * the %G_SOCKET_ADDRESS_UNIX family by using g_socket_send_message()
+ * and received using g_socket_receive_message().
+ *
+ * Note that <filename>&lt;gio/gunixfdlist.h&gt;</filename> belongs to
+ * the UNIX-specific GIO interfaces, thus you have to use the
+ * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
+ */
+
+
+/**
+ * SECTION:gunixfdmessage
+ * @title: GUnixFDMessage
+ * @short_description: A GSocketControlMessage containing a GUnixFDList
+ * @include: gio/gunixfdmessage.h
+ * @see_also: #GUnixConnection, #GUnixFDList, #GSocketControlMessage
+ *
+ * This #GSocketControlMessage contains a #GUnixFDList.
+ * It may be sent using g_socket_send_message() and received using
+ * g_socket_receive_message() over UNIX sockets (ie: sockets in the
+ * %G_SOCKET_ADDRESS_UNIX family). The file descriptors are copied
+ * between processes by the kernel.
+ *
+ * For an easier way to send and receive file descriptors over
+ * stream-oriented UNIX sockets, see g_unix_connection_send_fd() and
+ * g_unix_connection_receive_fd().
+ *
+ * Note that <filename>&lt;gio/gunixfdmessage.h&gt;</filename> belongs to
+ * the UNIX-specific GIO interfaces, thus you have to use the
+ * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
+ */
+
+
+/**
+ * SECTION:gunixinputstream
+ * @short_description: Streaming input operations for UNIX file descriptors
+ * @include: gio/gunixinputstream.h
+ * @see_also: #GInputStream
+ *
+ * #GUnixInputStream implements #GInputStream for reading from a UNIX
+ * file descriptor, including asynchronous operations. (If the file
+ * descriptor refers to a socket or pipe, this will use poll() to do
+ * asynchronous I/O. If it refers to a regular file, it will fall back
+ * to doing asynchronous I/O in another thread.)
+ *
+ * Note that <filename>&lt;gio/gunixinputstream.h&gt;</filename> belongs
+ * to the UNIX-specific GIO interfaces, thus you have to use the
+ * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
+ */
+
+
+/**
+ * SECTION:gunixmounts
+ * @include: gio/gunixmounts.h
+ * @short_description: UNIX mounts
+ *
+ * Routines for managing mounted UNIX mount points and paths.
+ *
+ * Note that <filename>&lt;gio/gunixmounts.h&gt;</filename> belongs to the
+ * UNIX-specific GIO interfaces, thus you have to use the
+ * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
+ */
+
+
+/**
+ * SECTION:gunixoutputstream
+ * @short_description: Streaming output operations for UNIX file descriptors
+ * @include: gio/gunixoutputstream.h
+ * @see_also: #GOutputStream
+ *
+ * #GUnixOutputStream implements #GOutputStream for writing to a UNIX
+ * file descriptor, including asynchronous operations. (If the file
+ * descriptor refers to a socket or pipe, this will use poll() to do
+ * asynchronous I/O. If it refers to a regular file, it will fall back
+ * to doing asynchronous I/O in another thread.)
+ *
+ * Note that <filename>&lt;gio/gunixoutputstream.h&gt;</filename> belongs
+ * to the UNIX-specific GIO interfaces, thus you have to use the
+ * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
+ */
+
+
+/**
+ * SECTION:gunixsocketaddress
+ * @short_description: UNIX GSocketAddress
+ * @include: gio/gunixsocketaddress.h
+ *
+ * Support for UNIX-domain (also known as local) sockets.
+ *
+ * UNIX domain sockets are generally visible in the filesystem.
+ * However, some systems support abstract socket names which are not
+ * visible in the filesystem and not affected by the filesystem
+ * permissions, visibility, etc. Currently this is only supported
+ * under Linux. If you attempt to use abstract sockets on other
+ * systems, function calls may return %G_IO_ERROR_NOT_SUPPORTED
+ * errors. You can use g_unix_socket_address_abstract_names_supported()
+ * to see if abstract names are supported.
+ *
+ * Note that <filename>&lt;gio/gunixsocketaddress.h&gt;</filename> belongs to
+ * the UNIX-specific GIO interfaces, thus you have to use the
+ * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
+ */
+
+
+/**
+ * SECTION:gvfs
+ * @short_description: Virtual File System
+ * @include: gio/gio.h
+ *
+ * Entry point for using GIO functionality.
+ */
+
+
+/**
+ * SECTION:gvolume
+ * @short_description: Volume management
+ * @include: gio/gio.h
+ *
+ * The #GVolume interface represents user-visible objects that can be
+ * mounted. Note, when porting from GnomeVFS, #GVolume is the moral
+ * equivalent of #GnomeVFSDrive.
+ *
+ * Mounting a #GVolume instance is an asynchronous operation. For more
+ * information about asynchronous operations, see #GAsyncResult and
+ * #GSimpleAsyncResult. To mount a #GVolume, first call
+ * g_volume_mount() with (at least) the #GVolume instance, optionally
+ * a #GMountOperation object and a #GAsyncReadyCallback.
+ *
+ * Typically, one will only want to pass %NULL 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.
+ *
+ * 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_volume_mount_finish() with the #GVolume instance and the
+ * #GAsyncReady data to see if the operation was completed
+ * successfully.  If an @error is present when g_volume_mount_finish()
+ * is called, then it will be filled with any error information.
+ *
+ * <para id="volume-identifier">
+ * 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. <filename>/dev/sda2</filename>),
+ * uuids. GIO uses predefind strings as names for the different kinds
+ * of identifiers: #G_VOLUME_IDENTIFIER_KIND_HAL_UDI,
+ * #G_VOLUME_IDENTIFIER_KIND_LABEL, etc. Use g_volume_get_identifier()
+ * to obtain an identifier for a volume.
+ * </para>
+ *
+ * Note that #G_VOLUME_IDENTIFIER_KIND_HAL_UDI will only be available
+ * when the gvfs hal volume monitor is in use. Other volume monitors
+ * will generally be able to provide the #G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE
+ * identifier, which can be used to obtain a hal device by means of
+ * libhal_manager_find_device_string_match().
+ */
+
+
+/**
+ * SECTION:gvolumemonitor
+ * @short_description: Volume Monitor
+ * @include: gio/gio.h
+ * @see_also: #GFileMonitor
+ *
+ * #GVolumeMonitor 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.
+ *
+ * #GVolumeMonitor is not <link
+ * linkend="g-main-context-push-thread-default">thread-default-context
+ * aware</link>, and so should not be used other than from the main
+ * thread, with no thread-default-context active.
+ */
+
+
+/**
+ * SECTION:gwin32inputstream
+ * @short_description: Streaming input operations for Windows file handles
+ * @include: gio/gwin32inputstream.h
+ * @see_also: #GInputStream
+ *
+ * #GWin32InputStream implements #GInputStream for reading from a
+ * Windows file handle.
+ *
+ * Note that <filename>&lt;gio/gwin32inputstream.h&gt;</filename> belongs
+ * to the Windows-specific GIO interfaces, thus you have to use the
+ * <filename>gio-windows-2.0.pc</filename> pkg-config file when using it.
+ */
+
+
+/**
+ * SECTION:gwin32outputstream
+ * @short_description: Streaming output operations for Windows file handles
+ * @include: gio/gwin32outputstream.h
+ * @see_also: #GOutputStream
+ *
+ * #GWin32OutputStream implements #GOutputStream for writing to a
+ * Windows file handle.
+ *
+ * Note that <filename>&lt;gio/gwin32outputstream.h&gt;</filename> belongs
+ * to the Windows-specific GIO interfaces, thus you have to use the
+ * <filename>gio-windows-2.0.pc</filename> pkg-config file when using it.
+ */
+
+
+/**
+ * SECTION:gzcompressor
+ * @short_description: Zlib compressor
+ * @include: gio/gio.h
+ *
+ * #GZlibCompressor is an implementation of #GConverter that
+ * compresses data using zlib.
+ */
+
+
+/**
+ * SECTION:gzdecompressor
+ * @short_description: Zlib decompressor
+ * @include: gio/gio.h
+ *
+ * #GZlibDecompressor is an implementation of #GConverter that
+ * decompresses data compressed with zlib.
+ */
+
+
+/**
+ * The string info map is an efficient data structure designed to be:
+ *
+ * 1) Implement <choices> with a list of valid strings
+ *
+ * 2) Implement <alias> by mapping one string to another
+ *
+ * 3) Implement enumerated types by mapping strings to integer values
+ * (and back).
+ *
+ * The map is made out of an array of uint32s.  Each entry in the array
+ * is an integer value, followed by a specially formatted string value:
+ *
+ * The string starts with the byte 0xff or 0xfe, followed by the
+ * content of the string, followed by a nul byte, followed by
+ * additional nul bytes for padding, followed by a 0xff byte.
+ *
+ * Padding is added so that the entire formatted string takes up a
+ * multiple of 4 bytes, and not less than 8 bytes.  The requirement
+ * for a string to take up 8 bytes is so that the scanner doesn't lose
+ * synch and mistake a string for an integer value.
+ *
+ * The first byte of the formatted string depends on if the integer is
+ * an enum value (0xff) or an alias (0xfe).  If it is an alias then the
+ * number refers to the word offset within the info map at which the
+ * integer corresponding to the "target" value is stored.
+ *
+ * For example, consider the case of the string info map representing an
+ * enumerated type of 'foo' (value 1) and 'bar' (value 2) and 'baz'
+ * (alias for 'bar').  Note that string info maps are always little
+ * endian.
+ *
+ * x01 x00 x00 x00   xff 'f' 'o' 'o'   x00 x00 x00 xff   x02 x00 x00 x00
+ * xff 'b' 'a' 'r'   x00 x00 x00 xff   x03 x00 x00 x00   xfe 'b' 'a' 'z'
+ * x00 x00 x00 xff
+ *
+ *
+ * The operations that someone may want to perform with the map:
+ *
+ * - lookup if a string is valid (and not an alias)
+ * - lookup the integer value for a enum 'nick'
+ * - lookup the integer value for the target of an alias
+ * - lookup an alias and convert it to its target string
+ * - lookup the enum nick for a given value
+ *
+ * In order to lookup if a string is valid, it is padded on either side
+ * (as described) and scanned for in the array.  For example, you might
+ * look for "foo":
+ *
+ * xff 'f' 'o' 'o'   x00 x00 x00 xff
+ *
+ * In order to lookup the integer value for a nick, the string is padded
+ * on either side and scanned for in the array, as above.  Instead of
+ * merely succeeding, we look at the integer value to the left of the
+ * match.  This is the enum value.
+ *
+ * In order to lookup an alias and convert it to its target enum value,
+ * the string is padded on either side (as described, with 0xfe) and
+ * scanned for.  For example, you might look for "baz":
+ *
+ * xfe 'b' 'a' 'z'  x00 x00 x00 xff
+ *
+ * The integer immediately preceding the match then contains the offset
+ * of the integer value of the target.  In our example, that's '3'.
+ * This index is dereferenced to find the enum value of '2'.
+ *
+ * To convert the alias to its target string, 5 bytes just need to be
+ * added past the start of the integer value to find the start of the
+ * string.
+ *
+ * To lookup the enum nick for a given value, the value is searched for
+ * in the array.  To ensure that the value isn't matching the inside of a
+ * string, we must check that it is either the first item in the array or
+ * immediately preceded by the byte 0xff.  It must also be immediately
+ * followed by the byte 0xff.
+ *
+ * Because strings always take up a minimum of 2 words, because 0xff or
+ * 0xfe never appear inside of a utf-8 string and because no two integer
+ * values ever appear in sequence, the only way we can have the
+ * sequence:
+ *
+ * xff __ __ __ __ xff (or 0xfe)
+ *
+ * is in the event of an integer nested between two strings.
+ *
+ * For implementation simplicity/efficiency, strings may not be more
+ * than 65 characters in length (ie: 17 32bit words after padding).
+ *
+ * In the event that we are doing <choices> (ie: not an enum type) then
+ * the value of each choice is set to zero and ignored.
+ */
+
+
+/**
+ * _g_io_module_get_default:
+ * @extension_point: the name of an extension point
+ * @envvar: (allow-none): the name of an environment variable to override the default implementation.
+ * @verify_func: (allow-none): a function to call to verify that a given implementation is usable in the current environment.
+ *
+ * Retrieves the default object implementing @extension_point.
+ *
+ * If @envvar is not %NULL, and the environment variable with that
+ * name is set, then the implementation it specifies will be tried
+ * first. After that, or if @envvar is not set, all other
+ * implementations will be tried in order of decreasing priority.
+ *
+ * If an extension point implementation implements #GInitable, then
+ * that implementation will only be used if it initializes
+ * successfully. Otherwise, if @verify_func is not %NULL, then it will
+ * be called on each candidate implementation after construction, to
+ * check if it is actually usable or not.
+ *
+ * The result is cached after it is generated the first time, and
+ * the function is thread-safe.
+ *
+ * @extension_point, or %NULL if there are no usable
+ * implementations.
+ *
+ * Returns: (transfer none): an object implementing
+ */
+
+
+/**
+ * g_action_activate:
+ * @action: a #GAction
+ * @parameter: (allow-none): the parameter to the activation
+ *
+ * Activates the action.
+ *
+ * @parameter must be the correct type of parameter for the action (ie:
+ * the parameter type given at construction time).  If the parameter
+ * type was %NULL then @parameter must also be %NULL.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_action_change_state:
+ * @action: a #GAction
+ * @value: the new state
+ *
+ * Request for the state of @action to be changed to @value.
+ *
+ * The action must be stateful and @value must be of the correct type.
+ * See g_action_get_state_type().
+ *
+ * This call merely requests a change.  The action may refuse to change
+ * its state or may change its state to something other than @value.
+ * See g_action_get_state_hint().
+ *
+ * If the @value GVariant is floating, it is consumed.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_action_get_enabled:
+ * @action: a #GAction
+ *
+ * Checks if @action is currently enabled.
+ *
+ * An action must be enabled in order to be activated or in order to
+ * have its state changed from outside callers.
+ *
+ * Returns: whether the action is enabled
+ * Since: 2.28
+ */
+
+
+/**
+ * g_action_get_name:
+ * @action: a #GAction
+ *
+ * Queries the name of @action.
+ *
+ * Returns: the name of the action
+ * Since: 2.28
+ */
+
+
+/**
+ * g_action_get_parameter_type:
+ * @action: a #GAction
+ *
+ * Queries the type of the parameter that must be given when activating
+ * @action.
+ *
+ * When activating the action using g_action_activate(), the #GVariant
+ * given to that function must be of the type returned by this function.
+ *
+ * In the case that this function returns %NULL, you must not give any
+ * #GVariant, but %NULL instead.
+ *
+ * Returns: (allow-none): the parameter type
+ * Since: 2.28
+ */
+
+
+/**
+ * g_action_get_state:
+ * @action: a #GAction
+ *
+ * Queries the current state of @action.
+ *
+ * If the action is not stateful then %NULL will be returned.  If the
+ * action is stateful then the type of the return value is the type
+ * given by g_action_get_state_type().
+ *
+ * The return value (if non-%NULL) should be freed with
+ * g_variant_unref() when it is no longer required.
+ *
+ * Returns: (transfer full): the current state of the action
+ * Since: 2.28
+ */
+
+
+/**
+ * g_action_get_state_hint:
+ * @action: a #GAction
+ *
+ * Requests a hint about the valid range of values for the state of
+ * @action.
+ *
+ * If %NULL is returned it either means that the action is not stateful
+ * or that there is no hint about the valid range of values for the
+ * state of the action.
+ *
+ * If a #GVariant array is returned then each item in the array is a
+ * possible value for the state.  If a #GVariant pair (ie: two-tuple) is
+ * returned then the tuple specifies the inclusive lower and upper bound
+ * of valid values for the state.
+ *
+ * In any case, the information is merely a hint.  It may be possible to
+ * have a state value outside of the hinted range and setting a value
+ * within the range may fail.
+ *
+ * The return value (if non-%NULL) should be freed with
+ * g_variant_unref() when it is no longer required.
+ *
+ * Returns: (transfer full): the state range hint
+ * Since: 2.28
+ */
+
+
+/**
+ * g_action_get_state_type:
+ * @action: a #GAction
+ *
+ * Queries the type of the state of @action.
+ *
+ * If the action is stateful (e.g. created with
+ * g_simple_action_new_stateful()) then this function returns the
+ * #GVariantType of the state.  This is the type of the initial value
+ * given as the state. All calls to g_action_change_state() must give a
+ * #GVariant of this type and g_action_get_state() will return a
+ * #GVariant of the same type.
+ *
+ * If the action is not stateful (e.g. created with g_simple_action_new())
+ * then this function will return %NULL. In that case, g_action_get_state()
+ * will return %NULL and you must not call g_action_change_state().
+ *
+ * Returns: (allow-none): the state type, if the action is stateful
+ * Since: 2.28
+ */
+
+
+/**
+ * g_action_group_action_added:
+ * @action_group: a #GActionGroup
+ * @action_name: the name of an action in the group
+ *
+ * Emits the #GActionGroup::action-added signal on @action_group.
+ *
+ * This function should only be called by #GActionGroup implementations.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_action_group_action_enabled_changed:
+ * @action_group: a #GActionGroup
+ * @action_name: the name of an action in the group
+ * @enabled: whether or not the action is now enabled
+ *
+ * Emits the #GActionGroup::action-enabled-changed signal on @action_group.
+ *
+ * This function should only be called by #GActionGroup implementations.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_action_group_action_removed:
+ * @action_group: a #GActionGroup
+ * @action_name: the name of an action in the group
+ *
+ * Emits the #GActionGroup::action-removed signal on @action_group.
+ *
+ * This function should only be called by #GActionGroup implementations.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_action_group_action_state_changed:
+ * @action_group: a #GActionGroup
+ * @action_name: the name of an action in the group
+ * @state: the new state of the named action
+ *
+ * Emits the #GActionGroup::action-state-changed signal on @action_group.
+ *
+ * This function should only be called by #GActionGroup implementations.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_action_group_activate_action:
+ * @action_group: a #GActionGroup
+ * @action_name: the name of the action to activate
+ * @parameter: (allow-none): parameters to the activation
+ *
+ * Activate the named action within @action_group.
+ *
+ * If the action is expecting a parameter, then the correct type of
+ * parameter must be given as @parameter.  If the action is expecting no
+ * parameters then @parameter must be %NULL.  See
+ * g_action_group_get_action_parameter_type().
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_action_group_change_action_state:
+ * @action_group: a #GActionGroup
+ * @action_name: the name of the action to request the change on
+ * @value: the new state
+ *
+ * Request for the state of the named action within @action_group to be
+ * changed to @value.
+ *
+ * The action must be stateful and @value must be of the correct type.
+ * See g_action_group_get_action_state_type().
+ *
+ * This call merely requests a change.  The action may refuse to change
+ * its state or may change its state to something other than @value.
+ * See g_action_group_get_action_state_hint().
+ *
+ * If the @value GVariant is floating, it is consumed.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_action_group_get_action_enabled:
+ * @action_group: a #GActionGroup
+ * @action_name: the name of the action to query
+ *
+ * Checks if the named action within @action_group is currently enabled.
+ *
+ * An action must be enabled in order to be activated or in order to
+ * have its state changed from outside callers.
+ *
+ * Returns: whether or not the action is currently enabled
+ * Since: 2.28
+ */
+
+
+/**
+ * g_action_group_get_action_parameter_type:
+ * @action_group: a #GActionGroup
+ * @action_name: the name of the action to query
+ *
+ * Queries the type of the parameter that must be given when activating
+ * the named action within @action_group.
+ *
+ * When activating the action using g_action_group_activate_action(),
+ * the #GVariant given to that function must be of the type returned
+ * by this function.
+ *
+ * In the case that this function returns %NULL, you must not give any
+ * #GVariant, but %NULL instead.
+ *
+ * The parameter type of a particular action will never change but it is
+ * possible for an action to be removed and for a new action to be added
+ * with the same name but a different parameter type.
+ *
+ * Returns: the parameter type
+ * Since: 2.28
+ */
+
+
+/**
+ * g_action_group_get_action_state:
+ * @action_group: a #GActionGroup
+ * @action_name: the name of the action to query
+ *
+ * Queries the current state of the named action within @action_group.
+ *
+ * If the action is not stateful then %NULL will be returned.  If the
+ * action is stateful then the type of the return value is the type
+ * given by g_action_group_get_action_state_type().
+ *
+ * The return value (if non-%NULL) should be freed with
+ * g_variant_unref() when it is no longer required.
+ *
+ * Returns: (allow-none): the current state of the action
+ * Since: 2.28
+ */
+
+
+/**
+ * g_action_group_get_action_state_hint:
+ * @action_group: a #GActionGroup
+ * @action_name: the name of the action to query
+ *
+ * Requests a hint about the valid range of values for the state of the
+ * named action within @action_group.
+ *
+ * If %NULL is returned it either means that the action is not stateful
+ * or that there is no hint about the valid range of values for the
+ * state of the action.
+ *
+ * If a #GVariant array is returned then each item in the array is a
+ * possible value for the state.  If a #GVariant pair (ie: two-tuple) is
+ * returned then the tuple specifies the inclusive lower and upper bound
+ * of valid values for the state.
+ *
+ * In any case, the information is merely a hint.  It may be possible to
+ * have a state value outside of the hinted range and setting a value
+ * within the range may fail.
+ *
+ * The return value (if non-%NULL) should be freed with
+ * g_variant_unref() when it is no longer required.
+ *
+ * Returns: (transfer full): the state range hint
+ * Since: 2.28
+ */
+
+
+/**
+ * g_action_group_get_action_state_type:
+ * @action_group: a #GActionGroup
+ * @action_name: the name of the action to query
+ *
+ * Queries the type of the state of the named action within
+ * @action_group.
+ *
+ * If the action is stateful then this function returns the
+ * #GVariantType of the state.  All calls to
+ * g_action_group_change_action_state() must give a #GVariant of this
+ * type and g_action_group_get_action_state() will return a #GVariant
+ * of the same type.
+ *
+ * If the action is not stateful then this function will return %NULL.
+ * In that case, g_action_group_get_action_state() will return %NULL
+ * and you must not call g_action_group_change_action_state().
+ *
+ * The state type of a particular action will never change but it is
+ * possible for an action to be removed and for a new action to be added
+ * with the same name but a different state type.
+ *
+ * Returns: (transfer full): the state type, if the action is stateful
+ * Since: 2.28
+ */
+
+
+/**
+ * g_action_group_has_action:
+ * @action_group: a #GActionGroup
+ * @action_name: the name of the action to check for
+ *
+ * Checks if the named action exists within @action_group.
+ *
+ * Returns: whether the named action exists
+ * Since: 2.28
+ */
+
+
+/**
+ * g_action_group_list_actions:
+ * @action_group: a #GActionGroup
+ *
+ * Lists the actions contained within @action_group.
+ *
+ * The caller is responsible for freeing the list with g_strfreev() when
+ * it is no longer required.
+ *
+ * actions in the groupb
+ *
+ * Returns: (transfer full): a %NULL-terminated array of the names of the
+ * Since: 2.28
+ */
+
+
+/**
+ * g_action_group_query_action:
+ * @action_group: a #GActionGroup
+ * @action_name: the name of an action in the group
+ * @enabled: (out): if the action is presently enabled
+ * @parameter_type: (out) (allow-none): the parameter type, or %NULL if none needed
+ * @state_type: (out) (allow-none): the state type, or %NULL if stateless
+ * @state_hint: (out) (allow-none): the state hint, or %NULL if none
+ * @state: (out) (allow-none): the current state, or %NULL if stateless
+ *
+ * Queries all aspects of the named action within an @action_group.
+ *
+ * This function acquires the information available from
+ * g_action_group_has_action(), g_action_group_get_action_enabled(),
+ * g_action_group_get_action_parameter_type(),
+ * g_action_group_get_action_state_type(),
+ * g_action_group_get_action_state_hint() and
+ * g_action_group_get_action_state() with a single function call.
+ *
+ * This provides two main benefits.
+ *
+ * The first is the improvement in efficiency that comes with not having
+ * to perform repeated lookups of the action in order to discover
+ * different things about it.  The second is that implementing
+ * #GActionGroup can now be done by only overriding this one virtual
+ * function.
+ *
+ * The interface provides a default implementation of this function that
+ * calls the individual functions, as required, to fetch the
+ * information.  The interface also provides default implementations of
+ * those functions that call this function.  All implementations,
+ * therefore, must override either this function or all of the others.
+ *
+ * If the action exists, %TRUE is returned and any of the requested
+ * fields (as indicated by having a non-%NULL reference passed in) are
+ * filled.  If the action doesn't exist, %FALSE is returned and the
+ * fields may or may not have been modified.
+ *
+ * Returns: %TRUE if the action exists, else %FALSE
+ * Since: 2.32
+ */
+
+
+/**
+ * g_action_map_add_action:
+ * @action_map: a #GActionMap
+ * @action: a #GAction
+ *
+ * Adds an action to the @action_map.
+ *
+ * If the action map already contains an action with the same name
+ * as @action then the old action is dropped from the action map.
+ *
+ * The action map takes its own reference on @action.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_action_map_add_action_entries:
+ * @action_map: a #GActionMap
+ * @entries: a pointer to the first item in an array of #GActionEntry structs
+ * @n_entries: the length of @entries, or -1 if @entries is %NULL-terminated
+ * @user_data: the user data for signal connections
+ *
+ * A convenience function for creating multiple #GSimpleAction instances
+ * and adding them to a #GActionMap.
+ *
+ * Each action is constructed as per one #GActionEntry.
+ *
+ * <example>
+ * <title>Using g_action_map_add_action_entries()</title>
+ * <programlisting>
+ * static void
+ * activate_quit (GSimpleAction *simple,
+ * GVariant      *parameter,
+ * gpointer       user_data)
+ * {
+ * exit (0);
+ * }
+ *
+ * static void
+ * activate_print_string (GSimpleAction *simple,
+ * GVariant      *parameter,
+ * gpointer       user_data)
+ * {
+ * g_print ("%s\n", g_variant_get_string (parameter, NULL));
+ * }
+ *
+ * static GActionGroup *
+ * create_action_group (void)
+ * {
+ * const GActionEntry entries[] = {
+ * { "quit",         activate_quit              },
+ * { "print-string", activate_print_string, "s" }
+ * };
+ * GSimpleActionGroup *group;
+ *
+ * group = g_simple_action_group_new ();
+ * g_action_map_add_action_entries (G_ACTION_MAP (group), entries, G_N_ELEMENTS (entries), NULL);
+ *
+ * return G_ACTION_GROUP (group);
+ * }
+ * </programlisting>
+ * </example>
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_action_map_lookup_action:
+ * @action_map: a #GActionMap
+ * @action_name: the name of an action
+ *
+ * Looks up the action with the name @action_name in @action_map.
+ *
+ * If no such action exists, returns %NULL.
+ *
+ * Returns: (transfer none): a #GAction, or %NULL
+ * Since: 2.32
+ */
+
+
+/**
+ * g_action_map_remove_action:
+ * @action_map: a #GActionMap
+ * @action_name: the name of the action
+ *
+ * Removes the named action from the action map.
+ *
+ * If no action of this name is in the map then nothing happens.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_alloca:
+ * @size: number of bytes to allocate.
+ *
+ * Allocates @size bytes on the stack; these bytes will be freed when the current
+ * stack frame is cleaned up. This macro essentially just wraps the alloca()
+ * function present on most UNIX variants.
+ * Thus it provides the same advantages and pitfalls as alloca():
+ * <variablelist>
+ * <varlistentry><term></term><listitem><para>
+ * + alloca() is very fast, as on most systems it's implemented by just adjusting
+ * the stack pointer register.
+ * </para></listitem></varlistentry>
+ * <varlistentry><term></term><listitem><para>
+ * + It doesn't cause any memory fragmentation, within its scope, separate alloca()
+ * blocks just build up and are released together at function end.
+ * </para></listitem></varlistentry>
+ * <varlistentry><term></term><listitem><para>
+ * - Allocation sizes have to fit into the current stack frame. For instance in a
+ * threaded environment on Linux, the per-thread stack size is limited to 2 Megabytes,
+ * so be sparse with alloca() uses.
+ * </para></listitem></varlistentry>
+ * <varlistentry><term></term><listitem><para>
+ * - Allocation failure due to insufficient stack space is not indicated with a %NULL
+ * return like e.g. with malloc(). Instead, most systems probably handle it the same
+ * way as out of stack space situations from infinite function recursion, i.e.
+ * with a segmentation fault.
+ * </para></listitem></varlistentry>
+ * <varlistentry><term></term><listitem><para>
+ * - Special care has to be taken when mixing alloca() with GNU C variable sized arrays.
+ * Stack space allocated with alloca() in the same scope as a variable sized array
+ * will be freed together with the variable sized array upon exit of that scope, and
+ * not upon exit of the enclosing function scope.
+ * </para></listitem></varlistentry>
+ * </variablelist>
+ *
+ * Returns: space for @size bytes, allocated on the stack
+ */
+
+
+/**
+ * g_app_info_add_supports_type:
+ * @appinfo: a #GAppInfo.
+ * @content_type: a string.
+ * @error: a #GError.
+ *
+ * Adds a content type to the application information to indicate the
+ * application is capable of opening files with the given content type.
+ *
+ * Returns: %TRUE on success, %FALSE on error.
+ */
+
+
+/**
+ * g_app_info_can_delete:
+ * @appinfo: a #GAppInfo
+ *
+ * Obtains the information whether the #GAppInfo can be deleted.
+ * See g_app_info_delete().
+ *
+ * Returns: %TRUE if @appinfo can be deleted
+ * Since: 2.20
+ */
+
+
+/**
+ * g_app_info_can_remove_supports_type:
+ * @appinfo: a #GAppInfo.
+ *
+ * Checks if a supported content type can be removed from an application.
+ *
+ * content types from a given @appinfo, %FALSE if not.
+ *
+ * Returns: %TRUE if it is possible to remove supported
+ */
+
+
+/**
+ * g_app_info_create_from_commandline:
+ * @commandline: the commandline to use
+ * @application_name: (allow-none): the application name, or %NULL to use @commandline
+ * @flags: flags that can specify details of the created #GAppInfo
+ * @error: a #GError location to store the error occurring, %NULL to ignore.
+ *
+ * Creates a new #GAppInfo from the given information.
+ *
+ * Returns: (transfer full): new #GAppInfo for given command.
+ */
+
+
+/**
+ * g_app_info_delete:
+ * @appinfo: a #GAppInfo
+ *
+ * Tries to delete a #GAppInfo.
+ *
+ * On some platforms, there may be a difference between user-defined
+ * #GAppInfo<!-- -->s which can be deleted, and system-wide ones which
+ * cannot. See g_app_info_can_delete().
+ *
+ * Virtual: do_delete
+ * Returns: %TRUE if @appinfo has been deleted
+ * Since: 2.20
+ */
+
+
+/**
+ * g_app_info_dup:
+ * @appinfo: a #GAppInfo.
+ *
+ * Creates a duplicate of a #GAppInfo.
+ *
+ * Returns: (transfer full): a duplicate of @appinfo.
+ */
+
+
+/**
+ * g_app_info_equal:
+ * @appinfo1: the first #GAppInfo.
+ * @appinfo2: the second #GAppInfo.
+ *
+ * Checks if two #GAppInfo<!-- -->s are equal.
+ *
+ * Returns: %TRUE if @appinfo1 is equal to @appinfo2. %FALSE otherwise.
+ */
+
+
+/**
+ * g_app_info_get_all:
+ *
+ * Gets a list of all of the applications currently registered
+ * on this system.
+ *
+ * For desktop files, this includes applications that have
+ * <literal>NoDisplay=true</literal> set or are excluded from
+ * display by means of <literal>OnlyShowIn</literal> or
+ * <literal>NotShowIn</literal>. See g_app_info_should_show().
+ * The returned list does not include applications which have
+ * the <literal>Hidden</literal> key set.
+ *
+ * Returns: (element-type GAppInfo) (transfer full): a newly allocated #GList of references to #GAppInfo<!---->s.
+ */
+
+
+/**
+ * g_app_info_get_all_for_type:
+ * @content_type: the content type to find a #GAppInfo for
+ *
+ * Gets a list of all #GAppInfos for a given content type,
+ * including the recommended and fallback #GAppInfos. See
+ * g_app_info_get_recommended_for_type() and
+ * g_app_info_get_fallback_for_type().
+ *
+ * for given @content_type or %NULL on error.
+ *
+ * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
+ */
+
+
+/**
+ * g_app_info_get_commandline:
+ * @appinfo: a #GAppInfo
+ *
+ * Gets the commandline with which the application will be
+ * started.
+ *
+ * or %NULL if this information is not available
+ *
+ * Returns: a string containing the @appinfo's commandline,
+ * Since: 2.20
+ */
+
+
+/**
+ * g_app_info_get_default_for_type:
+ * @content_type: the content type to find a #GAppInfo for
+ * @must_support_uris: if %TRUE, the #GAppInfo is expected to support URIs
+ *
+ * Gets the default #GAppInfo for a given content type.
+ *
+ * %NULL on error.
+ *
+ * Returns: (transfer full): #GAppInfo for given @content_type or
+ */
+
+
+/**
+ * g_app_info_get_default_for_uri_scheme:
+ * @uri_scheme: a string containing a URI scheme.
+ *
+ * Gets the default application for handling URIs with
+ * the given URI scheme. A URI scheme is the initial part
+ * of the URI, up to but not including the ':', e.g. "http",
+ * "ftp" or "sip".
+ *
+ * Returns: (transfer full): #GAppInfo for given @uri_scheme or %NULL on error.
+ */
+
+
+/**
+ * g_app_info_get_description:
+ * @appinfo: a #GAppInfo.
+ *
+ * Gets a human-readable description of an installed application.
+ *
+ * application @appinfo, or %NULL if none.
+ *
+ * Returns: a string containing a description of the
+ */
+
+
+/**
+ * g_app_info_get_display_name:
+ * @appinfo: a #GAppInfo.
+ *
+ * Gets the display name of the application. The display name is often more
+ * descriptive to the user than the name itself.
+ *
+ * no display name is available.
+ *
+ * Returns: the display name of the application for @appinfo, or the name if
+ * Since: 2.24
+ */
+
+
+/**
+ * g_app_info_get_executable:
+ * @appinfo: a #GAppInfo
+ *
+ * Gets the executable's name for the installed application.
+ *
+ * binaries name
+ *
+ * Returns: a string containing the @appinfo's application
+ */
+
+
+/**
+ * g_app_info_get_fallback_for_type:
+ * @content_type: the content type to find a #GAppInfo for
+ *
+ * Gets a list of fallback #GAppInfos for a given content type, i.e.
+ * those applications which claim to support the given content type
+ * by MIME type subclassing and not directly.
+ *
+ * for given @content_type or %NULL on error.
+ *
+ * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
+ * Since: 2.28
+ */
+
+
+/**
+ * g_app_info_get_icon:
+ * @appinfo: a #GAppInfo.
+ *
+ * Gets the icon for the application.
+ *
+ * if there is no default icon.
+ *
+ * Returns: (transfer none): the default #GIcon for @appinfo or %NULL
+ */
+
+
+/**
+ * g_app_info_get_id:
+ * @appinfo: a #GAppInfo.
+ *
+ * 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.
+ *
+ * Note that the returned ID may be %NULL, depending on how
+ * the @appinfo has been constructed.
+ *
+ * Returns: a string containing the application's ID.
+ */
+
+
+/**
+ * g_app_info_get_name:
+ * @appinfo: a #GAppInfo.
+ *
+ * Gets the installed name of the application.
+ *
+ * Returns: the name of the application for @appinfo.
+ */
+
+
+/**
+ * g_app_info_get_recommended_for_type:
+ * @content_type: the content type to find a #GAppInfo for
+ *
+ * Gets a list of recommended #GAppInfos for a given content type, i.e.
+ * those applications which claim to support the given content type exactly,
+ * and not by MIME type subclassing.
+ * Note that the first application of the list is the last used one, i.e.
+ * the last one for which g_app_info_set_as_last_used_for_type() has been
+ * called.
+ *
+ * for given @content_type or %NULL on error.
+ *
+ * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
+ * Since: 2.28
+ */
+
+
+/**
+ * g_app_info_launch:
+ * @appinfo: a #GAppInfo
+ * @files: (element-type GFile): a #GList of #GFile objects
+ * @launch_context: (allow-none): a #GAppLaunchContext or %NULL
+ * @error: a #GError
+ *
+ * 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.
+ *
+ * To launch the application without arguments pass a %NULL @files list.
+ *
+ * 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.
+ *
+ * Some URIs can be changed when passed through a GFile (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
+ * g_app_info_launch_uris() instead.
+ *
+ * The launched application inherits the environment of the launching
+ * process, but it can be modified with g_app_launch_context_setenv() and
+ * g_app_launch_context_unsetenv().
+ *
+ * On UNIX, this function sets the <envar>GIO_LAUNCHED_DESKTOP_FILE</envar>
+ * environment variable with the path of the launched desktop file and
+ * <envar>GIO_LAUNCHED_DESKTOP_FILE_PID</envar> to the process
+ * id of the launched process. This can be used to ignore
+ * <envar>GIO_LAUNCHED_DESKTOP_FILE</envar>, should it be inherited
+ * by further processes. The <envar>DISPLAY</envar> and
+ * <envar>DESKTOP_STARTUP_ID</envar> environment variables are also
+ * set, based on information provided in @launch_context.
+ *
+ * Returns: %TRUE on successful launch, %FALSE otherwise.
+ */
+
+
+/**
+ * g_app_info_launch_default_for_uri:
+ * @uri: the uri to show
+ * @launch_context: (allow-none): an optional #GAppLaunchContext.
+ * @error: a #GError.
+ *
+ * Utility function that launches the default application
+ * registered to handle the specified uri. Synchronous I/O
+ * is done on the uri to detect the type of the file if
+ * required.
+ *
+ * Returns: %TRUE on success, %FALSE on error.
+ */
+
+
+/**
+ * g_app_info_launch_uris:
+ * @appinfo: a #GAppInfo
+ * @uris: (element-type utf8): a #GList containing URIs to launch.
+ * @launch_context: (allow-none): a #GAppLaunchContext or %NULL
+ * @error: a #GError
+ *
+ * Launches the application. This passes the @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.
+ *
+ * To launch the application without arguments pass a %NULL @uris list.
+ *
+ * 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.
+ *
+ * Returns: %TRUE on successful launch, %FALSE otherwise.
+ */
+
+
+/**
+ * g_app_info_remove_supports_type:
+ * @appinfo: a #GAppInfo.
+ * @content_type: a string.
+ * @error: a #GError.
+ *
+ * Removes a supported type from an application, if possible.
+ *
+ * Returns: %TRUE on success, %FALSE on error.
+ */
+
+
+/**
+ * g_app_info_reset_type_associations:
+ * @content_type: a content type
+ *
+ * Removes all changes to the type associations done by
+ * g_app_info_set_as_default_for_type(),
+ * g_app_info_set_as_default_for_extension(),
+ * g_app_info_add_supports_type() or
+ * g_app_info_remove_supports_type().
+ *
+ * Since: 2.20
+ */
+
+
+/**
+ * g_app_info_set_as_default_for_extension:
+ * @appinfo: a #GAppInfo.
+ * @extension: a string containing the file extension (without the dot).
+ * @error: a #GError.
+ *
+ * Sets the application as the default handler for the given file extension.
+ *
+ * Returns: %TRUE on success, %FALSE on error.
+ */
+
+
+/**
+ * g_app_info_set_as_default_for_type:
+ * @appinfo: a #GAppInfo.
+ * @content_type: the content type.
+ * @error: a #GError.
+ *
+ * Sets the application as the default handler for a given type.
+ *
+ * Returns: %TRUE on success, %FALSE on error.
+ */
+
+
+/**
+ * g_app_info_set_as_last_used_for_type:
+ * @appinfo: a #GAppInfo.
+ * @content_type: the content type.
+ * @error: a #GError.
+ *
+ * Sets the application as the last used application for a given type.
+ * This will make the application appear as first in the list returned
+ * by g_app_info_get_recommended_for_type(), regardless of the default
+ * application for that content type.
+ *
+ * Returns: %TRUE on success, %FALSE on error.
+ */
+
+
+/**
+ * g_app_info_should_show:
+ * @appinfo: a #GAppInfo.
+ *
+ * Checks if the application info should be shown in menus that
+ * list available applications.
+ *
+ * Returns: %TRUE if the @appinfo should be shown, %FALSE otherwise.
+ */
+
+
+/**
+ * g_app_info_supports_files:
+ * @appinfo: a #GAppInfo.
+ *
+ * Checks if the application accepts files as arguments.
+ *
+ * Returns: %TRUE if the @appinfo supports files.
+ */
+
+
+/**
+ * g_app_info_supports_uris:
+ * @appinfo: a #GAppInfo.
+ *
+ * Checks if the application supports reading files and directories from URIs.
+ *
+ * Returns: %TRUE if the @appinfo supports URIs.
+ */
+
+
+/**
+ * g_app_launch_context_get_display:
+ * @context: a #GAppLaunchContext
+ * @info: a #GAppInfo
+ * @files: (element-type GFile): a #GList of #GFile objects
+ *
+ * Gets the display string for the @context. This is used to ensure new
+ * applications are started on the same display as the launching
+ * application, by setting the <envar>DISPLAY</envar> environment variable.
+ *
+ * Returns: a display string for the display.
+ */
+
+
+/**
+ * g_app_launch_context_get_environment:
+ * @context: a #GAppLaunchContext
+ *
+ * Gets the complete environment variable list to be passed to
+ * the child process when @context is used to launch an application.
+ * This is a %NULL-terminated array of strings, where each string has
+ * the form <literal>KEY=VALUE</literal>.
+ *
+ * child's environment
+ *
+ * Returns: (array zero-terminated=1) (transfer full): the
+ * Since: 2.32
+ */
+
+
+/**
+ * g_app_launch_context_get_startup_notify_id:
+ * @context: a #GAppLaunchContext
+ * @info: a #GAppInfo
+ * @files: (element-type GFile): a #GList of of #GFile objects
+ *
+ * Initiates startup notification for the application and returns the
+ * <envar>DESKTOP_STARTUP_ID</envar> for the launched operation,
+ * if supported.
+ *
+ * Startup notification IDs are defined in the <ulink
+ * url="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt">
+ * FreeDesktop.Org Startup Notifications standard</ulink>.
+ *
+ * not supported.
+ *
+ * Returns: a startup notification ID for the application, or %NULL if
+ */
+
+
+/**
+ * g_app_launch_context_launch_failed:
+ * @context: a #GAppLaunchContext.
+ * @startup_notify_id: the startup notification id that was returned by g_app_launch_context_get_startup_notify_id().
+ *
+ * Called when an application has failed to launch, so that it can cancel
+ * the application startup notification started in g_app_launch_context_get_startup_notify_id().
+ */
+
+
+/**
+ * g_app_launch_context_new:
+ *
+ * Creates a new application launch context. This is not normally used,
+ * instead you instantiate a subclass of this, such as #GdkAppLaunchContext.
+ *
+ * Returns: a #GAppLaunchContext.
+ */
+
+
+/**
+ * g_app_launch_context_setenv:
+ * @context: a #GAppLaunchContext
+ * @variable: the environment variable to set
+ * @value: the value for to set the variable to.
+ *
+ * Arranges for @variable to be set to @value in the child's
+ * environment when @context is used to launch an application.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_app_launch_context_unsetenv:
+ * @context: a #GAppLaunchContext
+ * @variable: the environment variable to remove
+ *
+ * Arranges for @variable to be unset in the child's environment
+ * when @context is used to launch an application.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_application_activate:
+ * @application: a #GApplication
+ *
+ * Activates the application.
+ *
+ * In essence, this results in the #GApplication::activate signal being
+ * emitted in the primary instance.
+ *
+ * The application must be registered before calling this function.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_application_command_line_get_arguments:
+ * @cmdline: a #GApplicationCommandLine
+ * @argc: (out) (allow-none): the length of the arguments array, or %NULL
+ *
+ * Gets the list of arguments that was passed on the command line.
+ *
+ * The strings in the array may contain non-utf8 data.
+ *
+ * The return value is %NULL-terminated and should be freed using
+ * g_strfreev().
+ *
+ * containing the arguments (the argv)
+ *
+ * Returns: (array length=argc) (transfer full): the string array
+ * Since: 2.28
+ */
+
+
+/**
+ * g_application_command_line_get_cwd:
+ * @cmdline: a #GApplicationCommandLine
+ *
+ * Gets the working directory of the command line invocation.
+ * The string may contain non-utf8 data.
+ *
+ * It is possible that the remote application did not send a working
+ * directory, so this may be %NULL.
+ *
+ * The return value should not be modified or freed and is valid for as
+ * long as @cmdline exists.
+ *
+ * Returns: the current directory, or %NULL
+ * Since: 2.28
+ */
+
+
+/**
+ * g_application_command_line_get_environ:
+ * @cmdline: a #GApplicationCommandLine
+ *
+ * Gets the contents of the 'environ' variable of the command line
+ * invocation, as would be returned by g_get_environ(), ie as a
+ * %NULL-terminated list of strings in the form 'NAME=VALUE'.
+ * The strings may contain non-utf8 data.
+ *
+ * The remote application usually does not send an environment.  Use
+ * %G_APPLICATION_SEND_ENVIRONMENT to affect that.  Even with this flag
+ * set it is possible that the environment is still not available (due
+ * to invocation messages from other applications).
+ *
+ * The return value should not be modified or freed and is valid for as
+ * long as @cmdline exists.
+ *
+ * See g_application_command_line_getenv() if you are only interested
+ * in the value of a single environment variable.
+ *
+ * strings, or %NULL if they were not sent
+ *
+ * Returns: (array zero-terminated=1) (transfer none): the environment
+ * Since: 2.28
+ */
+
+
+/**
+ * g_application_command_line_get_exit_status:
+ * @cmdline: a #GApplicationCommandLine
+ *
+ * Gets the exit status of @cmdline.  See
+ * g_application_command_line_set_exit_status() for more information.
+ *
+ * Returns: the exit status
+ * Since: 2.28
+ */
+
+
+/**
+ * g_application_command_line_get_is_remote:
+ * @cmdline: a #GApplicationCommandLine
+ *
+ * Determines if @cmdline represents a remote invocation.
+ *
+ * Returns: %TRUE if the invocation was remote
+ * Since: 2.28
+ */
+
+
+/**
+ * g_application_command_line_get_platform_data:
+ * @cmdline: #GApplicationCommandLine
+ *
+ * Gets the platform data associated with the invocation of @cmdline.
+ *
+ * This is a #GVariant dictionary containing information about the
+ * context in which the invocation occurred.  It typically contains
+ * information like the current working directory and the startup
+ * notification ID.
+ *
+ * For local invocation, it will be %NULL.
+ *
+ * Returns: (allow-none): the platform data, or %NULL
+ * Since: 2.28
+ */
+
+
+/**
+ * g_application_command_line_getenv:
+ * @cmdline: a #GApplicationCommandLine
+ * @name: the environment variable to get
+ *
+ * Gets the value of a particular environment variable of the command
+ * line invocation, as would be returned by g_getenv().  The strings may
+ * contain non-utf8 data.
+ *
+ * The remote application usually does not send an environment.  Use
+ * %G_APPLICATION_SEND_ENVIRONMENT to affect that.  Even with this flag
+ * set it is possible that the environment is still not available (due
+ * to invocation messages from other applications).
+ *
+ * The return value should not be modified or freed and is valid for as
+ * long as @cmdline exists.
+ *
+ * Returns: the value of the variable, or %NULL if unset or unsent
+ * Since: 2.28
+ */
+
+
+/**
+ * g_application_command_line_print:
+ * @cmdline: a #GApplicationCommandLine
+ * @format: a printf-style format string
+ * @...: arguments, as per @format
+ *
+ * Formats a message and prints it using the stdout print handler in the
+ * invoking process.
+ *
+ * If @cmdline is a local invocation then this is exactly equivalent to
+ * g_print().  If @cmdline is remote then this is equivalent to calling
+ * g_print() in the invoking process.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_application_command_line_printerr:
+ * @cmdline: a #GApplicationCommandLine
+ * @format: a printf-style format string
+ * @...: arguments, as per @format
+ *
+ * Formats a message and prints it using the stderr print handler in the
+ * invoking process.
+ *
+ * If @cmdline is a local invocation then this is exactly equivalent to
+ * g_printerr().  If @cmdline is remote then this is equivalent to
+ * calling g_printerr() in the invoking process.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_application_command_line_set_exit_status:
+ * @cmdline: a #GApplicationCommandLine
+ * @exit_status: the exit status
+ *
+ * Sets the exit status that will be used when the invoking process
+ * exits.
+ *
+ * The return value of the #GApplication::command-line signal is
+ * passed to this function when the handler returns.  This is the usual
+ * way of setting the exit status.
+ *
+ * In the event that you want the remote invocation to continue running
+ * and want to decide on the exit status in the future, you can use this
+ * call.  For the case of a remote invocation, the remote process will
+ * typically exit when the last reference is dropped on @cmdline.  The
+ * exit status of the remote process will be equal to the last value
+ * that was set with this function.
+ *
+ * In the case that the commandline invocation is local, the situation
+ * is slightly more complicated.  If the commandline invocation results
+ * in the mainloop running (ie: because the use-count of the application
+ * increased to a non-zero value) then the application is considered to
+ * have been 'successful' in a certain sense, and the exit status is
+ * always zero.  If the application use count is zero, though, the exit
+ * status of the local #GApplicationCommandLine is used.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_application_get_application_id:
+ * @application: a #GApplication
+ *
+ * Gets the unique identifier for @application.
+ *
+ * Returns: the identifier for @application, owned by @application
+ * Since: 2.28
+ */
+
+
+/**
+ * g_application_get_default:
+ *
+ * Returns the default #GApplication instance for this process.
+ *
+ * Normally there is only one #GApplication per process and it becomes
+ * the default when it is created.  You can exercise more control over
+ * this by using g_application_set_default().
+ *
+ * If there is no default application then %NULL is returned.
+ *
+ * Returns: (transfer none): the default application for this process, or %NULL
+ * Since: 2.32
+ */
+
+
+/**
+ * g_application_get_flags:
+ * @application: a #GApplication
+ *
+ * Gets the flags for @application.
+ *
+ * See #GApplicationFlags.
+ *
+ * Returns: the flags for @application
+ * Since: 2.28
+ */
+
+
+/**
+ * g_application_get_inactivity_timeout:
+ * @application: a #GApplication
+ *
+ * Gets the current inactivity timeout for the application.
+ *
+ * This is the amount of time (in milliseconds) after the last call to
+ * g_application_release() before the application stops running.
+ *
+ * Returns: the timeout, in milliseconds
+ * Since: 2.28
+ */
+
+
+/**
+ * g_application_get_is_registered:
+ * @application: a #GApplication
+ *
+ * Checks if @application is registered.
+ *
+ * An application is registered if g_application_register() has been
+ * successfully called.
+ *
+ * Returns: %TRUE if @application is registered
+ * Since: 2.28
+ */
+
+
+/**
+ * g_application_get_is_remote:
+ * @application: a #GApplication
+ *
+ * Checks if @application is remote.
+ *
+ * If @application is remote then it means that another instance of
+ * application already exists (the 'primary' instance).  Calls to
+ * perform actions on @application will result in the actions being
+ * performed by the primary instance.
+ *
+ * The value of this property cannot be accessed before
+ * g_application_register() has been called.  See
+ * g_application_get_is_registered().
+ *
+ * Returns: %TRUE if @application is remote
+ * Since: 2.28
+ */
+
+
+/**
+ * g_application_hold:
+ * @application: a #GApplication
+ *
+ * Increases the use count of @application.
+ *
+ * Use this function to indicate that the application has a reason to
+ * continue to run.  For example, g_application_hold() is called by GTK+
+ * when a toplevel window is on the screen.
+ *
+ * To cancel the hold, call g_application_release().
+ */
+
+
+/**
+ * g_application_id_is_valid:
+ * @application_id: a potential application identifier
+ *
+ * Checks if @application_id is a valid application identifier.
+ *
+ * A valid ID is required for calls to g_application_new() and
+ * g_application_set_application_id().
+ *
+ * For convenience, the restrictions on application identifiers are
+ * reproduced here:
+ * <itemizedlist>
+ * <listitem>Application identifiers must contain only the ASCII characters "[A-Z][a-z][0-9]_-." and must not begin with a digit.</listitem>
+ * <listitem>Application identifiers must contain at least one '.' (period) character (and thus at least three elements).</listitem>
+ * <listitem>Application identifiers must not begin or end with a '.' (period) character.</listitem>
+ * <listitem>Application identifiers must not contain consecutive '.' (period) characters.</listitem>
+ * <listitem>Application identifiers must not exceed 255 characters.</listitem>
+ * </itemizedlist>
+ *
+ * Returns: %TRUE if @application_id is valid
+ */
+
+
+/**
+ * g_application_new:
+ * @application_id: the application id
+ * @flags: the application flags
+ *
+ * Creates a new #GApplication instance.
+ *
+ * This function calls g_type_init() for you.
+ *
+ * The application id must be valid.  See g_application_id_is_valid().
+ *
+ * Returns: a new #GApplication instance
+ */
+
+
+/**
+ * g_application_open:
+ * @application: a #GApplication
+ * @files: (array length=n_files): an array of #GFiles to open
+ * @n_files: the length of the @files array
+ * @hint: a hint (or ""), but never %NULL
+ *
+ * Opens the given files.
+ *
+ * In essence, this results in the #GApplication::open signal being emitted
+ * in the primary instance.
+ *
+ * @n_files must be greater than zero.
+ *
+ * @hint is simply passed through to the ::open signal.  It is
+ * intended to be used by applications that have multiple modes for
+ * opening files (eg: "view" vs "edit", etc).  Unless you have a need
+ * for this functionality, you should use "".
+ *
+ * The application must be registered before calling this function
+ * and it must have the %G_APPLICATION_HANDLES_OPEN flag set.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_application_quit:
+ * @application: a #GApplication
+ *
+ * Immediately quits the application.
+ *
+ * Upon return to the mainloop, g_application_run() will return,
+ * calling only the 'shutdown' function before doing so.
+ *
+ * The hold count is ignored.
+ *
+ * The result of calling g_application_run() again after it returns is
+ * unspecified.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_application_register:
+ * @application: a #GApplication
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @error: a pointer to a NULL #GError, or %NULL
+ *
+ * Attempts registration of the application.
+ *
+ * This is the point at which the application discovers if it is the
+ * primary instance or merely acting as a remote for an already-existing
+ * primary instance.  This is implemented by attempting to acquire the
+ * application identifier as a unique bus name on the session bus using
+ * GDBus.
+ *
+ * Due to the internal architecture of GDBus, method calls can be
+ * dispatched at any time (even if a main loop is not running).  For
+ * this reason, you must ensure that any object paths that you wish to
+ * register are registered before calling this function.
+ *
+ * If the application has already been registered then %TRUE is
+ * returned with no work performed.
+ *
+ * The #GApplication::startup signal is emitted if registration succeeds
+ * and @application is the primary instance.
+ *
+ * In the event of an error (such as @cancellable being cancelled, or a
+ * failure to connect to the session bus), %FALSE is returned and @error
+ * is set appropriately.
+ *
+ * Note: the return value of this function is not an indicator that this
+ * instance is or is not the primary instance of the application.  See
+ * g_application_get_is_remote() for that.
+ *
+ * Returns: %TRUE if registration succeeded
+ * Since: 2.28
+ */
+
+
+/**
+ * g_application_release:
+ * @application: a #GApplication
+ *
+ * Decrease the use count of @application.
+ *
+ * When the use count reaches zero, the application will stop running.
+ *
+ * Never call this function except to cancel the effect of a previous
+ * call to g_application_hold().
+ */
+
+
+/**
+ * g_application_run:
+ * @application: a #GApplication
+ * @argc: the argc from main() (or 0 if @argv is %NULL)
+ * @argv: (array length=argc) (allow-none): the argv from main(), or %NULL
+ *
+ * Runs the application.
+ *
+ * This function is intended to be run from main() and its return value
+ * is intended to be returned by main(). Although you are expected to pass
+ * the @argc, @argv parameters from main() to this function, it is possible
+ * to pass %NULL if @argv is not available or commandline handling is not
+ * required.
+ *
+ * First, the local_command_line() virtual function is invoked.
+ * This function always runs on the local instance. It gets passed a pointer
+ * to a %NULL-terminated copy of @argv and is expected to remove the arguments
+ * that it handled (shifting up remaining arguments). See
+ * <xref linkend="gapplication-example-cmdline2"/> for an example of
+ * parsing @argv manually. Alternatively, you may use the #GOptionContext API,
+ * after setting <literal>argc = g_strv_length (argv);</literal>.
+ *
+ * The last argument to local_command_line() is a pointer to the @status
+ * variable which can used to set the exit status that is returned from
+ * g_application_run().
+ *
+ * If local_command_line() returns %TRUE, the command line is expected
+ * to be completely handled, including possibly registering as the primary
+ * instance, calling g_application_activate() or g_application_open(), etc.
+ *
+ * If local_command_line() returns %FALSE then the application is registered
+ * and the #GApplication::command-line signal is emitted in the primary
+ * instance (which may or may not be this instance). The signal handler
+ * gets passed a #GApplicationCommandLine object that (among other things)
+ * contains the remaining commandline arguments that have not been handled
+ * by local_command_line().
+ *
+ * If the application has the %G_APPLICATION_HANDLES_COMMAND_LINE
+ * flag set then the default implementation of local_command_line()
+ * always returns %FALSE immediately, resulting in the commandline
+ * always being handled in the primary instance.
+ *
+ * Otherwise, the default implementation of local_command_line() tries
+ * to do a couple of things that are probably reasonable for most
+ * applications.  First, g_application_register() is called to attempt
+ * to register the application.  If that works, then the command line
+ * arguments are inspected.  If no commandline arguments are given, then
+ * g_application_activate() is called.  If commandline arguments are
+ * given and the %G_APPLICATION_HANDLES_OPEN flag is set then they
+ * are assumed to be filenames and g_application_open() is called.
+ *
+ * If you need to handle commandline arguments that are not filenames,
+ * and you don't mind commandline handling to happen in the primary
+ * instance, you should set %G_APPLICATION_HANDLES_COMMAND_LINE and
+ * process the commandline arguments in your #GApplication::command-line
+ * signal handler, either manually or using the #GOptionContext API.
+ *
+ * If you are interested in doing more complicated local handling of the
+ * commandline then you should implement your own #GApplication subclass
+ * and override local_command_line(). In this case, you most likely want
+ * to return %TRUE from your local_command_line() implementation to
+ * suppress the default handling. See
+ * <xref linkend="gapplication-example-cmdline2"/> for an example.
+ *
+ * If, after the above is done, the use count of the application is zero
+ * then the exit status is returned immediately.  If the use count is
+ * non-zero then the default main context is iterated until the use count
+ * falls to zero, at which point 0 is returned.
+ *
+ * If the %G_APPLICATION_IS_SERVICE flag is set, then the exiting at
+ * use count of zero is delayed for a while (ie: the instance stays
+ * around to provide its <emphasis>service</emphasis> to others).
+ *
+ * Returns: the exit status
+ * Since: 2.28
+ */
+
+
+/**
+ * g_application_set_action_group:
+ * @application: a #GApplication
+ * @action_group: (allow-none): a #GActionGroup, or %NULL
+ *
+ * This used to be how actions were associated with a #GApplication.
+ * Now there is #GActionMap for that.
+ *
+ *
+ * Deprecated:2.32:Use the #GActionMap interface instead.  Never ever
+ * mix use of this API with use of #GActionMap on the same @application
+ * or things will go very badly wrong.  This function is known to
+ * introduce buggy behaviour (ie: signals not emitted on changes to the
+ * action group), so you should really use #GActionMap instead.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_application_set_application_id:
+ * @application: a #GApplication
+ * @application_id: the identifier for @application
+ *
+ * Sets the unique identifier for @application.
+ *
+ * The application id can only be modified if @application has not yet
+ * been registered.
+ *
+ * The application id must be valid.  See g_application_id_is_valid().
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_application_set_default:
+ * @application: (allow-none): the application to set as default, or %NULL
+ *
+ * Sets or unsets the default application for the process, as returned
+ * by g_application_get_default().
+ *
+ * This function does not take its own reference on @application.  If
+ * @application is destroyed then the default application will revert
+ * back to %NULL.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_application_set_flags:
+ * @application: a #GApplication
+ * @flags: the flags for @application
+ *
+ * Sets the flags for @application.
+ *
+ * The flags can only be modified if @application has not yet been
+ * registered.
+ *
+ * See #GApplicationFlags.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_application_set_inactivity_timeout:
+ * @application: a #GApplication
+ * @inactivity_timeout: the timeout, in milliseconds
+ *
+ * Sets the current inactivity timeout for the application.
+ *
+ * This is the amount of time (in milliseconds) after the last call to
+ * g_application_release() before the application stops running.
+ *
+ * This call has no side effects of its own.  The value set here is only
+ * used for next time g_application_release() drops the use count to
+ * zero.  Any timeouts currently in progress are not impacted.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_async_initable_init_async:
+ * @initable: a #GAsyncInitable.
+ * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
+ * @cancellable: optional #GCancellable object, %NULL to ignore.
+ * @callback: a #GAsyncReadyCallback to call when the request is satisfied
+ * @user_data: the data to pass to callback function
+ *
+ * Starts asynchronous initialization of the object implementing the
+ * interface. This must be done before any real use of the object after
+ * initial construction. If the object also implements #GInitable you can
+ * optionally call g_initable_init() instead.
+ *
+ * When the initialization is finished, @callback will be called. You can
+ * then call g_async_initable_init_finish() to get the result of the
+ * initialization.
+ *
+ * Implementations may also support cancellation. If @cancellable is not
+ * %NULL, then initialization can be cancelled by triggering the cancellable
+ * object from another thread. If the operation was cancelled, the error
+ * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL, and
+ * the object doesn't support cancellable initialization, the error
+ * %G_IO_ERROR_NOT_SUPPORTED will be returned.
+ *
+ * As with #GInitable, if the object is not initialized, or initialization
+ * returns with an error, then all operations on the object except
+ * g_object_ref() and g_object_unref() are considered to be invalid, and
+ * have undefined behaviour. They will often fail with g_critical() or
+ * g_warning(), but this must not be relied on.
+ *
+ * Implementations of this method must be idempotent: i.e. multiple calls
+ * to this function with the same argument should return the same results.
+ * Only the first call initializes the object; further calls return the result
+ * of the first call. This is so that it's safe to implement the singleton
+ * pattern in the GObject constructor function.
+ *
+ * For classes that also support the #GInitable interface, the default
+ * implementation of this method will run the g_initable_init() function
+ * in a thread, so if you want to support asynchronous initialization via
+ * threads, just implement the #GAsyncInitable interface without overriding
+ * any interface methods.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_async_initable_init_finish:
+ * @initable: a #GAsyncInitable.
+ * @res: a #GAsyncResult.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Finishes asynchronous initialization and returns the result.
+ * See g_async_initable_init_async().
+ *
+ * will return %FALSE and set @error appropriately if present.
+ *
+ * Returns: %TRUE if successful. If an error has occurred, this function
+ * Since: 2.22
+ */
+
+
+/**
+ * g_async_initable_new_async:
+ * @object_type: a #GType supporting #GAsyncInitable.
+ * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
+ * @cancellable: optional #GCancellable object, %NULL to ignore.
+ * @callback: a #GAsyncReadyCallback to call when the initialization is finished
+ * @user_data: the data to pass to callback function
+ * @first_property_name: (allow-none): the name of the first property, or %NULL if no properties
+ * @...: the value of the first property, followed by other property value pairs, and ended by %NULL.
+ *
+ * Helper function for constructing #GAsyncInitable object. This is
+ * similar to g_object_new() but also initializes the object asynchronously.
+ *
+ * When the initialization is finished, @callback will be called. You can
+ * then call g_async_initable_new_finish() to get the new object and check
+ * for any errors.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_async_initable_new_finish:
+ * @initable: the #GAsyncInitable from the callback
+ * @res: the #GAsyncResult from the callback
+ * @error: return location for errors, or %NULL to ignore
+ *
+ * Finishes the async construction for the various g_async_initable_new
+ * calls, returning the created object or %NULL on error.
+ *
+ * Free with g_object_unref().
+ *
+ * Returns: (transfer full): a newly created #GObject, or %NULL on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_async_initable_new_valist_async:
+ * @object_type: a #GType supporting #GAsyncInitable.
+ * @first_property_name: the name of the first property, followed by the value, and other property value pairs, and ended by %NULL.
+ * @var_args: The var args list generated from @first_property_name.
+ * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
+ * @cancellable: optional #GCancellable object, %NULL to ignore.
+ * @callback: a #GAsyncReadyCallback to call when the initialization is finished
+ * @user_data: the data to pass to callback function
+ *
+ * Helper function for constructing #GAsyncInitable object. This is
+ * similar to g_object_new_valist() but also initializes the object
+ * asynchronously.
+ *
+ * When the initialization is finished, @callback will be called. You can
+ * then call g_async_initable_new_finish() to get the new object and check
+ * for any errors.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_async_initable_newv_async:
+ * @object_type: a #GType supporting #GAsyncInitable.
+ * @n_parameters: the number of parameters in @parameters
+ * @parameters: the parameters to use to construct the object
+ * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
+ * @cancellable: optional #GCancellable object, %NULL to ignore.
+ * @callback: a #GAsyncReadyCallback to call when the initialization is finished
+ * @user_data: the data to pass to callback function
+ *
+ * Helper function for constructing #GAsyncInitable object. This is
+ * similar to g_object_newv() but also initializes the object asynchronously.
+ *
+ * When the initialization is finished, @callback will be called. You can
+ * then call g_async_initable_new_finish() to get the new object and check
+ * for any errors.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_async_result_get_source_object:
+ * @res: a #GAsyncResult
+ *
+ * Gets the source object from a #GAsyncResult.
+ *
+ * or %NULL if there is none.
+ *
+ * Returns: (transfer full): a new reference to the source object for the @res,
+ */
+
+
+/**
+ * g_async_result_get_user_data:
+ * @res: a #GAsyncResult.
+ *
+ * Gets the user data from a #GAsyncResult.
+ *
+ * Returns: (transfer full): the user data for @res.
+ */
+
+
+/**
+ * g_buffered_input_stream_fill:
+ * @stream: a #GBufferedInputStream
+ * @count: the number of bytes that will be read from the stream
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
+ * @error: location to store the error occurring, or %NULL to ignore
+ *
+ * Tries to read @count bytes from the stream into the buffer.
+ * Will block during this read.
+ *
+ * If @count is zero, returns zero and does nothing. A value of @count
+ * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
+ *
+ * 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.
+ *
+ * If @count is -1 then the attempted read size is equal to the number of
+ * bytes that are required to fill the buffer.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_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.
+ *
+ * On error -1 is returned and @error is set accordingly.
+ *
+ * For the asynchronous, non-blocking, version of this function, see
+ * g_buffered_input_stream_fill_async().
+ *
+ * or -1 on error.
+ *
+ * Returns: the number of bytes read into @stream's buffer, up to @count,
+ */
+
+
+/**
+ * g_buffered_input_stream_fill_async:
+ * @stream: a #GBufferedInputStream
+ * @count: the number of bytes that will be read from the stream
+ * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request
+ * @cancellable: (allow-none): optional #GCancellable object
+ * @callback: (scope async): a #GAsyncReadyCallback
+ * @user_data: (closure): a #gpointer
+ *
+ * Reads data into @stream's buffer asynchronously, up to @count size.
+ * @io_priority can be used to prioritize reads. For the synchronous
+ * version of this function, see g_buffered_input_stream_fill().
+ *
+ * If @count is -1 then the attempted read size is equal to the number
+ * of bytes that are required to fill the buffer.
+ */
+
+
+/**
+ * g_buffered_input_stream_fill_finish:
+ * @stream: a #GBufferedInputStream
+ * @result: a #GAsyncResult
+ * @error: a #GError
+ *
+ * Finishes an asynchronous read.
+ *
+ * Returns: a #gssize of the read stream, or %-1 on an error.
+ */
+
+
+/**
+ * g_buffered_input_stream_get_available:
+ * @stream: #GBufferedInputStream
+ *
+ * Gets the size of the available data within the stream.
+ *
+ * Returns: size of the available stream.
+ */
+
+
+/**
+ * g_buffered_input_stream_get_buffer_size:
+ * @stream: a #GBufferedInputStream
+ *
+ * Gets the size of the input buffer.
+ *
+ * Returns: the current buffer size.
+ */
+
+
+/**
+ * g_buffered_input_stream_new:
+ * @base_stream: a #GInputStream
+ *
+ * Creates a new #GInputStream from the given @base_stream, with
+ * a buffer set to the default size (4 kilobytes).
+ *
+ * Returns: a #GInputStream for the given @base_stream.
+ */
+
+
+/**
+ * g_buffered_input_stream_new_sized:
+ * @base_stream: a #GInputStream
+ * @size: a #gsize
+ *
+ * Creates a new #GBufferedInputStream from the given @base_stream,
+ * with a buffer set to @size.
+ *
+ * Returns: a #GInputStream.
+ */
+
+
+/**
+ * g_buffered_input_stream_peek:
+ * @stream: a #GBufferedInputStream
+ * @buffer: (array length=count) (element-type guint8): a pointer to an allocated chunk of memory
+ * @offset: a #gsize
+ * @count: a #gsize
+ *
+ * Peeks in the buffer, copying data of size @count into @buffer,
+ * offset @offset bytes.
+ *
+ * Returns: a #gsize of the number of bytes peeked, or -1 on error.
+ */
+
+
+/**
+ * g_buffered_input_stream_peek_buffer:
+ * @stream: a #GBufferedInputStream
+ * @count: (out): a #gsize to get the number of bytes available in the buffer
+ *
+ * Returns the buffer with the currently available bytes. The returned
+ * buffer must not be modified and will become invalid when reading from
+ * the stream or filling the buffer.
+ *
+ * read-only buffer
+ *
+ * Returns: (array length=count) (element-type guint8) (transfer none):
+ */
+
+
+/**
+ * g_buffered_input_stream_read_byte:
+ * @stream: a #GBufferedInputStream
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
+ * @error: location to store the error occurring, or %NULL to ignore
+ *
+ * Tries to read a single byte from the stream or the buffer. Will block
+ * during this read.
+ *
+ * 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.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_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.
+ *
+ * On error -1 is returned and @error is set accordingly.
+ *
+ * Returns: the byte read from the @stream, or -1 on end of stream or error.
+ */
+
+
+/**
+ * g_buffered_input_stream_set_buffer_size:
+ * @stream: a #GBufferedInputStream
+ * @size: a #gsize
+ *
+ * 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.
+ */
+
+
+/**
+ * g_buffered_output_stream_get_auto_grow:
+ * @stream: a #GBufferedOutputStream.
+ *
+ * Checks if the buffer automatically grows as data is added.
+ *
+ * %FALSE otherwise.
+ *
+ * Returns: %TRUE if the @stream's buffer automatically grows,
+ */
+
+
+/**
+ * g_buffered_output_stream_get_buffer_size:
+ * @stream: a #GBufferedOutputStream.
+ *
+ * Gets the size of the buffer in the @stream.
+ *
+ * Returns: the current size of the buffer.
+ */
+
+
+/**
+ * g_buffered_output_stream_new:
+ * @base_stream: a #GOutputStream.
+ *
+ * Creates a new buffered output stream for a base stream.
+ *
+ * Returns: a #GOutputStream for the given @base_stream.
+ */
+
+
+/**
+ * g_buffered_output_stream_new_sized:
+ * @base_stream: a #GOutputStream.
+ * @size: a #gsize.
+ *
+ * Creates a new buffered output stream with a given buffer size.
+ *
+ * Returns: a #GOutputStream with an internal buffer set to @size.
+ */
+
+
+/**
+ * g_buffered_output_stream_set_auto_grow:
+ * @stream: a #GBufferedOutputStream.
+ * @auto_grow: a #gboolean.
+ *
+ * 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.
+ */
+
+
+/**
+ * g_buffered_output_stream_set_buffer_size:
+ * @stream: a #GBufferedOutputStream.
+ * @size: a #gsize.
+ *
+ * Sets the size of the internal buffer to @size.
+ */
+
+
+/**
+ * g_bus_get:
+ * @bus_type: A #GBusType.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
+ * @user_data: The data to pass to @callback.
+ *
+ * Asynchronously connects to the message bus specified by @bus_type.
+ *
+ * When the operation is finished, @callback will be invoked. You can
+ * then call g_bus_get_finish() to get the result of the operation.
+ *
+ * This is a asynchronous failable function. See g_bus_get_sync() for
+ * the synchronous version.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_bus_get_finish:
+ * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_bus_get().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with g_bus_get().
+ *
+ * The returned object is a singleton, that is, shared with other
+ * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the
+ * event that you need a private message bus connection, use
+ * g_dbus_address_get_for_bus_sync() and
+ * g_dbus_connection_new_for_address().
+ *
+ * Note that the returned #GDBusConnection object will (usually) have
+ * the #GDBusConnection:exit-on-close property set to %TRUE.
+ *
+ * Returns: (transfer full): A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
+ * Since: 2.26
+ */
+
+
+/**
+ * g_bus_get_sync:
+ * @bus_type: A #GBusType.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Synchronously connects to the message bus specified by @bus_type.
+ * Note that the returned object may shared with other callers,
+ * e.g. if two separate parts of a process calls this function with
+ * the same @bus_type, they will share the same object.
+ *
+ * This is a synchronous failable function. See g_bus_get() and
+ * g_bus_get_finish() for the asynchronous version.
+ *
+ * The returned object is a singleton, that is, shared with other
+ * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the
+ * event that you need a private message bus connection, use
+ * g_dbus_address_get_for_bus_sync() and
+ * g_dbus_connection_new_for_address().
+ *
+ * Note that the returned #GDBusConnection object will (usually) have
+ * the #GDBusConnection:exit-on-close property set to %TRUE.
+ *
+ * Returns: (transfer full): A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
+ * Since: 2.26
+ */
+
+
+/**
+ * g_bus_own_name:
+ * @bus_type: The type of bus to own a name on.
+ * @name: The well-known name to own.
+ * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
+ * @bus_acquired_handler: (allow-none): Handler to invoke when connected to the bus of type @bus_type or %NULL.
+ * @name_acquired_handler: (allow-none): Handler to invoke when @name is acquired or %NULL.
+ * @name_lost_handler: (allow-none): Handler to invoke when @name is lost or %NULL.
+ * @user_data: User data to pass to handlers.
+ * @user_data_free_func: (allow-none): Function for freeing @user_data or %NULL.
+ *
+ * Starts acquiring @name on the bus specified by @bus_type and calls
+ * @name_acquired_handler and @name_lost_handler when the name is
+ * acquired respectively lost. Callbacks will be invoked in the <link
+ * linkend="g-main-context-push-thread-default">thread-default main
+ * loop</link> of the thread you are calling this function from.
+ *
+ * You are guaranteed that one of the @name_acquired_handler and @name_lost_handler
+ * callbacks will be invoked after calling this function - there are three
+ * possible cases:
+ * <itemizedlist>
+ * <listitem><para>
+ * @name_lost_handler with a %NULL connection (if a connection to the bus can't be made).
+ * </para></listitem>
+ * <listitem><para>
+ * @bus_acquired_handler then @name_lost_handler (if the name can't be obtained)
+ * </para></listitem>
+ * <listitem><para>
+ * @bus_acquired_handler then @name_acquired_handler (if the name was obtained).
+ * </para></listitem>
+ * </itemizedlist>
+ * When you are done owning the name, just call g_bus_unown_name()
+ * with the owner id this function returns.
+ *
+ * If the name is acquired or lost (for example another application
+ * could acquire the name if you allow replacement or the application
+ * currently owning the name exits), the handlers are also invoked. If the
+ * #GDBusConnection that is used for attempting to own the name
+ * closes, then @name_lost_handler is invoked since it is no
+ * longer possible for other processes to access the process.
+ *
+ * You cannot use g_bus_own_name() several times for the same name (unless
+ * interleaved with calls to g_bus_unown_name()) - only the first call
+ * will work.
+ *
+ * Another guarantee is that invocations of @name_acquired_handler
+ * and @name_lost_handler are guaranteed to alternate; that
+ * is, if @name_acquired_handler is invoked then you are
+ * guaranteed that the next time one of the handlers is invoked, it
+ * will be @name_lost_handler. The reverse is also true.
+ *
+ * If you plan on exporting objects (using e.g.
+ * g_dbus_connection_register_object()), note that it is generally too late
+ * to export the objects in @name_acquired_handler. Instead, you can do this
+ * in @bus_acquired_handler since you are guaranteed that this will run
+ * before @name is requested from the bus.
+ *
+ * This behavior makes it very simple to write applications that wants
+ * to own names and export objects, see <xref linkend="gdbus-owning-names"/>.
+ * Simply register objects to be exported in @bus_acquired_handler and
+ * unregister the objects (if any) in @name_lost_handler.
+ *
+ * g_bus_unown_name() to stop owning the name.
+ *
+ * Returns: An identifier (never 0) that an be used with
+ * Since: 2.26
+ */
+
+
+/**
+ * g_bus_own_name_on_connection:
+ * @connection: A #GDBusConnection.
+ * @name: The well-known name to own.
+ * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
+ * @name_acquired_handler: (allow-none): Handler to invoke when @name is acquired or %NULL.
+ * @name_lost_handler: (allow-none): Handler to invoke when @name is lost or %NULL.
+ * @user_data: User data to pass to handlers.
+ * @user_data_free_func: (allow-none): Function for freeing @user_data or %NULL.
+ *
+ * Like g_bus_own_name() but takes a #GDBusConnection instead of a
+ * #GBusType.
+ *
+ * g_bus_unown_name() to stop owning the name.
+ *
+ * Returns: An identifier (never 0) that an be used with
+ * Since: 2.26
+ */
+
+
+/**
+ * g_bus_own_name_on_connection_with_closures:
+ * @connection: A #GDBusConnection.
+ * @name: The well-known name to own.
+ * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
+ * @name_acquired_closure: (allow-none): #GClosure to invoke when @name is acquired or %NULL.
+ * @name_lost_closure: (allow-none): #GClosure to invoke when @name is lost or %NULL.
+ *
+ * Version of g_bus_own_name_on_connection() using closures instead of callbacks for
+ * easier binding in other languages.
+ *
+ * g_bus_unown_name() to stop owning the name.
+ *
+ * Returns: An identifier (never 0) that an be used with
+ * Rename to: g_bus_own_name_on_connection
+ * Since: 2.26
+ */
+
+
+/**
+ * g_bus_own_name_with_closures:
+ * @bus_type: The type of bus to own a name on.
+ * @name: The well-known name to own.
+ * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
+ * @bus_acquired_closure: (allow-none): #GClosure to invoke when connected to the bus of type @bus_type or %NULL.
+ * @name_acquired_closure: (allow-none): #GClosure to invoke when @name is acquired or %NULL.
+ * @name_lost_closure: (allow-none): #GClosure to invoke when @name is lost or %NULL.
+ *
+ * Version of g_bus_own_name() using closures instead of callbacks for
+ * easier binding in other languages.
+ *
+ * g_bus_unown_name() to stop owning the name.
+ *
+ * Returns: An identifier (never 0) that an be used with
+ * Rename to: g_bus_own_name
+ * Since: 2.26
+ */
+
+
+/**
+ * g_bus_unown_name:
+ * @owner_id: An identifier obtained from g_bus_own_name()
+ *
+ * Stops owning a name.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_bus_unwatch_name:
+ * @watcher_id: An identifier obtained from g_bus_watch_name()
+ *
+ * Stops watching a name.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_bus_watch_name:
+ * @bus_type: The type of bus to watch a name on.
+ * @name: The name (well-known or unique) to watch.
+ * @flags: Flags from the #GBusNameWatcherFlags enumeration.
+ * @name_appeared_handler: (allow-none): Handler to invoke when @name is known to exist or %NULL.
+ * @name_vanished_handler: (allow-none): Handler to invoke when @name is known to not exist or %NULL.
+ * @user_data: User data to pass to handlers.
+ * @user_data_free_func: (allow-none): Function for freeing @user_data or %NULL.
+ *
+ * Starts watching @name on the bus specified by @bus_type and calls
+ * @name_appeared_handler and @name_vanished_handler when the name is
+ * known to have a owner respectively known to lose its
+ * owner. Callbacks will be invoked in the <link
+ * linkend="g-main-context-push-thread-default">thread-default main
+ * loop</link> of the thread you are calling this function from.
+ *
+ * You are guaranteed that one of the handlers will be invoked after
+ * calling this function. When you are done watching the name, just
+ * call g_bus_unwatch_name() with the watcher id this function
+ * returns.
+ *
+ * If the name vanishes or appears (for example the application owning
+ * the name could restart), the handlers are also invoked. If the
+ * #GDBusConnection that is used for watching the name disconnects, then
+ * @name_vanished_handler is invoked since it is no longer
+ * possible to access the name.
+ *
+ * Another guarantee is that invocations of @name_appeared_handler
+ * and @name_vanished_handler are guaranteed to alternate; that
+ * is, if @name_appeared_handler is invoked then you are
+ * guaranteed that the next time one of the handlers is invoked, it
+ * will be @name_vanished_handler. The reverse is also true.
+ *
+ * This behavior makes it very simple to write applications that wants
+ * to take action when a certain name exists, see <xref
+ * linkend="gdbus-watching-names"/>. Basically, the application
+ * should create object proxies in @name_appeared_handler and destroy
+ * them again (if any) in @name_vanished_handler.
+ *
+ * g_bus_unwatch_name() to stop watching the name.
+ *
+ * Returns: An identifier (never 0) that an be used with
+ * Since: 2.26
+ */
+
+
+/**
+ * g_bus_watch_name_on_connection:
+ * @connection: A #GDBusConnection.
+ * @name: The name (well-known or unique) to watch.
+ * @flags: Flags from the #GBusNameWatcherFlags enumeration.
+ * @name_appeared_handler: (allow-none): Handler to invoke when @name is known to exist or %NULL.
+ * @name_vanished_handler: (allow-none): Handler to invoke when @name is known to not exist or %NULL.
+ * @user_data: User data to pass to handlers.
+ * @user_data_free_func: (allow-none): Function for freeing @user_data or %NULL.
+ *
+ * Like g_bus_watch_name() but takes a #GDBusConnection instead of a
+ * #GBusType.
+ *
+ * g_bus_unwatch_name() to stop watching the name.
+ *
+ * Returns: An identifier (never 0) that an be used with
+ * Since: 2.26
+ */
+
+
+/**
+ * g_bus_watch_name_on_connection_with_closures:
+ * @connection: A #GDBusConnection.
+ * @name: The name (well-known or unique) to watch.
+ * @flags: Flags from the #GBusNameWatcherFlags enumeration.
+ * @name_appeared_closure: (allow-none): #GClosure to invoke when @name is known to exist or %NULL.
+ * @name_vanished_closure: (allow-none): #GClosure to invoke when @name is known to not exist or %NULL.
+ *
+ * Version of g_bus_watch_name_on_connection() using closures instead of callbacks for
+ * easier binding in other languages.
+ *
+ * g_bus_unwatch_name() to stop watching the name.
+ *
+ * Returns: An identifier (never 0) that an be used with
+ * Rename to: g_bus_watch_name_on_connection
+ * Since: 2.26
+ */
+
+
+/**
+ * g_bus_watch_name_with_closures:
+ * @bus_type: The type of bus to watch a name on.
+ * @name: The name (well-known or unique) to watch.
+ * @flags: Flags from the #GBusNameWatcherFlags enumeration.
+ * @name_appeared_closure: (allow-none): #GClosure to invoke when @name is known to exist or %NULL.
+ * @name_vanished_closure: (allow-none): #GClosure to invoke when @name is known to not exist or %NULL.
+ *
+ * Version of g_bus_watch_name() using closures instead of callbacks for
+ * easier binding in other languages.
+ *
+ * g_bus_unwatch_name() to stop watching the name.
+ *
+ * Returns: An identifier (never 0) that an be used with
+ * Rename to: g_bus_watch_name
+ * Since: 2.26
+ */
+
+
+/**
+ * g_cancellable_cancel:
+ * @cancellable: a #GCancellable object.
+ *
+ * Will set @cancellable to cancelled, and will emit the
+ * #GCancellable::cancelled signal. (However, see the warning about
+ * race conditions in the documentation for that signal if you are
+ * planning to connect to it.)
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+
+/**
+ * g_cancellable_connect:
+ * @cancellable: A #GCancellable.
+ * @callback: The #GCallback to connect.
+ * @data: Data to pass to @callback.
+ * @data_destroy_func: (allow-none): Free function for @data or %NULL.
+ *
+ * Convenience function to connect to the #GCancellable::cancelled
+ * signal. Also handles the race condition that may happen
+ * if the cancellable is cancelled right before connecting.
+ *
+ * @callback is called at most once, either directly at the
+ * time of the connect if @cancellable is already cancelled,
+ * or when @cancellable is cancelled in some thread.
+ *
+ * @data_destroy_func will be called when the handler is
+ * disconnected, or immediately if the cancellable is already
+ * cancelled.
+ *
+ * See #GCancellable::cancelled for details on how to use this.
+ *
+ * been cancelled.
+ *
+ * Returns: The id of the signal handler or 0 if @cancellable has already
+ * Since: 2.22
+ */
+
+
+/**
+ * g_cancellable_disconnect:
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @handler_id: Handler id of the handler to be disconnected, or %0.
+ *
+ * Disconnects a handler from a cancellable instance similar to
+ * g_signal_handler_disconnect().  Additionally, in the event that a
+ * signal handler is currently running, this call will block until the
+ * handler has finished.  Calling this function from a
+ * #GCancellable::cancelled signal handler will therefore result in a
+ * deadlock.
+ *
+ * This avoids a race condition where a thread cancels at the
+ * same time as the cancellable operation is finished and the
+ * signal handler is removed. See #GCancellable::cancelled for
+ * details on how to use this.
+ *
+ * If @cancellable is %NULL or @handler_id is %0 this function does
+ * nothing.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_cancellable_get_current:
+ *
+ * Gets the top cancellable from the stack.
+ *
+ * if the stack is empty.
+ *
+ * Returns: (transfer none): a #GCancellable from the top of the stack, or %NULL
+ */
+
+
+/**
+ * g_cancellable_get_fd:
+ * @cancellable: a #GCancellable.
+ *
+ * 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.
+ *
+ * You are not supposed to read from the fd yourself, just check for
+ * readable status. Reading to unset the readable status is done
+ * with g_cancellable_reset().
+ *
+ * After a successful return from this function, you should use
+ * g_cancellable_release_fd() to free up resources allocated for
+ * the returned file descriptor.
+ *
+ * See also g_cancellable_make_pollfd().
+ *
+ * is not supported, or on errors.
+ *
+ * Returns: A valid file descriptor. %-1 if the file descriptor
+ */
+
+
+/**
+ * g_cancellable_is_cancelled:
+ * @cancellable: (allow-none): a #GCancellable or %NULL
+ *
+ * Checks if a cancellable job has been cancelled.
+ *
+ * FALSE if called with %NULL or if item is not cancelled.
+ *
+ * Returns: %TRUE if @cancellable is cancelled,
+ */
+
+
+/**
+ * g_cancellable_make_pollfd:
+ * @cancellable: (allow-none): a #GCancellable or %NULL
+ * @pollfd: a pointer to a #GPollFD
+ *
+ * Creates a #GPollFD corresponding to @cancellable; this can be passed
+ * to g_poll() and used to poll for cancellation. This is useful both
+ * for unix systems without a native poll and for portability to
+ * windows.
+ *
+ * When this function returns %TRUE, you should use
+ * g_cancellable_release_fd() to free up resources allocated for the
+ * @pollfd. After a %FALSE return, do not call g_cancellable_release_fd().
+ *
+ * If this function returns %FALSE, either no @cancellable was given or
+ * resource limits prevent this function from allocating the necessary
+ * structures for polling. (On Linux, you will likely have reached
+ * the maximum number of file descriptors.) The suggested way to handle
+ * these cases is to ignore the @cancellable.
+ *
+ * You are not supposed to read from the fd yourself, just check for
+ * readable status. Reading to unset the readable status is done
+ * with g_cancellable_reset().
+ *
+ * failure to prepare the cancellable.
+ *
+ * Returns: %TRUE if @pollfd was successfully initialized, %FALSE on
+ * Since: 2.22
+ */
+
+
+/**
+ * g_cancellable_new:
+ *
+ * Creates a new #GCancellable object.
+ *
+ * Applications that want to start one or more operations
+ * that should be cancellable should create a #GCancellable
+ * and pass it to the operations.
+ *
+ * One #GCancellable can be used in multiple consecutive
+ * operations or in multiple concurrent operations.
+ *
+ * Returns: a #GCancellable.
+ */
+
+
+/**
+ * g_cancellable_pop_current:
+ * @cancellable: a #GCancellable object
+ *
+ * Pops @cancellable off the cancellable stack (verifying that @cancellable
+ * is on the top of the stack).
+ */
+
+
+/**
+ * g_cancellable_push_current:
+ * @cancellable: a #GCancellable object
+ *
+ * Pushes @cancellable onto the cancellable stack. The current
+ * cancellable can then be received using g_cancellable_get_current().
+ *
+ * This is useful when implementing cancellable operations in
+ * code that does not allow you to pass down the cancellable object.
+ *
+ * This is typically called automatically by e.g. #GFile operations,
+ * so you rarely have to call this yourself.
+ */
+
+
+/**
+ * g_cancellable_release_fd:
+ * @cancellable: a #GCancellable
+ *
+ * Releases a resources previously allocated by g_cancellable_get_fd()
+ * or g_cancellable_make_pollfd().
+ *
+ * For compatibility reasons with older releases, calling this function
+ * is not strictly required, the resources will be automatically freed
+ * when the @cancellable is finalized. However, the @cancellable will
+ * block scarce file descriptors until it is finalized if this function
+ * is not called. This can cause the application to run out of file
+ * descriptors when many #GCancellables are used at the same time.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_cancellable_reset:
+ * @cancellable: a #GCancellable object.
+ *
+ * Resets @cancellable to its uncancelled state.
+ *
+ * If cancellable is currently in use by any cancellable operation
+ * then the behavior of this function is undefined.
+ */
+
+
+/**
+ * g_cancellable_set_error_if_cancelled:
+ * @cancellable: (allow-none): a #GCancellable or %NULL
+ * @error: #GError to append error state to
+ *
+ * If the @cancellable is cancelled, sets the error to notify
+ * that the operation was cancelled.
+ *
+ * Returns: %TRUE if @cancellable was cancelled, %FALSE if it was not
+ */
+
+
+/**
+ * g_cancellable_source_new: (skip)
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ *
+ * Creates a source that triggers if @cancellable is cancelled and
+ * calls its callback of type #GCancellableSourceFunc. This is
+ * primarily useful for attaching to another (non-cancellable) source
+ * with g_source_add_child_source() to add cancellability to it.
+ *
+ * For convenience, you can call this with a %NULL #GCancellable,
+ * in which case the source will never trigger.
+ *
+ * Returns: (transfer full): the new #GSource.
+ * Since: 2.28
+ */
+
+
+/**
+ * g_charset_converter_get_num_fallbacks:
+ * @converter: a #GCharsetConverter
+ *
+ * Gets the number of fallbacks that @converter has applied so far.
+ *
+ * Returns: the number of fallbacks that @converter has applied
+ * Since: 2.24
+ */
+
+
+/**
+ * g_charset_converter_get_use_fallback:
+ * @converter: a #GCharsetConverter
+ *
+ * Gets the #GCharsetConverter:use-fallback property.
+ *
+ * Returns: %TRUE if fallbacks are used by @converter
+ * Since: 2.24
+ */
+
+
+/**
+ * g_charset_converter_new:
+ * @to_charset: destination charset
+ * @from_charset: source charset
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Creates a new #GCharsetConverter.
+ *
+ * Returns: a new #GCharsetConverter or %NULL on error.
+ * Since: 2.24
+ */
+
+
+/**
+ * g_charset_converter_set_use_fallback:
+ * @converter: a #GCharsetConverter
+ * @use_fallback: %TRUE to use fallbacks
+ *
+ * Sets the #GCharsetConverter:use-fallback property.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * g_content_type_can_be_executable:
+ * @type: a content type string
+ *
+ * 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).
+ *
+ * can be executable, %FALSE otherwise.
+ *
+ * Returns: %TRUE if the file type corresponds to a type that
+ */
+
+
+/**
+ * g_content_type_equals:
+ * @type1: a content type string
+ * @type2: a content type string
+ *
+ * Compares two content types for equality.
+ *
+ * %FALSE otherwise.
+ *
+ * Returns: %TRUE if the two strings are identical or equivalent,
+ */
+
+
+/**
+ * g_content_type_from_mime_type:
+ * @mime_type: a mime type string
+ *
+ * Tries to find a content type based on the mime type name.
+ *
+ * or %NULL. Free with g_free()
+ *
+ * Returns: (allow-none): Newly allocated string with content type
+ * Since: 2.18
+ */
+
+
+/**
+ * g_content_type_get_description:
+ * @type: a content type string
+ *
+ * Gets the human readable description of the content type.
+ *
+ * returned string with g_free()
+ *
+ * Returns: a short description of the content type @type. Free the
+ */
+
+
+/**
+ * g_content_type_get_icon:
+ * @type: a content type string
+ *
+ * Gets the icon for a content type.
+ *
+ * object with g_object_unref()
+ *
+ * Returns: (transfer full): #GIcon corresponding to the content type. Free the returned
+ */
+
+
+/**
+ * g_content_type_get_mime_type:
+ * @type: a content type string
+ *
+ * Gets the mime type for the content type, if one is registered.
+ *
+ * or %NULL if unknown.
+ *
+ * Returns: (allow-none): the registered mime type for the given @type,
+ */
+
+
+/**
+ * g_content_type_guess:
+ * @filename: (allow-none): a string, or %NULL
+ * @data: (allow-none) (array length=data_size): a stream of data, or %NULL
+ * @data_size: the size of @data
+ * @result_uncertain: (allow-none) (out): return location for the certainty of the result, or %NULL
+ *
+ * Guesses the content type based on example data. If the function is
+ * uncertain, @result_uncertain will be set to %TRUE. Either @filename
+ * or @data may be %NULL, in which case the guess will be based solely
+ * on the other argument.
+ *
+ * given data. Free with g_free()
+ *
+ * Returns: a string indicating a guessed content type for the
+ */
+
+
+/**
+ * g_content_type_guess_for_tree:
+ * @root: the root of the tree to guess a type for
+ *
+ * Tries to guess the type of the tree with root @root, by
+ * looking at the files it contains. The result is an array
+ * of content types, with the best guess coming first.
+ *
+ * The types returned all have the form x-content/foo, e.g.
+ * x-content/audio-cdda (for audio CDs) or x-content/image-dcf
+ * (for a camera memory card). See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
+ * specification for more on x-content types.
+ *
+ * This function is useful in the implementation of
+ * g_mount_guess_content_type().
+ *
+ * array of zero or more content types. Free with g_strfreev()
+ *
+ * Returns: (transfer full) (array zero-terminated=1): an %NULL-terminated
+ * Since: 2.18
+ */
+
+
+/**
+ * g_content_type_is_a:
+ * @type: a content type string
+ * @supertype: a content type string
+ *
+ * Determines if @type is a subset of @supertype.
+ *
+ * %FALSE otherwise.
+ *
+ * Returns: %TRUE if @type is a kind of @supertype,
+ */
+
+
+/**
+ * g_content_type_is_unknown:
+ * @type: a content type string
+ *
+ * Checks if the content type is the generic "unknown" type.
+ * On UNIX this is the "application/octet-stream" mimetype,
+ * while on win32 it is "*".
+ *
+ * Returns: %TRUE if the type is the unknown type.
+ */
+
+
+/**
+ * g_content_types_get_registered:
+ *
+ * Gets a list of strings containing all the registered content types
+ * known to the system. The list and its data should be freed using
+ * <programlisting>
+ * g_list_free_full (list, g_free);
+ * </programlisting>
+ *
+ * Returns: (element-type utf8) (transfer full): #GList of the registered content types
+ */
+
+
+/**
+ * g_converter_convert:
+ * @converter: a #GConverter.
+ * @inbuf: (array length=inbuf_size) (element-type guint8): the buffer containing the data to convert.
+ * @inbuf_size: the number of bytes in @inbuf
+ * @outbuf: a buffer to write converted data in.
+ * @outbuf_size: the number of bytes in @outbuf, must be at least one
+ * @flags: a #GConverterFlags controlling the conversion details
+ * @bytes_read: (out): will be set to the number of bytes read from @inbuf on success
+ * @bytes_written: (out): will be set to the number of bytes written to @outbuf on success
+ * @error: location to store the error occurring, or %NULL to ignore
+ *
+ * This is the main operation used when converting data. It is to be called
+ * multiple times in a loop, and each time it will do some work, i.e.
+ * producing some output (in @outbuf) or consuming some input (from @inbuf) or
+ * both. If its not possible to do any work an error is returned.
+ *
+ * Note that a single call may not consume all input (or any input at all).
+ * Also a call may produce output even if given no input, due to state stored
+ * in the converter producing output.
+ *
+ * If any data was either produced or consumed, and then an error happens, then
+ * only the successful conversion is reported and the error is returned on the
+ * next call.
+ *
+ * A full conversion loop involves calling this method repeatedly, each time
+ * giving it new input and space output space. When there is no more input
+ * data after the data in @inbuf, the flag %G_CONVERTER_INPUT_AT_END must be set.
+ * The loop will be (unless some error happens) returning %G_CONVERTER_CONVERTED
+ * each time until all data is consumed and all output is produced, then
+ * %G_CONVERTER_FINISHED is returned instead. Note, that %G_CONVERTER_FINISHED
+ * may be returned even if %G_CONVERTER_INPUT_AT_END is not set, for instance
+ * in a decompression converter where the end of data is detectable from the
+ * data (and there might even be other data after the end of the compressed data).
+ *
+ * When some data has successfully been converted @bytes_read and is set to
+ * the number of bytes read from @inbuf, and @bytes_written is set to indicate
+ * how many bytes was written to @outbuf. If there are more data to output
+ * or consume (i.e. unless the %G_CONVERTER_INPUT_AT_END is specified) then
+ * %G_CONVERTER_CONVERTED is returned, and if no more data is to be output
+ * then %G_CONVERTER_FINISHED is returned.
+ *
+ * On error %G_CONVERTER_ERROR is returned and @error is set accordingly.
+ * Some errors need special handling:
+ *
+ * %G_IO_ERROR_NO_SPACE is returned if there is not enough space
+ * to write the resulting converted data, the application should
+ * call the function again with a larger @outbuf to continue.
+ *
+ * %G_IO_ERROR_PARTIAL_INPUT is returned if there is not enough
+ * input to fully determine what the conversion should produce,
+ * and the %G_CONVERTER_INPUT_AT_END flag is not set. This happens for
+ * example with an incomplete multibyte sequence when converting text,
+ * or when a regexp matches up to the end of the input (and may match
+ * further input). It may also happen when @inbuf_size is zero and
+ * there is no more data to produce.
+ *
+ * When this happens the application should read more input and then
+ * call the function again. If further input shows that there is no
+ * more data call the function again with the same data but with
+ * the %G_CONVERTER_INPUT_AT_END flag set. This may cause the conversion
+ * to finish as e.g. in the regexp match case (or, to fail again with
+ * %G_IO_ERROR_PARTIAL_INPUT in e.g. a charset conversion where the
+ * input is actually partial).
+ *
+ * After g_converter_convert() has returned %G_CONVERTER_FINISHED the
+ * converter object is in an invalid state where its not allowed
+ * to call g_converter_convert() anymore. At this time you can only
+ * free the object or call g_converter_reset() to reset it to the
+ * initial state.
+ *
+ * If the flag %G_CONVERTER_FLUSH is set then conversion is modified
+ * to try to write out all internal state to the output. The application
+ * has to call the function multiple times with the flag set, and when
+ * the available input has been consumed and all internal state has
+ * been produced then %G_CONVERTER_FLUSHED (or %G_CONVERTER_FINISHED if
+ * really at the end) is returned instead of %G_CONVERTER_CONVERTED.
+ * This is somewhat similar to what happens at the end of the input stream,
+ * but done in the middle of the data.
+ *
+ * This has different meanings for different conversions. For instance
+ * in a compression converter it would mean that we flush all the
+ * compression state into output such that if you uncompress the
+ * compressed data you get back all the input data. Doing this may
+ * make the final file larger due to padding though. Another example
+ * is a regexp conversion, where if you at the end of the flushed data
+ * have a match, but there is also a potential longer match. In the
+ * non-flushed case we would ask for more input, but when flushing we
+ * treat this as the end of input and do the match.
+ *
+ * Flushing is not always possible (like if a charset converter flushes
+ * at a partial multibyte sequence). Converters are supposed to try
+ * to produce as much output as possible and then return an error
+ * (typically %G_IO_ERROR_PARTIAL_INPUT).
+ *
+ * Returns: a #GConverterResult, %G_CONVERTER_ERROR on error.
+ * Since: 2.24
+ */
+
+
+/**
+ * g_converter_input_stream_get_converter:
+ * @converter_stream: a #GConverterInputStream
+ *
+ * Gets the #GConverter that is used by @converter_stream.
+ *
+ * Returns: (transfer none): the converter of the converter input stream
+ * Since: 2.24
+ */
+
+
+/**
+ * g_converter_input_stream_new:
+ * @base_stream: a #GInputStream
+ * @converter: a #GConverter
+ *
+ * Creates a new converter input stream for the @base_stream.
+ *
+ * Returns: a new #GInputStream.
+ */
+
+
+/**
+ * g_converter_output_stream_get_converter:
+ * @converter_stream: a #GConverterOutputStream
+ *
+ * Gets the #GConverter that is used by @converter_stream.
+ *
+ * Returns: (transfer none): the converter of the converter output stream
+ * Since: 2.24
+ */
+
+
+/**
+ * g_converter_output_stream_new:
+ * @base_stream: a #GOutputStream
+ * @converter: a #GConverter
+ *
+ * Creates a new converter output stream for the @base_stream.
+ *
+ * Returns: a new #GOutputStream.
+ */
+
+
+/**
+ * g_converter_reset:
+ * @converter: a #GConverter.
+ *
+ * Resets all internal state in the converter, making it behave
+ * as if it was just created. If the converter has any internal
+ * state that would produce output then that output is lost.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * g_credentials_get_native: (skip)
+ * @credentials: A #GCredentials.
+ * @native_type: The type of native credentials to get.
+ *
+ * Gets a pointer to native credentials of type @native_type from
+ * @credentials.
+ *
+ * It is a programming error (which will cause an warning to be
+ * logged) to use this method if there is no #GCredentials support for
+ * the OS or if @native_type isn't supported by the OS.
+ *
+ * operation there is no #GCredentials support for the OS or if
+ * @native_type isn't supported by the OS. Do not free the returned
+ * data, it is owned by @credentials.
+ *
+ * Returns: The pointer to native credentials or %NULL if the
+ * Since: 2.26
+ */
+
+
+/**
+ * g_credentials_get_unix_user:
+ * @credentials: A #GCredentials
+ * @error: Return location for error or %NULL.
+ *
+ * Tries to get the UNIX user identifier from @credentials. This
+ * method is only available on UNIX platforms.
+ *
+ * This operation can fail if #GCredentials is not supported on the
+ * OS or if the native credentials type does not contain information
+ * about the UNIX user.
+ *
+ * Returns: The UNIX user identifier or -1 if @error is set.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_credentials_is_same_user:
+ * @credentials: A #GCredentials.
+ * @other_credentials: A #GCredentials.
+ * @error: Return location for error or %NULL.
+ *
+ * Checks if @credentials and @other_credentials is the same user.
+ *
+ * This operation can fail if #GCredentials is not supported on the
+ * the OS.
+ *
+ * user, %FALSE otherwise or if @error is set.
+ *
+ * Returns: %TRUE if @credentials and @other_credentials has the same
+ * Since: 2.26
+ */
+
+
+/**
+ * g_credentials_new:
+ *
+ * Creates a new #GCredentials object with credentials matching the
+ * the current process.
+ *
+ * Returns: A #GCredentials. Free with g_object_unref().
+ * Since: 2.26
+ */
+
+
+/**
+ * g_credentials_set_native:
+ * @credentials: A #GCredentials.
+ * @native_type: The type of native credentials to set.
+ * @native: A pointer to native credentials.
+ *
+ * Copies the native credentials of type @native_type from @native
+ * into @credentials.
+ *
+ * It is a programming error (which will cause an warning to be
+ * logged) to use this method if there is no #GCredentials support for
+ * the OS or if @native_type isn't supported by the OS.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_credentials_set_unix_user:
+ * @credentials: A #GCredentials.
+ * @uid: The UNIX user identifier to set.
+ * @error: Return location for error or %NULL.
+ *
+ * Tries to set the UNIX user identifier on @credentials. This method
+ * is only available on UNIX platforms.
+ *
+ * This operation can fail if #GCredentials is not supported on the
+ * OS or if the native credentials type does not contain information
+ * about the UNIX user.
+ *
+ * Returns: %TRUE if @uid was set, %FALSE if error is set.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_credentials_to_string:
+ * @credentials: A #GCredentials object.
+ *
+ * Creates a human-readable textual representation of @credentials
+ * that can be used in logging and debug messages. The format of the
+ * returned string may change in future GLib release.
+ *
+ * Returns: A string that should be freed with g_free().
+ * Since: 2.26
+ */
+
+
+/**
+ * g_data_input_stream_get_byte_order:
+ * @stream: a given #GDataInputStream.
+ *
+ * Gets the byte order for the data input stream.
+ *
+ * Returns: the @stream's current #GDataStreamByteOrder.
+ */
+
+
+/**
+ * g_data_input_stream_get_newline_type:
+ * @stream: a given #GDataInputStream.
+ *
+ * Gets the current newline type for the @stream.
+ *
+ * Returns: #GDataStreamNewlineType for the given @stream.
+ */
+
+
+/**
+ * g_data_input_stream_new:
+ * @base_stream: a #GInputStream.
+ *
+ * Creates a new data input stream for the @base_stream.
+ *
+ * Returns: a new #GDataInputStream.
+ */
+
+
+/**
+ * g_data_input_stream_read_byte:
+ * @stream: a given #GDataInputStream.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: #GError for error reporting.
+ *
+ * Reads an unsigned 8-bit/1-byte value from @stream.
+ *
+ * if an error occurred.
+ *
+ * Returns: an unsigned 8-bit/1-byte value read from the @stream or %0
+ */
+
+
+/**
+ * g_data_input_stream_read_int16:
+ * @stream: a given #GDataInputStream.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: #GError for error reporting.
+ *
+ * Reads a 16-bit/2-byte value from @stream.
+ *
+ * In order to get the correct byte order for this read operation,
+ * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
+ *
+ * an error occurred.
+ *
+ * Returns: a signed 16-bit/2-byte value read from @stream or %0 if
+ */
+
+
+/**
+ * g_data_input_stream_read_int32:
+ * @stream: a given #GDataInputStream.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: #GError for error reporting.
+ *
+ * Reads a signed 32-bit/4-byte value from @stream.
+ *
+ * In order to get the correct byte order for this read operation,
+ * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * an error occurred.
+ *
+ * Returns: a signed 32-bit/4-byte value read from the @stream or %0 if
+ */
+
+
+/**
+ * g_data_input_stream_read_int64:
+ * @stream: a given #GDataInputStream.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: #GError for error reporting.
+ *
+ * Reads a 64-bit/8-byte value from @stream.
+ *
+ * In order to get the correct byte order for this read operation,
+ * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * an error occurred.
+ *
+ * Returns: a signed 64-bit/8-byte value read from @stream or %0 if
+ */
+
+
+/**
+ * g_data_input_stream_read_line:
+ * @stream: a given #GDataInputStream.
+ * @length: (out): a #gsize to get the length of the data read in.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: #GError for error reporting.
+ *
+ * Reads a line from the data input stream.  Note that no encoding
+ * checks or conversion is performed; the input is not guaranteed to
+ * be UTF-8, and may in fact have embedded NUL characters.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * NUL terminated byte array 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 %NULL and @error will be
+ * set. If there's no content to read, it will still return %NULL,
+ * but @error won't be set.
+ *
+ * Returns: (transfer full) (array zero-terminated=1) (element-type guint8): a
+ */
+
+
+/**
+ * g_data_input_stream_read_line_async:
+ * @stream: a given #GDataInputStream.
+ * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async): callback to call when the request is satisfied.
+ * @user_data: (closure): the data to pass to callback function.
+ *
+ * The asynchronous version of g_data_input_stream_read_line().  It is
+ * an error to have two outstanding calls to this function.
+ *
+ * When the operation is finished, @callback will be called. You
+ * can then call g_data_input_stream_read_line_finish() to get
+ * the result of the operation.
+ *
+ * Since: 2.20
+ */
+
+
+/**
+ * g_data_input_stream_read_line_finish:
+ * @stream: a given #GDataInputStream.
+ * @result: the #GAsyncResult that was provided to the callback.
+ * @length: (out): a #gsize to get the length of the data read in.
+ * @error: #GError for error reporting.
+ *
+ * Finish an asynchronous call started by
+ * g_data_input_stream_read_line_async().  Note the warning about
+ * string encoding in g_data_input_stream_read_line() applies here as
+ * well.
+ *
+ * NUL-terminated byte array 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 %NULL and
+ * @error will be set. If there's no content to read, it will
+ * still return %NULL, but @error won't be set.
+ *
+ * Returns: (transfer full) (array zero-terminated=1) (element-type guint8): a
+ * Since: 2.20
+ */
+
+
+/**
+ * g_data_input_stream_read_line_finish_utf8:
+ * @stream: a given #GDataInputStream.
+ * @result: the #GAsyncResult that was provided to the callback.
+ * @length: (out): a #gsize to get the length of the data read in.
+ * @error: #GError for error reporting.
+ *
+ * Finish an asynchronous call started by
+ * g_data_input_stream_read_line_async().
+ *
+ * (without the newlines).  Set @length to a #gsize to get the length
+ * of the read line.  On an error, it will return %NULL and @error
+ * will be set. For UTF-8 conversion errors, the set error domain is
+ * %G_CONVERT_ERROR.  If there's no content to read, it will still
+ * return %NULL, but @error won't be set.
+ *
+ * Returns: (transfer full): a string with the line that was read in
+ * Since: 2.30
+ */
+
+
+/**
+ * g_data_input_stream_read_line_utf8:
+ * @stream: a given #GDataInputStream.
+ * @length: (out): a #gsize to get the length of the data read in.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: #GError for error reporting.
+ *
+ * Reads a UTF-8 encoded line from the data input stream.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * 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 %NULL and @error will be set.  For UTF-8 conversion errors,
+ * the set error domain is %G_CONVERT_ERROR.  If there's no content to
+ * read, it will still return %NULL, but @error won't be set.
+ *
+ * Returns: (transfer full): a NUL terminated UTF-8 string with the
+ * Since: 2.30
+ */
+
+
+/**
+ * g_data_input_stream_read_uint16:
+ * @stream: a given #GDataInputStream.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: #GError for error reporting.
+ *
+ * Reads an unsigned 16-bit/2-byte value from @stream.
+ *
+ * In order to get the correct byte order for this read operation,
+ * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
+ *
+ * an error occurred.
+ *
+ * Returns: an unsigned 16-bit/2-byte value read from the @stream or %0 if
+ */
+
+
+/**
+ * g_data_input_stream_read_uint32:
+ * @stream: a given #GDataInputStream.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: #GError for error reporting.
+ *
+ * Reads an unsigned 32-bit/4-byte value from @stream.
+ *
+ * In order to get the correct byte order for this read operation,
+ * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * an error occurred.
+ *
+ * Returns: an unsigned 32-bit/4-byte value read from the @stream or %0 if
+ */
+
+
+/**
+ * g_data_input_stream_read_uint64:
+ * @stream: a given #GDataInputStream.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: #GError for error reporting.
+ *
+ * Reads an unsigned 64-bit/8-byte value from @stream.
+ *
+ * In order to get the correct byte order for this read operation,
+ * see g_data_input_stream_get_byte_order().
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * an error occurred.
+ *
+ * Returns: an unsigned 64-bit/8-byte read from @stream or %0 if
+ */
+
+
+/**
+ * g_data_input_stream_read_until:
+ * @stream: a given #GDataInputStream.
+ * @stop_chars: characters to terminate the read.
+ * @length: (out): a #gsize to get the length of the data read in.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: #GError for error reporting.
+ *
+ * Reads a string from the data input stream, up to the first
+ * occurrence of any of the stop characters.
+ *
+ * Note that, in contrast to g_data_input_stream_read_until_async(),
+ * this function consumes the stop character that it finds.
+ *
+ * Don't use this function in new code.  Its functionality is
+ * inconsistent with g_data_input_stream_read_until_async().  Both
+ * functions will be marked as deprecated in a future release.  Use
+ * g_data_input_stream_read_upto() instead, but note that that function
+ * does not consume the stop character.
+ *
+ * before encountering any of the stop characters. Set @length to
+ * a #gsize to get the length of the string. This function will
+ * return %NULL on an error.
+ *
+ * Returns: (transfer full): a string with the data that was read
+ */
+
+
+/**
+ * g_data_input_stream_read_until_async:
+ * @stream: a given #GDataInputStream.
+ * @stop_chars: characters to terminate the read.
+ * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async): callback to call when the request is satisfied.
+ * @user_data: (closure): the data to pass to callback function.
+ *
+ * The asynchronous version of g_data_input_stream_read_until().
+ * It is an error to have two outstanding calls to this function.
+ *
+ * Note that, in contrast to g_data_input_stream_read_until(),
+ * this function does not consume the stop character that it finds.  You
+ * must read it for yourself.
+ *
+ * When the operation is finished, @callback will be called. You
+ * can then call g_data_input_stream_read_until_finish() to get
+ * the result of the operation.
+ *
+ * Don't use this function in new code.  Its functionality is
+ * inconsistent with g_data_input_stream_read_until().  Both functions
+ * will be marked as deprecated in a future release.  Use
+ * g_data_input_stream_read_upto_async() instead.
+ *
+ * Since: 2.20
+ */
+
+
+/**
+ * g_data_input_stream_read_until_finish:
+ * @stream: a given #GDataInputStream.
+ * @result: the #GAsyncResult that was provided to the callback.
+ * @length: (out): a #gsize to get the length of the data read in.
+ * @error: #GError for error reporting.
+ *
+ * Finish an asynchronous call started by
+ * g_data_input_stream_read_until_async().
+ *
+ *
+ * before encountering any of the stop characters. Set @length to
+ * a #gsize to get the length of the string. This function will
+ * return %NULL on an error.
+ *
+ * Since: 2.20
+ * Returns: (transfer full): a string with the data that was read
+ */
+
+
+/**
+ * g_data_input_stream_read_upto:
+ * @stream: a #GDataInputStream
+ * @stop_chars: characters to terminate the read
+ * @stop_chars_len: length of @stop_chars. May be -1 if @stop_chars is nul-terminated
+ * @length: (out): a #gsize to get the length of the data read in
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
+ * @error: #GError for error reporting
+ *
+ * Reads a string from the data input stream, up to the first
+ * occurrence of any of the stop characters.
+ *
+ * In contrast to g_data_input_stream_read_until(), this function
+ * does <emphasis>not</emphasis> consume the stop character. You have
+ * to use g_data_input_stream_read_byte() to get it before calling
+ * g_data_input_stream_read_upto() again.
+ *
+ * Note that @stop_chars may contain '\0' if @stop_chars_len is
+ * specified.
+ *
+ * before encountering any of the stop characters. Set @length to
+ * a #gsize to get the length of the string. This function will
+ * return %NULL on an error
+ *
+ * Returns: (transfer full): a string with the data that was read
+ * Since: 2.26
+ */
+
+
+/**
+ * g_data_input_stream_read_upto_async:
+ * @stream: a #GDataInputStream
+ * @stop_chars: characters to terminate the read
+ * @stop_chars_len: length of @stop_chars. May be -1 if @stop_chars is nul-terminated
+ * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
+ * @callback: (scope async): callback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * The asynchronous version of g_data_input_stream_read_upto().
+ * It is an error to have two outstanding calls to this function.
+ *
+ * In contrast to g_data_input_stream_read_until(), this function
+ * does <emphasis>not</emphasis> consume the stop character. You have
+ * to use g_data_input_stream_read_byte() to get it before calling
+ * g_data_input_stream_read_upto() again.
+ *
+ * Note that @stop_chars may contain '\0' if @stop_chars_len is
+ * specified.
+ *
+ * When the operation is finished, @callback will be called. You
+ * can then call g_data_input_stream_read_upto_finish() to get
+ * the result of the operation.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_data_input_stream_read_upto_finish:
+ * @stream: a #GDataInputStream
+ * @result: the #GAsyncResult that was provided to the callback
+ * @length: (out): a #gsize to get the length of the data read in
+ * @error: #GError for error reporting
+ *
+ * Finish an asynchronous call started by
+ * g_data_input_stream_read_upto_async().
+ *
+ * Note that this function does <emphasis>not</emphasis> consume the
+ * stop character. You have to use g_data_input_stream_read_byte() to
+ * get it before calling g_data_input_stream_read_upto_async() again.
+ *
+ * before encountering any of the stop characters. Set @length to
+ * a #gsize to get the length of the string. This function will
+ * return %NULL on an error.
+ *
+ * Returns: (transfer full): a string with the data that was read
+ * Since: 2.24
+ */
+
+
+/**
+ * g_data_input_stream_set_byte_order:
+ * @stream: a given #GDataInputStream.
+ * @order: a #GDataStreamByteOrder to set.
+ *
+ * This function sets the byte order for the given @stream. All subsequent
+ * reads from the @stream will be read in the given @order.
+ */
+
+
+/**
+ * g_data_input_stream_set_newline_type:
+ * @stream: a #GDataInputStream.
+ * @type: the type of new line return as #GDataStreamNewlineType.
+ *
+ * Sets the newline type for the @stream.
+ *
+ * Note that using G_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 available.
+ */
+
+
+/**
+ * g_data_output_stream_get_byte_order:
+ * @stream: a #GDataOutputStream.
+ *
+ * Gets the byte order for the stream.
+ *
+ * Returns: the #GDataStreamByteOrder for the @stream.
+ */
+
+
+/**
+ * g_data_output_stream_new:
+ * @base_stream: a #GOutputStream.
+ *
+ * Creates a new data output stream for @base_stream.
+ *
+ * Returns: #GDataOutputStream.
+ */
+
+
+/**
+ * g_data_output_stream_put_byte:
+ * @stream: a #GDataOutputStream.
+ * @data: a #guchar.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, %NULL to ignore.
+ *
+ * Puts a byte into the output stream.
+ *
+ * Returns: %TRUE if @data was successfully added to the @stream.
+ */
+
+
+/**
+ * g_data_output_stream_put_int16:
+ * @stream: a #GDataOutputStream.
+ * @data: a #gint16.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, %NULL to ignore.
+ *
+ * Puts a signed 16-bit integer into the output stream.
+ *
+ * Returns: %TRUE if @data was successfully added to the @stream.
+ */
+
+
+/**
+ * g_data_output_stream_put_int32:
+ * @stream: a #GDataOutputStream.
+ * @data: a #gint32.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, %NULL to ignore.
+ *
+ * Puts a signed 32-bit integer into the output stream.
+ *
+ * Returns: %TRUE if @data was successfully added to the @stream.
+ */
+
+
+/**
+ * g_data_output_stream_put_int64:
+ * @stream: a #GDataOutputStream.
+ * @data: a #gint64.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, %NULL to ignore.
+ *
+ * Puts a signed 64-bit integer into the stream.
+ *
+ * Returns: %TRUE if @data was successfully added to the @stream.
+ */
+
+
+/**
+ * g_data_output_stream_put_string:
+ * @stream: a #GDataOutputStream.
+ * @str: a string.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, %NULL to ignore.
+ *
+ * Puts a string into the output stream.
+ *
+ * Returns: %TRUE if @string was successfully added to the @stream.
+ */
+
+
+/**
+ * g_data_output_stream_put_uint16:
+ * @stream: a #GDataOutputStream.
+ * @data: a #guint16.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, %NULL to ignore.
+ *
+ * Puts an unsigned 16-bit integer into the output stream.
+ *
+ * Returns: %TRUE if @data was successfully added to the @stream.
+ */
+
+
+/**
+ * g_data_output_stream_put_uint32:
+ * @stream: a #GDataOutputStream.
+ * @data: a #guint32.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, %NULL to ignore.
+ *
+ * Puts an unsigned 32-bit integer into the stream.
+ *
+ * Returns: %TRUE if @data was successfully added to the @stream.
+ */
+
+
+/**
+ * g_data_output_stream_put_uint64:
+ * @stream: a #GDataOutputStream.
+ * @data: a #guint64.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, %NULL to ignore.
+ *
+ * Puts an unsigned 64-bit integer into the stream.
+ *
+ * Returns: %TRUE if @data was successfully added to the @stream.
+ */
+
+
+/**
+ * g_data_output_stream_set_byte_order:
+ * @stream: a #GDataOutputStream.
+ * @order: a %GDataStreamByteOrder.
+ *
+ * Sets the byte order of the data output stream to @order.
+ */
+
+
+/**
+ * g_dbus_action_group_get:
+ * @connection: A #GDBusConnection
+ * @bus_name: the bus name which exports the action group
+ * @object_path: the object path at which the action group is exported
+ *
+ * Obtains a #GDBusActionGroup for the action group which is exported at
+ * the given @bus_name and @object_path.
+ *
+ * The thread default main context is taken at the time of this call.
+ * All signals on the menu model (and any linked models) are reported
+ * with respect to this context.  All calls on the returned menu model
+ * (and linked models) must also originate from this same context, with
+ * the thread default main context unchanged.
+ *
+ * This call is non-blocking.  The returned action group may or may not
+ * already be filled in.  The correct thing to do is connect the signals
+ * for the action group to monitor for changes and then to call
+ * g_action_group_list_actions() to get the initial list.
+ *
+ * Returns: (transfer full): a #GDBusActionGroup
+ * Since: 2.32
+ */
+
+
+/**
+ * g_dbus_address_get_for_bus_sync:
+ * @bus_type: A #GBusType.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Synchronously looks up the D-Bus address for the well-known message
+ * bus instance specified by @bus_type. This may involve using various
+ * platform specific mechanisms.
+ *
+ * Returns: A valid D-Bus address string for @bus_type or %NULL if @error is set.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_address_get_stream:
+ * @address: A valid D-Bus address.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
+ * @user_data: Data to pass to @callback.
+ *
+ * Asynchronously connects to an endpoint specified by @address and
+ * sets up the connection so it is in a state to run the client-side
+ * of the D-Bus authentication conversation.
+ *
+ * When the operation is finished, @callback will be invoked. You can
+ * then call g_dbus_address_get_stream_finish() to get the result of
+ * the operation.
+ *
+ * This is an asynchronous failable function. See
+ * g_dbus_address_get_stream_sync() for the synchronous version.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_address_get_stream_finish:
+ * @res: A #GAsyncResult obtained from the GAsyncReadyCallback passed to g_dbus_address_get_stream().
+ * @out_guid: %NULL or return location to store the GUID extracted from @address, if any.
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with g_dbus_address_get_stream().
+ *
+ * Returns: (transfer full): A #GIOStream or %NULL if @error is set.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_address_get_stream_sync:
+ * @address: A valid D-Bus address.
+ * @out_guid: %NULL or return location to store the GUID extracted from @address, if any.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Synchronously connects to an endpoint specified by @address and
+ * sets up the connection so it is in a state to run the client-side
+ * of the D-Bus authentication conversation.
+ *
+ * This is a synchronous failable function. See
+ * g_dbus_address_get_stream() for the asynchronous version.
+ *
+ * Returns: (transfer full): A #GIOStream or %NULL if @error is set.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_annotation_info_lookup:
+ * @annotations: (array zero-terminated=1) (allow-none): A %NULL-terminated array of annotations or %NULL.
+ * @name: The name of the annotation to look up.
+ *
+ * Looks up the value of an annotation.
+ *
+ * This cost of this function is O(n) in number of annotations.
+ *
+ * Returns: The value or %NULL if not found. Do not free, it is owned by @annotations.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_annotation_info_ref:
+ * @info: A #GDBusNodeInfo
+ *
+ * If @info is statically allocated does nothing. Otherwise increases
+ * the reference count.
+ *
+ * Returns: The same @info.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_annotation_info_unref:
+ * @info: A #GDBusAnnotationInfo.
+ *
+ * If @info is statically allocated, does nothing. Otherwise decreases
+ * the reference count of @info. When its reference count drops to 0,
+ * the memory used is freed.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_arg_info_ref:
+ * @info: A #GDBusArgInfo
+ *
+ * If @info is statically allocated does nothing. Otherwise increases
+ * the reference count.
+ *
+ * Returns: The same @info.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_arg_info_unref:
+ * @info: A #GDBusArgInfo.
+ *
+ * If @info is statically allocated, does nothing. Otherwise decreases
+ * the reference count of @info. When its reference count drops to 0,
+ * the memory used is freed.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_auth_observer_authorize_authenticated_peer:
+ * @observer: A #GDBusAuthObserver.
+ * @stream: A #GIOStream for the #GDBusConnection.
+ * @credentials: (allow-none): Credentials received from the peer or %NULL.
+ *
+ * Emits the #GDBusAuthObserver::authorize-authenticated-peer signal on @observer.
+ *
+ * Returns: %TRUE if the peer is authorized, %FALSE if not.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_auth_observer_new:
+ *
+ * Creates a new #GDBusAuthObserver object.
+ *
+ * Returns: A #GDBusAuthObserver. Free with g_object_unref().
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_add_filter:
+ * @connection: A #GDBusConnection.
+ * @filter_function: A filter function.
+ * @user_data: User data to pass to @filter_function.
+ * @user_data_free_func: Function to free @user_data with when filter is removed or %NULL.
+ *
+ * Adds a message filter. Filters are handlers that are run on all
+ * incoming and outgoing messages, prior to standard dispatch. Filters
+ * are run in the order that they were added.  The same handler can be
+ * added as a filter more than once, in which case it will be run more
+ * than once.  Filters added during a filter callback won't be run on
+ * the message being processed. Filter functions are allowed to modify
+ * and even drop messages.
+ *
+ * Note that filters are run in a dedicated message handling thread so
+ * they can't block and, generally, can't do anything but signal a
+ * worker thread. Also note that filters are rarely needed - use API
+ * such as g_dbus_connection_send_message_with_reply(),
+ * g_dbus_connection_signal_subscribe() or g_dbus_connection_call() instead.
+ *
+ * If a filter consumes an incoming message the message is not
+ * dispatched anywhere else - not even the standard dispatch machinery
+ * (that API such as g_dbus_connection_signal_subscribe() and
+ * g_dbus_connection_send_message_with_reply() relies on) will see the
+ * message. Similary, if a filter consumes an outgoing message, the
+ * message will not be sent to the other peer.
+ *
+ * g_dbus_connection_remove_filter().
+ *
+ * Returns: A filter identifier that can be used with
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_call:
+ * @connection: A #GDBusConnection.
+ * @bus_name: (allow-none): A unique or well-known bus name or %NULL if @connection is not a message bus connection.
+ * @object_path: Path of remote object.
+ * @interface_name: D-Bus interface to invoke method on.
+ * @method_name: The name of the method to invoke.
+ * @parameters: (allow-none): A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
+ * @reply_type: (allow-none): The expected type of the reply, or %NULL.
+ * @flags: Flags from the #GDBusCallFlags enumeration.
+ * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @callback: (allow-none): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
+ * @user_data: The data to pass to @callback.
+ *
+ * Asynchronously invokes the @method_name method on the
+ * @interface_name D-Bus interface on the remote object at
+ * @object_path owned by @bus_name.
+ *
+ * If @connection is closed then the operation will fail with
+ * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
+ * fail with %G_IO_ERROR_CANCELLED. If @parameters contains a value
+ * not compatible with the D-Bus protocol, the operation fails with
+ * %G_IO_ERROR_INVALID_ARGUMENT.
+ *
+ * If @reply_type is non-%NULL then the reply will be checked for having this type and an
+ * error will be raised if it does not match.  Said another way, if you give a @reply_type
+ * then any non-%NULL return value will be of this type.
+ *
+ * If the @parameters #GVariant is floating, it is consumed. This allows
+ * convenient 'inline' use of g_variant_new(), e.g.:
+ * |[
+ * g_dbus_connection_call (connection,
+ * "org.freedesktop.StringThings",
+ * "/org/freedesktop/StringThings",
+ * "org.freedesktop.StringThings",
+ * "TwoStrings",
+ * g_variant_new ("(ss)",
+ * "Thing One",
+ * "Thing Two"),
+ * NULL,
+ * G_DBUS_CALL_FLAGS_NONE,
+ * -1,
+ * NULL,
+ * (GAsyncReadyCallback) two_strings_done,
+ * NULL);
+ * ]|
+ *
+ * This is an asynchronous method. When the operation is finished, @callback will be invoked
+ * in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
+ * of the thread you are calling this method from. You can then call
+ * g_dbus_connection_call_finish() to get the result of the operation.
+ * See g_dbus_connection_call_sync() for the synchronous version of this
+ * function.
+ *
+ * If @callback is %NULL then the D-Bus method call message will be sent with
+ * the %G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED flag set.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_call_finish:
+ * @connection: A #GDBusConnection.
+ * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_call().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with g_dbus_connection_call().
+ *
+ * return values. Free with g_variant_unref().
+ *
+ * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_call_sync:
+ * @connection: A #GDBusConnection.
+ * @bus_name: A unique or well-known bus name.
+ * @object_path: Path of remote object.
+ * @interface_name: D-Bus interface to invoke method on.
+ * @method_name: The name of the method to invoke.
+ * @parameters: (allow-none): A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
+ * @reply_type: (allow-none): The expected type of the reply, or %NULL.
+ * @flags: Flags from the #GDBusCallFlags enumeration.
+ * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Synchronously invokes the @method_name method on the
+ * @interface_name D-Bus interface on the remote object at
+ * @object_path owned by @bus_name.
+ *
+ * If @connection is closed then the operation will fail with
+ * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the
+ * operation will fail with %G_IO_ERROR_CANCELLED. If @parameters
+ * contains a value not compatible with the D-Bus protocol, the operation
+ * fails with %G_IO_ERROR_INVALID_ARGUMENT.
+ * If @reply_type is non-%NULL then the reply will be checked for having
+ * this type and an error will be raised if it does not match.  Said
+ * another way, if you give a @reply_type then any non-%NULL return
+ * value will be of this type.
+ *
+ * If the @parameters #GVariant is floating, it is consumed.
+ * This allows convenient 'inline' use of g_variant_new(), e.g.:
+ * |[
+ * g_dbus_connection_call_sync (connection,
+ * "org.freedesktop.StringThings",
+ * "/org/freedesktop/StringThings",
+ * "org.freedesktop.StringThings",
+ * "TwoStrings",
+ * g_variant_new ("(ss)",
+ * "Thing One",
+ * "Thing Two"),
+ * NULL,
+ * G_DBUS_CALL_FLAGS_NONE,
+ * -1,
+ * NULL,
+ * &amp;error);
+ * ]|
+ *
+ * The calling thread is blocked until a reply is received. See
+ * g_dbus_connection_call() for the asynchronous version of
+ * this method.
+ *
+ * return values. Free with g_variant_unref().
+ *
+ * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_call_with_unix_fd_list:
+ * @connection: A #GDBusConnection.
+ * @bus_name: (allow-none): A unique or well-known bus name or %NULL if @connection is not a message bus connection.
+ * @object_path: Path of remote object.
+ * @interface_name: D-Bus interface to invoke method on.
+ * @method_name: The name of the method to invoke.
+ * @parameters: (allow-none): A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
+ * @reply_type: (allow-none): The expected type of the reply, or %NULL.
+ * @flags: Flags from the #GDBusCallFlags enumeration.
+ * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
+ * @fd_list: (allow-none): A #GUnixFDList or %NULL.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @callback: (allow-none): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation.
+ * @user_data: The data to pass to @callback.
+ *
+ * Like g_dbus_connection_call() but also takes a #GUnixFDList object.
+ *
+ * This method is only available on UNIX.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_connection_call_with_unix_fd_list_finish:
+ * @connection: A #GDBusConnection.
+ * @out_fd_list: (out) (allow-none): Return location for a #GUnixFDList or %NULL.
+ * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_call_with_unix_fd_list().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with g_dbus_connection_call_with_unix_fd_list().
+ *
+ * return values. Free with g_variant_unref().
+ *
+ * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_connection_call_with_unix_fd_list_sync:
+ * @connection: A #GDBusConnection.
+ * @bus_name: A unique or well-known bus name.
+ * @object_path: Path of remote object.
+ * @interface_name: D-Bus interface to invoke method on.
+ * @method_name: The name of the method to invoke.
+ * @parameters: (allow-none): A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
+ * @reply_type: (allow-none): The expected type of the reply, or %NULL.
+ * @flags: Flags from the #GDBusCallFlags enumeration.
+ * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
+ * @fd_list: (allow-none): A #GUnixFDList or %NULL.
+ * @out_fd_list: (out) (allow-none): Return location for a #GUnixFDList or %NULL.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Like g_dbus_connection_call_sync() but also takes and returns #GUnixFDList objects.
+ *
+ * This method is only available on UNIX.
+ *
+ * return values. Free with g_variant_unref().
+ *
+ * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_connection_close:
+ * @connection: A #GDBusConnection.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @callback: (allow-none): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
+ * @user_data: The data to pass to @callback.
+ *
+ * Closes @connection. Note that this never causes the process to
+ * exit (this might only happen if the other end of a shared message
+ * bus connection disconnects, see #GDBusConnection:exit-on-close).
+ *
+ * Once the connection is closed, operations such as sending a message
+ * will return with the error %G_IO_ERROR_CLOSED. Closing a connection
+ * will not automatically flush the connection so queued messages may
+ * be lost. Use g_dbus_connection_flush() if you need such guarantees.
+ *
+ * If @connection is already closed, this method fails with
+ * %G_IO_ERROR_CLOSED.
+ *
+ * When @connection has been closed, the #GDBusConnection::closed
+ * signal is emitted in the <link
+ * linkend="g-main-context-push-thread-default">thread-default main
+ * loop</link> of the thread that @connection was constructed in.
+ *
+ * This is an asynchronous method. When the operation is finished,
+ * @callback will be invoked in the <link
+ * linkend="g-main-context-push-thread-default">thread-default main
+ * loop</link> of the thread you are calling this method from. You can
+ * then call g_dbus_connection_close_finish() to get the result of the
+ * operation.  See g_dbus_connection_close_sync() for the synchronous
+ * version.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_close_finish:
+ * @connection: A #GDBusConnection.
+ * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_close().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with g_dbus_connection_close().
+ *
+ * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_close_sync:
+ * @connection: A #GDBusConnection.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Synchronously closees @connection. The calling thread is blocked
+ * until this is done. See g_dbus_connection_close() for the
+ * asynchronous version of this method and more details about what it
+ * does.
+ *
+ * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_emit_signal:
+ * @connection: A #GDBusConnection.
+ * @destination_bus_name: (allow-none): The unique bus name for the destination for the signal or %NULL to emit to all listeners.
+ * @object_path: Path of remote object.
+ * @interface_name: D-Bus interface to emit a signal on.
+ * @signal_name: The name of the signal to emit.
+ * @parameters: (allow-none): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
+ * @error: Return location for error or %NULL.
+ *
+ * Emits a signal.
+ *
+ * If the parameters GVariant is floating, it is consumed.
+ *
+ * This can only fail if @parameters is not compatible with the D-Bus protocol.
+ *
+ * Returns: %TRUE unless @error is set.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_export_action_group:
+ * @connection: a #GDBusConnection
+ * @object_path: a D-Bus object path
+ * @action_group: a #GActionGroup
+ * @error: a pointer to a %NULL #GError, or %NULL
+ *
+ * Exports @action_group on @connection at @object_path.
+ *
+ * The implemented D-Bus API should be considered private.  It is
+ * subject to change in the future.
+ *
+ * A given object path can only have one action group exported on it.
+ * If this constraint is violated, the export will fail and 0 will be
+ * returned (with @error set accordingly).
+ *
+ * You can unexport the action group using
+ * g_dbus_connection_unexport_action_group() with the return value of
+ * this function.
+ *
+ * The thread default main context is taken at the time of this call.
+ * All incoming action activations and state change requests are
+ * reported from this context.  Any changes on the action group that
+ * cause it to emit signals must also come from this same context.
+ * Since incoming action activations and state change requests are
+ * rather likely to cause changes on the action group, this effectively
+ * limits a given action group to being exported from only one main
+ * context.
+ *
+ * Returns: the ID of the export (never zero), or 0 in case of failure
+ * Since: 2.32
+ */
+
+
+/**
+ * g_dbus_connection_export_menu_model:
+ * @connection: a #GDBusConnection
+ * @object_path: a D-Bus object path
+ * @menu: a #GMenuModel
+ * @error: return location for an error, or %NULL
+ *
+ * Exports @menu on @connection at @object_path.
+ *
+ * The implemented D-Bus API should be considered private.
+ * It is subject to change in the future.
+ *
+ * An object path can only have one action group exported on it. If this
+ * constraint is violated, the export will fail and 0 will be
+ * returned (with @error set accordingly).
+ *
+ * You can unexport the menu model using
+ * g_dbus_connection_unexport_menu_model() with the return value of
+ * this function.
+ *
+ * Returns: the ID of the export (never zero), or 0 in case of failure
+ * Since: 2.32
+ */
+
+
+/**
+ * g_dbus_connection_flush:
+ * @connection: A #GDBusConnection.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @callback: (allow-none): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
+ * @user_data: The data to pass to @callback.
+ *
+ * Asynchronously flushes @connection, that is, writes all queued
+ * outgoing message to the transport and then flushes the transport
+ * (using g_output_stream_flush_async()). This is useful in programs
+ * that wants to emit a D-Bus signal and then exit
+ * immediately. Without flushing the connection, there is no guarantee
+ * that the message has been sent to the networking buffers in the OS
+ * kernel.
+ *
+ * This is an asynchronous method. When the operation is finished,
+ * @callback will be invoked in the <link
+ * linkend="g-main-context-push-thread-default">thread-default main
+ * loop</link> of the thread you are calling this method from. You can
+ * then call g_dbus_connection_flush_finish() to get the result of the
+ * operation.  See g_dbus_connection_flush_sync() for the synchronous
+ * version.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_flush_finish:
+ * @connection: A #GDBusConnection.
+ * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_flush().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with g_dbus_connection_flush().
+ *
+ * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_flush_sync:
+ * @connection: A #GDBusConnection.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Synchronously flushes @connection. The calling thread is blocked
+ * until this is done. See g_dbus_connection_flush() for the
+ * asynchronous version of this method and more details about what it
+ * does.
+ *
+ * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_get_capabilities:
+ * @connection: A #GDBusConnection.
+ *
+ * Gets the capabilities negotiated with the remote peer
+ *
+ * Returns: Zero or more flags from the #GDBusCapabilityFlags enumeration.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_get_exit_on_close:
+ * @connection: A #GDBusConnection.
+ *
+ * Gets whether the process is terminated when @connection is
+ * closed by the remote peer. See
+ * #GDBusConnection:exit-on-close for more details.
+ *
+ * closed by the remote peer.
+ *
+ * Returns: Whether the process is terminated when @connection is
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_get_guid:
+ * @connection: A #GDBusConnection.
+ *
+ * The GUID of the peer performing the role of server when
+ * authenticating. See #GDBusConnection:guid for more details.
+ *
+ * @connection.
+ *
+ * Returns: The GUID. Do not free this string, it is owned by
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_get_peer_credentials:
+ * @connection: A #GDBusConnection.
+ *
+ * Gets the credentials of the authenticated peer. This will always
+ * return %NULL unless @connection acted as a server
+ * (e.g. %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER was passed)
+ * when set up and the client passed credentials as part of the
+ * authentication process.
+ *
+ * In a message bus setup, the message bus is always the server and
+ * each application is a client. So this method will always return
+ * %NULL for message bus clients.
+ *
+ * this object, it is owned by @connection.
+ *
+ * Returns: (transfer none): A #GCredentials or %NULL if not available. Do not free
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_get_stream:
+ * @connection: a #GDBusConnection
+ *
+ * Gets the underlying stream used for IO.
+ *
+ * While the #GDBusConnection is active, it will interact with this
+ * stream from a worker thread, so it is not safe to interact with
+ * the stream directly.
+ *
+ * Returns: (transfer none): the stream used for IO
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_get_unique_name:
+ * @connection: A #GDBusConnection.
+ *
+ * Gets the unique name of @connection as assigned by the message
+ * bus. This can also be used to figure out if @connection is a
+ * message bus connection.
+ *
+ * bus connection. Do not free this string, it is owned by
+ * @connection.
+ *
+ * Returns: The unique name or %NULL if @connection is not a message
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_is_closed:
+ * @connection: A #GDBusConnection.
+ *
+ * Gets whether @connection is closed.
+ *
+ * Returns: %TRUE if the connection is closed, %FALSE otherwise.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_new:
+ * @stream: A #GIOStream.
+ * @guid: (allow-none): The GUID to use if a authenticating as a server or %NULL.
+ * @flags: Flags describing how to make the connection.
+ * @observer: (allow-none): A #GDBusAuthObserver or %NULL.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
+ * @user_data: The data to pass to @callback.
+ *
+ * Asynchronously sets up a D-Bus connection for exchanging D-Bus messages
+ * with the end represented by @stream.
+ *
+ * If @stream is a #GSocketConnection, then the corresponding #GSocket
+ * will be put into non-blocking mode.
+ *
+ * The D-Bus connection will interact with @stream from a worker thread.
+ * As a result, the caller should not interact with @stream after this
+ * method has been called, except by calling g_object_unref() on it.
+ *
+ * If @observer is not %NULL it may be used to control the
+ * authentication process.
+ *
+ * When the operation is finished, @callback will be invoked. You can
+ * then call g_dbus_connection_new_finish() to get the result of the
+ * operation.
+ *
+ * This is a asynchronous failable constructor. See
+ * g_dbus_connection_new_sync() for the synchronous
+ * version.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_new_finish:
+ * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_new().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with g_dbus_connection_new().
+ *
+ * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_new_for_address:
+ * @address: A D-Bus address.
+ * @flags: Flags describing how to make the connection.
+ * @observer: (allow-none): A #GDBusAuthObserver or %NULL.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
+ * @user_data: The data to pass to @callback.
+ *
+ * Asynchronously connects and sets up a D-Bus client connection for
+ * exchanging D-Bus messages with an endpoint specified by @address
+ * which must be in the D-Bus address format.
+ *
+ * This constructor can only be used to initiate client-side
+ * connections - use g_dbus_connection_new() if you need to act as the
+ * server. In particular, @flags cannot contain the
+ * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or
+ * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags.
+ *
+ * When the operation is finished, @callback will be invoked. You can
+ * then call g_dbus_connection_new_finish() to get the result of the
+ * operation.
+ *
+ * If @observer is not %NULL it may be used to control the
+ * authentication process.
+ *
+ * This is a asynchronous failable constructor. See
+ * g_dbus_connection_new_for_address_sync() for the synchronous
+ * version.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_new_for_address_finish:
+ * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_new().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with g_dbus_connection_new_for_address().
+ *
+ * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_new_for_address_sync:
+ * @address: A D-Bus address.
+ * @flags: Flags describing how to make the connection.
+ * @observer: (allow-none): A #GDBusAuthObserver or %NULL.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Synchronously connects and sets up a D-Bus client connection for
+ * exchanging D-Bus messages with an endpoint specified by @address
+ * which must be in the D-Bus address format.
+ *
+ * This constructor can only be used to initiate client-side
+ * connections - use g_dbus_connection_new_sync() if you need to act
+ * as the server. In particular, @flags cannot contain the
+ * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or
+ * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags.
+ *
+ * This is a synchronous failable constructor. See
+ * g_dbus_connection_new_for_address() for the asynchronous version.
+ *
+ * If @observer is not %NULL it may be used to control the
+ * authentication process.
+ *
+ * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_new_sync:
+ * @stream: A #GIOStream.
+ * @guid: (allow-none): The GUID to use if a authenticating as a server or %NULL.
+ * @flags: Flags describing how to make the connection.
+ * @observer: (allow-none): A #GDBusAuthObserver or %NULL.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Synchronously sets up a D-Bus connection for exchanging D-Bus messages
+ * with the end represented by @stream.
+ *
+ * If @stream is a #GSocketConnection, then the corresponding #GSocket
+ * will be put into non-blocking mode.
+ *
+ * The D-Bus connection will interact with @stream from a worker thread.
+ * As a result, the caller should not interact with @stream after this
+ * method has been called, except by calling g_object_unref() on it.
+ *
+ * If @observer is not %NULL it may be used to control the
+ * authentication process.
+ *
+ * This is a synchronous failable constructor. See
+ * g_dbus_connection_new() for the asynchronous version.
+ *
+ * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_register_object:
+ * @connection: A #GDBusConnection.
+ * @object_path: The object path to register at.
+ * @interface_info: Introspection data for the interface.
+ * @vtable: (allow-none): A #GDBusInterfaceVTable to call into or %NULL.
+ * @user_data: (allow-none): Data to pass to functions in @vtable.
+ * @user_data_free_func: Function to call when the object path is unregistered.
+ * @error: Return location for error or %NULL.
+ *
+ * Registers callbacks for exported objects at @object_path with the
+ * D-Bus interface that is described in @interface_info.
+ *
+ * Calls to functions in @vtable (and @user_data_free_func) will
+ * happen in the <link linkend="g-main-context-push-thread-default">thread-default main
+ * loop</link> of the thread you are calling this method from.
+ *
+ * Note that all #GVariant values passed to functions in @vtable will match
+ * the signature given in @interface_info - if a remote caller passes
+ * incorrect values, the <literal>org.freedesktop.DBus.Error.InvalidArgs</literal>
+ * is returned to the remote caller.
+ *
+ * Additionally, if the remote caller attempts to invoke methods or
+ * access properties not mentioned in @interface_info the
+ * <literal>org.freedesktop.DBus.Error.UnknownMethod</literal> resp.
+ * <literal>org.freedesktop.DBus.Error.InvalidArgs</literal> errors
+ * are returned to the caller.
+ *
+ * It is considered a programming error if the
+ * #GDBusInterfaceGetPropertyFunc function in @vtable returns a
+ * #GVariant of incorrect type.
+ *
+ * If an existing callback is already registered at @object_path and
+ * @interface_name, then @error is set to #G_IO_ERROR_EXISTS.
+ *
+ * GDBus automatically implements the standard D-Bus interfaces
+ * org.freedesktop.DBus.Properties, org.freedesktop.DBus.Introspectable
+ * and org.freedesktop.Peer, so you don't have to implement those for
+ * the objects you export. You <emphasis>can</emphasis> implement
+ * org.freedesktop.DBus.Properties yourself, e.g. to handle getting
+ * and setting of properties asynchronously.
+ *
+ * Note that the reference count on @interface_info will be
+ * incremented by 1 (unless allocated statically, e.g. if the
+ * reference count is -1, see g_dbus_interface_info_ref()) for as long
+ * as the object is exported. Also note that @vtable will be copied.
+ *
+ * See <xref linkend="gdbus-server"/> for an example of how to use this method.
+ *
+ * that can be used with g_dbus_connection_unregister_object() .
+ *
+ * Returns: 0 if @error is set, otherwise a registration id (never 0)
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_register_subtree:
+ * @connection: A #GDBusConnection.
+ * @object_path: The object path to register the subtree at.
+ * @vtable: A #GDBusSubtreeVTable to enumerate, introspect and dispatch nodes in the subtree.
+ * @flags: Flags used to fine tune the behavior of the subtree.
+ * @user_data: Data to pass to functions in @vtable.
+ * @user_data_free_func: Function to call when the subtree is unregistered.
+ * @error: Return location for error or %NULL.
+ *
+ * Registers a whole subtree of <quote>dynamic</quote> objects.
+ *
+ * The @enumerate and @introspection functions in @vtable are used to
+ * convey, to remote callers, what nodes exist in the subtree rooted
+ * by @object_path.
+ *
+ * When handling remote calls into any node in the subtree, first the
+ * @enumerate function is used to check if the node exists. If the node exists
+ * or the #G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is set
+ * the @introspection function is used to check if the node supports the
+ * requested method. If so, the @dispatch function is used to determine
+ * where to dispatch the call. The collected #GDBusInterfaceVTable and
+ * #gpointer will be used to call into the interface vtable for processing
+ * the request.
+ *
+ * All calls into user-provided code will be invoked in the <link
+ * linkend="g-main-context-push-thread-default">thread-default main
+ * loop</link> of the thread you are calling this method from.
+ *
+ * If an existing subtree is already registered at @object_path or
+ * then @error is set to #G_IO_ERROR_EXISTS.
+ *
+ * Note that it is valid to register regular objects (using
+ * g_dbus_connection_register_object()) in a subtree registered with
+ * g_dbus_connection_register_subtree() - if so, the subtree handler
+ * is tried as the last resort. One way to think about a subtree
+ * handler is to consider it a <quote>fallback handler</quote>
+ * for object paths not registered via g_dbus_connection_register_object()
+ * or other bindings.
+ *
+ * Note that @vtable will be copied so you cannot change it after
+ * registration.
+ *
+ * See <xref linkend="gdbus-subtree-server"/> for an example of how to use this method.
+ *
+ * that can be used with g_dbus_connection_unregister_subtree() .
+ *
+ * Returns: 0 if @error is set, otherwise a subtree registration id (never 0)
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_remove_filter:
+ * @connection: a #GDBusConnection
+ * @filter_id: an identifier obtained from g_dbus_connection_add_filter()
+ *
+ * Removes a filter.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_send_message:
+ * @connection: A #GDBusConnection.
+ * @message: A #GDBusMessage
+ * @flags: Flags affecting how the message is sent.
+ * @out_serial: (out) (allow-none): Return location for serial number assigned to @message when sending it or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Asynchronously sends @message to the peer represented by @connection.
+ *
+ * Unless @flags contain the
+ * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
+ * will be assigned by @connection and set on @message via
+ * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
+ * serial number used will be written to this location prior to
+ * submitting the message to the underlying transport.
+ *
+ * If @connection is closed then the operation will fail with
+ * %G_IO_ERROR_CLOSED. If @message is not well-formed,
+ * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
+ *
+ * See <xref linkend="gdbus-server"/> and <xref
+ * linkend="gdbus-unix-fd-client"/> for an example of how to use this
+ * low-level API to send and receive UNIX file descriptors.
+ *
+ * Note that @message must be unlocked, unless @flags contain the
+ * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
+ *
+ * transmission, %FALSE if @error is set.
+ *
+ * Returns: %TRUE if the message was well-formed and queued for
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_send_message_with_reply:
+ * @connection: A #GDBusConnection.
+ * @message: A #GDBusMessage.
+ * @flags: Flags affecting how the message is sent.
+ * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
+ * @out_serial: (out) (allow-none): Return location for serial number assigned to @message when sending it or %NULL.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @callback: (allow-none): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
+ * @user_data: The data to pass to @callback.
+ *
+ * Asynchronously sends @message to the peer represented by @connection.
+ *
+ * Unless @flags contain the
+ * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
+ * will be assigned by @connection and set on @message via
+ * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
+ * serial number used will be written to this location prior to
+ * submitting the message to the underlying transport.
+ *
+ * If @connection is closed then the operation will fail with
+ * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
+ * fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed,
+ * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
+ *
+ * This is an asynchronous method. When the operation is finished, @callback will be invoked
+ * in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
+ * of the thread you are calling this method from. You can then call
+ * g_dbus_connection_send_message_with_reply_finish() to get the result of the operation.
+ * See g_dbus_connection_send_message_with_reply_sync() for the synchronous version.
+ *
+ * Note that @message must be unlocked, unless @flags contain the
+ * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
+ *
+ * See <xref linkend="gdbus-server"/> and <xref
+ * linkend="gdbus-unix-fd-client"/> for an example of how to use this
+ * low-level API to send and receive UNIX file descriptors.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_send_message_with_reply_finish:
+ * @connection: a #GDBusConnection
+ * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_send_message_with_reply().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with g_dbus_connection_send_message_with_reply().
+ *
+ * Note that @error is only set if a local in-process error
+ * occurred. That is to say that the returned #GDBusMessage object may
+ * be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use
+ * g_dbus_message_to_gerror() to transcode this to a #GError.
+ *
+ * See <xref linkend="gdbus-server"/> and <xref
+ * linkend="gdbus-unix-fd-client"/> for an example of how to use this
+ * low-level API to send and receive UNIX file descriptors.
+ *
+ * Returns: (transfer full): A locked #GDBusMessage or %NULL if @error is set.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_send_message_with_reply_sync:
+ * @connection: A #GDBusConnection.
+ * @message: A #GDBusMessage.
+ * @flags: Flags affecting how the message is sent.
+ * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
+ * @out_serial: (out) (allow-none): Return location for serial number assigned to @message when sending it or %NULL.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Synchronously sends @message to the peer represented by @connection
+ * and blocks the calling thread until a reply is received or the
+ * timeout is reached. See g_dbus_connection_send_message_with_reply()
+ * for the asynchronous version of this method.
+ *
+ * Unless @flags contain the
+ * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
+ * will be assigned by @connection and set on @message via
+ * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
+ * serial number used will be written to this location prior to
+ * submitting the message to the underlying transport.
+ *
+ * If @connection is closed then the operation will fail with
+ * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
+ * fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed,
+ * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
+ *
+ * Note that @error is only set if a local in-process error
+ * occurred. That is to say that the returned #GDBusMessage object may
+ * be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use
+ * g_dbus_message_to_gerror() to transcode this to a #GError.
+ *
+ * See <xref linkend="gdbus-server"/> and <xref
+ * linkend="gdbus-unix-fd-client"/> for an example of how to use this
+ * low-level API to send and receive UNIX file descriptors.
+ *
+ * Note that @message must be unlocked, unless @flags contain the
+ * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
+ *
+ * Returns: (transfer full): A locked #GDBusMessage that is the reply to @message or %NULL if @error is set.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_set_exit_on_close:
+ * @connection: A #GDBusConnection.
+ * @exit_on_close: Whether the process should be terminated when @connection is closed by the remote peer.
+ *
+ * Sets whether the process should be terminated when @connection is
+ * closed by the remote peer. See #GDBusConnection:exit-on-close for
+ * more details.
+ *
+ * Note that this function should be used with care. Most modern UNIX
+ * desktops tie the notion of a user session the session bus, and expect
+ * all of a users applications to quit when their bus connection goes away.
+ * If you are setting @exit_on_close to %FALSE for the shared session
+ * bus connection, you should make sure that your application exits
+ * when the user session ends.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_signal_subscribe:
+ * @connection: A #GDBusConnection.
+ * @sender: (allow-none): Sender name to match on (unique or well-known name) or %NULL to listen from all senders.
+ * @interface_name: (allow-none): D-Bus interface name to match on or %NULL to match on all interfaces.
+ * @member: (allow-none): D-Bus signal name to match on or %NULL to match on all signals.
+ * @object_path: (allow-none): Object path to match on or %NULL to match on all object paths.
+ * @arg0: (allow-none): Contents of first string argument to match on or %NULL to match on all kinds of arguments.
+ * @flags: Flags describing how to subscribe to the signal (currently unused).
+ * @callback: Callback to invoke when there is a signal matching the requested data.
+ * @user_data: User data to pass to @callback.
+ * @user_data_free_func: (allow-none): Function to free @user_data with when subscription is removed or %NULL.
+ *
+ * Subscribes to signals on @connection and invokes @callback with a
+ * whenever the signal is received. Note that @callback
+ * will be invoked in the <link
+ * linkend="g-main-context-push-thread-default">thread-default main
+ * loop</link> of the thread you are calling this method from.
+ *
+ * If @connection is not a message bus connection, @sender must be
+ * %NULL.
+ *
+ * If @sender is a well-known name note that @callback is invoked with
+ * the unique name for the owner of @sender, not the well-known name
+ * as one would expect. This is because the message bus rewrites the
+ * name. As such, to avoid certain race conditions, users should be
+ * tracking the name owner of the well-known name and use that when
+ * processing the received signal.
+ *
+ * Returns: A subscription identifier that can be used with g_dbus_connection_signal_unsubscribe().
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_signal_unsubscribe:
+ * @connection: A #GDBusConnection.
+ * @subscription_id: A subscription id obtained from g_dbus_connection_signal_subscribe().
+ *
+ * Unsubscribes from signals.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_start_message_processing:
+ * @connection: A #GDBusConnection.
+ *
+ * If @connection was created with
+ * %G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING, this method
+ * starts processing messages. Does nothing on if @connection wasn't
+ * created with this flag or if the method has already been called.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_unexport_action_group:
+ * @connection: a #GDBusConnection
+ * @export_id: the ID from g_dbus_connection_export_action_group()
+ *
+ * Reverses the effect of a previous call to
+ * g_dbus_connection_export_action_group().
+ *
+ * It is an error to call this function with an ID that wasn't returned
+ * from g_dbus_connection_export_action_group() or to call it with the
+ * same ID more than once.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_dbus_connection_unexport_menu_model:
+ * @connection: a #GDBusConnection
+ * @export_id: the ID from g_dbus_connection_export_menu_model()
+ *
+ * Reverses the effect of a previous call to
+ * g_dbus_connection_export_menu_model().
+ *
+ * It is an error to call this function with an ID that wasn't returned
+ * from g_dbus_connection_export_menu_model() or to call it with the
+ * same ID more than once.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_dbus_connection_unregister_object:
+ * @connection: A #GDBusConnection.
+ * @registration_id: A registration id obtained from g_dbus_connection_register_object().
+ *
+ * Unregisters an object.
+ *
+ * Returns: %TRUE if the object was unregistered, %FALSE otherwise.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_connection_unregister_subtree:
+ * @connection: A #GDBusConnection.
+ * @registration_id: A subtree registration id obtained from g_dbus_connection_register_subtree().
+ *
+ * Unregisters a subtree.
+ *
+ * Returns: %TRUE if the subtree was unregistered, %FALSE otherwise.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_error_encode_gerror:
+ * @error: A #GError.
+ *
+ * Creates a D-Bus error name to use for @error. If @error matches
+ * a registered error (cf. g_dbus_error_register_error()), the corresponding
+ * D-Bus error name will be returned.
+ *
+ * Otherwise the a name of the form
+ * <literal>org.gtk.GDBus.UnmappedGError.Quark._ESCAPED_QUARK_NAME.Code_ERROR_CODE</literal>
+ * will be used. This allows other GDBus applications to map the error
+ * on the wire back to a #GError using g_dbus_error_new_for_dbus_error().
+ *
+ * This function is typically only used in object mappings to put a
+ * #GError on the wire. Regular applications should not use it.
+ *
+ * Returns: A D-Bus error name (never %NULL). Free with g_free().
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_error_get_remote_error:
+ * @error: A #GError.
+ *
+ * Gets the D-Bus error name used for @error, if any.
+ *
+ * This function is guaranteed to return a D-Bus error name for all
+ * #GError<!-- -->s returned from functions handling remote method
+ * calls (e.g. g_dbus_connection_call_finish()) unless
+ * g_dbus_error_strip_remote_error() has been used on @error.
+ *
+ * Returns: An allocated string or %NULL if the D-Bus error name could not be found. Free with g_free().
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_error_is_remote_error:
+ * @error: A #GError.
+ *
+ * Checks if @error represents an error received via D-Bus from a remote peer. If so,
+ * use g_dbus_error_get_remote_error() to get the name of the error.
+ *
+ * %FALSE otherwise.
+ *
+ * Returns: %TRUE if @error represents an error from a remote peer,
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_error_new_for_dbus_error:
+ * @dbus_error_name: D-Bus error name.
+ * @dbus_error_message: D-Bus error message.
+ *
+ * Creates a #GError based on the contents of @dbus_error_name and
+ * @dbus_error_message.
+ *
+ * Errors registered with g_dbus_error_register_error() will be looked
+ * up using @dbus_error_name and if a match is found, the error domain
+ * and code is used. Applications can use g_dbus_error_get_remote_error()
+ * to recover @dbus_error_name.
+ *
+ * If a match against a registered error is not found and the D-Bus
+ * error name is in a form as returned by g_dbus_error_encode_gerror()
+ * the error domain and code encoded in the name is used to
+ * create the #GError. Also, @dbus_error_name is added to the error message
+ * such that it can be recovered with g_dbus_error_get_remote_error().
+ *
+ * Otherwise, a #GError with the error code %G_IO_ERROR_DBUS_ERROR
+ * in the #G_IO_ERROR error domain is returned. Also, @dbus_error_name is
+ * added to the error message such that it can be recovered with
+ * g_dbus_error_get_remote_error().
+ *
+ * In all three cases, @dbus_error_name can always be recovered from the
+ * returned #GError using the g_dbus_error_get_remote_error() function
+ * (unless g_dbus_error_strip_remote_error() hasn't been used on the returned error).
+ *
+ * This function is typically only used in object mappings to prepare
+ * #GError instances for applications. Regular applications should not use
+ * it.
+ *
+ * Returns: An allocated #GError. Free with g_error_free().
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_error_register_error:
+ * @error_domain: A #GQuark for a error domain.
+ * @error_code: An error code.
+ * @dbus_error_name: A D-Bus error name.
+ *
+ * Creates an association to map between @dbus_error_name and
+ * #GError<!-- -->s specified by @error_domain and @error_code.
+ *
+ * This is typically done in the routine that returns the #GQuark for
+ * an error domain.
+ *
+ * exists.
+ *
+ * Returns: %TRUE if the association was created, %FALSE if it already
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_error_register_error_domain:
+ * @error_domain_quark_name: The error domain name.
+ * @quark_volatile: A pointer where to store the #GQuark.
+ * @entries: A pointer to @num_entries #GDBusErrorEntry struct items.
+ * @num_entries: Number of items to register.
+ *
+ * Helper function for associating a #GError error domain with D-Bus error names.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_error_set_dbus_error:
+ * @error: A pointer to a #GError or %NULL.
+ * @dbus_error_name: D-Bus error name.
+ * @dbus_error_message: D-Bus error message.
+ * @format: (allow-none): printf()-style format to prepend to @dbus_error_message or %NULL.
+ * @...: Arguments for @format.
+ *
+ * Does nothing if @error is %NULL. Otherwise sets *@error to
+ * a new #GError created with g_dbus_error_new_for_dbus_error()
+ * with @dbus_error_message prepend with @format (unless %NULL).
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_error_set_dbus_error_valist:
+ * @error: A pointer to a #GError or %NULL.
+ * @dbus_error_name: D-Bus error name.
+ * @dbus_error_message: D-Bus error message.
+ * @format: (allow-none): printf()-style format to prepend to @dbus_error_message or %NULL.
+ * @var_args: Arguments for @format.
+ *
+ * Like g_dbus_error_set_dbus_error() but intended for language bindings.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_error_strip_remote_error:
+ * @error: A #GError.
+ *
+ * Looks for extra information in the error message used to recover
+ * the D-Bus error name and strips it if found. If stripped, the
+ * message field in @error will correspond exactly to what was
+ * received on the wire.
+ *
+ * This is typically used when presenting errors to the end user.
+ *
+ * Returns: %TRUE if information was stripped, %FALSE otherwise.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_error_unregister_error:
+ * @error_domain: A #GQuark for a error domain.
+ * @error_code: An error code.
+ * @dbus_error_name: A D-Bus error name.
+ *
+ * Destroys an association previously set up with g_dbus_error_register_error().
+ *
+ * Returns: %TRUE if the association was destroyed, %FALSE if it wasn't found.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_generate_guid:
+ *
+ * Generate a D-Bus GUID that can be used with
+ * e.g. g_dbus_connection_new().
+ *
+ * See the D-Bus specification regarding what strings are valid D-Bus
+ * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).
+ *
+ * Returns: A valid D-Bus GUID. Free with g_free().
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_gvalue_to_gvariant:
+ * @gvalue: A #GValue to convert to a #GVariant.
+ * @type: A #GVariantType.
+ *
+ * Converts a #GValue to a #GVariant of the type indicated by the @type parameter.
+ *
+ * The conversion is using the following rules:
+ * <table frame='all'>
+ * <title>#GValue / #GVariant conversion rules</title>
+ * <tgroup cols='2' align='left' colsep='1' rowsep='1'>
+ * <thead>
+ * <row>
+ * <entry>If the #GType for @gvalue is...</entry>
+ * <entry>... then @type must be</entry>
+ * </row>
+ * </thead>
+ * <tbody>
+ * <row>
+ * <entry>#G_TYPE_STRING</entry>
+ * <entry><link linkend="G-VARIANT-TYPE-STRING:CAPS">'s'</link>, <link linkend="G-VARIANT-TYPE-OBJECT-PATH:CAPS">'o'</link>, <link linkend="G-VARIANT-TYPE-SIGNATURE:CAPS">'g'</link> or <link linkend="G-VARIANT-TYPE-BYTESTRING:CAPS">'ay'</link></entry>
+ * </row>
+ * <row>
+ * <entry>#G_TYPE_STRV</entry>
+ * <entry><link linkend="G-VARIANT-TYPE-STRING-ARRAY:CAPS">'as'</link>, <link linkend="G-VARIANT-TYPE-OBJECT-PATH-ARRAY:CAPS">'ao'</link> or <link linkend="G-VARIANT-TYPE-BYTESTRING-ARRAY:CAPS">'aay'</link></entry>
+ * </row>
+ * <row>
+ * <entry>#G_TYPE_BOOLEAN</entry>
+ * <entry><link linkend="G-VARIANT-TYPE-BOOLEAN:CAPS">'b'</link></entry>
+ * </row>
+ * <row>
+ * <entry>#G_TYPE_UCHAR</entry>
+ * <entry><link linkend="G-VARIANT-TYPE-BYTE:CAPS">'y'</link></entry>
+ * </row>
+ * <row>
+ * <entry>#G_TYPE_INT</entry>
+ * <entry><link linkend="G-VARIANT-TYPE-INT32:CAPS">'i'</link> or <link linkend="G-VARIANT-TYPE-INT16:CAPS">'n'</link></entry>
+ * </row>
+ * <row>
+ * <entry>#G_TYPE_UINT</entry>
+ * <entry><link linkend="G-VARIANT-TYPE-UINT32:CAPS">'u'</link> or <link linkend="G-VARIANT-TYPE-UINT16:CAPS">'q'</link></entry>
+ * </row>
+ * <row>
+ * <entry>#G_TYPE_INT64</entry>
+ * <entry><link linkend="G-VARIANT-TYPE-INT64:CAPS">'x'</link></entry>
+ * </row>
+ * <row>
+ * <entry>#G_TYPE_UINT64</entry>
+ * <entry><link linkend="G-VARIANT-TYPE-UINT64:CAPS">'t'</link></entry>
+ * </row>
+ * <row>
+ * <entry>#G_TYPE_DOUBLE</entry>
+ * <entry><link linkend="G-VARIANT-TYPE-DOUBLE:CAPS">'d'</link></entry>
+ * </row>
+ * <row>
+ * <entry>#G_TYPE_VARIANT</entry>
+ * <entry>Any #GVariantType</entry>
+ * </row>
+ * </tbody>
+ * </tgroup>
+ * </table>
+ * This can fail if e.g. @gvalue is of type #G_TYPE_STRING and @type
+ * is <link linkend="G-VARIANT-TYPE-INT32:CAPS">'i'</link>. It will
+ * also fail for any #GType (including e.g. #G_TYPE_OBJECT and
+ * #G_TYPE_BOXED derived-types) not in the table above.
+ *
+ * Note that if @gvalue is of type #G_TYPE_VARIANT and its value is
+ * %NULL, the <emphasis>empty</emphasis> #GVariant instance (never
+ * %NULL) for @type is returned (e.g. 0 for scalar types, the empty
+ * string for string types, <literal>'/'</literal> for object path
+ * types, the empty array for any array type and so on).
+ *
+ * See the g_dbus_gvariant_to_gvalue() function for how to convert a
+ * #GVariant to a #GValue.
+ *
+ * @type holding the data from @gvalue or %NULL in case of
+ * failure. Free with g_variant_unref().
+ *
+ * Returns: A #GVariant (never floating) of #GVariantType
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_gvariant_to_gvalue:
+ * @value: A #GVariant.
+ * @out_gvalue: Return location pointing to a zero-filled (uninitialized) #GValue.
+ *
+ * Converts a #GVariant to a #GValue. If @value is floating, it is consumed.
+ *
+ * The rules specified in the g_dbus_gvalue_to_gvariant() function are
+ * used - this function is essentially its reverse form.
+ *
+ * The conversion never fails - a valid #GValue is always returned in
+ * @out_gvalue.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_interface_dup_object:
+ * @interface_: An exported D-Bus interface.
+ *
+ * Gets the #GDBusObject that @interface_ belongs to, if any.
+ *
+ * reference should be freed with g_object_unref().
+ *
+ * Returns: (transfer full): A #GDBusObject or %NULL. The returned
+ * Since: 2.32
+ * Rename to: g_dbus_interface_get_object
+ */
+
+
+/**
+ * g_dbus_interface_get_info:
+ * @interface_: An exported D-Bus interface.
+ *
+ * Gets D-Bus introspection information for the D-Bus interface
+ * implemented by @interface_.
+ *
+ * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_interface_get_object: (skip)
+ * @interface_: An exported D-Bus interface.
+ *
+ * Gets the #GDBusObject that @interface_ belongs to, if any.
+ *
+ * <warning>It is not safe to use the returned object if @interface_
+ * or the returned object is being used from other threads. See
+ * g_dbus_interface_dup_object() for a thread-safe
+ * alternative.</warning>
+ *
+ * reference belongs to @interface_ and should not be freed.
+ *
+ * Returns: (transfer none): A #GDBusObject or %NULL. The returned
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_interface_info_cache_build:
+ * @info: A #GDBusInterfaceInfo.
+ *
+ * Builds a lookup-cache to speed up
+ * g_dbus_interface_info_lookup_method(),
+ * g_dbus_interface_info_lookup_signal() and
+ * g_dbus_interface_info_lookup_property().
+ *
+ * If this has already been called with @info, the existing cache is
+ * used and its use count is increased.
+ *
+ * Note that @info cannot be modified until
+ * g_dbus_interface_info_cache_release() is called.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_interface_info_cache_release:
+ * @info: A GDBusInterfaceInfo
+ *
+ * Decrements the usage count for the cache for @info built by
+ * g_dbus_interface_info_cache_build() (if any) and frees the
+ * resources used by the cache if the usage count drops to zero.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_interface_info_generate_xml:
+ * @info: A #GDBusNodeInfo
+ * @indent: Indentation level.
+ * @string_builder: (out): A #GString to to append XML data to.
+ *
+ * Appends an XML representation of @info (and its children) to @string_builder.
+ *
+ * This function is typically used for generating introspection XML
+ * documents at run-time for handling the
+ * <literal>org.freedesktop.DBus.Introspectable.Introspect</literal>
+ * method.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_interface_info_lookup_method:
+ * @info: A #GDBusInterfaceInfo.
+ * @name: A D-Bus method name (typically in CamelCase)
+ *
+ * Looks up information about a method.
+ *
+ * This cost of this function is O(n) in number of methods unless
+ * g_dbus_interface_info_cache_build() has been used on @info.
+ *
+ * Returns: (transfer none): A #GDBusMethodInfo or %NULL if not found. Do not free, it is owned by @info.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_interface_info_lookup_property:
+ * @info: A #GDBusInterfaceInfo.
+ * @name: A D-Bus property name (typically in CamelCase).
+ *
+ * Looks up information about a property.
+ *
+ * This cost of this function is O(n) in number of properties unless
+ * g_dbus_interface_info_cache_build() has been used on @info.
+ *
+ * Returns: (transfer none): A #GDBusPropertyInfo or %NULL if not found. Do not free, it is owned by @info.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_interface_info_lookup_signal:
+ * @info: A #GDBusInterfaceInfo.
+ * @name: A D-Bus signal name (typically in CamelCase)
+ *
+ * Looks up information about a signal.
+ *
+ * This cost of this function is O(n) in number of signals unless
+ * g_dbus_interface_info_cache_build() has been used on @info.
+ *
+ * Returns: (transfer none): A #GDBusSignalInfo or %NULL if not found. Do not free, it is owned by @info.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_interface_info_ref:
+ * @info: A #GDBusInterfaceInfo
+ *
+ * If @info is statically allocated does nothing. Otherwise increases
+ * the reference count.
+ *
+ * Returns: The same @info.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_interface_info_unref:
+ * @info: A #GDBusInterfaceInfo.
+ *
+ * If @info is statically allocated, does nothing. Otherwise decreases
+ * the reference count of @info. When its reference count drops to 0,
+ * the memory used is freed.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_interface_set_object:
+ * @interface_: An exported D-Bus interface.
+ * @object: (allow-none): A #GDBusObject or %NULL.
+ *
+ * Sets the #GDBusObject for @interface_ to @object.
+ *
+ * Note that @interface_ will hold a weak reference to @object.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_interface_skeleton_export:
+ * @interface_: The D-Bus interface to export.
+ * @connection: A #GDBusConnection to export @interface_ on.
+ * @object_path: The path to export the interface at.
+ * @error: Return location for error or %NULL.
+ *
+ * Exports @interface_ at @object_path on @connection.
+ *
+ * This can be called multiple times to export the same @interface_
+ * onto multiple connections however the @object_path provided must be
+ * the same for all connections.
+ *
+ * Use g_dbus_interface_skeleton_unexport() to unexport the object.
+ *
+ * @error set.
+ *
+ * Returns: %TRUE if the interface was exported on @connection, otherwise %FALSE with
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_interface_skeleton_flush:
+ * @interface_: A #GDBusInterfaceSkeleton.
+ *
+ * If @interface_ has outstanding changes, request for these changes to be
+ * emitted immediately.
+ *
+ * For example, an exported D-Bus interface may queue up property
+ * changes and emit the
+ * <literal>org.freedesktop.DBus.Properties::PropertiesChanged</literal>
+ * signal later (e.g. in an idle handler). This technique is useful
+ * for collapsing multiple property changes into one.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_interface_skeleton_get_connection:
+ * @interface_: A #GDBusInterfaceSkeleton.
+ *
+ * Gets the first connection that @interface_ is exported on, if any.
+ *
+ * not exported anywhere. Do not free, the object belongs to @interface_.
+ *
+ * Returns: (transfer none): A #GDBusConnection or %NULL if @interface_ is
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_interface_skeleton_get_connections:
+ * @interface_: A #GDBusInterfaceSkeleton.
+ *
+ * Gets a list of the connections that @interface_ is exported on.
+ *
+ * all the connections that @interface_ is exported on. The returned
+ * list should be freed with g_list_free() after each element has
+ * been freed with g_object_unref().
+ *
+ * Returns: (element-type GDBusConnection) (transfer full): A list of
+ * Since: 2.32
+ */
+
+
+/**
+ * g_dbus_interface_skeleton_get_flags:
+ * @interface_: A #GDBusInterfaceSkeleton.
+ *
+ * Gets the #GDBusInterfaceSkeletonFlags that describes what the behavior
+ * of @interface_
+ *
+ * Returns: One or more flags from the #GDBusInterfaceSkeletonFlags enumeration.
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_interface_skeleton_get_info:
+ * @interface_: A #GDBusInterfaceSkeleton.
+ *
+ * Gets D-Bus introspection information for the D-Bus interface
+ * implemented by @interface_.
+ *
+ * Returns: (transfer none): A #GDBusInterfaceInfo (never %NULL). Do not free.
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_interface_skeleton_get_object_path:
+ * @interface_: A #GDBusInterfaceSkeleton.
+ *
+ * Gets the object path that @interface_ is exported on, if any.
+ *
+ * anywhere. Do not free, the string belongs to @interface_.
+ *
+ * Returns: A string owned by @interface_ or %NULL if @interface_ is not exported
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_interface_skeleton_get_properties:
+ * @interface_: A #GDBusInterfaceSkeleton.
+ *
+ * Gets all D-Bus properties for @interface_.
+ *
+ * Returns: (transfer full): A #GVariant of type <link linkend="G-VARIANT-TYPE-VARDICT:CAPS">'a{sv}'</link>. Free with g_variant_unref().
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_interface_skeleton_get_vtable: (skip)
+ * @interface_: A #GDBusInterfaceSkeleton.
+ *
+ * Gets the interface vtable for the D-Bus interface implemented by
+ * @interface_. The returned function pointers should expect @interface_
+ * itself to be passed as @user_data.
+ *
+ * Returns: A #GDBusInterfaceVTable (never %NULL).
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_interface_skeleton_has_connection:
+ * @interface_: A #GDBusInterfaceSkeleton.
+ * @connection: A #GDBusConnection.
+ *
+ * Checks if @interface_ is export on @connection.
+ *
+ * Returns: %TRUE if @interface_ is exported on @connection, %FALSE otherwise.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_dbus_interface_skeleton_set_flags:
+ * @interface_: A #GDBusInterfaceSkeleton.
+ * @flags: Flags from the #GDBusInterfaceSkeletonFlags enumeration.
+ *
+ * Sets flags describing what the behavior of @skeleton should be.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_interface_skeleton_unexport:
+ * @interface_: A #GDBusInterfaceSkeleton.
+ *
+ * Stops exporting @interface_ on all connections it is exported on.
+ *
+ * To unexport @interface_ from only a single connection, use
+ * g_dbus_interface_skeleton_unexport_from_connection()
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_interface_skeleton_unexport_from_connection:
+ * @interface_: A #GDBusInterfaceSkeleton.
+ * @connection: A #GDBusConnection.
+ *
+ * Stops exporting @interface_ on @connection.
+ *
+ * To stop exporting on all connections the interface is exported on,
+ * use g_dbus_interface_skeleton_unexport().
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_dbus_is_address:
+ * @string: A string.
+ *
+ * Checks if @string is a D-Bus address.
+ *
+ * This doesn't check if @string is actually supported by #GDBusServer
+ * or #GDBusConnection - use g_dbus_is_supported_address() to do more
+ * checks.
+ *
+ * Returns: %TRUE if @string is a valid D-Bus address, %FALSE otherwise.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_is_guid:
+ * @string: The string to check.
+ *
+ * Checks if @string is a D-Bus GUID.
+ *
+ * See the D-Bus specification regarding what strings are valid D-Bus
+ * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).
+ *
+ * Returns: %TRUE if @string is a guid, %FALSE otherwise.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_is_interface_name:
+ * @string: The string to check.
+ *
+ * Checks if @string is a valid D-Bus interface name.
+ *
+ * Returns: %TRUE if valid, %FALSE otherwise.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_is_member_name:
+ * @string: The string to check.
+ *
+ * Checks if @string is a valid D-Bus member (e.g. signal or method) name.
+ *
+ * Returns: %TRUE if valid, %FALSE otherwise.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_is_name:
+ * @string: The string to check.
+ *
+ * Checks if @string is a valid D-Bus bus name (either unique or well-known).
+ *
+ * Returns: %TRUE if valid, %FALSE otherwise.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_is_supported_address:
+ * @string: A string.
+ * @error: Return location for error or %NULL.
+ *
+ * Like g_dbus_is_address() but also checks if the library suppors the
+ * transports in @string and that key/value pairs for each transport
+ * are valid.
+ *
+ * supported by this library, %FALSE if @error is set.
+ *
+ * Returns: %TRUE if @string is a valid D-Bus address that is
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_is_unique_name:
+ * @string: The string to check.
+ *
+ * Checks if @string is a valid D-Bus unique bus name.
+ *
+ * Returns: %TRUE if valid, %FALSE otherwise.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_menu_model_get:
+ * @connection: a #GDBusConnection
+ * @bus_name: the bus name which exports the menu model
+ * @object_path: the object path at which the menu model is exported
+ *
+ * Obtains a #GDBusMenuModel for the menu model which is exported
+ * at the given @bus_name and @object_path.
+ *
+ * The thread default main context is taken at the time of this call.
+ * All signals on the menu model (and any linked models) are reported
+ * with respect to this context.  All calls on the returned menu model
+ * (and linked models) must also originate from this same context, with
+ * the thread default main context unchanged.
+ *
+ * g_object_unref().
+ *
+ * Returns: (transfer full): a #GDBusMenuModel object. Free with
+ * Since: 2.32
+ */
+
+
+/**
+ * g_dbus_message_bytes_needed:
+ * @blob: (array length=blob_len) (element-type guint8): A blob represent a binary D-Bus message.
+ * @blob_len: The length of @blob (must be at least 16).
+ * @error: Return location for error or %NULL.
+ *
+ * Utility function to calculate how many bytes are needed to
+ * completely deserialize the D-Bus message stored at @blob.
+ *
+ * @blob contains invalid data or not enough data is available to
+ * determine the size).
+ *
+ * Returns: Number of bytes needed or -1 if @error is set (e.g. if
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_copy:
+ * @message: A #GDBusMessage.
+ * @error: Return location for error or %NULL.
+ *
+ * Copies @message. The copy is a deep copy and the returned
+ * #GDBusMessage is completely identical except that it is guaranteed
+ * to not be locked.
+ *
+ * This operation can fail if e.g. @message contains file descriptors
+ * and the per-process or system-wide open files limit is reached.
+ *
+ * Free with g_object_unref().
+ *
+ * Returns: (transfer full): A new #GDBusMessage or %NULL if @error is set.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_get_arg0:
+ * @message: A #GDBusMessage.
+ *
+ * Convenience to get the first item in the body of @message.
+ *
+ * @message is not a string.
+ *
+ * Returns: The string item or %NULL if the first item in the body of
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_get_body:
+ * @message: A #GDBusMessage.
+ *
+ * Gets the body of a message.
+ *
+ * Returns: A #GVariant or %NULL if the body is empty. Do not free, it is owned by @message.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_get_byte_order:
+ * @message: A #GDBusMessage.
+ *
+ * Gets the byte order of @message.
+ *
+ * Returns: The byte order.
+ */
+
+
+/**
+ * g_dbus_message_get_destination:
+ * @message: A #GDBusMessage.
+ *
+ * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.
+ *
+ * Returns: The value.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_get_error_name:
+ * @message: A #GDBusMessage.
+ *
+ * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.
+ *
+ * Returns: The value.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_get_flags:
+ * @message: A #GDBusMessage.
+ *
+ * Gets the flags for @message.
+ *
+ * Returns: Flags that are set (typically values from the #GDBusMessageFlags enumeration bitwise ORed together).
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_get_header:
+ * @message: A #GDBusMessage.
+ * @header_field: A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration)
+ *
+ * Gets a header field on @message.
+ *
+ * otherwise. Do not free, it is owned by @message.
+ *
+ * Returns: A #GVariant with the value if the header was found, %NULL
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_get_header_fields:
+ * @message: A #GDBusMessage.
+ *
+ * Gets an array of all header fields on @message that are set.
+ *
+ * terminated by %G_DBUS_MESSAGE_HEADER_FIELD_INVALID.  Each element
+ * is a #guchar. Free with g_free().
+ *
+ * Returns: (array zero-terminated=1): An array of header fields
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_get_interface:
+ * @message: A #GDBusMessage.
+ *
+ * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.
+ *
+ * Returns: The value.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_get_locked:
+ * @message: A #GDBusMessage.
+ *
+ * Checks whether @message is locked. To monitor changes to this
+ * value, conncet to the #GObject::notify signal to listen for changes
+ * on the #GDBusMessage:locked property.
+ *
+ * Returns: %TRUE if @message is locked, %FALSE otherwise.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_get_member:
+ * @message: A #GDBusMessage.
+ *
+ * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.
+ *
+ * Returns: The value.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_get_message_type:
+ * @message: A #GDBusMessage.
+ *
+ * Gets the type of @message.
+ *
+ * Returns: A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration).
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_get_num_unix_fds:
+ * @message: A #GDBusMessage.
+ *
+ * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.
+ *
+ * Returns: The value.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_get_path:
+ * @message: A #GDBusMessage.
+ *
+ * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.
+ *
+ * Returns: The value.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_get_reply_serial:
+ * @message: A #GDBusMessage.
+ *
+ * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.
+ *
+ * Returns: The value.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_get_sender:
+ * @message: A #GDBusMessage.
+ *
+ * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.
+ *
+ * Returns: The value.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_get_serial:
+ * @message: A #GDBusMessage.
+ *
+ * Gets the serial for @message.
+ *
+ * Returns: A #guint32.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_get_signature:
+ * @message: A #GDBusMessage.
+ *
+ * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.
+ *
+ * Returns: The value.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_get_unix_fd_list:
+ * @message: A #GDBusMessage.
+ *
+ * Gets the UNIX file descriptors associated with @message, if any.
+ *
+ * This method is only available on UNIX.
+ *
+ * associated. Do not free, this object is owned by @message.
+ *
+ * Returns: (transfer none): A #GUnixFDList or %NULL if no file descriptors are
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_lock:
+ * @message: A #GDBusMessage.
+ *
+ * If @message is locked, does nothing. Otherwise locks the message.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_new:
+ *
+ * Creates a new empty #GDBusMessage.
+ *
+ * Returns: A #GDBusMessage. Free with g_object_unref().
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_new_from_blob:
+ * @blob: (array length=blob_len) (element-type guint8): A blob represent a binary D-Bus message.
+ * @blob_len: The length of @blob.
+ * @capabilities: A #GDBusCapabilityFlags describing what protocol features are supported.
+ * @error: Return location for error or %NULL.
+ *
+ * Creates a new #GDBusMessage from the data stored at @blob. The byte
+ * order that the message was in can be retrieved using
+ * g_dbus_message_get_byte_order().
+ *
+ * g_object_unref().
+ *
+ * Returns: A new #GDBusMessage or %NULL if @error is set. Free with
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_new_method_call:
+ * @name: (allow-none): A valid D-Bus name or %NULL.
+ * @path: A valid object path.
+ * @interface_: (allow-none): A valid D-Bus interface name or %NULL.
+ * @method: A valid method name.
+ *
+ * Creates a new #GDBusMessage for a method call.
+ *
+ * Returns: A #GDBusMessage. Free with g_object_unref().
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_new_method_error:
+ * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
+ * @error_name: A valid D-Bus error name.
+ * @error_message_format: The D-Bus error message in a printf() format.
+ * @...: Arguments for @error_message_format.
+ *
+ * Creates a new #GDBusMessage that is an error reply to @method_call_message.
+ *
+ * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_new_method_error_literal:
+ * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
+ * @error_name: A valid D-Bus error name.
+ * @error_message: The D-Bus error message.
+ *
+ * Creates a new #GDBusMessage that is an error reply to @method_call_message.
+ *
+ * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_new_method_error_valist:
+ * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
+ * @error_name: A valid D-Bus error name.
+ * @error_message_format: The D-Bus error message in a printf() format.
+ * @var_args: Arguments for @error_message_format.
+ *
+ * Like g_dbus_message_new_method_error() but intended for language bindings.
+ *
+ * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_new_method_reply:
+ * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
+ *
+ * Creates a new #GDBusMessage that is a reply to @method_call_message.
+ *
+ * Returns: (transfer full): #GDBusMessage. Free with g_object_unref().
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_new_signal:
+ * @path: A valid object path.
+ * @interface_: A valid D-Bus interface name.
+ * @signal: A valid signal name.
+ *
+ * Creates a new #GDBusMessage for a signal emission.
+ *
+ * Returns: A #GDBusMessage. Free with g_object_unref().
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_print:
+ * @message: A #GDBusMessage.
+ * @indent: Indentation level.
+ *
+ * Produces a human-readable multi-line description of @message.
+ *
+ * The contents of the description has no ABI guarantees, the contents
+ * and formatting is subject to change at any time. Typical output
+ * looks something like this:
+ * <programlisting>
+ * Flags:   none
+ * Version: 0
+ * Serial:  4
+ * Headers:
+ * path -> objectpath '/org/gtk/GDBus/TestObject'
+ * interface -> 'org.gtk.GDBus.TestInterface'
+ * member -> 'GimmeStdout'
+ * destination -> ':1.146'
+ * Body: ()
+ * UNIX File Descriptors:
+ * (none)
+ * </programlisting>
+ * or
+ * <programlisting>
+ * Flags:   no-reply-expected
+ * Version: 0
+ * Serial:  477
+ * Headers:
+ * reply-serial -> uint32 4
+ * destination -> ':1.159'
+ * sender -> ':1.146'
+ * num-unix-fds -> uint32 1
+ * Body: ()
+ * UNIX File Descriptors:
+ * fd 12: dev=0:10,mode=020620,ino=5,uid=500,gid=5,rdev=136:2,size=0,atime=1273085037,mtime=1273085851,ctime=1272982635
+ * </programlisting>
+ *
+ * Type:    method-return
+ * Returns: A string that should be freed with g_free().
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_set_body:
+ * @message: A #GDBusMessage.
+ * @body: Either %NULL or a #GVariant that is a tuple.
+ *
+ * Sets the body @message. As a side-effect the
+ * %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field is set to the
+ * type string of @body (or cleared if @body is %NULL).
+ *
+ * If @body is floating, @message assumes ownership of @body.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_set_byte_order:
+ * @message: A #GDBusMessage.
+ * @byte_order: The byte order.
+ *
+ * Sets the byte order of @message.
+ */
+
+
+/**
+ * g_dbus_message_set_destination:
+ * @message: A #GDBusMessage.
+ * @value: The value to set.
+ *
+ * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_set_error_name:
+ * @message: A #GDBusMessage.
+ * @value: The value to set.
+ *
+ * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_set_flags:
+ * @message: A #GDBusMessage.
+ * @flags: Flags for @message that are set (typically values from the #GDBusMessageFlags enumeration bitwise ORed together).
+ *
+ * Sets the flags to set on @message.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_set_header:
+ * @message: A #GDBusMessage.
+ * @header_field: A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration)
+ * @value: (allow-none): A #GVariant to set the header field or %NULL to clear the header field.
+ *
+ * Sets a header field on @message.
+ *
+ * If @value is floating, @message assumes ownership of @value.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_set_interface:
+ * @message: A #GDBusMessage.
+ * @value: The value to set.
+ *
+ * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_set_member:
+ * @message: A #GDBusMessage.
+ * @value: The value to set.
+ *
+ * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_set_message_type:
+ * @message: A #GDBusMessage.
+ * @type: A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration).
+ *
+ * Sets @message to be of @type.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_set_num_unix_fds:
+ * @message: A #GDBusMessage.
+ * @value: The value to set.
+ *
+ * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_set_path:
+ * @message: A #GDBusMessage.
+ * @value: The value to set.
+ *
+ * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_set_reply_serial:
+ * @message: A #GDBusMessage.
+ * @value: The value to set.
+ *
+ * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_set_sender:
+ * @message: A #GDBusMessage.
+ * @value: The value to set.
+ *
+ * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_set_serial:
+ * @message: A #GDBusMessage.
+ * @serial: A #guint32.
+ *
+ * Sets the serial for @message.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_set_signature:
+ * @message: A #GDBusMessage.
+ * @value: The value to set.
+ *
+ * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_set_unix_fd_list:
+ * @message: A #GDBusMessage.
+ * @fd_list: (allow-none): A #GUnixFDList or %NULL.
+ *
+ * Sets the UNIX file descriptors associated with @message. As a
+ * side-effect the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header
+ * field is set to the number of fds in @fd_list (or cleared if
+ * @fd_list is %NULL).
+ *
+ * This method is only available on UNIX.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_to_blob:
+ * @message: A #GDBusMessage.
+ * @out_size: Return location for size of generated blob.
+ * @capabilities: A #GDBusCapabilityFlags describing what protocol features are supported.
+ * @error: Return location for error.
+ *
+ * Serializes @message to a blob. The byte order returned by
+ * g_dbus_message_get_byte_order() will be used.
+ *
+ * valid binary D-Bus message of @out_size bytes generated by @message
+ * or %NULL if @error is set. Free with g_free().
+ *
+ * Returns: (array length=out_size) (transfer full): A pointer to a
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_message_to_gerror:
+ * @message: A #GDBusMessage.
+ * @error: The #GError to set.
+ *
+ * If @message is not of type %G_DBUS_MESSAGE_TYPE_ERROR does
+ * nothing and returns %FALSE.
+ *
+ * Otherwise this method encodes the error in @message as a #GError
+ * using g_dbus_error_set_dbus_error() using the information in the
+ * %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field of @message as
+ * well as the first string item in @message's body.
+ *
+ * Returns: %TRUE if @error was set, %FALSE otherwise.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_method_info_ref:
+ * @info: A #GDBusMethodInfo
+ *
+ * If @info is statically allocated does nothing. Otherwise increases
+ * the reference count.
+ *
+ * Returns: The same @info.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_method_info_unref:
+ * @info: A #GDBusMethodInfo.
+ *
+ * If @info is statically allocated, does nothing. Otherwise decreases
+ * the reference count of @info. When its reference count drops to 0,
+ * the memory used is freed.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_method_invocation_get_connection:
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Gets the #GDBusConnection the method was invoked on.
+ *
+ * Returns: (transfer none): A #GDBusConnection. Do not free, it is owned by @invocation.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_method_invocation_get_interface_name:
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Gets the name of the D-Bus interface the method was invoked on.
+ *
+ * Returns: A string. Do not free, it is owned by @invocation.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_method_invocation_get_message:
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Gets the #GDBusMessage for the method invocation. This is useful if
+ * you need to use low-level protocol features, such as UNIX file
+ * descriptor passing, that cannot be properly expressed in the
+ * #GVariant API.
+ *
+ * See <xref linkend="gdbus-server"/> and <xref
+ * linkend="gdbus-unix-fd-client"/> for an example of how to use this
+ * low-level API to send and receive UNIX file descriptors.
+ *
+ * Returns: (transfer none): #GDBusMessage. Do not free, it is owned by @invocation.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_method_invocation_get_method_info:
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Gets information about the method call, if any.
+ *
+ * Returns: A #GDBusMethodInfo or %NULL. Do not free, it is owned by @invocation.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_method_invocation_get_method_name:
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Gets the name of the method that was invoked.
+ *
+ * Returns: A string. Do not free, it is owned by @invocation.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_method_invocation_get_object_path:
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Gets the object path the method was invoked on.
+ *
+ * Returns: A string. Do not free, it is owned by @invocation.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_method_invocation_get_parameters:
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Gets the parameters of the method invocation. If there are no input
+ * parameters then this will return a GVariant with 0 children rather than NULL.
+ *
+ * Returns: (transfer none): A #GVariant tuple. Do not unref this because it is owned by @invocation.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_method_invocation_get_sender:
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Gets the bus name that invoked the method.
+ *
+ * Returns: A string. Do not free, it is owned by @invocation.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_method_invocation_get_user_data: (skip)
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Gets the @user_data #gpointer passed to g_dbus_connection_register_object().
+ *
+ * Returns: A #gpointer.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_method_invocation_return_dbus_error:
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ * @error_name: A valid D-Bus error name.
+ * @error_message: A valid D-Bus error message.
+ *
+ * Finishes handling a D-Bus method call by returning an error.
+ *
+ * This method will free @invocation, you cannot use it afterwards.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_method_invocation_return_error:
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ * @domain: A #GQuark for the #GError error domain.
+ * @code: The error code.
+ * @format: printf()-style format.
+ * @...: Parameters for @format.
+ *
+ * Finishes handling a D-Bus method call by returning an error.
+ *
+ * See g_dbus_error_encode_gerror() for details about what error name
+ * will be returned on the wire. In a nutshell, if the given error is
+ * registered using g_dbus_error_register_error() the name given
+ * during registration is used. Otherwise, a name of the form
+ * <literal>org.gtk.GDBus.UnmappedGError.Quark...</literal> is
+ * used. This provides transparent mapping of #GError between
+ * applications using GDBus.
+ *
+ * If you are writing an application intended to be portable,
+ * <emphasis>always</emphasis> register errors with g_dbus_error_register_error()
+ * or use g_dbus_method_invocation_return_dbus_error().
+ *
+ * This method will free @invocation, you cannot use it afterwards.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_method_invocation_return_error_literal:
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ * @domain: A #GQuark for the #GError error domain.
+ * @code: The error code.
+ * @message: The error message.
+ *
+ * Like g_dbus_method_invocation_return_error() but without printf()-style formatting.
+ *
+ * This method will free @invocation, you cannot use it afterwards.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_method_invocation_return_error_valist:
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ * @domain: A #GQuark for the #GError error domain.
+ * @code: The error code.
+ * @format: printf()-style format.
+ * @var_args: #va_list of parameters for @format.
+ *
+ * Like g_dbus_method_invocation_return_error() but intended for
+ * language bindings.
+ *
+ * This method will free @invocation, you cannot use it afterwards.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_method_invocation_return_gerror:
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ * @error: A #GError.
+ *
+ * Like g_dbus_method_invocation_return_error() but takes a #GError
+ * instead of the error domain, error code and message.
+ *
+ * This method will free @invocation, you cannot use it afterwards.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_method_invocation_return_value:
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ * @parameters: (allow-none): A #GVariant tuple with out parameters for the method or %NULL if not passing any parameters.
+ *
+ * Finishes handling a D-Bus method call by returning @parameters.
+ * If the @parameters GVariant is floating, it is consumed.
+ *
+ * It is an error if @parameters is not of the right format.
+ *
+ * This method will free @invocation, you cannot use it afterwards.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_method_invocation_return_value_with_unix_fd_list:
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ * @parameters: (allow-none): A #GVariant tuple with out parameters for the method or %NULL if not passing any parameters.
+ * @fd_list: (allow-none): A #GUnixFDList or %NULL.
+ *
+ * Like g_dbus_method_invocation_return_value() but also takes a #GUnixFDList.
+ *
+ * This method is only available on UNIX.
+ *
+ * This method will free @invocation, you cannot use it afterwards.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_method_invocation_take_error: (skip)
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ * @error: (transfer full): A #GError.
+ *
+ * Like g_dbus_method_invocation_return_gerror() but takes ownership
+ * of @error so the caller does not need to free it.
+ *
+ * This method will free @invocation, you cannot use it afterwards.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_node_info_generate_xml:
+ * @info: A #GDBusNodeInfo.
+ * @indent: Indentation level.
+ * @string_builder: (out): A #GString to to append XML data to.
+ *
+ * Appends an XML representation of @info (and its children) to @string_builder.
+ *
+ * This function is typically used for generating introspection XML documents at run-time for
+ * handling the <literal>org.freedesktop.DBus.Introspectable.Introspect</literal> method.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_node_info_lookup_interface:
+ * @info: A #GDBusNodeInfo.
+ * @name: A D-Bus interface name.
+ *
+ * Looks up information about an interface.
+ *
+ * This cost of this function is O(n) in number of interfaces.
+ *
+ * Returns: (transfer none): A #GDBusInterfaceInfo or %NULL if not found. Do not free, it is owned by @info.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_node_info_new_for_xml:
+ * @xml_data: Valid D-Bus introspection XML.
+ * @error: Return location for error.
+ *
+ * Parses @xml_data and returns a #GDBusNodeInfo representing the data.
+ *
+ * Note that this routine is using a
+ * <link linkend="glib-Simple-XML-Subset-Parser.description">GMarkup</link>-based
+ * parser that only accepts a subset of valid XML documents.
+ *
+ * with g_dbus_node_info_unref().
+ *
+ * Returns: A #GDBusNodeInfo structure or %NULL if @error is set. Free
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_node_info_ref:
+ * @info: A #GDBusNodeInfo
+ *
+ * If @info is statically allocated does nothing. Otherwise increases
+ * the reference count.
+ *
+ * Returns: The same @info.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_node_info_unref:
+ * @info: A #GDBusNodeInfo.
+ *
+ * If @info is statically allocated, does nothing. Otherwise decreases
+ * the reference count of @info. When its reference count drops to 0,
+ * the memory used is freed.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_object_get_interface:
+ * @object: A #GDBusObject.
+ * @interface_name: A D-Bus interface name.
+ *
+ * Gets the D-Bus interface with name @interface_name associated with
+ * @object, if any.
+ *
+ * #GDBusInterface that must be freed with g_object_unref().
+ *
+ * Returns: (transfer full): %NULL if not found, otherwise a
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_get_interfaces:
+ * @object: A #GDBusObject.
+ *
+ * Gets the D-Bus interfaces associated with @object.
+ *
+ * The returned list must be freed by g_list_free() after each element has been freed
+ * with g_object_unref().
+ *
+ * Returns: (element-type GDBusInterface) (transfer full): A list of #GDBusInterface instances.
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_get_object_path:
+ * @object: A #GDBusObject.
+ *
+ * Gets the object path for @object.
+ *
+ * Returns: A string owned by @object. Do not free.
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_manager_client_get_connection:
+ * @manager: A #GDBusObjectManagerClient
+ *
+ * Gets the #GDBusConnection used by @manager.
+ *
+ * the object belongs to @manager.
+ *
+ * Returns: (transfer none): A #GDBusConnection object. Do not free,
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_manager_client_get_flags:
+ * @manager: A #GDBusObjectManagerClient
+ *
+ * Gets the flags that @manager was constructed with.
+ *
+ * enumeration.
+ *
+ * Returns: Zero of more flags from the #GDBusObjectManagerClientFlags
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_manager_client_get_name:
+ * @manager: A #GDBusObjectManagerClient
+ *
+ * Gets the name that @manager is for.
+ *
+ * belongs to @manager.
+ *
+ * Returns: A unique or well-known name. Do not free, the string
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_manager_client_get_name_owner:
+ * @manager: A #GDBusObjectManagerClient.
+ *
+ * The unique name that owns the name that @manager is for or %NULL if
+ * no-one currently owns that name. You can connect to the
+ * #GObject::notify signal to track changes to the
+ * #GDBusObjectManagerClient:name-owner property.
+ *
+ * g_free().
+ *
+ * Returns: The name owner or %NULL if no name owner exists. Free with
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_manager_client_new:
+ * @connection: A #GDBusConnection.
+ * @flags: Zero or more flags from the #GDBusObjectManagerClientFlags enumeration.
+ * @name: The owner of the control object (unique or well-known name).
+ * @object_path: The object path of the control object.
+ * @get_proxy_type_func: (allow-none): A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies.
+ * @get_proxy_type_user_data: User data to pass to @get_proxy_type_func.
+ * @get_proxy_type_destroy_notify: (allow-none): Free function for @get_proxy_type_user_data or %NULL.
+ * @cancellable: (allow-none): A #GCancellable or %NULL
+ * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
+ * @user_data: The data to pass to @callback.
+ *
+ * Asynchronously creates a new #GDBusObjectManagerClient object.
+ *
+ * This is an asynchronous failable constructor. When the result is
+ * ready, @callback will be invoked in the
+ * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
+ * of the thread you are calling this method from. You can
+ * then call g_dbus_object_manager_client_new_finish() to get the result. See
+ * g_dbus_object_manager_client_new_sync() for the synchronous version.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_manager_client_new_finish:
+ * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_object_manager_client_new().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with g_dbus_object_manager_client_new().
+ *
+ * #GDBusObjectManagerClient object or %NULL if @error is set. Free
+ * with g_object_unref().
+ *
+ * Returns: (transfer full) (type GDBusObjectManagerClient): A
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_manager_client_new_for_bus:
+ * @bus_type: A #GBusType.
+ * @flags: Zero or more flags from the #GDBusObjectManagerClientFlags enumeration.
+ * @name: The owner of the control object (unique or well-known name).
+ * @object_path: The object path of the control object.
+ * @get_proxy_type_func: (allow-none): A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies.
+ * @get_proxy_type_user_data: User data to pass to @get_proxy_type_func.
+ * @get_proxy_type_destroy_notify: (allow-none): Free function for @get_proxy_type_user_data or %NULL.
+ * @cancellable: (allow-none): A #GCancellable or %NULL
+ * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
+ * @user_data: The data to pass to @callback.
+ *
+ * Like g_dbus_object_manager_client_new() but takes a #GBusType instead of a
+ * #GDBusConnection.
+ *
+ * This is an asynchronous failable constructor. When the result is
+ * ready, @callback will be invoked in the
+ * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
+ * of the thread you are calling this method from. You can
+ * then call g_dbus_object_manager_client_new_for_bus_finish() to get the result. See
+ * g_dbus_object_manager_client_new_for_bus_sync() for the synchronous version.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_manager_client_new_for_bus_finish:
+ * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_object_manager_client_new_for_bus().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with g_dbus_object_manager_client_new_for_bus().
+ *
+ * #GDBusObjectManagerClient object or %NULL if @error is set. Free
+ * with g_object_unref().
+ *
+ * Returns: (transfer full) (type GDBusObjectManagerClient): A
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_manager_client_new_for_bus_sync:
+ * @bus_type: A #GBusType.
+ * @flags: Zero or more flags from the #GDBusObjectManagerClientFlags enumeration.
+ * @name: The owner of the control object (unique or well-known name).
+ * @object_path: The object path of the control object.
+ * @get_proxy_type_func: (allow-none): A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies.
+ * @get_proxy_type_user_data: User data to pass to @get_proxy_type_func.
+ * @get_proxy_type_destroy_notify: (allow-none): Free function for @get_proxy_type_user_data or %NULL.
+ * @cancellable: (allow-none): A #GCancellable or %NULL
+ * @error: Return location for error or %NULL.
+ *
+ * Like g_dbus_object_manager_client_new_sync() but takes a #GBusType instead
+ * of a #GDBusConnection.
+ *
+ * This is a synchronous failable constructor - the calling thread is
+ * blocked until a reply is received. See g_dbus_object_manager_client_new_for_bus()
+ * for the asynchronous version.
+ *
+ * #GDBusObjectManagerClient object or %NULL if @error is set. Free
+ * with g_object_unref().
+ *
+ * Returns: (transfer full) (type GDBusObjectManagerClient): A
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_manager_client_new_sync:
+ * @connection: A #GDBusConnection.
+ * @flags: Zero or more flags from the #GDBusObjectManagerClientFlags enumeration.
+ * @name: The owner of the control object (unique or well-known name).
+ * @object_path: The object path of the control object.
+ * @get_proxy_type_func: (allow-none): A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies.
+ * @get_proxy_type_user_data: User data to pass to @get_proxy_type_func.
+ * @get_proxy_type_destroy_notify: (allow-none): Free function for @get_proxy_type_user_data or %NULL.
+ * @cancellable: (allow-none): A #GCancellable or %NULL
+ * @error: Return location for error or %NULL.
+ *
+ * Creates a new #GDBusObjectManagerClient object.
+ *
+ * This is a synchronous failable constructor - the calling thread is
+ * blocked until a reply is received. See g_dbus_object_manager_client_new()
+ * for the asynchronous version.
+ *
+ * #GDBusObjectManagerClient object or %NULL if @error is set. Free
+ * with g_object_unref().
+ *
+ * Returns: (transfer full) (type GDBusObjectManagerClient): A
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_manager_get_interface:
+ * @manager: A #GDBusObjectManager.
+ * @object_path: Object path to lookup.
+ * @interface_name: D-Bus interface name to lookup.
+ *
+ * Gets the interface proxy for @interface_name at @object_path, if
+ * any.
+ *
+ * with g_object_unref().
+ *
+ * Returns: (transfer full): A #GDBusInterface instance or %NULL. Free
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_manager_get_object:
+ * @manager: A #GDBusObjectManager.
+ * @object_path: Object path to lookup.
+ *
+ * Gets the #GDBusObjectProxy at @object_path, if any.
+ *
+ * g_object_unref().
+ *
+ * Returns: (transfer full): A #GDBusObject or %NULL. Free with
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_manager_get_object_path:
+ * @manager: A #GDBusObjectManager.
+ *
+ * Gets the object path that @manager is for.
+ *
+ * Returns: A string owned by @manager. Do not free.
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_manager_get_objects:
+ * @manager: A #GDBusObjectManager.
+ *
+ * Gets all #GDBusObject objects known to @manager.
+ *
+ * #GDBusObject objects. The returned list should be freed with
+ * g_list_free() after each element has been freed with
+ * g_object_unref().
+ *
+ * Returns: (transfer full) (element-type GDBusObject): A list of
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_manager_server_export:
+ * @manager: A #GDBusObjectManagerServer.
+ * @object: A #GDBusObjectSkeleton.
+ *
+ * Exports @object on @manager.
+ *
+ * If there is already a #GDBusObject exported at the object path,
+ * then the old object is removed.
+ *
+ * The object path for @object must be in the hierarchy rooted by the
+ * object path for @manager.
+ *
+ * Note that @manager will take a reference on @object for as long as
+ * it is exported.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_manager_server_export_uniquely:
+ * @manager: A #GDBusObjectManagerServer.
+ * @object: An object.
+ *
+ * Like g_dbus_object_manager_server_export() but appends a string of
+ * the form <literal>_N</literal> (with N being a natural number) to
+ * @object<!-- -->'s object path if an object with the given path
+ * already exists. As such, the #GDBusObjectProxy:g-object-path property
+ * of @object may be modified.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_manager_server_get_connection:
+ * @manager: A #GDBusObjectManagerServer
+ *
+ * Gets the #GDBusConnection used by @manager.
+ *
+ * @manager isn't exported on a connection. The returned object should
+ * be freed with g_object_unref().
+ *
+ * Returns: (transfer full): A #GDBusConnection object or %NULL if
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_manager_server_new:
+ * @object_path: The object path to export the manager object at.
+ *
+ * Creates a new #GDBusObjectManagerServer object.
+ *
+ * The returned server isn't yet exported on any connection. To do so,
+ * use g_dbus_object_manager_server_set_connection(). Normally you
+ * want to export all of your objects before doing so to avoid <ulink
+ * url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager">InterfacesAdded</ulink>
+ * signals being emitted.
+ *
+ * Returns: A #GDBusObjectManagerServer object. Free with g_object_unref().
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_manager_server_set_connection:
+ * @manager: A #GDBusObjectManagerServer.
+ * @connection: (allow-none): A #GDBusConnection or %NULL.
+ *
+ * Exports all objects managed by @manager on @connection. If
+ * @connection is %NULL, stops exporting objects.
+ */
+
+
+/**
+ * g_dbus_object_manager_server_unexport:
+ * @manager: A #GDBusObjectManagerServer.
+ * @object_path: An object path.
+ *
+ * If @manager has an object at @path, removes the object. Otherwise
+ * does nothing.
+ *
+ * Note that @object_path must be in the hierarchy rooted by the
+ * object path for @manager.
+ *
+ * Returns: %TRUE if object at @object_path was removed, %FALSE otherwise.
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_proxy_get_connection:
+ * @proxy: a #GDBusObjectProxy
+ *
+ * Gets the connection that @proxy is for.
+ *
+ * object is owned by @proxy.
+ *
+ * Returns: (transfer none): A #GDBusConnection. Do not free, the
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_proxy_new:
+ * @connection: a #GDBusConnection
+ * @object_path: the object path
+ *
+ * Creates a new #GDBusObjectProxy for the given connection and
+ * object path.
+ *
+ * Returns: a new #GDBusObjectProxy
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_skeleton_add_interface:
+ * @object: A #GDBusObjectSkeleton.
+ * @interface_: A #GDBusInterfaceSkeleton.
+ *
+ * Adds @interface_ to @object.
+ *
+ * If @object already contains a #GDBusInterfaceSkeleton with the same
+ * interface name, it is removed before @interface_ is added.
+ *
+ * Note that @object takes its own reference on @interface_ and holds
+ * it until removed.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_skeleton_flush:
+ * @object: A #GDBusObjectSkeleton.
+ *
+ * This method simply calls g_dbus_interface_skeleton_flush() on all
+ * interfaces belonging to @object. See that method for when flushing
+ * is useful.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_skeleton_new:
+ * @object_path: An object path.
+ *
+ * Creates a new #GDBusObjectSkeleton.
+ *
+ * Returns: A #GDBusObjectSkeleton. Free with g_object_unref().
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_skeleton_remove_interface:
+ * @object: A #GDBusObjectSkeleton.
+ * @interface_: A #GDBusInterfaceSkeleton.
+ *
+ * Removes @interface_ from @object.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_skeleton_remove_interface_by_name:
+ * @object: A #GDBusObjectSkeleton.
+ * @interface_name: A D-Bus interface name.
+ *
+ * Removes the #GDBusInterface with @interface_name from @object.
+ *
+ * If no D-Bus interface of the given interface exists, this function
+ * does nothing.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_object_skeleton_set_object_path:
+ * @object: A #GDBusObjectSkeleton.
+ * @object_path: A valid D-Bus object path.
+ *
+ * Sets the object path for @object.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_property_info_ref:
+ * @info: A #GDBusPropertyInfo
+ *
+ * If @info is statically allocated does nothing. Otherwise increases
+ * the reference count.
+ *
+ * Returns: The same @info.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_property_info_unref:
+ * @info: A #GDBusPropertyInfo.
+ *
+ * If @info is statically allocated, does nothing. Otherwise decreases
+ * the reference count of @info. When its reference count drops to 0,
+ * the memory used is freed.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_proxy_call:
+ * @proxy: A #GDBusProxy.
+ * @method_name: Name of method to invoke.
+ * @parameters: (allow-none): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
+ * @flags: Flags from the #GDBusCallFlags enumeration.
+ * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @callback: (allow-none): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
+ * @user_data: The data to pass to @callback.
+ *
+ * Asynchronously invokes the @method_name method on @proxy.
+ *
+ * If @method_name contains any dots, then @name is split into interface and
+ * method name parts. This allows using @proxy for invoking methods on
+ * other interfaces.
+ *
+ * If the #GDBusConnection associated with @proxy is closed then
+ * the operation will fail with %G_IO_ERROR_CLOSED. If
+ * @cancellable is canceled, the operation will fail with
+ * %G_IO_ERROR_CANCELLED. If @parameters contains a value not
+ * compatible with the D-Bus protocol, the operation fails with
+ * %G_IO_ERROR_INVALID_ARGUMENT.
+ *
+ * If the @parameters #GVariant is floating, it is consumed. This allows
+ * convenient 'inline' use of g_variant_new(), e.g.:
+ * |[
+ * g_dbus_proxy_call (proxy,
+ * "TwoStrings",
+ * g_variant_new ("(ss)",
+ * "Thing One",
+ * "Thing Two"),
+ * G_DBUS_CALL_FLAGS_NONE,
+ * -1,
+ * NULL,
+ * (GAsyncReadyCallback) two_strings_done,
+ * &amp;data);
+ * ]|
+ *
+ * If @proxy has an expected interface (see
+ * #GDBusProxy:g-interface-info) and @method_name is referenced by it,
+ * then the return value is checked against the return type.
+ *
+ * This is an asynchronous method. When the operation is finished,
+ * @callback will be invoked in the
+ * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
+ * of the thread you are calling this method from.
+ * You can then call g_dbus_proxy_call_finish() to get the result of
+ * the operation. See g_dbus_proxy_call_sync() for the synchronous
+ * version of this method.
+ *
+ * If @callback is %NULL then the D-Bus method call message will be sent with
+ * the %G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED flag set.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_proxy_call_finish:
+ * @proxy: A #GDBusProxy.
+ * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_proxy_call().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with g_dbus_proxy_call().
+ *
+ * return values. Free with g_variant_unref().
+ *
+ * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_proxy_call_sync:
+ * @proxy: A #GDBusProxy.
+ * @method_name: Name of method to invoke.
+ * @parameters: (allow-none): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
+ * @flags: Flags from the #GDBusCallFlags enumeration.
+ * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Synchronously invokes the @method_name method on @proxy.
+ *
+ * If @method_name contains any dots, then @name is split into interface and
+ * method name parts. This allows using @proxy for invoking methods on
+ * other interfaces.
+ *
+ * If the #GDBusConnection associated with @proxy is disconnected then
+ * the operation will fail with %G_IO_ERROR_CLOSED. If
+ * @cancellable is canceled, the operation will fail with
+ * %G_IO_ERROR_CANCELLED. If @parameters contains a value not
+ * compatible with the D-Bus protocol, the operation fails with
+ * %G_IO_ERROR_INVALID_ARGUMENT.
+ *
+ * If the @parameters #GVariant is floating, it is consumed. This allows
+ * convenient 'inline' use of g_variant_new(), e.g.:
+ * |[
+ * g_dbus_proxy_call_sync (proxy,
+ * "TwoStrings",
+ * g_variant_new ("(ss)",
+ * "Thing One",
+ * "Thing Two"),
+ * G_DBUS_CALL_FLAGS_NONE,
+ * -1,
+ * NULL,
+ * &amp;error);
+ * ]|
+ *
+ * The calling thread is blocked until a reply is received. See
+ * g_dbus_proxy_call() for the asynchronous version of this
+ * method.
+ *
+ * If @proxy has an expected interface (see
+ * #GDBusProxy:g-interface-info) and @method_name is referenced by it,
+ * then the return value is checked against the return type.
+ *
+ * return values. Free with g_variant_unref().
+ *
+ * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_proxy_call_with_unix_fd_list:
+ * @proxy: A #GDBusProxy.
+ * @method_name: Name of method to invoke.
+ * @parameters: (allow-none): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
+ * @flags: Flags from the #GDBusCallFlags enumeration.
+ * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
+ * @fd_list: (allow-none): A #GUnixFDList or %NULL.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @callback: (allow-none): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
+ * @user_data: The data to pass to @callback.
+ *
+ * Like g_dbus_proxy_call() but also takes a #GUnixFDList object.
+ *
+ * This method is only available on UNIX.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_proxy_call_with_unix_fd_list_finish:
+ * @proxy: A #GDBusProxy.
+ * @out_fd_list: (out) (allow-none): Return location for a #GUnixFDList or %NULL.
+ * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_proxy_call_with_unix_fd_list().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with g_dbus_proxy_call_with_unix_fd_list().
+ *
+ * return values. Free with g_variant_unref().
+ *
+ * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_proxy_call_with_unix_fd_list_sync:
+ * @proxy: A #GDBusProxy.
+ * @method_name: Name of method to invoke.
+ * @parameters: (allow-none): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
+ * @flags: Flags from the #GDBusCallFlags enumeration.
+ * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
+ * @fd_list: (allow-none): A #GUnixFDList or %NULL.
+ * @out_fd_list: (out) (allow-none): Return location for a #GUnixFDList or %NULL.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Like g_dbus_proxy_call_sync() but also takes and returns #GUnixFDList objects.
+ *
+ * This method is only available on UNIX.
+ *
+ * return values. Free with g_variant_unref().
+ *
+ * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dbus_proxy_get_cached_property:
+ * @proxy: A #GDBusProxy.
+ * @property_name: Property name.
+ *
+ * Looks up the value for a property from the cache. This call does no
+ * blocking IO.
+ *
+ * If @proxy has an expected interface (see
+ * #GDBusProxy:g-interface-info) and @property_name is referenced by
+ * it, then @value is checked against the type of the property.
+ *
+ * for @property_name or %NULL if the value is not in the cache. The
+ * returned reference must be freed with g_variant_unref().
+ *
+ * Returns: A reference to the #GVariant instance that holds the value
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_proxy_get_cached_property_names:
+ * @proxy: A #GDBusProxy.
+ *
+ * Gets the names of all cached properties on @proxy.
+ *
+ * @proxy has no cached properties. Free the returned array with
+ * g_strfreev().
+ *
+ * Returns: (transfer full): A %NULL-terminated array of strings or %NULL if
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_proxy_get_connection:
+ * @proxy: A #GDBusProxy.
+ *
+ * Gets the connection @proxy is for.
+ *
+ * Returns: (transfer none): A #GDBusConnection owned by @proxy. Do not free.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_proxy_get_default_timeout:
+ * @proxy: A #GDBusProxy.
+ *
+ * Gets the timeout to use if -1 (specifying default timeout) is
+ * passed as @timeout_msec in the g_dbus_proxy_call() and
+ * g_dbus_proxy_call_sync() functions.
+ *
+ * See the #GDBusProxy:g-default-timeout property for more details.
+ *
+ * Returns: Timeout to use for @proxy.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_proxy_get_flags:
+ * @proxy: A #GDBusProxy.
+ *
+ * Gets the flags that @proxy was constructed with.
+ *
+ * Returns: Flags from the #GDBusProxyFlags enumeration.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_proxy_get_interface_info:
+ * @proxy: A #GDBusProxy
+ *
+ * Returns the #GDBusInterfaceInfo, if any, specifying the interface
+ * that @proxy conforms to. See the #GDBusProxy:g-interface-info
+ * property for more details.
+ *
+ * object, it is owned by @proxy.
+ *
+ * Returns: A #GDBusInterfaceInfo or %NULL. Do not unref the returned
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_proxy_get_interface_name:
+ * @proxy: A #GDBusProxy.
+ *
+ * Gets the D-Bus interface name @proxy is for.
+ *
+ * Returns: A string owned by @proxy. Do not free.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_proxy_get_name:
+ * @proxy: A #GDBusProxy.
+ *
+ * Gets the name that @proxy was constructed for.
+ *
+ * Returns: A string owned by @proxy. Do not free.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_proxy_get_name_owner:
+ * @proxy: A #GDBusProxy.
+ *
+ * The unique name that owns the name that @proxy is for or %NULL if
+ * no-one currently owns that name. You may connect to the
+ * #GObject::notify signal to track changes to the
+ * #GDBusProxy:g-name-owner property.
+ *
+ * Returns: The name owner or %NULL if no name owner exists. Free with g_free().
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_proxy_get_object_path:
+ * @proxy: A #GDBusProxy.
+ *
+ * Gets the object path @proxy is for.
+ *
+ * Returns: A string owned by @proxy. Do not free.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_proxy_new:
+ * @connection: A #GDBusConnection.
+ * @flags: Flags used when constructing the proxy.
+ * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
+ * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @object_path: An object path.
+ * @interface_name: A D-Bus interface name.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @callback: Callback function to invoke when the proxy is ready.
+ * @user_data: User data to pass to @callback.
+ *
+ * Creates a proxy for accessing @interface_name on the remote object
+ * at @object_path owned by @name at @connection and asynchronously
+ * loads D-Bus properties unless the
+ * %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used. Connect to
+ * the #GDBusProxy::g-properties-changed signal to get notified about
+ * property changes.
+ *
+ * If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up
+ * match rules for signals. Connect to the #GDBusProxy::g-signal signal
+ * to handle signals from the remote object.
+ *
+ * If @name is a well-known name and the
+ * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag isn't set and no name
+ * owner currently exists, the message bus will be requested to launch
+ * a name owner for the name.
+ *
+ * This is a failable asynchronous constructor - when the proxy is
+ * ready, @callback will be invoked and you can use
+ * g_dbus_proxy_new_finish() to get the result.
+ *
+ * See g_dbus_proxy_new_sync() and for a synchronous version of this constructor.
+ *
+ * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_proxy_new_finish:
+ * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to g_dbus_proxy_new().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes creating a #GDBusProxy.
+ *
+ * Returns: A #GDBusProxy or %NULL if @error is set. Free with g_object_unref().
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_proxy_new_for_bus:
+ * @bus_type: A #GBusType.
+ * @flags: Flags used when constructing the proxy.
+ * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
+ * @name: A bus name (well-known or unique).
+ * @object_path: An object path.
+ * @interface_name: A D-Bus interface name.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @callback: Callback function to invoke when the proxy is ready.
+ * @user_data: User data to pass to @callback.
+ *
+ * Like g_dbus_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
+ *
+ * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_proxy_new_for_bus_finish:
+ * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to g_dbus_proxy_new_for_bus().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes creating a #GDBusProxy.
+ *
+ * Returns: A #GDBusProxy or %NULL if @error is set. Free with g_object_unref().
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_proxy_new_for_bus_sync:
+ * @bus_type: A #GBusType.
+ * @flags: Flags used when constructing the proxy.
+ * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
+ * @name: A bus name (well-known or unique).
+ * @object_path: An object path.
+ * @interface_name: A D-Bus interface name.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Like g_dbus_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
+ *
+ * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
+ *
+ * Returns: A #GDBusProxy or %NULL if error is set. Free with g_object_unref().
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_proxy_new_sync:
+ * @connection: A #GDBusConnection.
+ * @flags: Flags used when constructing the proxy.
+ * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
+ * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @object_path: An object path.
+ * @interface_name: A D-Bus interface name.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @error: (allow-none): Return location for error or %NULL.
+ *
+ * Creates a proxy for accessing @interface_name on the remote object
+ * at @object_path owned by @name at @connection and synchronously
+ * loads D-Bus properties unless the
+ * %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used.
+ *
+ * If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up
+ * match rules for signals. Connect to the #GDBusProxy::g-signal signal
+ * to handle signals from the remote object.
+ *
+ * If @name is a well-known name and the
+ * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag isn't set and no name
+ * owner currently exists, the message bus will be requested to launch
+ * a name owner for the name.
+ *
+ * This is a synchronous failable constructor. See g_dbus_proxy_new()
+ * and g_dbus_proxy_new_finish() for the asynchronous version.
+ *
+ * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
+ *
+ * Returns: A #GDBusProxy or %NULL if error is set. Free with g_object_unref().
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_proxy_set_cached_property:
+ * @proxy: A #GDBusProxy
+ * @property_name: Property name.
+ * @value: (allow-none): Value for the property or %NULL to remove it from the cache.
+ *
+ * If @value is not %NULL, sets the cached value for the property with
+ * name @property_name to the value in @value.
+ *
+ * If @value is %NULL, then the cached value is removed from the
+ * property cache.
+ *
+ * If @proxy has an expected interface (see
+ * #GDBusProxy:g-interface-info) and @property_name is referenced by
+ * it, then @value is checked against the type of the property.
+ *
+ * If the @value #GVariant is floating, it is consumed. This allows
+ * convenient 'inline' use of g_variant_new(), e.g.
+ * |[
+ * g_dbus_proxy_set_cached_property (proxy,
+ * "SomeProperty",
+ * g_variant_new ("(si)",
+ * "A String",
+ * 42));
+ * ]|
+ *
+ * Normally you will not need to use this method since @proxy is
+ * tracking changes using the
+ * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
+ * D-Bus signal. However, for performance reasons an object may decide
+ * to not use this signal for some properties and instead use a
+ * proprietary out-of-band mechanism to transmit changes.
+ *
+ * As a concrete example, consider an object with a property
+ * <literal>ChatroomParticipants</literal> which is an array of
+ * strings. Instead of transmitting the same (long) array every time
+ * the property changes, it is more efficient to only transmit the
+ * delta using e.g. signals <literal>ChatroomParticipantJoined(String
+ * name)</literal> and <literal>ChatroomParticipantParted(String
+ * name)</literal>.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_proxy_set_default_timeout:
+ * @proxy: A #GDBusProxy.
+ * @timeout_msec: Timeout in milliseconds.
+ *
+ * Sets the timeout to use if -1 (specifying default timeout) is
+ * passed as @timeout_msec in the g_dbus_proxy_call() and
+ * g_dbus_proxy_call_sync() functions.
+ *
+ * See the #GDBusProxy:g-default-timeout property for more details.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_proxy_set_interface_info:
+ * @proxy: A #GDBusProxy
+ * @info: (allow-none): Minimum interface this proxy conforms to or %NULL to unset.
+ *
+ * Ensure that interactions with @proxy conform to the given
+ * interface. See the #GDBusProxy:g-interface-info property for more
+ * details.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_server_get_client_address:
+ * @server: A #GDBusServer.
+ *
+ * Gets a D-Bus address string that can be used by clients to connect
+ * to @server.
+ *
+ * by @server.
+ *
+ * Returns: A D-Bus address string. Do not free, the string is owned
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_server_get_flags:
+ * @server: A #GDBusServer.
+ *
+ * Gets the flags for @server.
+ *
+ * Returns: A set of flags from the #GDBusServerFlags enumeration.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_server_get_guid:
+ * @server: A #GDBusServer.
+ *
+ * Gets the GUID for @server.
+ *
+ * Returns: A D-Bus GUID. Do not free this string, it is owned by @server.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_server_is_active:
+ * @server: A #GDBusServer.
+ *
+ * Gets whether @server is active.
+ *
+ * Returns: %TRUE if server is active, %FALSE otherwise.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_server_new_sync:
+ * @address: A D-Bus address.
+ * @flags: Flags from the #GDBusServerFlags enumeration.
+ * @guid: A D-Bus GUID.
+ * @observer: (allow-none): A #GDBusAuthObserver or %NULL.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @error: Return location for server or %NULL.
+ *
+ * Creates a new D-Bus server that listens on the first address in
+ * @address that works.
+ *
+ * Once constructed, you can use g_dbus_server_get_client_address() to
+ * get a D-Bus address string that clients can use to connect.
+ *
+ * Connect to the #GDBusServer::new-connection signal to handle
+ * incoming connections.
+ *
+ * The returned #GDBusServer isn't active - you have to start it with
+ * g_dbus_server_start().
+ *
+ * See <xref linkend="gdbus-peer-to-peer"/> for how #GDBusServer can
+ * be used.
+ *
+ * This is a synchronous failable constructor. See
+ * g_dbus_server_new() for the asynchronous version.
+ *
+ * g_object_unref().
+ *
+ * Returns: A #GDBusServer or %NULL if @error is set. Free with
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_server_start:
+ * @server: A #GDBusServer.
+ *
+ * Starts @server.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_server_stop:
+ * @server: A #GDBusServer.
+ *
+ * Stops @server.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_signal_info_ref:
+ * @info: A #GDBusSignalInfo
+ *
+ * If @info is statically allocated does nothing. Otherwise increases
+ * the reference count.
+ *
+ * Returns: The same @info.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_dbus_signal_info_unref:
+ * @info: A #GDBusSignalInfo.
+ *
+ * If @info is statically allocated, does nothing. Otherwise decreases
+ * the reference count of @info. When its reference count drops to 0,
+ * the memory used is freed.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_desktop_app_info_get_categories:
+ * @info: a #GDesktopAppInfo
+ *
+ * Gets the categories from the desktop file.
+ *
+ * i.e. no attempt is made to split it by ';' or validate it.
+ *
+ * Returns: The unparsed Categories key from the desktop file;
+ */
+
+
+/**
+ * g_desktop_app_info_get_filename:
+ * @info: a #GDesktopAppInfo
+ *
+ * When @info was created from a known filename, return it.  In some
+ * situations such as the #GDesktopAppInfo returned from
+ * g_desktop_app_info_new_from_keyfile(), this function will return %NULL.
+ *
+ * Returns: The full path to the file for @info, or %NULL if not known.
+ * Since: 2.24
+ */
+
+
+/**
+ * g_desktop_app_info_get_generic_name:
+ * @info: a #GDesktopAppInfo
+ *
+ * Gets the generic name from the destkop file.
+ *
+ * Returns: The value of the GenericName key
+ */
+
+
+/**
+ * g_desktop_app_info_get_is_hidden:
+ * @info: a #GDesktopAppInfo.
+ *
+ * A desktop file is hidden if the Hidden key in it is
+ * set to True.
+ *
+ * Returns: %TRUE if hidden, %FALSE otherwise.
+ */
+
+
+/**
+ * g_desktop_app_info_get_keywords:
+ * @info: a #GDesktopAppInfo
+ *
+ * Gets the keywords from the desktop file.
+ *
+ * Returns: (transfer none): The value of the Keywords key
+ * Since: 2.32
+ */
+
+
+/**
+ * g_desktop_app_info_get_nodisplay:
+ * @info: a #GDesktopAppInfo
+ *
+ * Gets the value of the NoDisplay key, which helps determine if the
+ * application info should be shown in menus. See
+ * #G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY and g_app_info_should_show().
+ *
+ * Returns: The value of the NoDisplay key
+ * Since: 2.30
+ */
+
+
+/**
+ * g_desktop_app_info_get_show_in:
+ * @info: a #GDesktopAppInfo
+ * @desktop_env: a string specifying a desktop name
+ *
+ * Checks if the application info should be shown in menus that list available
+ * applications for a specific name of the desktop, based on the
+ * <literal>OnlyShowIn</literal> and <literal>NotShowIn</literal> keys.
+ *
+ * If @desktop_env is %NULL, then the name of the desktop set with
+ * g_desktop_app_info_set_desktop_env() is used.
+ *
+ * Note that g_app_info_should_show() for @info will include this check (with
+ * %NULL for @desktop_env) as well as additional checks.
+ *
+ * <literal>OnlyShowIn</literal> and <literal>NotShowIn</literal> keys, %FALSE
+ * otherwise.
+ *
+ * Returns: %TRUE if the @info should be shown in @desktop_env according to the
+ * Since: 2.30
+ */
+
+
+/**
+ * g_desktop_app_info_launch_uris_as_manager:
+ * @appinfo: a #GDesktopAppInfo
+ * @uris: (element-type utf8): List of URIs
+ * @launch_context: a #GAppLaunchContext
+ * @spawn_flags: #GSpawnFlags, used for each process
+ * @user_setup: (scope call): a #GSpawnChildSetupFunc, used once for each process.
+ * @user_setup_data: (closure user_setup): User data for @user_setup
+ * @pid_callback: (scope call): Callback for child processes
+ * @pid_callback_data: (closure pid_callback): User data for @callback
+ * @error: return location for a #GError, or %NULL
+ *
+ * This function performs the equivalent of g_app_info_launch_uris(),
+ * but is intended primarily for operating system components that
+ * launch applications.  Ordinary applications should use
+ * g_app_info_launch_uris().
+ *
+ * In contrast to g_app_info_launch_uris(), all processes created will
+ * always be run directly as children as if by the UNIX fork()/exec()
+ * calls.
+ *
+ * This guarantee allows additional control over the exact environment
+ * of the child processes, which is provided via a setup function
+ * @user_setup, as well as the process identifier of each child process
+ * via @pid_callback. See g_spawn_async() for more information about the
+ * semantics of the @user_setup function.
+ *
+ * Returns: %TRUE on successful launch, %FALSE otherwise.
+ */
+
+
+/**
+ * g_desktop_app_info_lookup_get_default_for_uri_scheme:
+ * @lookup: a #GDesktopAppInfoLookup
+ * @uri_scheme: a string containing a URI scheme.
+ *
+ * Gets the default application for launching applications
+ * using this URI scheme for a particular GDesktopAppInfoLookup
+ * implementation.
+ *
+ * The GDesktopAppInfoLookup interface and this function is used
+ * to implement g_app_info_get_default_for_uri_scheme() backends
+ * in a GIO module. There is no reason for applications to use it
+ * directly. Applications should use g_app_info_get_default_for_uri_scheme().
+ *
+ * Returns: (transfer full): #GAppInfo for given @uri_scheme or %NULL on error.
+ * Deprecated: The #GDesktopAppInfoLookup interface is deprecated and unused by gio.
+ */
+
+
+/**
+ * g_desktop_app_info_new:
+ * @desktop_id: the desktop file id
+ *
+ * Creates a new #GDesktopAppInfo based on a desktop file id.
+ *
+ * A desktop file id is the basename of the desktop file, including the
+ * .desktop extension. GIO is looking for a desktop file with this name
+ * in the <filename>applications</filename> subdirectories of the XDG data
+ * directories (i.e. the directories specified in the
+ * <envar>XDG_DATA_HOME</envar> and <envar>XDG_DATA_DIRS</envar> environment
+ * variables). GIO also supports the prefix-to-subdirectory mapping that is
+ * described in the <ulink url="http://standards.freedesktop.org/menu-spec/latest/">Menu Spec</ulink>
+ * (i.e. a desktop id of kde-foo.desktop will match
+ * <filename>/usr/share/applications/kde/foo.desktop</filename>).
+ *
+ * Returns: a new #GDesktopAppInfo, or %NULL if no desktop file with that id
+ */
+
+
+/**
+ * g_desktop_app_info_new_from_filename:
+ * @filename: the path of a desktop file, in the GLib filename encoding
+ *
+ * Creates a new #GDesktopAppInfo.
+ *
+ * Returns: a new #GDesktopAppInfo or %NULL on error.
+ */
+
+
+/**
+ * g_desktop_app_info_new_from_keyfile:
+ * @key_file: an opened #GKeyFile
+ *
+ * Creates a new #GDesktopAppInfo.
+ *
+ * Returns: a new #GDesktopAppInfo or %NULL on error.
+ * Since: 2.18
+ */
+
+
+/**
+ * g_desktop_app_info_set_desktop_env:
+ * @desktop_env: a string specifying what desktop this is
+ *
+ * Sets the name of the desktop that the application is running in.
+ * This is used by g_app_info_should_show() and
+ * g_desktop_app_info_get_show_in() to evaluate the
+ * <literal>OnlyShowIn</literal> and <literal>NotShowIn</literal>
+ * desktop entry fields.
+ *
+ * The <ulink url="http://standards.freedesktop.org/menu-spec/latest/">Desktop
+ * Menu specification</ulink> recognizes the following:
+ * <simplelist>
+ * <member>GNOME</member>
+ * <member>KDE</member>
+ * <member>ROX</member>
+ * <member>XFCE</member>
+ * <member>LXDE</member>
+ * <member>Unity</member>
+ * <member>Old</member>
+ * </simplelist>
+ *
+ * Should be called only once; subsequent calls are ignored.
+ */
+
+
+/**
+ * g_drive_can_eject:
+ * @drive: a #GDrive.
+ *
+ * Checks if a drive can be ejected.
+ *
+ * Returns: %TRUE if the @drive can be ejected, %FALSE otherwise.
+ */
+
+
+/**
+ * g_drive_can_poll_for_media:
+ * @drive: a #GDrive.
+ *
+ * Checks if a drive can be polled for media changes.
+ *
+ * %FALSE otherwise.
+ *
+ * Returns: %TRUE if the @drive can be polled for media changes,
+ */
+
+
+/**
+ * g_drive_can_start:
+ * @drive: a #GDrive.
+ *
+ * Checks if a drive can be started.
+ *
+ * Returns: %TRUE if the @drive can be started, %FALSE otherwise.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_drive_can_start_degraded:
+ * @drive: a #GDrive.
+ *
+ * Checks if a drive can be started degraded.
+ *
+ * Returns: %TRUE if the @drive can be started degraded, %FALSE otherwise.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_drive_can_stop:
+ * @drive: a #GDrive.
+ *
+ * Checks if a drive can be stopped.
+ *
+ * Returns: %TRUE if the @drive can be stopped, %FALSE otherwise.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_drive_eject:
+ * @drive: a #GDrive.
+ * @flags: flags affecting the unmount if required for eject
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
+ * @user_data: user data to pass to @callback
+ *
+ * Asynchronously ejects a drive.
+ *
+ * When the operation is finished, @callback will be called.
+ * You can then call g_drive_eject_finish() to obtain the
+ * result of the operation.
+ *
+ * Deprecated: 2.22: Use g_drive_eject_with_operation() instead.
+ */
+
+
+/**
+ * g_drive_eject_finish:
+ * @drive: a #GDrive.
+ * @result: a #GAsyncResult.
+ * @error: a #GError, or %NULL
+ *
+ * Finishes ejecting a drive.
+ *
+ * %FALSE otherwise.
+ *
+ * Returns: %TRUE if the drive has been ejected successfully,
+ * Deprecated: 2.22: Use g_drive_eject_with_operation_finish() instead.
+ */
+
+
+/**
+ * g_drive_eject_with_operation:
+ * @drive: a #GDrive.
+ * @flags: flags affecting the unmount if required for eject
+ * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
+ * @user_data: user data passed to @callback.
+ *
+ * Ejects a drive. This is an asynchronous operation, and is
+ * finished by calling g_drive_eject_with_operation_finish() with the @drive
+ * and #GAsyncResult data returned in the @callback.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_drive_eject_with_operation_finish:
+ * @drive: a #GDrive.
+ * @result: a #GAsyncResult.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Finishes ejecting a drive. If any errors occurred during the operation,
+ * @error will be set to contain the errors and %FALSE will be returned.
+ *
+ * Returns: %TRUE if the drive was successfully ejected. %FALSE otherwise.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_drive_enumerate_identifiers:
+ * @drive: a #GDrive
+ *
+ * Gets the kinds of identifiers that @drive has.
+ * Use g_drive_get_identifier() to obtain the identifiers
+ * themselves.
+ *
+ * array of strings containing kinds of identifiers. Use g_strfreev()
+ * to free.
+ *
+ * Returns: (transfer full) (array zero-terminated=1): a %NULL-terminated
+ */
+
+
+/**
+ * g_drive_get_icon:
+ * @drive: a #GDrive.
+ *
+ * Gets the icon for @drive.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): #GIcon for the @drive.
+ */
+
+
+/**
+ * g_drive_get_identifier:
+ * @drive: a #GDrive
+ * @kind: the kind of identifier to return
+ *
+ * Gets the identifier of the given kind for @drive.
+ *
+ * requested identfier, or %NULL if the #GDrive
+ * doesn't have this kind of identifier.
+ *
+ * Returns: a newly allocated string containing the
+ */
+
+
+/**
+ * g_drive_get_name:
+ * @drive: a #GDrive.
+ *
+ * Gets the name of @drive.
+ *
+ * string should be freed when no longer needed.
+ *
+ * Returns: a string containing @drive's name. The returned
+ */
+
+
+/**
+ * g_drive_get_sort_key:
+ * @drive: A #GDrive.
+ *
+ * Gets the sort key for @drive, if any.
+ *
+ * Returns: Sorting key for @drive or %NULL if no such key is available.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_drive_get_start_stop_type:
+ * @drive: a #GDrive.
+ *
+ * Gets a hint about how a drive can be started/stopped.
+ *
+ * Returns: A value from the #GDriveStartStopType enumeration.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_drive_get_volumes:
+ * @drive: a #GDrive.
+ *
+ * Get a list of mountable volumes for @drive.
+ *
+ * The returned list should be freed with g_list_free(), after
+ * its elements have been unreffed with g_object_unref().
+ *
+ * Returns: (element-type GVolume) (transfer full): #GList containing any #GVolume objects on the given @drive.
+ */
+
+
+/**
+ * g_drive_has_media:
+ * @drive: a #GDrive.
+ *
+ * Checks if the @drive has media. Note that the OS may not be polling
+ * the drive for media changes; see g_drive_is_media_check_automatic()
+ * for more details.
+ *
+ * Returns: %TRUE if @drive has media, %FALSE otherwise.
+ */
+
+
+/**
+ * g_drive_has_volumes:
+ * @drive: a #GDrive.
+ *
+ * Check if @drive has any mountable volumes.
+ *
+ * Returns: %TRUE if the @drive contains volumes, %FALSE otherwise.
+ */
+
+
+/**
+ * g_drive_is_media_check_automatic:
+ * @drive: a #GDrive.
+ *
+ * Checks if @drive is capabable of automatically detecting media changes.
+ *
+ * media changes, %FALSE otherwise.
+ *
+ * Returns: %TRUE if the @drive is capabable of automatically detecting
+ */
+
+
+/**
+ * g_drive_is_media_removable:
+ * @drive: a #GDrive.
+ *
+ * Checks if the @drive supports removable media.
+ *
+ * Returns: %TRUE if @drive supports removable media, %FALSE otherwise.
+ */
+
+
+/**
+ * g_drive_poll_for_media:
+ * @drive: a #GDrive.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
+ * @user_data: user data to pass to @callback
+ *
+ * Asynchronously polls @drive to see if media has been inserted or removed.
+ *
+ * When the operation is finished, @callback will be called.
+ * You can then call g_drive_poll_for_media_finish() to obtain the
+ * result of the operation.
+ */
+
+
+/**
+ * g_drive_poll_for_media_finish:
+ * @drive: a #GDrive.
+ * @result: a #GAsyncResult.
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an operation started with g_drive_poll_for_media() on a drive.
+ *
+ * %FALSE otherwise.
+ *
+ * Returns: %TRUE if the drive has been poll_for_mediaed successfully,
+ */
+
+
+/**
+ * g_drive_start:
+ * @drive: a #GDrive.
+ * @flags: flags affecting the start operation.
+ * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
+ * @user_data: user data to pass to @callback
+ *
+ * Asynchronously starts a drive.
+ *
+ * When the operation is finished, @callback will be called.
+ * You can then call g_drive_start_finish() to obtain the
+ * result of the operation.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_drive_start_finish:
+ * @drive: a #GDrive.
+ * @result: a #GAsyncResult.
+ * @error: a #GError, or %NULL
+ *
+ * Finishes starting a drive.
+ *
+ * %FALSE otherwise.
+ *
+ * Returns: %TRUE if the drive has been started successfully,
+ * Since: 2.22
+ */
+
+
+/**
+ * g_drive_stop:
+ * @drive: a #GDrive.
+ * @flags: flags affecting the unmount if required for stopping.
+ * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
+ * @user_data: user data to pass to @callback
+ *
+ * Asynchronously stops a drive.
+ *
+ * When the operation is finished, @callback will be called.
+ * You can then call g_drive_stop_finish() to obtain the
+ * result of the operation.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_drive_stop_finish:
+ * @drive: a #GDrive.
+ * @result: a #GAsyncResult.
+ * @error: a #GError, or %NULL
+ *
+ * Finishes stopping a drive.
+ *
+ * %FALSE otherwise.
+ *
+ * Returns: %TRUE if the drive has been stopped successfully,
+ * Since: 2.22
+ */
+
+
+/**
+ * g_emblem_get_icon:
+ * @emblem: a #GEmblem from which the icon should be extracted.
+ *
+ * Gives back the icon from @emblem.
+ *
+ * the emblem and should not be modified or freed.
+ *
+ * Returns: (transfer none): a #GIcon. The returned object belongs to
+ * Since: 2.18
+ */
+
+
+/**
+ * g_emblem_get_origin:
+ * @emblem: a #GEmblem
+ *
+ * Gets the origin of the emblem.
+ *
+ * Returns: (transfer none): the origin of the emblem
+ * Since: 2.18
+ */
+
+
+/**
+ * g_emblem_new:
+ * @icon: a GIcon containing the icon.
+ *
+ * Creates a new emblem for @icon.
+ *
+ * Returns: a new #GEmblem.
+ * Since: 2.18
+ */
+
+
+/**
+ * g_emblem_new_with_origin:
+ * @icon: a GIcon containing the icon.
+ * @origin: a GEmblemOrigin enum defining the emblem's origin
+ *
+ * Creates a new emblem for @icon.
+ *
+ * Returns: a new #GEmblem.
+ * Since: 2.18
+ */
+
+
+/**
+ * g_emblemed_icon_add_emblem:
+ * @emblemed: a #GEmblemedIcon
+ * @emblem: a #GEmblem
+ *
+ * Adds @emblem to the #GList of #GEmblem <!-- -->s.
+ *
+ * Since: 2.18
+ */
+
+
+/**
+ * g_emblemed_icon_clear_emblems:
+ * @emblemed: a #GEmblemedIcon
+ *
+ * Removes all the emblems from @icon.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_emblemed_icon_get_emblems:
+ * @emblemed: a #GEmblemedIcon
+ *
+ * Gets the list of emblems for the @icon.
+ *
+ * #GEmblem <!-- -->s that is owned by @emblemed
+ *
+ * Returns: (element-type Gio.Emblem) (transfer none): a #GList of
+ * Since: 2.18
+ */
+
+
+/**
+ * g_emblemed_icon_get_icon:
+ * @emblemed: a #GEmblemedIcon
+ *
+ * Gets the main icon for @emblemed.
+ *
+ * Returns: (transfer none): a #GIcon that is owned by @emblemed
+ * Since: 2.18
+ */
+
+
+/**
+ * g_emblemed_icon_new:
+ * @icon: a #GIcon
+ * @emblem: (allow-none): a #GEmblem, or %NULL
+ *
+ * Creates a new emblemed icon for @icon with the emblem @emblem.
+ *
+ * Returns: (transfer full) (type GEmblemedIcon): a new #GIcon
+ * Since: 2.18
+ */
+
+
+/**
+ * g_file_append_to:
+ * @file: input #GFile.
+ * @flags: a set of #GFileCreateFlags.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, or %NULL
+ *
+ * Gets an output stream for appending data to the file. If
+ * the file doesn't already exist it is created.
+ *
+ * By default files created are generally readable by everyone,
+ * but if you pass #G_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.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * Some file systems don't allow all file names, and may
+ * return an %G_IO_ERROR_INVALID_FILENAME error.
+ * If the file is a directory the %G_IO_ERROR_IS_DIRECTORY error will be
+ * returned. Other errors are possible too, and depend on what kind of
+ * filesystem the file is on.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GFileOutputStream, or %NULL on error.
+ */
+
+
+/**
+ * g_file_append_to_async:
+ * @file: input #GFile.
+ * @flags: a set of #GFileCreateFlags.
+ * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Asynchronously opens @file for appending.
+ *
+ * For more details, see g_file_append_to() which is
+ * the synchronous version of this call.
+ *
+ * When the operation is finished, @callback will be called. You can then call
+ * g_file_append_to_finish() to get the result of the operation.
+ */
+
+
+/**
+ * g_file_append_to_finish:
+ * @file: input #GFile.
+ * @res: #GAsyncResult
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous file append operation started with
+ * g_file_append_to_async().
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a valid #GFileOutputStream or %NULL on error.
+ */
+
+
+/**
+ * g_file_attribute_info_list_add:
+ * @list: a #GFileAttributeInfoList.
+ * @name: the name of the attribute to add.
+ * @type: the #GFileAttributeType for the attribute.
+ * @flags: #GFileAttributeInfoFlags for the attribute.
+ *
+ * Adds a new attribute with @name to the @list, setting
+ * its @type and @flags.
+ */
+
+
+/**
+ * g_file_attribute_info_list_dup:
+ * @list: a #GFileAttributeInfoList to duplicate.
+ *
+ * Makes a duplicate of a file attribute info list.
+ *
+ * Returns: a copy of the given @list.
+ */
+
+
+/**
+ * g_file_attribute_info_list_lookup:
+ * @list: a #GFileAttributeInfoList.
+ * @name: the name of the attribute to lookup.
+ *
+ * Gets the file attribute with the name @name from @list.
+ *
+ * attribute isn't found.
+ *
+ * Returns: a #GFileAttributeInfo for the @name, or %NULL if an
+ */
+
+
+/**
+ * g_file_attribute_info_list_new:
+ *
+ * Creates a new file attribute info list.
+ *
+ * Returns: a #GFileAttributeInfoList.
+ */
+
+
+/**
+ * g_file_attribute_info_list_ref:
+ * @list: a #GFileAttributeInfoList to reference.
+ *
+ * References a file attribute info list.
+ *
+ * Returns: #GFileAttributeInfoList or %NULL on error.
+ */
+
+
+/**
+ * g_file_attribute_info_list_unref:
+ * @list: The #GFileAttributeInfoList to unreference.
+ *
+ * Removes a reference from the given @list. If the reference count
+ * falls to zero, the @list is deleted.
+ */
+
+
+/**
+ * g_file_attribute_matcher_enumerate_namespace:
+ * @matcher: a #GFileAttributeMatcher.
+ * @ns: a string containing a file attribute namespace.
+ *
+ * Checks if the matcher will match all of the keys in a given namespace.
+ * This will always return %TRUE if a wildcard character is in use (e.g. if
+ * matcher was created with "standard::*" and @ns is "standard", or if matcher was created
+ * using "*" and namespace is anything.)
+ *
+ * TODO: this is awkwardly worded.
+ *
+ * in the given @ns, %FALSE otherwise.
+ *
+ * Returns: %TRUE if the matcher matches all of the entries
+ */
+
+
+/**
+ * g_file_attribute_matcher_enumerate_next:
+ * @matcher: a #GFileAttributeMatcher.
+ *
+ * Gets the next matched attribute from a #GFileAttributeMatcher.
+ *
+ * no more attribute exist.
+ *
+ * Returns: a string containing the next attribute or %NULL if
+ */
+
+
+/**
+ * g_file_attribute_matcher_matches:
+ * @matcher: a #GFileAttributeMatcher.
+ * @attribute: a file attribute key.
+ *
+ * Checks if an attribute will be matched by an attribute matcher. If
+ * the matcher was created with the "*" matching string, this function
+ * will always return %TRUE.
+ *
+ * Returns: %TRUE if @attribute matches @matcher. %FALSE otherwise.
+ */
+
+
+/**
+ * g_file_attribute_matcher_matches_only:
+ * @matcher: a #GFileAttributeMatcher.
+ * @attribute: a file attribute key.
+ *
+ * Checks if a attribute matcher only matches a given attribute. Always
+ * returns %FALSE if "*" was used when creating the matcher.
+ *
+ * Returns: %TRUE if the matcher only matches @attribute. %FALSE otherwise.
+ */
+
+
+/**
+ * g_file_attribute_matcher_new:
+ * @attributes: an attribute string to match.
+ *
+ * Creates a new file attribute matcher, which matches attributes
+ * against a given string. #GFileAttributeMatcher<!-- -->s are reference
+ * counted structures, and are created with a reference count of 1. If
+ * the number of references falls to 0, the #GFileAttributeMatcher is
+ * automatically destroyed.
+ *
+ * The @attribute string should be formatted with specific keys separated
+ * from namespaces with a double colon. Several "namespace::key" strings may be
+ * concatenated with a single comma (e.g. "standard::type,standard::is-hidden").
+ * The wildcard "*" may be used to match all keys and namespaces, or
+ * "namespace::*" will match all keys in a given namespace.
+ *
+ * Examples of strings to use:
+ * <table>
+ * <title>File Attribute Matcher strings and results</title>
+ * <tgroup cols='2' align='left'><thead>
+ * <row><entry> Matcher String </entry><entry> Matches </entry></row></thead>
+ * <tbody>
+ * <row><entry>"*"</entry><entry>matches all attributes.</entry></row>
+ * <row><entry>"standard::is-hidden"</entry><entry>matches only the key is-hidden in the standard namespace.</entry></row>
+ * <row><entry>"standard::type,unix::*"</entry><entry>matches the type key in the standard namespace and
+ * all keys in the unix namespace.</entry></row>
+ * </tbody></tgroup>
+ * </table>
+ *
+ * Returns: a #GFileAttributeMatcher.
+ */
+
+
+/**
+ * g_file_attribute_matcher_ref:
+ * @matcher: a #GFileAttributeMatcher.
+ *
+ * References a file attribute matcher.
+ *
+ * Returns: a #GFileAttributeMatcher.
+ */
+
+
+/**
+ * g_file_attribute_matcher_subtract:
+ * @matcher: Matcher to subtract from
+ * @subtract: The matcher to subtract
+ *
+ * Subtracts all attributes of @subtract from @matcher and returns
+ * a matcher that supports those attributes.
+ *
+ * Note that currently it is not possible to remove a single
+ * attribute when the @matcher matches the whole namespace - or remove
+ * a namespace or attribute when the matcher matches everything. This
+ * is a limitation of the current implementation, but may be fixed
+ * in the future.
+ *
+ * @matcher that are not matched by @subtract
+ *
+ * Returns: A file attribute matcher matching all attributes of
+ */
+
+
+/**
+ * g_file_attribute_matcher_to_string:
+ * @matcher: (allow-none): a #GFileAttributeMatcher.
+ *
+ * Prints what the matcher is matching against. The format will be
+ * equal to the format passed to g_file_attribute_matcher_new().
+ * The output however, might not be identical, as the matcher may
+ * decide to use a different order or omit needless parts.
+ *
+ * against or %NULL if @matcher was %NULL.
+ *
+ * Returns: a string describing the attributes the matcher matches
+ * Since: 2.32
+ */
+
+
+/**
+ * g_file_attribute_matcher_unref:
+ * @matcher: a #GFileAttributeMatcher.
+ *
+ * Unreferences @matcher. If the reference count falls below 1,
+ * the @matcher is automatically freed.
+ */
+
+
+/**
+ * g_file_copy:
+ * @source: input #GFile.
+ * @destination: destination #GFile
+ * @flags: set of #GFileCopyFlags
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
+ * @progress_callback: (allow-none) (scope call): function to callback with progress information, or %NULL if progress information is not needed
+ * @progress_callback_data: (closure): user data to pass to @progress_callback
+ * @error: #GError to set on error, or %NULL
+ *
+ * Copies the file @source to the location specified by @destination.
+ * Can not handle recursive copies of directories.
+ *
+ * If the flag #G_FILE_COPY_OVERWRITE is specified an already
+ * existing @destination file is overwritten.
+ *
+ * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks
+ * will be copied as symlinks, otherwise the target of the
+ * @source symlink will be copied.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * If @progress_callback is not %NULL, 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.
+ *
+ * If the @source file does not exist then the G_IO_ERROR_NOT_FOUND
+ * error is returned, independent on the status of the @destination.
+ *
+ * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then the
+ * error G_IO_ERROR_EXISTS is returned.
+ *
+ * If trying to overwrite a file over a directory the G_IO_ERROR_IS_DIRECTORY
+ * error is returned. If trying to overwrite a directory with a directory the
+ * G_IO_ERROR_WOULD_MERGE error is returned.
+ *
+ * If the source is a directory and the target does not exist, or
+ * #G_FILE_COPY_OVERWRITE is specified and the target is a file, then the
+ * G_IO_ERROR_WOULD_RECURSE error is returned.
+ *
+ * If you are interested in copying the #GFile object itself (not the on-disk
+ * file), see g_file_dup().
+ *
+ * Returns: %TRUE on success, %FALSE otherwise.
+ */
+
+
+/**
+ * g_file_copy_async: (skip)
+ * @source: input #GFile.
+ * @destination: destination #GFile
+ * @flags: set of #GFileCopyFlags
+ * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
+ * @progress_callback: (allow-none): function to callback with progress information, or %NULL if progress information is not needed
+ * @progress_callback_data: (closure): user data to pass to @progress_callback
+ * @callback: a #GAsyncReadyCallback to call when the request is satisfied
+ * @user_data: the data to pass to callback function
+ *
+ * Copies the file @source to the location specified by @destination
+ * asynchronously. For details of the behaviour, see g_file_copy().
+ *
+ * If @progress_callback is not %NULL, then that function that will be called
+ * just like in g_file_copy(), however the callback will run in the main loop,
+ * not in the thread that is doing the I/O operation.
+ *
+ * When the operation is finished, @callback will be called. You can then call
+ * g_file_copy_finish() to get the result of the operation.
+ */
+
+
+/**
+ * g_file_copy_attributes:
+ * @source: a #GFile with attributes.
+ * @destination: a #GFile to copy attributes to.
+ * @flags: a set of #GFileCopyFlags.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, %NULL to ignore.
+ *
+ * Copies the file attributes from @source to @destination.
+ *
+ * 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 #G_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.
+ *
+ * Returns: %TRUE if the attributes were copied successfully, %FALSE otherwise.
+ */
+
+
+/**
+ * g_file_copy_finish:
+ * @file: input #GFile.
+ * @res: a #GAsyncResult.
+ * @error: a #GError, or %NULL
+ *
+ * Finishes copying the file started with
+ * g_file_copy_async().
+ *
+ * Returns: a %TRUE on success, %FALSE on error.
+ */
+
+
+/**
+ * g_file_create:
+ * @file: input #GFile.
+ * @flags: a set of #GFileCreateFlags.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, or %NULL
+ *
+ * Creates a new file and returns an output stream for writing to it.
+ * The file must not already exist.
+ *
+ * By default files created are generally readable by everyone,
+ * but if you pass #G_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.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * If a file or directory with this name already exists the G_IO_ERROR_EXISTS
+ * error will be returned.
+ * Some file systems don't allow all file names, and may
+ * return an G_IO_ERROR_INVALID_FILENAME error, and if the name
+ * is to long G_IO_ERROR_FILENAME_TOO_LONG will be returned.
+ * Other errors are possible too, and depend on what kind of
+ * filesystem the file is on.
+ *
+ * %NULL on error.
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GFileOutputStream for the newly created file, or
+ */
+
+
+/**
+ * g_file_create_async:
+ * @file: input #GFile.
+ * @flags: a set of #GFileCreateFlags.
+ * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Asynchronously creates a new file and returns an output stream for writing to it.
+ * The file must not already exist.
+ *
+ * For more details, see g_file_create() which is
+ * the synchronous version of this call.
+ *
+ * When the operation is finished, @callback will be called. You can then call
+ * g_file_create_finish() to get the result of the operation.
+ */
+
+
+/**
+ * g_file_create_finish:
+ * @file: input #GFile.
+ * @res: a #GAsyncResult.
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous file create operation started with
+ * g_file_create_async().
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GFileOutputStream or %NULL on error.
+ */
+
+
+/**
+ * g_file_create_readwrite:
+ * @file: a #GFile
+ * @flags: a set of #GFileCreateFlags
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
+ * @error: return location for a #GError, or %NULL
+ *
+ * Creates a new file and returns a stream for reading and writing to it.
+ * The file must not already exist.
+ *
+ * By default files created are generally readable by everyone,
+ * but if you pass #G_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.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * If a file or directory with this name already exists the %G_IO_ERROR_EXISTS
+ * error will be returned. Some file systems don't allow all file names,
+ * and may return an %G_IO_ERROR_INVALID_FILENAME error, and if the name
+ * is too long, %G_IO_ERROR_FILENAME_TOO_LONG will be returned. Other errors
+ * are possible too, and depend on what kind of filesystem the file is on.
+ *
+ * Note that in many non-local file cases read and write streams are not
+ * supported, so make sure you really need to do read and write streaming,
+ * rather than just opening for reading or writing.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GFileIOStream for the newly created file, or %NULL on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_file_create_readwrite_async:
+ * @file: input #GFile
+ * @flags: a set of #GFileCreateFlags
+ * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Asynchronously creates a new file and returns a stream for reading and
+ * writing to it. The file must not already exist.
+ *
+ * For more details, see g_file_create_readwrite() which is
+ * the synchronous version of this call.
+ *
+ * When the operation is finished, @callback will be called. You can then
+ * call g_file_create_readwrite_finish() to get the result of the operation.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_file_create_readwrite_finish:
+ * @file: input #GFile
+ * @res: a #GAsyncResult
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous file create operation started with
+ * g_file_create_readwrite_async().
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GFileIOStream or %NULL on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_file_delete:
+ * @file: input #GFile.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, or %NULL
+ *
+ * Deletes a file. If the @file is a directory, it will only be deleted if it
+ * is empty.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * Virtual: delete_file
+ * Returns: %TRUE if the file was deleted. %FALSE otherwise.
+ */
+
+
+/**
+ * g_file_descriptor_based_get_fd:
+ * @fd_based: a #GFileDescriptorBased.
+ *
+ * Gets the underlying file descriptor.
+ *
+ * Returns: The file descriptor
+ * Since: 2.24
+ */
+
+
+/**
+ * g_file_dup:
+ * @file: input #GFile.
+ *
+ * Duplicates a #GFile handle. This operation does not duplicate
+ * the actual file or directory represented by the #GFile; see
+ * g_file_copy() if attempting to copy a file.
+ *
+ * This call does no blocking i/o.
+ *
+ * Returns: (transfer full): a new #GFile that is a duplicate of the given #GFile.
+ */
+
+
+/**
+ * g_file_eject_mountable:
+ * @file: input #GFile.
+ * @flags: flags affecting the operation
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async) (allow-none): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * 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
+ * g_file_eject_mountable_finish().
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * Deprecated: 2.22: Use g_file_eject_mountable_with_operation() instead.
+ */
+
+
+/**
+ * g_file_eject_mountable_finish:
+ * @file: input #GFile.
+ * @result: a #GAsyncResult.
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous eject operation started by
+ * g_file_eject_mountable().
+ *
+ * otherwise.
+ *
+ * Returns: %TRUE if the @file was ejected successfully. %FALSE
+ * Deprecated: 2.22: Use g_file_eject_mountable_with_operation_finish() instead.
+ */
+
+
+/**
+ * g_file_eject_mountable_with_operation:
+ * @file: input #GFile.
+ * @flags: flags affecting the operation
+ * @mount_operation: (allow-none): a #GMountOperation, or %NULL to avoid user interaction.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async) (allow-none): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * 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
+ * g_file_eject_mountable_with_operation_finish().
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_file_eject_mountable_with_operation_finish:
+ * @file: input #GFile.
+ * @result: a #GAsyncResult.
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous eject operation started by
+ * g_file_eject_mountable_with_operation().
+ *
+ * otherwise.
+ *
+ * Returns: %TRUE if the @file was ejected successfully. %FALSE
+ * Since: 2.22
+ */
+
+
+/**
+ * g_file_enumerate_children:
+ * @file: input #GFile.
+ * @attributes: an attribute query string.
+ * @flags: a set of #GFileQueryInfoFlags.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: #GError for error reporting.
+ *
+ * Gets the requested information about the files in a directory. The result
+ * is a #GFileEnumerator object that will give out #GFileInfo objects for
+ * all the files in the directory.
+ *
+ * The @attributes 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. @attributes should
+ * be a comma-separated list of attributes 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 #G_FILE_ATTRIBUTE_STANDARD_NAME.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
+ * If the file is not a directory, the G_FILE_ERROR_NOTDIR error will be returned.
+ * Other errors are possible too.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): A #GFileEnumerator if successful, %NULL on error.
+ */
+
+
+/**
+ * g_file_enumerate_children_async:
+ * @file: input #GFile.
+ * @attributes: an attribute query string.
+ * @flags: a set of #GFileQueryInfoFlags.
+ * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Asynchronously gets the requested information about the files in a directory. The result
+ * is a #GFileEnumerator object that will give out #GFileInfo objects for
+ * all the files in the directory.
+ *
+ * For more details, see g_file_enumerate_children() which is
+ * the synchronous version of this call.
+ *
+ * When the operation is finished, @callback will be called. You can then call
+ * g_file_enumerate_children_finish() to get the result of the operation.
+ */
+
+
+/**
+ * g_file_enumerate_children_finish:
+ * @file: input #GFile.
+ * @res: a #GAsyncResult.
+ * @error: a #GError.
+ *
+ * Finishes an async enumerate children operation.
+ * See g_file_enumerate_children_async().
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GFileEnumerator or %NULL if an error occurred.
+ */
+
+
+/**
+ * g_file_enumerator_close:
+ * @enumerator: a #GFileEnumerator.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: location to store the error occurring, or %NULL to ignore
+ *
+ * Releases all resources used by this enumerator, making the
+ * enumerator return %G_IO_ERROR_CLOSED on all calls.
+ *
+ * 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.
+ *
+ * Returns: #TRUE on success or #FALSE on error.
+ */
+
+
+/**
+ * g_file_enumerator_close_async:
+ * @enumerator: a #GFileEnumerator.
+ * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Asynchronously closes the file enumerator.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned in
+ * g_file_enumerator_close_finish().
+ */
+
+
+/**
+ * g_file_enumerator_close_finish:
+ * @enumerator: a #GFileEnumerator.
+ * @result: a #GAsyncResult.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Finishes closing a file enumerator, started from g_file_enumerator_close_async().
+ *
+ * If the file enumerator was already closed when g_file_enumerator_close_async()
+ * was called, then this function will report %G_IO_ERROR_CLOSED in @error, and
+ * return %FALSE. If the file enumerator had pending operation when the close
+ * operation was started, then this function will report %G_IO_ERROR_PENDING, and
+ * return %FALSE.  If @cancellable was not %NULL, then the operation may have been
+ * cancelled by triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %FALSE will be
+ * returned.
+ *
+ * Returns: %TRUE if the close operation has finished successfully.
+ */
+
+
+/**
+ * g_file_enumerator_get_container:
+ * @enumerator: a #GFileEnumerator
+ *
+ * Get the #GFile container which is being enumerated.
+ *
+ * Returns: (transfer none): the #GFile which is being enumerated.
+ * Since: 2.18
+ */
+
+
+/**
+ * g_file_enumerator_has_pending:
+ * @enumerator: a #GFileEnumerator.
+ *
+ * Checks if the file enumerator has pending operations.
+ *
+ * Returns: %TRUE if the @enumerator has pending operations.
+ */
+
+
+/**
+ * g_file_enumerator_is_closed:
+ * @enumerator: a #GFileEnumerator.
+ *
+ * Checks if the file enumerator has been closed.
+ *
+ * Returns: %TRUE if the @enumerator is closed.
+ */
+
+
+/**
+ * g_file_enumerator_next_file:
+ * @enumerator: a #GFileEnumerator.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: location to store the error occurring, or %NULL to ignore
+ *
+ * Returns information for the next file in the enumerated object.
+ * Will block until the information is available. The #GFileInfo
+ * returned from this function will contain attributes that match the
+ * attribute string that was passed when the #GFileEnumerator was created.
+ *
+ * On error, returns %NULL and sets @error to the error. If the
+ * enumerator is at the end, %NULL will be returned and @error will
+ * be unset.
+ *
+ * Free the returned object with g_object_unref() when no longer needed.
+ *
+ * Returns: (transfer full): A #GFileInfo or %NULL on error or end of enumerator.
+ */
+
+
+/**
+ * g_file_enumerator_next_files_async:
+ * @enumerator: a #GFileEnumerator.
+ * @num_files: the number of file info objects to request
+ * @io_priority: the <link linkend="gioscheduler">io priority</link> of the request.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Request 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.
+ *
+ * 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 %G_IO_ERROR_CANCELLED.
+ *
+ * During an async request no other sync and async calls are allowed, and will
+ * result in %G_IO_ERROR_PENDING errors.
+ *
+ * Any outstanding i/o request with higher priority (lower numerical value) will
+ * be executed before an outstanding request with lower priority. Default
+ * priority is %G_PRIORITY_DEFAULT.
+ */
+
+
+/**
+ * g_file_enumerator_next_files_finish:
+ * @enumerator: a #GFileEnumerator.
+ * @result: a #GAsyncResult.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Finishes the asynchronous operation started with g_file_enumerator_next_files_async().
+ *
+ * g_list_free() and unref the infos with g_object_unref() when you're
+ * done with them.
+ *
+ * Returns: (transfer full) (element-type Gio.FileInfo): a #GList of #GFileInfo<!---->s. You must free the list with
+ */
+
+
+/**
+ * g_file_enumerator_set_pending:
+ * @enumerator: a #GFileEnumerator.
+ * @pending: a boolean value.
+ *
+ * Sets the file enumerator as having pending operations.
+ */
+
+
+/**
+ * g_file_equal:
+ * @file1: the first #GFile.
+ * @file2: the second #GFile.
+ *
+ * Checks equality of two given #GFile<!-- -->s. Note that two
+ * #GFile<!-- -->s that differ can still refer to the same
+ * file on the filesystem due to various forms of filename
+ * aliasing.
+ *
+ * This call does no blocking i/o.
+ *
+ * %FALSE if either is not a #GFile.
+ *
+ * Returns: %TRUE if @file1 and @file2 are equal.
+ */
+
+
+/**
+ * g_file_find_enclosing_mount:
+ * @file: input #GFile.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError.
+ *
+ * Gets a #GMount for the #GFile.
+ *
+ * If the #GFileIface for @file does not have a mount (e.g. possibly a
+ * remote share), @error will be set to %G_IO_ERROR_NOT_FOUND and %NULL
+ * will be returned.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GMount where the @file is located or %NULL on error.
+ */
+
+
+/**
+ * g_file_find_enclosing_mount_async:
+ * @file: a #GFile
+ * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Asynchronously gets the mount for the file.
+ *
+ * For more details, see g_file_find_enclosing_mount() which is
+ * the synchronous version of this call.
+ *
+ * When the operation is finished, @callback will be called. You can then call
+ * g_file_find_enclosing_mount_finish() to get the result of the operation.
+ */
+
+
+/**
+ * g_file_find_enclosing_mount_finish:
+ * @file: a #GFile
+ * @res: a #GAsyncResult
+ * @error: a #GError
+ *
+ * Finishes an asynchronous find mount request.
+ * See g_file_find_enclosing_mount_async().
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): #GMount for given @file or %NULL on error.
+ */
+
+
+/**
+ * g_file_get_basename:
+ * @file: input #GFile.
+ *
+ * Gets the base name (the last component of the path) for a given #GFile.
+ *
+ * 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).
+ *
+ * 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 %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME
+ * attribute with g_file_query_info().
+ *
+ * This call does no blocking i/o.
+ *
+ * if given #GFile is invalid. The returned string should be
+ * freed with g_free() when no longer needed.
+ *
+ * Returns: string containing the #GFile's base name, or %NULL
+ */
+
+
+/**
+ * g_file_get_child:
+ * @file: input #GFile.
+ * @name: string containing the child's basename.
+ *
+ * Gets a child of @file with basename equal to @name.
+ *
+ * Note that the file with that specific name might not exist, but
+ * you can still have a #GFile that points to it. You can use this
+ * for instance to create that file.
+ *
+ * This call does no blocking i/o.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GFile to a child specified by @name.
+ */
+
+
+/**
+ * g_file_get_child_for_display_name:
+ * @file: input #GFile.
+ * @display_name: string to a possible child.
+ * @error: #GError.
+ *
+ * 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.
+ *
+ * This call does no blocking i/o.
+ *
+ * %NULL if the display name couldn't be converted.
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GFile to the specified child, or
+ */
+
+
+/**
+ * g_file_get_parent:
+ * @file: input #GFile.
+ *
+ * Gets the parent directory for the @file.
+ * If the @file represents the root directory of the
+ * file system, then %NULL will be returned.
+ *
+ * This call does no blocking i/o.
+ *
+ * #GFile or %NULL if there is no parent.
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GFile structure to the parent of the given
+ */
+
+
+/**
+ * g_file_get_parse_name:
+ * @file: input #GFile.
+ *
+ * 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 #GFile back using
+ * g_file_parse_name().
+ *
+ * This is generally used to show the #GFile as a nice
+ * full-pathname kind of string in a user interface,
+ * like in a location entry.
+ *
+ * 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).
+ *
+ * This call does no blocking i/o.
+ *
+ * string should be freed with g_free() when no longer needed.
+ *
+ * Returns: a string containing the #GFile's parse name. The returned
+ */
+
+
+/**
+ * g_file_get_path:
+ * @file: input #GFile.
+ *
+ * Gets the local pathname for #GFile, if one exists.
+ *
+ * This call does no blocking i/o.
+ *
+ * no such path exists. The returned string should be
+ * freed with g_free() when no longer needed.
+ *
+ * Returns: string containing the #GFile's path, or %NULL if
+ */
+
+
+/**
+ * g_file_get_relative_path:
+ * @parent: input #GFile.
+ * @descendant: input #GFile.
+ *
+ * Gets the path for @descendant relative to @parent.
+ *
+ * This call does no blocking i/o.
+ *
+ * to @parent, or %NULL if @descendant doesn't have @parent as prefix.
+ * The returned string should be freed with g_free() when no longer needed.
+ *
+ * Returns: string with the relative path from @descendant
+ */
+
+
+/**
+ * g_file_get_uri:
+ * @file: input #GFile.
+ *
+ * Gets the URI for the @file.
+ *
+ * This call does no blocking i/o.
+ *
+ * The returned string should be freed with g_free() when no longer needed.
+ *
+ * Returns: a string containing the #GFile's URI.
+ */
+
+
+/**
+ * g_file_get_uri_scheme:
+ * @file: input #GFile.
+ *
+ * Gets the URI scheme for a #GFile.
+ * RFC 3986 decodes the scheme as:
+ * <programlisting>
+ * URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
+ * </programlisting>
+ * Common schemes include "file", "http", "ftp", etc.
+ *
+ * This call does no blocking i/o.
+ *
+ * #GFile. The returned string should be freed with g_free()
+ * when no longer needed.
+ *
+ * Returns: a string containing the URI scheme for the given
+ */
+
+
+/**
+ * g_file_has_parent:
+ * @file: input #GFile
+ * @parent: (allow-none): the parent to check for, or %NULL
+ *
+ * Checks if @file has a parent, and optionally, if it is @parent.
+ *
+ * If @parent is %NULL then this function returns %TRUE if @file has any
+ * parent at all.  If @parent is non-%NULL then %TRUE is only returned
+ * if @file is a child of @parent.
+ *
+ * case that @parent is %NULL).
+ *
+ * Returns: %TRUE if @file is a child of @parent (or any parent in the
+ * Since: 2.24
+ */
+
+
+/**
+ * g_file_has_prefix:
+ * @file: input #GFile.
+ * @prefix: input #GFile.
+ *
+ * Checks whether @file has the prefix specified by @prefix. In other word,
+ * if the names of initial elements of @file<!-- -->s 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.
+ *
+ * This call does no i/o, as it works purely on names. As such it can
+ * sometimes return %FALSE even if @file is inside a @prefix (from a
+ * filesystem point of view), because the prefix of @file is an alias
+ * of @prefix.
+ *
+ * %FALSE otherwise.
+ *
+ * Virtual: prefix_matches
+ * Returns: %TRUE if the @files's parent, grandparent, etc is @prefix.
+ */
+
+
+/**
+ * g_file_has_uri_scheme:
+ * @file: input #GFile.
+ * @uri_scheme: a string containing a URI scheme.
+ *
+ * Checks to see if a #GFile has a given URI scheme.
+ *
+ * This call does no blocking i/o.
+ *
+ * given URI scheme, %FALSE if URI scheme is %NULL,
+ * not supported, or #GFile is invalid.
+ *
+ * Returns: %TRUE if #GFile's backend supports the
+ */
+
+
+/**
+ * g_file_hash:
+ * @file: (type GFile): #gconstpointer to a #GFile.
+ *
+ * Creates a hash value for a #GFile.
+ *
+ * This call does no blocking i/o.
+ *
+ * integer that can be used as hash value for the #GFile.
+ * This function is intended for easily hashing a #GFile to
+ * add to a #GHashTable or similar data structure.
+ *
+ * Virtual: hash
+ * Returns: 0 if @file is not a valid #GFile, otherwise an
+ */
+
+
+/**
+ * g_file_icon_get_file:
+ * @icon: a #GIcon.
+ *
+ * Gets the #GFile associated with the given @icon.
+ *
+ * Returns: (transfer none): a #GFile, or %NULL.
+ */
+
+
+/**
+ * g_file_icon_new:
+ * @file: a #GFile.
+ *
+ * Creates a new icon for a file.
+ *
+ * @file, or %NULL on error.
+ *
+ * Returns: (transfer full) (type GFileIcon): a #GIcon for the given
+ */
+
+
+/**
+ * g_file_info_clear_status:
+ * @info: a #GFileInfo.
+ *
+ * Clears the status information from @info.
+ */
+
+
+/**
+ * g_file_info_copy_into:
+ * @src_info: source to copy attributes from.
+ * @dest_info: destination to copy attributes to.
+ *
+ * Copies all of the <link linkend="gio-GFileAttribute">GFileAttribute</link>s
+ * from @src_info to @dest_info.
+ */
+
+
+/**
+ * g_file_info_dup:
+ * @other: a #GFileInfo.
+ *
+ * Duplicates a file info structure.
+ *
+ * Returns: (transfer full): a duplicate #GFileInfo of @other.
+ */
+
+
+/**
+ * g_file_info_get_attribute_as_string:
+ * @info: a #GFileInfo.
+ * @attribute: a file attribute key.
+ *
+ * Gets the value of a attribute, formated as a string.
+ * This escapes things as needed to make the string valid
+ * utf8.
+ *
+ * When you're done with the string it must be freed with g_free().
+ *
+ * Returns: a UTF-8 string associated with the given @attribute.
+ */
+
+
+/**
+ * g_file_info_get_attribute_boolean:
+ * @info: a #GFileInfo.
+ * @attribute: a file attribute key.
+ *
+ * Gets the value of a boolean attribute. If the attribute does not
+ * contain a boolean value, %FALSE will be returned.
+ *
+ * Returns: the boolean value contained within the attribute.
+ */
+
+
+/**
+ * g_file_info_get_attribute_byte_string:
+ * @info: a #GFileInfo.
+ * @attribute: a file attribute key.
+ *
+ * Gets the value of a byte string attribute. If the attribute does
+ * not contain a byte string, %NULL will be returned.
+ *
+ * %NULL otherwise.
+ *
+ * Returns: the contents of the @attribute value as a byte string, or
+ */
+
+
+/**
+ * g_file_info_get_attribute_data:
+ * @info: a #GFileInfo
+ * @attribute: a file attribute key
+ * @type: (out) (allow-none): return location for the attribute type, or %NULL
+ * @value_pp: (out) (allow-none): return location for the attribute value, or %NULL
+ * @status: (out) (allow-none): return location for the attribute status, or %NULL
+ *
+ * Gets the attribute type, value and status for an attribute key.
+ *
+ * %FALSE otherwise.
+ *
+ * Returns: (transfer none): %TRUE if @info has an attribute named @attribute,
+ */
+
+
+/**
+ * g_file_info_get_attribute_int32:
+ * @info: a #GFileInfo.
+ * @attribute: a file attribute key.
+ *
+ * Gets a signed 32-bit integer contained within the attribute. If the
+ * attribute does not contain a signed 32-bit integer, or is invalid,
+ * 0 will be returned.
+ *
+ * Returns: a signed 32-bit integer from the attribute.
+ */
+
+
+/**
+ * g_file_info_get_attribute_int64:
+ * @info: a #GFileInfo.
+ * @attribute: a file attribute key.
+ *
+ * Gets a signed 64-bit integer contained within the attribute. If the
+ * attribute does not contain an signed 64-bit integer, or is invalid,
+ * 0 will be returned.
+ *
+ * Returns: a signed 64-bit integer from the attribute.
+ */
+
+
+/**
+ * g_file_info_get_attribute_object:
+ * @info: a #GFileInfo.
+ * @attribute: a file attribute key.
+ *
+ * Gets the value of a #GObject attribute. If the attribute does
+ * not contain a #GObject, %NULL will be returned.
+ *
+ * %NULL otherwise.
+ *
+ * Returns: (transfer none): a #GObject associated with the given @attribute, or
+ */
+
+
+/**
+ * g_file_info_get_attribute_status:
+ * @info: a #GFileInfo
+ * @attribute: a file attribute key
+ *
+ * Gets the attribute status for an attribute key.
+ *
+ * %G_FILE_ATTRIBUTE_STATUS_UNSET if the key is invalid.
+ *
+ * Returns: a #GFileAttributeStatus for the given @attribute, or
+ */
+
+
+/**
+ * g_file_info_get_attribute_string:
+ * @info: a #GFileInfo.
+ * @attribute: a file attribute key.
+ *
+ * Gets the value of a string attribute. If the attribute does
+ * not contain a string, %NULL will be returned.
+ *
+ * %NULL otherwise.
+ *
+ * Returns: the contents of the @attribute value as a UTF-8 string, or
+ */
+
+
+/**
+ * g_file_info_get_attribute_stringv:
+ * @info: a #GFileInfo.
+ * @attribute: a file attribute key.
+ *
+ * Gets the value of a stringv attribute. If the attribute does
+ * not contain a stringv, %NULL will be returned.
+ *
+ * %NULL otherwise. Do not free. These returned strings are UTF-8.
+ *
+ * Returns: (transfer none): the contents of the @attribute value as a stringv, or
+ * Since: 2.22
+ */
+
+
+/**
+ * g_file_info_get_attribute_type:
+ * @info: a #GFileInfo.
+ * @attribute: a file attribute key.
+ *
+ * Gets the attribute type for an attribute key.
+ *
+ * %G_FILE_ATTRIBUTE_TYPE_INVALID if the key is not set.
+ *
+ * Returns: a #GFileAttributeType for the given @attribute, or
+ */
+
+
+/**
+ * g_file_info_get_attribute_uint32:
+ * @info: a #GFileInfo.
+ * @attribute: a file attribute key.
+ *
+ * Gets an unsigned 32-bit integer contained within the attribute. If the
+ * attribute does not contain an unsigned 32-bit integer, or is invalid,
+ * 0 will be returned.
+ *
+ * Returns: an unsigned 32-bit integer from the attribute.
+ */
+
+
+/**
+ * g_file_info_get_attribute_uint64:
+ * @info: a #GFileInfo.
+ * @attribute: a file attribute key.
+ *
+ * Gets a unsigned 64-bit integer contained within the attribute. If the
+ * attribute does not contain an unsigned 64-bit integer, or is invalid,
+ * 0 will be returned.
+ *
+ * Returns: a unsigned 64-bit integer from the attribute.
+ */
+
+
+/**
+ * g_file_info_get_content_type:
+ * @info: a #GFileInfo.
+ *
+ * Gets the file's content type.
+ *
+ * Returns: a string containing the file's content type.
+ */
+
+
+/**
+ * g_file_info_get_display_name:
+ * @info: a #GFileInfo.
+ *
+ * Gets a display name for a file.
+ *
+ * Returns: a string containing the display name.
+ */
+
+
+/**
+ * g_file_info_get_edit_name:
+ * @info: a #GFileInfo.
+ *
+ * Gets the edit name for a file.
+ *
+ * Returns: a string containing the edit name.
+ */
+
+
+/**
+ * g_file_info_get_etag:
+ * @info: a #GFileInfo.
+ *
+ * Gets the <link linkend="gfile-etag">entity tag</link> for a given
+ * #GFileInfo. See %G_FILE_ATTRIBUTE_ETAG_VALUE.
+ *
+ * Returns: a string containing the value of the "etag:value" attribute.
+ */
+
+
+/**
+ * g_file_info_get_file_type:
+ * @info: a #GFileInfo.
+ *
+ * Gets a file's type (whether it is a regular file, symlink, etc).
+ * This is different from the file's content type, see g_file_info_get_content_type().
+ *
+ * Returns: a #GFileType for the given file.
+ */
+
+
+/**
+ * g_file_info_get_icon:
+ * @info: a #GFileInfo.
+ *
+ * Gets the icon for a file.
+ *
+ * Returns: (transfer none): #GIcon for the given @info.
+ */
+
+
+/**
+ * g_file_info_get_is_backup:
+ * @info: a #GFileInfo.
+ *
+ * Checks if a file is a backup file.
+ *
+ * Returns: %TRUE if file is a backup file, %FALSE otherwise.
+ */
+
+
+/**
+ * g_file_info_get_is_hidden:
+ * @info: a #GFileInfo.
+ *
+ * Checks if a file is hidden.
+ *
+ * Returns: %TRUE if the file is a hidden file, %FALSE otherwise.
+ */
+
+
+/**
+ * g_file_info_get_is_symlink:
+ * @info: a #GFileInfo.
+ *
+ * Checks if a file is a symlink.
+ *
+ * Returns: %TRUE if the given @info is a symlink.
+ */
+
+
+/**
+ * g_file_info_get_modification_time:
+ * @info: a #GFileInfo.
+ * @result: (out caller-allocates): a #GTimeVal.
+ *
+ * Gets the modification time of the current @info and sets it
+ * in @result.
+ */
+
+
+/**
+ * g_file_info_get_name:
+ * @info: a #GFileInfo.
+ *
+ * Gets the name for a file.
+ *
+ * Returns: a string containing the file name.
+ */
+
+
+/**
+ * g_file_info_get_size:
+ * @info: a #GFileInfo.
+ *
+ * Gets the file's size.
+ *
+ * Returns: a #goffset containing the file's size.
+ */
+
+
+/**
+ * g_file_info_get_sort_order:
+ * @info: a #GFileInfo.
+ *
+ * Gets the value of the sort_order attribute from the #GFileInfo.
+ * See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
+ *
+ * Returns: a #gint32 containing the value of the "standard::sort_order" attribute.
+ */
+
+
+/**
+ * g_file_info_get_symlink_target:
+ * @info: a #GFileInfo.
+ *
+ * Gets the symlink target for a given #GFileInfo.
+ *
+ * Returns: a string containing the symlink target.
+ */
+
+
+/**
+ * g_file_info_has_attribute:
+ * @info: a #GFileInfo.
+ * @attribute: a file attribute key.
+ *
+ * Checks if a file info structure has an attribute named @attribute.
+ *
+ * %FALSE otherwise.
+ *
+ * Returns: %TRUE if @Ginfo has an attribute named @attribute,
+ */
+
+
+/**
+ * g_file_info_has_namespace:
+ * @info: a #GFileInfo.
+ * @name_space: a file attribute namespace.
+ *
+ * Checks if a file info structure has an attribute in the
+ * specified @name_space.
+ *
+ * %FALSE otherwise.
+ *
+ * Returns: %TRUE if @Ginfo has an attribute in @name_space,
+ * Since: 2.22
+ */
+
+
+/**
+ * g_file_info_list_attributes:
+ * @info: a #GFileInfo.
+ * @name_space: a file attribute key's namespace.
+ *
+ * Lists the file info structure's attributes.
+ *
+ * possible attribute types for the given @name_space, or
+ * %NULL on error.
+ *
+ * Returns: (array zero-terminated=1) (transfer full): a null-terminated array of strings of all of the
+ */
+
+
+/**
+ * g_file_info_new:
+ *
+ * Creates a new file info structure.
+ *
+ * Returns: a #GFileInfo.
+ */
+
+
+/**
+ * g_file_info_remove_attribute:
+ * @info: a #GFileInfo.
+ * @attribute: a file attribute key.
+ *
+ * Removes all cases of @attribute from @info if it exists.
+ */
+
+
+/**
+ * g_file_info_set_attribute:
+ * @info: a #GFileInfo.
+ * @attribute: a file attribute key.
+ * @type: a #GFileAttributeType
+ * @value_p: pointer to the value
+ *
+ * Sets the @attribute to contain the given value, if possible. To unset the
+ * attribute, use %G_ATTRIBUTE_TYPE_INVALID for @type.
+ */
+
+
+/**
+ * g_file_info_set_attribute_boolean:
+ * @info: a #GFileInfo.
+ * @attribute: a file attribute key.
+ * @attr_value: a boolean value.
+ *
+ * Sets the @attribute to contain the given @attr_value,
+ * if possible.
+ */
+
+
+/**
+ * g_file_info_set_attribute_byte_string:
+ * @info: a #GFileInfo.
+ * @attribute: a file attribute key.
+ * @attr_value: a byte string.
+ *
+ * Sets the @attribute to contain the given @attr_value,
+ * if possible.
+ */
+
+
+/**
+ * g_file_info_set_attribute_int32:
+ * @info: a #GFileInfo.
+ * @attribute: a file attribute key.
+ * @attr_value: a signed 32-bit integer
+ *
+ * Sets the @attribute to contain the given @attr_value,
+ * if possible.
+ */
+
+
+/**
+ * g_file_info_set_attribute_int64:
+ * @info: a #GFileInfo.
+ * @attribute: attribute name to set.
+ * @attr_value: int64 value to set attribute to.
+ *
+ * Sets the @attribute to contain the given @attr_value,
+ * if possible.
+ */
+
+
+/**
+ * g_file_info_set_attribute_mask:
+ * @info: a #GFileInfo.
+ * @mask: a #GFileAttributeMatcher.
+ *
+ * Sets @mask on @info to match specific attribute types.
+ */
+
+
+/**
+ * g_file_info_set_attribute_object:
+ * @info: a #GFileInfo.
+ * @attribute: a file attribute key.
+ * @attr_value: a #GObject.
+ *
+ * Sets the @attribute to contain the given @attr_value,
+ * if possible.
+ */
+
+
+/**
+ * g_file_info_set_attribute_status:
+ * @info: a #GFileInfo
+ * @attribute: a file attribute key
+ * @status: a #GFileAttributeStatus
+ *
+ * Sets the attribute status for an attribute key. This is only
+ * needed by external code that implement g_file_set_attributes_from_info()
+ * or similar functions.
+ *
+ * The attribute must exist in @info for this to work. Otherwise %FALSE
+ * is returned and @info is unchanged.
+ *
+ * Returns: %TRUE if the status was changed, %FALSE if the key was not set.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_file_info_set_attribute_string:
+ * @info: a #GFileInfo.
+ * @attribute: a file attribute key.
+ * @attr_value: a UTF-8 string.
+ *
+ * Sets the @attribute to contain the given @attr_value,
+ * if possible.
+ */
+
+
+/**
+ * g_file_info_set_attribute_stringv:
+ * @info: a #GFileInfo.
+ * @attribute: a file attribute key
+ * @attr_value: (array) (element-type utf8): a %NULL terminated array of UTF-8 strings.
+ *
+ * Sets the @attribute to contain the given @attr_value,
+ * if possible.
+ *
+ * Sinze: 2.22
+ */
+
+
+/**
+ * g_file_info_set_attribute_uint32:
+ * @info: a #GFileInfo.
+ * @attribute: a file attribute key.
+ * @attr_value: an unsigned 32-bit integer.
+ *
+ * Sets the @attribute to contain the given @attr_value,
+ * if possible.
+ */
+
+
+/**
+ * g_file_info_set_attribute_uint64:
+ * @info: a #GFileInfo.
+ * @attribute: a file attribute key.
+ * @attr_value: an unsigned 64-bit integer.
+ *
+ * Sets the @attribute to contain the given @attr_value,
+ * if possible.
+ */
+
+
+/**
+ * g_file_info_set_content_type:
+ * @info: a #GFileInfo.
+ * @content_type: a content type. See <link linkend="gio-GContentType">GContentType</link>.
+ *
+ * Sets the content type attribute for a given #GFileInfo.
+ * See %G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE.
+ */
+
+
+/**
+ * g_file_info_set_display_name:
+ * @info: a #GFileInfo.
+ * @display_name: a string containing a display name.
+ *
+ * Sets the display name for the current #GFileInfo.
+ * See %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.
+ */
+
+
+/**
+ * g_file_info_set_edit_name:
+ * @info: a #GFileInfo.
+ * @edit_name: a string containing an edit name.
+ *
+ * Sets the edit name for the current file.
+ * See %G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME.
+ */
+
+
+/**
+ * g_file_info_set_file_type:
+ * @info: a #GFileInfo.
+ * @type: a #GFileType.
+ *
+ * Sets the file type in a #GFileInfo to @type.
+ * See %G_FILE_ATTRIBUTE_STANDARD_TYPE.
+ */
+
+
+/**
+ * g_file_info_set_icon:
+ * @info: a #GFileInfo.
+ * @icon: a #GIcon.
+ *
+ * Sets the icon for a given #GFileInfo.
+ * See %G_FILE_ATTRIBUTE_STANDARD_ICON.
+ */
+
+
+/**
+ * g_file_info_set_is_hidden:
+ * @info: a #GFileInfo.
+ * @is_hidden: a #gboolean.
+ *
+ * Sets the "is_hidden" attribute in a #GFileInfo according to @is_symlink.
+ * See %G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN.
+ */
+
+
+/**
+ * g_file_info_set_is_symlink:
+ * @info: a #GFileInfo.
+ * @is_symlink: a #gboolean.
+ *
+ * Sets the "is_symlink" attribute in a #GFileInfo according to @is_symlink.
+ * See %G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK.
+ */
+
+
+/**
+ * g_file_info_set_modification_time:
+ * @info: a #GFileInfo.
+ * @mtime: a #GTimeVal.
+ *
+ * Sets the %G_FILE_ATTRIBUTE_TIME_MODIFIED attribute in the file
+ * info to the given time value.
+ */
+
+
+/**
+ * g_file_info_set_name:
+ * @info: a #GFileInfo.
+ * @name: a string containing a name.
+ *
+ * Sets the name attribute for the current #GFileInfo.
+ * See %G_FILE_ATTRIBUTE_STANDARD_NAME.
+ */
+
+
+/**
+ * g_file_info_set_size:
+ * @info: a #GFileInfo.
+ * @size: a #goffset containing the file's size.
+ *
+ * Sets the %G_FILE_ATTRIBUTE_STANDARD_SIZE attribute in the file info
+ * to the given size.
+ */
+
+
+/**
+ * g_file_info_set_sort_order:
+ * @info: a #GFileInfo.
+ * @sort_order: a sort order integer.
+ *
+ * Sets the sort order attribute in the file info structure. See
+ * %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
+ */
+
+
+/**
+ * g_file_info_set_symlink_target:
+ * @info: a #GFileInfo.
+ * @symlink_target: a static string containing a path to a symlink target.
+ *
+ * Sets the %G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET attribute in the file info
+ * to the given symlink target.
+ */
+
+
+/**
+ * g_file_info_unset_attribute_mask:
+ * @info: #GFileInfo.
+ *
+ * Unsets a mask set by g_file_info_set_attribute_mask(), if one
+ * is set.
+ */
+
+
+/**
+ * g_file_input_stream_query_info:
+ * @stream: a #GFileInputStream.
+ * @attributes: a file attribute query string.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * 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 g_file_input_stream_query_info_async(). While the
+ * stream is blocked, the stream will set the pending flag internally, and
+ * any other operations on the stream will fail with %G_IO_ERROR_PENDING.
+ *
+ * Returns: (transfer full): a #GFileInfo, or %NULL on error.
+ */
+
+
+/**
+ * g_file_input_stream_query_info_async:
+ * @stream: a #GFileInputStream.
+ * @attributes: a file attribute query string.
+ * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async): callback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Queries the stream information asynchronously.
+ * When the operation is finished @callback will be called.
+ * You can then call g_file_input_stream_query_info_finish()
+ * to get the result of the operation.
+ *
+ * For the synchronous version of this function,
+ * see g_file_input_stream_query_info().
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be set
+ */
+
+
+/**
+ * g_file_input_stream_query_info_finish:
+ * @stream: a #GFileInputStream.
+ * @result: a #GAsyncResult.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Finishes an asynchronous info query operation.
+ *
+ * Returns: (transfer full): #GFileInfo.
+ */
+
+
+/**
+ * g_file_io_stream_get_etag:
+ * @stream: a #GFileIOStream.
+ *
+ * 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.
+ *
+ * Returns: the entity tag for the stream.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_file_io_stream_query_info:
+ * @stream: a #GFileIOStream.
+ * @attributes: a file attribute query string.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, %NULL to ignore.
+ *
+ * Queries a file io stream for the given @attributes.
+ * This function blocks while querying the stream. For the asynchronous
+ * version of this function, see g_file_io_stream_query_info_async().
+ * While the stream is blocked, the stream will set the pending flag
+ * internally, and any other operations on the stream will fail with
+ * %G_IO_ERROR_PENDING.
+ *
+ * Can fail if the stream was already closed (with @error being set to
+ * %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being
+ * set to %G_IO_ERROR_PENDING), or if querying info is not supported for
+ * the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). I
+ * all cases of failure, %NULL will be returned.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
+ * be returned.
+ *
+ * Returns: (transfer full): a #GFileInfo for the @stream, or %NULL on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_file_io_stream_query_info_async:
+ * @stream: a #GFileIOStream.
+ * @attributes: a file attribute query string.
+ * @io_priority: the <link linkend="gio-GIOScheduler">I/O priority</link> of the request.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async): callback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Asynchronously queries the @stream for a #GFileInfo. When completed,
+ * @callback will be called with a #GAsyncResult which can be used to
+ * finish the operation with g_file_io_stream_query_info_finish().
+ *
+ * For the synchronous version of this function, see
+ * g_file_io_stream_query_info().
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_file_io_stream_query_info_finish:
+ * @stream: a #GFileIOStream.
+ * @result: a #GAsyncResult.
+ * @error: a #GError, %NULL to ignore.
+ *
+ * Finalizes the asynchronous query started
+ * by g_file_io_stream_query_info_async().
+ *
+ * Returns: (transfer full): A #GFileInfo for the finished query.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_file_is_native:
+ * @file: input #GFile.
+ *
+ * Checks to see if a file is native to the platform.
+ *
+ * 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.
+ *
+ * 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 %FALSE, but g_file_get_path()
+ * will still return a native path.
+ *
+ * This call does no blocking i/o.
+ *
+ * Returns: %TRUE if file is native.
+ */
+
+
+/**
+ * g_file_load_contents:
+ * @file: input #GFile.
+ * @cancellable: optional #GCancellable object, %NULL to ignore.
+ * @contents: (out) (transfer full) (element-type guint8) (array length=length): a location to place the contents of the file.
+ * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
+ * @etag_out: (out) (allow-none): a location to place the current entity tag for the file, or %NULL if the entity tag is not needed
+ * @error: a #GError, or %NULL
+ *
+ * Loads the content of the file into memory. The data is always
+ * zero-terminated, but this is not included in the resultant @length.
+ * The returned @content should be freed with g_free() when no longer
+ * needed.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * %FALSE if there were errors.
+ *
+ * Returns: %TRUE if the @file's contents were successfully loaded.
+ */
+
+
+/**
+ * g_file_load_contents_async:
+ * @file: input #GFile.
+ * @cancellable: optional #GCancellable object, %NULL to ignore.
+ * @callback: a #GAsyncReadyCallback to call when the request is satisfied
+ * @user_data: the data to pass to callback function
+ *
+ * Starts an asynchronous load of the @file's contents.
+ *
+ * For more details, see g_file_load_contents() which is
+ * the synchronous version of this call.
+ *
+ * When the load operation has completed, @callback will be called
+ * with @user data. To finish the operation, call
+ * g_file_load_contents_finish() with the #GAsyncResult returned by
+ * the @callback.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ */
+
+
+/**
+ * g_file_load_contents_finish:
+ * @file: input #GFile.
+ * @res: a #GAsyncResult.
+ * @contents: (out) (transfer full) (element-type guint8) (array length=length): a location to place the contents of the file.
+ * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
+ * @etag_out: (out) (allow-none): a location to place the current entity tag for the file, or %NULL if the entity tag is not needed
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous load of the @file's contents.
+ * The contents are placed in @contents, and @length is set to the
+ * size of the @contents string. The @content should be freed with
+ * g_free() when no longer needed. If @etag_out is present, it will be
+ * set to the new entity tag for the @file.
+ *
+ * present, it will be set appropriately.
+ *
+ * Returns: %TRUE if the load was successful. If %FALSE and @error is
+ */
+
+
+/**
+ * g_file_load_partial_contents_async: (skip)
+ * @file: input #GFile.
+ * @cancellable: optional #GCancellable object, %NULL to ignore.
+ * @read_more_callback: a #GFileReadMoreCallback to receive partial data and to specify whether further data should be read.
+ * @callback: a #GAsyncReadyCallback to call when the request is satisfied
+ * @user_data: the data to pass to the callback functions.
+ *
+ * Reads the partial contents of a file. A #GFileReadMoreCallback should be
+ * used to stop reading from the file when appropriate, else this function
+ * will behave exactly as g_file_load_contents_async(). This operation
+ * can be finished by g_file_load_partial_contents_finish().
+ *
+ * Users of this function should be aware that @user_data is passed to
+ * both the @read_more_callback and the @callback.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ */
+
+
+/**
+ * g_file_load_partial_contents_finish:
+ * @file: input #GFile.
+ * @res: a #GAsyncResult.
+ * @contents: (out) (transfer full) (element-type guint8) (array length=length): a location to place the contents of the file.
+ * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
+ * @etag_out: (out) (allow-none): a location to place the current entity tag for the file, or %NULL if the entity tag is not needed
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous partial load operation that was started
+ * with g_file_load_partial_contents_async(). The data is always
+ * zero-terminated, but this is not included in the resultant @length.
+ * The returned @content should be freed with g_free() when no longer
+ * needed.
+ *
+ * present, it will be set appropriately.
+ *
+ * Returns: %TRUE if the load was successful. If %FALSE and @error is
+ */
+
+
+/**
+ * g_file_make_directory:
+ * @file: input #GFile.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, or %NULL
+ *
+ * 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 #GFile. To
+ * recursively create directories, see g_file_make_directory_with_parents().
+ * This function will fail if the parent directory does not exist, setting
+ * @error to %G_IO_ERROR_NOT_FOUND. If the file system doesn't support creating
+ * directories, this function will fail, setting @error to
+ * %G_IO_ERROR_NOT_SUPPORTED.
+ *
+ * For a local #GFile the newly created directory will have the default
+ * (current) ownership and permissions of the current process.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * Returns: %TRUE on successful creation, %FALSE otherwise.
+ */
+
+
+/**
+ * g_file_make_directory_with_parents:
+ * @file: input #GFile.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, or %NULL
+ *
+ * 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 %G_IO_ERROR_NOT_SUPPORTED. If the
+ * directory itself already exists, this function will fail setting @error
+ * to %G_IO_ERROR_EXISTS, unlike the similar g_mkdir_with_parents().
+ *
+ * For a local #GFile the newly created directories will have the default
+ * (current) ownership and permissions of the current process.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * otherwise.
+ *
+ * Returns: %TRUE if all directories have been successfully created, %FALSE
+ * Since: 2.18
+ */
+
+
+/**
+ * g_file_make_symbolic_link:
+ * @file: a #GFile with the name of the symlink to create
+ * @symlink_value: a string with the path for the target of the new symlink
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError.
+ *
+ * Creates a symbolic link named @file which contains the string
+ * @symlink_value.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * Returns: %TRUE on the creation of a new symlink, %FALSE otherwise.
+ */
+
+
+/**
+ * g_file_monitor:
+ * @file: input #GFile
+ * @flags: a set of #GFileMonitorFlags
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
+ * @error: a #GError, or %NULL
+ *
+ * Obtains a file or directory monitor for the given file, depending
+ * on the type of the file.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
+ * Since: 2.18
+ */
+
+
+/**
+ * g_file_monitor_cancel:
+ * @monitor: a #GFileMonitor.
+ *
+ * Cancels a file monitor.
+ *
+ * Returns: %TRUE if monitor was cancelled.
+ */
+
+
+/**
+ * g_file_monitor_directory:
+ * @file: input #GFile.
+ * @flags: a set of #GFileMonitorFlags.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, or %NULL.
+ *
+ * Obtains a directory monitor for the given file.
+ * This may fail if directory monitoring is not supported.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Virtual: monitor_dir
+ * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
+ */
+
+
+/**
+ * g_file_monitor_emit_event:
+ * @monitor: a #GFileMonitor.
+ * @child: a #GFile.
+ * @other_file: a #GFile.
+ * @event_type: a set of #GFileMonitorEvent flags.
+ *
+ * Emits the #GFileMonitor::changed signal if a change
+ * has taken place. Should be called from file monitor
+ * implementations only.
+ *
+ * The signal will be emitted from an idle handler (in the <link
+ * linkend="g-main-context-push-thread-default">thread-default main
+ * context</link>).
+ */
+
+
+/**
+ * g_file_monitor_file:
+ * @file: input #GFile.
+ * @flags: a set of #GFileMonitorFlags.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, or %NULL.
+ *
+ * Obtains a file monitor for the given file. If no file notification
+ * mechanism exists, then regular polling of the file is used.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
+ */
+
+
+/**
+ * g_file_monitor_is_cancelled:
+ * @monitor: a #GFileMonitor
+ *
+ * Returns whether the monitor is canceled.
+ *
+ * Returns: %TRUE if monitor is canceled. %FALSE otherwise.
+ */
+
+
+/**
+ * g_file_monitor_set_rate_limit:
+ * @monitor: a #GFileMonitor.
+ * @limit_msecs: a non-negative integer with the limit in milliseconds to poll for changes
+ *
+ * Sets the rate limit to which the @monitor will report
+ * consecutive change events to the same file.
+ */
+
+
+/**
+ * g_file_mount_enclosing_volume:
+ * @location: input #GFile.
+ * @flags: flags affecting the operation
+ * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (allow-none): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
+ * @user_data: the data to pass to callback function
+ *
+ * Starts a @mount_operation, mounting the volume that contains the file @location.
+ *
+ * When this operation has completed, @callback will be called with
+ * @user_user data, and the operation can be finalized with
+ * g_file_mount_enclosing_volume_finish().
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ */
+
+
+/**
+ * g_file_mount_enclosing_volume_finish:
+ * @location: input #GFile.
+ * @result: a #GAsyncResult.
+ * @error: a #GError, or %NULL
+ *
+ * Finishes a mount operation started by g_file_mount_enclosing_volume().
+ *
+ * has occurred, this function will return %FALSE and set @error
+ * appropriately if present.
+ *
+ * Returns: %TRUE if successful. If an error
+ */
+
+
+/**
+ * g_file_mount_mountable:
+ * @file: input #GFile.
+ * @flags: flags affecting the operation
+ * @mount_operation: (allow-none): a #GMountOperation, or %NULL to avoid user interaction.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async) (allow-none): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Mounts a file of type G_FILE_TYPE_MOUNTABLE.
+ * Using @mount_operation, you can request callbacks when, for instance,
+ * passwords are needed during authentication.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * When the operation is finished, @callback will be called. You can then call
+ * g_file_mount_mountable_finish() to get the result of the operation.
+ */
+
+
+/**
+ * g_file_mount_mountable_finish:
+ * @file: input #GFile.
+ * @result: a #GAsyncResult.
+ * @error: a #GError, or %NULL
+ *
+ * Finishes a mount operation. See g_file_mount_mountable() for details.
+ *
+ * Finish an asynchronous mount operation that was started
+ * with g_file_mount_mountable().
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GFile or %NULL on error.
+ */
+
+
+/**
+ * g_file_move:
+ * @source: #GFile pointing to the source location.
+ * @destination: #GFile pointing to the destination location.
+ * @flags: set of #GFileCopyFlags.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @progress_callback: (allow-none) (scope call): #GFileProgressCallback function for updates.
+ * @progress_callback_data: (closure): gpointer to user data for the callback function.
+ * @error: #GError for returning error conditions, or %NULL
+ *
+ * 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.
+ *
+ * If the flag #G_FILE_COPY_OVERWRITE is specified an already
+ * existing @destination file is overwritten.
+ *
+ * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks
+ * will be copied as symlinks, otherwise the target of the
+ * @source symlink will be copied.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * If @progress_callback is not %NULL, 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.
+ *
+ * If the @source file does not exist then the G_IO_ERROR_NOT_FOUND
+ * error is returned, independent on the status of the @destination.
+ *
+ * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then the
+ * error G_IO_ERROR_EXISTS is returned.
+ *
+ * If trying to overwrite a file over a directory the G_IO_ERROR_IS_DIRECTORY
+ * error is returned. If trying to overwrite a directory with a directory the
+ * G_IO_ERROR_WOULD_MERGE error is returned.
+ *
+ * If the source is a directory and the target does not exist, or #G_FILE_COPY_OVERWRITE is
+ * specified and the target is a file, then the G_IO_ERROR_WOULD_RECURSE error
+ * may be returned (if the native move operation isn't available).
+ *
+ * Returns: %TRUE on successful move, %FALSE otherwise.
+ */
+
+
+/**
+ * g_file_new_for_commandline_arg:
+ * @arg: a command line string.
+ *
+ * Creates a #GFile with the given argument from the command line. The value of
+ * @arg can be either a URI, an absolute path or a relative path resolved
+ * relative to the current working directory.
+ * This operation never fails, but the returned object might not support any
+ * I/O operation if @arg points to a malformed path.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a new #GFile.
+ */
+
+
+/**
+ * g_file_new_for_path:
+ * @path: a string containing a relative or absolute path. The string must be encoded in the glib filename encoding.
+ *
+ * Constructs a #GFile for a given path. This operation never
+ * fails, but the returned object might not support any I/O
+ * operation if @path is malformed.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a new #GFile for the given @path.
+ */
+
+
+/**
+ * g_file_new_for_uri:
+ * @uri: a UTF8 string containing a URI.
+ *
+ * Constructs a #GFile for a given URI. This operation never
+ * fails, but the returned object might not support any I/O
+ * operation if @uri is malformed or if the uri type is
+ * not supported.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a new #GFile for the given @uri.
+ */
+
+
+/**
+ * g_file_new_tmp:
+ * @tmpl: (type filename) (allow-none): Template for the file name, as in g_file_open_tmp(), or %NULL for a default template.
+ * @iostream: (out): on return, a #GFileIOStream for the created file.
+ * @error: a #GError, or %NULL
+ *
+ * Opens a file in the preferred directory for temporary files (as
+ * returned by g_get_tmp_dir()) and returns a #GFile and
+ * #GFileIOStream pointing to it.
+ *
+ * @tmpl should be a string in the GLib file name encoding
+ * containing a sequence of six 'X' characters, and containing no
+ * directory components. If it is %NULL, a default template is used.
+ *
+ * Unlike the other #GFile constructors, this will return %NULL if
+ * a temporary file could not be created.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a new #GFile.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_file_open_readwrite:
+ * @file: #GFile to open
+ * @cancellable: (allow-none): a #GCancellable
+ * @error: a #GError, or %NULL
+ *
+ * Opens an existing file for reading and writing. The result is
+ * a #GFileIOStream that can be used to read and write the contents of the file.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
+ * If the file is a directory, the G_IO_ERROR_IS_DIRECTORY error will be returned.
+ * Other errors are possible too, and depend on what kind of filesystem the file is on.
+ * Note that in many non-local file cases read and write streams are not supported,
+ * so make sure you really need to do read and write streaming, rather than
+ * just opening for reading or writing.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): #GFileIOStream or %NULL on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_file_open_readwrite_async:
+ * @file: input #GFile.
+ * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Asynchronously opens @file for reading and writing.
+ *
+ * For more details, see g_file_open_readwrite() which is
+ * the synchronous version of this call.
+ *
+ * When the operation is finished, @callback will be called. You can then call
+ * g_file_open_readwrite_finish() to get the result of the operation.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_file_open_readwrite_finish:
+ * @file: input #GFile.
+ * @res: a #GAsyncResult.
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous file read operation started with
+ * g_file_open_readwrite_async().
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GFileIOStream or %NULL on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_file_output_stream_get_etag:
+ * @stream: a #GFileOutputStream.
+ *
+ * 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.
+ *
+ * Returns: the entity tag for the stream.
+ */
+
+
+/**
+ * g_file_output_stream_query_info:
+ * @stream: a #GFileOutputStream.
+ * @attributes: a file attribute query string.
+ * @cancellable: optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, %NULL to ignore.
+ *
+ * Queries a file output stream for the given @attributes.
+ * This function blocks while querying the stream. For the asynchronous
+ * version of this function, see g_file_output_stream_query_info_async().
+ * While the stream is blocked, the stream will set the pending flag
+ * internally, and any other operations on the stream will fail with
+ * %G_IO_ERROR_PENDING.
+ *
+ * Can fail if the stream was already closed (with @error being set to
+ * %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being
+ * set to %G_IO_ERROR_PENDING), or if querying info is not supported for
+ * the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). In
+ * all cases of failure, %NULL will be returned.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
+ * be returned.
+ *
+ * Returns: (transfer full): a #GFileInfo for the @stream, or %NULL on error.
+ */
+
+
+/**
+ * g_file_output_stream_query_info_async:
+ * @stream: a #GFileOutputStream.
+ * @attributes: a file attribute query string.
+ * @io_priority: the <link linkend="gio-GIOScheduler">I/O priority</link> of the request.
+ * @cancellable: optional #GCancellable object, %NULL to ignore.
+ * @callback: callback to call when the request is satisfied
+ * @user_data: the data to pass to callback function
+ *
+ * Asynchronously queries the @stream for a #GFileInfo. When completed,
+ * @callback will be called with a #GAsyncResult which can be used to
+ * finish the operation with g_file_output_stream_query_info_finish().
+ *
+ * For the synchronous version of this function, see
+ * g_file_output_stream_query_info().
+ */
+
+
+/**
+ * g_file_output_stream_query_info_finish:
+ * @stream: a #GFileOutputStream.
+ * @result: a #GAsyncResult.
+ * @error: a #GError, %NULL to ignore.
+ *
+ * Finalizes the asynchronous query started
+ * by g_file_output_stream_query_info_async().
+ *
+ * Returns: (transfer full): A #GFileInfo for the finished query.
+ */
+
+
+/**
+ * g_file_parse_name:
+ * @parse_name: a file name or path to be parsed.
+ *
+ * Constructs a #GFile 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.
+ *
+ * Returns: (transfer full): a new #GFile.
+ */
+
+
+/**
+ * g_file_poll_mountable:
+ * @file: input #GFile.
+ * @cancellable: optional #GCancellable object, %NULL to ignore.
+ * @callback: (allow-none): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
+ * @user_data: the data to pass to callback function
+ *
+ * Polls a file of type G_FILE_TYPE_MOUNTABLE.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * When the operation is finished, @callback will be called. You can then call
+ * g_file_mount_mountable_finish() to get the result of the operation.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_file_poll_mountable_finish:
+ * @file: input #GFile.
+ * @result: a #GAsyncResult.
+ * @error: a #GError, or %NULL
+ *
+ * Finishes a poll operation. See g_file_poll_mountable() for details.
+ *
+ * Finish an asynchronous poll operation that was polled
+ * with g_file_poll_mountable().
+ *
+ * otherwise.
+ *
+ * Returns: %TRUE if the operation finished successfully. %FALSE
+ * Since: 2.22
+ */
+
+
+/**
+ * g_file_query_default_handler:
+ * @file: a #GFile to open.
+ * @cancellable: optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, or %NULL
+ *
+ * Returns the #GAppInfo that is registered as the default
+ * application to handle the file specified by @file.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * When you are done with it, release it with g_object_unref()
+ *
+ * Returns: (transfer full): a #GAppInfo if the handle was found, %NULL if there were errors.
+ */
+
+
+/**
+ * g_file_query_exists:
+ * @file: input #GFile.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ *
+ * Utility function to check if a particular file exists. This is
+ * implemented using g_file_query_info() and as such does blocking I/O.
+ *
+ * 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.
+ *
+ * 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 g_file_create() which will either atomically create the file
+ * or fail with a G_IO_ERROR_EXISTS error.
+ *
+ * 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.
+ *
+ * Returns: %TRUE if the file exists (and can be detected without error), %FALSE otherwise (or if cancelled).
+ */
+
+
+/**
+ * g_file_query_file_type:
+ * @file: input #GFile.
+ * @flags: a set of #GFileQueryInfoFlags passed to g_file_query_info().
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ *
+ * Utility function to inspect the #GFileType of a file. This is
+ * implemented using g_file_query_info() and as such does blocking I/O.
+ *
+ * The primary use case of this method is to check if a file is a regular file,
+ * directory, or symlink.
+ *
+ * does not exist
+ *
+ * Returns: The #GFileType of the file and #G_FILE_TYPE_UNKNOWN if the file
+ * Since: 2.18
+ */
+
+
+/**
+ * g_file_query_filesystem_info:
+ * @file: input #GFile.
+ * @attributes: an attribute query string.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError.
+ *
+ * Similar to g_file_query_info(), 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.
+ *
+ * The @attributes 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. @attributes should
+ * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
+ * means all attributes, and a wildcard like "filesystem::*" means all attributes in the
+ * filesystem namespace. The standard namespace for filesystem attributes is "filesystem".
+ * Common attributes of interest are #G_FILE_ATTRIBUTE_FILESYSTEM_SIZE
+ * (the total size of the filesystem in bytes), #G_FILE_ATTRIBUTE_FILESYSTEM_FREE (number of
+ * bytes available), and #G_FILE_ATTRIBUTE_FILESYSTEM_TYPE (type of the filesystem).
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
+ * Other errors are possible too, and depend on what kind of filesystem the file is on.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GFileInfo or %NULL if there was an error.
+ */
+
+
+/**
+ * g_file_query_filesystem_info_async:
+ * @file: input #GFile.
+ * @attributes: an attribute query string.
+ * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * 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).
+ *
+ * For more details, see g_file_query_filesystem_info() which is the
+ * synchronous version of this call.
+ *
+ * When the operation is finished, @callback will be called. You can
+ * then call g_file_query_info_finish() to get the result of the
+ * operation.
+ */
+
+
+/**
+ * g_file_query_filesystem_info_finish:
+ * @file: input #GFile.
+ * @res: a #GAsyncResult.
+ * @error: a #GError.
+ *
+ * Finishes an asynchronous filesystem info query.  See
+ * g_file_query_filesystem_info_async().
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): #GFileInfo for given @file or %NULL on error.
+ */
+
+
+/**
+ * g_file_query_info:
+ * @file: input #GFile.
+ * @attributes: an attribute query string.
+ * @flags: a set of #GFileQueryInfoFlags.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError.
+ *
+ * Gets the requested information about specified @file. The result
+ * is a #GFileInfo object that contains key-value attributes (such as
+ * the type or size of the file).
+ *
+ * The @attributes 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. @attributes should
+ * be a comma-separated list of attributes 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 #G_FILE_ATTRIBUTE_STANDARD_NAME.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * For symlinks, normally the information about the target of the
+ * symlink is returned, rather than information about the symlink itself.
+ * However if you pass #G_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.
+ *
+ * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
+ * Other errors are possible too, and depend on what kind of filesystem the file is on.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GFileInfo for the given @file, or %NULL on error.
+ */
+
+
+/**
+ * g_file_query_info_async:
+ * @file: input #GFile.
+ * @attributes: an attribute query string.
+ * @flags: a set of #GFileQueryInfoFlags.
+ * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Asynchronously gets the requested information about specified @file. The result
+ * is a #GFileInfo object that contains key-value attributes (such as type or size
+ * for the file).
+ *
+ * For more details, see g_file_query_info() which is
+ * the synchronous version of this call.
+ *
+ * When the operation is finished, @callback will be called. You can then call
+ * g_file_query_info_finish() to get the result of the operation.
+ */
+
+
+/**
+ * g_file_query_info_finish:
+ * @file: input #GFile.
+ * @res: a #GAsyncResult.
+ * @error: a #GError.
+ *
+ * Finishes an asynchronous file info query.
+ * See g_file_query_info_async().
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): #GFileInfo for given @file or %NULL on error.
+ */
+
+
+/**
+ * g_file_query_settable_attributes:
+ * @file: input #GFile.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, or %NULL
+ *
+ * Obtain the list of settable attributes for the file.
+ *
+ * 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.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * When you are done with it, release it with g_file_attribute_info_list_unref()
+ *
+ * Returns: a #GFileAttributeInfoList describing the settable attributes.
+ */
+
+
+/**
+ * g_file_query_writable_namespaces:
+ * @file: input #GFile.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, or %NULL
+ *
+ * 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).
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * When you are done with it, release it with g_file_attribute_info_list_unref()
+ *
+ * Returns: a #GFileAttributeInfoList describing the writable namespaces.
+ */
+
+
+/**
+ * g_file_read:
+ * @file: #GFile to read.
+ * @cancellable: (allow-none): a #GCancellable
+ * @error: a #GError, or %NULL
+ *
+ * Opens a file for reading. The result is a #GFileInputStream that
+ * can be used to read the contents of the file.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
+ * If the file is a directory, the G_IO_ERROR_IS_DIRECTORY error will be returned.
+ * Other errors are possible too, and depend on what kind of filesystem the file is on.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Virtual: read_fn
+ * Returns: (transfer full): #GFileInputStream or %NULL on error.
+ */
+
+
+/**
+ * g_file_read_async:
+ * @file: input #GFile
+ * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Asynchronously opens @file for reading.
+ *
+ * For more details, see g_file_read() which is
+ * the synchronous version of this call.
+ *
+ * When the operation is finished, @callback will be called. You can then call
+ * g_file_read_finish() to get the result of the operation.
+ */
+
+
+/**
+ * g_file_read_finish:
+ * @file: input #GFile.
+ * @res: a #GAsyncResult.
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous file read operation started with
+ * g_file_read_async().
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GFileInputStream or %NULL on error.
+ */
+
+
+/**
+ * g_file_replace:
+ * @file: input #GFile.
+ * @etag: (allow-none): an optional <link linkend="gfile-etag">entity tag</link> for the current #GFile, or #NULL to ignore.
+ * @make_backup: %TRUE if a backup should be created.
+ * @flags: a set of #GFileCreateFlags.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, or %NULL
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * By default files created are generally readable by everyone,
+ * but if you pass #G_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.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * If you pass in a non-#NULL @etag value, then this value is
+ * compared to the current entity tag of the file, and if they differ
+ * an G_IO_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 g_file_output_stream_get_etag() after you've
+ * finished writing and closed the #GFileOutputStream. When you load
+ * a new file you can use g_file_input_stream_query_info() to get
+ * the etag of the file.
+ *
+ * If @make_backup is %TRUE, this function will attempt to make a backup
+ * of the current file before overwriting it. If this fails a G_IO_ERROR_CANT_CREATE_BACKUP
+ * error will be returned. If you want to replace anyway, try again with
+ * @make_backup set to %FALSE.
+ *
+ * If the file is a directory the G_IO_ERROR_IS_DIRECTORY error will be returned,
+ * and if the file is some other form of non-regular file then a
+ * G_IO_ERROR_NOT_REGULAR_FILE error will be returned.
+ * Some file systems don't allow all file names, and may
+ * return an G_IO_ERROR_INVALID_FILENAME error, and if the name
+ * is to long G_IO_ERROR_FILENAME_TOO_LONG will be returned.
+ * Other errors are possible too, and depend on what kind of
+ * filesystem the file is on.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GFileOutputStream or %NULL on error.
+ */
+
+
+/**
+ * g_file_replace_async:
+ * @file: input #GFile.
+ * @etag: (allow-none): an <link linkend="gfile-etag">entity tag</link> for the current #GFile, or NULL to ignore.
+ * @make_backup: %TRUE if a backup should be created.
+ * @flags: a set of #GFileCreateFlags.
+ * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Asynchronously overwrites the file, replacing the contents, possibly
+ * creating a backup copy of the file first.
+ *
+ * For more details, see g_file_replace() which is
+ * the synchronous version of this call.
+ *
+ * When the operation is finished, @callback will be called. You can then call
+ * g_file_replace_finish() to get the result of the operation.
+ */
+
+
+/**
+ * g_file_replace_contents:
+ * @file: input #GFile.
+ * @contents: (element-type guint8) (array length=length): a string containing the new contents for @file.
+ * @length: the length of @contents in bytes.
+ * @etag: (allow-none): the old <link linkend="gfile-etag">entity tag</link> for the document, or %NULL
+ * @make_backup: %TRUE if a backup should be created.
+ * @flags: a set of #GFileCreateFlags.
+ * @new_etag: (allow-none) (out): a location to a new <link linkend="gfile-etag">entity tag</link> for the document. This should be freed with g_free() when no longer needed, or %NULL
+ * @cancellable: optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, or %NULL
+ *
+ * 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 %G_IO_ERROR_WRONG_ETAG will be returned.
+ *
+ * If @make_backup is %TRUE, this function will attempt to make a backup of @file.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * The returned @new_etag can be used to verify that the file hasn't changed the
+ * next time it is saved over.
+ *
+ * has occurred, this function will return %FALSE and set @error
+ * appropriately if present.
+ *
+ * Returns: %TRUE if successful. If an error
+ */
+
+
+/**
+ * g_file_replace_contents_async:
+ * @file: input #GFile.
+ * @contents: (element-type guint8) (array length=length): string of contents to replace the file with.
+ * @length: the length of @contents in bytes.
+ * @etag: (allow-none): a new <link linkend="gfile-etag">entity tag</link> for the @file, or %NULL
+ * @make_backup: %TRUE if a backup should be created.
+ * @flags: a set of #GFileCreateFlags.
+ * @cancellable: optional #GCancellable object, %NULL to ignore.
+ * @callback: a #GAsyncReadyCallback to call when the request is satisfied
+ * @user_data: the data to pass to callback function
+ *
+ * Starts an asynchronous replacement of @file with the given
+ * @contents of @length bytes. @etag will replace the document's
+ * current entity tag.
+ *
+ * When this operation has completed, @callback will be called with
+ * @user_user data, and the operation can be finalized with
+ * g_file_replace_contents_finish().
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * If @make_backup is %TRUE, this function will attempt to
+ * make a backup of @file.
+ */
+
+
+/**
+ * g_file_replace_contents_finish:
+ * @file: input #GFile.
+ * @res: a #GAsyncResult.
+ * @new_etag: (out) (allow-none): a location of a new <link linkend="gfile-etag">entity tag</link> for the document. This should be freed with g_free() when it is no longer needed, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous replace of the given @file. See
+ * g_file_replace_contents_async(). Sets @new_etag to the new entity
+ * tag for the document, if present.
+ *
+ * Returns: %TRUE on success, %FALSE on failure.
+ */
+
+
+/**
+ * g_file_replace_finish:
+ * @file: input #GFile.
+ * @res: a #GAsyncResult.
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous file replace operation started with
+ * g_file_replace_async().
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GFileOutputStream, or %NULL on error.
+ */
+
+
+/**
+ * g_file_replace_readwrite:
+ * @file: a #GFile
+ * @etag: (allow-none): an optional <link linkend="gfile-etag">entity tag</link> for the current #GFile, or #NULL to ignore
+ * @make_backup: %TRUE if a backup should be created
+ * @flags: a set of #GFileCreateFlags
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
+ * @error: return location for a #GError, or %NULL
+ *
+ * Returns an output stream for overwriting the file in readwrite mode,
+ * possibly creating a backup copy of the file first. If the file doesn't
+ * exist, it will be created.
+ *
+ * For details about the behaviour, see g_file_replace() which does the same
+ * thing but returns an output stream only.
+ *
+ * Note that in many non-local file cases read and write streams are not
+ * supported, so make sure you really need to do read and write streaming,
+ * rather than just opening for reading or writing.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GFileIOStream or %NULL on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_file_replace_readwrite_async:
+ * @file: input #GFile.
+ * @etag: (allow-none): an <link linkend="gfile-etag">entity tag</link> for the current #GFile, or NULL to ignore.
+ * @make_backup: %TRUE if a backup should be created.
+ * @flags: a set of #GFileCreateFlags.
+ * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Asynchronously overwrites the file in read-write mode, replacing the
+ * contents, possibly creating a backup copy of the file first.
+ *
+ * For more details, see g_file_replace_readwrite() which is
+ * the synchronous version of this call.
+ *
+ * When the operation is finished, @callback will be called. You can then
+ * call g_file_replace_readwrite_finish() to get the result of the operation.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_file_replace_readwrite_finish:
+ * @file: input #GFile.
+ * @res: a #GAsyncResult.
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous file replace operation started with
+ * g_file_replace_readwrite_async().
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GFileIOStream, or %NULL on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_file_resolve_relative_path:
+ * @file: input #GFile.
+ * @relative_path: a given relative path string.
+ *
+ * Resolves a relative path for @file to an absolute path.
+ *
+ * This call does no blocking i/o.
+ *
+ * is %NULL or if @file is invalid.
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): #GFile to the resolved path. %NULL if @relative_path
+ */
+
+
+/**
+ * g_file_set_attribute:
+ * @file: input #GFile.
+ * @attribute: a string containing the attribute's name.
+ * @type: The type of the attribute
+ * @value_p: (allow-none): a pointer to the value (or the pointer itself if the type is a pointer type)
+ * @flags: a set of #GFileQueryInfoFlags.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, or %NULL
+ *
+ * Sets an attribute in the file with attribute name @attribute to @value.
+ *
+ * Some attributes can be unset by setting @attribute to
+ * %G_FILE_ATTRIBUTE_TYPE_INVALID and @value_p to %NULL.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * Returns: %TRUE if the attribute was set, %FALSE otherwise.
+ */
+
+
+/**
+ * g_file_set_attribute_byte_string:
+ * @file: input #GFile.
+ * @attribute: a string containing the attribute's name.
+ * @value: a string containing the attribute's new value.
+ * @flags: a #GFileQueryInfoFlags.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, or %NULL
+ *
+ * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING to @value.
+ * If @attribute is of a different type, this operation will fail,
+ * returning %FALSE.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * in the @file, %FALSE otherwise.
+ *
+ * Returns: %TRUE if the @attribute was successfully set to @value
+ */
+
+
+/**
+ * g_file_set_attribute_int32:
+ * @file: input #GFile.
+ * @attribute: a string containing the attribute's name.
+ * @value: a #gint32 containing the attribute's new value.
+ * @flags: a #GFileQueryInfoFlags.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, or %NULL
+ *
+ * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT32 to @value.
+ * If @attribute is of a different type, this operation will fail.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * in the @file, %FALSE otherwise.
+ *
+ * Returns: %TRUE if the @attribute was successfully set to @value
+ */
+
+
+/**
+ * g_file_set_attribute_int64:
+ * @file: input #GFile.
+ * @attribute: a string containing the attribute's name.
+ * @value: a #guint64 containing the attribute's new value.
+ * @flags: a #GFileQueryInfoFlags.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, or %NULL
+ *
+ * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT64 to @value.
+ * If @attribute is of a different type, this operation will fail.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise.
+ */
+
+
+/**
+ * g_file_set_attribute_string:
+ * @file: input #GFile.
+ * @attribute: a string containing the attribute's name.
+ * @value: a string containing the attribute's value.
+ * @flags: #GFileQueryInfoFlags.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, or %NULL
+ *
+ * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_STRING to @value.
+ * If @attribute is of a different type, this operation will fail.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise.
+ */
+
+
+/**
+ * g_file_set_attribute_uint32:
+ * @file: input #GFile.
+ * @attribute: a string containing the attribute's name.
+ * @value: a #guint32 containing the attribute's new value.
+ * @flags: a #GFileQueryInfoFlags.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, or %NULL
+ *
+ * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT32 to @value.
+ * If @attribute is of a different type, this operation will fail.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * in the @file, %FALSE otherwise.
+ *
+ * Returns: %TRUE if the @attribute was successfully set to @value
+ */
+
+
+/**
+ * g_file_set_attribute_uint64:
+ * @file: input #GFile.
+ * @attribute: a string containing the attribute's name.
+ * @value: a #guint64 containing the attribute's new value.
+ * @flags: a #GFileQueryInfoFlags.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, or %NULL
+ *
+ * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT64 to @value.
+ * If @attribute is of a different type, this operation will fail.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * in the @file, %FALSE otherwise.
+ *
+ * Returns: %TRUE if the @attribute was successfully set to @value
+ */
+
+
+/**
+ * g_file_set_attributes_async:
+ * @file: input #GFile.
+ * @info: a #GFileInfo.
+ * @flags: a #GFileQueryInfoFlags.
+ * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async): a #GAsyncReadyCallback.
+ * @user_data: (closure): a #gpointer.
+ *
+ * Asynchronously sets the attributes of @file with @info.
+ *
+ * For more details, see g_file_set_attributes_from_info() which is
+ * the synchronous version of this call.
+ *
+ * When the operation is finished, @callback will be called. You can then call
+ * g_file_set_attributes_finish() to get the result of the operation.
+ */
+
+
+/**
+ * g_file_set_attributes_finish:
+ * @file: input #GFile.
+ * @result: a #GAsyncResult.
+ * @info: (out) (transfer full): a #GFileInfo.
+ * @error: a #GError, or %NULL
+ *
+ * Finishes setting an attribute started in g_file_set_attributes_async().
+ *
+ * Returns: %TRUE if the attributes were set correctly, %FALSE otherwise.
+ */
+
+
+/**
+ * g_file_set_attributes_from_info:
+ * @file: input #GFile.
+ * @info: a #GFileInfo.
+ * @flags: #GFileQueryInfoFlags
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, or %NULL
+ *
+ * Tries to set all attributes in the #GFileInfo on the target values,
+ * not stopping on the first error.
+ *
+ * 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
+ * %G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING, which means you can also detect
+ * further errors.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * Returns: %TRUE if there was any error, %FALSE otherwise.
+ */
+
+
+/**
+ * g_file_set_display_name:
+ * @file: input #GFile.
+ * @display_name: a string.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, or %NULL
+ *
+ * Renames @file to the specified display name.
+ *
+ * The display name is converted from UTF8 to the correct encoding for the target
+ * filesystem if possible and the @file is renamed to this.
+ *
+ * If you want to implement a rename operation in the user interface the edit name
+ * (#G_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 g_file_set_display_name().
+ *
+ * On success the resulting converted filename is returned.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * if there was an error.
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GFile specifying what @file was renamed to, or %NULL
+ */
+
+
+/**
+ * g_file_set_display_name_async:
+ * @file: input #GFile.
+ * @display_name: a string.
+ * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Asynchronously sets the display name for a given #GFile.
+ *
+ * For more details, see g_file_set_display_name() which is
+ * the synchronous version of this call.
+ *
+ * When the operation is finished, @callback will be called. You can then call
+ * g_file_set_display_name_finish() to get the result of the operation.
+ */
+
+
+/**
+ * g_file_set_display_name_finish:
+ * @file: input #GFile.
+ * @res: a #GAsyncResult.
+ * @error: a #GError, or %NULL
+ *
+ * Finishes setting a display name started with
+ * g_file_set_display_name_async().
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GFile or %NULL on error.
+ */
+
+
+/**
+ * g_file_start_mountable:
+ * @file: input #GFile.
+ * @flags: flags affecting the operation
+ * @start_operation: (allow-none): a #GMountOperation, or %NULL to avoid user interaction.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (allow-none): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
+ * @user_data: the data to pass to callback function
+ *
+ * Starts a file of type G_FILE_TYPE_MOUNTABLE.
+ * Using @start_operation, you can request callbacks when, for instance,
+ * passwords are needed during authentication.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * When the operation is finished, @callback will be called. You can then call
+ * g_file_mount_mountable_finish() to get the result of the operation.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_file_start_mountable_finish:
+ * @file: input #GFile.
+ * @result: a #GAsyncResult.
+ * @error: a #GError, or %NULL
+ *
+ * Finishes a start operation. See g_file_start_mountable() for details.
+ *
+ * Finish an asynchronous start operation that was started
+ * with g_file_start_mountable().
+ *
+ * otherwise.
+ *
+ * Returns: %TRUE if the operation finished successfully. %FALSE
+ * Since: 2.22
+ */
+
+
+/**
+ * g_file_stop_mountable:
+ * @file: input #GFile.
+ * @flags: flags affecting the operation
+ * @mount_operation: (allow-none): a #GMountOperation, or %NULL to avoid user interaction.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (allow-none): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
+ * @user_data: the data to pass to callback function
+ *
+ * Stops a file of type G_FILE_TYPE_MOUNTABLE.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * When the operation is finished, @callback will be called. You can then call
+ * g_file_stop_mountable_finish() to get the result of the operation.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_file_stop_mountable_finish:
+ * @file: input #GFile.
+ * @result: a #GAsyncResult.
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an stop operation, see g_file_stop_mountable() for details.
+ *
+ * Finish an asynchronous stop operation that was started
+ * with g_file_stop_mountable().
+ *
+ * otherwise.
+ *
+ * Returns: %TRUE if the operation finished successfully. %FALSE
+ * Since: 2.22
+ */
+
+
+/**
+ * g_file_supports_thread_contexts:
+ * @file: a #GFile.
+ *
+ * Checks if @file supports <link
+ * linkend="g-main-context-push-thread-default-context">thread-default
+ * contexts</link>. If this returns %FALSE, you cannot perform
+ * asynchronous operations on @file in a thread that has a
+ * thread-default context.
+ *
+ * Returns: Whether or not @file supports thread-default contexts.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_file_trash:
+ * @file: #GFile to send to trash.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError, or %NULL
+ *
+ * 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
+ * %G_IO_ERROR_NOT_SUPPORTED error.
+ *
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * Returns: %TRUE on successful trash, %FALSE otherwise.
+ */
+
+
+/**
+ * g_file_unmount_mountable:
+ * @file: input #GFile.
+ * @flags: flags affecting the operation
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async) (allow-none): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * When the operation is finished, @callback will be called. You can then call
+ * g_file_unmount_mountable_finish() to get the result of the operation.
+ *
+ * Deprecated: 2.22: Use g_file_unmount_mountable_with_operation() instead.
+ */
+
+
+/**
+ * g_file_unmount_mountable_finish:
+ * @file: input #GFile.
+ * @result: a #GAsyncResult.
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an unmount operation, see g_file_unmount_mountable() for details.
+ *
+ * Finish an asynchronous unmount operation that was started
+ * with g_file_unmount_mountable().
+ *
+ * otherwise.
+ *
+ * Returns: %TRUE if the operation finished successfully. %FALSE
+ * Deprecated: 2.22: Use g_file_unmount_mountable_with_operation_finish() instead.
+ */
+
+
+/**
+ * g_file_unmount_mountable_with_operation:
+ * @file: input #GFile.
+ * @flags: flags affecting the operation
+ * @mount_operation: (allow-none): a #GMountOperation, or %NULL to avoid user interaction.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async) (allow-none): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * When the operation is finished, @callback will be called. You can then call
+ * g_file_unmount_mountable_finish() to get the result of the operation.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_file_unmount_mountable_with_operation_finish:
+ * @file: input #GFile.
+ * @result: a #GAsyncResult.
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an unmount operation, see g_file_unmount_mountable_with_operation() for details.
+ *
+ * Finish an asynchronous unmount operation that was started
+ * with g_file_unmount_mountable_with_operation().
+ *
+ * otherwise.
+ *
+ * Returns: %TRUE if the operation finished successfully. %FALSE
+ * Since: 2.22
+ */
+
+
+/**
+ * g_filename_completer_get_completion_suffix:
+ * @completer: the filename completer.
+ * @initial_text: text to be completed.
+ *
+ * Obtains a completion for @initial_text from @completer.
+ *
+ * This string is not owned by GIO, so remember to g_free() it
+ * when finished.
+ *
+ * Returns: a completed string, or %NULL if no completion exists.
+ */
+
+
+/**
+ * g_filename_completer_get_completions:
+ * @completer: the filename completer.
+ * @initial_text: text to be completed.
+ *
+ * Gets an array of completion strings for a given initial text.
+ *
+ * This array must be freed by g_strfreev() when finished.
+ *
+ * Returns: (array zero-terminated=1) (transfer full): array of strings with possible completions for @initial_text.
+ */
+
+
+/**
+ * g_filename_completer_new:
+ *
+ * Creates a new filename completer.
+ *
+ * Returns: a #GFilenameCompleter.
+ */
+
+
+/**
+ * g_filename_completer_set_dirs_only:
+ * @completer: the filename completer.
+ * @dirs_only: a #gboolean.
+ *
+ * If @dirs_only is %TRUE, @completer will only
+ * complete directory names, and not file names.
+ */
+
+
+/**
+ * g_filter_input_stream_get_base_stream:
+ * @stream: a #GFilterInputStream.
+ *
+ * Gets the base stream for the filter stream.
+ *
+ * Returns: (transfer none): a #GInputStream.
+ */
+
+
+/**
+ * g_filter_input_stream_get_close_base_stream:
+ * @stream: a #GFilterInputStream.
+ *
+ * Returns whether the base stream will be closed when @stream is
+ * closed.
+ *
+ * Returns: %TRUE if the base stream will be closed.
+ */
+
+
+/**
+ * g_filter_input_stream_set_close_base_stream:
+ * @stream: a #GFilterInputStream.
+ * @close_base: %TRUE to close the base stream.
+ *
+ * Sets whether the base stream will be closed when @stream is closed.
+ */
+
+
+/**
+ * g_filter_output_stream_get_base_stream:
+ * @stream: a #GFilterOutputStream.
+ *
+ * Gets the base stream for the filter stream.
+ *
+ * Returns: (transfer none): a #GOutputStream.
+ */
+
+
+/**
+ * g_filter_output_stream_get_close_base_stream:
+ * @stream: a #GFilterOutputStream.
+ *
+ * Returns whether the base stream will be closed when @stream is
+ * closed.
+ *
+ * Returns: %TRUE if the base stream will be closed.
+ */
+
+
+/**
+ * g_filter_output_stream_set_close_base_stream:
+ * @stream: a #GFilterOutputStream.
+ * @close_base: %TRUE to close the base stream.
+ *
+ * Sets whether the base stream will be closed when @stream is closed.
+ */
+
+
+/**
+ * g_icon_equal:
+ * @icon1: (allow-none): pointer to the first #GIcon.
+ * @icon2: (allow-none): pointer to the second #GIcon.
+ *
+ * Checks if two icons are equal.
+ *
+ * Returns: %TRUE if @icon1 is equal to @icon2. %FALSE otherwise.
+ */
+
+
+/**
+ * g_icon_hash:
+ * @icon: #gconstpointer to an icon object.
+ *
+ * Gets a hash for an icon.
+ *
+ * use in a #GHashTable or similar data structure.
+ *
+ * Virtual: hash
+ * Returns: a #guint containing a hash for the @icon, suitable for
+ */
+
+
+/**
+ * g_icon_new_for_string:
+ * @str: A string obtained via g_icon_to_string().
+ * @error: Return location for error.
+ *
+ * Generate a #GIcon instance from @str. This function can fail if
+ * @str is not valid - see g_icon_to_string() for discussion.
+ *
+ * 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 g_icon_new_for_string().
+ *
+ * interface or %NULL if @error is set.
+ *
+ * Returns: (transfer full): An object implementing the #GIcon
+ * Since: 2.20
+ */
+
+
+/**
+ * g_icon_to_string:
+ * @icon: a #GIcon.
+ *
+ * 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 g_icon_new_for_string() to
+ * get @icon back from the returned string.
+ *
+ * The encoding of the returned string is proprietary to #GIcon except
+ * in the following two cases
+ *
+ * <itemizedlist>
+ * <listitem><para>
+ * If @icon is a #GFileIcon, the returned string is a native path
+ * (such as <literal>/path/to/my icon.png</literal>) without escaping
+ * if the #GFile for @icon is a native file.  If the file is not
+ * native, the returned string is the result of g_file_get_uri()
+ * (such as <literal>sftp://path/to/my&percnt;20icon.png</literal>).
+ * </para></listitem>
+ * <listitem><para>
+ * If @icon is a #GThemedIcon with exactly one name, the encoding is
+ * simply the name (such as <literal>network-server</literal>).
+ * </para></listitem>
+ * </itemizedlist>
+ *
+ * be serialized. Use g_free() to free.
+ *
+ * Virtual: to_tokens
+ * Returns: An allocated NUL-terminated UTF8 string or %NULL if @icon can't
+ * Since: 2.20
+ */
+
+
+/**
+ * g_inet_address_equal:
+ * @address: A #GInetAddress.
+ * @other_address: Another #GInetAddress.
+ *
+ * Checks if two #GInetAddress instances are equal, e.g. the same address.
+ *
+ * Returns: %TRUE if @address and @other_address are equal, %FALSE otherwise.
+ * Since: 2.30
+ */
+
+
+/**
+ * g_inet_address_get_family:
+ * @address: a #GInetAddress
+ *
+ * Gets @address's family
+ *
+ * Returns: @address's family
+ * Since: 2.22
+ */
+
+
+/**
+ * g_inet_address_get_is_any:
+ * @address: a #GInetAddress
+ *
+ * Tests whether @address is the "any" address for its family.
+ *
+ * Returns: %TRUE if @address is the "any" address for its family.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_inet_address_get_is_link_local:
+ * @address: a #GInetAddress
+ *
+ * Tests whether @address is a link-local address (that is, if it
+ * identifies a host on a local network that is not connected to the
+ * Internet).
+ *
+ * Returns: %TRUE if @address is a link-local address.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_inet_address_get_is_loopback:
+ * @address: a #GInetAddress
+ *
+ * Tests whether @address is the loopback address for its family.
+ *
+ * Returns: %TRUE if @address is the loopback address for its family.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_inet_address_get_is_mc_global:
+ * @address: a #GInetAddress
+ *
+ * Tests whether @address is a global multicast address.
+ *
+ * Returns: %TRUE if @address is a global multicast address.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_inet_address_get_is_mc_link_local:
+ * @address: a #GInetAddress
+ *
+ * Tests whether @address is a link-local multicast address.
+ *
+ * Returns: %TRUE if @address is a link-local multicast address.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_inet_address_get_is_mc_node_local:
+ * @address: a #GInetAddress
+ *
+ * Tests whether @address is a node-local multicast address.
+ *
+ * Returns: %TRUE if @address is a node-local multicast address.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_inet_address_get_is_mc_org_local:
+ * @address: a #GInetAddress
+ *
+ * Tests whether @address is an organization-local multicast address.
+ *
+ * Returns: %TRUE if @address is an organization-local multicast address.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_inet_address_get_is_mc_site_local:
+ * @address: a #GInetAddress
+ *
+ * Tests whether @address is a site-local multicast address.
+ *
+ * Returns: %TRUE if @address is a site-local multicast address.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_inet_address_get_is_multicast:
+ * @address: a #GInetAddress
+ *
+ * Tests whether @address is a multicast address.
+ *
+ * Returns: %TRUE if @address is a multicast address.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_inet_address_get_is_site_local:
+ * @address: a #GInetAddress
+ *
+ * Tests whether @address is a site-local address such as 10.0.0.1
+ * (that is, the address identifies a host on a local network that can
+ * not be reached directly from the Internet, but which may have
+ * outgoing Internet connectivity via a NAT or firewall).
+ *
+ * Returns: %TRUE if @address is a site-local address.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_inet_address_get_native_size:
+ * @address: a #GInetAddress
+ *
+ * Gets the size of the native raw binary address for @address. This
+ * is the size of the data that you get from g_inet_address_to_bytes().
+ *
+ * Returns: the number of bytes used for the native version of @address.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_inet_address_mask_equal:
+ * @mask: a #GInetAddressMask
+ * @mask2: another #GInetAddressMask
+ *
+ * Tests if @mask and @mask2 are the same mask.
+ *
+ * Returns: whether @mask and @mask2 are the same mask
+ * Since: 2.32
+ */
+
+
+/**
+ * g_inet_address_mask_get_address:
+ * @mask: a #GInetAddressMask
+ *
+ * Gets @mask's base address
+ *
+ * Returns: (transfer none): @mask's base address
+ * Since: 2.32
+ */
+
+
+/**
+ * g_inet_address_mask_get_family:
+ * @mask: a #GInetAddressMask
+ *
+ * Gets the #GSocketFamily of @mask's address
+ *
+ * Returns: the #GSocketFamily of @mask's address
+ * Since: 2.32
+ */
+
+
+/**
+ * g_inet_address_mask_get_length:
+ * @mask: a #GInetAddressMask
+ *
+ * Gets @mask's length
+ *
+ * Returns: @mask's length
+ * Since: 2.32
+ */
+
+
+/**
+ * g_inet_address_mask_matches:
+ * @mask: a #GInetAddressMask
+ * @address: a #GInetAddress
+ *
+ * Tests if @address falls within the range described by @mask.
+ *
+ * @mask.
+ *
+ * Returns: whether @address falls within the range described by
+ * Since: 2.32
+ */
+
+
+/**
+ * g_inet_address_mask_new:
+ * @addr: a #GInetAddress
+ * @length: number of bits of @addr to use
+ * @error: return location for #GError, or %NULL
+ *
+ * Creates a new #GInetAddressMask representing all addresses whose
+ * first @length bits match @addr.
+ *
+ * Returns: a new #GInetAddressMask, or %NULL on error
+ * Since: 2.32
+ */
+
+
+/**
+ * g_inet_address_mask_new_from_string:
+ * @mask_string: an IP address or address/length string
+ * @error: return location for #GError, or %NULL
+ *
+ * Parses @mask_string as an IP address and (optional) length, and
+ * creates a new #GInetAddressMask. The length, if present, is
+ * delimited by a "/". If it is not present, then the length is
+ * assumed to be the full length of the address.
+ *
+ * on error.
+ *
+ * Returns: a new #GInetAddressMask corresponding to @string, or %NULL
+ * Since: 2.32
+ */
+
+
+/**
+ * g_inet_address_mask_to_string:
+ * @mask: a #GInetAddressMask
+ *
+ * Converts @mask back to its corresponding string form.
+ *
+ * Returns: a string corresponding to @mask.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_inet_address_new_any:
+ * @family: the address family
+ *
+ * Creates a #GInetAddress for the "any" address (unassigned/"don't
+ * care") for @family.
+ *
+ * for @family.
+ *
+ * Returns: a new #GInetAddress corresponding to the "any" address
+ * Since: 2.22
+ */
+
+
+/**
+ * g_inet_address_new_from_bytes:
+ * @bytes: (array) (element-type guint8): raw address data
+ * @family: the address family of @bytes
+ *
+ * Creates a new #GInetAddress from the given @family and @bytes.
+ * @bytes should be 4 bytes for %G_SOCKET_FAMILY_IPV4 and 16 bytes for
+ * %G_SOCKET_FAMILY_IPV6.
+ *
+ * Returns: a new #GInetAddress corresponding to @family and @bytes.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_inet_address_new_from_string:
+ * @string: a string representation of an IP address
+ *
+ * Parses @string as an IP address and creates a new #GInetAddress.
+ *
+ * @string could not be parsed.
+ *
+ * Returns: a new #GInetAddress corresponding to @string, or %NULL if
+ * Since: 2.22
+ */
+
+
+/**
+ * g_inet_address_new_loopback:
+ * @family: the address family
+ *
+ * Creates a #GInetAddress for the loopback address for @family.
+ *
+ * for @family.
+ *
+ * Returns: a new #GInetAddress corresponding to the loopback address
+ * Since: 2.22
+ */
+
+
+/**
+ * g_inet_address_to_bytes: (skip)
+ * @address: a #GInetAddress
+ *
+ * Gets the raw binary address data from @address.
+ *
+ * which should not be modified, stored, or freed. The size of this
+ * array can be gotten with g_inet_address_get_native_size().
+ *
+ * Returns: a pointer to an internal array of the bytes in @address,
+ * Since: 2.22
+ */
+
+
+/**
+ * g_inet_address_to_string:
+ * @address: a #GInetAddress
+ *
+ * Converts @address to string form.
+ *
+ * freed after use.
+ *
+ * Returns: a representation of @address as a string, which should be
+ * Since: 2.22
+ */
+
+
+/**
+ * g_inet_socket_address_get_address:
+ * @address: a #GInetSocketAddress
+ *
+ * Gets @address's #GInetAddress.
+ *
+ * g_object_ref()'d if it will be stored
+ *
+ * Returns: (transfer none): the #GInetAddress for @address, which must be
+ * Since: 2.22
+ */
+
+
+/**
+ * g_inet_socket_address_get_flowinfo:
+ * @address: a %G_SOCKET_FAMILY_IPV6 #GInetSocketAddress
+ *
+ * Gets the <literal>sin6_flowinfo</literal> field from @address,
+ * which must be an IPv6 address.
+ *
+ * Returns: the flowinfo field
+ * Since: 2.32
+ */
+
+
+/**
+ * g_inet_socket_address_get_port:
+ * @address: a #GInetSocketAddress
+ *
+ * Gets @address's port.
+ *
+ * Returns: the port for @address
+ * Since: 2.22
+ */
+
+
+/**
+ * g_inet_socket_address_get_scope_id:
+ * @address: a %G_SOCKET_FAMILY_IPV6 #GInetAddress
+ *
+ * Gets the <literal>sin6_scope_id</literal> field from @address,
+ * which must be an IPv6 address.
+ *
+ * Returns: the scope id field
+ * Since: 2.32
+ */
+
+
+/**
+ * g_inet_socket_address_new:
+ * @address: a #GInetAddress
+ * @port: a port number
+ *
+ * Creates a new #GInetSocketAddress for @address and @port.
+ *
+ * Returns: a new #GInetSocketAddress
+ * Since: 2.22
+ */
+
+
+/**
+ * g_initable_init:
+ * @initable: a #GInitable.
+ * @cancellable: optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Initializes the object implementing the interface.
+ *
+ * The object must be initialized before any real use after initial
+ * construction, either with this function or g_async_initable_init_async().
+ *
+ * Implementations may also support cancellation. If @cancellable is not %NULL,
+ * then initialization can be cancelled by triggering the cancellable object
+ * from another thread. If the operation was cancelled, the error
+ * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL and
+ * the object doesn't support cancellable initialization the error
+ * %G_IO_ERROR_NOT_SUPPORTED will be returned.
+ *
+ * If the object is not initialized, or initialization returns with an
+ * error, then all operations on the object except g_object_ref() and
+ * g_object_unref() are considered to be invalid, and have undefined
+ * behaviour. See the <xref linkend="ginitable"/> section introduction
+ * for more details.
+ *
+ * Implementations of this method must be idempotent, i.e. multiple calls
+ * to this function with the same argument should return the same results.
+ * Only the first call initializes the object, further calls return the result
+ * of the first call. This is so that it's safe to implement the singleton
+ * pattern in the GObject constructor function.
+ *
+ * return %FALSE and set @error appropriately if present.
+ *
+ * Returns: %TRUE if successful. If an error has occurred, this function will
+ * Since: 2.22
+ */
+
+
+/**
+ * g_initable_new:
+ * @object_type: a #GType supporting #GInitable.
+ * @cancellable: optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ * @first_property_name: (allow-none): the name of the first property, or %NULL if no properties
+ * @...: the value if the first property, followed by and other property value pairs, and ended by %NULL.
+ *
+ * Helper function for constructing #GInitable object. This is
+ * similar to g_object_new() but also initializes the object
+ * and returns %NULL, setting an error on failure.
+ *
+ * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
+ * Since: 2.22
+ */
+
+
+/**
+ * g_initable_new_valist:
+ * @object_type: a #GType supporting #GInitable.
+ * @first_property_name: the name of the first property, followed by the value, and other property value pairs, and ended by %NULL.
+ * @var_args: The var args list generated from @first_property_name.
+ * @cancellable: optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Helper function for constructing #GInitable object. This is
+ * similar to g_object_new_valist() but also initializes the object
+ * and returns %NULL, setting an error on failure.
+ *
+ * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
+ * Since: 2.22
+ */
+
+
+/**
+ * g_initable_newv:
+ * @object_type: a #GType supporting #GInitable.
+ * @n_parameters: the number of parameters in @parameters
+ * @parameters: (array length=n_parameters): the parameters to use to construct the object
+ * @cancellable: optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Helper function for constructing #GInitable object. This is
+ * similar to g_object_newv() but also initializes the object
+ * and returns %NULL, setting an error on failure.
+ *
+ * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
+ * Since: 2.22
+ */
+
+
+/**
+ * g_input_stream_clear_pending:
+ * @stream: input stream
+ *
+ * Clears the pending flag on @stream.
+ */
+
+
+/**
+ * g_input_stream_close:
+ * @stream: A #GInputStream.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: location to store the error occurring, or %NULL to ignore
+ *
+ * Closes the stream, releasing resources related to it.
+ *
+ * Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED.
+ * Closing a stream multiple times will not return an error.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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 %G_IO_ERROR_CLOSED for all operations. Still, it
+ * is important to check and report the error to the user.
+ *
+ * If @cancellable is not NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_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.
+ *
+ * Returns: %TRUE on success, %FALSE on failure
+ */
+
+
+/**
+ * g_input_stream_close_async:
+ * @stream: A #GInputStream.
+ * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
+ * @cancellable: (allow-none): optional cancellable object
+ * @callback: (scope async): callback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Requests an asynchronous closes of the stream, releasing resources related to it.
+ * When the operation is finished @callback will be called.
+ * You can then call g_input_stream_close_finish() to get the result of the
+ * operation.
+ *
+ * For behaviour details see g_input_stream_close().
+ *
+ * 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.
+ */
+
+
+/**
+ * g_input_stream_close_finish:
+ * @stream: a #GInputStream.
+ * @result: a #GAsyncResult.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Finishes closing a stream asynchronously, started from g_input_stream_close_async().
+ *
+ * Returns: %TRUE if the stream was closed successfully.
+ */
+
+
+/**
+ * g_input_stream_has_pending:
+ * @stream: input stream.
+ *
+ * Checks if an input stream has pending actions.
+ *
+ * Returns: %TRUE if @stream has pending actions.
+ */
+
+
+/**
+ * g_input_stream_is_closed:
+ * @stream: input stream.
+ *
+ * Checks if an input stream is closed.
+ *
+ * Returns: %TRUE if the stream is closed.
+ */
+
+
+/**
+ * g_input_stream_read:
+ * @stream: a #GInputStream.
+ * @buffer: a buffer to read data into (which should be at least count bytes long).
+ * @count: the number of bytes that will be read from the stream
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: location to store the error occurring, or %NULL to ignore
+ *
+ * Tries to read @count bytes from the stream into the buffer starting at
+ * @buffer. Will block during this read.
+ *
+ * If count is zero returns zero and does nothing. A value of @count
+ * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
+ *
+ * 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.
+ *
+ * If @cancellable is not NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error G_IO_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.
+ *
+ * On error -1 is returned and @error is set accordingly.
+ *
+ * Returns: Number of bytes read, or -1 on error
+ */
+
+
+/**
+ * g_input_stream_read_all:
+ * @stream: a #GInputStream.
+ * @buffer: a buffer to read data into (which should be at least count bytes long).
+ * @count: the number of bytes that will be read from the stream
+ * @bytes_read: (out): location to store the number of bytes that was read from the stream
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: location to store the error occurring, or %NULL to ignore
+ *
+ * Tries to read @count bytes from the stream into the buffer starting at
+ * @buffer. Will block during this read.
+ *
+ * This function is similar to g_input_stream_read(), except it tries to
+ * read as many bytes as requested, only stopping on an error or end of stream.
+ *
+ * On a successful read of @count bytes, or if we reached the end of the
+ * stream,  %TRUE is returned, and @bytes_read is set to the number of bytes
+ * read into @buffer.
+ *
+ * If there is an error during the operation %FALSE 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.
+ *
+ * Returns: %TRUE on success, %FALSE if there was an error
+ */
+
+
+/**
+ * g_input_stream_read_async:
+ * @stream: A #GInputStream.
+ * @buffer: a buffer to read data into (which should be at least count bytes long).
+ * @count: the number of bytes that will be read from the stream
+ * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async): callback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Request an asynchronous read of @count bytes from the stream into the buffer
+ * starting at @buffer. When the operation is finished @callback will be called.
+ * You can then call g_input_stream_read_finish() to get the result of the
+ * operation.
+ *
+ * During an async request no other sync and async calls are allowed on @stream, and will
+ * result in %G_IO_ERROR_PENDING errors.
+ *
+ * A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
+ *
+ * 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.
+ *
+ * Any outstanding i/o request with higher priority (lower numerical value) will
+ * be executed before an outstanding request with lower priority. Default
+ * priority is %G_PRIORITY_DEFAULT.
+ *
+ * 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.
+ */
+
+
+/**
+ * g_input_stream_read_finish:
+ * @stream: a #GInputStream.
+ * @result: a #GAsyncResult.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Finishes an asynchronous stream read operation.
+ *
+ * Returns: number of bytes read in, or -1 on error.
+ */
+
+
+/**
+ * g_input_stream_set_pending:
+ * @stream: input stream
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Sets @stream to have actions pending. If the pending flag is
+ * already set or @stream is closed, it will return %FALSE and set
+ * @error.
+ *
+ * Returns: %TRUE if pending was previously unset and is now set.
+ */
+
+
+/**
+ * g_input_stream_skip:
+ * @stream: a #GInputStream.
+ * @count: the number of bytes that will be skipped from the stream
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: location to store the error occurring, or %NULL to ignore
+ *
+ * Tries to skip @count bytes from the stream. Will block during the operation.
+ *
+ * This is identical to g_input_stream_read(), 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.
+ *
+ * This function is optional for inherited classes, as the default implementation
+ * emulates it using read.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_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.
+ *
+ * Returns: Number of bytes skipped, or -1 on error
+ */
+
+
+/**
+ * g_input_stream_skip_async:
+ * @stream: A #GInputStream.
+ * @count: the number of bytes that will be skipped from the stream
+ * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async): callback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Request an asynchronous skip of @count bytes from the stream.
+ * When the operation is finished @callback will be called.
+ * You can then call g_input_stream_skip_finish() to get the result
+ * of the operation.
+ *
+ * During an async request no other sync and async calls are allowed,
+ * and will result in %G_IO_ERROR_PENDING errors.
+ *
+ * A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
+ *
+ * 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.
+ *
+ * Any outstanding i/o request with higher priority (lower numerical value)
+ * will be executed before an outstanding request with lower priority.
+ * Default priority is %G_PRIORITY_DEFAULT.
+ *
+ * The asynchronous 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.
+ */
+
+
+/**
+ * g_input_stream_skip_finish:
+ * @stream: a #GInputStream.
+ * @result: a #GAsyncResult.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Finishes a stream skip operation.
+ *
+ * Returns: the size of the bytes skipped, or %-1 on error.
+ */
+
+
+/**
+ * g_io_error_from_errno:
+ * @err_no: Error number as defined in errno.h.
+ *
+ * Converts errno.h error codes into GIO error codes.
+ *
+ * Returns: #GIOErrorEnum value for the given errno.h error number.
+ */
+
+
+/**
+ * g_io_error_from_win32_error:
+ * @error_code: Windows error number.
+ *
+ * Converts some common error codes into GIO error codes. The
+ * fallback value G_IO_ERROR_FAILED is returned for error codes not
+ * handled.
+ *
+ * Returns: #GIOErrorEnum value for the given error number.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_io_error_quark:
+ *
+ * Gets the GIO Error Quark.
+ *
+ * Returns: a #GQuark.
+ */
+
+
+/**
+ * g_io_extension_get_name:
+ * @extension: a #GIOExtension
+ *
+ * Gets the name under which @extension was registered.
+ *
+ * Note that the same type may be registered as extension
+ * for multiple extension points, under different names.
+ *
+ * Returns: the name of @extension.
+ */
+
+
+/**
+ * g_io_extension_get_priority:
+ * @extension: a #GIOExtension
+ *
+ * Gets the priority with which @extension was registered.
+ *
+ * Returns: the priority of @extension
+ */
+
+
+/**
+ * g_io_extension_get_type:
+ * @extension: a #GIOExtension
+ *
+ * Gets the type associated with @extension.
+ *
+ * Returns: the type of @extension
+ */
+
+
+/**
+ * g_io_extension_point_get_extension_by_name:
+ * @extension_point: a #GIOExtensionPoint
+ * @name: the name of the extension to get
+ *
+ * Finds a #GIOExtension for an extension point by name.
+ *
+ * given name, or %NULL if there is no extension with that name
+ *
+ * Returns: (transfer none): the #GIOExtension for @extension_point that has the
+ */
+
+
+/**
+ * g_io_extension_point_get_extensions:
+ * @extension_point: a #GIOExtensionPoint
+ *
+ * Gets a list of all extensions that implement this extension point.
+ * The list is sorted by priority, beginning with the highest priority.
+ *
+ * #GIOExtension<!-- -->s. The list is owned by GIO and should not be
+ * modified.
+ *
+ * Returns: (element-type GIOExtension) (transfer none): a #GList of
+ */
+
+
+/**
+ * g_io_extension_point_get_required_type:
+ * @extension_point: a #GIOExtensionPoint
+ *
+ * Gets the required type for @extension_point.
+ *
+ * or #G_TYPE_INVALID if the extension point has no required type
+ *
+ * Returns: the #GType that all implementations must have,
+ */
+
+
+/**
+ * g_io_extension_point_implement:
+ * @extension_point_name: the name of the extension point
+ * @type: the #GType to register as extension
+ * @extension_name: the name for the extension
+ * @priority: the priority for the extension
+ *
+ * Registers @type as extension for the extension point with name
+ * @extension_point_name.
+ *
+ * If @type has already been registered as an extension for this
+ * extension point, the existing #GIOExtension object is returned.
+ *
+ * Returns: (transfer none): a #GIOExtension object for #GType
+ */
+
+
+/**
+ * g_io_extension_point_lookup:
+ * @name: the name of the extension point
+ *
+ * Looks up an existing extension point.
+ *
+ * is no registered extension point with the given name.
+ *
+ * Returns: (transfer none): the #GIOExtensionPoint, or %NULL if there
+ */
+
+
+/**
+ * g_io_extension_point_register:
+ * @name: The name of the extension point
+ *
+ * Registers an extension point.
+ *
+ * owned by GIO and should not be freed.
+ *
+ * Returns: (transfer none): the new #GIOExtensionPoint. This object is
+ */
+
+
+/**
+ * g_io_extension_point_set_required_type:
+ * @extension_point: a #GIOExtensionPoint
+ * @type: the #GType to require
+ *
+ * Sets the required type for @extension_point to @type.
+ * All implementations must henceforth have this type.
+ */
+
+
+/**
+ * g_io_extension_ref_class:
+ * @extension: a #GIOExtension
+ *
+ * Gets a reference to the class for the type that is
+ * associated with @extension.
+ *
+ * Returns: (transfer full): the #GTypeClass for the type of @extension
+ */
+
+
+/**
+ * g_io_module_load:
+ * @module: a #GIOModule.
+ *
+ * Required API for GIO modules to implement.
+ * This function is ran after the module has been loaded into GIO,
+ * to initialize the module.
+ */
+
+
+/**
+ * g_io_module_new:
+ * @filename: filename of the shared library module.
+ *
+ * Creates a new GIOModule that will load the specific
+ * shared library when in use.
+ *
+ * or %NULL on error.
+ *
+ * Returns: a #GIOModule from given @filename,
+ */
+
+
+/**
+ * g_io_module_query:
+ *
+ * Optional API for GIO modules to implement.
+ *
+ * Should return a list of all the extension points that may be
+ * implemented in this module.
+ *
+ * This method will not be called in normal use, however it may be
+ * called when probing existing modules and recording which extension
+ * points that this model is used for. This means we won't have to
+ * load and initialze this module unless its needed.
+ *
+ * If this function is not implemented by the module the module will
+ * always be loaded, initialized and then unloaded on application startup
+ * so that it can register its extension points during init.
+ *
+ * Note that a module need not actually implement all the extension points
+ * that g_io_module_query returns, since the exact list of extension may
+ * depend on runtime issues. However all extension points actually implemented
+ * must be returned by g_io_module_query() (if defined).
+ *
+ * When installing a module that implements g_io_module_query you must
+ * run gio-querymodules in order to build the cache files required for
+ * lazy loading.
+ *
+ * extension points of the module. The array must be suitable for
+ * freeing with g_strfreev().
+ *
+ * Returns: (transfer full): A %NULL-terminated array of strings, listing the supported
+ * Since: 2.24
+ */
+
+
+/**
+ * g_io_module_scope_block:
+ * @scope: a module loading scope
+ * @basename: the basename to block
+ *
+ * Block modules with the given @basename from being loaded when
+ * this scope is used with g_io_modules_scan_all_in_directory_with_scope()
+ * or g_io_modules_load_all_in_directory_with_scope().
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_io_module_scope_free:
+ * @scope: a module loading scope
+ *
+ * Free a module scope.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_io_module_scope_new:
+ * @flags: flags for the new scope
+ *
+ * Create a new scope for loading of IO modules. A scope can be used for
+ * blocking duplicate modules, or blocking a module you don't want to load.
+ *
+ * Specify the %G_IO_MODULE_SCOPE_BLOCK_DUPLICATES flag to block modules
+ * which have the same base name as a module that has already been seen
+ * in this scope.
+ *
+ * Returns: (transfer full): the new module scope
+ * Since: 2.30
+ */
+
+
+/**
+ * g_io_module_unload:
+ * @module: a #GIOModule.
+ *
+ * Required API for GIO modules to implement.
+ * This function is ran when the module is being unloaded from GIO,
+ * to finalize the module.
+ */
+
+
+/**
+ * g_io_modules_load_all_in_directory:
+ * @dirname: pathname for a directory containing modules to load.
+ *
+ * Loads all the modules in the specified directory.
+ *
+ * If don't require all modules to be initialized (and thus registering
+ * all gtypes) then you can use g_io_modules_scan_all_in_directory()
+ * which allows delayed/lazy loading of modules.
+ *
+ * from the directory,
+ * All the modules are loaded into memory, if you want to
+ * unload them (enabling on-demand loading) you must call
+ * g_type_module_unuse() on all the modules. Free the list
+ * with g_list_free().
+ *
+ * Returns: (element-type GIOModule) (transfer full): a list of #GIOModules loaded
+ */
+
+
+/**
+ * g_io_modules_load_all_in_directory_with_scope:
+ * @dirname: pathname for a directory containing modules to load.
+ * @scope: a scope to use when scanning the modules.
+ *
+ * Loads all the modules in the specified directory.
+ *
+ * If don't require all modules to be initialized (and thus registering
+ * all gtypes) then you can use g_io_modules_scan_all_in_directory()
+ * which allows delayed/lazy loading of modules.
+ *
+ * from the directory,
+ * All the modules are loaded into memory, if you want to
+ * unload them (enabling on-demand loading) you must call
+ * g_type_module_unuse() on all the modules. Free the list
+ * with g_list_free().
+ *
+ * Returns: (element-type GIOModule) (transfer full): a list of #GIOModules loaded
+ * Since: 2.30
+ */
+
+
+/**
+ * g_io_modules_scan_all_in_directory:
+ * @dirname: pathname for a directory containing modules to scan.
+ *
+ * Scans all the modules in the specified directory, ensuring that
+ * any extension point implemented by a module is registered.
+ *
+ * This may not actually load and initialize all the types in each
+ * module, some modules may be lazily loaded and initialized when
+ * an extension point it implementes is used with e.g.
+ * g_io_extension_point_get_extensions() or
+ * g_io_extension_point_get_extension_by_name().
+ *
+ * If you need to guarantee that all types are loaded in all the modules,
+ * use g_io_modules_load_all_in_directory().
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * g_io_modules_scan_all_in_directory_with_scope:
+ * @dirname: pathname for a directory containing modules to scan.
+ * @scope: a scope to use when scanning the modules
+ *
+ * Scans all the modules in the specified directory, ensuring that
+ * any extension point implemented by a module is registered.
+ *
+ * This may not actually load and initialize all the types in each
+ * module, some modules may be lazily loaded and initialized when
+ * an extension point it implementes is used with e.g.
+ * g_io_extension_point_get_extensions() or
+ * g_io_extension_point_get_extension_by_name().
+ *
+ * If you need to guarantee that all types are loaded in all the modules,
+ * use g_io_modules_load_all_in_directory().
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_io_scheduler_cancel_all_jobs:
+ *
+ * Cancels all cancellable I/O jobs.
+ *
+ * A job is cancellable if a #GCancellable was passed into
+ * g_io_scheduler_push_job().
+ */
+
+
+/**
+ * g_io_scheduler_job_send_to_mainloop:
+ * @job: a #GIOSchedulerJob
+ * @func: a #GSourceFunc callback that will be called in the original thread
+ * @user_data: data to pass to @func
+ * @notify: (allow-none): a #GDestroyNotify for @user_data, or %NULL
+ *
+ * Used from an I/O job to send a callback to be run in the thread
+ * that the job was started from, waiting for the result (and thus
+ * blocking the I/O job).
+ *
+ * Returns: The return value of @func
+ */
+
+
+/**
+ * g_io_scheduler_job_send_to_mainloop_async:
+ * @job: a #GIOSchedulerJob
+ * @func: a #GSourceFunc callback that will be called in the original thread
+ * @user_data: data to pass to @func
+ * @notify: (allow-none): a #GDestroyNotify for @user_data, or %NULL
+ *
+ * Used from an I/O job to send a callback to be run asynchronously in
+ * the thread that the job was started from. The callback will be run
+ * when the main loop is available, but at that time the I/O job might
+ * have finished. The return value from the callback is ignored.
+ *
+ * Note that if you are passing the @user_data from g_io_scheduler_push_job()
+ * on to this function you have to ensure that it is not freed before
+ * @func is called, either by passing %NULL as @notify to
+ * g_io_scheduler_push_job() or by using refcounting for @user_data.
+ */
+
+
+/**
+ * g_io_scheduler_push_job:
+ * @job_func: a #GIOSchedulerJobFunc.
+ * @user_data: data to pass to @job_func
+ * @notify: (allow-none): a #GDestroyNotify for @user_data, or %NULL
+ * @io_priority: the <link linkend="gioscheduler">I/O priority</link> of the request.
+ * @cancellable: optional #GCancellable object, %NULL to ignore.
+ *
+ * Schedules the I/O job to run in another thread.
+ *
+ * @notify will be called on @user_data after @job_func has returned,
+ * regardless whether the job was cancelled or has run to completion.
+ *
+ * If @cancellable is not %NULL, it can be used to cancel the I/O job
+ * by calling g_cancellable_cancel() or by calling
+ * g_io_scheduler_cancel_all_jobs().
+ */
+
+
+/**
+ * g_io_stream_clear_pending:
+ * @stream: a #GIOStream
+ *
+ * Clears the pending flag on @stream.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_io_stream_close:
+ * @stream: a #GIOStream
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
+ * @error: location to store the error occurring, or %NULL to ignore
+ *
+ * Closes the stream, releasing resources related to it. This will also
+ * closes the individual input and output streams, if they are not already
+ * closed.
+ *
+ * Once the stream is closed, all other operations will return
+ * %G_IO_ERROR_CLOSED. Closing a stream multiple times will not
+ * return an error.
+ *
+ * Closing a stream will automatically flush any outstanding buffers
+ * in the stream.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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 %G_IO_ERROR_CLOSED for all operations.
+ * Still, it is important to check and report the error to the user,
+ * otherwise there might be a loss of data as all data might not be written.
+ *
+ * If @cancellable is not NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_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.
+ *
+ * The default implementation of this method just calls close on the
+ * individual input/output streams.
+ *
+ * Returns: %TRUE on success, %FALSE on failure
+ * Since: 2.22
+ */
+
+
+/**
+ * g_io_stream_close_async:
+ * @stream: a #GIOStream
+ * @io_priority: the io priority of the request
+ * @cancellable: (allow-none): optional cancellable object
+ * @callback: (scope async): callback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Requests an asynchronous close of the stream, releasing resources
+ * related to it. When the operation is finished @callback will be
+ * called. You can then call g_io_stream_close_finish() to get
+ * the result of the operation.
+ *
+ * For behaviour details see g_io_stream_close().
+ *
+ * The asynchronous 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.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_io_stream_close_finish:
+ * @stream: a #GIOStream
+ * @result: a #GAsyncResult
+ * @error: a #GError location to store the error occurring, or %NULL to ignore
+ *
+ * Closes a stream.
+ *
+ * Returns: %TRUE if stream was successfully closed, %FALSE otherwise.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_io_stream_get_input_stream:
+ * @stream: a #GIOStream
+ *
+ * Gets the input stream for this object. This is used
+ * for reading.
+ *
+ * Do not free.
+ *
+ * Returns: (transfer none): a #GInputStream, owned by the #GIOStream.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_io_stream_get_output_stream:
+ * @stream: a #GIOStream
+ *
+ * Gets the output stream for this object. This is used for
+ * writing.
+ *
+ * Do not free.
+ *
+ * Returns: (transfer none): a #GOutputStream, owned by the #GIOStream.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_io_stream_has_pending:
+ * @stream: a #GIOStream
+ *
+ * Checks if a stream has pending actions.
+ *
+ * Returns: %TRUE if @stream has pending actions.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_io_stream_is_closed:
+ * @stream: a #GIOStream
+ *
+ * Checks if a stream is closed.
+ *
+ * Returns: %TRUE if the stream is closed.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_io_stream_set_pending:
+ * @stream: a #GIOStream
+ * @error: a #GError location to store the error occurring, or %NULL to ignore
+ *
+ * Sets @stream to have actions pending. If the pending flag is
+ * already set or @stream is closed, it will return %FALSE and set
+ * @error.
+ *
+ * Returns: %TRUE if pending was previously unset and is now set.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_io_stream_splice_async:
+ * @stream1: a #GIOStream.
+ * @stream2: a #GIOStream.
+ * @flags: a set of #GIOStreamSpliceFlags.
+ * @io_priority: the io priority of the request.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async): a #GAsyncReadyCallback.
+ * @user_data: (closure): user data passed to @callback.
+ *
+ * Asyncronously splice the output stream of @stream1 to the input stream of
+ * @stream2, and splice the output stream of @stream2 to the input stream of
+ * @stream1.
+ *
+ * When the operation is finished @callback will be called.
+ * You can then call g_io_stream_splice_finish() to get the
+ * result of the operation.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_io_stream_splice_finish:
+ * @result: a #GAsyncResult.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Finishes an asynchronous io stream splice operation.
+ *
+ * Returns: %TRUE on success, %FALSE otherwise.
+ * Since: 2.28
+ */
+
+
+/**
+ * g_keyfile_settings_backend_new:
+ * @filename: the filename of the keyfile
+ * @root_path: the path under which all settings keys appear
+ * @root_group: (allow-none): the group name corresponding to @root_path, or %NULL
+ *
+ * Creates a keyfile-backed #GSettingsBackend.
+ *
+ * The filename of the keyfile to use is given by @filename.
+ *
+ * All settings read to or written from the backend must fall under the
+ * path given in @root_path (which must start and end with a slash and
+ * not contain two consecutive slashes).  @root_path may be "/".
+ *
+ * If @root_group is non-%NULL then it specifies the name of the keyfile
+ * group used for keys that are written directly below @root_path.  For
+ * example, if @root_path is "/apps/example/" and @root_group is
+ * "toplevel", then settings the key "/apps/example/enabled" to a value
+ * of %TRUE will cause the following to appear in the keyfile:
+ *
+ * |[
+ * [toplevel]
+ * enabled=true
+ * ]|
+ *
+ * If @root_group is %NULL then it is not permitted to store keys
+ * directly below the @root_path.
+ *
+ * For keys not stored directly below @root_path (ie: in a sub-path),
+ * the name of the subpath (with the final slash stripped) is used as
+ * the name of the keyfile group.  To continue the example, if
+ * "/apps/example/profiles/default/font-size" were set to
+ * 12 then the following would appear in the keyfile:
+ *
+ * |[
+ * [profiles/default]
+ * font-size=12
+ * ]|
+ *
+ * The backend will refuse writes (and return writability as being
+ * %FALSE) for keys outside of @root_path and, in the event that
+ * @root_group is %NULL, also for keys directly under @root_path.
+ * Writes will also be refused if the backend detects that it has the
+ * inability to rewrite the keyfile (ie: the containing directory is not
+ * writable).
+ *
+ * There is no checking done for your key namespace clashing with the
+ * syntax of the key file format.  For example, if you have '[' or ']'
+ * characters in your path names or '=' in your key names you may be in
+ * trouble.
+ *
+ * Returns: (transfer full): a keyfile-backed #GSettingsBackend
+ */
+
+
+/**
+ * g_loadable_icon_load:
+ * @icon: a #GLoadableIcon.
+ * @size: an integer.
+ * @type: (out) (allow-none): a location to store the type of the loaded icon, %NULL to ignore.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Loads a loadable icon. For the asynchronous version of this function,
+ * see g_loadable_icon_load_async().
+ *
+ * Returns: (transfer full): a #GInputStream to read the icon from.
+ */
+
+
+/**
+ * g_loadable_icon_load_async:
+ * @icon: a #GLoadableIcon.
+ * @size: an integer.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Loads an icon asynchronously. To finish this function, see
+ * g_loadable_icon_load_finish(). For the synchronous, blocking
+ * version of this function, see g_loadable_icon_load().
+ */
+
+
+/**
+ * g_loadable_icon_load_finish:
+ * @icon: a #GLoadableIcon.
+ * @res: a #GAsyncResult.
+ * @type: a location to store the type of the loaded icon, %NULL to ignore.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Finishes an asynchronous icon load started in g_loadable_icon_load_async().
+ *
+ * Returns: (transfer full): a #GInputStream to read the icon from.
+ */
+
+
+/**
+ * g_local_vfs_new:
+ *
+ * Returns a new #GVfs handle for a local vfs.
+ *
+ * Returns: a new #GVfs handle.
+ */
+
+
+/**
+ * g_main_destroy:
+ * @loop: a #GMainLoop
+ *
+ * Frees the memory allocated for the #GMainLoop.
+ *
+ * Deprecated: 2.2: Use g_main_loop_unref() instead
+ */
+
+
+/**
+ * g_main_is_running:
+ * @loop: a #GMainLoop
+ *
+ * Checks if the main loop is running.
+ *
+ * Returns: %TRUE if the main loop is running
+ * Deprecated: 2.2: Use g_main_loop_is_running() instead
+ */
+
+
+/**
+ * g_main_iteration:
+ * @may_block: set to %TRUE if it should block (i.e. wait) until an event source becomes ready. It will return after an event source has been processed. If set to %FALSE it will return immediately if no event source is ready to be processed.
+ *
+ * Runs a single iteration for the default #GMainContext.
+ *
+ * Returns: %TRUE if more events are pending.
+ * Deprecated: 2.2: Use g_main_context_iteration() instead.
+ */
+
+
+/**
+ * g_main_new:
+ * @is_running: set to %TRUE to indicate that the loop is running. This is not very important since calling g_main_run() will set this to %TRUE anyway.
+ *
+ * Creates a new #GMainLoop for th default main context.
+ *
+ * Returns: a new #GMainLoop
+ * Deprecated: 2.2: Use g_main_loop_new() instead
+ */
+
+
+/**
+ * g_main_pending:
+ *
+ * Checks if any events are pending for the default #GMainContext
+ * (i.e. ready to be processed).
+ *
+ *
+ * Deprected: 2.2: Use g_main_context_pending() instead.
+ *
+ * Returns: %TRUE if any events are pending.
+ */
+
+
+/**
+ * g_main_quit:
+ * @loop: a #GMainLoop
+ *
+ * Stops the #GMainLoop.
+ * If g_main_run() was called to run the #GMainLoop, it will now return.
+ *
+ * Deprecated: 2.2: Use g_main_loop_quit() instead
+ */
+
+
+/**
+ * g_main_run:
+ * @loop: a #GMainLoop
+ *
+ * Runs a main loop until it stops running.
+ *
+ * Deprecated: 2.2: Use g_main_loop_run() instead
+ */
+
+
+/**
+ * g_main_set_poll_func:
+ * @func: the function to call to poll all file descriptors
+ *
+ * Sets the function to use for the handle polling of file descriptors
+ * for the default main context.
+ *
+ * Deprecated: 2.2: Use g_main_context_set_poll_func() again
+ */
+
+
+/**
+ * g_memory_input_stream_add_data:
+ * @stream: a #GMemoryInputStream
+ * @data: (array length=len) (element-type guint8) (transfer full): input data
+ * @len: length of the data, may be -1 if @data is a nul-terminated string
+ * @destroy: (allow-none): function that is called to free @data, or %NULL
+ *
+ * Appends @data to data that can be read from the input stream
+ */
+
+
+/**
+ * g_memory_input_stream_new:
+ *
+ * Creates a new empty #GMemoryInputStream.
+ *
+ * Returns: a new #GInputStream
+ */
+
+
+/**
+ * g_memory_input_stream_new_from_data:
+ * @data: (array length=len) (element-type guint8) (transfer full): input data
+ * @len: length of the data, may be -1 if @data is a nul-terminated string
+ * @destroy: (allow-none): function that is called to free @data, or %NULL
+ *
+ * Creates a new #GMemoryInputStream with data in memory of a given size.
+ *
+ * Returns: new #GInputStream read from @data of @len bytes.
+ */
+
+
+/**
+ * g_memory_output_stream_get_data:
+ * @ostream: a #GMemoryOutputStream
+ *
+ * Gets any loaded data from the @ostream.
+ *
+ * Note that the returned pointer may become invalid on the next
+ * write or truncate operation on the stream.
+ *
+ * Returns: (transfer none): pointer to the stream's data
+ */
+
+
+/**
+ * g_memory_output_stream_get_data_size:
+ * @ostream: a #GMemoryOutputStream
+ *
+ * Returns the number of bytes from the start up
+ * to including the last byte written in the stream
+ * that has not been truncated away.
+ *
+ * Returns: the number of bytes written to the stream
+ * Since: 2.18
+ */
+
+
+/**
+ * g_memory_output_stream_get_size:
+ * @ostream: a #GMemoryOutputStream
+ *
+ * Gets the size of the currently allocated data area (available from
+ * g_memory_output_stream_get_data()). If the stream isn't
+ * growable (no realloc was passed to g_memory_output_stream_new()) then
+ * this is the maximum size of the stream and further writes
+ * will return %G_IO_ERROR_NO_SPACE.
+ *
+ * Note that for growable streams the returned size may become invalid on
+ * the next write or truncate operation on the stream.
+ *
+ * If you want the number of bytes currently written to the stream, use
+ * g_memory_output_stream_get_data_size().
+ *
+ * Returns: the number of bytes allocated for the data buffer
+ */
+
+
+/**
+ * g_memory_output_stream_new: (skip)
+ * @data: (allow-none): pointer to a chunk of memory to use, or %NULL
+ * @size: the size of @data
+ * @realloc_function: (allow-none): a function with realloc() semantics (like g_realloc()) to be called when @data needs to be grown, or %NULL
+ * @destroy_function: (allow-none): a function to be called on @data when the stream is finalized, or %NULL
+ *
+ * Creates a new #GMemoryOutputStream.
+ *
+ * If @data is non-%NULL, the stream  will use that for its internal storage.
+ * If @realloc_fn is non-%NULL, it will be used for resizing the internal
+ * storage when necessary. To construct a fixed-size output stream,
+ * pass %NULL as @realloc_fn.
+ *
+ * |[
+ * /&ast; a stream that can grow &ast;/
+ * stream = g_memory_output_stream_new (NULL, 0, realloc, free);
+ *
+ * /&ast; another stream that can grow &ast;/
+ * stream2 = g_memory_output_stream_new (NULL, 0, g_realloc, g_free);
+ *
+ * /&ast; a fixed-size stream &ast;/
+ * data = malloc (200);
+ * stream3 = g_memory_output_stream_new (data, 200, NULL, free);
+ * ]|
+ *
+ * Returns: A newly created #GMemoryOutputStream object.
+ */
+
+
+/**
+ * g_memory_output_stream_steal_data:
+ * @ostream: a #GMemoryOutputStream
+ *
+ * Gets any loaded data from the @ostream. Ownership of the data
+ * is transferred to the caller; when no longer needed it must be
+ * freed using the free function set in @ostream's
+ * #GMemoryOutputStream:destroy-function property.
+ *
+ * @ostream must be closed before calling this function.
+ *
+ * Returns: (transfer full): the stream's data
+ * Since: 2.26
+ */
+
+
+/**
+ * g_memory_settings_backend_new:
+ *
+ * Creates a memory-backed #GSettingsBackend.
+ *
+ * This backend allows changes to settings, but does not write them
+ * to any backing storage, so the next time you run your application,
+ * the memory backend will start out with the default values again.
+ *
+ * Returns: (transfer full): a newly created #GSettingsBackend
+ * Since: 2.28
+ */
+
+
+/**
+ * g_menu_append:
+ * @menu: a #GMenu
+ * @label: (allow-none): the section label, or %NULL
+ * @detailed_action: (allow-none): the detailed action string, or %NULL
+ *
+ * Convenience function for appending a normal menu item to the end of
+ * @menu.  Combine g_menu_new() and g_menu_insert_item() for a more
+ * flexible alternative.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_append_item:
+ * @menu: a #GMenu
+ * @item: a #GMenuItem to append
+ *
+ * Appends @item to the end of @menu.
+ *
+ * See g_menu_insert_item() for more information.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_append_section:
+ * @menu: a #GMenu
+ * @label: (allow-none): the section label, or %NULL
+ * @section: a #GMenuModel with the items of the section
+ *
+ * Convenience function for appending a section menu item to the end of
+ * @menu.  Combine g_menu_item_new_section() and g_menu_insert_item() for a
+ * more flexible alternative.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_append_submenu:
+ * @menu: a #GMenu
+ * @label: (allow-none): the section label, or %NULL
+ * @submenu: a #GMenuModel with the items of the submenu
+ *
+ * Convenience function for appending a submenu menu item to the end of
+ * @menu.  Combine g_menu_item_new_submenu() and g_menu_insert_item() for a
+ * more flexible alternative.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_attribute_iter_get_name:
+ * @iter: a #GMenuAttributeIter
+ *
+ * Gets the name of the attribute at the current iterator position, as
+ * a string.
+ *
+ * The iterator is not advanced.
+ *
+ * Returns: the name of the attribute
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_attribute_iter_get_next:
+ * @iter: a #GMenuAttributeIter
+ * @out_name: (out) (allow-none) (transfer none): the type of the attribute
+ * @value: (out) (allow-none) (transfer full): the attribute value
+ *
+ * This function combines g_menu_attribute_iter_next() with
+ * g_menu_attribute_iter_get_name() and g_menu_attribute_iter_get_value().
+ *
+ * First the iterator is advanced to the next (possibly first) attribute.
+ * If that fails, then %FALSE is returned and there are no other
+ * effects.
+ *
+ * If successful, @name and @value are set to the name and value of the
+ * attribute that has just been advanced to.  At this point,
+ * g_menu_attribute_iter_get_name() and g_menu_attribute_iter_get_value() will
+ * return the same values again.
+ *
+ * The value returned in @name remains valid for as long as the iterator
+ * remains at the current position.  The value returned in @value must
+ * be unreffed using g_variant_unref() when it is no longer in use.
+ *
+ * attribute
+ *
+ * Returns: %TRUE on success, or %FALSE if there is no additional
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_attribute_iter_get_value:
+ * @iter: a #GMenuAttributeIter
+ *
+ * Gets the value of the attribute at the current iterator position.
+ *
+ * The iterator is not advanced.
+ *
+ * Returns: (transfer full): the value of the current attribute
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_attribute_iter_next:
+ * @iter: a #GMenuAttributeIter
+ *
+ * Attempts to advance the iterator to the next (possibly first)
+ * attribute.
+ *
+ * %TRUE is returned on success, or %FALSE if there are no more
+ * attributes.
+ *
+ * You must call this function when you first acquire the iterator
+ * to advance it to the first attribute (and determine if the first
+ * attribute exists at all).
+ *
+ * Returns: %TRUE on success, or %FALSE when there are no more attributes
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_freeze:
+ * @menu: a #GMenu
+ *
+ * Marks @menu as frozen.
+ *
+ * After the menu is frozen, it is an error to attempt to make any
+ * changes to it.  In effect this means that the #GMenu API must no
+ * longer be used.
+ *
+ * This function causes g_menu_model_is_mutable() to begin returning
+ * %FALSE, which has some positive performance implications.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_insert:
+ * @menu: a #GMenu
+ * @position: the position at which to insert the item
+ * @label: (allow-none): the section label, or %NULL
+ * @detailed_action: (allow-none): the detailed action string, or %NULL
+ *
+ * Convenience function for inserting a normal menu item into @menu.
+ * Combine g_menu_new() and g_menu_insert_item() for a more flexible
+ * alternative.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_insert_item:
+ * @menu: a #GMenu
+ * @position: the position at which to insert the item
+ * @item: the #GMenuItem to insert
+ *
+ * Inserts @item into @menu.
+ *
+ * The "insertion" is actually done by copying all of the attribute and
+ * link values of @item and using them to form a new item within @menu.
+ * As such, @item itself is not really inserted, but rather, a menu item
+ * that is exactly the same as the one presently described by @item.
+ *
+ * This means that @item is essentially useless after the insertion
+ * occurs.  Any changes you make to it are ignored unless it is inserted
+ * again (at which point its updated values will be copied).
+ *
+ * You should probably just free @item once you're done.
+ *
+ * There are many convenience functions to take care of common cases.
+ * See g_menu_insert(), g_menu_insert_section() and
+ * g_menu_insert_submenu() as well as "prepend" and "append" variants of
+ * each of these functions.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_insert_section:
+ * @menu: a #GMenu
+ * @position: the position at which to insert the item
+ * @label: (allow-none): the section label, or %NULL
+ * @section: a #GMenuModel with the items of the section
+ *
+ * Convenience function for inserting a section menu item into @menu.
+ * Combine g_menu_item_new_section() and g_menu_insert_item() for a more
+ * flexible alternative.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_insert_submenu:
+ * @menu: a #GMenu
+ * @position: the position at which to insert the item
+ * @label: (allow-none): the section label, or %NULL
+ * @submenu: a #GMenuModel with the items of the submenu
+ *
+ * Convenience function for inserting a submenu menu item into @menu.
+ * Combine g_menu_item_new_submenu() and g_menu_insert_item() for a more
+ * flexible alternative.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_item_new:
+ * @label: (allow-none): the section label, or %NULL
+ * @detailed_action: (allow-none): the detailed action string, or %NULL
+ *
+ * Creates a new #GMenuItem.
+ *
+ * If @label is non-%NULL it is used to set the "label" attribute of the
+ * new item.
+ *
+ * If @detailed_action is non-%NULL it is used to set the "action" and
+ * possibly the "target" attribute of the new item.  See
+ * g_menu_item_set_detailed_action() for more information.
+ *
+ * Returns: a new #GMenuItem
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_item_new_section:
+ * @label: (allow-none): the section label, or %NULL
+ * @section: a #GMenuModel with the items of the section
+ *
+ * Creates a new #GMenuItem representing a section.
+ *
+ * This is a convenience API around g_menu_item_new() and
+ * g_menu_item_set_section().
+ *
+ * The effect of having one menu appear as a section of another is
+ * exactly as it sounds: the items from @section become a direct part of
+ * the menu that @menu_item is added to.
+ *
+ * Visual separation is typically displayed between two non-empty
+ * sections.  If @label is non-%NULL then it will be encorporated into
+ * this visual indication.  This allows for labeled subsections of a
+ * menu.
+ *
+ * As a simple example, consider a typical "Edit" menu from a simple
+ * program.  It probably contains an "Undo" and "Redo" item, followed by
+ * a separator, followed by "Cut", "Copy" and "Paste".
+ *
+ * This would be accomplished by creating three #GMenu instances.  The
+ * first would be populated with the "Undo" and "Redo" items, and the
+ * second with the "Cut", "Copy" and "Paste" items.  The first and
+ * second menus would then be added as submenus of the third.  In XML
+ * format, this would look something like the following:
+ *
+ * <informalexample><programlisting><![CDATA[
+ * <menu id='edit-menu'>
+ * <section>
+ * <item label='Undo'/>
+ * <item label='Redo'/>
+ * </section>
+ * <section>
+ * <item label='Cut'/>
+ * <item label='Copy'/>
+ * <item label='Paste'/>
+ * </section>
+ * </menu>
+ * ]]></programlisting></informalexample>
+ *
+ * The following example is exactly equivalent.  It is more illustrative
+ * of the exact relationship between the menus and items (keeping in
+ * mind that the 'link' element defines a new menu that is linked to the
+ * containing one).  The style of the second example is more verbose and
+ * difficult to read (and therefore not recommended except for the
+ * purpose of understanding what is really going on).
+ *
+ * <informalexample><programlisting><![CDATA[
+ * <menu id='edit-menu'>
+ * <item>
+ * <link name='section'>
+ * <item label='Undo'/>
+ * <item label='Redo'/>
+ * </link>
+ * </item>
+ * <item>
+ * <link name='section'>
+ * <item label='Cut'/>
+ * <item label='Copy'/>
+ * <item label='Paste'/>
+ * </link>
+ * </item>
+ * </menu>
+ * ]]></programlisting></informalexample>
+ *
+ * Returns: a new #GMenuItem
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_item_new_submenu:
+ * @label: (allow-none): the section label, or %NULL
+ * @submenu: a #GMenuModel with the items of the submenu
+ *
+ * Creates a new #GMenuItem representing a submenu.
+ *
+ * This is a convenience API around g_menu_item_new() and
+ * g_menu_item_set_submenu().
+ *
+ * Returns: a new #GMenuItem
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_item_set_action_and_target:
+ * @menu_item: a #GMenuItem
+ * @action: (allow-none): the name of the action for this item
+ * @format_string: (allow-none): a GVariant format string
+ * @...: positional parameters, as per @format_string
+ *
+ * Sets or unsets the "action" and "target" attributes of @menu_item.
+ *
+ * If @action is %NULL then both the "action" and "target" attributes
+ * are unset (and @format_string is ignored along with the positional
+ * parameters).
+ *
+ * If @action is non-%NULL then the "action" attribute is set.
+ * @format_string is then inspected.  If it is non-%NULL then the proper
+ * position parameters are collected to create a #GVariant instance to
+ * use as the target value.  If it is %NULL then the positional
+ * parameters are ignored and the "target" attribute is unset.
+ *
+ * See also g_menu_item_set_action_and_target_value() for an equivalent
+ * call that directly accepts a #GVariant.  See
+ * g_menu_item_set_detailed_action() for a more convenient version that
+ * works with string-typed targets.
+ *
+ * See also g_menu_item_set_action_and_target_value() for a
+ * description of the semantics of the action and target attributes.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_item_set_action_and_target_value:
+ * @menu_item: a #GMenuItem
+ * @action: (allow-none): the name of the action for this item
+ * @target_value: (allow-none): a #GVariant to use as the action target
+ *
+ * Sets or unsets the "action" and "target" attributes of @menu_item.
+ *
+ * If @action is %NULL then both the "action" and "target" attributes
+ * are unset (and @target_value is ignored).
+ *
+ * If @action is non-%NULL then the "action" attribute is set.  The
+ * "target" attribute is then set to the value of @target_value if it is
+ * non-%NULL or unset otherwise.
+ *
+ * Normal menu items (ie: not submenu, section or other custom item
+ * types) are expected to have the "action" attribute set to identify
+ * the action that they are associated with.  The state type of the
+ * action help to determine the disposition of the menu item.  See
+ * #GAction and #GActionGroup for an overview of actions.
+ *
+ * In general, clicking on the menu item will result in activation of
+ * the named action with the "target" attribute given as the parameter
+ * to the action invocation.  If the "target" attribute is not set then
+ * the action is invoked with no parameter.
+ *
+ * If the action has no state then the menu item is usually drawn as a
+ * plain menu item (ie: with no additional decoration).
+ *
+ * If the action has a boolean state then the menu item is usually drawn
+ * as a toggle menu item (ie: with a checkmark or equivalent
+ * indication).  The item should be marked as 'toggled' or 'checked'
+ * when the boolean state is %TRUE.
+ *
+ * If the action has a string state then the menu item is usually drawn
+ * as a radio menu item (ie: with a radio bullet or equivalent
+ * indication).  The item should be marked as 'selected' when the string
+ * state is equal to the value of the @target property.
+ *
+ * See g_menu_item_set_action_and_target() or
+ * g_menu_item_set_detailed_action() for two equivalent calls that are
+ * probably more convenient for most uses.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_item_set_attribute:
+ * @menu_item: a #GMenuItem
+ * @attribute: the attribute to set
+ * @format_string: (allow-none): a #GVariant format string, or %NULL
+ * @...: positional parameters, as per @format_string
+ *
+ * Sets or unsets an attribute on @menu_item.
+ *
+ * The attribute to set or unset is specified by @attribute. This
+ * can be one of the standard attribute names %G_MENU_ATTRIBUTE_LABEL,
+ * %G_MENU_ATTRIBUTE_ACTION, %G_MENU_ATTRIBUTE_TARGET, or a custom
+ * attribute name.
+ * Attribute names are restricted to lowercase characters, numbers
+ * and '-'. Furthermore, the names must begin with a lowercase character,
+ * must not end with a '-', and must not contain consecutive dashes.
+ *
+ * If @format_string is non-%NULL then the proper position parameters
+ * are collected to create a #GVariant instance to use as the attribute
+ * value.  If it is %NULL then the positional parameterrs are ignored
+ * and the named attribute is unset.
+ *
+ * See also g_menu_item_set_attribute_value() for an equivalent call
+ * that directly accepts a #GVariant.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_item_set_attribute_value:
+ * @menu_item: a #GMenuItem
+ * @attribute: the attribute to set
+ * @value: (allow-none): a #GVariant to use as the value, or %NULL
+ *
+ * Sets or unsets an attribute on @menu_item.
+ *
+ * The attribute to set or unset is specified by @attribute. This
+ * can be one of the standard attribute names %G_MENU_ATTRIBUTE_LABEL,
+ * %G_MENU_ATTRIBUTE_ACTION, %G_MENU_ATTRIBUTE_TARGET, or a custom
+ * attribute name.
+ * Attribute names are restricted to lowercase characters, numbers
+ * and '-'. Furthermore, the names must begin with a lowercase character,
+ * must not end with a '-', and must not contain consecutive dashes.
+ *
+ * must consist only of lowercase
+ * ASCII characters, digits and '-'.
+ *
+ * If @value is non-%NULL then it is used as the new value for the
+ * attribute.  If @value is %NULL then the attribute is unset. If
+ * the @value #GVariant is floating, it is consumed.
+ *
+ * See also g_menu_item_set_attribute() for a more convenient way to do
+ * the same.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_item_set_detailed_action:
+ * @menu_item: a #GMenuItem
+ * @detailed_action: the "detailed" action string
+ *
+ * Sets the "action" and possibly the "target" attribute of @menu_item.
+ *
+ * If @detailed_action contains a double colon ("::") then it is used as
+ * a separator between an action name and a target string.  In this
+ * case, this call is equivalent to calling
+ * g_menu_item_set_action_and_target() with the part before the "::" and
+ * with a string-type #GVariant containing the part following the "::".
+ *
+ * If @detailed_action doesn't contain "::" then the action is set to
+ * the given string (verbatim) and the target value is unset.
+ *
+ * See g_menu_item_set_action_and_target() or
+ * g_menu_item_set_action_and_target_value() for more flexible (but
+ * slightly less convenient) alternatives.
+ *
+ * See also g_menu_item_set_action_and_target_value() for a description of
+ * the semantics of the action and target attributes.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_item_set_label:
+ * @menu_item: a #GMenuItem
+ * @label: (allow-none): the label to set, or %NULL to unset
+ *
+ * Sets or unsets the "label" attribute of @menu_item.
+ *
+ * If @label is non-%NULL it is used as the label for the menu item.  If
+ * it is %NULL then the label attribute is unset.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_item_set_link:
+ * @menu_item: a #GMenuItem
+ * @link: type of link to establish or unset
+ * @model: (allow-none): the #GMenuModel to link to (or %NULL to unset)
+ *
+ * Creates a link from @menu_item to @model if non-%NULL, or unsets it.
+ *
+ * Links are used to establish a relationship between a particular menu
+ * item and another menu.  For example, %G_MENU_LINK_SUBMENU is used to
+ * associate a submenu with a particular menu item, and %G_MENU_LINK_SECTION
+ * is used to create a section. Other types of link can be used, but there
+ * is no guarantee that clients will be able to make sense of them.
+ * Link types are restricted to lowercase characters, numbers
+ * and '-'. Furthermore, the names must begin with a lowercase character,
+ * must not end with a '-', and must not contain consecutive dashes.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_item_set_section:
+ * @menu_item: a #GMenuItem
+ * @section: (allow-none): a #GMenuModel, or %NULL
+ *
+ * Sets or unsets the "section" link of @menu_item to @section.
+ *
+ * The effect of having one menu appear as a section of another is
+ * exactly as it sounds: the items from @section become a direct part of
+ * the menu that @menu_item is added to.  See g_menu_item_new_section()
+ * for more information about what it means for a menu item to be a
+ * section.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_item_set_submenu:
+ * @menu_item: a #GMenuItem
+ * @submenu: (allow-none): a #GMenuModel, or %NULL
+ *
+ * Sets or unsets the "submenu" link of @menu_item to @submenu.
+ *
+ * If @submenu is non-%NULL, it is linked to.  If it is %NULL then the
+ * link is unset.
+ *
+ * The effect of having one menu appear as a submenu of another is
+ * exactly as it sounds.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_link_iter_get_name:
+ * @iter: a #GMenuLinkIter
+ *
+ * Gets the name of the link at the current iterator position.
+ *
+ * The iterator is not advanced.
+ *
+ * Returns: the type of the link
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_link_iter_get_next:
+ * @iter: a #GMenuLinkIter
+ * @out_link: (out) (allow-none) (transfer none): the name of the link
+ * @value: (out) (allow-none) (transfer full): the linked #GMenuModel
+ *
+ * This function combines g_menu_link_iter_next() with
+ * g_menu_link_iter_get_name() and g_menu_link_iter_get_value().
+ *
+ * First the iterator is advanced to the next (possibly first) link.
+ * If that fails, then %FALSE is returned and there are no other effects.
+ *
+ * If successful, @out_link and @value are set to the name and #GMenuModel
+ * of the link that has just been advanced to.  At this point,
+ * g_menu_link_iter_get_name() and g_menu_link_iter_get_value() will return the
+ * same values again.
+ *
+ * The value returned in @out_link remains valid for as long as the iterator
+ * remains at the current position.  The value returned in @value must
+ * be unreffed using g_object_unref() when it is no longer in use.
+ *
+ * Returns: %TRUE on success, or %FALSE if there is no additional link
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_link_iter_get_value:
+ * @iter: a #GMenuLinkIter
+ *
+ * Gets the linked #GMenuModel at the current iterator position.
+ *
+ * The iterator is not advanced.
+ *
+ * Returns: (transfer full): the #GMenuModel that is linked to
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_link_iter_next:
+ * @iter: a #GMenuLinkIter
+ *
+ * Attempts to advance the iterator to the next (possibly first)
+ * link.
+ *
+ * %TRUE is returned on success, or %FALSE if there are no more links.
+ *
+ * You must call this function when you first acquire the iterator to
+ * advance it to the first link (and determine if the first link exists
+ * at all).
+ *
+ * Returns: %TRUE on success, or %FALSE when there are no more links
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_model_get_item_attribute:
+ * @model: a #GMenuModel
+ * @item_index: the index of the item
+ * @attribute: the attribute to query
+ * @format_string: a #GVariant format string
+ * @...: positional parameters, as per @format_string
+ *
+ * Queries item at position @item_index in @model for the attribute
+ * specified by @attribute.
+ *
+ * If the attribute exists and matches the #GVariantType corresponding
+ * to @format_string then @format_string is used to deconstruct the
+ * value into the positional parameters and %TRUE is returned.
+ *
+ * If the attribute does not exist, or it does exist but has the wrong
+ * type, then the positional parameters are ignored and %FALSE is
+ * returned.
+ *
+ * type
+ *
+ * Returns: %TRUE if the named attribute was found with the expected
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_model_get_item_attribute_value:
+ * @model: a #GMenuModel
+ * @item_index: the index of the item
+ * @attribute: the attribute to query
+ * @expected_type: (allow-none): the expected type of the attribute, or %NULL
+ *
+ * Queries the item at position @item_index in @model for the attribute
+ * specified by @attribute.
+ *
+ * If @expected_type is non-%NULL then it specifies the expected type of
+ * the attribute.  If it is %NULL then any type will be accepted.
+ *
+ * If the attribute exists and matches @expected_type (or if the
+ * expected type is unspecified) then the value is returned.
+ *
+ * If the attribute does not exist, or does not match the expected type
+ * then %NULL is returned.
+ *
+ * Returns: (transfer full): the value of the attribute
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_model_get_item_link:
+ * @model: a #GMenuModel
+ * @item_index: the index of the item
+ * @link: the link to query
+ *
+ * Queries the item at position @item_index in @model for the link
+ * specified by @link.
+ *
+ * If the link exists, the linked #GMenuModel is returned.  If the link
+ * does not exist, %NULL is returned.
+ *
+ * Returns: (transfer full): the linked #GMenuModel, or %NULL
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_model_get_n_items:
+ * @model: a #GMenuModel
+ *
+ * Query the number of items in @model.
+ *
+ * Returns: the number of items
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_model_is_mutable:
+ * @model: a #GMenuModel
+ *
+ * Queries if @model is mutable.
+ *
+ * An immutable #GMenuModel will never emit the #GMenuModel::items-changed
+ * signal. Consumers of the model may make optimisations accordingly.
+ *
+ * emitted).
+ *
+ * Returns: %TRUE if the model is mutable (ie: "items-changed" may be
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_model_items_changed:
+ * @model: a #GMenuModel
+ * @position: the position of the change
+ * @removed: the number of items removed
+ * @added: the number of items added
+ *
+ * Requests emission of the #GMenuModel::items-changed signal on @model.
+ *
+ * This function should never be called except by #GMenuModel
+ * subclasses.  Any other calls to this function will very likely lead
+ * to a violation of the interface of the model.
+ *
+ * The implementation should update its internal representation of the
+ * menu before emitting the signal.  The implementation should further
+ * expect to receive queries about the new state of the menu (and
+ * particularly added menu items) while signal handlers are running.
+ *
+ * The implementation must dispatch this call directly from a mainloop
+ * entry and not in response to calls -- particularly those from the
+ * #GMenuModel API.  Said another way: the menu must not change while
+ * user code is running without returning to the mainloop.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_model_iterate_item_attributes:
+ * @model: a #GMenuModel
+ * @item_index: the index of the item
+ *
+ * Creates a #GMenuAttributeIter to iterate over the attributes of
+ * the item at position @item_index in @model.
+ *
+ * You must free the iterator with g_object_unref() when you are done.
+ *
+ * Returns: (transfer full): a new #GMenuAttributeIter
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_model_iterate_item_links:
+ * @model: a #GMenuModel
+ * @item_index: the index of the item
+ *
+ * Creates a #GMenuLinkIter to iterate over the links of the item at
+ * position @item_index in @model.
+ *
+ * You must free the iterator with g_object_unref() when you are done.
+ *
+ * Returns: (transfer full): a new #GMenuLinkIter
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_new:
+ *
+ * Creates a new #GMenu.
+ *
+ * The new menu has no items.
+ *
+ * Returns: a new #GMenu
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_prepend:
+ * @menu: a #GMenu
+ * @label: (allow-none): the section label, or %NULL
+ * @detailed_action: (allow-none): the detailed action string, or %NULL
+ *
+ * Convenience function for prepending a normal menu item to the start
+ * of @menu.  Combine g_menu_new() and g_menu_insert_item() for a more
+ * flexible alternative.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_prepend_item:
+ * @menu: a #GMenu
+ * @item: a #GMenuItem to prepend
+ *
+ * Prepends @item to the start of @menu.
+ *
+ * See g_menu_insert_item() for more information.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_prepend_section:
+ * @menu: a #GMenu
+ * @label: (allow-none): the section label, or %NULL
+ * @section: a #GMenuModel with the items of the section
+ *
+ * Convenience function for prepending a section menu item to the start
+ * of @menu.  Combine g_menu_item_new_section() and g_menu_insert_item() for
+ * a more flexible alternative.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_prepend_submenu:
+ * @menu: a #GMenu
+ * @label: (allow-none): the section label, or %NULL
+ * @submenu: a #GMenuModel with the items of the submenu
+ *
+ * Convenience function for prepending a submenu menu item to the start
+ * of @menu.  Combine g_menu_item_new_submenu() and g_menu_insert_item() for
+ * a more flexible alternative.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_menu_remove:
+ * @menu: a #GMenu
+ * @position: the position of the item to remove
+ *
+ * Removes an item from the menu.
+ *
+ * @position gives the index of the item to remove.
+ *
+ * It is an error if position is not in range the range from 0 to one
+ * less than the number of items in the menu.
+ *
+ * It is not possible to remove items by identity since items are added
+ * to the menu simply by copying their links and attributes (ie:
+ * identity of the item itself is not preserved).
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_mount_can_eject:
+ * @mount: a #GMount.
+ *
+ * Checks if @mount can be eject.
+ *
+ * Returns: %TRUE if the @mount can be ejected.
+ */
+
+
+/**
+ * g_mount_can_unmount:
+ * @mount: a #GMount.
+ *
+ * Checks if @mount can be mounted.
+ *
+ * Returns: %TRUE if the @mount can be unmounted.
+ */
+
+
+/**
+ * g_mount_eject:
+ * @mount: a #GMount.
+ * @flags: flags affecting the unmount if required for eject
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
+ * @user_data: user data passed to @callback.
+ *
+ * Ejects a mount. This is an asynchronous operation, and is
+ * finished by calling g_mount_eject_finish() with the @mount
+ * and #GAsyncResult data returned in the @callback.
+ *
+ * Deprecated: 2.22: Use g_mount_eject_with_operation() instead.
+ */
+
+
+/**
+ * g_mount_eject_finish:
+ * @mount: a #GMount.
+ * @result: a #GAsyncResult.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Finishes ejecting a mount. If any errors occurred during the operation,
+ * @error will be set to contain the errors and %FALSE will be returned.
+ *
+ * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise.
+ * Deprecated: 2.22: Use g_mount_eject_with_operation_finish() instead.
+ */
+
+
+/**
+ * g_mount_eject_with_operation:
+ * @mount: a #GMount.
+ * @flags: flags affecting the unmount if required for eject
+ * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
+ * @user_data: user data passed to @callback.
+ *
+ * Ejects a mount. This is an asynchronous operation, and is
+ * finished by calling g_mount_eject_with_operation_finish() with the @mount
+ * and #GAsyncResult data returned in the @callback.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_mount_eject_with_operation_finish:
+ * @mount: a #GMount.
+ * @result: a #GAsyncResult.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Finishes ejecting a mount. If any errors occurred during the operation,
+ * @error will be set to contain the errors and %FALSE will be returned.
+ *
+ * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_mount_get_default_location:
+ * @mount: a #GMount.
+ *
+ * Gets the default location of @mount. The default location of the given
+ * @mount is a path that reflects the main entry point for the user (e.g.
+ * the home directory, or the root of the volume).
+ *
+ * The returned object should be unreffed with
+ * g_object_unref() when no longer needed.
+ *
+ * Returns: (transfer full): a #GFile.
+ */
+
+
+/**
+ * g_mount_get_drive:
+ * @mount: a #GMount.
+ *
+ * Gets the drive for the @mount.
+ *
+ * This is a convenience method for getting the #GVolume and then
+ * using that object to get the #GDrive.
+ *
+ * The returned object should be unreffed with
+ * g_object_unref() when no longer needed.
+ *
+ * Returns: (transfer full): a #GDrive or %NULL if @mount is not associated with a volume or a drive.
+ */
+
+
+/**
+ * g_mount_get_icon:
+ * @mount: a #GMount.
+ *
+ * Gets the icon for @mount.
+ *
+ * The returned object should be unreffed with
+ * g_object_unref() when no longer needed.
+ *
+ * Returns: (transfer full): a #GIcon.
+ */
+
+
+/**
+ * g_mount_get_name:
+ * @mount: a #GMount.
+ *
+ * Gets the name of @mount.
+ *
+ * The returned string should be freed with g_free()
+ * when no longer needed.
+ *
+ * Returns: the name for the given @mount.
+ */
+
+
+/**
+ * g_mount_get_root:
+ * @mount: a #GMount.
+ *
+ * Gets the root directory on @mount.
+ *
+ * The returned object should be unreffed with
+ * g_object_unref() when no longer needed.
+ *
+ * Returns: (transfer full): a #GFile.
+ */
+
+
+/**
+ * g_mount_get_sort_key:
+ * @mount: A #GMount.
+ *
+ * Gets the sort key for @mount, if any.
+ *
+ * Returns: Sorting key for @mount or %NULL if no such key is available.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_mount_get_uuid:
+ * @mount: a #GMount.
+ *
+ * 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 %NULL if there is no UUID
+ * available.
+ *
+ * The returned string should be freed with g_free()
+ * when no longer needed.
+ *
+ * Returns: the UUID for @mount or %NULL if no UUID can be computed.
+ */
+
+
+/**
+ * g_mount_get_volume:
+ * @mount: a #GMount.
+ *
+ * Gets the volume for the @mount.
+ *
+ * The returned object should be unreffed with
+ * g_object_unref() when no longer needed.
+ *
+ * Returns: (transfer full): a #GVolume or %NULL if @mount is not associated with a volume.
+ */
+
+
+/**
+ * g_mount_guess_content_type:
+ * @mount: a #GMount
+ * @force_rescan: Whether to force a rescan of the content. Otherwise a cached result will be used if available
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
+ * @callback: a #GAsyncReadyCallback
+ * @user_data: user data passed to @callback
+ *
+ * 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 <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
+ * specification for more on x-content types.
+ *
+ * This is an asynchronous operation (see
+ * g_mount_guess_content_type_sync() for the synchronous version), and
+ * is finished by calling g_mount_guess_content_type_finish() with the
+ * @mount and #GAsyncResult data returned in the @callback.
+ *
+ * Since: 2.18
+ */
+
+
+/**
+ * g_mount_guess_content_type_finish:
+ * @mount: a #GMount
+ * @result: a #GAsyncResult
+ * @error: a #GError location to store the error occurring, or %NULL to ignore
+ *
+ * Finishes guessing content types of @mount. If any errors occurred
+ * during the operation, @error will be set to contain the errors and
+ * %FALSE will be returned. In particular, you may get an
+ * %G_IO_ERROR_NOT_SUPPORTED if the mount does not support content
+ * guessing.
+ *
+ * Caller should free this array with g_strfreev() when done with it.
+ *
+ * Returns: (transfer full) (element-type utf8): a %NULL-terminated array of content types or %NULL on error.
+ * Since: 2.18
+ */
+
+
+/**
+ * g_mount_guess_content_type_sync:
+ * @mount: a #GMount
+ * @force_rescan: Whether to force a rescan of the content. Otherwise a cached result will be used if available
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
+ * @error: a #GError location to store the error occurring, or %NULL to ignore
+ *
+ * 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 <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
+ * specification for more on x-content types.
+ *
+ * This is an synchronous operation and as such may block doing IO;
+ * see g_mount_guess_content_type() for the asynchronous version.
+ *
+ * Caller should free this array with g_strfreev() when done with it.
+ *
+ * Returns: (transfer full) (element-type utf8): a %NULL-terminated array of content types or %NULL on error.
+ * Since: 2.18
+ */
+
+
+/**
+ * g_mount_is_shadowed:
+ * @mount: A #GMount.
+ *
+ * Determines if @mount is shadowed. Applications or libraries should
+ * avoid displaying @mount in the user interface if it is shadowed.
+ *
+ * A mount is said to be shadowed if there exists one or more user
+ * visible objects (currently #GMount objects) with a root that is
+ * inside the root of @mount.
+ *
+ * One application of shadow mounts is when exposing a single file
+ * system that is used to address several logical volumes. In this
+ * situation, a #GVolumeMonitor implementation would create two
+ * #GVolume objects (for example, one for the camera functionality of
+ * the device and one for a SD card reader on the device) with
+ * activation URIs <literal>gphoto2://[usb:001,002]/store1/</literal>
+ * and <literal>gphoto2://[usb:001,002]/store2/</literal>. When the
+ * underlying mount (with root
+ * <literal>gphoto2://[usb:001,002]/</literal>) is mounted, said
+ * #GVolumeMonitor implementation would create two #GMount objects
+ * (each with their root matching the corresponding volume activation
+ * root) that would shadow the original mount.
+ *
+ * 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 #GVolume is set.
+ *
+ * Returns: %TRUE if @mount is shadowed.
+ * Since: 2.20
+ */
+
+
+/**
+ * g_mount_operation_get_anonymous:
+ * @op: a #GMountOperation.
+ *
+ * Check to see whether the mount operation is being used
+ * for an anonymous user.
+ *
+ * Returns: %TRUE if mount operation is anonymous.
+ */
+
+
+/**
+ * g_mount_operation_get_choice:
+ * @op: a #GMountOperation.
+ *
+ * Gets a choice from the mount operation.
+ *
+ * the choice's list, or %0.
+ *
+ * Returns: an integer containing an index of the user's choice from
+ */
+
+
+/**
+ * g_mount_operation_get_domain:
+ * @op: a #GMountOperation.
+ *
+ * Gets the domain of the mount operation.
+ *
+ * Returns: a string set to the domain.
+ */
+
+
+/**
+ * g_mount_operation_get_password:
+ * @op: a #GMountOperation.
+ *
+ * Gets a password from the mount operation.
+ *
+ * Returns: a string containing the password within @op.
+ */
+
+
+/**
+ * g_mount_operation_get_password_save:
+ * @op: a #GMountOperation.
+ *
+ * Gets the state of saving passwords for the mount operation.
+ *
+ * Returns: a #GPasswordSave flag.
+ */
+
+
+/**
+ * g_mount_operation_get_username:
+ * @op: a #GMountOperation.
+ *
+ * Get the user name from the mount operation.
+ *
+ * Returns: a string containing the user name.
+ */
+
+
+/**
+ * g_mount_operation_new:
+ *
+ * Creates a new mount operation.
+ *
+ * Returns: a #GMountOperation.
+ */
+
+
+/**
+ * g_mount_operation_reply:
+ * @op: a #GMountOperation
+ * @result: a #GMountOperationResult
+ *
+ * Emits the #GMountOperation::reply signal.
+ */
+
+
+/**
+ * g_mount_operation_set_anonymous:
+ * @op: a #GMountOperation.
+ * @anonymous: boolean value.
+ *
+ * Sets the mount operation to use an anonymous user if @anonymous is %TRUE.
+ */
+
+
+/**
+ * g_mount_operation_set_choice:
+ * @op: a #GMountOperation.
+ * @choice: an integer.
+ *
+ * Sets a default choice for the mount operation.
+ */
+
+
+/**
+ * g_mount_operation_set_domain:
+ * @op: a #GMountOperation.
+ * @domain: the domain to set.
+ *
+ * Sets the mount operation's domain.
+ */
+
+
+/**
+ * g_mount_operation_set_password:
+ * @op: a #GMountOperation.
+ * @password: password to set.
+ *
+ * Sets the mount operation's password to @password.
+ */
+
+
+/**
+ * g_mount_operation_set_password_save:
+ * @op: a #GMountOperation.
+ * @save: a set of #GPasswordSave flags.
+ *
+ * Sets the state of saving passwords for the mount operation.
+ */
+
+
+/**
+ * g_mount_operation_set_username:
+ * @op: a #GMountOperation.
+ * @username: input username.
+ *
+ * Sets the user name within @op to @username.
+ */
+
+
+/**
+ * g_mount_remount:
+ * @mount: a #GMount.
+ * @flags: flags affecting the operation
+ * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
+ * @user_data: user data passed to @callback.
+ *
+ * Remounts a mount. This is an asynchronous operation, and is
+ * finished by calling g_mount_remount_finish() with the @mount
+ * and #GAsyncResults data returned in the @callback.
+ *
+ * Remounting is useful when some setting affecting the operation
+ * of the volume has been changed, as these may need a remount to
+ * take affect. While this is semantically equivalent with unmounting
+ * and then remounting not all backends might need to actually be
+ * unmounted.
+ */
+
+
+/**
+ * g_mount_remount_finish:
+ * @mount: a #GMount.
+ * @result: a #GAsyncResult.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Finishes remounting a mount. If any errors occurred during the operation,
+ * @error will be set to contain the errors and %FALSE will be returned.
+ *
+ * Returns: %TRUE if the mount was successfully remounted. %FALSE otherwise.
+ */
+
+
+/**
+ * g_mount_shadow:
+ * @mount: A #GMount.
+ *
+ * Increments the shadow count on @mount. Usually used by
+ * #GVolumeMonitor implementations when creating a shadow mount for
+ * @mount, see g_mount_is_shadowed() for more information. The caller
+ * will need to emit the #GMount::changed signal on @mount manually.
+ *
+ * Since: 2.20
+ */
+
+
+/**
+ * g_mount_unmount:
+ * @mount: a #GMount.
+ * @flags: flags affecting the operation
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
+ * @user_data: user data passed to @callback.
+ *
+ * Unmounts a mount. This is an asynchronous operation, and is
+ * finished by calling g_mount_unmount_finish() with the @mount
+ * and #GAsyncResult data returned in the @callback.
+ *
+ * Deprecated: 2.22: Use g_mount_unmount_with_operation() instead.
+ */
+
+
+/**
+ * g_mount_unmount_finish:
+ * @mount: a #GMount.
+ * @result: a #GAsyncResult.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Finishes unmounting a mount. If any errors occurred during the operation,
+ * @error will be set to contain the errors and %FALSE will be returned.
+ *
+ * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise.
+ * Deprecated: 2.22: Use g_mount_unmount_with_operation_finish() instead.
+ */
+
+
+/**
+ * g_mount_unmount_with_operation:
+ * @mount: a #GMount.
+ * @flags: flags affecting the operation
+ * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
+ * @user_data: user data passed to @callback.
+ *
+ * Unmounts a mount. This is an asynchronous operation, and is
+ * finished by calling g_mount_unmount_with_operation_finish() with the @mount
+ * and #GAsyncResult data returned in the @callback.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_mount_unmount_with_operation_finish:
+ * @mount: a #GMount.
+ * @result: a #GAsyncResult.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Finishes unmounting a mount. If any errors occurred during the operation,
+ * @error will be set to contain the errors and %FALSE will be returned.
+ *
+ * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_mount_unshadow:
+ * @mount: A #GMount.
+ *
+ * Decrements the shadow count on @mount. Usually used by
+ * #GVolumeMonitor implementations when destroying a shadow mount for
+ * @mount, see g_mount_is_shadowed() for more information. The caller
+ * will need to emit the #GMount::changed signal on @mount manually.
+ *
+ * Since: 2.20
+ */
+
+
+/**
+ * g_network_address_get_hostname:
+ * @addr: a #GNetworkAddress
+ *
+ * Gets @addr's hostname. This might be either UTF-8 or ASCII-encoded,
+ * depending on what @addr was created with.
+ *
+ * Returns: @addr's hostname
+ * Since: 2.22
+ */
+
+
+/**
+ * g_network_address_get_port:
+ * @addr: a #GNetworkAddress
+ *
+ * Gets @addr's port number
+ *
+ * Returns: @addr's port (which may be 0)
+ * Since: 2.22
+ */
+
+
+/**
+ * g_network_address_get_scheme:
+ * @addr: a #GNetworkAddress
+ *
+ * Gets @addr's scheme
+ *
+ * Returns: @addr's scheme (%NULL if not built from URI)
+ * Since: 2.26
+ */
+
+
+/**
+ * g_network_address_new:
+ * @hostname: the hostname
+ * @port: the port
+ *
+ * Creates a new #GSocketConnectable for connecting to the given
+ * @hostname and @port.
+ *
+ * Returns: (transfer full) (type GNetworkAddress): the new #GNetworkAddress
+ * Since: 2.22
+ */
+
+
+/**
+ * g_network_address_parse:
+ * @host_and_port: the hostname and optionally a port
+ * @default_port: the default port if not in @host_and_port
+ * @error: a pointer to a #GError, or %NULL
+ *
+ * Creates a new #GSocketConnectable for connecting to the given
+ * @hostname and @port. May fail and return %NULL in case
+ * parsing @host_and_port fails.
+ *
+ * @host_and_port may be in any of a number of recognised formats; an IPv6
+ * address, an IPv4 address, or a domain name (in which case a DNS
+ * lookup is performed). Quoting with [] is supported for all address
+ * types. A port override may be specified in the usual way with a
+ * colon.
+ *
+ * If no port is specified in @host_and_port then @default_port will be
+ * used as the port number to connect to.
+ *
+ * In general, @host_and_port is expected to be provided by the user
+ * (allowing them to give the hostname, and a port overide if necessary)
+ * and @default_port is expected to be provided by the application.
+ *
+ * (The port component of @host_and_port can also be specified as a
+ * service name rather than as a numeric port, but this functionality
+ * is deprecated, because it depends on the contents of /etc/services,
+ * which is generally quite sparse on platforms other than Linux.)
+ *
+ * Returns: (transfer full): the new #GNetworkAddress, or %NULL on error
+ * Since: 2.22
+ */
+
+
+/**
+ * g_network_address_parse_uri:
+ * @uri: the hostname and optionally a port
+ * @default_port: The default port if none is found in the URI
+ * @error: a pointer to a #GError, or %NULL
+ *
+ * Creates a new #GSocketConnectable for connecting to the given
+ * @uri. May fail and return %NULL in case parsing @uri fails.
+ *
+ * Using this rather than g_network_address_new() or
+ * g_network_address_parse() allows #GSocketClient to determine
+ * when to use application-specific proxy protocols.
+ *
+ * Returns: (transfer full): the new #GNetworkAddress, or %NULL on error
+ * Since: 2.26
+ */
+
+
+/**
+ * g_network_monitor_base_add_network:
+ * @monitor: the #GNetworkMonitorBase
+ * @network: a #GInetAddressMask
+ *
+ * Adds @network to @monitor's list of available networks.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_network_monitor_base_remove_network:
+ * @monitor: the #GNetworkMonitorBase
+ * @network: a #GInetAddressMask
+ *
+ * Removes @network from @monitor's list of available networks.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_network_monitor_base_set_networks:
+ * @monitor: the #GNetworkMonitorBase
+ * @networks: (array length=length): an array of #GInetAddressMask
+ * @length: length of @networks
+ *
+ * Drops @monitor's current list of available networks and replaces
+ * it with @networks.
+ */
+
+
+/**
+ * g_network_monitor_can_reach:
+ * @monitor: a #GNetworkMonitor
+ * @connectable: a #GSocketConnectable
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @error: return location for a #GError, or %NULL
+ *
+ * Attempts to determine whether or not the host pointed to by
+ * @connectable can be reached, without actually trying to connect to
+ * it.
+ *
+ * This may return %TRUE even when #GNetworkMonitor:network-available
+ * is %FALSE, if, for example, @monitor can determine that
+ * @connectable refers to a host on a local network.
+ *
+ * If @monitor believes that an attempt to connect to @connectable
+ * will succeed, it will return %TRUE. Otherwise, it will return
+ * %FALSE and set @error to an appropriate error (such as
+ * %G_IO_ERROR_HOST_UNREACHABLE).
+ *
+ * Note that although this does not attempt to connect to
+ * @connectable, it may still block for a brief period of time (eg,
+ * trying to do multicast DNS on the local network), so if you do not
+ * want to block, you should use g_network_monitor_can_reach_async().
+ *
+ * Returns: %TRUE if @connectable is reachable, %FALSE if not.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_network_monitor_can_reach_async:
+ * @monitor: a #GNetworkMonitor
+ * @connectable: a #GSocketConnectable
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Asynchronously attempts to determine whether or not the host
+ * pointed to by @connectable can be reached, without actually
+ * trying to connect to it.
+ *
+ * For more details, see g_network_monitor_can_reach().
+ *
+ * When the operation is finished, @callback will be called.
+ * You can then call g_network_monitor_can_reach_finish()
+ * to get the result of the operation.
+ */
+
+
+/**
+ * g_network_monitor_can_reach_finish:
+ * @monitor: a #GNetworkMonitor
+ * @result: a #GAsyncResult
+ * @error: return location for errors, or %NULL
+ *
+ * Finishes an async network connectivity test.
+ * See g_network_monitor_can_reach_async().
+ *
+ * Returns: %TRUE if network is reachable, %FALSE if not.
+ */
+
+
+/**
+ * g_network_monitor_get_default:
+ *
+ * Gets the default #GNetworkMonitor for the system.
+ *
+ * Returns: (transfer none): a #GNetworkMonitor
+ * Since: 2.32
+ */
+
+
+/**
+ * g_network_monitor_get_network_available:
+ * @monitor: the #GNetworkMonitor
+ *
+ * Checks if the network is available. "Available" here means that the
+ * system has a default route available for at least one of IPv4 or
+ * IPv6. It does not necessarily imply that the public Internet is
+ * reachable. See #GNetworkMonitor:network-available for more details.
+ *
+ * Returns: whether the network is available
+ * Since: 2.32
+ */
+
+
+/**
+ * g_network_service_get_domain:
+ * @srv: a #GNetworkService
+ *
+ * Gets the domain that @srv serves. This might be either UTF-8 or
+ * ASCII-encoded, depending on what @srv was created with.
+ *
+ * Returns: @srv's domain name
+ * Since: 2.22
+ */
+
+
+/**
+ * g_network_service_get_protocol:
+ * @srv: a #GNetworkService
+ *
+ * Gets @srv's protocol name (eg, "tcp").
+ *
+ * Returns: @srv's protocol name
+ * Since: 2.22
+ */
+
+
+/**
+ * g_network_service_get_scheme:
+ * @srv: a #GNetworkService
+ *
+ * Get's the URI scheme used to resolve proxies. By default, the service name
+ * is used as scheme.
+ *
+ * Returns: @srv's scheme name
+ * Since: 2.26
+ */
+
+
+/**
+ * g_network_service_get_service:
+ * @srv: a #GNetworkService
+ *
+ * Gets @srv's service name (eg, "ldap").
+ *
+ * Returns: @srv's service name
+ * Since: 2.22
+ */
+
+
+/**
+ * g_network_service_new:
+ * @service: the service type to look up (eg, "ldap")
+ * @protocol: the networking protocol to use for @service (eg, "tcp")
+ * @domain: the DNS domain to look up the service in
+ *
+ * Creates a new #GNetworkService representing the given @service,
+ * @protocol, and @domain. This will initially be unresolved; use the
+ * #GSocketConnectable interface to resolve it.
+ *
+ * Returns: (transfer full) (type GNetworkService): a new #GNetworkService
+ * Since: 2.22
+ */
+
+
+/**
+ * g_network_service_set_scheme:
+ * @srv: a #GNetworkService
+ * @scheme: a URI scheme
+ *
+ * Set's the URI scheme used to resolve proxies. By default, the service name
+ * is used as scheme.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_new:
+ * @struct_type: the type of the elements to allocate
+ * @n_structs: the number of elements to allocate
+ *
+ * Allocates @n_structs elements of type @struct_type.
+ * The returned pointer is cast to a pointer to the given type.
+ * If @n_structs is 0 it returns %NULL.
+ * Care is taken to avoid overflow when calculating the size of the allocated block.
+ *
+ * Since the returned pointer is already casted to the right type,
+ * it is normally unnecessary to cast it explicitly, and doing
+ * so might hide memory allocation errors.
+ *
+ * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
+ */
+
+
+/**
+ * g_new0:
+ * @struct_type: the type of the elements to allocate.
+ * @n_structs: the number of elements to allocate.
+ *
+ * Allocates @n_structs elements of type @struct_type, initialized to 0's.
+ * The returned pointer is cast to a pointer to the given type.
+ * If @n_structs is 0 it returns %NULL.
+ * Care is taken to avoid overflow when calculating the size of the allocated block.
+ *
+ * Since the returned pointer is already casted to the right type,
+ * it is normally unnecessary to cast it explicitly, and doing
+ * so might hide memory allocation errors.
+ *
+ * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type.
+ */
+
+
+/**
+ * g_newa:
+ * @struct_type: Type of memory chunks to be allocated
+ * @n_structs: Number of chunks to be allocated
+ *
+ * Wraps g_alloca() in a more typesafe manner.
+ *
+ * Returns: Pointer to stack space for @n_structs chunks of type @struct_type
+ */
+
+
+/**
+ * g_node_append:
+ * @parent: the #GNode to place the new #GNode under
+ * @node: the #GNode to insert
+ *
+ * Inserts a #GNode as the last child of the given parent.
+ *
+ * Returns: the inserted #GNode
+ */
+
+
+/**
+ * g_node_append_data:
+ * @parent: the #GNode to place the new #GNode under
+ * @data: the data for the new #GNode
+ *
+ * Inserts a new #GNode as the last child of the given parent.
+ *
+ * Returns: the new #GNode
+ */
+
+
+/**
+ * g_node_first_child:
+ * @node: a #GNode
+ *
+ * Gets the first child of a #GNode.
+ *
+ * or has no children
+ *
+ * Returns: the first child of @node, or %NULL if @node is %NULL
+ */
+
+
+/**
+ * g_node_insert_data:
+ * @parent: the #GNode to place the new #GNode under
+ * @position: the position to place the new #GNode at. If position is -1, the new #GNode is inserted as the last child of @parent
+ * @data: the data for the new #GNode
+ *
+ * Inserts a new #GNode at the given position.
+ *
+ * Returns: the new #GNode
+ */
+
+
+/**
+ * g_node_insert_data_after:
+ * @parent: the #GNode to place the new #GNode under
+ * @sibling: the sibling #GNode to place the new #GNode after
+ * @data: the data for the new #GNode
+ *
+ * Inserts a new #GNode after the given sibling.
+ *
+ * Returns: the new #GNode
+ */
+
+
+/**
+ * g_node_insert_data_before:
+ * @parent: the #GNode to place the new #GNode under
+ * @sibling: the sibling #GNode to place the new #GNode before
+ * @data: the data for the new #GNode
+ *
+ * Inserts a new #GNode before the given sibling.
+ *
+ * Returns: the new #GNode
+ */
+
+
+/**
+ * g_node_next_sibling:
+ * @node: a #GNode
+ *
+ * Gets the next sibling of a #GNode.
+ *
+ * or %NULL
+ *
+ * Returns: the next sibling of @node, or %NULL if @node is the last node
+ */
+
+
+/**
+ * g_node_prepend_data:
+ * @parent: the #GNode to place the new #GNode under
+ * @data: the data for the new #GNode
+ *
+ * Inserts a new #GNode as the first child of the given parent.
+ *
+ * Returns: the new #GNode
+ */
+
+
+/**
+ * g_node_prev_sibling:
+ * @node: a #GNode
+ *
+ * Gets the previous sibling of a #GNode.
+ *
+ * node or %NULL
+ *
+ * Returns: the previous sibling of @node, or %NULL if @node is the first
+ */
+
+
+/**
+ * g_null_settings_backend_new:
+ *
+ * Creates a readonly #GSettingsBackend.
+ *
+ * This backend does not allow changes to settings, so all settings
+ * will always have their default values.
+ *
+ * Returns: (transfer full): a newly created #GSettingsBackend
+ * Since: 2.28
+ */
+
+
+/**
+ * g_output_stream_clear_pending:
+ * @stream: output stream
+ *
+ * Clears the pending flag on @stream.
+ */
+
+
+/**
+ * g_output_stream_close:
+ * @stream: A #GOutputStream.
+ * @cancellable: (allow-none): optional cancellable object
+ * @error: location to store the error occurring, or %NULL to ignore
+ *
+ * Closes the stream, releasing resources related to it.
+ *
+ * Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED.
+ * Closing a stream multiple times will not return an error.
+ *
+ * Closing a stream will automatically flush any outstanding buffers in the
+ * stream.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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 %G_IO_ERROR_CLOSED for all operations. Still, it
+ * is important to check and report the error to the user, otherwise
+ * there might be a loss of data as all data might not be written.
+ *
+ * If @cancellable is not NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ * Cancelling a close will still leave the stream closed, but there some streams
+ * can use a faster close that doesn't block to e.g. check errors. On
+ * cancellation (as with any error) there is no guarantee that all written
+ * data will reach the target.
+ *
+ * Returns: %TRUE on success, %FALSE on failure
+ */
+
+
+/**
+ * g_output_stream_close_async:
+ * @stream: A #GOutputStream.
+ * @io_priority: the io priority of the request.
+ * @cancellable: (allow-none): optional cancellable object
+ * @callback: (scope async): callback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Requests an asynchronous close of the stream, releasing resources
+ * related to it. When the operation is finished @callback will be
+ * called. You can then call g_output_stream_close_finish() to get
+ * the result of the operation.
+ *
+ * For behaviour details see g_output_stream_close().
+ *
+ * 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.
+ */
+
+
+/**
+ * g_output_stream_close_finish:
+ * @stream: a #GOutputStream.
+ * @result: a #GAsyncResult.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Closes an output stream.
+ *
+ * Returns: %TRUE if stream was successfully closed, %FALSE otherwise.
+ */
+
+
+/**
+ * g_output_stream_flush:
+ * @stream: a #GOutputStream.
+ * @cancellable: (allow-none): optional cancellable object
+ * @error: location to store the error occurring, or %NULL to ignore
+ *
+ * Forces a write of all user-space buffered data for the given
+ * @stream. Will block during the operation. Closing the stream will
+ * implicitly cause a flush.
+ *
+ * This function is optional for inherited classes.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * Returns: %TRUE on success, %FALSE on error
+ */
+
+
+/**
+ * g_output_stream_flush_async:
+ * @stream: a #GOutputStream.
+ * @io_priority: the io priority of the request.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Forces an asynchronous write of all user-space buffered data for
+ * the given @stream.
+ * For behaviour details see g_output_stream_flush().
+ *
+ * When the operation is finished @callback will be
+ * called. You can then call g_output_stream_flush_finish() to get the
+ * result of the operation.
+ */
+
+
+/**
+ * g_output_stream_flush_finish:
+ * @stream: a #GOutputStream.
+ * @result: a GAsyncResult.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Finishes flushing an output stream.
+ *
+ * Returns: %TRUE if flush operation succeeded, %FALSE otherwise.
+ */
+
+
+/**
+ * g_output_stream_has_pending:
+ * @stream: a #GOutputStream.
+ *
+ * Checks if an ouput stream has pending actions.
+ *
+ * Returns: %TRUE if @stream has pending actions.
+ */
+
+
+/**
+ * g_output_stream_is_closed:
+ * @stream: a #GOutputStream.
+ *
+ * Checks if an output stream has already been closed.
+ *
+ * Returns: %TRUE if @stream is closed. %FALSE otherwise.
+ */
+
+
+/**
+ * g_output_stream_is_closing:
+ * @stream: a #GOutputStream.
+ *
+ * Checks if an output stream is being closed. This can be
+ * used inside e.g. a flush implementation to see if the
+ * flush (or other i/o operation) is called from within
+ * the closing operation.
+ *
+ * Returns: %TRUE if @stream is being closed. %FALSE otherwise.
+ * Since: 2.24
+ */
+
+
+/**
+ * g_output_stream_set_pending:
+ * @stream: a #GOutputStream.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Sets @stream to have actions pending. If the pending flag is
+ * already set or @stream is closed, it will return %FALSE and set
+ * @error.
+ *
+ * Returns: %TRUE if pending was previously unset and is now set.
+ */
+
+
+/**
+ * g_output_stream_splice:
+ * @stream: a #GOutputStream.
+ * @source: a #GInputStream.
+ * @flags: a set of #GOutputStreamSpliceFlags.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Splices an input stream into an output stream.
+ *
+ * -1 if an error occurred. Note that if the number of bytes
+ * spliced is greater than %G_MAXSSIZE, then that will be
+ * returned, and there is no way to determine the actual number
+ * of bytes spliced.
+ *
+ * Returns: a #gssize containing the size of the data spliced, or
+ */
+
+
+/**
+ * g_output_stream_splice_async:
+ * @stream: a #GOutputStream.
+ * @source: a #GInputStream.
+ * @flags: a set of #GOutputStreamSpliceFlags.
+ * @io_priority: the io priority of the request.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async): a #GAsyncReadyCallback.
+ * @user_data: (closure): user data passed to @callback.
+ *
+ * Splices a stream asynchronously.
+ * When the operation is finished @callback will be called.
+ * You can then call g_output_stream_splice_finish() to get the
+ * result of the operation.
+ *
+ * For the synchronous, blocking version of this function, see
+ * g_output_stream_splice().
+ */
+
+
+/**
+ * g_output_stream_splice_finish:
+ * @stream: a #GOutputStream.
+ * @result: a #GAsyncResult.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Finishes an asynchronous stream splice operation.
+ *
+ * number of bytes spliced is greater than %G_MAXSSIZE, then that
+ * will be returned, and there is no way to determine the actual
+ * number of bytes spliced.
+ *
+ * Returns: a #gssize of the number of bytes spliced. Note that if the
+ */
+
+
+/**
+ * g_output_stream_write:
+ * @stream: a #GOutputStream.
+ * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
+ * @count: the number of bytes to write
+ * @cancellable: (allow-none): optional cancellable object
+ * @error: location to store the error occurring, or %NULL to ignore
+ *
+ * Tries to write @count bytes from @buffer into the stream. Will block
+ * during the operation.
+ *
+ * If count is 0, returns 0 and does nothing. A value of @count
+ * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
+ *
+ * On success, the number of bytes written to the stream is returned.
+ * It is not an error if this is not the same as the requested size, as it
+ * can happen e.g. on a partial I/O error, or if there is not enough
+ * storage in the stream. All writes block until at least one byte
+ * is written or an error occurs; 0 is never returned (unless
+ * @count is 0).
+ *
+ * If @cancellable is not NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_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.
+ *
+ * On error -1 is returned and @error is set accordingly.
+ *
+ * Virtual: write_fn
+ * Returns: Number of bytes written, or -1 on error
+ */
+
+
+/**
+ * g_output_stream_write_all:
+ * @stream: a #GOutputStream.
+ * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
+ * @count: the number of bytes to write
+ * @bytes_written: (out): location to store the number of bytes that was written to the stream
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: location to store the error occurring, or %NULL to ignore
+ *
+ * Tries to write @count bytes from @buffer into the stream. Will block
+ * during the operation.
+ *
+ * This function is similar to g_output_stream_write(), except it tries to
+ * write as many bytes as requested, only stopping on an error.
+ *
+ * On a successful write of @count bytes, %TRUE is returned, and @bytes_written
+ * is set to @count.
+ *
+ * If there is an error during the operation FALSE is returned and @error
+ * is set to indicate the error status, @bytes_written is updated to contain
+ * the number of bytes written into the stream before the error occurred.
+ *
+ * Returns: %TRUE on success, %FALSE if there was an error
+ */
+
+
+/**
+ * g_output_stream_write_async:
+ * @stream: A #GOutputStream.
+ * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
+ * @count: the number of bytes to write
+ * @io_priority: the io priority of the request.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async): callback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Request an asynchronous write of @count bytes from @buffer into
+ * the stream. When the operation is finished @callback will be called.
+ * You can then call g_output_stream_write_finish() to get the result of the
+ * operation.
+ *
+ * During an async request no other sync and async calls are allowed,
+ * and will result in %G_IO_ERROR_PENDING errors.
+ *
+ * A value of @count larger than %G_MAXSSIZE will cause a
+ * %G_IO_ERROR_INVALID_ARGUMENT error.
+ *
+ * On success, the number of bytes written 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. on a partial I/O error,
+ * but generally we try to write as many bytes as requested.
+ *
+ * You are guaranteed that this method will never fail with
+ * %G_IO_ERROR_WOULD_BLOCK - if @stream can't accept more data, the
+ * method will just wait until this changes.
+ *
+ * Any outstanding I/O request with higher priority (lower numerical
+ * value) will be executed before an outstanding request with lower
+ * priority. Default priority is %G_PRIORITY_DEFAULT.
+ *
+ * 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.
+ *
+ * For the synchronous, blocking version of this function, see
+ * g_output_stream_write().
+ */
+
+
+/**
+ * g_output_stream_write_finish:
+ * @stream: a #GOutputStream.
+ * @result: a #GAsyncResult.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Finishes a stream write operation.
+ *
+ * Returns: a #gssize containing the number of bytes written to the stream.
+ */
+
+
+/**
+ * g_permission_acquire:
+ * @permission: a #GPermission instance
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @error: a pointer to a %NULL #GError, or %NULL
+ *
+ * Attempts to acquire the permission represented by @permission.
+ *
+ * The precise method by which this happens depends on the permission
+ * and the underlying authentication mechanism.  A simple example is
+ * that a dialog may appear asking the user to enter their password.
+ *
+ * You should check with g_permission_get_can_acquire() before calling
+ * this function.
+ *
+ * If the permission is acquired then %TRUE is returned.  Otherwise,
+ * %FALSE is returned and @error is set appropriately.
+ *
+ * This call is blocking, likely for a very long time (in the case that
+ * user interaction is required).  See g_permission_acquire_async() for
+ * the non-blocking version.
+ *
+ * Returns: %TRUE if the permission was successfully acquired
+ * Since: 2.26
+ */
+
+
+/**
+ * g_permission_acquire_async:
+ * @permission: a #GPermission instance
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @callback: the #GAsyncReadyCallback to call when done
+ * @user_data: the user data to pass to @callback
+ *
+ * Attempts to acquire the permission represented by @permission.
+ *
+ * This is the first half of the asynchronous version of
+ * g_permission_acquire().
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_permission_acquire_finish:
+ * @permission: a #GPermission instance
+ * @result: the #GAsyncResult given to the #GAsyncReadyCallback
+ * @error: a pointer to a %NULL #GError, or %NULL
+ *
+ * Collects the result of attempting to acquire the permission
+ * represented by @permission.
+ *
+ * This is the second half of the asynchronous version of
+ * g_permission_acquire().
+ *
+ * Returns: %TRUE if the permission was successfully acquired
+ * Since: 2.26
+ */
+
+
+/**
+ * g_permission_get_allowed:
+ * @permission: a #GPermission instance
+ *
+ * Gets the value of the 'allowed' property.  This property is %TRUE if
+ * the caller currently has permission to perform the action that
+ * @permission represents the permission to perform.
+ *
+ * Returns: the value of the 'allowed' property
+ * Since: 2.26
+ */
+
+
+/**
+ * g_permission_get_can_acquire:
+ * @permission: a #GPermission instance
+ *
+ * Gets the value of the 'can-acquire' property.  This property is %TRUE
+ * if it is generally possible to acquire the permission by calling
+ * g_permission_acquire().
+ *
+ * Returns: the value of the 'can-acquire' property
+ * Since: 2.26
+ */
+
+
+/**
+ * g_permission_get_can_release:
+ * @permission: a #GPermission instance
+ *
+ * Gets the value of the 'can-release' property.  This property is %TRUE
+ * if it is generally possible to release the permission by calling
+ * g_permission_release().
+ *
+ * Returns: the value of the 'can-release' property
+ * Since: 2.26
+ */
+
+
+/**
+ * g_permission_impl_update:
+ * @permission: a #GPermission instance
+ * @allowed: the new value for the 'allowed' property
+ * @can_acquire: the new value for the 'can-acquire' property
+ * @can_release: the new value for the 'can-release' property
+ *
+ * This function is called by the #GPermission implementation to update
+ * the properties of the permission.  You should never call this
+ * function except from a #GPermission implementation.
+ *
+ * GObject notify signals are generated, as appropriate.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_permission_release:
+ * @permission: a #GPermission instance
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @error: a pointer to a %NULL #GError, or %NULL
+ *
+ * Attempts to release the permission represented by @permission.
+ *
+ * The precise method by which this happens depends on the permission
+ * and the underlying authentication mechanism.  In most cases the
+ * permission will be dropped immediately without further action.
+ *
+ * You should check with g_permission_get_can_release() before calling
+ * this function.
+ *
+ * If the permission is released then %TRUE is returned.  Otherwise,
+ * %FALSE is returned and @error is set appropriately.
+ *
+ * This call is blocking, likely for a very long time (in the case that
+ * user interaction is required).  See g_permission_release_async() for
+ * the non-blocking version.
+ *
+ * Returns: %TRUE if the permission was successfully released
+ * Since: 2.26
+ */
+
+
+/**
+ * g_permission_release_async:
+ * @permission: a #GPermission instance
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @callback: the #GAsyncReadyCallback to call when done
+ * @user_data: the user data to pass to @callback
+ *
+ * Attempts to release the permission represented by @permission.
+ *
+ * This is the first half of the asynchronous version of
+ * g_permission_release().
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_permission_release_finish:
+ * @permission: a #GPermission instance
+ * @result: the #GAsyncResult given to the #GAsyncReadyCallback
+ * @error: a pointer to a %NULL #GError, or %NULL
+ *
+ * Collects the result of attempting to release the permission
+ * represented by @permission.
+ *
+ * This is the second half of the asynchronous version of
+ * g_permission_release().
+ *
+ * Returns: %TRUE if the permission was successfully released
+ * Since: 2.26
+ */
+
+
+/**
+ * g_poll_file_monitor_new:
+ * @file: a #GFile.
+ *
+ * Polls @file for changes.
+ *
+ * Returns: a new #GFileMonitor for the given #GFile.
+ */
+
+
+/**
+ * g_pollable_input_stream_can_poll:
+ * @stream: a #GPollableInputStream.
+ *
+ * Checks if @stream is actually pollable. Some classes may implement
+ * #GPollableInputStream but have only certain instances of that class
+ * be pollable. If this method returns %FALSE, then the behavior of
+ * other #GPollableInputStream methods is undefined.
+ *
+ * For any given stream, the value returned by this method is constant;
+ * a stream cannot switch from pollable to non-pollable or vice versa.
+ *
+ * Returns: %TRUE if @stream is pollable, %FALSE if not.
+ * Since: 2.28
+ */
+
+
+/**
+ * g_pollable_input_stream_create_source:
+ * @stream: a #GPollableInputStream.
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ *
+ * Creates a #GSource that triggers when @stream can be read, or
+ * @cancellable is triggered or an error occurs. The callback on the
+ * source is of the #GPollableSourceFunc type.
+ *
+ * As with g_pollable_input_stream_is_readable(), it is possible that
+ * the stream may not actually be readable even after the source
+ * triggers, so you should use g_pollable_input_stream_read_nonblocking()
+ * rather than g_input_stream_read() from the callback.
+ *
+ * Returns: (transfer full): a new #GSource
+ * Since: 2.28
+ */
+
+
+/**
+ * g_pollable_input_stream_is_readable:
+ * @stream: a #GPollableInputStream.
+ *
+ * Checks if @stream can be read.
+ *
+ * Note that some stream types may not be able to implement this 100%
+ * reliably, and it is possible that a call to g_input_stream_read()
+ * after this returns %TRUE would still block. To guarantee
+ * non-blocking behavior, you should always use
+ * g_pollable_input_stream_read_nonblocking(), which will return a
+ * %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
+ *
+ * has occurred on @stream, this will result in
+ * g_pollable_input_stream_is_readable() returning %TRUE, and the
+ * next attempt to read will return the error.
+ *
+ * Returns: %TRUE if @stream is readable, %FALSE if not. If an error
+ * Since: 2.28
+ */
+
+
+/**
+ * g_pollable_input_stream_read_nonblocking:
+ * @stream: a #GPollableInputStream
+ * @buffer: a buffer to read data into (which should be at least @size bytes long).
+ * @size: the number of bytes you want to read
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Attempts to read up to @size bytes from @stream into @buffer, as
+ * with g_input_stream_read(). If @stream is not currently readable,
+ * this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can
+ * use g_pollable_input_stream_create_source() to create a #GSource
+ * that will be triggered when @stream is readable.
+ *
+ * Note that since this method never blocks, you cannot actually
+ * use @cancellable to cancel it. However, it will return an error
+ * if @cancellable has already been cancelled when you call, which
+ * may happen if you call this method after a source triggers due
+ * to having been cancelled.
+ *
+ * %G_IO_ERROR_WOULD_BLOCK).
+ *
+ * Virtual: read_nonblocking
+ * Returns: the number of bytes read, or -1 on error (including
+ */
+
+
+/**
+ * g_pollable_output_stream_can_poll:
+ * @stream: a #GPollableOutputStream.
+ *
+ * Checks if @stream is actually pollable. Some classes may implement
+ * #GPollableOutputStream but have only certain instances of that
+ * class be pollable. If this method returns %FALSE, then the behavior
+ * of other #GPollableOutputStream methods is undefined.
+ *
+ * For any given stream, the value returned by this method is constant;
+ * a stream cannot switch from pollable to non-pollable or vice versa.
+ *
+ * Returns: %TRUE if @stream is pollable, %FALSE if not.
+ * Since: 2.28
+ */
+
+
+/**
+ * g_pollable_output_stream_create_source:
+ * @stream: a #GPollableOutputStream.
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ *
+ * Creates a #GSource that triggers when @stream can be written, or
+ * @cancellable is triggered or an error occurs. The callback on the
+ * source is of the #GPollableSourceFunc type.
+ *
+ * As with g_pollable_output_stream_is_writable(), it is possible that
+ * the stream may not actually be writable even after the source
+ * triggers, so you should use g_pollable_output_stream_write_nonblocking()
+ * rather than g_output_stream_write() from the callback.
+ *
+ * Returns: (transfer full): a new #GSource
+ * Since: 2.28
+ */
+
+
+/**
+ * g_pollable_output_stream_is_writable:
+ * @stream: a #GPollableOutputStream.
+ *
+ * Checks if @stream can be written.
+ *
+ * Note that some stream types may not be able to implement this 100%
+ * reliably, and it is possible that a call to g_output_stream_write()
+ * after this returns %TRUE would still block. To guarantee
+ * non-blocking behavior, you should always use
+ * g_pollable_output_stream_write_nonblocking(), which will return a
+ * %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
+ *
+ * has occurred on @stream, this will result in
+ * g_pollable_output_stream_is_writable() returning %TRUE, and the
+ * next attempt to write will return the error.
+ *
+ * Returns: %TRUE if @stream is writable, %FALSE if not. If an error
+ * Since: 2.28
+ */
+
+
+/**
+ * g_pollable_output_stream_write_nonblocking:
+ * @stream: a #GPollableOutputStream
+ * @buffer: (array length=size) (element-type guint8): a buffer to write data from
+ * @size: the number of bytes you want to write
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Attempts to write up to @size bytes from @buffer to @stream, as
+ * with g_output_stream_write(). If @stream is not currently writable,
+ * this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can
+ * use g_pollable_output_stream_create_source() to create a #GSource
+ * that will be triggered when @stream is writable.
+ *
+ * Note that since this method never blocks, you cannot actually
+ * use @cancellable to cancel it. However, it will return an error
+ * if @cancellable has already been cancelled when you call, which
+ * may happen if you call this method after a source triggers due
+ * to having been cancelled.
+ *
+ * %G_IO_ERROR_WOULD_BLOCK).
+ *
+ * Virtual: write_nonblocking
+ * Returns: the number of bytes written, or -1 on error (including
+ */
+
+
+/**
+ * g_pollable_source_new:
+ * @pollable_stream: the stream associated with the new source
+ *
+ * Utility method for #GPollableInputStream and #GPollableOutputStream
+ * implementations. Creates a new #GSource that expects a callback of
+ * type #GPollableSourceFunc. The new source does not actually do
+ * anything on its own; use g_source_add_child_source() to add other
+ * sources to it to cause it to trigger.
+ *
+ * Returns: (transfer full): the new #GSource.
+ * Since: 2.28
+ */
+
+
+/**
+ * g_proxy_address_get_destination_hostname:
+ * @proxy: a #GProxyAddress
+ *
+ * Gets @proxy's destination hostname.
+ *
+ * Returns: the @proxy's destination hostname
+ * Since: 2.26
+ */
+
+
+/**
+ * g_proxy_address_get_destination_port:
+ * @proxy: a #GProxyAddress
+ *
+ * Gets @proxy's destination port.
+ *
+ * Returns: the @proxy's destination port
+ * Since: 2.26
+ */
+
+
+/**
+ * g_proxy_address_get_password:
+ * @proxy: a #GProxyAddress
+ *
+ * Gets @proxy's password.
+ *
+ * Returns: the @proxy's password
+ * Since: 2.26
+ */
+
+
+/**
+ * g_proxy_address_get_protocol:
+ * @proxy: a #GProxyAddress
+ *
+ * Gets @proxy's protocol.
+ *
+ * Returns: the @proxy's protocol
+ * Since: 2.26
+ */
+
+
+/**
+ * g_proxy_address_get_username:
+ * @proxy: a #GProxyAddress
+ *
+ * Gets @proxy's username.
+ *
+ * Returns: the @proxy's username
+ * Since: 2.26
+ */
+
+
+/**
+ * g_proxy_address_new:
+ * @inetaddr: The proxy server #GInetAddress.
+ * @port: The proxy server port.
+ * @protocol: The proxy protocol to support, in lower case (e.g. socks, http).
+ * @dest_hostname: The destination hostname the the proxy should tunnel to.
+ * @dest_port: The destination port to tunnel to.
+ * @username: (allow-none): The username to authenticate to the proxy server (or %NULL).
+ * @password: (allow-none): The password to authenticate to the proxy server (or %NULL).
+ *
+ * Creates a new #GProxyAddress for @inetaddr with @protocol that should
+ * tunnel through @dest_hostname and @dest_port.
+ *
+ * Returns: a new #GProxyAddress
+ * Since: 2.26
+ */
+
+
+/**
+ * g_proxy_connect:
+ * @proxy: a #GProxy
+ * @connection: a #GIOStream
+ * @proxy_address: a #GProxyAddress
+ * @cancellable: (allow-none): a #GCancellable
+ * @error: return #GError
+ *
+ * Given @connection to communicate with a proxy (eg, a
+ * #GSocketConnection that is connected to the proxy server), this
+ * does the necessary handshake to connect to @proxy_address, and if
+ * required, wraps the #GIOStream to handle proxy payload.
+ *
+ * be the same as @connection, in which case a reference
+ * will be added.
+ *
+ * Returns: (transfer full): a #GIOStream that will replace @connection. This might
+ * Since: 2.26
+ */
+
+
+/**
+ * g_proxy_connect_async:
+ * @proxy: a #GProxy
+ * @connection: a #GIOStream
+ * @proxy_address: a #GProxyAddress
+ * @cancellable: (allow-none): a #GCancellable
+ * @callback: (scope async): a #GAsyncReadyCallback
+ * @user_data: (closure): callback data
+ *
+ * Asynchronous version of g_proxy_connect().
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_proxy_connect_finish:
+ * @proxy: a #GProxy
+ * @result: a #GAsyncResult
+ * @error: return #GError
+ *
+ * See g_proxy_connect().
+ *
+ * Returns: (transfer full): a #GIOStream.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_proxy_get_default_for_protocol:
+ * @protocol: the proxy protocol name (e.g. http, socks, etc)
+ *
+ * Lookup "gio-proxy" extension point for a proxy implementation that supports
+ * specified protocol.
+ *
+ * is not supported.
+ *
+ * Returns: (transfer full): return a #GProxy or NULL if protocol
+ * Since: 2.26
+ */
+
+
+/**
+ * g_proxy_resolver_get_default:
+ *
+ * Gets the default #GProxyResolver for the system.
+ *
+ * Returns: (transfer none): the default #GProxyResolver.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_proxy_resolver_is_supported:
+ * @resolver: a #GProxyResolver
+ *
+ * Checks if @resolver can be used on this system. (This is used
+ * internally; g_proxy_resolver_get_default() will only return a proxy
+ * resolver that returns %TRUE for this method.)
+ *
+ * Returns: %TRUE if @resolver is supported.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_proxy_resolver_lookup:
+ * @resolver: a #GProxyResolver
+ * @uri: a URI representing the destination to connect to
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @error: return location for a #GError, or %NULL
+ *
+ * Looks into the system proxy configuration to determine what proxy,
+ * if any, to use to connect to @uri. The returned proxy URIs are of the
+ * form <literal>&lt;protocol&gt;://[user[:password]@]host:port</literal>
+ * or <literal>direct://</literal>, where &lt;protocol&gt; could be
+ * http, rtsp, socks or other proxying protocol.
+ *
+ * If you don't know what network protocol is being used on the
+ * socket, you should use <literal>none</literal> as the URI protocol.
+ * In this case, the resolver might still return a generic proxy type
+ * (such as SOCKS), but would not return protocol-specific proxy types
+ * (such as http).
+ *
+ * <literal>direct://</literal> is used when no proxy is needed.
+ * Direct connection should not be attempted unless it is part of the
+ * returned array of proxies.
+ *
+ * NULL-terminated array of proxy URIs. Must be freed
+ * with g_strfreev().
+ *
+ * Returns: (transfer full) (array zero-terminated=1): A
+ * Since: 2.26
+ */
+
+
+/**
+ * g_proxy_resolver_lookup_async:
+ * @resolver: a #GProxyResolver
+ * @uri: a URI representing the destination to connect to
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @callback: (scope async): callback to call after resolution completes
+ * @user_data: (closure): data for @callback
+ *
+ * Asynchronous lookup of proxy. See g_proxy_resolver_lookup() for more
+ * details.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_proxy_resolver_lookup_finish:
+ * @resolver: a #GProxyResolver
+ * @result: the result passed to your #GAsyncReadyCallback
+ * @error: return location for a #GError, or %NULL
+ *
+ * Call this function to obtain the array of proxy URIs when
+ * g_proxy_resolver_lookup_async() is complete. See
+ * g_proxy_resolver_lookup() for more details.
+ *
+ * NULL-terminated array of proxy URIs. Must be freed
+ * with g_strfreev().
+ *
+ * Returns: (transfer full) (array zero-terminated=1): A
+ * Since: 2.26
+ */
+
+
+/**
+ * g_proxy_supports_hostname:
+ * @proxy: a #GProxy
+ *
+ * Some proxy protocols expect to be passed a hostname, which they
+ * will resolve to an IP address themselves. Others, like SOCKS4, do
+ * not allow this. This function will return %FALSE if @proxy is
+ * implementing such a protocol. When %FALSE is returned, the caller
+ * should resolve the destination hostname first, and then pass a
+ * #GProxyAddress containing the stringified IP address to
+ * g_proxy_connect() or g_proxy_connect_async().
+ *
+ * Returns: %TRUE if hostname resolution is supported.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_remote_action_group_activate_action_full:
+ * @remote: a #GDBusActionGroup
+ * @action_name: the name of the action to activate
+ * @parameter: (allow none): the optional parameter to the activation
+ * @platform_data: the platform data to send
+ *
+ * Activates the remote action.
+ *
+ * This is the same as g_action_group_activate_action() except that it
+ * allows for provision of "platform data" to be sent along with the
+ * activation request.  This typically contains details such as the user
+ * interaction timestamp or startup notification information.
+ *
+ * @platform_data must be non-%NULL and must have the type
+ * %G_VARIANT_TYPE_VARDICT.  If it is floating, it will be consumed.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_remote_action_group_change_action_state_full:
+ * @remote: a #GRemoteActionGroup
+ * @action_name: the name of the action to change the state of
+ * @value: the new requested value for the state
+ * @platform_data: the platform data to send
+ *
+ * Changes the state of a remote action.
+ *
+ * This is the same as g_action_group_change_action_state() except that
+ * it allows for provision of "platform data" to be sent along with the
+ * state change request.  This typically contains details such as the
+ * user interaction timestamp or startup notification information.
+ *
+ * @platform_data must be non-%NULL and must have the type
+ * %G_VARIANT_TYPE_VARDICT.  If it is floating, it will be consumed.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_renew:
+ * @struct_type: the type of the elements to allocate
+ * @mem: the currently allocated memory
+ * @n_structs: the number of elements to allocate
+ *
+ * Reallocates the memory pointed to by @mem, so that it now has space for
+ * @n_structs elements of type @struct_type. It returns the new address of
+ * the memory, which may have been moved.
+ * Care is taken to avoid overflow when calculating the size of the allocated block.
+ *
+ * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
+ */
+
+
+/**
+ * g_resolver_error_quark:
+ *
+ * Gets the #GResolver Error Quark.
+ *
+ * Returns: a #GQuark.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_resolver_free_addresses: (skip)
+ * @addresses: a #GList of #GInetAddress
+ *
+ * Frees @addresses (which should be the return value from
+ * g_resolver_lookup_by_name() or g_resolver_lookup_by_name_finish()).
+ * (This is a convenience method; you can also simply free the results
+ * by hand.)
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_resolver_free_targets: (skip)
+ * @targets: a #GList of #GSrvTarget
+ *
+ * Frees @targets (which should be the return value from
+ * g_resolver_lookup_service() or g_resolver_lookup_service_finish()).
+ * (This is a convenience method; you can also simply free the
+ * results by hand.)
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_resolver_get_default:
+ *
+ * Gets the default #GResolver. You should unref it when you are done
+ * with it. #GResolver may use its reference count as a hint about how
+ * many threads it should allocate for concurrent DNS resolutions.
+ *
+ * Returns: (transfer full): the default #GResolver.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_resolver_lookup_by_address:
+ * @resolver: a #GResolver
+ * @address: the address to reverse-resolve
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @error: return location for a #GError, or %NULL
+ *
+ * Synchronously reverse-resolves @address to determine its
+ * associated hostname.
+ *
+ * If the DNS resolution fails, @error (if non-%NULL) will be set to
+ * a value from #GResolverError.
+ *
+ * If @cancellable is non-%NULL, it can be used to cancel the
+ * operation, in which case @error (if non-%NULL) will be set to
+ * %G_IO_ERROR_CANCELLED.
+ *
+ * form), or %NULL on error.
+ *
+ * Returns: a hostname (either ASCII-only, or in ASCII-encoded
+ * Since: 2.22
+ */
+
+
+/**
+ * g_resolver_lookup_by_address_async:
+ * @resolver: a #GResolver
+ * @address: the address to reverse-resolve
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @callback: (scope async): callback to call after resolution completes
+ * @user_data: (closure): data for @callback
+ *
+ * Begins asynchronously reverse-resolving @address to determine its
+ * associated hostname, and eventually calls @callback, which must
+ * call g_resolver_lookup_by_address_finish() to get the final result.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_resolver_lookup_by_address_finish:
+ * @resolver: a #GResolver
+ * @result: the result passed to your #GAsyncReadyCallback
+ * @error: return location for a #GError, or %NULL
+ *
+ * Retrieves the result of a previous call to
+ * g_resolver_lookup_by_address_async().
+ *
+ * If the DNS resolution failed, @error (if non-%NULL) will be set to
+ * a value from #GResolverError. If the operation was cancelled,
+ * @error will be set to %G_IO_ERROR_CANCELLED.
+ *
+ * form), or %NULL on error.
+ *
+ * Returns: a hostname (either ASCII-only, or in ASCII-encoded
+ * Since: 2.22
+ */
+
+
+/**
+ * g_resolver_lookup_by_name:
+ * @resolver: a #GResolver
+ * @hostname: the hostname to look up
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @error: return location for a #GError, or %NULL
+ *
+ * Synchronously resolves @hostname to determine its associated IP
+ * address(es). @hostname may be an ASCII-only or UTF-8 hostname, or
+ * the textual form of an IP address (in which case this just becomes
+ * a wrapper around g_inet_address_new_from_string()).
+ *
+ * On success, g_resolver_lookup_by_name() will return a #GList of
+ * #GInetAddress, sorted in order of preference and guaranteed to not
+ * contain duplicates. That is, if using the result to connect to
+ * @hostname, you should attempt to connect to the first address
+ * first, then the second if the first fails, etc. If you are using
+ * the result to listen on a socket, it is appropriate to add each
+ * result using e.g. g_socket_listener_add_address().
+ *
+ * If the DNS resolution fails, @error (if non-%NULL) will be set to a
+ * value from #GResolverError.
+ *
+ * If @cancellable is non-%NULL, it can be used to cancel the
+ * operation, in which case @error (if non-%NULL) will be set to
+ * %G_IO_ERROR_CANCELLED.
+ *
+ * If you are planning to connect to a socket on the resolved IP
+ * address, it may be easier to create a #GNetworkAddress and use its
+ * #GSocketConnectable interface.
+ *
+ * of #GInetAddress, or %NULL on error. You
+ * must unref each of the addresses and free the list when you are
+ * done with it. (You can use g_resolver_free_addresses() to do this.)
+ *
+ * Returns: (element-type GInetAddress) (transfer full): a #GList
+ * Since: 2.22
+ */
+
+
+/**
+ * g_resolver_lookup_by_name_async:
+ * @resolver: a #GResolver
+ * @hostname: the hostname to look up the address of
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @callback: (scope async): callback to call after resolution completes
+ * @user_data: (closure): data for @callback
+ *
+ * Begins asynchronously resolving @hostname to determine its
+ * associated IP address(es), and eventually calls @callback, which
+ * must call g_resolver_lookup_by_name_finish() to get the result.
+ * See g_resolver_lookup_by_name() for more details.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_resolver_lookup_by_name_finish:
+ * @resolver: a #GResolver
+ * @result: the result passed to your #GAsyncReadyCallback
+ * @error: return location for a #GError, or %NULL
+ *
+ * Retrieves the result of a call to
+ * g_resolver_lookup_by_name_async().
+ *
+ * If the DNS resolution failed, @error (if non-%NULL) will be set to
+ * a value from #GResolverError. If the operation was cancelled,
+ * @error will be set to %G_IO_ERROR_CANCELLED.
+ *
+ * of #GInetAddress, or %NULL on error. See g_resolver_lookup_by_name()
+ * for more details.
+ *
+ * Returns: (element-type GInetAddress) (transfer full): a #GList
+ * Since: 2.22
+ */
+
+
+/**
+ * g_resolver_lookup_service:
+ * @resolver: a #GResolver
+ * @service: the service type to look up (eg, "ldap")
+ * @protocol: the networking protocol to use for @service (eg, "tcp")
+ * @domain: the DNS domain to look up the service in
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @error: return location for a #GError, or %NULL
+ *
+ * Synchronously performs a DNS SRV lookup for the given @service and
+ * @protocol in the given @domain and returns an array of #GSrvTarget.
+ * @domain may be an ASCII-only or UTF-8 hostname. Note also that the
+ * @service and @protocol arguments <emphasis>do not</emphasis>
+ * include the leading underscore that appears in the actual DNS
+ * entry.
+ *
+ * On success, g_resolver_lookup_service() will return a #GList of
+ * #GSrvTarget, sorted in order of preference. (That is, you should
+ * attempt to connect to the first target first, then the second if
+ * the first fails, etc.)
+ *
+ * If the DNS resolution fails, @error (if non-%NULL) will be set to
+ * a value from #GResolverError.
+ *
+ * If @cancellable is non-%NULL, it can be used to cancel the
+ * operation, in which case @error (if non-%NULL) will be set to
+ * %G_IO_ERROR_CANCELLED.
+ *
+ * If you are planning to connect to the service, it is usually easier
+ * to create a #GNetworkService and use its #GSocketConnectable
+ * interface.
+ *
+ * or %NULL on error. You must free each of the targets and the list when you are
+ * done with it. (You can use g_resolver_free_targets() to do this.)
+ *
+ * Returns: (element-type GSrvTarget) (transfer full): a #GList of #GSrvTarget,
+ * Since: 2.22
+ */
+
+
+/**
+ * g_resolver_lookup_service_async:
+ * @resolver: a #GResolver
+ * @service: the service type to look up (eg, "ldap")
+ * @protocol: the networking protocol to use for @service (eg, "tcp")
+ * @domain: the DNS domain to look up the service in
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @callback: (scope async): callback to call after resolution completes
+ * @user_data: (closure): data for @callback
+ *
+ * Begins asynchronously performing a DNS SRV lookup for the given
+ * @service and @protocol in the given @domain, and eventually calls
+ * @callback, which must call g_resolver_lookup_service_finish() to
+ * get the final result. See g_resolver_lookup_service() for more
+ * details.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_resolver_lookup_service_finish:
+ * @resolver: a #GResolver
+ * @result: the result passed to your #GAsyncReadyCallback
+ * @error: return location for a #GError, or %NULL
+ *
+ * Retrieves the result of a previous call to
+ * g_resolver_lookup_service_async().
+ *
+ * If the DNS resolution failed, @error (if non-%NULL) will be set to
+ * a value from #GResolverError. If the operation was cancelled,
+ * @error will be set to %G_IO_ERROR_CANCELLED.
+ *
+ * or %NULL on error. See g_resolver_lookup_service() for more details.
+ *
+ * Returns: (element-type GSrvTarget) (transfer full): a #GList of #GSrvTarget,
+ * Since: 2.22
+ */
+
+
+/**
+ * g_resolver_set_default:
+ * @resolver: the new default #GResolver
+ *
+ * Sets @resolver to be the application's default resolver (reffing
+ * @resolver, and unreffing the previous default resolver, if any).
+ * Future calls to g_resolver_get_default() will return this resolver.
+ *
+ * This can be used if an application wants to perform any sort of DNS
+ * caching or "pinning"; it can implement its own #GResolver that
+ * calls the original default resolver for DNS operations, and
+ * implements its own cache policies on top of that, and then set
+ * itself as the default resolver for all later code to use.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_resource_enumerate_children:
+ * @resource: A #GResource.
+ * @path: A pathname inside the resource.
+ * @lookup_flags: A #GResourceLookupFlags.
+ * @error: return location for a #GError, or %NULL.
+ *
+ * Returns all the names of children at the specified @path in the resource.
+ * The return result is a %NULL terminated list of strings which should
+ * be released with g_strfreev().
+ *
+ * @lookup_flags controls the behaviour of the lookup.
+ *
+ * Returns: (array zero-terminated=1) (transfer full): an array of constant strings
+ * Since: 2.32
+ */
+
+
+/**
+ * g_resource_error_quark:
+ *
+ * Gets the #GResource Error Quark.
+ *
+ * Returns: a #GQuark.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_resource_get_info:
+ * @resource: A #GResource.
+ * @path: A pathname inside the resource.
+ * @lookup_flags: A #GResourceLookupFlags.
+ * @size: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
+ * @flags: (out) (allow-none): a location to place the flags about the file, or %NULL if the length is not needed
+ * @error: return location for a #GError, or %NULL.
+ *
+ * Looks for a file at the specified @path in the resource and
+ * if found returns information about it.
+ *
+ * @lookup_flags controls the behaviour of the lookup.
+ *
+ * Returns: %TRUE if the file was found. %FALSE if there were errors.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_resource_load:
+ * @filename: (type filename): the path of a filename to load, in the GLib filename encoding.
+ * @error: return location for a #GError, or %NULL.
+ *
+ * Loads a binary resource bundle and creates a #GResource representation of it, allowing
+ * you to query it for data.
+ *
+ * If you want to use this resource in the global resource namespace you need
+ * to register it with g_resources_register().
+ *
+ * Returns: (transfer full): a new #GResource, or %NULL on error.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_resource_lookup_data:
+ * @resource: A #GResource.
+ * @path: A pathname inside the resource.
+ * @lookup_flags: A #GResourceLookupFlags.
+ * @error: return location for a #GError, or %NULL.
+ *
+ * Looks for a file at the specified @path in the resource and
+ * returns a #GBytes that lets you directly access the data in
+ * memory.
+ *
+ * The data is always followed by a zero byte, so you
+ * can safely use the data as a C string. However, that byte
+ * is not included in the size of the GBytes.
+ *
+ * For uncompressed resource files this is a pointer directly into
+ * the resource bundle, which is typically in some readonly data section
+ * in the program binary. For compressed files we allocate memory on
+ * the heap and automatically uncompress the data.
+ *
+ * @lookup_flags controls the behaviour of the lookup.
+ *
+ * Free the returned object with g_bytes_unref().
+ *
+ * Returns: (transfer full): #GBytes or %NULL on error.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_resource_new_from_data:
+ * @data: A #GBytes.
+ * @error: return location for a #GError, or %NULL.
+ *
+ * Creates a GResource from a reference to the binary resource bundle.
+ * This will keep a reference to @data while the resource lives, so
+ * the data should not be modified or freed.
+ *
+ * If you want to use this resource in the global resource namespace you need
+ * to register it with g_resources_register().
+ *
+ * Returns: (transfer full): a new #GResource, or %NULL on error.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_resource_open_stream:
+ * @resource: A #GResource.
+ * @path: A pathname inside the resource.
+ * @lookup_flags: A #GResourceLookupFlags.
+ * @error: return location for a #GError, or %NULL.
+ *
+ * Looks for a file at the specified @path in the resource and
+ * returns a #GInputStream that lets you read the data.
+ *
+ * @lookup_flags controls the behaviour of the lookup.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): #GInputStream or %NULL on error.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_resource_ref:
+ * @resource: A #GResource.
+ *
+ * Atomically increments the reference count of @array by one. This
+ * function is MT-safe and may be called from any thread.
+ *
+ * Returns: The passed in #GResource.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_resource_unref:
+ * @resource: A #GResource.
+ *
+ * Atomically decrements the reference count of @resource by one. If the
+ * reference count drops to 0, all memory allocated by the array is
+ * released. This function is MT-safe and may be called from any
+ * thread.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_resources_enumerate_children:
+ * @path: A pathname inside the resource.
+ * @lookup_flags: A #GResourceLookupFlags.
+ * @error: return location for a #GError, or %NULL.
+ *
+ * Returns all the names of children at the specified @path in the set of
+ * globally registred resources.
+ * The return result is a %NULL terminated list of strings which should
+ * be released with g_strfreev().
+ *
+ * @lookup_flags controls the behaviour of the lookup.
+ *
+ * Returns: (array zero-terminated=1) (transfer full): an array of constant strings
+ * Since: 2.32
+ */
+
+
+/**
+ * g_resources_get_info:
+ * @path: A pathname inside the resource.
+ * @lookup_flags: A #GResourceLookupFlags.
+ * @size: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
+ * @flags: (out) (allow-none): a location to place the flags about the file, or %NULL if the length is not needed
+ * @error: return location for a #GError, or %NULL.
+ *
+ * Looks for a file at the specified @path in the set of
+ * globally registred resources and if found returns information about it.
+ *
+ * @lookup_flags controls the behaviour of the lookup.
+ *
+ * Returns: %TRUE if the file was found. %FALSE if there were errors.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_resources_lookup_data:
+ * @path: A pathname inside the resource.
+ * @lookup_flags: A #GResourceLookupFlags.
+ * @error: return location for a #GError, or %NULL.
+ *
+ * Looks for a file at the specified @path in the set of
+ * globally registred resources and returns a #GBytes that
+ * lets you directly access the data in memory.
+ *
+ * The data is always followed by a zero byte, so you
+ * can safely use the data as a C string. However, that byte
+ * is not included in the size of the GBytes.
+ *
+ * For uncompressed resource files this is a pointer directly into
+ * the resource bundle, which is typically in some readonly data section
+ * in the program binary. For compressed files we allocate memory on
+ * the heap and automatically uncompress the data.
+ *
+ * @lookup_flags controls the behaviour of the lookup.
+ *
+ * Free the returned object with g_bytes_unref().
+ *
+ * Returns: (transfer full): #GBytes or %NULL on error.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_resources_open_stream:
+ * @path: A pathname inside the resource.
+ * @lookup_flags: A #GResourceLookupFlags.
+ * @error: return location for a #GError, or %NULL.
+ *
+ * Looks for a file at the specified @path in the set of
+ * globally registred resources and returns a #GInputStream
+ * that lets you read the data.
+ *
+ * @lookup_flags controls the behaviour of the lookup.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): #GInputStream or %NULL on error.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_resources_register:
+ * @resource: A #GResource.
+ *
+ * Registers the resource with the process-global set of resources.
+ * Once a resource is registered the files in it can be accessed
+ * with the global resource lookup functions like g_resources_lookup_data().
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_resources_unregister:
+ * @resource: A #GResource.
+ *
+ * Unregisters the resource from the process-global set of resources.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_seekable_can_seek:
+ * @seekable: a #GSeekable.
+ *
+ * Tests if the stream supports the #GSeekableIface.
+ *
+ * Returns: %TRUE if @seekable can be seeked. %FALSE otherwise.
+ */
+
+
+/**
+ * g_seekable_can_truncate:
+ * @seekable: a #GSeekable.
+ *
+ * Tests if the stream can be truncated.
+ *
+ * Returns: %TRUE if the stream can be truncated, %FALSE otherwise.
+ */
+
+
+/**
+ * g_seekable_seek:
+ * @seekable: a #GSeekable.
+ * @offset: a #goffset.
+ * @type: a #GSeekType.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Seeks in the stream by the given @offset, modified by @type.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * has occurred, this function will return %FALSE and set @error
+ * appropriately if present.
+ *
+ * Returns: %TRUE if successful. If an error
+ */
+
+
+/**
+ * g_seekable_tell:
+ * @seekable: a #GSeekable.
+ *
+ * Tells the current position within the stream.
+ *
+ * Returns: the offset from the beginning of the buffer.
+ */
+
+
+/**
+ * g_seekable_truncate:
+ * @seekable: a #GSeekable.
+ * @offset: a #goffset.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Truncates a stream with a given #offset.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_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.
+ *
+ * has occurred, this function will return %FALSE and set @error
+ * appropriately if present.
+ *
+ * Virtual: truncate_fn
+ * Returns: %TRUE if successful. If an error
+ */
+
+
+/**
+ * g_settings_apply:
+ * @settings: a #GSettings instance
+ *
+ * Applies any changes that have been made to the settings.  This
+ * function does nothing unless @settings is in 'delay-apply' mode;
+ * see g_settings_delay().  In the normal case settings are always
+ * applied immediately.
+ */
+
+
+/**
+ * g_settings_backend_changed:
+ * @backend: a #GSettingsBackend implementation
+ * @key: the name of the key
+ * @origin_tag: the origin tag
+ *
+ * Signals that a single key has possibly changed.  Backend
+ * implementations should call this if a key has possibly changed its
+ * value.
+ *
+ * @key must be a valid key (ie starting with a slash, not containing
+ * '//', and not ending with a slash).
+ *
+ * The implementation must call this function during any call to
+ * g_settings_backend_write(), before the call returns (except in the
+ * case that no keys are actually changed and it cares to detect this
+ * fact).  It may not rely on the existence of a mainloop for
+ * dispatching the signal later.
+ *
+ * The implementation may call this function at any other time it likes
+ * in response to other events (such as changes occurring outside of the
+ * program).  These calls may originate from a mainloop or may originate
+ * in response to any other action (including from calls to
+ * g_settings_backend_write()).
+ *
+ * In the case that this call is in response to a call to
+ * g_settings_backend_write() then @origin_tag must be set to the same
+ * value that was passed to that call.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_backend_changed_tree:
+ * @backend: a #GSettingsBackend implementation
+ * @tree: a #GTree containing the changes
+ * @origin_tag: the origin tag
+ *
+ * This call is a convenience wrapper.  It gets the list of changes from
+ * @tree, computes the longest common prefix and calls
+ * g_settings_backend_changed().
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_backend_flatten_tree:
+ * @tree: a #GTree containing the changes
+ * @path: (out): the location to save the path
+ * @keys: (out) (transfer container) (array zero-terminated=1): the location to save the relative keys
+ * @values: (out) (allow-none) (transfer container) (array zero-terminated=1):  the location to save the values, or %NULL
+ *
+ * Calculate the longest common prefix of all keys in a tree and write
+ * out an array of the key names relative to that prefix and,
+ * optionally, the value to store at each of those keys.
+ *
+ * You must free the value returned in @path, @keys and @values using
+ * g_free().  You should not attempt to free or unref the contents of
+ * @keys or @values.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_backend_get_default:
+ *
+ * Returns the default #GSettingsBackend. It is possible to override
+ * the default by setting the <envar>GSETTINGS_BACKEND</envar>
+ * environment variable to the name of a settings backend.
+ *
+ * The user gets a reference to the backend.
+ *
+ * Returns: (transfer full): the default #GSettingsBackend
+ * Since: 2.28
+ */
+
+
+/**
+ * g_settings_backend_keys_changed:
+ * @backend: a #GSettingsBackend implementation
+ * @path: the path containing the changes
+ * @items: (array zero-terminated=1): the %NULL-terminated list of changed keys
+ * @origin_tag: the origin tag
+ *
+ * Signals that a list of keys have possibly changed.  Backend
+ * implementations should call this if keys have possibly changed their
+ * values.
+ *
+ * @path must be a valid path (ie starting and ending with a slash and
+ * not containing '//').  Each string in @items must form a valid key
+ * name when @path is prefixed to it (ie: each item must not start or
+ * end with '/' and must not contain '//').
+ *
+ * The meaning of this signal is that any of the key names resulting
+ * from the contatenation of @path with each item in @items may have
+ * changed.
+ *
+ * The same rules for when notifications must occur apply as per
+ * g_settings_backend_changed().  These two calls can be used
+ * interchangeably if exactly one item has changed (although in that
+ * case g_settings_backend_changed() is definitely preferred).
+ *
+ * For efficiency reasons, the implementation should strive for @path to
+ * be as long as possible (ie: the longest common prefix of all of the
+ * keys that were changed) but this is not strictly required.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_backend_path_changed:
+ * @backend: a #GSettingsBackend implementation
+ * @path: the path containing the changes
+ * @origin_tag: the origin tag
+ *
+ * Signals that all keys below a given path may have possibly changed.
+ * Backend implementations should call this if an entire path of keys
+ * have possibly changed their values.
+ *
+ * @path must be a valid path (ie starting and ending with a slash and
+ * not containing '//').
+ *
+ * The meaning of this signal is that any of the key which has a name
+ * starting with @path may have changed.
+ *
+ * The same rules for when notifications must occur apply as per
+ * g_settings_backend_changed().  This call might be an appropriate
+ * reasponse to a 'reset' call but implementations are also free to
+ * explicitly list the keys that were affected by that call if they can
+ * easily do so.
+ *
+ * For efficiency reasons, the implementation should strive for @path to
+ * be as long as possible (ie: the longest common prefix of all of the
+ * keys that were changed) but this is not strictly required.  As an
+ * example, if this function is called with the path of "/" then every
+ * single key in the application will be notified of a possible change.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_backend_path_writable_changed:
+ * @backend: a #GSettingsBackend implementation
+ * @path: the name of the path
+ *
+ * Signals that the writability of all keys below a given path may have
+ * changed.
+ *
+ * Since GSettings performs no locking operations for itself, this call
+ * will always be made in response to external events.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_backend_writable_changed:
+ * @backend: a #GSettingsBackend implementation
+ * @key: the name of the key
+ *
+ * Signals that the writability of a single key has possibly changed.
+ *
+ * Since GSettings performs no locking operations for itself, this call
+ * will always be made in response to external events.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_bind:
+ * @settings: a #GSettings object
+ * @key: the key to bind
+ * @object: (type GObject.Object): a #GObject
+ * @property: the name of the property to bind
+ * @flags: flags for the binding
+ *
+ * Create a binding between the @key in the @settings object
+ * and the property @property of @object.
+ *
+ * The binding uses the default GIO mapping functions to map
+ * between the settings and property values. These functions
+ * handle booleans, numeric types and string types in a
+ * straightforward way. Use g_settings_bind_with_mapping() if
+ * you need a custom mapping, or map between types that are not
+ * supported by the default mapping functions.
+ *
+ * Unless the @flags include %G_SETTINGS_BIND_NO_SENSITIVITY, this
+ * function also establishes a binding between the writability of
+ * @key and the "sensitive" property of @object (if @object has
+ * a boolean property by that name). See g_settings_bind_writable()
+ * for more details about writable bindings.
+ *
+ * Note that the lifecycle of the binding is tied to the object,
+ * and that you can have only one binding per object property.
+ * If you bind the same property twice on the same object, the second
+ * binding overrides the first one.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_bind_with_mapping: (skip)
+ * @settings: a #GSettings object
+ * @key: the key to bind
+ * @object: (type GObject.Object): a #GObject
+ * @property: the name of the property to bind
+ * @flags: flags for the binding
+ * @get_mapping: a function that gets called to convert values from @settings to @object, or %NULL to use the default GIO mapping
+ * @set_mapping: a function that gets called to convert values from @object to @settings, or %NULL to use the default GIO mapping
+ * @user_data: data that gets passed to @get_mapping and @set_mapping
+ * @destroy: #GDestroyNotify function for @user_data
+ *
+ * Create a binding between the @key in the @settings object
+ * and the property @property of @object.
+ *
+ * The binding uses the provided mapping functions to map between
+ * settings and property values.
+ *
+ * Note that the lifecycle of the binding is tied to the object,
+ * and that you can have only one binding per object property.
+ * If you bind the same property twice on the same object, the second
+ * binding overrides the first one.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_bind_writable:
+ * @settings: a #GSettings object
+ * @key: the key to bind
+ * @object: (type GObject.Object): a #GObject
+ * @property: the name of a boolean property to bind
+ * @inverted: whether to 'invert' the value
+ *
+ * Create a binding between the writability of @key in the
+ * @settings object and the property @property of @object.
+ * The property must be boolean; "sensitive" or "visible"
+ * properties of widgets are the most likely candidates.
+ *
+ * Writable bindings are always uni-directional; changes of the
+ * writability of the setting will be propagated to the object
+ * property, not the other way.
+ *
+ * When the @inverted argument is %TRUE, the binding inverts the
+ * value as it passes from the setting to the object, i.e. @property
+ * will be set to %TRUE if the key is <emphasis>not</emphasis>
+ * writable.
+ *
+ * Note that the lifecycle of the binding is tied to the object,
+ * and that you can have only one binding per object property.
+ * If you bind the same property twice on the same object, the second
+ * binding overrides the first one.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_create_action:
+ * @settings: a #GSettings
+ * @key: the name of a key in @settings
+ *
+ * Creates a #GAction corresponding to a given #GSettings key.
+ *
+ * The action has the same name as the key.
+ *
+ * The value of the key becomes the state of the action and the action
+ * is enabled when the key is writable.  Changing the state of the
+ * action results in the key being written to.  Changes to the value or
+ * writability of the key cause appropriate change notifications to be
+ * emitted for the action.
+ *
+ * For boolean-valued keys, action activations take no parameter and
+ * result in the toggling of the value.  For all other types,
+ * activations take the new value for the key (which must have the
+ * correct type).
+ *
+ * Returns: (transfer full): a new #GAction
+ * Since: 2.32
+ */
+
+
+/**
+ * g_settings_delay:
+ * @settings: a #GSettings object
+ *
+ * Changes the #GSettings object into 'delay-apply' mode. In this
+ * mode, changes to @settings are not immediately propagated to the
+ * backend, but kept locally until g_settings_apply() is called.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_get:
+ * @settings: a #GSettings object
+ * @key: the key to get the value for
+ * @format: a #GVariant format string
+ * @...: arguments as per @format
+ *
+ * Gets the value that is stored at @key in @settings.
+ *
+ * A convenience function that combines g_settings_get_value() with
+ * g_variant_get().
+ *
+ * It is a programmer error to give a @key that isn't contained in the
+ * schema for @settings or for the #GVariantType of @format to mismatch
+ * the type given in the schema.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_get_boolean:
+ * @settings: a #GSettings object
+ * @key: the key to get the value for
+ *
+ * Gets the value that is stored at @key in @settings.
+ *
+ * A convenience variant of g_settings_get() for booleans.
+ *
+ * It is a programmer error to give a @key that isn't specified as
+ * having a boolean type in the schema for @settings.
+ *
+ * Returns: a boolean
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_get_child:
+ * @settings: a #GSettings object
+ * @name: the name of the 'child' schema
+ *
+ * Creates a 'child' settings object which has a base path of
+ * <replaceable>base-path</replaceable>/@name, where
+ * <replaceable>base-path</replaceable> is the base path of @settings.
+ *
+ * The schema for the child settings object must have been declared
+ * in the schema of @settings using a <tag class="starttag">child</tag> element.
+ *
+ * Returns: (transfer full): a 'child' settings object
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_get_double:
+ * @settings: a #GSettings object
+ * @key: the key to get the value for
+ *
+ * Gets the value that is stored at @key in @settings.
+ *
+ * A convenience variant of g_settings_get() for doubles.
+ *
+ * It is a programmer error to give a @key that isn't specified as
+ * having a 'double' type in the schema for @settings.
+ *
+ * Returns: a double
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_get_enum:
+ * @settings: a #GSettings object
+ * @key: the key to get the value for
+ *
+ * Gets the value that is stored in @settings for @key and converts it
+ * to the enum value that it represents.
+ *
+ * In order to use this function the type of the value must be a string
+ * and it must be marked in the schema file as an enumerated type.
+ *
+ * It is a programmer error to give a @key that isn't contained in the
+ * schema for @settings or is not marked as an enumerated type.
+ *
+ * If the value stored in the configuration database is not a valid
+ * value for the enumerated type then this function will return the
+ * default value.
+ *
+ * Returns: the enum value
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_get_flags:
+ * @settings: a #GSettings object
+ * @key: the key to get the value for
+ *
+ * Gets the value that is stored in @settings for @key and converts it
+ * to the flags value that it represents.
+ *
+ * In order to use this function the type of the value must be an array
+ * of strings and it must be marked in the schema file as an flags type.
+ *
+ * It is a programmer error to give a @key that isn't contained in the
+ * schema for @settings or is not marked as a flags type.
+ *
+ * If the value stored in the configuration database is not a valid
+ * value for the flags type then this function will return the default
+ * value.
+ *
+ * Returns: the flags value
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_get_has_unapplied:
+ * @settings: a #GSettings object
+ *
+ * Returns whether the #GSettings object has any unapplied
+ * changes.  This can only be the case if it is in 'delayed-apply' mode.
+ *
+ * Returns: %TRUE if @settings has unapplied changes
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_get_int:
+ * @settings: a #GSettings object
+ * @key: the key to get the value for
+ *
+ * Gets the value that is stored at @key in @settings.
+ *
+ * A convenience variant of g_settings_get() for 32-bit integers.
+ *
+ * It is a programmer error to give a @key that isn't specified as
+ * having a int32 type in the schema for @settings.
+ *
+ * Returns: an integer
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_get_mapped:
+ * @settings: a #GSettings object
+ * @key: the key to get the value for
+ * @mapping: (scope call): the function to map the value in the settings database to the value used by the application
+ * @user_data: user data for @mapping
+ *
+ * Gets the value that is stored at @key in @settings, subject to
+ * application-level validation/mapping.
+ *
+ * You should use this function when the application needs to perform
+ * some processing on the value of the key (for example, parsing).  The
+ * @mapping function performs that processing.  If the function
+ * indicates that the processing was unsuccessful (due to a parse error,
+ * for example) then the mapping is tried again with another value.
+ *
+ * This allows a robust 'fall back to defaults' behaviour to be
+ * implemented somewhat automatically.
+ *
+ * The first value that is tried is the user's setting for the key.  If
+ * the mapping function fails to map this value, other values may be
+ * tried in an unspecified order (system or site defaults, translated
+ * schema default values, untranslated schema default values, etc).
+ *
+ * If the mapping function fails for all possible values, one additional
+ * attempt is made: the mapping function is called with a %NULL value.
+ * If the mapping function still indicates failure at this point then
+ * the application will be aborted.
+ *
+ * The result parameter for the @mapping function is pointed to a
+ * #gpointer which is initially set to %NULL.  The same pointer is given
+ * to each invocation of @mapping.  The final value of that #gpointer is
+ * what is returned by this function.  %NULL is valid; it is returned
+ * just as any other value would be.
+ *
+ * Returns: (transfer full): the result, which may be %NULL
+ */
+
+
+/**
+ * g_settings_get_range:
+ * @settings: a #GSettings
+ * @key: the key to query the range of
+ *
+ * Queries the range of a key.
+ *
+ * This function will return a #GVariant that fully describes the range
+ * of values that are valid for @key.
+ *
+ * The type of #GVariant returned is <literal>(sv)</literal>.  The
+ * string describes the type of range restriction in effect.  The type
+ * and meaning of the value contained in the variant depends on the
+ * string.
+ *
+ * If the string is <literal>'type'</literal> then the variant contains
+ * an empty array.  The element type of that empty array is the expected
+ * type of value and all values of that type are valid.
+ *
+ * If the string is <literal>'enum'</literal> then the variant contains
+ * an array enumerating the possible values.  Each item in the array is
+ * a possible valid value and no other values are valid.
+ *
+ * If the string is <literal>'flags'</literal> then the variant contains
+ * an array.  Each item in the array is a value that may appear zero or
+ * one times in an array to be used as the value for this key.  For
+ * example, if the variant contained the array <literal>['x',
+ * 'y']</literal> then the valid values for the key would be
+ * <literal>[]</literal>, <literal>['x']</literal>,
+ * <literal>['y']</literal>, <literal>['x', 'y']</literal> and
+ * <literal>['y', 'x']</literal>.
+ *
+ * Finally, if the string is <literal>'range'</literal> then the variant
+ * contains a pair of like-typed values -- the minimum and maximum
+ * permissible values for this key.
+ *
+ * This information should not be used by normal programs.  It is
+ * considered to be a hint for introspection purposes.  Normal programs
+ * should already know what is permitted by their own schema.  The
+ * format may change in any way in the future -- but particularly, new
+ * forms may be added to the possibilities described above.
+ *
+ * It is a programmer error to give a @key that isn't contained in the
+ * schema for @settings.
+ *
+ * You should free the returned value with g_variant_unref() when it is
+ * no longer needed.
+ *
+ * Returns: a #GVariant describing the range
+ * Since: 2.28
+ */
+
+
+/**
+ * g_settings_get_string:
+ * @settings: a #GSettings object
+ * @key: the key to get the value for
+ *
+ * Gets the value that is stored at @key in @settings.
+ *
+ * A convenience variant of g_settings_get() for strings.
+ *
+ * It is a programmer error to give a @key that isn't specified as
+ * having a string type in the schema for @settings.
+ *
+ * Returns: a newly-allocated string
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_get_strv:
+ * @settings: a #GSettings object
+ * @key: the key to get the value for
+ *
+ * A convenience variant of g_settings_get() for string arrays.
+ *
+ * It is a programmer error to give a @key that isn't specified as
+ * having an array of strings type in the schema for @settings.
+ *
+ * newly-allocated, %NULL-terminated array of strings, the value that
+ * is stored at @key in @settings.
+ *
+ * Returns: (array zero-terminated=1) (transfer full): a
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_get_uint:
+ * @settings: a #GSettings object
+ * @key: the key to get the value for
+ *
+ * Gets the value that is stored at @key in @settings.
+ *
+ * A convenience variant of g_settings_get() for 32-bit unsigned
+ * integers.
+ *
+ * It is a programmer error to give a @key that isn't specified as
+ * having a uint32 type in the schema for @settings.
+ *
+ * Returns: an unsigned integer
+ * Since: 2.30
+ */
+
+
+/**
+ * g_settings_get_value:
+ * @settings: a #GSettings object
+ * @key: the key to get the value for
+ *
+ * Gets the value that is stored in @settings for @key.
+ *
+ * It is a programmer error to give a @key that isn't contained in the
+ * schema for @settings.
+ *
+ * Returns: a new #GVariant
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_is_writable:
+ * @settings: a #GSettings object
+ * @name: the name of a key
+ *
+ * Finds out if a key can be written or not
+ *
+ * Returns: %TRUE if the key @name is writable
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_list_children:
+ * @settings: a #GSettings object
+ *
+ * Gets the list of children on @settings.
+ *
+ * The list is exactly the list of strings for which it is not an error
+ * to call g_settings_get_child().
+ *
+ * For GSettings objects that are lists, this value can change at any
+ * time and you should connect to the "children-changed" signal to watch
+ * for those changes.  Note that there is a race condition here: you may
+ * request a child after listing it only for it to have been destroyed
+ * in the meantime.  For this reason, g_settings_get_child() may return
+ * %NULL even for a child that was listed by this function.
+ *
+ * For GSettings objects that are not lists, you should probably not be
+ * calling this function from "normal" code (since you should already
+ * know what children are in your schema).  This function may still be
+ * useful there for introspection reasons, however.
+ *
+ * You should free the return value with g_strfreev() when you are done
+ * with it.
+ *
+ * Returns: (transfer full) (element-type utf8): a list of the children on @settings
+ */
+
+
+/**
+ * g_settings_list_keys:
+ * @settings: a #GSettings object
+ *
+ * Introspects the list of keys on @settings.
+ *
+ * You should probably not be calling this function from "normal" code
+ * (since you should already know what keys are in your schema).  This
+ * function is intended for introspection reasons.
+ *
+ * You should free the return value with g_strfreev() when you are done
+ * with it.
+ *
+ * Returns: (transfer full) (element-type utf8): a list of the keys on @settings
+ */
+
+
+/**
+ * g_settings_list_relocatable_schemas:
+ *
+ * Gets a list of the relocatable #GSettings schemas installed on the
+ * system.  These are schemas that do not provide their own path.  It is
+ * usual to instantiate these schemas directly, but if you want to you
+ * can use g_settings_new_with_path() to specify the path.
+ *
+ * The output of this function, taken together with the output of
+ * g_settings_list_schemas() represents the complete list of all
+ * installed schemas.
+ *
+ * #GSettings schemas that are available.  The list must not be
+ * modified or freed.
+ *
+ * Returns: (element-type utf8) (transfer none): a list of relocatable
+ * Since: 2.28
+ */
+
+
+/**
+ * g_settings_list_schemas:
+ *
+ * Gets a list of the #GSettings schemas installed on the system.  The
+ * returned list is exactly the list of schemas for which you may call
+ * g_settings_new() without adverse effects.
+ *
+ * This function does not list the schemas that do not provide their own
+ * paths (ie: schemas for which you must use
+ * g_settings_new_with_path()).  See
+ * g_settings_list_relocatable_schemas() for that.
+ *
+ * schemas that are available.  The list must not be modified or
+ * freed.
+ *
+ * Returns: (element-type utf8) (transfer none): a list of #GSettings
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_new:
+ * @schema_id: the id of the schema
+ *
+ * Creates a new #GSettings object with the schema specified by
+ * @schema_id.
+ *
+ * Signals on the newly created #GSettings object will be dispatched
+ * via the thread-default #GMainContext in effect at the time of the
+ * call to g_settings_new().  The new #GSettings will hold a reference
+ * on the context.  See g_main_context_push_thread_default().
+ *
+ * Returns: a new #GSettings object
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_new_full:
+ * @schema: a #GSettingsSchema
+ * @backend: (allow-none): a #GSettingsBackend
+ * @path: (allow-none): the path to use
+ *
+ * Creates a new #GSettings object with a given schema, backend and
+ * path.
+ *
+ * It should be extremely rare that you ever want to use this function.
+ * It is made available for advanced use-cases (such as plugin systems
+ * that want to provide access to schemas loaded from custom locations,
+ * etc).
+ *
+ * At the most basic level, a #GSettings object is a pure composition of
+ * 4 things: a #GSettingsSchema, a #GSettingsBackend, a path within that
+ * backend, and a #GMainContext to which signals are dispatched.
+ *
+ * This constructor therefore gives you full control over constructing
+ * #GSettings instances.  The first 4 parameters are given directly as
+ * @schema, @backend and @path, and the main context is taken from the
+ * thread-default (as per g_settings_new()).
+ *
+ * If @backend is %NULL then the default backend is used.
+ *
+ * If @path is %NULL then the path from the schema is used.  It is an
+ * error f @path is %NULL and the schema has no path of its own or if
+ * @path is non-%NULL and not equal to the path that the schema does
+ * have.
+ *
+ * Returns: a new #GSettings object
+ * Since: 2.32
+ */
+
+
+/**
+ * g_settings_new_with_backend:
+ * @schema_id: the id of the schema
+ * @backend: the #GSettingsBackend to use
+ *
+ * Creates a new #GSettings object with the schema specified by
+ * @schema_id and a given #GSettingsBackend.
+ *
+ * Creating a #GSettings object with a different backend allows accessing
+ * settings from a database other than the usual one. For example, it may make
+ * sense to pass a backend corresponding to the "defaults" settings database on
+ * the system to get a settings object that modifies the system default
+ * settings instead of the settings for this user.
+ *
+ * Returns: a new #GSettings object
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_new_with_backend_and_path:
+ * @schema_id: the id of the schema
+ * @backend: the #GSettingsBackend to use
+ * @path: the path to use
+ *
+ * Creates a new #GSettings object with the schema specified by
+ * @schema_id and a given #GSettingsBackend and path.
+ *
+ * This is a mix of g_settings_new_with_backend() and
+ * g_settings_new_with_path().
+ *
+ * Returns: a new #GSettings object
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_new_with_path:
+ * @schema_id: the id of the schema
+ * @path: the path to use
+ *
+ * Creates a new #GSettings object with the relocatable schema specified
+ * by @schema_id and a given path.
+ *
+ * You only need to do this if you want to directly create a settings
+ * object with a schema that doesn't have a specified path of its own.
+ * That's quite rare.
+ *
+ * It is a programmer error to call this function for a schema that
+ * has an explicitly specified path.
+ *
+ * Returns: a new #GSettings object
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_range_check:
+ * @settings: a #GSettings
+ * @key: the key to check
+ * @value: the value to check
+ *
+ * Checks if the given @value is of the correct type and within the
+ * permitted range for @key.
+ *
+ * This API is not intended to be used by normal programs -- they should
+ * already know what is permitted by their own schemas.  This API is
+ * meant to be used by programs such as editors or commandline tools.
+ *
+ * It is a programmer error to give a @key that isn't contained in the
+ * schema for @settings.
+ *
+ * Returns: %TRUE if @value is valid for @key
+ * Since: 2.28
+ */
+
+
+/**
+ * g_settings_reset:
+ * @settings: a #GSettings object
+ * @key: the name of a key
+ *
+ * Resets @key to its default value.
+ *
+ * This call resets the key, as much as possible, to its default value.
+ * That might the value specified in the schema or the one set by the
+ * administrator.
+ */
+
+
+/**
+ * g_settings_revert:
+ * @settings: a #GSettings instance
+ *
+ * Reverts all non-applied changes to the settings.  This function
+ * does nothing unless @settings is in 'delay-apply' mode; see
+ * g_settings_delay().  In the normal case settings are always applied
+ * immediately.
+ *
+ * Change notifications will be emitted for affected keys.
+ */
+
+
+/**
+ * g_settings_schema_get_id:
+ * @schema: a #GSettingsSchema
+ *
+ * Get the ID of @schema.
+ *
+ * Returns: (transfer none): the ID
+ */
+
+
+/**
+ * g_settings_schema_get_path:
+ * @schema: a #GSettingsSchema
+ *
+ * Gets the path associated with @schema, or %NULL.
+ *
+ * Schemas may be single-instance or relocatable.  Single-instance
+ * schemas correspond to exactly one set of keys in the backend
+ * database: those located at the path returned by this function.
+ *
+ * Relocatable schemas can be referenced by other schemas and can
+ * threfore describe multiple sets of keys at different locations.  For
+ * relocatable schemas, this function will return %NULL.
+ *
+ * Returns: (transfer none): the path of the schema, or %NULL
+ * Since: 2.32
+ */
+
+
+/**
+ * g_settings_schema_ref:
+ * @schema: a #GSettingsSchema
+ *
+ * Increase the reference count of @schema, returning a new reference.
+ *
+ * Returns: a new reference to @schema
+ * Since: 2.32
+ */
+
+
+/**
+ * g_settings_schema_source_get_default:
+ *
+ * Gets the default system schema source.
+ *
+ * This function is not required for normal uses of #GSettings but it
+ * may be useful to authors of plugin management systems or to those who
+ * want to introspect the content of schemas.
+ *
+ * If no schemas are installed, %NULL will be returned.
+ *
+ * The returned source may actually consist of multiple schema sources
+ * from different directories, depending on which directories were given
+ * in <envar>XDG_DATA_DIRS</envar> and
+ * <envar>GSETTINGS_SCHEMA_DIR</envar>.  For this reason, all lookups
+ * performed against the default source should probably be done
+ * recursively.
+ *
+ * Returns: (transfer none): the default schema source
+ * Since: 2.32
+ */
+
+
+/**
+ * g_settings_schema_source_lookup:
+ * @source: a #GSettingsSchemaSource
+ * @schema_id: a schema ID
+ * @recursive: %TRUE if the lookup should be recursive
+ *
+ * Looks up a schema with the identifier @schema_id in @source.
+ *
+ * This function is not required for normal uses of #GSettings but it
+ * may be useful to authors of plugin management systems or to those who
+ * want to introspect the content of schemas.
+ *
+ * If the schema isn't found directly in @source and @recursive is %TRUE
+ * then the parent sources will also be checked.
+ *
+ * If the schema isn't found, %NULL is returned.
+ *
+ * Returns: (transfer full): a new #GSettingsSchema
+ * Since: 2.32
+ */
+
+
+/**
+ * g_settings_schema_source_new_from_directory:
+ * @directory: the filename of a directory
+ * @parent: (allow-none): a #GSettingsSchemaSource, or %NULL
+ * @trusted: %TRUE, if the directory is trusted
+ * @error: a pointer to a #GError pointer set to %NULL, or %NULL
+ *
+ * Attempts to create a new schema source corresponding to the contents
+ * of the given directory.
+ *
+ * This function is not required for normal uses of #GSettings but it
+ * may be useful to authors of plugin management systems.
+ *
+ * The directory should contain a file called
+ * <filename>gschemas.compiled</filename> as produced by
+ * <command>glib-compile-schemas</command>.
+ *
+ * If @trusted is %TRUE then <filename>gschemas.compiled</filename> is
+ * trusted not to be corrupted.  This assumption has a performance
+ * advantage, but can result in crashes or inconsistent behaviour in the
+ * case of a corrupted file.  Generally, you should set @trusted to
+ * %TRUE for files installed by the system and to %FALSE for files in
+ * the home directory.
+ *
+ * If @parent is non-%NULL then there are two effects.
+ *
+ * First, if g_settings_schema_source_lookup() is called with the
+ * @recursive flag set to %TRUE and the schema can not be found in the
+ * source, the lookup will recurse to the parent.
+ *
+ * Second, any references to other schemas specified within this
+ * source (ie: <literal>child</literal> or <literal>extents</literal>)
+ * references may be resolved from the @parent.
+ *
+ * For this second reason, except in very unusual situations, the
+ * @parent should probably be given as the default schema source, as
+ * returned by g_settings_schema_source_get_default().
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_settings_schema_source_ref:
+ * @source: a #GSettingsSchemaSource
+ *
+ * Increase the reference count of @source, returning a new reference.
+ *
+ * Returns: a new reference to @source
+ * Since: 2.32
+ */
+
+
+/**
+ * g_settings_schema_source_unref:
+ * @source: a #GSettingsSchemaSource
+ *
+ * Decrease the reference count of @source, possibly freeing it.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_settings_schema_unref:
+ * @schema: a #GSettingsSchema
+ *
+ * Decrease the reference count of @schema, possibly freeing it.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_settings_set:
+ * @settings: a #GSettings object
+ * @key: the name of the key to set
+ * @format: a #GVariant format string
+ * @...: arguments as per @format
+ *
+ * Sets @key in @settings to @value.
+ *
+ * A convenience function that combines g_settings_set_value() with
+ * g_variant_new().
+ *
+ * It is a programmer error to give a @key that isn't contained in the
+ * schema for @settings or for the #GVariantType of @format to mismatch
+ * the type given in the schema.
+ *
+ * %FALSE if the key was not writable
+ *
+ * Returns: %TRUE if setting the key succeeded,
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_set_boolean:
+ * @settings: a #GSettings object
+ * @key: the name of the key to set
+ * @value: the value to set it to
+ *
+ * Sets @key in @settings to @value.
+ *
+ * A convenience variant of g_settings_set() for booleans.
+ *
+ * It is a programmer error to give a @key that isn't specified as
+ * having a boolean type in the schema for @settings.
+ *
+ * %FALSE if the key was not writable
+ *
+ * Returns: %TRUE if setting the key succeeded,
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_set_double:
+ * @settings: a #GSettings object
+ * @key: the name of the key to set
+ * @value: the value to set it to
+ *
+ * Sets @key in @settings to @value.
+ *
+ * A convenience variant of g_settings_set() for doubles.
+ *
+ * It is a programmer error to give a @key that isn't specified as
+ * having a 'double' type in the schema for @settings.
+ *
+ * %FALSE if the key was not writable
+ *
+ * Returns: %TRUE if setting the key succeeded,
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_set_enum:
+ * @settings: a #GSettings object
+ * @key: a key, within @settings
+ * @value: an enumerated value
+ *
+ * Looks up the enumerated type nick for @value and writes it to @key,
+ * within @settings.
+ *
+ * It is a programmer error to give a @key that isn't contained in the
+ * schema for @settings or is not marked as an enumerated type, or for
+ * @value not to be a valid value for the named type.
+ *
+ * After performing the write, accessing @key directly with
+ * g_settings_get_string() will return the 'nick' associated with
+ * @value.
+ *
+ * Returns: %TRUE, if the set succeeds
+ */
+
+
+/**
+ * g_settings_set_flags:
+ * @settings: a #GSettings object
+ * @key: a key, within @settings
+ * @value: a flags value
+ *
+ * Looks up the flags type nicks for the bits specified by @value, puts
+ * them in an array of strings and writes the array to @key, within
+ * @settings.
+ *
+ * It is a programmer error to give a @key that isn't contained in the
+ * schema for @settings or is not marked as a flags type, or for @value
+ * to contain any bits that are not value for the named type.
+ *
+ * After performing the write, accessing @key directly with
+ * g_settings_get_strv() will return an array of 'nicks'; one for each
+ * bit in @value.
+ *
+ * Returns: %TRUE, if the set succeeds
+ */
+
+
+/**
+ * g_settings_set_int:
+ * @settings: a #GSettings object
+ * @key: the name of the key to set
+ * @value: the value to set it to
+ *
+ * Sets @key in @settings to @value.
+ *
+ * A convenience variant of g_settings_set() for 32-bit integers.
+ *
+ * It is a programmer error to give a @key that isn't specified as
+ * having a int32 type in the schema for @settings.
+ *
+ * %FALSE if the key was not writable
+ *
+ * Returns: %TRUE if setting the key succeeded,
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_set_string:
+ * @settings: a #GSettings object
+ * @key: the name of the key to set
+ * @value: the value to set it to
+ *
+ * Sets @key in @settings to @value.
+ *
+ * A convenience variant of g_settings_set() for strings.
+ *
+ * It is a programmer error to give a @key that isn't specified as
+ * having a string type in the schema for @settings.
+ *
+ * %FALSE if the key was not writable
+ *
+ * Returns: %TRUE if setting the key succeeded,
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_set_strv:
+ * @settings: a #GSettings object
+ * @key: the name of the key to set
+ * @value: (allow-none) (array zero-terminated=1): the value to set it to, or %NULL
+ *
+ * Sets @key in @settings to @value.
+ *
+ * A convenience variant of g_settings_set() for string arrays.  If
+ * @value is %NULL, then @key is set to be the empty array.
+ *
+ * It is a programmer error to give a @key that isn't specified as
+ * having an array of strings type in the schema for @settings.
+ *
+ * %FALSE if the key was not writable
+ *
+ * Returns: %TRUE if setting the key succeeded,
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_set_uint:
+ * @settings: a #GSettings object
+ * @key: the name of the key to set
+ * @value: the value to set it to
+ *
+ * Sets @key in @settings to @value.
+ *
+ * A convenience variant of g_settings_set() for 32-bit unsigned
+ * integers.
+ *
+ * It is a programmer error to give a @key that isn't specified as
+ * having a uint32 type in the schema for @settings.
+ *
+ * %FALSE if the key was not writable
+ *
+ * Returns: %TRUE if setting the key succeeded,
+ * Since: 2.30
+ */
+
+
+/**
+ * g_settings_set_value:
+ * @settings: a #GSettings object
+ * @key: the name of the key to set
+ * @value: a #GVariant of the correct type
+ *
+ * Sets @key in @settings to @value.
+ *
+ * It is a programmer error to give a @key that isn't contained in the
+ * schema for @settings or for @value to have the incorrect type, per
+ * the schema.
+ *
+ * If @value is floating then this function consumes the reference.
+ *
+ * %FALSE if the key was not writable
+ *
+ * Returns: %TRUE if setting the key succeeded,
+ * Since: 2.26
+ */
+
+
+/**
+ * g_settings_sync:
+ *
+ * Ensures that all pending operations for the given are complete for
+ * the default backend.
+ *
+ * Writes made to a #GSettings are handled asynchronously.  For this
+ * reason, it is very unlikely that the changes have it to disk by the
+ * time g_settings_set() returns.
+ *
+ * This call will block until all of the writes have made it to the
+ * backend.  Since the mainloop is not running, no change notifications
+ * will be dispatched during this call (but some may be queued by the
+ * time the call is done).
+ */
+
+
+/**
+ * g_settings_unbind:
+ * @object: the object
+ * @property: the property whose binding is removed
+ *
+ * Removes an existing binding for @property on @object.
+ *
+ * Note that bindings are automatically removed when the
+ * object is finalized, so it is rarely necessary to call this
+ * function.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_signal_connect:
+ * @instance: the instance to connect to.
+ * @detailed_signal: a string of the form "signal-name::detail".
+ * @c_handler: the #GCallback to connect.
+ * @data: data to pass to @c_handler calls.
+ *
+ * Connects a #GCallback function to a signal for a particular object.
+ *
+ * The handler will be called before the default handler of the signal.
+ *
+ * Returns: the handler id
+ */
+
+
+/**
+ * g_signal_connect_after:
+ * @instance: the instance to connect to.
+ * @detailed_signal: a string of the form "signal-name::detail".
+ * @c_handler: the #GCallback to connect.
+ * @data: data to pass to @c_handler calls.
+ *
+ * Connects a #GCallback function to a signal for a particular object.
+ *
+ * The handler will be called after the default handler of the signal.
+ *
+ * Returns: the handler id
+ */
+
+
+/**
+ * g_signal_connect_swapped:
+ * @instance: the instance to connect to.
+ * @detailed_signal: a string of the form "signal-name::detail".
+ * @c_handler: the #GCallback to connect.
+ * @data: data to pass to @c_handler calls.
+ *
+ * Connects a #GCallback function to a signal for a particular object.
+ *
+ * The instance on which the signal is emitted and @data will be swapped when
+ * calling the handler.
+ *
+ * Returns: the handler id
+ */
+
+
+/**
+ * g_signal_handlers_block_by_func:
+ * @instance: The instance to block handlers from.
+ * @func: The C closure callback of the handlers (useless for non-C closures).
+ * @data: The closure data of the handlers' closures.
+ *
+ * Blocks all handlers on an instance that match @func and @data.
+ *
+ * Returns: The number of handlers that matched.
+ */
+
+
+/**
+ * g_signal_handlers_disconnect_by_data:
+ * @instance: The instance to remove handlers from
+ * @data: the closure data of the handlers' closures
+ *
+ * Disconnects all handlers on an instance that match @data.
+ *
+ * Returns: The number of handlers that matched.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_signal_handlers_disconnect_by_func:
+ * @instance: The instance to remove handlers from.
+ * @func: The C closure callback of the handlers (useless for non-C closures).
+ * @data: The closure data of the handlers' closures.
+ *
+ * Disconnects all handlers on an instance that match @func and @data.
+ *
+ * Returns: The number of handlers that matched.
+ */
+
+
+/**
+ * g_signal_handlers_unblock_by_func:
+ * @instance: The instance to unblock handlers from.
+ * @func: The C closure callback of the handlers (useless for non-C closures).
+ * @data: The closure data of the handlers' closures.
+ *
+ * Unblocks all handlers on an instance that match @func and @data.
+ *
+ * Returns: The number of handlers that matched.
+ */
+
+
+/**
+ * g_simple_action_group_add_entries:
+ * @simple: a #GSimpleActionGroup
+ * @entries: (array length=n_entries): a pointer to the first item in an array of #GActionEntry structs
+ * @n_entries: the length of @entries, or -1
+ * @user_data: the user data for signal connections
+ *
+ * A convenience function for creating multiple #GSimpleAction instances
+ * and adding them to the action group.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_simple_action_group_insert:
+ * @simple: a #GSimpleActionGroup
+ * @action: a #GAction
+ *
+ * Adds an action to the action group.
+ *
+ * If the action group already contains an action with the same name as
+ * @action then the old action is dropped from the group.
+ *
+ * The action group takes its own reference on @action.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_simple_action_group_lookup:
+ * @simple: a #GSimpleActionGroup
+ * @action_name: the name of an action
+ *
+ * Looks up the action with the name @action_name in the group.
+ *
+ * If no such action exists, returns %NULL.
+ *
+ * Returns: (transfer none): a #GAction, or %NULL
+ * Since: 2.28
+ */
+
+
+/**
+ * g_simple_action_group_new:
+ *
+ * Creates a new, empty, #GSimpleActionGroup.
+ *
+ * Returns: a new #GSimpleActionGroup
+ * Since: 2.28
+ */
+
+
+/**
+ * g_simple_action_group_remove:
+ * @simple: a #GSimpleActionGroup
+ * @action_name: the name of the action
+ *
+ * Removes the named action from the action group.
+ *
+ * If no action of this name is in the group then nothing happens.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_simple_action_new:
+ * @name: the name of the action
+ * @parameter_type: (allow-none): the type of parameter to the activate function
+ *
+ * Creates a new action.
+ *
+ * The created action is stateless.  See g_simple_action_new_stateful().
+ *
+ * Returns: a new #GSimpleAction
+ * Since: 2.28
+ */
+
+
+/**
+ * g_simple_action_new_stateful:
+ * @name: the name of the action
+ * @parameter_type: (allow-none): the type of the parameter to the activate function
+ * @state: the initial state of the action
+ *
+ * Creates a new stateful action.
+ *
+ * @state is the initial state of the action.  All future state values
+ * must have the same #GVariantType as the initial state.
+ *
+ * If the @state GVariant is floating, it is consumed.
+ *
+ * Returns: a new #GSimpleAction
+ * Since: 2.28
+ */
+
+
+/**
+ * g_simple_action_set_enabled:
+ * @simple: a #GSimpleAction
+ * @enabled: whether the action is enabled
+ *
+ * Sets the action as enabled or not.
+ *
+ * An action must be enabled in order to be activated or in order to
+ * have its state changed from outside callers.
+ *
+ * This should only be called by the implementor of the action.  Users
+ * of the action should not attempt to modify its enabled flag.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_simple_action_set_state:
+ * @simple: a #GSimpleAction
+ * @value: the new #GVariant for the state
+ *
+ * Sets the state of the action.
+ *
+ * This directly updates the 'state' property to the given value.
+ *
+ * This should only be called by the implementor of the action.  Users
+ * of the action should not attempt to directly modify the 'state'
+ * property.  Instead, they should call g_action_change_state() to
+ * request the change.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_simple_async_report_error_in_idle: (skip)
+ * @object: (allow-none): a #GObject, or %NULL.
+ * @callback: a #GAsyncReadyCallback.
+ * @user_data: user data passed to @callback.
+ * @domain: a #GQuark containing the error domain (usually #G_IO_ERROR).
+ * @code: a specific error code.
+ * @format: a formatted error reporting string.
+ * @...: a list of variables to fill in @format.
+ *
+ * Reports an error in an asynchronous function in an idle function by
+ * directly setting the contents of the #GAsyncResult with the given error
+ * information.
+ */
+
+
+/**
+ * g_simple_async_report_gerror_in_idle:
+ * @object: (allow-none): a #GObject, or %NULL
+ * @callback: (scope async): a #GAsyncReadyCallback.
+ * @user_data: (closure): user data passed to @callback.
+ * @error: the #GError to report
+ *
+ * Reports an error in an idle function. Similar to
+ * g_simple_async_report_error_in_idle(), but takes a #GError rather
+ * than building a new one.
+ */
+
+
+/**
+ * g_simple_async_report_take_gerror_in_idle: (skip)
+ * @object: (allow-none): a #GObject, or %NULL
+ * @callback: a #GAsyncReadyCallback.
+ * @user_data: user data passed to @callback.
+ * @error: the #GError to report
+ *
+ * Reports an error in an idle function. Similar to
+ * g_simple_async_report_gerror_in_idle(), but takes over the caller's
+ * ownership of @error, so the caller does not have to free it any more.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_simple_async_result_complete:
+ * @simple: a #GSimpleAsyncResult.
+ *
+ * Completes an asynchronous I/O job immediately. Must be called in
+ * the thread where the asynchronous result was to be delivered, as it
+ * invokes the callback directly. If you are in a different thread use
+ * g_simple_async_result_complete_in_idle().
+ *
+ * Calling this function takes a reference to @simple for as long as
+ * is needed to complete the call.
+ */
+
+
+/**
+ * g_simple_async_result_complete_in_idle:
+ * @simple: a #GSimpleAsyncResult.
+ *
+ * Completes an asynchronous function in an idle handler in the <link
+ * linkend="g-main-context-push-thread-default">thread-default main
+ * loop</link> of the thread that @simple was initially created in
+ * (and re-pushes that context around the invocation of the callback).
+ *
+ * Calling this function takes a reference to @simple for as long as
+ * is needed to complete the call.
+ */
+
+
+/**
+ * g_simple_async_result_get_op_res_gboolean:
+ * @simple: a #GSimpleAsyncResult.
+ *
+ * Gets the operation result boolean from within the asynchronous result.
+ *
+ * if the operation's result was %FALSE.
+ *
+ * Returns: %TRUE if the operation's result was %TRUE, %FALSE
+ */
+
+
+/**
+ * g_simple_async_result_get_op_res_gpointer: (skip)
+ * @simple: a #GSimpleAsyncResult.
+ *
+ * Gets a pointer result as returned by the asynchronous function.
+ *
+ * Returns: a pointer from the result.
+ */
+
+
+/**
+ * g_simple_async_result_get_op_res_gssize:
+ * @simple: a #GSimpleAsyncResult.
+ *
+ * Gets a gssize from the asynchronous result.
+ *
+ * Returns: a gssize returned from the asynchronous function.
+ */
+
+
+/**
+ * g_simple_async_result_get_source_tag: (skip)
+ * @simple: a #GSimpleAsyncResult.
+ *
+ * Gets the source tag for the #GSimpleAsyncResult.
+ *
+ * Returns: a #gpointer to the source object for the #GSimpleAsyncResult.
+ */
+
+
+/**
+ * g_simple_async_result_is_valid:
+ * @result: the #GAsyncResult passed to the _finish function.
+ * @source: the #GObject passed to the _finish function.
+ * @source_tag: the asynchronous function.
+ *
+ * Ensures that the data passed to the _finish function of an async
+ * operation is consistent.  Three checks are performed.
+ *
+ * First, @result is checked to ensure that it is really a
+ * #GSimpleAsyncResult.  Second, @source is checked to ensure that it
+ * matches the source object of @result.  Third, @source_tag is
+ * checked to ensure that it is either %NULL (as it is when the result was
+ * created by g_simple_async_report_error_in_idle() or
+ * g_simple_async_report_gerror_in_idle()) or equal to the
+ * @source_tag argument given to g_simple_async_result_new() (which, by
+ * convention, is a pointer to the _async function corresponding to the
+ * _finish function from which this function is called).
+ *
+ * Returns: #TRUE if all checks passed or #FALSE if any failed.
+ * Since: 2.20
+ */
+
+
+/**
+ * g_simple_async_result_new:
+ * @source_object: (allow-none): a #GObject, or %NULL.
+ * @callback: (scope async): a #GAsyncReadyCallback.
+ * @user_data: (closure): user data passed to @callback.
+ * @source_tag: the asynchronous function.
+ *
+ * Creates a #GSimpleAsyncResult.
+ *
+ * The common convention is to create the #GSimpleAsyncResult in the
+ * function that starts the asynchronous operation and use that same
+ * function as the @source_tag.
+ *
+ * If your operation supports cancellation with #GCancellable (which it
+ * probably should) then you should provide the user's cancellable to
+ * g_simple_async_result_set_check_cancellable() immediately after
+ * this function returns.
+ *
+ * Returns: a #GSimpleAsyncResult.
+ */
+
+
+/**
+ * g_simple_async_result_new_error:
+ * @source_object: (allow-none): a #GObject, or %NULL.
+ * @callback: (scope async): a #GAsyncReadyCallback.
+ * @user_data: (closure): user data passed to @callback.
+ * @domain: a #GQuark.
+ * @code: an error code.
+ * @format: a string with format characters.
+ * @...: a list of values to insert into @format.
+ *
+ * Creates a new #GSimpleAsyncResult with a set error.
+ *
+ * Returns: a #GSimpleAsyncResult.
+ */
+
+
+/**
+ * g_simple_async_result_new_from_error:
+ * @source_object: (allow-none): a #GObject, or %NULL.
+ * @callback: (scope async): a #GAsyncReadyCallback.
+ * @user_data: (closure): user data passed to @callback.
+ * @error: a #GError
+ *
+ * Creates a #GSimpleAsyncResult from an error condition.
+ *
+ * Returns: a #GSimpleAsyncResult.
+ */
+
+
+/**
+ * g_simple_async_result_new_take_error: (skip)
+ * @source_object: (allow-none): a #GObject, or %NULL
+ * @callback: (scope async): a #GAsyncReadyCallback
+ * @user_data: (closure): user data passed to @callback
+ * @error: a #GError
+ *
+ * Creates a #GSimpleAsyncResult from an error condition, and takes over the
+ * caller's ownership of @error, so the caller does not need to free it anymore.
+ *
+ * Returns: a #GSimpleAsyncResult
+ * Since: 2.28
+ */
+
+
+/**
+ * g_simple_async_result_propagate_error:
+ * @simple: a #GSimpleAsyncResult.
+ * @dest: (out): a location to propagate the error to.
+ *
+ * Propagates an error from within the simple asynchronous result to
+ * a given destination.
+ *
+ * If the #GCancellable given to a prior call to
+ * g_simple_async_result_set_check_cancellable() is cancelled then this
+ * function will return %TRUE with @dest set appropriately.
+ *
+ * Returns: %TRUE if the error was propagated to @dest. %FALSE otherwise.
+ */
+
+
+/**
+ * g_simple_async_result_run_in_thread: (skip)
+ * @simple: a #GSimpleAsyncResult.
+ * @func: a #GSimpleAsyncThreadFunc.
+ * @io_priority: the io priority of the request.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ *
+ * Runs the asynchronous job in a separate thread and then calls
+ * g_simple_async_result_complete_in_idle() on @simple to return
+ * the result to the appropriate main loop.
+ *
+ * Calling this function takes a reference to @simple for as long as
+ * is needed to run the job and report its completion.
+ */
+
+
+/**
+ * g_simple_async_result_set_check_cancellable:
+ * @simple: a #GSimpleAsyncResult
+ * @check_cancellable: (allow-none): a #GCancellable to check, or %NULL to unset
+ *
+ * Sets a #GCancellable to check before dispatching results.
+ *
+ * This function has one very specific purpose: the provided cancellable
+ * is checked at the time of g_simple_async_result_propagate_error() If
+ * it is cancelled, these functions will return an "Operation was
+ * cancelled" error (%G_IO_ERROR_CANCELLED).
+ *
+ * Implementors of cancellable asynchronous functions should use this in
+ * order to provide a guarantee to their callers that cancelling an
+ * async operation will reliably result in an error being returned for
+ * that operation (even if a positive result for the operation has
+ * already been sent as an idle to the main context to be dispatched).
+ *
+ * The checking described above is done regardless of any call to the
+ * unrelated g_simple_async_result_set_handle_cancellation() function.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_simple_async_result_set_error: (skip)
+ * @simple: a #GSimpleAsyncResult.
+ * @domain: a #GQuark (usually #G_IO_ERROR).
+ * @code: an error code.
+ * @format: a formatted error reporting string.
+ * @...: a list of variables to fill in @format.
+ *
+ * Sets an error within the asynchronous result without a #GError.
+ */
+
+
+/**
+ * g_simple_async_result_set_error_va: (skip)
+ * @simple: a #GSimpleAsyncResult.
+ * @domain: a #GQuark (usually #G_IO_ERROR).
+ * @code: an error code.
+ * @format: a formatted error reporting string.
+ * @args: va_list of arguments.
+ *
+ * Sets an error within the asynchronous result without a #GError.
+ * Unless writing a binding, see g_simple_async_result_set_error().
+ */
+
+
+/**
+ * g_simple_async_result_set_from_error:
+ * @simple: a #GSimpleAsyncResult.
+ * @error: #GError.
+ *
+ * Sets the result from a #GError.
+ */
+
+
+/**
+ * g_simple_async_result_set_handle_cancellation:
+ * @simple: a #GSimpleAsyncResult.
+ * @handle_cancellation: a #gboolean.
+ *
+ * Sets whether to handle cancellation within the asynchronous operation.
+ *
+ * This function has nothing to do with
+ * g_simple_async_result_set_check_cancellable().  It only refers to the
+ * #GCancellable passed to g_simple_async_result_run_in_thread().
+ */
+
+
+/**
+ * g_simple_async_result_set_op_res_gboolean:
+ * @simple: a #GSimpleAsyncResult.
+ * @op_res: a #gboolean.
+ *
+ * Sets the operation result to a boolean within the asynchronous result.
+ */
+
+
+/**
+ * g_simple_async_result_set_op_res_gpointer: (skip)
+ * @simple: a #GSimpleAsyncResult.
+ * @op_res: a pointer result from an asynchronous function.
+ * @destroy_op_res: a #GDestroyNotify function.
+ *
+ * Sets the operation result within the asynchronous result to a pointer.
+ */
+
+
+/**
+ * g_simple_async_result_set_op_res_gssize:
+ * @simple: a #GSimpleAsyncResult.
+ * @op_res: a #gssize.
+ *
+ * Sets the operation result within the asynchronous result to
+ * the given @op_res.
+ */
+
+
+/**
+ * g_simple_async_result_take_error: (skip)
+ * @simple: a #GSimpleAsyncResult
+ * @error: a #GError
+ *
+ * Sets the result from @error, and takes over the caller's ownership
+ * of @error, so the caller does not need to free it any more.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_simple_permission_new:
+ * @allowed: %TRUE if the action is allowed
+ *
+ * Creates a new #GPermission instance that represents an action that is
+ * either always or never allowed.
+ *
+ * Returns: the #GSimplePermission, as a #GPermission
+ * Since: 2.26
+ */
+
+
+/**
+ * g_socket_accept:
+ * @socket: a #GSocket.
+ * @cancellable: (allow-none): a %GCancellable or %NULL
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Accept incoming connections on a connection-based socket. This removes
+ * the first outstanding connection request from the listening socket and
+ * creates a #GSocket object for it.
+ *
+ * The @socket must be bound to a local address with g_socket_bind() and
+ * must be listening for incoming connections (g_socket_listen()).
+ *
+ * If there are no outstanding connections then the operation will block
+ * or return %G_IO_ERROR_WOULD_BLOCK if non-blocking I/O is enabled.
+ * To be notified of an incoming connection, wait for the %G_IO_IN condition.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a new #GSocket, or %NULL on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_address_enumerator_next:
+ * @enumerator: a #GSocketAddressEnumerator
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: a #GError.
+ *
+ * Retrieves the next #GSocketAddress from @enumerator. Note that this
+ * may block for some amount of time. (Eg, a #GNetworkAddress may need
+ * to do a DNS lookup before it can return an address.) Use
+ * g_socket_address_enumerator_next_async() if you need to avoid
+ * blocking.
+ *
+ * If @enumerator is expected to yield addresses, but for some reason
+ * is unable to (eg, because of a DNS error), then the first call to
+ * g_socket_address_enumerator_next() will return an appropriate error
+ * in *@error. However, if the first call to
+ * g_socket_address_enumerator_next() succeeds, then any further
+ * internal errors (other than @cancellable being triggered) will be
+ * ignored.
+ *
+ * error (in which case *@error will be set) or if there are no
+ * more addresses.
+ *
+ * Returns: (transfer full): a #GSocketAddress (owned by the caller), or %NULL on
+ */
+
+
+/**
+ * g_socket_address_enumerator_next_async:
+ * @enumerator: a #GSocketAddressEnumerator
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Asynchronously retrieves the next #GSocketAddress from @enumerator
+ * and then calls @callback, which must call
+ * g_socket_address_enumerator_next_finish() to get the result.
+ */
+
+
+/**
+ * g_socket_address_enumerator_next_finish:
+ * @enumerator: a #GSocketAddressEnumerator
+ * @result: a #GAsyncResult
+ * @error: a #GError
+ *
+ * Retrieves the result of a completed call to
+ * g_socket_address_enumerator_next_async(). See
+ * g_socket_address_enumerator_next() for more information about
+ * error handling.
+ *
+ * error (in which case *@error will be set) or if there are no
+ * more addresses.
+ *
+ * Returns: (transfer full): a #GSocketAddress (owned by the caller), or %NULL on
+ */
+
+
+/**
+ * g_socket_address_get_family:
+ * @address: a #GSocketAddress
+ *
+ * Gets the socket family type of @address.
+ *
+ * Returns: the socket family type of @address.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_address_get_native_size:
+ * @address: a #GSocketAddress
+ *
+ * Gets the size of @address's native <type>struct sockaddr</type>.
+ * You can use this to allocate memory to pass to
+ * g_socket_address_to_native().
+ *
+ * @address represents
+ *
+ * Returns: the size of the native <type>struct sockaddr</type> that
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_address_new_from_native:
+ * @native: a pointer to a <type>struct sockaddr</type>
+ * @len: the size of the memory location pointed to by @native
+ *
+ * Creates a #GSocketAddress subclass corresponding to the native
+ * <type>struct sockaddr</type> @native.
+ *
+ * otherwise %NULL.
+ *
+ * Returns: a new #GSocketAddress if @native could successfully be converted,
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_address_to_native:
+ * @address: a #GSocketAddress
+ * @dest: a pointer to a memory location that will contain the native <type>struct sockaddr</type>.
+ * @destlen: the size of @dest. Must be at least as large as g_socket_address_get_native_size().
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Converts a #GSocketAddress to a native <type>struct
+ * sockaddr</type>, which can be passed to low-level functions like
+ * connect() or bind().
+ *
+ * If not enough space is available, a %G_IO_ERROR_NO_SPACE error is
+ * returned. If the address type is not known on the system
+ * then a %G_IO_ERROR_NOT_SUPPORTED error is returned.
+ *
+ * Returns: %TRUE if @dest was filled in, %FALSE on error
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_bind:
+ * @socket: a #GSocket.
+ * @address: a #GSocketAddress specifying the local address.
+ * @allow_reuse: whether to allow reusing this address
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * When a socket is created it is attached to an address family, but it
+ * doesn't have an address in this family. g_socket_bind() assigns the
+ * address (sometimes called name) of the socket.
+ *
+ * It is generally required to bind to a local address before you can
+ * receive connections. (See g_socket_listen() and g_socket_accept() ).
+ * In certain situations, you may also want to bind a socket that will be
+ * used to initiate connections, though this is not normally required.
+ *
+ * @allow_reuse should be %TRUE for server sockets (sockets that you will
+ * eventually call g_socket_accept() on), and %FALSE for client sockets.
+ * (Specifically, if it is %TRUE, then g_socket_bind() will set the
+ * %SO_REUSEADDR flag on the socket, allowing it to bind @address even if
+ * that address was previously used by another socket that has not yet been
+ * fully cleaned-up by the kernel. Failing to set this flag on a server
+ * socket may cause the bind call to return %G_IO_ERROR_ADDRESS_IN_USE if
+ * the server program is stopped and then immediately restarted.)
+ *
+ * Returns: %TRUE on success, %FALSE on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_check_connect_result:
+ * @socket: a #GSocket
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Checks and resets the pending connect error for the socket.
+ * This is used to check for errors when g_socket_connect() is
+ * used in non-blocking mode.
+ *
+ * Returns: %TRUE if no error, %FALSE otherwise, setting @error to the error
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_client_add_application_proxy:
+ * @client: a #GSocketClient
+ * @protocol: The proxy protocol
+ *
+ * Enable proxy protocols to be handled by the application. When the
+ * indicated proxy protocol is returned by the #GProxyResolver,
+ * #GSocketClient will consider this protocol as supported but will
+ * not try to find a #GProxy instance to handle handshaking. The
+ * application must check for this case by calling
+ * g_socket_connection_get_remote_address() on the returned
+ * #GSocketConnection, and seeing if it's a #GProxyAddress of the
+ * appropriate type, to determine whether or not it needs to handle
+ * the proxy handshaking itself.
+ *
+ * This should be used for proxy protocols that are dialects of
+ * another protocol such as HTTP proxy. It also allows cohabitation of
+ * proxy protocols that are reused between protocols. A good example
+ * is HTTP. It can be used to proxy HTTP, FTP and Gopher and can also
+ * be use as generic socket proxy through the HTTP CONNECT method.
+ *
+ * When the proxy is detected as being an application proxy, TLS handshake
+ * will be skipped. This is required to let the application do the proxy
+ * specific handshake.
+ */
+
+
+/**
+ * g_socket_client_connect:
+ * @client: a #GSocketClient.
+ * @connectable: a #GSocketConnectable specifying the remote address.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Tries to resolve the @connectable and make a network connection to it.
+ *
+ * Upon a successful connection, a new #GSocketConnection is constructed
+ * and returned.  The caller owns this new object and must drop their
+ * reference to it when finished with it.
+ *
+ * The type of the #GSocketConnection object returned depends on the type of
+ * the underlying socket that is used. For instance, for a TCP/IP connection
+ * it will be a #GTcpConnection.
+ *
+ * The socket created will be the same family as the address that the
+ * @connectable resolves to, unless family is set with g_socket_client_set_family()
+ * or indirectly via g_socket_client_set_local_address(). The socket type
+ * defaults to %G_SOCKET_TYPE_STREAM but can be set with
+ * g_socket_client_set_socket_type().
+ *
+ * If a local address is specified with g_socket_client_set_local_address() the
+ * socket will be bound to this address before connecting.
+ *
+ * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_client_connect_async:
+ * @client: a #GSocketClient
+ * @connectable: a #GSocketConnectable specifying the remote address.
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @callback: (scope async): a #GAsyncReadyCallback
+ * @user_data: (closure): user data for the callback
+ *
+ * This is the asynchronous version of g_socket_client_connect().
+ *
+ * When the operation is finished @callback will be
+ * called. You can then call g_socket_client_connect_finish() to get
+ * the result of the operation.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_client_connect_finish:
+ * @client: a #GSocketClient.
+ * @result: a #GAsyncResult.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Finishes an async connect operation. See g_socket_client_connect_async()
+ *
+ * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_client_connect_to_host:
+ * @client: a #GSocketClient
+ * @host_and_port: the name and optionally port of the host to connect to
+ * @default_port: the default port to connect to
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @error: a pointer to a #GError, or %NULL
+ *
+ * This is a helper function for g_socket_client_connect().
+ *
+ * Attempts to create a TCP connection to the named host.
+ *
+ * @host_and_port may be in any of a number of recognized formats; an IPv6
+ * address, an IPv4 address, or a domain name (in which case a DNS
+ * lookup is performed).  Quoting with [] is supported for all address
+ * types.  A port override may be specified in the usual way with a
+ * colon.  Ports may be given as decimal numbers or symbolic names (in
+ * which case an /etc/services lookup is performed).
+ *
+ * If no port override is given in @host_and_port then @default_port will be
+ * used as the port number to connect to.
+ *
+ * In general, @host_and_port is expected to be provided by the user (allowing
+ * them to give the hostname, and a port override if necessary) and
+ * @default_port is expected to be provided by the application.
+ *
+ * In the case that an IP address is given, a single connection
+ * attempt is made.  In the case that a name is given, multiple
+ * connection attempts may be made, in turn and according to the
+ * number of address records in DNS, until a connection succeeds.
+ *
+ * Upon a successful connection, a new #GSocketConnection is constructed
+ * and returned.  The caller owns this new object and must drop their
+ * reference to it when finished with it.
+ *
+ * In the event of any failure (DNS error, service not found, no hosts
+ * connectable) %NULL is returned and @error (if non-%NULL) is set
+ * accordingly.
+ *
+ * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_client_connect_to_host_async:
+ * @client: a #GSocketClient
+ * @host_and_port: the name and optionally the port of the host to connect to
+ * @default_port: the default port to connect to
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @callback: (scope async): a #GAsyncReadyCallback
+ * @user_data: (closure): user data for the callback
+ *
+ * This is the asynchronous version of g_socket_client_connect_to_host().
+ *
+ * When the operation is finished @callback will be
+ * called. You can then call g_socket_client_connect_to_host_finish() to get
+ * the result of the operation.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_client_connect_to_host_finish:
+ * @client: a #GSocketClient.
+ * @result: a #GAsyncResult.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Finishes an async connect operation. See g_socket_client_connect_to_host_async()
+ *
+ * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_client_connect_to_service:
+ * @client: a #GSocketConnection
+ * @domain: a domain name
+ * @service: the name of the service to connect to
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @error: a pointer to a #GError, or %NULL
+ *
+ * Attempts to create a TCP connection to a service.
+ *
+ * This call looks up the SRV record for @service at @domain for the
+ * "tcp" protocol.  It then attempts to connect, in turn, to each of
+ * the hosts providing the service until either a connection succeeds
+ * or there are no hosts remaining.
+ *
+ * Upon a successful connection, a new #GSocketConnection is constructed
+ * and returned.  The caller owns this new object and must drop their
+ * reference to it when finished with it.
+ *
+ * In the event of any failure (DNS error, service not found, no hosts
+ * connectable) %NULL is returned and @error (if non-%NULL) is set
+ * accordingly.
+ *
+ * Returns: (transfer full): a #GSocketConnection if successful, or %NULL on error
+ */
+
+
+/**
+ * g_socket_client_connect_to_service_async:
+ * @client: a #GSocketClient
+ * @domain: a domain name
+ * @service: the name of the service to connect to
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @callback: (scope async): a #GAsyncReadyCallback
+ * @user_data: (closure): user data for the callback
+ *
+ * This is the asynchronous version of
+ * g_socket_client_connect_to_service().
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_client_connect_to_service_finish:
+ * @client: a #GSocketClient.
+ * @result: a #GAsyncResult.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Finishes an async connect operation. See g_socket_client_connect_to_service_async()
+ *
+ * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_client_connect_to_uri:
+ * @client: a #GSocketClient
+ * @uri: A network URI
+ * @default_port: the default port to connect to
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @error: a pointer to a #GError, or %NULL
+ *
+ * This is a helper function for g_socket_client_connect().
+ *
+ * Attempts to create a TCP connection with a network URI.
+ *
+ * @uri may be any valid URI containing an "authority" (hostname/port)
+ * component. If a port is not specified in the URI, @default_port
+ * will be used. TLS will be negotiated if #GSocketClient:tls is %TRUE.
+ * (#GSocketClient does not know to automatically assume TLS for
+ * certain URI schemes.)
+ *
+ * Using this rather than g_socket_client_connect() or
+ * g_socket_client_connect_to_host() allows #GSocketClient to
+ * determine when to use application-specific proxy protocols.
+ *
+ * Upon a successful connection, a new #GSocketConnection is constructed
+ * and returned.  The caller owns this new object and must drop their
+ * reference to it when finished with it.
+ *
+ * In the event of any failure (DNS error, service not found, no hosts
+ * connectable) %NULL is returned and @error (if non-%NULL) is set
+ * accordingly.
+ *
+ * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_socket_client_connect_to_uri_async:
+ * @client: a #GSocketClient
+ * @uri: a network uri
+ * @default_port: the default port to connect to
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @callback: (scope async): a #GAsyncReadyCallback
+ * @user_data: (closure): user data for the callback
+ *
+ * This is the asynchronous version of g_socket_client_connect_to_uri().
+ *
+ * When the operation is finished @callback will be
+ * called. You can then call g_socket_client_connect_to_uri_finish() to get
+ * the result of the operation.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_socket_client_connect_to_uri_finish:
+ * @client: a #GSocketClient.
+ * @result: a #GAsyncResult.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Finishes an async connect operation. See g_socket_client_connect_to_uri_async()
+ *
+ * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_socket_client_get_enable_proxy:
+ * @client: a #GSocketClient.
+ *
+ * Gets the proxy enable state; see g_socket_client_set_enable_proxy()
+ *
+ * Returns: whether proxying is enabled
+ * Since: 2.26
+ */
+
+
+/**
+ * g_socket_client_get_family:
+ * @client: a #GSocketClient.
+ *
+ * Gets the socket family of the socket client.
+ *
+ * See g_socket_client_set_family() for details.
+ *
+ * Returns: a #GSocketFamily
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_client_get_local_address:
+ * @client: a #GSocketClient.
+ *
+ * Gets the local address of the socket client.
+ *
+ * See g_socket_client_set_local_address() for details.
+ *
+ * Returns: (transfer none): a #GSocketAddress or %NULL. Do not free.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_client_get_protocol:
+ * @client: a #GSocketClient
+ *
+ * Gets the protocol name type of the socket client.
+ *
+ * See g_socket_client_set_protocol() for details.
+ *
+ * Returns: a #GSocketProtocol
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_client_get_socket_type:
+ * @client: a #GSocketClient.
+ *
+ * Gets the socket type of the socket client.
+ *
+ * See g_socket_client_set_socket_type() for details.
+ *
+ * Returns: a #GSocketFamily
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_client_get_timeout:
+ * @client: a #GSocketClient
+ *
+ * Gets the I/O timeout time for sockets created by @client.
+ *
+ * See g_socket_client_set_timeout() for details.
+ *
+ * Returns: the timeout in seconds
+ * Since: 2.26
+ */
+
+
+/**
+ * g_socket_client_get_tls:
+ * @client: a #GSocketClient.
+ *
+ * Gets whether @client creates TLS connections. See
+ * g_socket_client_set_tls() for details.
+ *
+ * Returns: whether @client uses TLS
+ * Since: 2.28
+ */
+
+
+/**
+ * g_socket_client_get_tls_validation_flags:
+ * @client: a #GSocketClient.
+ *
+ * Gets the TLS validation flags used creating TLS connections via
+ * @client.
+ *
+ * Returns: the TLS validation flags
+ * Since: 2.28
+ */
+
+
+/**
+ * g_socket_client_new:
+ *
+ * Creates a new #GSocketClient with the default options.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: a #GSocketClient.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_client_set_enable_proxy:
+ * @client: a #GSocketClient.
+ * @enable: whether to enable proxies
+ *
+ * Sets whether or not @client attempts to make connections via a
+ * proxy server. When enabled (the default), #GSocketClient will use a
+ * #GProxyResolver to determine if a proxy protocol such as SOCKS is
+ * needed, and automatically do the necessary proxy negotiation.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_socket_client_set_family:
+ * @client: a #GSocketClient.
+ * @family: a #GSocketFamily
+ *
+ * Sets the socket family of the socket client.
+ * If this is set to something other than %G_SOCKET_FAMILY_INVALID
+ * then the sockets created by this object will be of the specified
+ * family.
+ *
+ * This might be useful for instance if you want to force the local
+ * connection to be an ipv4 socket, even though the address might
+ * be an ipv6 mapped to ipv4 address.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_client_set_local_address:
+ * @client: a #GSocketClient.
+ * @address: (allow-none): a #GSocketAddress, or %NULL
+ *
+ * Sets the local address of the socket client.
+ * The sockets created by this object will bound to the
+ * specified address (if not %NULL) before connecting.
+ *
+ * This is useful if you want to ensure that the local
+ * side of the connection is on a specific port, or on
+ * a specific interface.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_client_set_protocol:
+ * @client: a #GSocketClient.
+ * @protocol: a #GSocketProtocol
+ *
+ * Sets the protocol of the socket client.
+ * The sockets created by this object will use of the specified
+ * protocol.
+ *
+ * If @protocol is %0 that means to use the default
+ * protocol for the socket family and type.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_client_set_socket_type:
+ * @client: a #GSocketClient.
+ * @type: a #GSocketType
+ *
+ * Sets the socket type of the socket client.
+ * The sockets created by this object will be of the specified
+ * type.
+ *
+ * It doesn't make sense to specify a type of %G_SOCKET_TYPE_DATAGRAM,
+ * as GSocketClient is used for connection oriented services.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_client_set_timeout:
+ * @client: a #GSocketClient.
+ * @timeout: the timeout
+ *
+ * Sets the I/O timeout for sockets created by @client. @timeout is a
+ * time in seconds, or 0 for no timeout (the default).
+ *
+ * The timeout value affects the initial connection attempt as well,
+ * so setting this may cause calls to g_socket_client_connect(), etc,
+ * to fail with %G_IO_ERROR_TIMED_OUT.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_socket_client_set_tls:
+ * @client: a #GSocketClient.
+ * @tls: whether to use TLS
+ *
+ * Sets whether @client creates TLS (aka SSL) connections. If @tls is
+ * %TRUE, @client will wrap its connections in a #GTlsClientConnection
+ * and perform a TLS handshake when connecting.
+ *
+ * Note that since #GSocketClient must return a #GSocketConnection,
+ * but #GTlsClientConnection is not a #GSocketConnection, this
+ * actually wraps the resulting #GTlsClientConnection in a
+ * #GTcpWrapperConnection when returning it. You can use
+ * g_tcp_wrapper_connection_get_base_io_stream() on the return value
+ * to extract the #GTlsClientConnection.
+ *
+ * If you need to modify the behavior of the TLS handshake (eg, by
+ * setting a client-side certificate to use, or connecting to the
+ * #GTlsConnection::accept-certificate signal), you can connect to
+ * @client's #GSocketClient::event signal and wait for it to be
+ * emitted with %G_SOCKET_CLIENT_TLS_HANDSHAKING, which will give you
+ * a chance to see the #GTlsClientConnection before the handshake
+ * starts.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_socket_client_set_tls_validation_flags:
+ * @client: a #GSocketClient.
+ * @flags: the validation flags
+ *
+ * Sets the TLS validation flags used when creating TLS connections
+ * via @client. The default value is %G_TLS_CERTIFICATE_VALIDATE_ALL.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_socket_close:
+ * @socket: a #GSocket
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Closes the socket, shutting down any active connection.
+ *
+ * Closing a socket does not wait for all outstanding I/O operations
+ * to finish, so the caller should not rely on them to be guaranteed
+ * to complete even if the close returns with no error.
+ *
+ * Once the socket is closed, all other operations will return
+ * %G_IO_ERROR_CLOSED. Closing a socket multiple times will not
+ * return an error.
+ *
+ * Sockets 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.
+ *
+ * Beware that due to the way that TCP works, it is possible for
+ * recently-sent data to be lost if either you close a socket while the
+ * %G_IO_IN condition is set, or else if the remote connection tries to
+ * send something to you after you close the socket but before it has
+ * finished reading all of the data you sent. There is no easy generic
+ * way to avoid this problem; the easiest fix is to design the network
+ * protocol such that the client will never send data "out of turn".
+ * Another solution is for the server to half-close the connection by
+ * calling g_socket_shutdown() with only the @shutdown_write flag set,
+ * and then wait for the client to notice this and close its side of the
+ * connection, after which the server can safely call g_socket_close().
+ * (This is what #GTcpConnection does if you call
+ * g_tcp_connection_set_graceful_disconnect(). But of course, this
+ * only works if the client will close its connection after the server
+ * does.)
+ *
+ * Returns: %TRUE on success, %FALSE on error
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_condition_check:
+ * @socket: a #GSocket
+ * @condition: a #GIOCondition mask to check
+ *
+ * Checks on the readiness of @socket to perform operations.
+ * The operations specified in @condition are checked for and masked
+ * against the currently-satisfied conditions on @socket. The result
+ * is returned.
+ *
+ * Note that on Windows, it is possible for an operation to return
+ * %G_IO_ERROR_WOULD_BLOCK even immediately after
+ * g_socket_condition_check() has claimed that the socket is ready for
+ * writing. Rather than calling g_socket_condition_check() and then
+ * writing to the socket if it succeeds, it is generally better to
+ * simply try writing to the socket right away, and try again later if
+ * the initial attempt returns %G_IO_ERROR_WOULD_BLOCK.
+ *
+ * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in condition;
+ * these conditions will always be set in the output if they are true.
+ *
+ * This call never blocks.
+ *
+ * Returns: the @GIOCondition mask of the current state
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_condition_timed_wait:
+ * @socket: a #GSocket
+ * @condition: a #GIOCondition mask to wait for
+ * @timeout: the maximum time (in microseconds) to wait, or -1
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @error: a #GError pointer, or %NULL
+ *
+ * Waits for up to @timeout microseconds for @condition to become true
+ * on @socket. If the condition is met, %TRUE is returned.
+ *
+ * If @cancellable is cancelled before the condition is met, or if
+ * @timeout (or the socket's #GSocket:timeout) is reached before the
+ * condition is met, then %FALSE is returned and @error, if non-%NULL,
+ * is set to the appropriate value (%G_IO_ERROR_CANCELLED or
+ * %G_IO_ERROR_TIMED_OUT).
+ *
+ * If you don't want a timeout, use g_socket_condition_wait().
+ * (Alternatively, you can pass -1 for @timeout.)
+ *
+ * Note that although @timeout is in microseconds for consistency with
+ * other GLib APIs, this function actually only has millisecond
+ * resolution, and the behavior is undefined if @timeout is not an
+ * exact number of milliseconds.
+ *
+ * Returns: %TRUE if the condition was met, %FALSE otherwise
+ * Since: 2.32
+ */
+
+
+/**
+ * g_socket_condition_wait:
+ * @socket: a #GSocket
+ * @condition: a #GIOCondition mask to wait for
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @error: a #GError pointer, or %NULL
+ *
+ * Waits for @condition to become true on @socket. When the condition
+ * is met, %TRUE is returned.
+ *
+ * If @cancellable is cancelled before the condition is met, or if the
+ * socket has a timeout set and it is reached before the condition is
+ * met, then %FALSE is returned and @error, if non-%NULL, is set to
+ * the appropriate value (%G_IO_ERROR_CANCELLED or
+ * %G_IO_ERROR_TIMED_OUT).
+ *
+ * See also g_socket_condition_timed_wait().
+ *
+ * Returns: %TRUE if the condition was met, %FALSE otherwise
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_connect:
+ * @socket: a #GSocket.
+ * @address: a #GSocketAddress specifying the remote address.
+ * @cancellable: (allow-none): a %GCancellable or %NULL
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Connect the socket to the specified remote address.
+ *
+ * For connection oriented socket this generally means we attempt to make
+ * a connection to the @address. For a connection-less socket it sets
+ * the default address for g_socket_send() and discards all incoming datagrams
+ * from other sources.
+ *
+ * Generally connection oriented sockets can only connect once, but
+ * connection-less sockets can connect multiple times to change the
+ * default address.
+ *
+ * If the connect call needs to do network I/O it will block, unless
+ * non-blocking I/O is enabled. Then %G_IO_ERROR_PENDING is returned
+ * and the user can be notified of the connection finishing by waiting
+ * for the G_IO_OUT condition. The result of the connection must then be
+ * checked with g_socket_check_connect_result().
+ *
+ * Returns: %TRUE if connected, %FALSE on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_connectable_enumerate:
+ * @connectable: a #GSocketConnectable
+ *
+ * Creates a #GSocketAddressEnumerator for @connectable.
+ *
+ * Returns: (transfer full): a new #GSocketAddressEnumerator.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_connectable_proxy_enumerate:
+ * @connectable: a #GSocketConnectable
+ *
+ * Creates a #GSocketAddressEnumerator for @connectable that will
+ * return #GProxyAddress<!-- -->es for addresses that you must connect
+ * to via a proxy.
+ *
+ * If @connectable does not implement
+ * g_socket_connectable_proxy_enumerate(), this will fall back to
+ * calling g_socket_connectable_enumerate().
+ *
+ * Returns: (transfer full): a new #GSocketAddressEnumerator.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_socket_connection_connect:
+ * @connection: a #GSocketConnection
+ * @address: a #GSocketAddress specifying the remote address.
+ * @cancellable: (allow-none): a %GCancellable or %NULL
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Connect @connection to the specified remote address.
+ *
+ * Returns: %TRUE if the connection succeeded, %FALSE on error
+ * Since: 2.32
+ */
+
+
+/**
+ * g_socket_connection_connect_async:
+ * @connection: a #GSocketConnection
+ * @address: a #GSocketAddress specifying the remote address.
+ * @cancellable: (allow-none): a %GCancellable or %NULL
+ * @callback: (scope async): a #GAsyncReadyCallback
+ * @user_data: (closure): user data for the callback
+ *
+ * Asynchronously connect @connection to the specified remote address.
+ *
+ * This clears the #GSocket:blocking flag on @connection's underlying
+ * socket if it is currently set.
+ *
+ * Use g_socket_connection_connect_finish() to retrieve the result.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_socket_connection_connect_finish:
+ * @connection: a #GSocketConnection
+ * @result: the #GAsyncResult
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Gets the result of a g_socket_connection_connect_async() call.
+ *
+ * Returns: %TRUE if the connection succeeded, %FALSE on error
+ * Since: 2.32
+ */
+
+
+/**
+ * g_socket_connection_factory_create_connection:
+ * @socket: a #GSocket
+ *
+ * Creates a #GSocketConnection subclass of the right type for
+ * @socket.
+ *
+ * Returns: (transfer full): a #GSocketConnection
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_connection_factory_lookup_type:
+ * @family: a #GSocketFamily
+ * @type: a #GSocketType
+ * @protocol_id: a protocol id
+ *
+ * Looks up the #GType to be used when creating socket connections on
+ * sockets with the specified @family, @type and @protocol_id.
+ *
+ * If no type is registered, the #GSocketConnection base type is returned.
+ *
+ * Returns: a #GType
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_connection_factory_register_type:
+ * @g_type: a #GType, inheriting from %G_TYPE_SOCKET_CONNECTION
+ * @family: a #GSocketFamily
+ * @type: a #GSocketType
+ * @protocol: a protocol id
+ *
+ * Looks up the #GType to be used when creating socket connections on
+ * sockets with the specified @family, @type and @protocol.
+ *
+ * If no type is registered, the #GSocketConnection base type is returned.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_connection_get_local_address:
+ * @connection: a #GSocketConnection
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Try to get the local address of a socket connection.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GSocketAddress or %NULL on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_connection_get_remote_address:
+ * @connection: a #GSocketConnection
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Try to get the remote address of a socket connection.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GSocketAddress or %NULL on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_connection_get_socket:
+ * @connection: a #GSocketConnection
+ *
+ * Gets the underlying #GSocket object of the connection.
+ * This can be useful if you want to do something unusual on it
+ * not supported by the #GSocketConnection APIs.
+ *
+ * Returns: (transfer none): a #GSocketAddress or %NULL on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_connection_is_connected:
+ * @connection: a #GSocketConnection
+ *
+ * Checks if @connection is connected. This is equivalent to calling
+ * g_socket_is_connected() on @connection's underlying #GSocket.
+ *
+ * Returns: whether @connection is connected
+ * Since: 2.32
+ */
+
+
+/**
+ * g_socket_control_message_deserialize:
+ * @level: a socket level
+ * @type: a socket control message type for the given @level
+ * @size: the size of the data in bytes
+ * @data: (array length=size) (element-type guint8): pointer to the message data
+ *
+ * Tries to deserialize a socket control message of a given
+ * @level and @type. This will ask all known (to GType) subclasses
+ * of #GSocketControlMessage if they can understand this kind
+ * of message and if so deserialize it into a #GSocketControlMessage.
+ *
+ * If there is no implementation for this kind of control message, %NULL
+ * will be returned.
+ *
+ * Returns: (transfer full): the deserialized message or %NULL
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_control_message_get_level:
+ * @message: a #GSocketControlMessage
+ *
+ * Returns the "level" (i.e. the originating protocol) of the control message.
+ * This is often SOL_SOCKET.
+ *
+ * Returns: an integer describing the level
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_control_message_get_msg_type:
+ * @message: a #GSocketControlMessage
+ *
+ * Returns the protocol specific type of the control message.
+ * For instance, for UNIX fd passing this would be SCM_RIGHTS.
+ *
+ * Returns: an integer describing the type of control message
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_control_message_get_size:
+ * @message: a #GSocketControlMessage
+ *
+ * Returns the space required for the control message, not including
+ * headers or alignment.
+ *
+ * Returns: The number of bytes required.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_control_message_serialize:
+ * @message: a #GSocketControlMessage
+ * @data: A buffer to write data to
+ *
+ * Converts the data in the message to bytes placed in the
+ * message.
+ *
+ * @data is guaranteed to have enough space to fit the size
+ * returned by g_socket_control_message_get_size() on this
+ * object.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_create_source: (skip)
+ * @socket: a #GSocket
+ * @condition: a #GIOCondition mask to monitor
+ * @cancellable: (allow-none): a %GCancellable or %NULL
+ *
+ * Creates a %GSource that can be attached to a %GMainContext to monitor
+ * for the availibility of the specified @condition on the socket.
+ *
+ * The callback on the source is of the #GSocketSourceFunc type.
+ *
+ * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in @condition;
+ * these conditions will always be reported output if they are true.
+ *
+ * @cancellable if not %NULL can be used to cancel the source, which will
+ * cause the source to trigger, reporting the current condition (which
+ * is likely 0 unless cancellation happened at the same time as a
+ * condition change). You can check for this in the callback using
+ * g_cancellable_is_cancelled().
+ *
+ * If @socket has a timeout set, and it is reached before @condition
+ * occurs, the source will then trigger anyway, reporting %G_IO_IN or
+ * %G_IO_OUT depending on @condition. However, @socket will have been
+ * marked as having had a timeout, and so the next #GSocket I/O method
+ * you call will then fail with a %G_IO_ERROR_TIMED_OUT.
+ *
+ * Returns: (transfer full): a newly allocated %GSource, free with g_source_unref().
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_get_available_bytes:
+ * @socket: a #GSocket
+ *
+ * Get the amount of data pending in the OS input buffer.
+ *
+ * without blocking or -1 on error.
+ *
+ * Returns: the number of bytes that can be read from the socket
+ * Since: 2.32
+ */
+
+
+/**
+ * g_socket_get_blocking:
+ * @socket: a #GSocket.
+ *
+ * Gets the blocking mode of the socket. For details on blocking I/O,
+ * see g_socket_set_blocking().
+ *
+ * Returns: %TRUE if blocking I/O is used, %FALSE otherwise.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_get_broadcast:
+ * @socket: a #GSocket.
+ *
+ * Gets the broadcast setting on @socket; if %TRUE,
+ * it is possible to send packets to broadcast
+ * addresses or receive from broadcast addresses.
+ *
+ * Returns: the broadcast setting on @socket
+ * Since: 2.32
+ */
+
+
+/**
+ * g_socket_get_credentials:
+ * @socket: a #GSocket.
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Returns the credentials of the foreign process connected to this
+ * socket, if any (e.g. it is only supported for %G_SOCKET_FAMILY_UNIX
+ * sockets).
+ *
+ * If this operation isn't supported on the OS, the method fails with
+ * the %G_IO_ERROR_NOT_SUPPORTED error. On Linux this is implemented
+ * by reading the %SO_PEERCRED option on the underlying socket.
+ *
+ * Other ways to obtain credentials from a foreign peer includes the
+ * #GUnixCredentialsMessage type and
+ * g_unix_connection_send_credentials() /
+ * g_unix_connection_receive_credentials() functions.
+ *
+ * that must be freed with g_object_unref().
+ *
+ * Returns: (transfer full): %NULL if @error is set, otherwise a #GCredentials object
+ * Since: 2.26
+ */
+
+
+/**
+ * g_socket_get_family:
+ * @socket: a #GSocket.
+ *
+ * Gets the socket family of the socket.
+ *
+ * Returns: a #GSocketFamily
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_get_fd:
+ * @socket: a #GSocket.
+ *
+ * Returns the underlying OS socket object. On unix this
+ * is a socket file descriptor, and on windows this is
+ * a Winsock2 SOCKET handle. This may be useful for
+ * doing platform specific or otherwise unusual operations
+ * on the socket.
+ *
+ * Returns: the file descriptor of the socket.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_get_keepalive:
+ * @socket: a #GSocket.
+ *
+ * Gets the keepalive mode of the socket. For details on this,
+ * see g_socket_set_keepalive().
+ *
+ * Returns: %TRUE if keepalive is active, %FALSE otherwise.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_get_listen_backlog:
+ * @socket: a #GSocket.
+ *
+ * Gets the listen backlog setting of the socket. For details on this,
+ * see g_socket_set_listen_backlog().
+ *
+ * Returns: the maximum number of pending connections.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_get_local_address:
+ * @socket: a #GSocket.
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Try to get the local address of a bound socket. This is only
+ * useful if the socket has been bound to a local address,
+ * either explicitly or implicitly when connecting.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GSocketAddress or %NULL on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_get_multicast_loopback:
+ * @socket: a #GSocket.
+ *
+ * Gets the multicast loopback setting on @socket; if %TRUE (the
+ * default), outgoing multicast packets will be looped back to
+ * multicast listeners on the same host.
+ *
+ * Returns: the multicast loopback setting on @socket
+ * Since: 2.32
+ */
+
+
+/**
+ * g_socket_get_multicast_ttl:
+ * @socket: a #GSocket.
+ *
+ * Gets the multicast time-to-live setting on @socket; see
+ * g_socket_set_multicast_ttl() for more details.
+ *
+ * Returns: the multicast time-to-live setting on @socket
+ * Since: 2.32
+ */
+
+
+/**
+ * g_socket_get_protocol:
+ * @socket: a #GSocket.
+ *
+ * Gets the socket protocol id the socket was created with.
+ * In case the protocol is unknown, -1 is returned.
+ *
+ * Returns: a protocol id, or -1 if unknown
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_get_remote_address:
+ * @socket: a #GSocket.
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Try to get the remove address of a connected socket. This is only
+ * useful for connection oriented sockets that have been connected.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GSocketAddress or %NULL on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_get_socket_type:
+ * @socket: a #GSocket.
+ *
+ * Gets the socket type of the socket.
+ *
+ * Returns: a #GSocketType
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_get_timeout:
+ * @socket: a #GSocket.
+ *
+ * Gets the timeout setting of the socket. For details on this, see
+ * g_socket_set_timeout().
+ *
+ * Returns: the timeout in seconds
+ * Since: 2.26
+ */
+
+
+/**
+ * g_socket_get_ttl:
+ * @socket: a #GSocket.
+ *
+ * Gets the unicast time-to-live setting on @socket; see
+ * g_socket_set_ttl() for more details.
+ *
+ * Returns: the time-to-live setting on @socket
+ * Since: 2.32
+ */
+
+
+/**
+ * g_socket_is_closed:
+ * @socket: a #GSocket
+ *
+ * Checks whether a socket is closed.
+ *
+ * Returns: %TRUE if socket is closed, %FALSE otherwise
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_is_connected:
+ * @socket: a #GSocket.
+ *
+ * Check whether the socket is connected. This is only useful for
+ * connection-oriented sockets.
+ *
+ * Returns: %TRUE if socket is connected, %FALSE otherwise.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_join_multicast_group:
+ * @socket: a #GSocket.
+ * @group: a #GInetAddress specifying the group address to join.
+ * @iface: (allow-none): Name of the interface to use, or %NULL
+ * @source_specific: %TRUE if source-specific multicast should be used
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Registers @socket to receive multicast messages sent to @group.
+ * @socket must be a %G_SOCKET_TYPE_DATAGRAM socket, and must have
+ * been bound to an appropriate interface and port with
+ * g_socket_bind().
+ *
+ * If @iface is %NULL, the system will automatically pick an interface
+ * to bind to based on @group.
+ *
+ * If @source_specific is %TRUE, source-specific multicast as defined
+ * in RFC 4604 is used. Note that on older platforms this may fail
+ * with a %G_IO_ERROR_NOT_SUPPORTED error.
+ *
+ * Returns: %TRUE on success, %FALSE on error.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_socket_leave_multicast_group:
+ * @socket: a #GSocket.
+ * @group: a #GInetAddress specifying the group address to leave.
+ * @iface: (allow-none): Interface used
+ * @source_specific: %TRUE if source-specific multicast was used
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Removes @socket from the multicast group defined by @group, @iface,
+ * and @source_specific (which must all have the same values they had
+ * when you joined the group).
+ *
+ * @socket remains bound to its address and port, and can still receive
+ * unicast messages after calling this.
+ *
+ * Returns: %TRUE on success, %FALSE on error.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_socket_listen:
+ * @socket: a #GSocket.
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Marks the socket as a server socket, i.e. a socket that is used
+ * to accept incoming requests using g_socket_accept().
+ *
+ * Before calling this the socket must be bound to a local address using
+ * g_socket_bind().
+ *
+ * To set the maximum amount of outstanding clients, use
+ * g_socket_set_listen_backlog().
+ *
+ * Returns: %TRUE on success, %FALSE on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_listener_accept:
+ * @listener: a #GSocketListener
+ * @source_object: (out) (transfer none) (allow-none): location where #GObject pointer will be stored, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Blocks waiting for a client to connect to any of the sockets added
+ * to the listener. Returns a #GSocketConnection for the socket that was
+ * accepted.
+ *
+ * If @source_object is not %NULL it will be filled out with the source
+ * object specified when the corresponding socket or address was added
+ * to the listener.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_listener_accept_async:
+ * @listener: a #GSocketListener
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @callback: (scope async): a #GAsyncReadyCallback
+ * @user_data: (closure): user data for the callback
+ *
+ * This is the asynchronous version of g_socket_listener_accept().
+ *
+ * When the operation is finished @callback will be
+ * called. You can then call g_socket_listener_accept_socket()
+ * to get the result of the operation.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_listener_accept_finish:
+ * @listener: a #GSocketListener
+ * @result: a #GAsyncResult.
+ * @source_object: (out) (transfer none) (allow-none): Optional #GObject identifying this source
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Finishes an async accept operation. See g_socket_listener_accept_async()
+ *
+ * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_listener_accept_socket:
+ * @listener: a #GSocketListener
+ * @source_object: (out) (transfer none) (allow-none): location where #GObject pointer will be stored, or %NULL.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Blocks waiting for a client to connect to any of the sockets added
+ * to the listener. Returns the #GSocket that was accepted.
+ *
+ * If you want to accept the high-level #GSocketConnection, not a #GSocket,
+ * which is often the case, then you should use g_socket_listener_accept()
+ * instead.
+ *
+ * If @source_object is not %NULL it will be filled out with the source
+ * object specified when the corresponding socket or address was added
+ * to the listener.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by
+ * triggering the cancellable object from another thread. If the operation
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
+ *
+ * Returns: (transfer full): a #GSocket on success, %NULL on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_listener_accept_socket_async:
+ * @listener: a #GSocketListener
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @callback: (scope async): a #GAsyncReadyCallback
+ * @user_data: (closure): user data for the callback
+ *
+ * This is the asynchronous version of g_socket_listener_accept_socket().
+ *
+ * When the operation is finished @callback will be
+ * called. You can then call g_socket_listener_accept_socket_finish()
+ * to get the result of the operation.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_listener_accept_socket_finish:
+ * @listener: a #GSocketListener
+ * @result: a #GAsyncResult.
+ * @source_object: (out) (transfer none) (allow-none): Optional #GObject identifying this source
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Finishes an async accept operation. See g_socket_listener_accept_socket_async()
+ *
+ * Returns: (transfer full): a #GSocket on success, %NULL on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_listener_add_address:
+ * @listener: a #GSocketListener
+ * @address: a #GSocketAddress
+ * @type: a #GSocketType
+ * @protocol: a #GSocketProtocol
+ * @source_object: (allow-none): Optional #GObject identifying this source
+ * @effective_address: (out) (allow-none): location to store the address that was bound to, or %NULL.
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Creates a socket of type @type and protocol @protocol, binds
+ * it to @address and adds it to the set of sockets we're accepting
+ * sockets from.
+ *
+ * Note that adding an IPv6 address, depending on the platform,
+ * may or may not result in a listener that also accepts IPv4
+ * connections.  For more deterministic behavior, see
+ * g_socket_listener_add_inet_port().
+ *
+ * @source_object will be passed out in the various calls
+ * to accept to identify this particular source, which is
+ * useful if you're listening on multiple addresses and do
+ * different things depending on what address is connected to.
+ *
+ * If successful and @effective_address is non-%NULL then it will
+ * be set to the address that the binding actually occurred at.  This
+ * is helpful for determining the port number that was used for when
+ * requesting a binding to port 0 (ie: "any port").  This address, if
+ * requested, belongs to the caller and must be freed.
+ *
+ * Returns: %TRUE on success, %FALSE on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_listener_add_any_inet_port:
+ * @listener: a #GSocketListener
+ * @source_object: (allow-none): Optional #GObject identifying this source
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Listens for TCP connections on any available port number for both
+ * IPv6 and IPv4 (if each is available).
+ *
+ * This is useful if you need to have a socket for incoming connections
+ * but don't care about the specific port number.
+ *
+ * @source_object will be passed out in the various calls
+ * to accept to identify this particular source, which is
+ * useful if you're listening on multiple addresses and do
+ * different things depending on what address is connected to.
+ *
+ * Returns: the port number, or 0 in case of failure.
+ * Since: 2.24
+ */
+
+
+/**
+ * g_socket_listener_add_inet_port:
+ * @listener: a #GSocketListener
+ * @port: an IP port number (non-zero)
+ * @source_object: (allow-none): Optional #GObject identifying this source
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Helper function for g_socket_listener_add_address() that
+ * creates a TCP/IP socket listening on IPv4 and IPv6 (if
+ * supported) on the specified port on all interfaces.
+ *
+ * @source_object will be passed out in the various calls
+ * to accept to identify this particular source, which is
+ * useful if you're listening on multiple addresses and do
+ * different things depending on what address is connected to.
+ *
+ * Returns: %TRUE on success, %FALSE on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_listener_add_socket:
+ * @listener: a #GSocketListener
+ * @socket: a listening #GSocket
+ * @source_object: (allow-none): Optional #GObject identifying this source
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Adds @socket to the set of sockets that we try to accept
+ * new clients from. The socket must be bound to a local
+ * address and listened to.
+ *
+ * @source_object will be passed out in the various calls
+ * to accept to identify this particular source, which is
+ * useful if you're listening on multiple addresses and do
+ * different things depending on what address is connected to.
+ *
+ * Returns: %TRUE on success, %FALSE on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_listener_close:
+ * @listener: a #GSocketListener
+ *
+ * Closes all the sockets in the listener.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_listener_new:
+ *
+ * Creates a new #GSocketListener with no sockets to listen for.
+ * New listeners can be added with e.g. g_socket_listener_add_address()
+ * or g_socket_listener_add_inet_port().
+ *
+ * Returns: a new #GSocketListener.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_listener_set_backlog:
+ * @listener: a #GSocketListener
+ * @listen_backlog: an integer
+ *
+ * Sets the listen backlog on the sockets in the listener.
+ *
+ * See g_socket_set_listen_backlog() for details
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_new:
+ * @family: the socket family to use, e.g. %G_SOCKET_FAMILY_IPV4.
+ * @type: the socket type to use.
+ * @protocol: the id of the protocol to use, or 0 for default.
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Creates a new #GSocket with the defined family, type and protocol.
+ * If @protocol is 0 (%G_SOCKET_PROTOCOL_DEFAULT) the default protocol type
+ * for the family and type is used.
+ *
+ * The @protocol is a family and type specific int that specifies what
+ * kind of protocol to use. #GSocketProtocol lists several common ones.
+ * Many families only support one protocol, and use 0 for this, others
+ * support several and using 0 means to use the default protocol for
+ * the family and type.
+ *
+ * The protocol id is passed directly to the operating
+ * system, so you can use protocols not listed in #GSocketProtocol if you
+ * know the protocol number used for it.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: a #GSocket or %NULL on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_new_from_fd:
+ * @fd: a native socket file descriptor.
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Creates a new #GSocket from a native file descriptor
+ * or winsock SOCKET handle.
+ *
+ * This reads all the settings from the file descriptor so that
+ * all properties should work. Note that the file descriptor
+ * will be set to non-blocking mode, independent on the blocking
+ * mode of the #GSocket.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: a #GSocket or %NULL on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_receive:
+ * @socket: a #GSocket
+ * @buffer: a buffer to read data into (which should be at least @size bytes long).
+ * @size: the number of bytes you want to read from the socket
+ * @cancellable: (allow-none): a %GCancellable or %NULL
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Receive data (up to @size bytes) from a socket. This is mainly used by
+ * connection-oriented sockets; it is identical to g_socket_receive_from()
+ * with @address set to %NULL.
+ *
+ * For %G_SOCKET_TYPE_DATAGRAM and %G_SOCKET_TYPE_SEQPACKET sockets,
+ * g_socket_receive() will always read either 0 or 1 complete messages from
+ * the socket. If the received message is too large to fit in @buffer, then
+ * the data beyond @size bytes will be discarded, without any explicit
+ * indication that this has occurred.
+ *
+ * For %G_SOCKET_TYPE_STREAM sockets, g_socket_receive() can return any
+ * number of bytes, up to @size. If more than @size bytes have been
+ * received, the additional data will be returned in future calls to
+ * g_socket_receive().
+ *
+ * If the socket is in blocking mode the call will block until there
+ * is some data to receive, the connection is closed, or there is an
+ * error. If there is no data available and the socket is in
+ * non-blocking mode, a %G_IO_ERROR_WOULD_BLOCK error will be
+ * returned. To be notified when data is available, wait for the
+ * %G_IO_IN condition.
+ *
+ * On error -1 is returned and @error is set accordingly.
+ *
+ * the peer, or -1 on error
+ *
+ * Returns: Number of bytes read, or 0 if the connection was closed by
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_receive_from:
+ * @socket: a #GSocket
+ * @address: (out) (allow-none): a pointer to a #GSocketAddress pointer, or %NULL
+ * @buffer: (array length=size) (element-type guint8): a buffer to read data into (which should be at least @size bytes long).
+ * @size: the number of bytes you want to read from the socket
+ * @cancellable: (allow-none): a %GCancellable or %NULL
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Receive data (up to @size bytes) from a socket.
+ *
+ * If @address is non-%NULL then @address will be set equal to the
+ * source address of the received packet.
+ * @address is owned by the caller.
+ *
+ * See g_socket_receive() for additional information.
+ *
+ * the peer, or -1 on error
+ *
+ * Returns: Number of bytes read, or 0 if the connection was closed by
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_receive_message:
+ * @socket: a #GSocket
+ * @address: (out) (allow-none): a pointer to a #GSocketAddress pointer, or %NULL
+ * @vectors: (array length=num_vectors): an array of #GInputVector structs
+ * @num_vectors: the number of elements in @vectors, or -1
+ * @messages: (array length=num_messages) (allow-none): a pointer which may be filled with an array of #GSocketControlMessages, or %NULL
+ * @num_messages: a pointer which will be filled with the number of elements in @messages, or %NULL
+ * @flags: a pointer to an int containing #GSocketMsgFlags flags
+ * @cancellable: (allow-none): a %GCancellable or %NULL
+ * @error: a #GError pointer, or %NULL
+ *
+ * Receive data from a socket.  This is the most complicated and
+ * fully-featured version of this call. For easier use, see
+ * g_socket_receive() and g_socket_receive_from().
+ *
+ * If @address is non-%NULL then @address will be set equal to the
+ * source address of the received packet.
+ * @address is owned by the caller.
+ *
+ * @vector must point to an array of #GInputVector structs and
+ * @num_vectors must be the length of this array.  These structs
+ * describe the buffers that received data will be scattered into.
+ * If @num_vectors is -1, then @vectors is assumed to be terminated
+ * by a #GInputVector with a %NULL buffer pointer.
+ *
+ * As a special case, if @num_vectors is 0 (in which case, @vectors
+ * may of course be %NULL), then a single byte is received and
+ * discarded. This is to facilitate the common practice of sending a
+ * single '\0' byte for the purposes of transferring ancillary data.
+ *
+ * @messages, if non-%NULL, will be set to point to a newly-allocated
+ * array of #GSocketControlMessage instances or %NULL if no such
+ * messages was received. These correspond to the control messages
+ * received from the kernel, one #GSocketControlMessage per message
+ * from the kernel. This array is %NULL-terminated and must be freed
+ * by the caller using g_free() after calling g_object_unref() on each
+ * element. If @messages is %NULL, any control messages received will
+ * be discarded.
+ *
+ * @num_messages, if non-%NULL, will be set to the number of control
+ * messages received.
+ *
+ * If both @messages and @num_messages are non-%NULL, then
+ * @num_messages gives the number of #GSocketControlMessage instances
+ * in @messages (ie: not including the %NULL terminator).
+ *
+ * @flags is an in/out parameter. The commonly available arguments
+ * for this are available in the #GSocketMsgFlags enum, but the
+ * values there are the same as the system values, and the flags
+ * are passed in as-is, so you can pass in system-specific flags too
+ * (and g_socket_receive_message() may pass system-specific flags out).
+ *
+ * As with g_socket_receive(), data may be discarded if @socket is
+ * %G_SOCKET_TYPE_DATAGRAM or %G_SOCKET_TYPE_SEQPACKET and you do not
+ * provide enough buffer space to read a complete message. You can pass
+ * %G_SOCKET_MSG_PEEK in @flags to peek at the current message without
+ * removing it from the receive queue, but there is no portable way to find
+ * out the length of the message other than by reading it into a
+ * sufficiently-large buffer.
+ *
+ * If the socket is in blocking mode the call will block until there
+ * is some data to receive, the connection is closed, or there is an
+ * error. If there is no data available and the socket is in
+ * non-blocking mode, a %G_IO_ERROR_WOULD_BLOCK error will be
+ * returned. To be notified when data is available, wait for the
+ * %G_IO_IN condition.
+ *
+ * On error -1 is returned and @error is set accordingly.
+ *
+ * the peer, or -1 on error
+ *
+ * Returns: Number of bytes read, or 0 if the connection was closed by
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_receive_with_blocking:
+ * @socket: a #GSocket
+ * @buffer: a buffer to read data into (which should be at least @size bytes long).
+ * @size: the number of bytes you want to read from the socket
+ * @blocking: whether to do blocking or non-blocking I/O
+ * @cancellable: (allow-none): a %GCancellable or %NULL
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * This behaves exactly the same as g_socket_receive(), except that
+ * the choice of blocking or non-blocking behavior is determined by
+ * the @blocking argument rather than by @socket's properties.
+ *
+ * the peer, or -1 on error
+ *
+ * Returns: Number of bytes read, or 0 if the connection was closed by
+ * Since: 2.26
+ */
+
+
+/**
+ * g_socket_send:
+ * @socket: a #GSocket
+ * @buffer: (array length=size) (element-type guint8): the buffer containing the data to send.
+ * @size: the number of bytes to send
+ * @cancellable: (allow-none): a %GCancellable or %NULL
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Tries to send @size bytes from @buffer on the socket. This is
+ * mainly used by connection-oriented sockets; it is identical to
+ * g_socket_send_to() with @address set to %NULL.
+ *
+ * If the socket is in blocking mode the call will block until there is
+ * space for the data in the socket queue. If there is no space available
+ * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
+ * will be returned. To be notified when space is available, wait for the
+ * %G_IO_OUT condition. Note though that you may still receive
+ * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously
+ * notified of a %G_IO_OUT condition. (On Windows in particular, this is
+ * very common due to the way the underlying APIs work.)
+ *
+ * On error -1 is returned and @error is set accordingly.
+ *
+ * on error
+ *
+ * Returns: Number of bytes written (which may be less than @size), or -1
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_send_message:
+ * @socket: a #GSocket
+ * @address: (allow-none): a #GSocketAddress, or %NULL
+ * @vectors: (array length=num_vectors): an array of #GOutputVector structs
+ * @num_vectors: the number of elements in @vectors, or -1
+ * @messages: (array length=num_messages) (allow-none): a pointer to an array of #GSocketControlMessages, or %NULL.
+ * @num_messages: number of elements in @messages, or -1.
+ * @flags: an int containing #GSocketMsgFlags flags
+ * @cancellable: (allow-none): a %GCancellable or %NULL
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Send data to @address on @socket.  This is the most complicated and
+ * fully-featured version of this call. For easier use, see
+ * g_socket_send() and g_socket_send_to().
+ *
+ * If @address is %NULL then the message is sent to the default receiver
+ * (set by g_socket_connect()).
+ *
+ * @vectors must point to an array of #GOutputVector structs and
+ * @num_vectors must be the length of this array. (If @num_vectors is -1,
+ * then @vectors is assumed to be terminated by a #GOutputVector with a
+ * %NULL buffer pointer.) The #GOutputVector structs describe the buffers
+ * that the sent data will be gathered from. Using multiple
+ * #GOutputVector<!-- -->s is more memory-efficient than manually copying
+ * data from multiple sources into a single buffer, and more
+ * network-efficient than making multiple calls to g_socket_send().
+ *
+ * @messages, if non-%NULL, is taken to point to an array of @num_messages
+ * #GSocketControlMessage instances. These correspond to the control
+ * messages to be sent on the socket.
+ * If @num_messages is -1 then @messages is treated as a %NULL-terminated
+ * array.
+ *
+ * @flags modify how the message is sent. The commonly available arguments
+ * for this are available in the #GSocketMsgFlags enum, but the
+ * values there are the same as the system values, and the flags
+ * are passed in as-is, so you can pass in system-specific flags too.
+ *
+ * If the socket is in blocking mode the call will block until there is
+ * space for the data in the socket queue. If there is no space available
+ * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
+ * will be returned. To be notified when space is available, wait for the
+ * %G_IO_OUT condition. Note though that you may still receive
+ * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously
+ * notified of a %G_IO_OUT condition. (On Windows in particular, this is
+ * very common due to the way the underlying APIs work.)
+ *
+ * On error -1 is returned and @error is set accordingly.
+ *
+ * on error
+ *
+ * Returns: Number of bytes written (which may be less than @size), or -1
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_send_to:
+ * @socket: a #GSocket
+ * @address: (allow-none): a #GSocketAddress, or %NULL
+ * @buffer: (array length=size) (element-type guint8): the buffer containing the data to send.
+ * @size: the number of bytes to send
+ * @cancellable: (allow-none): a %GCancellable or %NULL
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Tries to send @size bytes from @buffer to @address. If @address is
+ * %NULL then the message is sent to the default receiver (set by
+ * g_socket_connect()).
+ *
+ * See g_socket_send() for additional information.
+ *
+ * on error
+ *
+ * Returns: Number of bytes written (which may be less than @size), or -1
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_send_with_blocking:
+ * @socket: a #GSocket
+ * @buffer: (array length=size) (element-type guint8): the buffer containing the data to send.
+ * @size: the number of bytes to send
+ * @blocking: whether to do blocking or non-blocking I/O
+ * @cancellable: (allow-none): a %GCancellable or %NULL
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * This behaves exactly the same as g_socket_send(), except that
+ * the choice of blocking or non-blocking behavior is determined by
+ * the @blocking argument rather than by @socket's properties.
+ *
+ * on error
+ *
+ * Returns: Number of bytes written (which may be less than @size), or -1
+ * Since: 2.26
+ */
+
+
+/**
+ * g_socket_service_is_active:
+ * @service: a #GSocketService
+ *
+ * Check whether the service is active or not. An active
+ * service will accept new clients that connect, while
+ * a non-active service will let connecting clients queue
+ * up until the service is started.
+ *
+ * Returns: %TRUE if the service is active, %FALSE otherwise
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_service_new:
+ *
+ * Creates a new #GSocketService with no sockets to listen for.
+ * New listeners can be added with e.g. g_socket_listener_add_address()
+ * or g_socket_listener_add_inet_port().
+ *
+ * Returns: a new #GSocketService.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_service_start:
+ * @service: a #GSocketService
+ *
+ * Starts the service, i.e. start accepting connections
+ * from the added sockets when the mainloop runs.
+ *
+ * This call is thread-safe, so it may be called from a thread
+ * handling an incoming client request.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_service_stop:
+ * @service: a #GSocketService
+ *
+ * Stops the service, i.e. stops accepting connections
+ * from the added sockets when the mainloop runs.
+ *
+ * This call is thread-safe, so it may be called from a thread
+ * handling an incoming client request.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_set_blocking:
+ * @socket: a #GSocket.
+ * @blocking: Whether to use blocking I/O or not.
+ *
+ * Sets the blocking mode of the socket. In blocking mode
+ * all operations block until they succeed or there is an error. In
+ * non-blocking mode all functions return results immediately or
+ * with a %G_IO_ERROR_WOULD_BLOCK error.
+ *
+ * All sockets are created in blocking mode. However, note that the
+ * platform level socket is always non-blocking, and blocking mode
+ * is a GSocket level feature.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_set_broadcast:
+ * @socket: a #GSocket.
+ * @broadcast: whether @socket should allow sending to and receiving from broadcast addresses
+ *
+ * Sets whether @socket should allow sending to and receiving from
+ * broadcast addresses. This is %FALSE by default.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_socket_set_keepalive:
+ * @socket: a #GSocket.
+ * @keepalive: Value for the keepalive flag
+ *
+ * Sets or unsets the %SO_KEEPALIVE flag on the underlying socket. When
+ * this flag is set on a socket, the system will attempt to verify that the
+ * remote socket endpoint is still present if a sufficiently long period of
+ * time passes with no data being exchanged. If the system is unable to
+ * verify the presence of the remote endpoint, it will automatically close
+ * the connection.
+ *
+ * This option is only functional on certain kinds of sockets. (Notably,
+ * %G_SOCKET_PROTOCOL_TCP sockets.)
+ *
+ * The exact time between pings is system- and protocol-dependent, but will
+ * normally be at least two hours. Most commonly, you would set this flag
+ * on a server socket if you want to allow clients to remain idle for long
+ * periods of time, but also want to ensure that connections are eventually
+ * garbage-collected if clients crash or become unreachable.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_set_listen_backlog:
+ * @socket: a #GSocket.
+ * @backlog: the maximum number of pending connections.
+ *
+ * Sets the maximum number of outstanding connections allowed
+ * when listening on this socket. If more clients than this are
+ * connecting to the socket and the application is not handling them
+ * on time then the new connections will be refused.
+ *
+ * Note that this must be called before g_socket_listen() and has no
+ * effect if called after that.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_set_multicast_loopback:
+ * @socket: a #GSocket.
+ * @loopback: whether @socket should receive messages sent to its multicast groups from the local host
+ *
+ * Sets whether outgoing multicast packets will be received by sockets
+ * listening on that multicast address on the same host. This is %TRUE
+ * by default.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_socket_set_multicast_ttl:
+ * @socket: a #GSocket.
+ * @ttl: the time-to-live value for all multicast datagrams on @socket
+ *
+ * Sets the time-to-live for outgoing multicast datagrams on @socket.
+ * By default, this is 1, meaning that multicast packets will not leave
+ * the local network.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_socket_set_timeout:
+ * @socket: a #GSocket.
+ * @timeout: the timeout for @socket, in seconds, or 0 for none
+ *
+ * Sets the time in seconds after which I/O operations on @socket will
+ * time out if they have not yet completed.
+ *
+ * On a blocking socket, this means that any blocking #GSocket
+ * operation will time out after @timeout seconds of inactivity,
+ * returning %G_IO_ERROR_TIMED_OUT.
+ *
+ * On a non-blocking socket, calls to g_socket_condition_wait() will
+ * also fail with %G_IO_ERROR_TIMED_OUT after the given time. Sources
+ * created with g_socket_create_source() will trigger after
+ * @timeout seconds of inactivity, with the requested condition
+ * set, at which point calling g_socket_receive(), g_socket_send(),
+ * g_socket_check_connect_result(), etc, will fail with
+ * %G_IO_ERROR_TIMED_OUT.
+ *
+ * If @timeout is 0 (the default), operations will never time out
+ * on their own.
+ *
+ * Note that if an I/O operation is interrupted by a signal, this may
+ * cause the timeout to be reset.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_socket_set_ttl:
+ * @socket: a #GSocket.
+ * @ttl: the time-to-live value for all unicast packets on @socket
+ *
+ * Sets the time-to-live for outgoing unicast packets on @socket.
+ * By default the platform-specific default value is used.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_socket_shutdown:
+ * @socket: a #GSocket
+ * @shutdown_read: whether to shut down the read side
+ * @shutdown_write: whether to shut down the write side
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Shut down part of a full-duplex connection.
+ *
+ * If @shutdown_read is %TRUE then the receiving side of the connection
+ * is shut down, and further reading is disallowed.
+ *
+ * If @shutdown_write is %TRUE then the sending side of the connection
+ * is shut down, and further writing is disallowed.
+ *
+ * It is allowed for both @shutdown_read and @shutdown_write to be %TRUE.
+ *
+ * One example where this is used is graceful disconnect for TCP connections
+ * where you close the sending side, then wait for the other side to close
+ * the connection, thus ensuring that the other side saw all sent data.
+ *
+ * Returns: %TRUE on success, %FALSE on error
+ * Since: 2.22
+ */
+
+
+/**
+ * g_socket_speaks_ipv4:
+ * @socket: a #GSocket
+ *
+ * Checks if a socket is capable of speaking IPv4.
+ *
+ * IPv4 sockets are capable of speaking IPv4.  On some operating systems
+ * and under some combinations of circumstances IPv6 sockets are also
+ * capable of speaking IPv4.  See RFC 3493 section 3.7 for more
+ * information.
+ *
+ * No other types of sockets are currently considered as being capable
+ * of speaking IPv4.
+ *
+ * Returns: %TRUE if this socket can be used with IPv4.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_srv_target_copy:
+ * @target: a #GSrvTarget
+ *
+ * Copies @target
+ *
+ * Returns: a copy of @target
+ * Since: 2.22
+ */
+
+
+/**
+ * g_srv_target_free:
+ * @target: a #GSrvTarget
+ *
+ * Frees @target
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_srv_target_get_hostname:
+ * @target: a #GSrvTarget
+ *
+ * Gets @target's hostname (in ASCII form; if you are going to present
+ * this to the user, you should use g_hostname_is_ascii_encoded() to
+ * check if it contains encoded Unicode segments, and use
+ * g_hostname_to_unicode() to convert it if it does.)
+ *
+ * Returns: @target's hostname
+ * Since: 2.22
+ */
+
+
+/**
+ * g_srv_target_get_port:
+ * @target: a #GSrvTarget
+ *
+ * Gets @target's port
+ *
+ * Returns: @target's port
+ * Since: 2.22
+ */
+
+
+/**
+ * g_srv_target_get_priority:
+ * @target: a #GSrvTarget
+ *
+ * Gets @target's priority. You should not need to look at this;
+ * #GResolver already sorts the targets according to the algorithm in
+ * RFC 2782.
+ *
+ * Returns: @target's priority
+ * Since: 2.22
+ */
+
+
+/**
+ * g_srv_target_get_weight:
+ * @target: a #GSrvTarget
+ *
+ * Gets @target's weight. You should not need to look at this;
+ * #GResolver already sorts the targets according to the algorithm in
+ * RFC 2782.
+ *
+ * Returns: @target's weight
+ * Since: 2.22
+ */
+
+
+/**
+ * g_srv_target_list_sort: (skip)
+ * @targets: a #GList of #GSrvTarget
+ *
+ * Sorts @targets in place according to the algorithm in RFC 2782.
+ *
+ * Returns: (transfer full): the head of the sorted list.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_srv_target_new:
+ * @hostname: the host that the service is running on
+ * @port: the port that the service is running on
+ * @priority: the target's priority
+ * @weight: the target's weight
+ *
+ * Creates a new #GSrvTarget with the given parameters.
+ *
+ * You should not need to use this; normally #GSrvTarget<!-- -->s are
+ * created by #GResolver.
+ *
+ * Returns: a new #GSrvTarget.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_static_resource_fini:
+ * @static_resource: pointer to a static #GStaticResource.
+ *
+ * Finalized a GResource initialized by g_static_resource_init ().
+ *
+ * This is normally used by code generated by
+ * <link linkend="glib-compile-resources">glib-compile-resources</link> and is
+ * not typically used by other code.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_static_resource_get_resource:
+ * @static_resource: pointer to a static #GStaticResource.
+ *
+ * Gets the GResource that was registred by a call to g_static_resource_init ().
+ *
+ * This is normally used by code generated by
+ * <link linkend="glib-compile-resources">glib-compile-resources</link> and is
+ * not typically used by other code.
+ *
+ * Returns: (transfer none): a #GResource.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_static_resource_init:
+ * @static_resource: pointer to a static #GStaticResource.
+ *
+ * Initializes a GResource from static data using a
+ * GStaticResource.
+ *
+ * This is normally used by code generated by
+ * <link linkend="glib-compile-resources">glib-compile-resources</link> and is
+ * not typically used by other code.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_tcp_connection_get_graceful_disconnect:
+ * @connection: a #GTcpConnection
+ *
+ * Checks if graceful disconnects are used. See
+ * g_tcp_connection_set_graceful_disconnect().
+ *
+ * Returns: %TRUE if graceful disconnect is used on close, %FALSE otherwise
+ * Since: 2.22
+ */
+
+
+/**
+ * g_tcp_connection_set_graceful_disconnect:
+ * @connection: a #GTcpConnection
+ * @graceful_disconnect: Whether to do graceful disconnects or not
+ *
+ * This enabled graceful disconnects on close. A graceful disconnect
+ * means that we signal the receiving end that the connection is terminated
+ * and wait for it to close the connection before closing the connection.
+ *
+ * A graceful disconnect means that we can be sure that we successfully sent
+ * all the outstanding data to the other end, or get an error reported.
+ * However, it also means we have to wait for all the data to reach the
+ * other side and for it to acknowledge this by closing the socket, which may
+ * take a while. For this reason it is disabled by default.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_tcp_wrapper_connection_get_base_io_stream:
+ * @conn: a #GTcpWrapperConnection
+ *
+ * Get's @conn's base #GIOStream
+ *
+ * Returns: (transfer none): @conn's base #GIOStream
+ */
+
+
+/**
+ * g_tcp_wrapper_connection_new:
+ * @base_io_stream: the #GIOStream to wrap
+ * @socket: the #GSocket associated with @base_io_stream
+ *
+ * Wraps @base_io_stream and @socket together as a #GSocketConnection.
+ *
+ * Returns: the new #GSocketConnection.
+ * Since: 2.28
+ */
+
+
+/**
+ * g_themed_icon_append_name:
+ * @icon: a #GThemedIcon
+ * @iconname: name of icon to append to list of icons from within @icon.
+ *
+ * Append a name to the list of icons from within @icon.
+ *
+ * <note><para>
+ * Note that doing so invalidates the hash computed by prior calls
+ * to g_icon_hash().
+ * </para></note>
+ */
+
+
+/**
+ * g_themed_icon_get_names:
+ * @icon: a #GThemedIcon.
+ *
+ * Gets the names of icons from within @icon.
+ *
+ * Returns: (transfer none): a list of icon names.
+ */
+
+
+/**
+ * g_themed_icon_new:
+ * @iconname: a string containing an icon name.
+ *
+ * Creates a new themed icon for @iconname.
+ *
+ * Returns: (transfer full) (type GThemedIcon): a new #GThemedIcon.
+ */
+
+
+/**
+ * g_themed_icon_new_from_names:
+ * @iconnames: (array length=len): an array of strings containing icon names.
+ * @len: the length of the @iconnames array, or -1 if @iconnames is %NULL-terminated
+ *
+ * Creates a new themed icon for @iconnames.
+ *
+ * Returns: (transfer full) (type GThemedIcon): a new #GThemedIcon
+ */
+
+
+/**
+ * g_themed_icon_new_with_default_fallbacks:
+ * @iconname: a string containing an icon name
+ *
+ * Creates a new themed icon for @iconname, and all the names
+ * that can be created by shortening @iconname at '-' characters.
+ *
+ * In the following example, @icon1 and @icon2 are equivalent:
+ * |[
+ * const char *names[] = {
+ * "gnome-dev-cdrom-audio",
+ * "gnome-dev-cdrom",
+ * "gnome-dev",
+ * "gnome"
+ * };
+ *
+ * icon1 = g_themed_icon_new_from_names (names, 4);
+ * icon2 = g_themed_icon_new_with_default_fallbacks ("gnome-dev-cdrom-audio");
+ * ]|
+ *
+ * Returns: (transfer full) (type GThemedIcon): a new #GThemedIcon.
+ */
+
+
+/**
+ * g_themed_icon_prepend_name:
+ * @icon: a #GThemedIcon
+ * @iconname: name of icon to prepend to list of icons from within @icon.
+ *
+ * Prepend a name to the list of icons from within @icon.
+ *
+ * <note><para>
+ * Note that doing so invalidates the hash computed by prior calls
+ * to g_icon_hash().
+ * </para></note>
+ *
+ * Since: 2.18
+ */
+
+
+/**
+ * g_threaded_socket_service_new:
+ * @max_threads: the maximal number of threads to execute concurrently handling incoming clients, -1 means no limit
+ *
+ * Creates a new #GThreadedSocketService with no listeners. Listeners
+ * must be added with one of the #GSocketListener "add" methods.
+ *
+ * Returns: a new #GSocketService.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_tls_backend_get_certificate_type:
+ * @backend: the #GTlsBackend
+ *
+ * Gets the #GType of @backend's #GTlsCertificate implementation.
+ *
+ * implementation.
+ *
+ * Returns: the #GType of @backend's #GTlsCertificate
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_backend_get_client_connection_type:
+ * @backend: the #GTlsBackend
+ *
+ * Gets the #GType of @backend's #GTlsClientConnection implementation.
+ *
+ * implementation.
+ *
+ * Returns: the #GType of @backend's #GTlsClientConnection
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_backend_get_default:
+ *
+ * Gets the default #GTlsBackend for the system.
+ *
+ * Returns: (transfer none): a #GTlsBackend
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_backend_get_default_database:
+ * @backend: the #GTlsBackend
+ *
+ * Gets the default #GTlsDatabase used to verify TLS connections.
+ *
+ * unreffed when done.
+ *
+ * Returns: (transfer full): the default database, which should be
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_backend_get_file_database_type:
+ * @backend: the #GTlsBackend
+ *
+ * Gets the #GType of @backend's #GTlsFileDatabase implementation.
+ *
+ * Returns: the #GType of backend's #GTlsFileDatabase implementation.
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_backend_get_server_connection_type:
+ * @backend: the #GTlsBackend
+ *
+ * Gets the #GType of @backend's #GTlsServerConnection implementation.
+ *
+ * implementation.
+ *
+ * Returns: the #GType of @backend's #GTlsServerConnection
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_backend_supports_tls:
+ * @backend: the #GTlsBackend
+ *
+ * Checks if TLS is supported; if this returns %FALSE for the default
+ * #GTlsBackend, it means no "real" TLS backend is available.
+ *
+ * Returns: whether or not TLS is supported
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_certificate_get_issuer:
+ * @cert: a #GTlsCertificate
+ *
+ * Gets the #GTlsCertificate representing @cert's issuer, if known
+ *
+ * or %NULL if @cert is self-signed or signed with an unknown
+ * certificate.
+ *
+ * Returns: (transfer none): The certificate of @cert's issuer,
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_certificate_list_new_from_file:
+ * @file: file containing PEM-encoded certificates to import
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Creates one or more #GTlsCertificate<!-- -->s from the PEM-encoded
+ * data in @file. If @file cannot be read or parsed, the function will
+ * return %NULL and set @error. If @file does not contain any
+ * PEM-encoded certificates, this will return an empty list and not
+ * set @error.
+ *
+ * #GList containing #GTlsCertificate objects. You must free the list
+ * and its contents when you are done with it.
+ *
+ * Returns: (element-type Gio.TlsCertificate) (transfer full): a
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_certificate_new_from_file:
+ * @file: file containing a PEM-encoded certificate to import
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Creates a #GTlsCertificate from the PEM-encoded data in @file. If
+ * @file cannot be read or parsed, the function will return %NULL and
+ * set @error. Otherwise, this behaves like
+ * g_tls_certificate_new_from_pem().
+ *
+ * Returns: the new certificate, or %NULL on error
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_certificate_new_from_files:
+ * @cert_file: file containing a PEM-encoded certificate to import
+ * @key_file: file containing a PEM-encoded private key to import
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Creates a #GTlsCertificate from the PEM-encoded data in @cert_file
+ * and @key_file. If either file cannot be read or parsed, the
+ * function will return %NULL and set @error. Otherwise, this behaves
+ * like g_tls_certificate_new_from_pem().
+ *
+ * Returns: the new certificate, or %NULL on error
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_certificate_new_from_pem:
+ * @data: PEM-encoded certificate data
+ * @length: the length of @data, or -1 if it's 0-terminated.
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Creates a new #GTlsCertificate from the PEM-encoded data in @data.
+ * If @data includes both a certificate and a private key, then the
+ * returned certificate will include the private key data as well. (See
+ * the #GTlsCertificate:private-key-pem property for information about
+ * supported formats.)
+ *
+ * If @data includes multiple certificates, only the first one will be
+ * parsed.
+ *
+ * Returns: the new certificate, or %NULL if @data is invalid
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_certificate_verify:
+ * @cert: a #GTlsCertificate
+ * @identity: (allow-none): the expected peer identity
+ * @trusted_ca: (allow-none): the certificate of a trusted authority
+ *
+ * This verifies @cert and returns a set of #GTlsCertificateFlags
+ * indicating any problems found with it. This can be used to verify a
+ * certificate outside the context of making a connection, or to
+ * check a certificate against a CA that is not part of the system
+ * CA database.
+ *
+ * If @identity is not %NULL, @cert's name(s) will be compared against
+ * it, and %G_TLS_CERTIFICATE_BAD_IDENTITY will be set in the return
+ * value if it does not match. If @identity is %NULL, that bit will
+ * never be set in the return value.
+ *
+ * If @trusted_ca is not %NULL, then @cert (or one of the certificates
+ * in its chain) must be signed by it, or else
+ * %G_TLS_CERTIFICATE_UNKNOWN_CA will be set in the return value. If
+ * @trusted_ca is %NULL, that bit will never be set in the return
+ * value.
+ *
+ * (All other #GTlsCertificateFlags values will always be set or unset
+ * as appropriate.)
+ *
+ * Returns: the appropriate #GTlsCertificateFlags
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_client_connection_get_accepted_cas:
+ * @conn: the #GTlsClientConnection
+ *
+ * Gets the list of distinguished names of the Certificate Authorities
+ * that the server will accept certificates from. This will be set
+ * during the TLS handshake if the server requests a certificate.
+ * Otherwise, it will be %NULL.
+ *
+ * Each item in the list is a #GByteArray which contains the complete
+ * subject DN of the certificate authority.
+ *
+ * CA DNs. You should unref each element with g_byte_array_unref() and then
+ * the free the list with g_list_free().
+ *
+ * Returns: (element-type GByteArray) (transfer full): the list of
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_client_connection_get_server_identity:
+ * @conn: the #GTlsClientConnection
+ *
+ * Gets @conn's expected server identity
+ *
+ * expected server identity, or %NULL if the expected identity is not
+ * known.
+ *
+ * Returns: (transfer none): a #GSocketConnectable describing the
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_client_connection_get_use_ssl3:
+ * @conn: the #GTlsClientConnection
+ *
+ * Gets whether @conn will use SSL 3.0 rather than the
+ * highest-supported version of TLS; see
+ * g_tls_client_connection_set_use_ssl3().
+ *
+ * Returns: whether @conn will use SSL 3.0
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_client_connection_get_validation_flags:
+ * @conn: the #GTlsClientConnection
+ *
+ * Gets @conn's validation flags
+ *
+ * Returns: the validation flags
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_client_connection_new:
+ * @base_io_stream: the #GIOStream to wrap
+ * @server_identity: (allow-none): the expected identity of the server
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Creates a new #GTlsClientConnection wrapping @base_io_stream (which
+ * must have pollable input and output streams) which is assumed to
+ * communicate with the server identified by @server_identity.
+ *
+ * #GTlsClientConnection, or %NULL on error
+ *
+ * Returns: (transfer full) (type GTlsClientConnection): the new
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_client_connection_set_server_identity:
+ * @conn: the #GTlsClientConnection
+ * @identity: a #GSocketConnectable describing the expected server identity
+ *
+ * Sets @conn's expected server identity, which is used both to tell
+ * servers on virtual hosts which certificate to present, and also
+ * to let @conn know what name to look for in the certificate when
+ * performing %G_TLS_CERTIFICATE_BAD_IDENTITY validation, if enabled.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_client_connection_set_use_ssl3:
+ * @conn: the #GTlsClientConnection
+ * @use_ssl3: whether to use SSL 3.0
+ *
+ * If @use_ssl3 is %TRUE, this forces @conn to use SSL 3.0 rather than
+ * trying to properly negotiate the right version of TLS or SSL to use.
+ * This can be used when talking to servers that do not implement the
+ * fallbacks correctly and which will therefore fail to handshake with
+ * a "modern" TLS handshake attempt.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_client_connection_set_validation_flags:
+ * @conn: the #GTlsClientConnection
+ * @flags: the #GTlsCertificateFlags to use
+ *
+ * Sets @conn's validation flags, to override the default set of
+ * checks performed when validating a server certificate. By default,
+ * %G_TLS_CERTIFICATE_VALIDATE_ALL is used.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_connection_emit_accept_certificate:
+ * @conn: a #GTlsConnection
+ * @peer_cert: the peer's #GTlsCertificate
+ * @errors: the problems with @peer_cert
+ *
+ * Used by #GTlsConnection implementations to emit the
+ * #GTlsConnection::accept-certificate signal.
+ *
+ * %TRUE to accept @peer_cert
+ *
+ * Returns: %TRUE if one of the signal handlers has returned
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_connection_get_certificate:
+ * @conn: a #GTlsConnection
+ *
+ * Gets @conn's certificate, as set by
+ * g_tls_connection_set_certificate().
+ *
+ * Returns: (transfer none): @conn's certificate, or %NULL
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_connection_get_database:
+ * @conn: a #GTlsConnection
+ *
+ * Gets the certificate database that @conn uses to verify
+ * peer certificates. See g_tls_connection_set_database().
+ *
+ * Returns: (transfer none): the certificate database that @conn uses or %NULL
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_connection_get_interaction:
+ * @conn: a connection
+ *
+ * Get the object that will be used to interact with the user. It will be used
+ * for things like prompting the user for passwords. If %NULL is returned, then
+ * no user interaction will occur for this connection.
+ *
+ * Returns: (transfer none): The interaction object.
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_connection_get_peer_certificate:
+ * @conn: a #GTlsConnection
+ *
+ * Gets @conn's peer's certificate after the handshake has completed.
+ * (It is not set during the emission of
+ * #GTlsConnection::accept-certificate.)
+ *
+ * Returns: (transfer none): @conn's peer's certificate, or %NULL
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_connection_get_peer_certificate_errors:
+ * @conn: a #GTlsConnection
+ *
+ * Gets the errors associated with validating @conn's peer's
+ * certificate, after the handshake has completed. (It is not set
+ * during the emission of #GTlsConnection::accept-certificate.)
+ *
+ * Returns: @conn's peer's certificate errors
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_connection_get_rehandshake_mode:
+ * @conn: a #GTlsConnection
+ *
+ * Gets @conn rehandshaking mode. See
+ * g_tls_connection_set_rehandshake_mode() for details.
+ *
+ * Returns: @conn's rehandshaking mode
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_connection_get_require_close_notify:
+ * @conn: a #GTlsConnection
+ *
+ * Tests whether or not @conn expects a proper TLS close notification
+ * when the connection is closed. See
+ * g_tls_connection_set_require_close_notify() for details.
+ *
+ * notification.
+ *
+ * Returns: %TRUE if @conn requires a proper TLS close
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_connection_get_use_system_certdb:
+ * @conn: a #GTlsConnection
+ *
+ * Gets whether @conn uses the system certificate database to verify
+ * peer certificates. See g_tls_connection_set_use_system_certdb().
+ *
+ * Returns: whether @conn uses the system certificate database
+ * Deprecated: 2.30: Use g_tls_connection_get_database() instead
+ */
+
+
+/**
+ * g_tls_connection_handshake:
+ * @conn: a #GTlsConnection
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @error: a #GError, or %NULL
+ *
+ * Attempts a TLS handshake on @conn.
+ *
+ * On the client side, it is never necessary to call this method;
+ * although the connection needs to perform a handshake after
+ * connecting (or after sending a "STARTTLS"-type command) and may
+ * need to rehandshake later if the server requests it,
+ * #GTlsConnection will handle this for you automatically when you try
+ * to send or receive data on the connection. However, you can call
+ * g_tls_connection_handshake() manually if you want to know for sure
+ * whether the initial handshake succeeded or failed (as opposed to
+ * just immediately trying to write to @conn's output stream, in which
+ * case if it fails, it may not be possible to tell if it failed
+ * before or after completing the handshake).
+ *
+ * Likewise, on the server side, although a handshake is necessary at
+ * the beginning of the communication, you do not need to call this
+ * function explicitly unless you want clearer error reporting.
+ * However, you may call g_tls_connection_handshake() later on to
+ * renegotiate parameters (encryption methods, etc) with the client.
+ *
+ * #GTlsConnection::accept_certificate may be emitted during the
+ * handshake.
+ *
+ * Returns: success or failure
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_connection_handshake_async:
+ * @conn: a #GTlsConnection
+ * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @callback: callback to call when the handshake is complete
+ * @user_data: the data to pass to the callback function
+ *
+ * Asynchronously performs a TLS handshake on @conn. See
+ * g_tls_connection_handshake() for more information.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_connection_handshake_finish:
+ * @conn: a #GTlsConnection
+ * @result: a #GAsyncResult.
+ * @error: a #GError pointer, or %NULL
+ *
+ * Finish an asynchronous TLS handshake operation. See
+ * g_tls_connection_handshake() for more information.
+ *
+ * case @error will be set.
+ *
+ * Returns: %TRUE on success, %FALSE on failure, in which
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_connection_set_certificate:
+ * @conn: a #GTlsConnection
+ * @certificate: the certificate to use for @conn
+ *
+ * This sets the certificate that @conn will present to its peer
+ * during the TLS handshake. For a #GTlsServerConnection, it is
+ * mandatory to set this, and that will normally be done at construct
+ * time.
+ *
+ * For a #GTlsClientConnection, this is optional. If a handshake fails
+ * with %G_TLS_ERROR_CERTIFICATE_REQUIRED, that means that the server
+ * requires a certificate, and if you try connecting again, you should
+ * call this method first. You can call
+ * g_tls_client_connection_get_accepted_cas() on the failed connection
+ * to get a list of Certificate Authorities that the server will
+ * accept certificates from.
+ *
+ * (It is also possible that a server will allow the connection with
+ * or without a certificate; in that case, if you don't provide a
+ * certificate, you can tell that the server requested one by the fact
+ * that g_tls_client_connection_get_accepted_cas() will return
+ * non-%NULL.)
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_connection_set_database:
+ * @conn: a #GTlsConnection
+ * @database: a #GTlsDatabase
+ *
+ * Sets the certificate database that is used to verify peer certificates.
+ * This is set to the default database by default. See
+ * g_tls_backend_get_default_database(). If set to %NULL, then
+ * peer certificate validation will always set the
+ * %G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning
+ * #GTlsConnection::accept-certificate will always be emitted on
+ * client-side connections, unless that bit is not set in
+ * #GTlsClientConnection:validation-flags).
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_connection_set_interaction:
+ * @conn: a connection
+ * @interaction: (allow-none): an interaction object, or %NULL
+ *
+ * Set the object that will be used to interact with the user. It will be used
+ * for things like prompting the user for passwords.
+ *
+ * The @interaction argument will normally be a derived subclass of
+ * #GTlsInteraction. %NULL can also be provided if no user interaction
+ * should occur for this connection.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_connection_set_rehandshake_mode:
+ * @conn: a #GTlsConnection
+ * @mode: the rehandshaking mode
+ *
+ * Sets how @conn behaves with respect to rehandshaking requests.
+ *
+ * %G_TLS_REHANDSHAKE_NEVER means that it will never agree to
+ * rehandshake after the initial handshake is complete. (For a client,
+ * this means it will refuse rehandshake requests from the server, and
+ * for a server, this means it will close the connection with an error
+ * if the client attempts to rehandshake.)
+ *
+ * %G_TLS_REHANDSHAKE_SAFELY means that the connection will allow a
+ * rehandshake only if the other end of the connection supports the
+ * TLS <literal>renegotiation_info</literal> extension. This is the
+ * default behavior, but means that rehandshaking will not work
+ * against older implementations that do not support that extension.
+ *
+ * %G_TLS_REHANDSHAKE_UNSAFELY means that the connection will allow
+ * rehandshaking even without the
+ * <literal>renegotiation_info</literal> extension. On the server side
+ * in particular, this is not recommended, since it leaves the server
+ * open to certain attacks. However, this mode is necessary if you
+ * need to allow renegotiation with older client software.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_connection_set_require_close_notify:
+ * @conn: a #GTlsConnection
+ * @require_close_notify: whether or not to require close notification
+ *
+ * Sets whether or not @conn expects a proper TLS close notification
+ * before the connection is closed. If this is %TRUE (the default),
+ * then @conn will expect to receive a TLS close notification from its
+ * peer before the connection is closed, and will return a
+ * %G_TLS_ERROR_EOF error if the connection is closed without proper
+ * notification (since this may indicate a network error, or
+ * man-in-the-middle attack).
+ *
+ * In some protocols, the application will know whether or not the
+ * connection was closed cleanly based on application-level data
+ * (because the application-level data includes a length field, or is
+ * somehow self-delimiting); in this case, the close notify is
+ * redundant and sometimes omitted. (TLS 1.1 explicitly allows this;
+ * in TLS 1.0 it is technically an error, but often done anyway.) You
+ * can use g_tls_connection_set_require_close_notify() to tell @conn
+ * to allow an "unannounced" connection close, in which case the close
+ * will show up as a 0-length read, as in a non-TLS
+ * #GSocketConnection, and it is up to the application to check that
+ * the data has been fully received.
+ *
+ * Note that this only affects the behavior when the peer closes the
+ * connection; when the application calls g_io_stream_close() itself
+ * on @conn, this will send a close notification regardless of the
+ * setting of this property. If you explicitly want to do an unclean
+ * close, you can close @conn's #GTlsConnection:base-io-stream rather
+ * than closing @conn itself.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_connection_set_use_system_certdb:
+ * @conn: a #GTlsConnection
+ * @use_system_certdb: whether to use the system certificate database
+ *
+ * Sets whether @conn uses the system certificate database to verify
+ * peer certificates. This is %TRUE by default. If set to %FALSE, then
+ * peer certificate validation will always set the
+ * %G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning
+ * #GTlsConnection::accept-certificate will always be emitted on
+ * client-side connections, unless that bit is not set in
+ * #GTlsClientConnection:validation-flags).
+ *
+ * Deprecated: 2.30: Use g_tls_connection_set_database() instead
+ */
+
+
+/**
+ * g_tls_database_create_certificate_handle:
+ * @self: a #GTlsDatabase
+ * @certificate: certificate for which to create a handle.
+ *
+ * Create a handle string for the certificate. The database will only be able
+ * to create a handle for certificates that originate from the database. In
+ * cases where the database cannot create a handle for a certificate, %NULL
+ * will be returned.
+ *
+ * This handle should be stable across various instances of the application,
+ * and between applications. If a certificate is modified in the database,
+ * then it is not guaranteed that this handle will continue to point to it.
+ *
+ * Returns: (allow-none): a newly allocated string containing the handle.
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_database_lookup_certificate_for_handle:
+ * @self: a #GTlsDatabase
+ * @handle: a certificate handle
+ * @interaction: (allow-none): used to interact with the user if necessary
+ * @flags: Flags which affect the lookup.
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @error: (allow-none): a #GError, or %NULL
+ *
+ * Lookup a certificate by its handle.
+ *
+ * The handle should have been created by calling
+ * g_tls_database_create_certificate_handle() on a #GTlsDatabase object of
+ * the same TLS backend. The handle is designed to remain valid across
+ * instantiations of the database.
+ *
+ * If the handle is no longer valid, or does not point to a certificate in
+ * this database, then %NULL will be returned.
+ *
+ * This function can block, use g_tls_database_lookup_certificate_for_handle_async() to perform
+ * the lookup operation asynchronously.
+ *
+ * #GTlsCertificate, or %NULL. Use g_object_unref() to release the certificate.
+ *
+ * Returns: (transfer full) (allow-none): a newly allocated
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_database_lookup_certificate_for_handle_async:
+ * @self: a #GTlsDatabase
+ * @handle: a certificate handle
+ * @interaction: (allow-none): used to interact with the user if necessary
+ * @flags: Flags which affect the lookup.
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @callback: callback to call when the operation completes
+ * @user_data: the data to pass to the callback function
+ *
+ * Asynchronously lookup a certificate by its handle in the database. See
+ * g_tls_database_lookup_certificate_for_handle() for more information.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_database_lookup_certificate_for_handle_finish:
+ * @self: a #GTlsDatabase
+ * @result: a #GAsyncResult.
+ * @error: a #GError pointer, or %NULL
+ *
+ * Finish an asynchronous lookup of a certificate by its handle. See
+ * g_tls_database_lookup_certificate_handle() for more information.
+ *
+ * If the handle is no longer valid, or does not point to a certificate in
+ * this database, then %NULL will be returned.
+ *
+ * Use g_object_unref() to release the certificate.
+ *
+ * Returns: (transfer full): a newly allocated #GTlsCertificate object.
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_database_lookup_certificate_issuer:
+ * @self: a #GTlsDatabase
+ * @certificate: a #GTlsCertificate
+ * @interaction: (allow-none): used to interact with the user if necessary
+ * @flags: flags which affect the lookup operation
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @error: (allow-none): a #GError, or %NULL
+ *
+ * Lookup the issuer of @certificate in the database.
+ *
+ * The %issuer property
+ * of @certificate is not modified, and the two certificates are not hooked
+ * into a chain.
+ *
+ * This function can block, use g_tls_database_lookup_certificate_issuer_async() to perform
+ * the lookup operation asynchronously.
+ *
+ * or %NULL. Use g_object_unref() to release the certificate.
+ *
+ * Returns: (transfer full): a newly allocated issuer #GTlsCertificate,
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_database_lookup_certificate_issuer_async:
+ * @self: a #GTlsDatabase
+ * @certificate: a #GTlsCertificate
+ * @interaction: (allow-none): used to interact with the user if necessary
+ * @flags: flags which affect the lookup operation
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @callback: callback to call when the operation completes
+ * @user_data: the data to pass to the callback function
+ *
+ * Asynchronously lookup the issuer of @certificate in the database. See
+ * g_tls_database_lookup_certificate_issuer() for more information.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_database_lookup_certificate_issuer_finish:
+ * @self: a #GTlsDatabase
+ * @result: a #GAsyncResult.
+ * @error: a #GError pointer, or %NULL
+ *
+ * Finish an asynchronous lookup issuer operation. See
+ * g_tls_database_lookup_certificate_issuer() for more information.
+ *
+ * or %NULL. Use g_object_unref() to release the certificate.
+ *
+ * Returns: (transfer full): a newly allocated issuer #GTlsCertificate,
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_database_lookup_certificates_issued_by:
+ * @self: a #GTlsDatabase
+ * @issuer_raw_dn: a #GByteArray which holds the DER encoded issuer DN.
+ * @interaction: (allow-none): used to interact with the user if necessary
+ * @flags: Flags which affect the lookup operation.
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @error: (allow-none): a #GError, or %NULL
+ *
+ * Lookup certificates issued by this issuer in the database.
+ *
+ * This function can block, use g_tls_database_lookup_certificates_issued_by_async() to perform
+ * the lookup operation asynchronously.
+ *
+ * objects. Use g_object_unref() on each certificate, and g_list_free() on the release the list.
+ *
+ * Returns: (transfer full) (element-type GTlsCertificate): a newly allocated list of #GTlsCertificate
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_database_lookup_certificates_issued_by_async:
+ * @self: a #GTlsDatabase
+ * @issuer_raw_dn: a #GByteArray which holds the DER encoded issuer DN.
+ * @interaction: (allow-none): used to interact with the user if necessary
+ * @flags: Flags which affect the lookup operation.
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @callback: callback to call when the operation completes
+ * @user_data: the data to pass to the callback function
+ *
+ * Asynchronously lookup certificates issued by this issuer in the database. See
+ * g_tls_database_lookup_certificates_issued_by() for more information.
+ *
+ * The database may choose to hold a reference to the issuer byte array for the duration
+ * of of this asynchronous operation. The byte array should not be modified during
+ * this time.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_database_lookup_certificates_issued_by_finish:
+ * @self: a #GTlsDatabase
+ * @result: a #GAsyncResult.
+ * @error: a #GError pointer, or %NULL
+ *
+ * Finish an asynchronous lookup of certificates. See
+ * g_tls_database_lookup_certificates_issued_by() for more information.
+ *
+ * Use g_object_unref() on each certificate, and g_list_free() on the release the list.
+ *
+ * Returns: (transfer full): a newly allocated list of #GTlsCertificate objects.
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_database_verify_chain:
+ * @self: a #GTlsDatabase
+ * @chain: a #GTlsCertificate chain
+ * @purpose: the purpose that this certificate chain will be used for.
+ * @identity: (allow-none): the expected peer identity
+ * @interaction: (allow-none): used to interact with the user if necessary
+ * @flags: additional verify flags
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @error: (allow-none): a #GError, or %NULL
+ *
+ * Verify's a certificate chain after looking up and adding any missing
+ * certificates to the chain.
+ *
+ * @chain is a chain of #GTlsCertificate objects each pointing to the next
+ * certificate in the chain by its %issuer property. The chain may initially
+ * consist of one or more certificates. After the verification process is
+ * complete, @chain may be modified by adding missing certificates, or removing
+ * extra certificates. If a certificate anchor was found, then it is added to
+ * the @chain.
+ *
+ * @purpose describes the purpose (or usage) for which the certificate
+ * is being used. Typically @purpose will be set to #G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER
+ * which means that the certificate is being used to authenticate a server
+ * (and we are acting as the client).
+ *
+ * The @identity is used to check for pinned certificates (trust exceptions)
+ * in the database. These will override the normal verification process on a
+ * host by host basis.
+ *
+ * Currently there are no @flags, and %G_TLS_DATABASE_VERIFY_NONE should be
+ * used.
+ *
+ * This function can block, use g_tls_database_verify_chain_async() to perform
+ * the verification operation asynchronously.
+ *
+ * result of verification.
+ *
+ * Returns: the appropriate #GTlsCertificateFlags which represents the
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_database_verify_chain_async:
+ * @self: a #GTlsDatabase
+ * @chain: a #GTlsCertificate chain
+ * @purpose: the purpose that this certificate chain will be used for.
+ * @identity: (allow-none): the expected peer identity
+ * @interaction: (allow-none): used to interact with the user if necessary
+ * @flags: additional verify flags
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
+ * @callback: callback to call when the operation completes
+ * @user_data: the data to pass to the callback function
+ *
+ * Asynchronously verify's a certificate chain after looking up and adding
+ * any missing certificates to the chain. See g_tls_database_verify_chain()
+ * for more information.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_database_verify_chain_finish:
+ * @self: a #GTlsDatabase
+ * @result: a #GAsyncResult.
+ * @error: a #GError pointer, or %NULL
+ *
+ * Finish an asynchronous verify chain operation. See
+ * g_tls_database_verify_chain() for more information. *
+ * result of verification.
+ *
+ * Returns: the appropriate #GTlsCertificateFlags which represents the
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_error_quark:
+ *
+ * Gets the TLS error quark.
+ *
+ * Returns: a #GQuark.
+ * Since: 2.28
+ */
+
+
+/**
+ * g_tls_file_database_new:
+ * @anchors: filename of anchor certificate authorities.
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Creates a new #GTlsFileDatabase which uses anchor certificate authorities
+ * in @anchors to verify certificate chains.
+ *
+ * The certificates in @anchors must be PEM encoded.
+ *
+ * #GTlsFileDatabase, or %NULL on error
+ *
+ * Returns: (transfer full) (type GTlsFileDatabase): the new
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_interaction_ask_password:
+ * @interaction: a #GTlsInteraction object
+ * @password: a #GTlsPassword object
+ * @cancellable: an optional #GCancellable cancellation object
+ * @error: an optional location to place an error on failure
+ *
+ * Run synchronous interaction to ask the user for a password. In general,
+ * g_tls_interaction_invoke_ask_password() should be used instead of this
+ * function.
+ *
+ * Derived subclasses usually implement a password prompt, although they may
+ * also choose to provide a password from elsewhere. The @password value will
+ * be filled in and then @callback will be called. Alternatively the user may
+ * abort this password request, which will usually abort the TLS connection.
+ *
+ * If the interaction is cancelled by the cancellation object, or by the
+ * user then %G_TLS_INTERACTION_FAILED will be returned with an error that
+ * contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may
+ * not support immediate cancellation.
+ *
+ * Returns: The status of the ask password interaction.
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_interaction_ask_password_async:
+ * @interaction: a #GTlsInteraction object
+ * @password: a #GTlsPassword object
+ * @cancellable: an optional #GCancellable cancellation object
+ * @callback: (allow-none): will be called when the interaction completes
+ * @user_data: (allow-none): data to pass to the @callback
+ *
+ * Run asynchronous interaction to ask the user for a password. In general,
+ * g_tls_interaction_invoke_ask_password() should be used instead of this
+ * function.
+ *
+ * Derived subclasses usually implement a password prompt, although they may
+ * also choose to provide a password from elsewhere. The @password value will
+ * be filled in and then @callback will be called. Alternatively the user may
+ * abort this password request, which will usually abort the TLS connection.
+ *
+ * If the interaction is cancelled by the cancellation object, or by the
+ * user then %G_TLS_INTERACTION_FAILED will be returned with an error that
+ * contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may
+ * not support immediate cancellation.
+ *
+ * Certain implementations may not support immediate cancellation.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_interaction_ask_password_finish:
+ * @interaction: a #GTlsInteraction object
+ * @result: the result passed to the callback
+ * @error: an optional location to place an error on failure
+ *
+ * Complete an ask password user interaction request. This should be once
+ * the g_tls_interaction_ask_password_async() completion callback is called.
+ *
+ * If %G_TLS_INTERACTION_HANDLED is returned, then the #GTlsPassword passed
+ * to g_tls_interaction_ask_password() will have its password filled in.
+ *
+ * If the interaction is cancelled by the cancellation object, or by the
+ * user then %G_TLS_INTERACTION_FAILED will be returned with an error that
+ * contains a %G_IO_ERROR_CANCELLED error code.
+ *
+ * Returns: The status of the ask password interaction.
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_interaction_invoke_ask_password:
+ * @interaction: a #GTlsInteraction object
+ * @password: a #GTlsPassword object
+ * @cancellable: an optional #GCancellable cancellation object
+ * @error: an optional location to place an error on failure
+ *
+ * Invoke the interaction to ask the user for a password. It invokes this
+ * interaction in the main loop, specifically the #GMainContext returned by
+ * g_main_context_get_thread_default() when the interaction is created. This
+ * is called by called by #GTlsConnection or #GTlsDatabase to ask the user
+ * for a password.
+ *
+ * Derived subclasses usually implement a password prompt, although they may
+ * also choose to provide a password from elsewhere. The @password value will
+ * be filled in and then @callback will be called. Alternatively the user may
+ * abort this password request, which will usually abort the TLS connection.
+ *
+ * The implementation can either be a synchronous (eg: modal dialog) or an
+ * asynchronous one (eg: modeless dialog). This function will take care of
+ * calling which ever one correctly.
+ *
+ * If the interaction is cancelled by the cancellation object, or by the
+ * user then %G_TLS_INTERACTION_FAILED will be returned with an error that
+ * contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may
+ * not support immediate cancellation.
+ *
+ * Returns: The status of the ask password interaction.
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_password_get_description:
+ * @password: a #GTlsPassword object
+ *
+ * Get a description string about what the password will be used for.
+ *
+ * Returns: The description of the password.
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_password_get_flags:
+ * @password: a #GTlsPassword object
+ *
+ * Get flags about the password.
+ *
+ * Returns: The flags about the password.
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_password_get_value:
+ * @password: a #GTlsPassword object
+ * @length: (allow-none): location to place the length of the password.
+ *
+ * Get the password value. If @length is not %NULL then it will be
+ * filled in with the length of the password value. (Note that the
+ * password value is not nul-terminated, so you can only pass %NULL
+ * for @length in contexts where you know the password will have a
+ * certain fixed length.)
+ *
+ * Returns: The password value (owned by the password object).
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_password_get_warning:
+ * @password: a #GTlsPassword object
+ *
+ * Get a user readable translated warning. Usually this warning is a
+ * representation of the password flags returned from
+ * g_tls_password_get_flags().
+ *
+ * Returns: The warning.
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_password_new:
+ * @flags: the password flags
+ * @description: description of what the password is for
+ *
+ * Create a new #GTlsPassword object.
+ *
+ * Returns: (transfer full): The newly allocated password object
+ */
+
+
+/**
+ * g_tls_password_set_description:
+ * @password: a #GTlsPassword object
+ * @description: The description of the password
+ *
+ * Set a description string about what the password will be used for.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_password_set_flags:
+ * @password: a #GTlsPassword object
+ * @flags: The flags about the password
+ *
+ * Set flags about the password.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_password_set_value:
+ * @password: a #GTlsPassword object
+ * @value: the new password value
+ * @length: the length of the password, or -1
+ *
+ * Set the value for this password. The @value will be copied by the password
+ * object.
+ *
+ * Specify the @length, for a non-nul-terminated password. Pass -1 as
+ * @length if using a nul-terminated password, and @length will be
+ * calculated automatically. (Note that the terminating nul is not
+ * considered part of the password in this case.)
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_password_set_value_full:
+ * @password: a #GTlsPassword object
+ * @value: the value for the password
+ * @length: the length of the password, or -1
+ * @destroy: (allow-none): a function to use to free the password.
+ *
+ * Provide the value for this password.
+ *
+ * The @value will be owned by the password object, and later freed using
+ * the @destroy function callback.
+ *
+ * Specify the @length, for a non-nul-terminated password. Pass -1 as
+ * @length if using a nul-terminated password, and @length will be
+ * calculated automatically. (Note that the terminating nul is not
+ * considered part of the password in this case.)
+ *
+ * Virtual: set_value
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_password_set_warning:
+ * @password: a #GTlsPassword object
+ * @warning: The user readable warning
+ *
+ * Set a user readable translated warning. Usually this warning is a
+ * representation of the password flags returned from
+ * g_tls_password_get_flags().
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_tls_server_connection_new:
+ * @base_io_stream: the #GIOStream to wrap
+ * @certificate: (allow-none): the default server certificate, or %NULL
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Creates a new #GTlsServerConnection wrapping @base_io_stream (which
+ * must have pollable input and output streams).
+ *
+ * #GTlsServerConnection, or %NULL on error
+ *
+ * Returns: (transfer full) (type GTlsServerConnection): the new
+ * Since: 2.28
+ */
+
+
+/**
+ * g_try_new:
+ * @struct_type: the type of the elements to allocate
+ * @n_structs: the number of elements to allocate
+ *
+ * Attempts to allocate @n_structs elements of type @struct_type, and returns
+ * %NULL on failure. Contrast with g_new(), which aborts the program on failure.
+ * The returned pointer is cast to a pointer to the given type.
+ * The function returns %NULL when @n_structs is 0 of if an overflow occurs.
+ *
+ * Since: 2.8
+ * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
+ */
+
+
+/**
+ * g_try_new0:
+ * @struct_type: the type of the elements to allocate
+ * @n_structs: the number of elements to allocate
+ *
+ * Attempts to allocate @n_structs elements of type @struct_type, initialized
+ * to 0's, and returns %NULL on failure. Contrast with g_new0(), which aborts
+ * the program on failure.
+ * The returned pointer is cast to a pointer to the given type.
+ * The function returns %NULL when @n_structs is 0 of if an overflow occurs.
+ *
+ * Since: 2.8
+ * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
+ */
+
+
+/**
+ * g_try_renew:
+ * @struct_type: the type of the elements to allocate
+ * @mem: the currently allocated memory
+ * @n_structs: the number of elements to allocate
+ *
+ * Attempts to reallocate the memory pointed to by @mem, so that it now has
+ * space for @n_structs elements of type @struct_type, and returns %NULL on
+ * failure. Contrast with g_renew(), which aborts the program on failure.
+ * It returns the new address of the memory, which may have been moved.
+ * The function returns %NULL if an overflow occurs.
+ *
+ * Since: 2.8
+ * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
+ */
+
+
+/**
+ * g_unix_connection_receive_credentials:
+ * @connection: A #GUnixConnection.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Receives credentials from the sending end of the connection.  The
+ * sending end has to call g_unix_connection_send_credentials() (or
+ * similar) for this to work.
+ *
+ * As well as reading the credentials this also reads (and discards) a
+ * single byte from the stream, as this is required for credentials
+ * passing to work on some implementations.
+ *
+ * Other ways to exchange credentials with a foreign peer includes the
+ * #GUnixCredentialsMessage type and g_socket_get_credentials() function.
+ *
+ * g_object_unref()), %NULL if @error is set.
+ *
+ * Returns: (transfer full): Received credentials on success (free with
+ * Since: 2.26
+ */
+
+
+/**
+ * g_unix_connection_receive_credentials_async:
+ * @connection: A #GUnixConnection.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Asynchronously receive credentials.
+ *
+ * For more details, see g_unix_connection_receive_credentials() which is
+ * the synchronous version of this call.
+ *
+ * When the operation is finished, @callback will be called. You can then call
+ * g_unix_connection_receive_credentials_finish() to get the result of the operation.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_unix_connection_receive_credentials_finish:
+ * @connection: A #GUnixConnection.
+ * @result: a #GAsyncResult.
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous receive credentials operation started with
+ * g_unix_connection_receive_credentials_async().
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GCredentials, or %NULL on error.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_unix_connection_receive_fd:
+ * @connection: a #GUnixConnection
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
+ * @error: (allow-none): #GError for error reporting, or %NULL to ignore
+ *
+ * Receives a file descriptor from the sending end of the connection.
+ * The sending end has to call g_unix_connection_send_fd() for this
+ * to work.
+ *
+ * As well as reading the fd this also reads a single byte from the
+ * stream, as this is required for fd passing to work on some
+ * implementations.
+ *
+ * Returns: a file descriptor on success, -1 on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_unix_connection_send_credentials:
+ * @connection: A #GUnixConnection.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Passes the credentials of the current user the receiving side
+ * of the connection. The receiving end has to call
+ * g_unix_connection_receive_credentials() (or similar) to accept the
+ * credentials.
+ *
+ * As well as sending the credentials this also writes a single NUL
+ * byte to the stream, as this is required for credentials passing to
+ * work on some implementations.
+ *
+ * Other ways to exchange credentials with a foreign peer includes the
+ * #GUnixCredentialsMessage type and g_socket_get_credentials() function.
+ *
+ * Returns: %TRUE on success, %FALSE if @error is set.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_unix_connection_send_credentials_async:
+ * @connection: A #GUnixConnection.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Asynchronously send credentials.
+ *
+ * For more details, see g_unix_connection_send_credentials() which is
+ * the synchronous version of this call.
+ *
+ * When the operation is finished, @callback will be called. You can then call
+ * g_unix_connection_send_credentials_finish() to get the result of the operation.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_unix_connection_send_credentials_finish:
+ * @connection: A #GUnixConnection.
+ * @result: a #GAsyncResult.
+ * @error: a #GError, or %NULL
+ *
+ * Finishes an asynchronous send credentials operation started with
+ * g_unix_connection_send_credentials_async().
+ *
+ * Returns: %TRUE if the operation was successful, otherwise %FALSE.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_unix_connection_send_fd:
+ * @connection: a #GUnixConnection
+ * @fd: a file descriptor
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @error: (allow-none): #GError for error reporting, or %NULL to ignore.
+ *
+ * Passes a file descriptor to the receiving side of the
+ * connection. The receiving end has to call g_unix_connection_receive_fd()
+ * to accept the file descriptor.
+ *
+ * As well as sending the fd this also writes a single byte to the
+ * stream, as this is required for fd passing to work on some
+ * implementations.
+ *
+ * Returns: a %TRUE on success, %NULL on error.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_unix_credentials_message_get_credentials:
+ * @message: A #GUnixCredentialsMessage.
+ *
+ * Gets the credentials stored in @message.
+ *
+ * Returns: (transfer none): A #GCredentials instance. Do not free, it is owned by @message.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_unix_credentials_message_is_supported:
+ *
+ * Checks if passing #GCredentials on a #GSocket is supported on this platform.
+ *
+ * Returns: %TRUE if supported, %FALSE otherwise
+ * Since: 2.26
+ */
+
+
+/**
+ * g_unix_credentials_message_new:
+ *
+ * Creates a new #GUnixCredentialsMessage with credentials matching the current processes.
+ *
+ * Returns: a new #GUnixCredentialsMessage
+ * Since: 2.26
+ */
+
+
+/**
+ * g_unix_credentials_message_new_with_credentials:
+ * @credentials: A #GCredentials object.
+ *
+ * Creates a new #GUnixCredentialsMessage holding @credentials.
+ *
+ * Returns: a new #GUnixCredentialsMessage
+ * Since: 2.26
+ */
+
+
+/**
+ * g_unix_fd_list_append:
+ * @list: a #GUnixFDList
+ * @fd: a valid open file descriptor
+ * @error: a #GError pointer
+ *
+ * Adds a file descriptor to @list.
+ *
+ * The file descriptor is duplicated using dup(). You keep your copy
+ * of the descriptor and the copy contained in @list will be closed
+ * when @list is finalized.
+ *
+ * A possible cause of failure is exceeding the per-process or
+ * system-wide file descriptor limit.
+ *
+ * The index of the file descriptor in the list is returned.  If you use
+ * this index with g_unix_fd_list_get() then you will receive back a
+ * duplicated copy of the same file descriptor.
+ *
+ * (and @error is set)
+ *
+ * Returns: the index of the appended fd in case of success, else -1
+ * Since: 2.24
+ */
+
+
+/**
+ * g_unix_fd_list_get:
+ * @list: a #GUnixFDList
+ * @index_: the index into the list
+ * @error: a #GError pointer
+ *
+ * Gets a file descriptor out of @list.
+ *
+ * @index_ specifies the index of the file descriptor to get.  It is a
+ * programmer error for @index_ to be out of range; see
+ * g_unix_fd_list_get_length().
+ *
+ * The file descriptor is duplicated using dup() and set as
+ * close-on-exec before being returned.  You must call close() on it
+ * when you are done.
+ *
+ * A possible cause of failure is exceeding the per-process or
+ * system-wide file descriptor limit.
+ *
+ * Returns: the file descriptor, or -1 in case of error
+ * Since: 2.24
+ */
+
+
+/**
+ * g_unix_fd_list_get_length:
+ * @list: a #GUnixFDList
+ *
+ * Gets the length of @list (ie: the number of file descriptors
+ * contained within).
+ *
+ * Returns: the length of @list
+ * Since: 2.24
+ */
+
+
+/**
+ * g_unix_fd_list_new:
+ *
+ * Creates a new #GUnixFDList containing no file descriptors.
+ *
+ * Returns: a new #GUnixFDList
+ * Since: 2.24
+ */
+
+
+/**
+ * g_unix_fd_list_new_from_array:
+ * @fds: (array length=n_fds): the initial list of file descriptors
+ * @n_fds: the length of #fds, or -1
+ *
+ * Creates a new #GUnixFDList containing the file descriptors given in
+ * @fds.  The file descriptors become the property of the new list and
+ * may no longer be used by the caller.  The array itself is owned by
+ * the caller.
+ *
+ * Each file descriptor in the array should be set to close-on-exec.
+ *
+ * If @n_fds is -1 then @fds must be terminated with -1.
+ *
+ * Returns: a new #GUnixFDList
+ * Since: 2.24
+ */
+
+
+/**
+ * g_unix_fd_list_peek_fds:
+ * @list: a #GUnixFDList
+ * @length: (out) (allow-none): pointer to the length of the returned array, or %NULL
+ *
+ * Returns the array of file descriptors that is contained in this
+ * object.
+ *
+ * After this call, the descriptors remain the property of @list.  The
+ * caller must not close them and must not free the array.  The array is
+ * valid only until @list is changed in any way.
+ *
+ * If @length is non-%NULL then it is set to the number of file
+ * descriptors in the returned array. The returned array is also
+ * terminated with -1.
+ *
+ * This function never returns %NULL. In case there are no file
+ * descriptors contained in @list, an empty array is returned.
+ *
+ * descriptors
+ *
+ * Returns: (array length=length) (transfer none): an array of file
+ * Since: 2.24
+ */
+
+
+/**
+ * g_unix_fd_list_steal_fds:
+ * @list: a #GUnixFDList
+ * @length: (out) (allow-none): pointer to the length of the returned array, or %NULL
+ *
+ * Returns the array of file descriptors that is contained in this
+ * object.
+ *
+ * After this call, the descriptors are no longer contained in
+ * @list. Further calls will return an empty list (unless more
+ * descriptors have been added).
+ *
+ * The return result of this function must be freed with g_free().
+ * The caller is also responsible for closing all of the file
+ * descriptors.  The file descriptors in the array are set to
+ * close-on-exec.
+ *
+ * If @length is non-%NULL then it is set to the number of file
+ * descriptors in the returned array. The returned array is also
+ * terminated with -1.
+ *
+ * This function never returns %NULL. In case there are no file
+ * descriptors contained in @list, an empty array is returned.
+ *
+ * descriptors
+ *
+ * Returns: (array length=length) (transfer full): an array of file
+ * Since: 2.24
+ */
+
+
+/**
+ * g_unix_fd_message_append_fd:
+ * @message: a #GUnixFDMessage
+ * @fd: a valid open file descriptor
+ * @error: a #GError pointer
+ *
+ * Adds a file descriptor to @message.
+ *
+ * The file descriptor is duplicated using dup(). You keep your copy
+ * of the descriptor and the copy contained in @message will be closed
+ * when @message is finalized.
+ *
+ * A possible cause of failure is exceeding the per-process or
+ * system-wide file descriptor limit.
+ *
+ * Returns: %TRUE in case of success, else %FALSE (and @error is set)
+ * Since: 2.22
+ */
+
+
+/**
+ * g_unix_fd_message_get_fd_list:
+ * @message: a #GUnixFDMessage
+ *
+ * Gets the #GUnixFDList contained in @message.  This function does not
+ * return a reference to the caller, but the returned list is valid for
+ * the lifetime of @message.
+ *
+ * Returns: (transfer none): the #GUnixFDList from @message
+ * Since: 2.24
+ */
+
+
+/**
+ * g_unix_fd_message_new:
+ *
+ * Creates a new #GUnixFDMessage containing an empty file descriptor
+ * list.
+ *
+ * Returns: a new #GUnixFDMessage
+ * Since: 2.22
+ */
+
+
+/**
+ * g_unix_fd_message_new_with_fd_list:
+ * @fd_list: a #GUnixFDList
+ *
+ * Creates a new #GUnixFDMessage containing @list.
+ *
+ * Returns: a new #GUnixFDMessage
+ * Since: 2.24
+ */
+
+
+/**
+ * g_unix_fd_message_steal_fds:
+ * @message: a #GUnixFDMessage
+ * @length: (out) (allow-none): pointer to the length of the returned array, or %NULL
+ *
+ * Returns the array of file descriptors that is contained in this
+ * object.
+ *
+ * After this call, the descriptors are no longer contained in
+ * @message. Further calls will return an empty list (unless more
+ * descriptors have been added).
+ *
+ * The return result of this function must be freed with g_free().
+ * The caller is also responsible for closing all of the file
+ * descriptors.
+ *
+ * If @length is non-%NULL then it is set to the number of file
+ * descriptors in the returned array. The returned array is also
+ * terminated with -1.
+ *
+ * This function never returns %NULL. In case there are no file
+ * descriptors contained in @message, an empty array is returned.
+ *
+ * descriptors
+ *
+ * Returns: (array length=length) (transfer full): an array of file
+ * Since: 2.22
+ */
+
+
+/**
+ * g_unix_input_stream_get_close_fd:
+ * @stream: a #GUnixInputStream
+ *
+ * Returns whether the file descriptor of @stream will be
+ * closed when the stream is closed.
+ *
+ * Returns: %TRUE if the file descriptor is closed when done
+ * Since: 2.20
+ */
+
+
+/**
+ * g_unix_input_stream_get_fd:
+ * @stream: a #GUnixInputStream
+ *
+ * Return the UNIX file descriptor that the stream reads from.
+ *
+ * Returns: The file descriptor of @stream
+ * Since: 2.20
+ */
+
+
+/**
+ * g_unix_input_stream_new:
+ * @fd: a UNIX file descriptor
+ * @close_fd: %TRUE to close the file descriptor when done
+ *
+ * Creates a new #GUnixInputStream for the given @fd.
+ *
+ * If @close_fd is %TRUE, the file descriptor will be closed
+ * when the stream is closed.
+ *
+ * Returns: a new #GUnixInputStream
+ */
+
+
+/**
+ * g_unix_input_stream_set_close_fd:
+ * @stream: a #GUnixInputStream
+ * @close_fd: %TRUE to close the file descriptor when done
+ *
+ * Sets whether the file descriptor of @stream shall be closed
+ * when the stream is closed.
+ *
+ * Since: 2.20
+ */
+
+
+/**
+ * g_unix_is_mount_path_system_internal:
+ * @mount_path: a mount path, e.g. <filename>/media/disk</filename> or <filename>/usr</filename>
+ *
+ * Determines if @mount_path is considered an implementation of the
+ * OS. This is primarily used for hiding mountable and mounted volumes
+ * that only are used in the OS and has little to no relevance to the
+ * casual user.
+ *
+ * of the OS.
+ *
+ * Returns: %TRUE if @mount_path is considered an implementation detail
+ */
+
+
+/**
+ * g_unix_mount_at: (skip)
+ * @mount_path: path for a possible unix mount.
+ * @time_read: (out) (allow-none): guint64 to contain a timestamp.
+ *
+ * Gets a #GUnixMountEntry for a given mount path. If @time_read
+ * is set, it will be filled with a unix timestamp for checking
+ * if the mounts have changed since with g_unix_mounts_changed_since().
+ *
+ * Returns: (transfer full): a #GUnixMountEntry.
+ */
+
+
+/**
+ * g_unix_mount_compare:
+ * @mount1: first #GUnixMountEntry to compare.
+ * @mount2: second #GUnixMountEntry to compare.
+ *
+ * Compares two unix mounts.
+ *
+ * or less than @mount2, respectively.
+ *
+ * Returns: 1, 0 or -1 if @mount1 is greater than, equal to,
+ */
+
+
+/**
+ * g_unix_mount_free:
+ * @mount_entry: a #GUnixMountEntry.
+ *
+ * Frees a unix mount.
+ */
+
+
+/**
+ * g_unix_mount_get_device_path:
+ * @mount_entry: a #GUnixMount.
+ *
+ * Gets the device path for a unix mount.
+ *
+ * Returns: a string containing the device path.
+ */
+
+
+/**
+ * g_unix_mount_get_fs_type:
+ * @mount_entry: a #GUnixMount.
+ *
+ * Gets the filesystem type for the unix mount.
+ *
+ * Returns: a string containing the file system type.
+ */
+
+
+/**
+ * g_unix_mount_get_mount_path:
+ * @mount_entry: input #GUnixMountEntry to get the mount path for.
+ *
+ * Gets the mount path for a unix mount.
+ *
+ * Returns: the mount path for @mount_entry.
+ */
+
+
+/**
+ * g_unix_mount_guess_can_eject:
+ * @mount_entry: a #GUnixMountEntry
+ *
+ * Guesses whether a Unix mount can be ejected.
+ *
+ * Returns: %TRUE if @mount_entry is deemed to be ejectable.
+ */
+
+
+/**
+ * g_unix_mount_guess_icon:
+ * @mount_entry: a #GUnixMountEntry
+ *
+ * Guesses the icon of a Unix mount.
+ *
+ * Returns: (transfer full): a #GIcon
+ */
+
+
+/**
+ * g_unix_mount_guess_name:
+ * @mount_entry: a #GUnixMountEntry
+ *
+ * Guesses the name of a Unix mount.
+ * The result is a translated string.
+ *
+ * be freed with g_free()
+ *
+ * Returns: A newly allocated string that must
+ */
+
+
+/**
+ * g_unix_mount_guess_should_display:
+ * @mount_entry: a #GUnixMountEntry
+ *
+ * Guesses whether a Unix mount should be displayed in the UI.
+ *
+ * Returns: %TRUE if @mount_entry is deemed to be displayable.
+ */
+
+
+/**
+ * g_unix_mount_is_readonly:
+ * @mount_entry: a #GUnixMount.
+ *
+ * Checks if a unix mount is mounted read only.
+ *
+ * Returns: %TRUE if @mount_entry is read only.
+ */
+
+
+/**
+ * g_unix_mount_is_system_internal:
+ * @mount_entry: a #GUnixMount.
+ *
+ * Checks if a unix mount is a system path.
+ *
+ * Returns: %TRUE if the unix mount is for a system path.
+ */
+
+
+/**
+ * g_unix_mount_monitor_new:
+ *
+ * Gets a new #GUnixMountMonitor. The default rate limit for which the
+ * monitor will report consecutive changes for the mount and mount
+ * point entry files is the default for a #GFileMonitor. Use
+ * g_unix_mount_monitor_set_rate_limit() to change this.
+ *
+ * Returns: a #GUnixMountMonitor.
+ */
+
+
+/**
+ * g_unix_mount_monitor_set_rate_limit:
+ * @mount_monitor: a #GUnixMountMonitor
+ * @limit_msec: a integer with the limit in milliseconds to poll for changes.
+ *
+ * Sets the rate limit to which the @mount_monitor will report
+ * consecutive change events to the mount and mount point entry files.
+ *
+ * Since: 2.18
+ */
+
+
+/**
+ * g_unix_mount_point_compare:
+ * @mount1: a #GUnixMount.
+ * @mount2: a #GUnixMount.
+ *
+ * Compares two unix mount points.
+ *
+ * or less than @mount2, respectively.
+ *
+ * Returns: 1, 0 or -1 if @mount1 is greater than, equal to,
+ */
+
+
+/**
+ * g_unix_mount_point_free:
+ * @mount_point: unix mount point to free.
+ *
+ * Frees a unix mount point.
+ */
+
+
+/**
+ * g_unix_mount_point_get_device_path:
+ * @mount_point: a #GUnixMountPoint.
+ *
+ * Gets the device path for a unix mount point.
+ *
+ * Returns: a string containing the device path.
+ */
+
+
+/**
+ * g_unix_mount_point_get_fs_type:
+ * @mount_point: a #GUnixMountPoint.
+ *
+ * Gets the file system type for the mount point.
+ *
+ * Returns: a string containing the file system type.
+ */
+
+
+/**
+ * g_unix_mount_point_get_mount_path:
+ * @mount_point: a #GUnixMountPoint.
+ *
+ * Gets the mount path for a unix mount point.
+ *
+ * Returns: a string containing the mount path.
+ */
+
+
+/**
+ * g_unix_mount_point_get_options:
+ * @mount_point: a #GUnixMountPoint.
+ *
+ * Gets the options for the mount point.
+ *
+ * Returns: a string containing the options.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_unix_mount_point_guess_can_eject:
+ * @mount_point: a #GUnixMountPoint
+ *
+ * Guesses whether a Unix mount point can be ejected.
+ *
+ * Returns: %TRUE if @mount_point is deemed to be ejectable.
+ */
+
+
+/**
+ * g_unix_mount_point_guess_icon:
+ * @mount_point: a #GUnixMountPoint
+ *
+ * Guesses the icon of a Unix mount point.
+ *
+ * Returns: (transfer full): a #GIcon
+ */
+
+
+/**
+ * g_unix_mount_point_guess_name:
+ * @mount_point: a #GUnixMountPoint
+ *
+ * Guesses the name of a Unix mount point.
+ * The result is a translated string.
+ *
+ * be freed with g_free()
+ *
+ * Returns: A newly allocated string that must
+ */
+
+
+/**
+ * g_unix_mount_point_is_loopback:
+ * @mount_point: a #GUnixMountPoint.
+ *
+ * Checks if a unix mount point is a loopback device.
+ *
+ * Returns: %TRUE if the mount point is a loopback. %FALSE otherwise.
+ */
+
+
+/**
+ * g_unix_mount_point_is_readonly:
+ * @mount_point: a #GUnixMountPoint.
+ *
+ * Checks if a unix mount point is read only.
+ *
+ * Returns: %TRUE if a mount point is read only.
+ */
+
+
+/**
+ * g_unix_mount_point_is_user_mountable:
+ * @mount_point: a #GUnixMountPoint.
+ *
+ * Checks if a unix mount point is mountable by the user.
+ *
+ * Returns: %TRUE if the mount point is user mountable.
+ */
+
+
+/**
+ * g_unix_mount_points_changed_since:
+ * @time: guint64 to contain a timestamp.
+ *
+ * Checks if the unix mount points have changed since a given unix time.
+ *
+ * Returns: %TRUE if the mount points have changed since @time.
+ */
+
+
+/**
+ * g_unix_mount_points_get: (skip)
+ * @time_read: (out) (allow-none): guint64 to contain a timestamp.
+ *
+ * Gets a #GList of #GUnixMountPoint containing the unix mount points.
+ * If @time_read is set, it will be filled with the mount timestamp,
+ * allowing for checking if the mounts have changed with
+ * g_unix_mount_points_changed_since().
+ *
+ * a #GList of the UNIX mountpoints.
+ *
+ * Returns: (element-type GUnixMountPoint) (transfer full):
+ */
+
+
+/**
+ * g_unix_mounts_changed_since:
+ * @time: guint64 to contain a timestamp.
+ *
+ * Checks if the unix mounts have changed since a given unix time.
+ *
+ * Returns: %TRUE if the mounts have changed since @time.
+ */
+
+
+/**
+ * g_unix_mounts_get: (skip)
+ * @time_read: (out) (allow-none): guint64 to contain a timestamp, or %NULL
+ *
+ * Gets a #GList of #GUnixMountEntry containing the unix mounts.
+ * If @time_read is set, it will be filled with the mount
+ * timestamp, allowing for checking if the mounts have changed
+ * with g_unix_mounts_changed_since().
+ *
+ * a #GList of the UNIX mounts.
+ *
+ * Returns: (element-type GUnixMountEntry) (transfer full):
+ */
+
+
+/**
+ * g_unix_output_stream_get_close_fd:
+ * @stream: a #GUnixOutputStream
+ *
+ * Returns whether the file descriptor of @stream will be
+ * closed when the stream is closed.
+ *
+ * Returns: %TRUE if the file descriptor is closed when done
+ * Since: 2.20
+ */
+
+
+/**
+ * g_unix_output_stream_get_fd:
+ * @stream: a #GUnixOutputStream
+ *
+ * Return the UNIX file descriptor that the stream writes to.
+ *
+ * Returns: The file descriptor of @stream
+ * Since: 2.20
+ */
+
+
+/**
+ * g_unix_output_stream_new:
+ * @fd: a UNIX file descriptor
+ * @close_fd: %TRUE to close the file descriptor when done
+ *
+ * Creates a new #GUnixOutputStream for the given @fd.
+ *
+ * If @close_fd, is %TRUE, the file descriptor will be closed when
+ * the output stream is destroyed.
+ *
+ * Returns: a new #GOutputStream
+ */
+
+
+/**
+ * g_unix_output_stream_set_close_fd:
+ * @stream: a #GUnixOutputStream
+ * @close_fd: %TRUE to close the file descriptor when done
+ *
+ * Sets whether the file descriptor of @stream shall be closed
+ * when the stream is closed.
+ *
+ * Since: 2.20
+ */
+
+
+/**
+ * g_unix_socket_address_abstract_names_supported:
+ *
+ * Checks if abstract unix domain socket names are supported.
+ *
+ * Returns: %TRUE if supported, %FALSE otherwise
+ * Since: 2.22
+ */
+
+
+/**
+ * g_unix_socket_address_get_address_type:
+ * @address: a #GInetSocketAddress
+ *
+ * Gets @address's type.
+ *
+ * Returns: a #GUnixSocketAddressType
+ * Since: 2.26
+ */
+
+
+/**
+ * g_unix_socket_address_get_is_abstract:
+ * @address: a #GInetSocketAddress
+ *
+ * Tests if @address is abstract.
+ *
+ * Returns: %TRUE if the address is abstract, %FALSE otherwise
+ * Since: 2.22
+ * Deprecated: Use g_unix_socket_address_get_address_type()
+ */
+
+
+/**
+ * g_unix_socket_address_get_path:
+ * @address: a #GInetSocketAddress
+ *
+ * Gets @address's path, or for abstract sockets the "name".
+ *
+ * Guaranteed to be zero-terminated, but an abstract socket
+ * may contain embedded zeros, and thus you should use
+ * g_unix_socket_address_get_path_len() to get the true length
+ * of this string.
+ *
+ * Returns: the path for @address
+ * Since: 2.22
+ */
+
+
+/**
+ * g_unix_socket_address_get_path_len:
+ * @address: a #GInetSocketAddress
+ *
+ * Gets the length of @address's path.
+ *
+ * For details, see g_unix_socket_address_get_path().
+ *
+ * Returns: the length of the path
+ * Since: 2.22
+ */
+
+
+/**
+ * g_unix_socket_address_new:
+ * @path: the socket path
+ *
+ * Creates a new #GUnixSocketAddress for @path.
+ *
+ * To create abstract socket addresses, on systems that support that,
+ * use g_unix_socket_address_new_abstract().
+ *
+ * Returns: a new #GUnixSocketAddress
+ * Since: 2.22
+ */
+
+
+/**
+ * g_unix_socket_address_new_abstract:
+ * @path: (array length=path_len) (element-type gchar): the abstract name
+ * @path_len: the length of @path, or -1
+ *
+ * Creates a new %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED
+ * #GUnixSocketAddress for @path.
+ *
+ * Returns: a new #GUnixSocketAddress
+ * Deprecated: Use g_unix_socket_address_new_with_type().
+ */
+
+
+/**
+ * g_unix_socket_address_new_with_type:
+ * @path: (array length=path_len) (element-type gchar): the name
+ * @path_len: the length of @path, or -1
+ * @type: a #GUnixSocketAddressType
+ *
+ * Creates a new #GUnixSocketAddress of type @type with name @path.
+ *
+ * If @type is %G_UNIX_SOCKET_ADDRESS_PATH, this is equivalent to
+ * calling g_unix_socket_address_new().
+ *
+ * If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT, then @path_len
+ * bytes of @path will be copied to the socket's path, and only those
+ * bytes will be considered part of the name. (If @path_len is -1,
+ * then @path is assumed to be NUL-terminated.) For example, if @path
+ * was "test", then calling g_socket_address_get_native_size() on the
+ * returned socket would return 7 (2 bytes of overhead, 1 byte for the
+ * abstract-socket indicator byte, and 4 bytes for the name "test").
+ *
+ * If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED, then
+ * @path_len bytes of @path will be copied to the socket's path, the
+ * rest of the path will be padded with 0 bytes, and the entire
+ * zero-padded buffer will be considered the name. (As above, if
+ * @path_len is -1, then @path is assumed to be NUL-terminated.) In
+ * this case, g_socket_address_get_native_size() will always return
+ * the full size of a <literal>struct sockaddr_un</literal>, although
+ * g_unix_socket_address_get_path_len() will still return just the
+ * length of @path.
+ *
+ * %G_UNIX_SOCKET_ADDRESS_ABSTRACT is preferred over
+ * %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED for new programs. Of course,
+ * when connecting to a server created by another process, you must
+ * use the appropriate type corresponding to how that process created
+ * its listening socket.
+ *
+ * Returns: a new #GUnixSocketAddress
+ * Since: 2.26
+ */
+
+
+/**
+ * g_utf8_next_char:
+ * @p: Pointer to the start of a valid UTF-8 character
+ *
+ * Skips to the next character in a UTF-8 string. The string must be
+ * valid; this macro is as fast as possible, and has no error-checking.
+ * You would use this macro to iterate over a string character by
+ * character. The macro returns the start of the next UTF-8 character.
+ * Before using this macro, use g_utf8_validate() to validate strings
+ * that may contain invalid UTF-8.
+ */
+
+
+/**
+ * g_vfs_get_default:
+ *
+ * Gets the default #GVfs for the system.
+ *
+ * Returns: (transfer none): a #GVfs.
+ */
+
+
+/**
+ * g_vfs_get_file_for_path:
+ * @vfs: a #GVfs.
+ * @path: a string containing a VFS path.
+ *
+ * Gets a #GFile for @path.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GFile.
+ */
+
+
+/**
+ * g_vfs_get_file_for_uri:
+ * @vfs: a#GVfs.
+ * @uri: a string containing a URI
+ *
+ * Gets a #GFile for @uri.
+ *
+ * This operation never fails, but the returned object
+ * might not support any I/O operation if the URI
+ * is malformed or if the URI scheme is not supported.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GFile.
+ */
+
+
+/**
+ * g_vfs_get_local:
+ *
+ * Gets the local #GVfs for the system.
+ *
+ * Returns: (transfer none): a #GVfs.
+ */
+
+
+/**
+ * g_vfs_get_supported_uri_schemes:
+ * @vfs: a #GVfs.
+ *
+ * Gets a list of URI schemes supported by @vfs.
+ *
+ * The returned array belongs to GIO and must
+ * not be freed or modified.
+ *
+ * Returns: (transfer none): a %NULL-terminated array of strings.
+ */
+
+
+/**
+ * g_vfs_is_active:
+ * @vfs: a #GVfs.
+ *
+ * Checks if the VFS is active.
+ *
+ * Returns: %TRUE if construction of the @vfs was successful and it is now active.
+ */
+
+
+/**
+ * g_vfs_parse_name:
+ * @vfs: a #GVfs.
+ * @parse_name: a string to be parsed by the VFS module.
+ *
+ * This operation never fails, but the returned object might
+ * not support any I/O operations if the @parse_name cannot
+ * be parsed by the #GVfs module.
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GFile for the given @parse_name.
+ */
+
+
+/**
+ * g_volume_can_eject:
+ * @volume: a #GVolume.
+ *
+ * Checks if a volume can be ejected.
+ *
+ * Returns: %TRUE if the @volume can be ejected. %FALSE otherwise.
+ */
+
+
+/**
+ * g_volume_can_mount:
+ * @volume: a #GVolume.
+ *
+ * Checks if a volume can be mounted.
+ *
+ * Returns: %TRUE if the @volume can be mounted. %FALSE otherwise.
+ */
+
+
+/**
+ * g_volume_eject:
+ * @volume: a #GVolume.
+ * @flags: flags affecting the unmount if required for eject
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
+ * @user_data: user data that gets passed to @callback
+ *
+ * Ejects a volume. This is an asynchronous operation, and is
+ * finished by calling g_volume_eject_finish() with the @volume
+ * and #GAsyncResult returned in the @callback.
+ *
+ * Deprecated: 2.22: Use g_volume_eject_with_operation() instead.
+ */
+
+
+/**
+ * g_volume_eject_finish:
+ * @volume: pointer to a #GVolume.
+ * @result: a #GAsyncResult.
+ * @error: a #GError location to store an error, or %NULL to ignore
+ *
+ * Finishes ejecting a volume. If any errors occurred during the operation,
+ * @error will be set to contain the errors and %FALSE will be returned.
+ *
+ * Returns: %TRUE, %FALSE if operation failed.
+ * Deprecated: 2.22: Use g_volume_eject_with_operation_finish() instead.
+ */
+
+
+/**
+ * g_volume_eject_with_operation:
+ * @volume: a #GVolume.
+ * @flags: flags affecting the unmount if required for eject
+ * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
+ * @user_data: user data passed to @callback.
+ *
+ * Ejects a volume. This is an asynchronous operation, and is
+ * finished by calling g_volume_eject_with_operation_finish() with the @volume
+ * and #GAsyncResult data returned in the @callback.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_volume_eject_with_operation_finish:
+ * @volume: a #GVolume.
+ * @result: a #GAsyncResult.
+ * @error: a #GError location to store the error occurring, or %NULL to ignore.
+ *
+ * Finishes ejecting a volume. If any errors occurred during the operation,
+ * @error will be set to contain the errors and %FALSE will be returned.
+ *
+ * Returns: %TRUE if the volume was successfully ejected. %FALSE otherwise.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_volume_enumerate_identifiers:
+ * @volume: a #GVolume
+ *
+ * Gets the kinds of <link linkend="volume-identifier">identifiers</link>
+ * that @volume has. Use g_volume_get_identifier() to obtain
+ * the identifiers themselves.
+ *
+ * of strings containing kinds of identifiers. Use g_strfreev() to free.
+ *
+ * Returns: (array zero-terminated=1) (transfer full): a %NULL-terminated array
+ */
+
+
+/**
+ * g_volume_get_activation_root:
+ * @volume: a #GVolume
+ *
+ * Gets the activation root for a #GVolume if it is known ahead of
+ * mount time. Returns %NULL otherwise. If not %NULL and if @volume
+ * is mounted, then the result of g_mount_get_root() on the
+ * #GMount object obtained from g_volume_get_mount() will always
+ * either be equal or a prefix of what this function returns. In
+ * other words, in code
+ *
+ * <programlisting>
+ * GMount *mount;
+ * GFile *mount_root
+ * GFile *volume_activation_root;
+ *
+ * mount = g_volume_get_mount (volume); /&ast; mounted, so never NULL &ast;/
+ * mount_root = g_mount_get_root (mount);
+ * volume_activation_root = g_volume_get_activation_root(volume); /&ast; assume not NULL &ast;/
+ * </programlisting>
+ *
+ * then the expression
+ *
+ * <programlisting>
+ * (g_file_has_prefix (volume_activation_root, mount_root) ||
+ * </programlisting>
+ *
+ * will always be %TRUE.
+ *
+ * Activation roots are typically used in #GVolumeMonitor
+ * implementations to find the underlying mount to shadow, see
+ * g_mount_is_shadowed() for more details.
+ *
+ * g_object_unref() to free.
+ *
+ * Returns: (transfer full): the activation root of @volume or %NULL. Use
+ * Since: 2.18
+ */
+
+
+/**
+ * g_volume_get_drive:
+ * @volume: a #GVolume.
+ *
+ * Gets the drive for the @volume.
+ *
+ * The returned object should be unreffed with g_object_unref()
+ * when no longer needed.
+ *
+ * Returns: (transfer full): a #GDrive or %NULL if @volume is not associated with a drive.
+ */
+
+
+/**
+ * g_volume_get_icon:
+ * @volume: a #GVolume.
+ *
+ * Gets the icon for @volume.
+ *
+ * The returned object should be unreffed with g_object_unref()
+ * when no longer needed.
+ *
+ * Returns: (transfer full): a #GIcon.
+ */
+
+
+/**
+ * g_volume_get_identifier:
+ * @volume: a #GVolume
+ * @kind: the kind of identifier to return
+ *
+ * Gets the identifier of the given kind for @volume.
+ * See the <link linkend="volume-identifier">introduction</link>
+ * for more information about volume identifiers.
+ *
+ * requested identfier, or %NULL if the #GVolume
+ * doesn't have this kind of identifier
+ *
+ * Returns: a newly allocated string containing the
+ */
+
+
+/**
+ * g_volume_get_mount:
+ * @volume: a #GVolume.
+ *
+ * Gets the mount for the @volume.
+ *
+ * The returned object should be unreffed with g_object_unref()
+ * when no longer needed.
+ *
+ * Returns: (transfer full): a #GMount or %NULL if @volume isn't mounted.
+ */
+
+
+/**
+ * g_volume_get_name:
+ * @volume: a #GVolume.
+ *
+ * Gets the name of @volume.
+ *
+ * be freed with g_free() when no longer needed.
+ *
+ * Returns: the name for the given @volume. The returned string should
+ */
+
+
+/**
+ * g_volume_get_sort_key:
+ * @volume: A #GVolume.
+ *
+ * Gets the sort key for @volume, if any.
+ *
+ * Returns: Sorting key for @volume or %NULL if no such key is available.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_volume_get_uuid:
+ * @volume: a #GVolume.
+ *
+ * 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 %NULL if there is no UUID
+ * available.
+ *
+ * The returned string should be freed with g_free()
+ * when no longer needed.
+ *
+ * Returns: the UUID for @volume or %NULL if no UUID can be computed.
+ */
+
+
+/**
+ * g_volume_monitor_adopt_orphan_mount:
+ * @mount: a #GMount object to find a parent for
+ *
+ * This function should be called by any #GVolumeMonitor
+ * implementation when a new #GMount object is created that is not
+ * associated with a #GVolume object. It must be called just before
+ * emitting the @mount_added signal.
+ *
+ * If the return value is not %NULL, the caller must associate the
+ * returned #GVolume object with the #GMount. This involves returning
+ * it in its g_mount_get_volume() implementation. The caller must
+ * also listen for the "removed" signal on the returned object
+ * and give up its reference when handling that signal
+ *
+ * Similary, if implementing g_volume_monitor_adopt_orphan_mount(),
+ * the implementor must take a reference to @mount and return it in
+ * its g_volume_get_mount() implemented. Also, the implementor must
+ * listen for the "unmounted" signal on @mount and give up its
+ * reference upon handling that signal.
+ *
+ * There are two main use cases for this function.
+ *
+ * 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 its own #GMount object that needs to be
+ * associated with the #GVolume object that represents the volume.
+ *
+ * The other is for implementing a #GVolumeMonitor whose sole purpose
+ * is to return #GVolume objects representing entries in the users
+ * "favorite servers" list or similar.
+ *
+ * if no wants to adopt the #GMount.
+ *
+ * implementations should instead create shadow mounts with the URI of
+ * the mount they intend to adopt. See the proxy volume monitor in
+ * gvfs for an example of this. Also see g_mount_is_shadowed(),
+ * g_mount_shadow() and g_mount_unshadow() functions.
+ *
+ * Returns: (transfer full): the #GVolume object that is the parent for @mount or %NULL
+ * Deprecated: 2.20: Instead of using this function, #GVolumeMonitor
+ */
+
+
+/**
+ * g_volume_monitor_get:
+ *
+ * Gets the volume monitor used by gio.
+ *
+ * g_object_unref() when done with it.
+ *
+ * Returns: (transfer full): a reference to the #GVolumeMonitor used by gio. Call
+ */
+
+
+/**
+ * g_volume_monitor_get_connected_drives:
+ * @volume_monitor: a #GVolumeMonitor.
+ *
+ * Gets a list of drives connected to the system.
+ *
+ * The returned list should be freed with g_list_free(), after
+ * its elements have been unreffed with g_object_unref().
+ *
+ * Returns: (element-type GDrive) (transfer full): a #GList of connected #GDrive objects.
+ */
+
+
+/**
+ * g_volume_monitor_get_mount_for_uuid:
+ * @volume_monitor: a #GVolumeMonitor.
+ * @uuid: the UUID to look for
+ *
+ * Finds a #GMount object by its UUID (see g_mount_get_uuid())
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GMount or %NULL if no such mount is available.
+ */
+
+
+/**
+ * g_volume_monitor_get_mounts:
+ * @volume_monitor: a #GVolumeMonitor.
+ *
+ * Gets a list of the mounts on the system.
+ *
+ * The returned list should be freed with g_list_free(), after
+ * its elements have been unreffed with g_object_unref().
+ *
+ * Returns: (element-type GMount) (transfer full): a #GList of #GMount objects.
+ */
+
+
+/**
+ * g_volume_monitor_get_volume_for_uuid:
+ * @volume_monitor: a #GVolumeMonitor.
+ * @uuid: the UUID to look for
+ *
+ * Finds a #GVolume object by its UUID (see g_volume_get_uuid())
+ *
+ * Free the returned object with g_object_unref().
+ *
+ * Returns: (transfer full): a #GVolume or %NULL if no such volume is available.
+ */
+
+
+/**
+ * g_volume_monitor_get_volumes:
+ * @volume_monitor: a #GVolumeMonitor.
+ *
+ * Gets a list of the volumes on the system.
+ *
+ * The returned list should be freed with g_list_free(), after
+ * its elements have been unreffed with g_object_unref().
+ *
+ * Returns: (element-type GVolume) (transfer full): a #GList of #GVolume objects.
+ */
+
+
+/**
+ * g_volume_mount:
+ * @volume: a #GVolume.
+ * @flags: flags affecting the operation
+ * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
+ * @user_data: user data that gets passed to @callback
+ *
+ * Mounts a volume. This is an asynchronous operation, and is
+ * finished by calling g_volume_mount_finish() with the @volume
+ * and #GAsyncResult returned in the @callback.
+ *
+ * Virtual: mount_fn
+ */
+
+
+/**
+ * g_volume_mount_finish:
+ * @volume: a #GVolume
+ * @result: a #GAsyncResult
+ * @error: a #GError location to store an error, or %NULL to ignore
+ *
+ * Finishes mounting a volume. If any errors occurred during the operation,
+ * @error will be set to contain the errors and %FALSE will be returned.
+ *
+ * If the mount operation succeeded, g_volume_get_mount() 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
+ * #GVolumeMonitor.
+ *
+ * Returns: %TRUE, %FALSE if operation failed.
+ */
+
+
+/**
+ * g_volume_should_automount:
+ * @volume: a #GVolume
+ *
+ * Returns whether the volume should be automatically mounted.
+ *
+ * Returns: %TRUE if the volume should be automatically mounted.
+ */
+
+
+/**
+ * g_warn_if_fail:
+ * @expr: the expression to check
+ *
+ * Logs a warning if the expression is not true.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_warn_if_reached:
+ *
+ * Logs a critical warning.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_win32_input_stream_get_close_handle:
+ * @stream: a #GWin32InputStream
+ *
+ * Returns whether the handle of @stream will be
+ * closed when the stream is closed.
+ *
+ * Returns: %TRUE if the handle is closed when done
+ * Since: 2.26
+ */
+
+
+/**
+ * g_win32_input_stream_get_handle:
+ * @stream: a #GWin32InputStream
+ *
+ * Return the Windows file handle that the stream reads from.
+ *
+ * Returns: The file handle of @stream
+ * Since: 2.26
+ */
+
+
+/**
+ * g_win32_input_stream_new:
+ * @handle: a Win32 file handle
+ * @close_handle: %TRUE to close the handle when done
+ *
+ * Creates a new #GWin32InputStream for the given @handle.
+ *
+ * If @close_handle is %TRUE, the handle will be closed
+ * when the stream is closed.
+ *
+ * Note that "handle" here means a Win32 HANDLE, not a "file descriptor"
+ * as used in the Windows C libraries.
+ *
+ * Returns: a new #GWin32InputStream
+ */
+
+
+/**
+ * g_win32_input_stream_set_close_handle:
+ * @stream: a #GWin32InputStream
+ * @close_handle: %TRUE to close the handle when done
+ *
+ * Sets whether the handle of @stream shall be closed
+ * when the stream is closed.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_win32_output_stream_get_close_handle:
+ * @stream: a #GWin32OutputStream
+ *
+ * Returns whether the handle of @stream will be closed when the
+ * stream is closed.
+ *
+ * Returns: %TRUE if the handle is closed when done
+ * Since: 2.26
+ */
+
+
+/**
+ * g_win32_output_stream_get_handle:
+ * @stream: a #GWin32OutputStream
+ *
+ * Return the Windows handle that the stream writes to.
+ *
+ * Returns: The handle descriptor of @stream
+ * Since: 2.26
+ */
+
+
+/**
+ * g_win32_output_stream_new:
+ * @handle: a Win32 file handle
+ * @close_handle: %TRUE to close the handle when done
+ *
+ * Creates a new #GWin32OutputStream for the given @handle.
+ *
+ * If @close_handle, is %TRUE, the handle will be closed when the
+ * output stream is destroyed.
+ *
+ * Returns: a new #GOutputStream
+ * Since: 2.26
+ */
+
+
+/**
+ * g_win32_output_stream_set_close_handle:
+ * @stream: a #GWin32OutputStream
+ * @close_handle: %TRUE to close the handle when done
+ *
+ * Sets whether the handle of @stream shall be closed when the stream
+ * is closed.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_zlib_compressor_get_file_info:
+ * @compressor: a #GZlibCompressor
+ *
+ * Returns the #GZlibCompressor:file-info property.
+ *
+ * Returns: (transfer none): a #GFileInfo, or %NULL
+ * Since: 2.26
+ */
+
+
+/**
+ * g_zlib_compressor_new:
+ * @format: The format to use for the compressed data
+ * @level: compression level (0-9), -1 for default
+ *
+ * Creates a new #GZlibCompressor.
+ *
+ * Returns: a new #GZlibCompressor
+ * Since: 2.24
+ */
+
+
+/**
+ * g_zlib_compressor_set_file_info:
+ * @compressor: a #GZlibCompressor
+ * @file_info: (allow-none): a #GFileInfo
+ *
+ * Sets @file_info in @compressor. If non-%NULL, and @compressor's
+ * #GZlibCompressor:format property is %G_ZLIB_COMPRESSOR_FORMAT_GZIP,
+ * it will be used to set the file name and modification time in
+ * the GZIP header of the compressed data.
+ *
+ * Note: it is an error to call this function while a compression is in
+ * progress; it may only be called immediately after creation of @compressor,
+ * or after resetting it with g_converter_reset().
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_zlib_decompressor_get_file_info:
+ * @decompressor: a #GZlibDecompressor
+ *
+ * Retrieves the #GFileInfo constructed from the GZIP header data
+ * of compressed data processed by @compressor, or %NULL if @decompressor's
+ * #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP,
+ * or the header data was not fully processed yet, or it not present in the
+ * data stream at all.
+ *
+ * Returns: (transfer none): a #GFileInfo, or %NULL
+ * Since: 2.26
+ */
+
+
+/**
+ * g_zlib_decompressor_new:
+ * @format: The format to use for the compressed data
+ *
+ * Creates a new #GZlibDecompressor.
+ *
+ * Returns: a new #GZlibDecompressor
+ * Since: 2.24
+ */
+
+
+/**
+ * gchararray:
+ *
+ * A C representable type name for #G_TYPE_STRING.
+ */
+
+
+/**
+ * get_all_desktop_entries_for_mime_type:
+ * @mime_type: a mime type.
+ * @except: NULL or a strv list
+ *
+ * Returns all the desktop ids for @mime_type. The desktop files
+ * are listed in an order so that default applications are listed before
+ * non-default ones, and handlers for inherited mimetypes are listed
+ * after the base ones.
+ *
+ * Optionally doesn't list the desktop ids given in the @except
+ *
+ * to handle @mime_type.
+ *
+ * Returns: a #GList containing the desktop ids which claim
+ */
+
+
+/**
+ * gunichar:
+ *
+ * A type which can hold any UTF-32 or UCS-4 character code,
+ * also known as a Unicode code point.
+ *
+ * If you want to produce the UTF-8 representation of a #gunichar,
+ * use g_ucs4_to_utf8(). See also g_utf8_to_ucs4() for the reverse
+ * process.
+ *
+ * To print/scan values of this type as integer, use
+ * %G_GINT32_MODIFIER and/or %G_GUINT32_FORMAT.
+ *
+ * The notation to express a Unicode code point in running text is
+ * as a hexadecimal number with four to six digits and uppercase
+ * letters, prefixed by the string "U+". Leading zeros are omitted,
+ * unless the code point would have fewer than four hexadecimal digits.
+ * For example, "U+0041 LATIN CAPITAL LETTER A". To print a code point
+ * in the U+-notation, use the format string "U+\%04"G_GINT32_FORMAT"X".
+ * To scan, use the format string "U+\%06"G_GINT32_FORMAT"X".
+ *
+ * |[
+ * gunichar c;
+ * sscanf ("U+0041", "U+%06"G_GINT32_FORMAT"X", &amp;c)
+ * g_print ("Read U+%04"G_GINT32_FORMAT"X", c);
+ * ]|
+ */
+
+
+/**
+ * gunichar2:
+ *
+ * A type which can hold any UTF-16 code
+ * point<footnote id="utf16_surrogate_pairs">UTF-16 also has so called
+ * <firstterm>surrogate pairs</firstterm> to encode characters beyond
+ * the BMP as pairs of 16bit numbers. Surrogate pairs cannot be stored
+ * in a single gunichar2 field, but all GLib functions accepting gunichar2
+ * arrays will correctly interpret surrogate pairs.</footnote>.
+ *
+ * To print/scan values of this type to/from text you need to convert
+ * to/from UTF-8, using g_utf16_to_utf8()/g_utf8_to_utf16().
+ *
+ * To print/scan values of this type as integer, use
+ * %G_GINT16_MODIFIER and/or %G_GUINT16_FORMAT.
+ */
+
+
+/**
+ * mime_info_cache_reload:
+ * @dir: directory path which needs reloading.
+ *
+ * Reload the mime information for the @dir.
+ */
+
+
+
+/************************************************************/
+/* THIS FILE IS GENERATED DO NOT EDIT */
+/************************************************************/
diff --git a/gir/glib-2.0.c b/gir/glib-2.0.c
new file mode 100644 (file)
index 0000000..cff5259
--- /dev/null
@@ -0,0 +1,39757 @@
+/************************************************************/
+/* THIS FILE IS GENERATED DO NOT EDIT */
+/************************************************************/
+
+/**
+ * ABS:
+ * @a: a numeric value
+ *
+ * Calculates the absolute value of @a.
+ * The absolute value is simply the number with any negative sign taken away.
+ *
+ * For example,
+ * - ABS(-10) is 10.
+ * - ABS(10) is also 10.
+ *
+ * Returns: the absolute value of @a.
+ */
+
+
+/**
+ * CLAMP:
+ * @x: the value to clamp
+ * @low: the minimum value allowed
+ * @high: the maximum value allowed
+ *
+ * Ensures that @x is between the limits set by @low and @high. If @low is
+ * greater than @high the result is undefined.
+ *
+ * For example,
+ * - CLAMP(5, 10, 15) is 10.
+ * - CLAMP(15, 5, 10) is 10.
+ * - CLAMP(20, 15, 25) is 20.
+ *
+ * Returns: the value of @x clamped to the range between @low and @high
+ */
+
+
+/**
+ * C_:
+ * @Context: a message context, must be a string literal
+ * @String: a message id, must be a string literal
+ *
+ * Uses gettext to get the translation for @String. @Context is
+ * used as a context. This is mainly useful for short strings which
+ * may need different translations, depending on the context in which
+ * they are used.
+ * |[
+ * label1 = C_("Navigation", "Back");
+ * label2 = C_("Body part", "Back");
+ * ]|
+ *
+ * <note><para>If you are using the C_() macro, you need to make sure
+ * that you pass <option>--keyword=C_:1c,2</option> to xgettext when
+ * extracting messages. Note that this only works with GNU
+ * gettext >= 0.15.</para></note>
+ *
+ * Returns: the translated message
+ * Since: 2.16
+ */
+
+
+/**
+ * FALSE:
+ *
+ * Defines the %FALSE value for the #gboolean type.
+ */
+
+
+/**
+ * GArray:
+ * @data: a pointer to the element data. The data may be moved as elements are added to the #GArray.
+ * @len: the number of elements in the #GArray not including the possible terminating zero element.
+ *
+ * Contains the public fields of an <link linkend="glib-Arrays">Array</link>.
+ */
+
+
+/**
+ * GAsyncQueue:
+ *
+ * The GAsyncQueue struct is an opaque data structure which represents
+ * an asynchronous queue. It should only be accessed through the
+ * <function>g_async_queue_*</function> functions.
+ */
+
+
+/**
+ * GBaseFinalizeFunc:
+ * @g_class: The #GTypeClass structure to finalize.
+ *
+ * A callback function used by the type system to finalize those portions
+ * of a derived types class structure that were setup from the corresponding
+ * GBaseInitFunc() function. Class finalization basically works the inverse
+ * way in which class intialization is performed.
+ * See GClassInitFunc() for a discussion of the class intialization process.
+ */
+
+
+/**
+ * GBaseInitFunc:
+ * @g_class: The #GTypeClass structure to initialize.
+ *
+ * A callback function used by the type system to do base initialization
+ * of the class structures of derived types. It is called as part of the
+ * initialization process of all derived classes and should reallocate
+ * or reset all dynamic class members copied over from the parent class.
+ * For example, class members (such as strings) that are not sufficiently
+ * handled by a plain memory copy of the parent class into the derived class
+ * have to be altered. See GClassInitFunc() for a discussion of the class
+ * intialization process.
+ */
+
+
+/**
+ * GBinding:
+ *
+ * <structname>GBinding</structname> is an opaque structure whose members
+ * cannot be accessed directly.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GBindingFlags:
+ * @G_BINDING_DEFAULT: The default binding; if the source property changes, the target property is updated with its value.
+ * @G_BINDING_BIDIRECTIONAL: Bidirectional binding; if either the property of the source or the property of the target changes, the other is updated.
+ * @G_BINDING_SYNC_CREATE: Synchronize the values of the source and target properties when creating the binding; the direction of the synchronization is always from the source to the target.
+ * @G_BINDING_INVERT_BOOLEAN: If the two properties being bound are booleans, setting one to %TRUE will result in the other being set to %FALSE and vice versa. This flag will only work for boolean properties, and cannot be used when passing custom transformation functions to g_object_bind_property_full().
+ *
+ * Flags to be passed to g_object_bind_property() or
+ * g_object_bind_property_full().
+ *
+ * This enumeration can be extended at later date.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GBindingTransformFunc:
+ * @binding: a #GBinding
+ * @source_value: the value of the source property
+ * @target_value: the value of the target property
+ * @user_data: data passed to the transform function
+ *
+ * A function to be called to transform the source property of @source
+ * from @source_value into the target property of @target
+ * using @target_value.
+ *
+ * otherwise
+ *
+ * Returns: %TRUE if the transformation was successful, and %FALSE
+ * Since: 2.26
+ */
+
+
+/**
+ * GBookmarkFile:
+ *
+ * The <structname>GBookmarkFile</structname> struct contains only
+ * private data and should not be directly accessed.
+ */
+
+
+/**
+ * GBookmarkFileError:
+ * @G_BOOKMARK_FILE_ERROR_INVALID_URI: URI was ill-formed
+ * @G_BOOKMARK_FILE_ERROR_INVALID_VALUE: a requested field was not found
+ * @G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED: a requested application did not register a bookmark
+ * @G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND: a requested URI was not found
+ * @G_BOOKMARK_FILE_ERROR_READ: document was ill formed
+ * @G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING: the text being parsed was in an unknown encoding
+ * @G_BOOKMARK_FILE_ERROR_WRITE: an error occurred while writing
+ * @G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND: requested file was not found
+ *
+ * Error codes returned by bookmark file parsing.
+ */
+
+
+/**
+ * GBoxedCopyFunc:
+ * @boxed: The boxed structure to be copied.
+ *
+ * This function is provided by the user and should produce a copy
+ * of the passed in boxed structure.
+ *
+ * Returns: The newly created copy of the boxed structure.
+ */
+
+
+/**
+ * GBoxedFreeFunc:
+ * @boxed: The boxed structure to be freed.
+ *
+ * This function is provided by the user and should free the boxed
+ * structure passed.
+ */
+
+
+/**
+ * GByteArray:
+ * @data: a pointer to the element data. The data may be moved as elements are added to the #GByteArray.
+ * @len: the number of elements in the #GByteArray.
+ *
+ * The <structname>GByteArray</structname> struct allows access to the
+ * public fields of a <structname>GByteArray</structname>.
+ */
+
+
+/**
+ * GBytes:
+ *
+ * A simple refcounted data type representing an immutable byte sequence
+ * from an unspecified origin.
+ *
+ * The purpose of a #GBytes is to keep the memory region that it holds
+ * alive for as long as anyone holds a reference to the bytes.  When
+ * the last reference count is dropped, the memory is released. Multiple
+ * unrelated callers can use byte data in the #GBytes without coordinating
+ * their activities, resting assured that the byte data will not change or
+ * move while they hold a reference.
+ *
+ * A #GBytes can come from many different origins that may have
+ * different procedures for freeing the memory region.  Examples are
+ * memory from g_malloc(), from memory slices, from a #GMappedFile or
+ * memory from other allocators.
+ *
+ * #GBytes work well as keys in #GHashTable. Use g_bytes_equal() and
+ * g_bytes_hash() as parameters to g_hash_table_new() or g_hash_table_new_full().
+ * #GBytes can also be used as keys in a #GTree by passing the g_bytes_compare()
+ * function to g_tree_new().
+ *
+ * The data pointed to by this bytes must not be modified. For a mutable
+ * array of bytes see #GByteArray. Use g_bytes_unref_to_array() to create a
+ * mutable array for a #GBytes sequence. To create an immutable #GBytes from
+ * a mutable #GByteArray, use the g_byte_array_free_to_bytes() function.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GCClosure:
+ * @closure: the #GClosure
+ * @callback: the callback function
+ *
+ * A #GCClosure is a specialization of #GClosure for C function callbacks.
+ */
+
+
+/**
+ * GCallback:
+ *
+ * The type used for callback functions in structure definitions and function
+ * signatures. This doesn't mean that all callback functions must take no
+ * parameters and return void. The required signature of a callback function
+ * is determined by the context in which is used (e.g. the signal to which it
+ * is connected). Use G_CALLBACK() to cast the callback function to a #GCallback.
+ */
+
+
+/**
+ * GChecksum:
+ *
+ * An opaque structure representing a checksumming operation.
+ * To create a new GChecksum, use g_checksum_new(). To free
+ * a GChecksum, use g_checksum_free().
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * GChecksumType:
+ * @G_CHECKSUM_MD5: Use the MD5 hashing algorithm
+ * @G_CHECKSUM_SHA1: Use the SHA-1 hashing algorithm
+ * @G_CHECKSUM_SHA256: Use the SHA-256 hashing algorithm
+ *
+ * The hashing algorithm to be used by #GChecksum when performing the
+ * digest of some data.
+ *
+ * Note that the #GChecksumType enumeration may be extended at a later
+ * date to include new hashing algorithm types.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * GChildWatchFunc:
+ * @pid: the process id of the child process
+ * @status: Status information about the child process, see waitpid(2) for more information about this field
+ * @user_data: user data passed to g_child_watch_add()
+ *
+ * The type of functions to be called when a child exists.
+ */
+
+
+/**
+ * GClassFinalizeFunc:
+ * @g_class: The #GTypeClass structure to finalize.
+ * @class_data: The @class_data member supplied via the #GTypeInfo structure.
+ *
+ * A callback function used by the type system to finalize a class.
+ * This function is rarely needed, as dynamically allocated class resources
+ * should be handled by GBaseInitFunc() and GBaseFinalizeFunc().
+ * Also, specification of a GClassFinalizeFunc() in the #GTypeInfo
+ * structure of a static type is invalid, because classes of static types
+ * will never be finalized (they are artificially kept alive when their
+ * reference count drops to zero).
+ */
+
+
+/**
+ * GClassInitFunc:
+ * @g_class: The #GTypeClass structure to initialize.
+ * @class_data: The @class_data member supplied via the #GTypeInfo structure.
+ *
+ * A callback function used by the type system to initialize the class
+ * of a specific type. This function should initialize all static class
+ * members.
+ * The initialization process of a class involves:
+ * <itemizedlist>
+ * <listitem><para>
+ * 1 - Copying common members from the parent class over to the
+ * derived class structure.
+ * </para></listitem>
+ * <listitem><para>
+ * 2 -  Zero initialization of the remaining members not copied
+ * over from the parent class.
+ * </para></listitem>
+ * <listitem><para>
+ * 3 - Invocation of the GBaseInitFunc() initializers of all parent
+ * types and the class' type.
+ * </para></listitem>
+ * <listitem><para>
+ * 4 - Invocation of the class' GClassInitFunc() initializer.
+ * </para></listitem>
+ * </itemizedlist>
+ * Since derived classes are partially initialized through a memory copy
+ * of the parent class, the general rule is that GBaseInitFunc() and
+ * GBaseFinalizeFunc() should take care of necessary reinitialization
+ * and release of those class members that were introduced by the type
+ * that specified these GBaseInitFunc()/GBaseFinalizeFunc().
+ * GClassInitFunc() should only care about initializing static
+ * class members, while dynamic class members (such as allocated strings
+ * or reference counted resources) are better handled by a GBaseInitFunc()
+ * for this type, so proper initialization of the dynamic class members
+ * is performed for class initialization of derived types as well.
+ * An example may help to correspond the intend of the different class
+ * initializers:
+ *
+ * |[
+ * typedef struct {
+ * GObjectClass parent_class;
+ * gint         static_integer;
+ * gchar       *dynamic_string;
+ * } TypeAClass;
+ * static void
+ * type_a_base_class_init (TypeAClass *class)
+ * {
+ * class->dynamic_string = g_strdup ("some string");
+ * }
+ * static void
+ * type_a_base_class_finalize (TypeAClass *class)
+ * {
+ * g_free (class->dynamic_string);
+ * }
+ * static void
+ * type_a_class_init (TypeAClass *class)
+ * {
+ * class->static_integer = 42;
+ * }
+ *
+ * typedef struct {
+ * TypeAClass   parent_class;
+ * gfloat       static_float;
+ * GString     *dynamic_gstring;
+ * } TypeBClass;
+ * static void
+ * type_b_base_class_init (TypeBClass *class)
+ * {
+ * class->dynamic_gstring = g_string_new ("some other string");
+ * }
+ * static void
+ * type_b_base_class_finalize (TypeBClass *class)
+ * {
+ * g_string_free (class->dynamic_gstring);
+ * }
+ * static void
+ * type_b_class_init (TypeBClass *class)
+ * {
+ * class->static_float = 3.14159265358979323846;
+ * }
+ * ]|
+ * Initialization of TypeBClass will first cause initialization of
+ * TypeAClass (derived classes reference their parent classes, see
+ * g_type_class_ref() on this).
+ * Initialization of TypeAClass roughly involves zero-initializing its fields,
+ * then calling its GBaseInitFunc() type_a_base_class_init() to allocate
+ * its dynamic members (dynamic_string), and finally calling its GClassInitFunc()
+ * type_a_class_init() to initialize its static members (static_integer).
+ * The first step in the initialization process of TypeBClass is then
+ * a plain memory copy of the contents of TypeAClass into TypeBClass and
+ * zero-initialization of the remaining fields in TypeBClass.
+ * The dynamic members of TypeAClass within TypeBClass now need
+ * reinitialization which is performed by calling type_a_base_class_init()
+ * with an argument of TypeBClass.
+ * After that, the GBaseInitFunc() of TypeBClass, type_b_base_class_init()
+ * is called to allocate the dynamic members of TypeBClass (dynamic_gstring),
+ * and finally the GClassInitFunc() of TypeBClass, type_b_class_init(),
+ * is called to complete the initialization process with the static members
+ * (static_float).
+ * Corresponding finalization counter parts to the GBaseInitFunc() functions
+ * have to be provided to release allocated resources at class finalization
+ * time.
+ */
+
+
+/**
+ * GClosure:
+ * @in_marshal: Indicates whether the closure is currently being invoked with g_closure_invoke()
+ * @is_invalid: Indicates whether the closure has been invalidated by g_closure_invalidate()
+ *
+ * A #GClosure represents a callback supplied by the programmer.
+ */
+
+
+/**
+ * GClosureMarshal:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: (allow-none): a #GValue to store the return value. May be %NULL if the callback of @closure doesn't return a value.
+ * @n_param_values: the length of the @param_values array
+ * @param_values: (array length=n_param_values): an array of #GValue<!-- -->s holding the arguments on which to invoke the callback of @closure
+ * @invocation_hint: (allow-none): the invocation hint given as the last argument to g_closure_invoke()
+ * @marshal_data: (allow-none): additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
+ *
+ * The type used for marshaller functions.
+ */
+
+
+/**
+ * GClosureNotify:
+ * @data: data specified when registering the notification callback
+ * @closure: the #GClosure on which the notification is emitted
+ *
+ * The type used for the various notification callbacks which can be registered
+ * on closures.
+ */
+
+
+/**
+ * GCompareDataFunc:
+ * @a: a value.
+ * @b: a value to compare with.
+ * @user_data: user data to pass to comparison function.
+ * @Returns: negative value if @a &lt; @b; zero if @a = @b; positive value if @a > @b.
+ *
+ * Specifies the type of a comparison function used to compare two
+ * values.  The function should return a negative integer if the first
+ * value comes before the second, 0 if they are equal, or a positive
+ * integer if the first value comes after the second.
+ */
+
+
+/**
+ * GCompareFunc:
+ * @a: a value.
+ * @b: a value to compare with.
+ * @Returns: negative value if @a &lt; @b; zero if @a = @b; positive value if @a > @b.
+ *
+ * Specifies the type of a comparison function used to compare two
+ * values.  The function should return a negative integer if the first
+ * value comes before the second, 0 if they are equal, or a positive
+ * integer if the first value comes after the second.
+ */
+
+
+/**
+ * GCond:
+ *
+ * The #GCond struct is an opaque data structure that represents a
+ * condition. Threads can block on a #GCond if they find a certain
+ * condition to be false. If other threads change the state of this
+ * condition they signal the #GCond, and that causes the waiting
+ * threads to be woken up.
+ *
+ * Consider the following example of a shared variable.  One or more
+ * threads can wait for data to be published to the variable and when
+ * another thread publishes the data, it can signal one of the waiting
+ * threads to wake up to collect the data.
+ *
+ * <example>
+ * <title>
+ * Using GCond to block a thread until a condition is satisfied
+ * </title>
+ * <programlisting>
+ * gpointer current_data = NULL;
+ * GMutex data_mutex;
+ * GCond data_cond;
+ *
+ * void
+ * push_data (gpointer data)
+ * {
+ * g_mutex_lock (&data_mutex);
+ * current_data = data;
+ * g_cond_signal (&data_cond);
+ * g_mutex_unlock (&data_mutex);
+ * }
+ *
+ * gpointer
+ * pop_data (void)
+ * {
+ * gpointer data;
+ *
+ * g_mutex_lock (&data_mutex);
+ * while (!current_data)
+ * g_cond_wait (&data_cond, &data_mutex);
+ * data = current_data;
+ * current_data = NULL;
+ * g_mutex_unlock (&data_mutex);
+ *
+ * return data;
+ * }
+ * </programlisting>
+ * </example>
+ *
+ * Whenever a thread calls pop_data() now, it will wait until
+ * current_data is non-%NULL, i.e. until some other thread
+ * has called push_data().
+ *
+ * The example shows that use of a condition variable must always be
+ * paired with a mutex.  Without the use of a mutex, there would be a
+ * race between the check of <varname>current_data</varname> by the
+ * while loop in <function>pop_data</function> and waiting.
+ * Specifically, another thread could set <varname>pop_data</varname>
+ * after the check, and signal the cond (with nobody waiting on it)
+ * before the first thread goes to sleep.  #GCond is specifically useful
+ * for its ability to release the mutex and go to sleep atomically.
+ *
+ * It is also important to use the g_cond_wait() and g_cond_wait_until()
+ * functions only inside a loop which checks for the condition to be
+ * true.  See g_cond_wait() for an explanation of why the condition may
+ * not be true even after it returns.
+ *
+ * If a #GCond is allocated in static storage then it can be used
+ * without initialisation.  Otherwise, you should call g_cond_init() on
+ * it and g_cond_clear() when done.
+ *
+ * A #GCond should only be accessed via the <function>g_cond_</function>
+ * functions.
+ */
+
+
+/**
+ * GConnectFlags:
+ * @G_CONNECT_AFTER: whether the handler should be called before or after the default handler of the signal.
+ * @G_CONNECT_SWAPPED: whether the instance and data should be swapped when calling the handler.
+ *
+ * The connection flags are used to specify the behaviour of a signal's
+ * connection.
+ */
+
+
+/**
+ * GConvertError:
+ * @G_CONVERT_ERROR_NO_CONVERSION: Conversion between the requested character sets is not supported.
+ * @G_CONVERT_ERROR_ILLEGAL_SEQUENCE: Invalid byte sequence in conversion input.
+ * @G_CONVERT_ERROR_FAILED: Conversion failed for some reason.
+ * @G_CONVERT_ERROR_PARTIAL_INPUT: Partial character sequence at end of input.
+ * @G_CONVERT_ERROR_BAD_URI: URI is invalid.
+ * @G_CONVERT_ERROR_NOT_ABSOLUTE_PATH: Pathname is not an absolute path.
+ *
+ * Error codes returned by character set conversion routines.
+ */
+
+
+/**
+ * GCopyFunc:
+ * @src: A pointer to the data which should be copied
+ * @data: Additional data
+ *
+ * A function of this signature is used to copy the node data
+ * when doing a deep-copy of a tree.
+ *
+ * Returns: A pointer to the copy
+ * Since: 2.4
+ */
+
+
+/**
+ * GData:
+ *
+ * The #GData struct is an opaque data structure to represent a <link
+ * linkend="glib-Keyed-Data-Lists">Keyed Data List</link>. It should
+ * only be accessed via the following functions.
+ */
+
+
+/**
+ * GDataForeachFunc:
+ * @key_id: the #GQuark id to identifying the data element.
+ * @data: the data element.
+ * @user_data: user data passed to g_dataset_foreach().
+ *
+ * Specifies the type of function passed to g_dataset_foreach(). It is
+ * called with each #GQuark id and associated data element, together
+ * with the @user_data parameter supplied to g_dataset_foreach().
+ */
+
+
+/**
+ * GDate:
+ * @julian_days: the Julian representation of the date
+ * @julian: this bit is set if @julian_days is valid
+ * @dmy: this is set if @day, @month and @year are valid
+ * @day: the day of the day-month-year representation of the date, as a number between 1 and 31
+ * @month: the day of the day-month-year representation of the date, as a number between 1 and 12
+ * @year: the day of the day-month-year representation of the date
+ *
+ * Represents a day between January 1, Year 1 and a few thousand years in
+ * the future. None of its members should be accessed directly. If the
+ * <structname>GDate</structname> is obtained from g_date_new(), it will
+ * be safe to mutate but invalid and thus not safe for calendrical
+ * computations. If it's declared on the stack, it will contain garbage
+ * so must be initialized with g_date_clear(). g_date_clear() makes the
+ * date invalid but sane. An invalid date doesn't represent a day, it's
+ * "empty." A date becomes valid after you set it to a Julian day or you
+ * set a day, month, and year.
+ */
+
+
+/**
+ * GDateDMY:
+ * @G_DATE_DAY: a day
+ * @G_DATE_MONTH: a month
+ * @G_DATE_YEAR: a year
+ *
+ * This enumeration isn't used in the API, but may be useful if you need
+ * to mark a number as a day, month, or year.
+ */
+
+
+/**
+ * GDateDay:
+ *
+ * Integer representing a day of the month; between 1 and
+ * 31. #G_DATE_BAD_DAY represents an invalid day of the month.
+ */
+
+
+/**
+ * GDateMonth:
+ * @G_DATE_BAD_MONTH: invalid value
+ * @G_DATE_JANUARY: January
+ * @G_DATE_FEBRUARY: February
+ * @G_DATE_MARCH: March
+ * @G_DATE_APRIL: April
+ * @G_DATE_MAY: May
+ * @G_DATE_JUNE: June
+ * @G_DATE_JULY: July
+ * @G_DATE_AUGUST: August
+ * @G_DATE_SEPTEMBER: September
+ * @G_DATE_OCTOBER: October
+ * @G_DATE_NOVEMBER: November
+ * @G_DATE_DECEMBER: December
+ *
+ * Enumeration representing a month; values are #G_DATE_JANUARY,
+ * #G_DATE_FEBRUARY, etc. #G_DATE_BAD_MONTH is the invalid value.
+ */
+
+
+/**
+ * GDateTime:
+ *
+ * <structname>GDateTime</structname> is an opaque structure whose members
+ * cannot be accessed directly.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDateWeekday:
+ * @G_DATE_BAD_WEEKDAY: invalid value
+ * @G_DATE_MONDAY: Monday
+ * @G_DATE_TUESDAY: Tuesday
+ * @G_DATE_WEDNESDAY: Wednesday
+ * @G_DATE_THURSDAY: Thursday
+ * @G_DATE_FRIDAY: Friday
+ * @G_DATE_SATURDAY: Saturday
+ * @G_DATE_SUNDAY: Sunday
+ *
+ * Enumeration representing a day of the week; #G_DATE_MONDAY,
+ * #G_DATE_TUESDAY, etc. #G_DATE_BAD_WEEKDAY is an invalid weekday.
+ */
+
+
+/**
+ * GDateYear:
+ *
+ * Integer representing a year; #G_DATE_BAD_YEAR is the invalid
+ * value. The year must be 1 or higher; negative (BC) years are not
+ * allowed. The year is represented with four digits.
+ */
+
+
+/**
+ * GDebugKey:
+ * @key: the string
+ * @value: the flag
+ *
+ * Associates a string with a bit flag.
+ * Used in g_parse_debug_string().
+ */
+
+
+/**
+ * GDestroyNotify:
+ * @data: the data element.
+ *
+ * Specifies the type of function which is called when a data element
+ * is destroyed. It is passed the pointer to the data element and
+ * should free any memory and resources allocated for it.
+ */
+
+
+/**
+ * GDir:
+ *
+ * An opaque structure representing an opened directory.
+ */
+
+
+/**
+ * GDoubleIEEE754:
+ * @v_double: the double value
+ *
+ * The #GFloatIEEE754 and #GDoubleIEEE754 unions are used to access the sign,
+ * mantissa and exponent of IEEE floats and doubles. These unions are defined
+ * as appropriate for a given platform. IEEE floats and doubles are supported
+ * (used for storage) by at least Intel, PPC and Sparc.
+ */
+
+
+/**
+ * GEnumClass:
+ * @g_type_class: the parent class
+ * @minimum: the smallest possible value.
+ * @maximum: the largest possible value.
+ * @n_values: the number of possible values.
+ * @values: an array of #GEnumValue structs describing the individual values.
+ *
+ * The class of an enumeration type holds information about its
+ * possible values.
+ */
+
+
+/**
+ * GEnumValue:
+ * @value: the enum value
+ * @value_name: the name of the value
+ * @value_nick: the nickname of the value
+ *
+ * A structure which contains a single enum value, its name, and its
+ * nickname.
+ */
+
+
+/**
+ * GEqualFunc:
+ * @a: a value
+ * @b: a value to compare with
+ *
+ * Specifies the type of a function used to test two values for
+ * equality. The function should return %TRUE if both values are equal
+ * and %FALSE otherwise.
+ *
+ * Returns: %TRUE if @a = @b; %FALSE otherwise
+ */
+
+
+/**
+ * GError:
+ * @domain: error domain, e.g. #G_FILE_ERROR
+ * @code: error code, e.g. %G_FILE_ERROR_NOENT
+ * @message: human-readable informative error message
+ *
+ * The <structname>GError</structname> structure contains
+ * information about an error that has occurred.
+ */
+
+
+/**
+ * GErrorType:
+ * @G_ERR_UNKNOWN: unknown error
+ * @G_ERR_UNEXP_EOF: unexpected end of file
+ * @G_ERR_UNEXP_EOF_IN_STRING: unterminated string constant
+ * @G_ERR_UNEXP_EOF_IN_COMMENT: unterminated comment
+ * @G_ERR_NON_DIGIT_IN_CONST: non-digit character in a number
+ * @G_ERR_DIGIT_RADIX: digit beyond radix in a number
+ * @G_ERR_FLOAT_RADIX: non-decimal floating point number
+ * @G_ERR_FLOAT_MALFORMED: malformed floating point number
+ *
+ * The possible errors, used in the @v_error field
+ * of #GTokenValue, when the token is a %G_TOKEN_ERROR.
+ */
+
+
+/**
+ * GFileError:
+ * @G_FILE_ERROR_EXIST: Operation not permitted; only the owner of the file (or other resource) or processes with special privileges can perform the operation.
+ * @G_FILE_ERROR_ISDIR: File is a directory; you cannot open a directory for writing, or create or remove hard links to it.
+ * @G_FILE_ERROR_ACCES: Permission denied; the file permissions do not allow the attempted operation.
+ * @G_FILE_ERROR_NAMETOOLONG: Filename too long.
+ * @G_FILE_ERROR_NOENT: No such file or directory. This is a "file doesn't exist" error for ordinary files that are referenced in contexts where they are expected to already exist.
+ * @G_FILE_ERROR_NOTDIR: A file that isn't a directory was specified when a directory is required.
+ * @G_FILE_ERROR_NXIO: No such device or address. The system tried to use the device represented by a file you specified, and it couldn't find the device. This can mean that the device file was installed incorrectly, or that the physical device is missing or not correctly attached to the computer.
+ * @G_FILE_ERROR_NODEV: The underlying file system of the specified file does not support memory mapping.
+ * @G_FILE_ERROR_ROFS: The directory containing the new link can't be modified because it's on a read-only file system.
+ * @G_FILE_ERROR_TXTBSY: Text file busy.
+ * @G_FILE_ERROR_FAULT: You passed in a pointer to bad memory. (GLib won't reliably return this, don't pass in pointers to bad memory.)
+ * @G_FILE_ERROR_LOOP: Too many levels of symbolic links were encountered in looking up a file name. This often indicates a cycle of symbolic links.
+ * @G_FILE_ERROR_NOSPC: No space left on device; write operation on a file failed because the disk is full.
+ * @G_FILE_ERROR_NOMEM: No memory available. The system cannot allocate more virtual memory because its capacity is full.
+ * @G_FILE_ERROR_MFILE: The current process has too many files open and can't open any more. Duplicate descriptors do count toward this limit.
+ * @G_FILE_ERROR_NFILE: There are too many distinct file openings in the entire system.
+ * @G_FILE_ERROR_BADF: Bad file descriptor; for example, I/O on a descriptor that has been closed or reading from a descriptor open only for writing (or vice versa).
+ * @G_FILE_ERROR_INVAL: Invalid argument. This is used to indicate various kinds of problems with passing the wrong argument to a library function.
+ * @G_FILE_ERROR_PIPE: Broken pipe; there is no process reading from the other end of a pipe. Every library function that returns this error code also generates a `SIGPIPE' signal; this signal terminates the program if not handled or blocked. Thus, your program will never actually see this code unless it has handled or blocked `SIGPIPE'.
+ * @G_FILE_ERROR_AGAIN: Resource temporarily unavailable; the call might work if you try again later.
+ * @G_FILE_ERROR_INTR: Interrupted function call; an asynchronous signal occurred and prevented completion of the call. When this happens, you should try the call again.
+ * @G_FILE_ERROR_IO: Input/output error; usually used for physical read or write errors. i.e. the disk or other physical device hardware is returning errors.
+ * @G_FILE_ERROR_PERM: Operation not permitted; only the owner of the file (or other resource) or processes with special privileges can perform the operation.
+ * @G_FILE_ERROR_NOSYS: Function not implemented; this indicates that the system is missing some functionality.
+ * @G_FILE_ERROR_FAILED: Does not correspond to a UNIX error code; this is the standard "failed for unspecified reason" error code present in all #GError error code enumerations. Returned if no specific code applies.
+ *
+ * Values corresponding to @errno codes returned from file operations
+ * on UNIX. Unlike @errno codes, GFileError values are available on
+ * all systems, even Windows. The exact meaning of each code depends
+ * on what sort of file operation you were performing; the UNIX
+ * documentation gives more details. The following error code descriptions
+ * come from the GNU C Library manual, and are under the copyright
+ * of that manual.
+ *
+ * It's not very portable to make detailed assumptions about exactly
+ * which errors will be returned from a given operation. Some errors
+ * don't occur on some systems, etc., sometimes there are subtle
+ * differences in when a system will report a given error, etc.
+ */
+
+
+/**
+ * GFileTest:
+ * @G_FILE_TEST_IS_REGULAR: %TRUE if the file is a regular file (not a directory). Note that this test will also return %TRUE if the tested file is a symlink to a regular file.
+ * @G_FILE_TEST_IS_SYMLINK: %TRUE if the file is a symlink.
+ * @G_FILE_TEST_IS_DIR: %TRUE if the file is a directory.
+ * @G_FILE_TEST_IS_EXECUTABLE: %TRUE if the file is executable.
+ * @G_FILE_TEST_EXISTS: %TRUE if the file exists. It may or may not be a regular file.
+ *
+ * A test to perform on a file using g_file_test().
+ */
+
+
+/**
+ * GFlagsClass:
+ * @g_type_class: the parent class
+ * @mask: a mask covering all possible values.
+ * @n_values: the number of possible values.
+ * @values: an array of #GFlagsValue structs describing the individual values.
+ *
+ * The class of a flags type holds information about its
+ * possible values.
+ */
+
+
+/**
+ * GFlagsValue:
+ * @value: the flags value
+ * @value_name: the name of the value
+ * @value_nick: the nickname of the value
+ *
+ * A structure which contains a single flags value, its name, and its
+ * nickname.
+ */
+
+
+/**
+ * GFloatIEEE754:
+ * @v_float: the double value
+ *
+ * The #GFloatIEEE754 and #GDoubleIEEE754 unions are used to access the sign,
+ * mantissa and exponent of IEEE floats and doubles. These unions are defined
+ * as appropriate for a given platform. IEEE floats and doubles are supported
+ * (used for storage) by at least Intel, PPC and Sparc.
+ */
+
+
+/**
+ * GFormatSizeFlags:
+ * @G_FORMAT_SIZE_DEFAULT: behave the same as g_format_size()
+ * @G_FORMAT_SIZE_LONG_FORMAT: include the exact number of bytes as part of the returned string.  For example, "45.6 kB (45,612 bytes)".
+ * @G_FORMAT_SIZE_IEC_UNITS: use IEC (base 1024) units with "KiB"-style suffixes. IEC units should only be used for reporting things with a strong "power of 2" basis, like RAM sizes or RAID stripe sizes. Network and storage sizes should be reported in the normal SI units.
+ *
+ * Flags to modify the format of the string returned by g_format_size_full().
+ */
+
+
+/**
+ * GFreeFunc:
+ * @data: a data pointer
+ *
+ * Declares a type of function which takes an arbitrary
+ * data pointer argument and has no return value. It is
+ * not currently used in GLib or GTK+.
+ */
+
+
+/**
+ * GFunc:
+ * @data: the element's data.
+ * @user_data: user data passed to g_list_foreach() or g_slist_foreach().
+ *
+ * Specifies the type of functions passed to g_list_foreach() and
+ * g_slist_foreach().
+ */
+
+
+/**
+ * GHFunc:
+ * @key: a key
+ * @value: the value corresponding to the key
+ * @user_data: user data passed to g_hash_table_foreach()
+ *
+ * Specifies the type of the function passed to g_hash_table_foreach().
+ * It is called with each key/value pair, together with the @user_data
+ * parameter which is passed to g_hash_table_foreach().
+ */
+
+
+/**
+ * GHRFunc:
+ * @key: a key
+ * @value: the value associated with the key
+ * @user_data: user data passed to g_hash_table_remove()
+ *
+ * Specifies the type of the function passed to
+ * g_hash_table_foreach_remove(). It is called with each key/value
+ * pair, together with the @user_data parameter passed to
+ * g_hash_table_foreach_remove(). It should return %TRUE if the
+ * key/value pair should be removed from the #GHashTable.
+ *
+ * #GHashTable
+ *
+ * Returns: %TRUE if the key/value pair should be removed from the
+ */
+
+
+/**
+ * GHashFunc:
+ * @key: a key
+ *
+ * Specifies the type of the hash function which is passed to
+ * g_hash_table_new() when a #GHashTable is created.
+ *
+ * The function is passed a key and should return a #guint hash value.
+ * The functions g_direct_hash(), g_int_hash() and g_str_hash() provide
+ * hash functions which can be used when the key is a #gpointer, #gint*,
+ * and #gchar* respectively.
+ *
+ * g_direct_hash() is also the appropriate hash function for keys
+ * of the form <literal>GINT_TO_POINTER (n)</literal> (or similar macros).
+ *
+ * <!-- FIXME: Need more here. --> A good hash functions should produce
+ * hash values that are evenly distributed over a fairly large range.
+ * The modulus is taken with the hash table size (a prime number) to
+ * find the 'bucket' to place each key into. The function should also
+ * be very fast, since it is called for each key lookup.
+ *
+ * Note that the hash functions provided by GLib have these qualities,
+ * but are not particularly robust against manufactured keys that
+ * cause hash collisions. Therefore, you should consider choosing
+ * a more secure hash function when using a GHashTable with keys
+ * that originate in untrusted data (such as HTTP requests).
+ * Using g_str_hash() in that situation might make your application
+ * vulerable to <ulink url="https://lwn.net/Articles/474912/">Algorithmic Complexity Attacks</ulink>.
+ *
+ * The key to choosing a good hash is unpredictability.  Even
+ * cryptographic hashes are very easy to find collisions for when the
+ * remainder is taken modulo a somewhat predictable prime number.  There
+ * must be an element of randomness that an attacker is unable to guess.
+ *
+ * Returns: the hash value corresponding to the key
+ */
+
+
+/**
+ * GHashTable:
+ *
+ * The #GHashTable struct is an opaque data structure to represent a
+ * <link linkend="glib-Hash-Tables">Hash Table</link>. It should only be
+ * accessed via the following functions.
+ */
+
+
+/**
+ * GHashTableIter:
+ *
+ * A GHashTableIter structure represents an iterator that can be used
+ * to iterate over the elements of a #GHashTable. GHashTableIter
+ * structures are typically allocated on the stack and then initialized
+ * with g_hash_table_iter_init().
+ */
+
+
+/**
+ * GHmac:
+ *
+ * An opaque structure representing a HMAC operation.
+ * To create a new GHmac, use g_hmac_new(). To free
+ * a GHmac, use g_hmac_unref().
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GHook:
+ * @data: data which is passed to func when this hook is invoked
+ * @next: pointer to the next hook in the list
+ * @prev: pointer to the previous hook in the list
+ * @ref_count: the reference count of this hook
+ * @hook_id: the id of this hook, which is unique within its list
+ * @flags: flags which are set for this hook. See #GHookFlagMask for predefined flags
+ * @func: the function to call when this hook is invoked. The possible signatures for this function are #GHookFunc and #GHookCheckFunc
+ * @destroy: the default @finalize_hook function of a #GHookList calls this member of the hook that is being finalized
+ *
+ * The <structname>GHook</structname> struct represents a single hook
+ * function in a #GHookList.
+ */
+
+
+/**
+ * GHookCheckFunc:
+ * @data: the data field of the #GHook is passed to the hook function here
+ *
+ * Defines the type of a hook function that can be invoked
+ * by g_hook_list_invoke_check().
+ *
+ * Returns: %FALSE if the #GHook should be destroyed
+ */
+
+
+/**
+ * GHookCheckMarshaller:
+ * @hook: a #GHook
+ * @marshal_data: user data
+ *
+ * Defines the type of function used by g_hook_list_marshal_check().
+ *
+ * Returns: %FALSE if @hook should be destroyed
+ */
+
+
+/**
+ * GHookCompareFunc:
+ * @new_hook: the #GHook being inserted
+ * @sibling: the #GHook to compare with @new_hook
+ *
+ * Defines the type of function used to compare #GHook elements in
+ * g_hook_insert_sorted().
+ *
+ * Returns: a value &lt;= 0 if @new_hook should be before @sibling
+ */
+
+
+/**
+ * GHookFinalizeFunc:
+ * @hook_list: a #GHookList
+ * @hook: the hook in @hook_list that gets finalized
+ *
+ * Defines the type of function to be called when a hook in a
+ * list of hooks gets finalized.
+ */
+
+
+/**
+ * GHookFindFunc:
+ * @hook: a #GHook
+ * @data: user data passed to g_hook_find_func()
+ *
+ * Defines the type of the function passed to g_hook_find().
+ *
+ * Returns: %TRUE if the required #GHook has been found
+ */
+
+
+/**
+ * GHookFlagMask:
+ * @G_HOOK_FLAG_ACTIVE: set if the hook has not been destroyed
+ * @G_HOOK_FLAG_IN_CALL: set if the hook is currently being run
+ * @G_HOOK_FLAG_MASK: A mask covering all bits reserved for hook flags; see %G_HOOK_FLAG_USER_SHIFT
+ *
+ * Flags used internally in the #GHook implementation.
+ */
+
+
+/**
+ * GHookFunc:
+ * @data: the data field of the #GHook is passed to the hook function here
+ *
+ * Defines the type of a hook function that can be invoked
+ * by g_hook_list_invoke().
+ */
+
+
+/**
+ * GHookList:
+ * @seq_id: the next free #GHook id
+ * @hook_size: the size of the #GHookList elements, in bytes
+ * @is_setup: 1 if the #GHookList has been initialized
+ * @hooks: the first #GHook element in the list
+ * @dummy3: unused
+ * @finalize_hook: the function to call to finalize a #GHook element. The default behaviour is to call the hooks @destroy function
+ * @dummy: unused
+ *
+ * The <structname>GHookList</structname> struct represents a
+ * list of hook functions.
+ */
+
+
+/**
+ * GHookMarshaller:
+ * @hook: a #GHook
+ * @marshal_data: user data
+ *
+ * Defines the type of function used by g_hook_list_marshal().
+ */
+
+
+/**
+ * GINT16_FROM_BE:
+ * @val: a #gint16 value in big-endian byte order
+ *
+ * Converts a #gint16 value from big-endian to host byte order.
+ *
+ * Returns: @val converted to host byte order
+ */
+
+
+/**
+ * GINT16_FROM_LE:
+ * @val: a #gint16 value in little-endian byte order
+ *
+ * Converts a #gint16 value from little-endian to host byte order.
+ *
+ * Returns: @val converted to host byte order
+ */
+
+
+/**
+ * GINT16_TO_BE:
+ * @val: a #gint16 value in host byte order
+ *
+ * Converts a #gint16 value from host byte order to big-endian.
+ *
+ * Returns: @val converted to big-endian
+ */
+
+
+/**
+ * GINT16_TO_LE:
+ * @val: a #gint16 value in host byte order
+ *
+ * Converts a #gint16 value from host byte order to little-endian.
+ *
+ * Returns: @val converted to little-endian
+ */
+
+
+/**
+ * GINT32_FROM_BE:
+ * @val: a #gint32 value in big-endian byte order
+ *
+ * Converts a #gint32 value from big-endian to host byte order.
+ *
+ * Returns: @val converted to host byte order
+ */
+
+
+/**
+ * GINT32_FROM_LE:
+ * @val: a #gint32 value in little-endian byte order
+ *
+ * Converts a #gint32 value from little-endian to host byte order.
+ *
+ * Returns: @val converted to host byte order
+ */
+
+
+/**
+ * GINT32_TO_BE:
+ * @val: a #gint32 value in host byte order
+ *
+ * Converts a #gint32 value from host byte order to big-endian.
+ *
+ * Returns: @val converted to big-endian
+ */
+
+
+/**
+ * GINT32_TO_LE:
+ * @val: a #gint32 value in host byte order
+ *
+ * Converts a #gint32 value from host byte order to little-endian.
+ *
+ * Returns: @val converted to little-endian
+ */
+
+
+/**
+ * GINT64_FROM_BE:
+ * @val: a #gint64 value in big-endian byte order
+ *
+ * Converts a #gint64 value from big-endian to host byte order.
+ *
+ * Returns: @val converted to host byte order
+ */
+
+
+/**
+ * GINT64_FROM_LE:
+ * @val: a #gint64 value in little-endian byte order
+ *
+ * Converts a #gint64 value from little-endian to host byte order.
+ *
+ * Returns: @val converted to host byte order
+ */
+
+
+/**
+ * GINT64_TO_BE:
+ * @val: a #gint64 value in host byte order
+ *
+ * Converts a #gint64 value from host byte order to big-endian.
+ *
+ * Returns: @val converted to big-endian
+ */
+
+
+/**
+ * GINT64_TO_LE:
+ * @val: a #gint64 value in host byte order
+ *
+ * Converts a #gint64 value from host byte order to little-endian.
+ *
+ * Returns: @val converted to little-endian
+ */
+
+
+/**
+ * GINT_FROM_BE:
+ * @val: a #gint value in big-endian byte order
+ *
+ * Converts a #gint value from big-endian to host byte order.
+ *
+ * Returns: @val converted to host byte order
+ */
+
+
+/**
+ * GINT_FROM_LE:
+ * @val: a #gint value in little-endian byte order
+ *
+ * Converts a #gint value from little-endian to host byte order.
+ *
+ * Returns: @val converted to host byte order
+ */
+
+
+/**
+ * GINT_TO_BE:
+ * @val: a #gint value in host byte order
+ *
+ * Converts a #gint value from host byte order to big-endian.
+ *
+ * Returns: @val converted to big-endian byte order
+ */
+
+
+/**
+ * GINT_TO_LE:
+ * @val: a #gint value in host byte order
+ *
+ * Converts a #gint value from host byte order to little-endian.
+ *
+ * Returns: @val converted to little-endian byte order
+ */
+
+
+/**
+ * GINT_TO_POINTER:
+ * @i: integer to stuff into a pointer
+ *
+ * Stuffs an integer into a pointer type.
+ *
+ * Remember, you may not store pointers in integers. This is not portable
+ * in any way, shape or form. These macros <emphasis>only</emphasis> allow
+ * storing integers in pointers, and only preserve 32 bits of the
+ * integer; values outside the range of a 32-bit integer will be mangled.
+ */
+
+
+/**
+ * GIOChannel:
+ *
+ * A data structure representing an IO Channel. The fields should be
+ * considered private and should only be accessed with the following
+ * functions.
+ */
+
+
+/**
+ * GIOChannelError:
+ * @G_IO_CHANNEL_ERROR_FBIG: File too large.
+ * @G_IO_CHANNEL_ERROR_INVAL: Invalid argument.
+ * @G_IO_CHANNEL_ERROR_IO: IO error.
+ * @G_IO_CHANNEL_ERROR_ISDIR: File is a directory.
+ * @G_IO_CHANNEL_ERROR_NOSPC: No space left on device.
+ * @G_IO_CHANNEL_ERROR_NXIO: No such device or address.
+ * @G_IO_CHANNEL_ERROR_OVERFLOW: Value too large for defined datatype.
+ * @G_IO_CHANNEL_ERROR_PIPE: Broken pipe.
+ * @G_IO_CHANNEL_ERROR_FAILED: Some other error.
+ *
+ * Error codes returned by #GIOChannel operations.
+ */
+
+
+/**
+ * GIOCondition:
+ * @G_IO_IN: There is data to read.
+ * @G_IO_OUT: Data can be written (without blocking).
+ * @G_IO_PRI: There is urgent data to read.
+ * @G_IO_ERR: Error condition.
+ * @G_IO_HUP: Hung up (the connection has been broken, usually for pipes and sockets).
+ * @G_IO_NVAL: Invalid request. The file descriptor is not open.
+ *
+ * A bitwise combination representing a condition to watch for on an
+ * event source.
+ */
+
+
+/**
+ * GIOError:
+ * @G_IO_ERROR_NONE: no error
+ * @G_IO_ERROR_AGAIN: an EAGAIN error occurred
+ * @G_IO_ERROR_INVAL: an EINVAL error occurred
+ * @G_IO_ERROR_UNKNOWN: another error occurred
+ *
+ * #GIOError is only used by the deprecated functions
+ * g_io_channel_read(), g_io_channel_write(), and g_io_channel_seek().
+ */
+
+
+/**
+ * GIOFlags:
+ * @G_IO_FLAG_APPEND: turns on append mode, corresponds to <literal>O_APPEND</literal> (see the documentation of the UNIX open() syscall).
+ * @G_IO_FLAG_NONBLOCK: turns on nonblocking mode, corresponds to <literal>O_NONBLOCK</literal>/<literal>O_NDELAY</literal> (see the documentation of the UNIX open() syscall).
+ * @G_IO_FLAG_IS_READABLE: indicates that the io channel is readable. This flag cannot be changed.
+ * @G_IO_FLAG_IS_WRITABLE: indicates that the io channel is writable. This flag cannot be changed.
+ * @G_IO_FLAG_IS_SEEKABLE: indicates that the io channel is seekable, i.e. that g_io_channel_seek_position() can be used on it.  This flag cannot be changed.
+ * @G_IO_FLAG_MASK: the mask that specifies all the valid flags.
+ * @G_IO_FLAG_GET_MASK: the mask of the flags that are returned from g_io_channel_get_flags().
+ * @G_IO_FLAG_SET_MASK: the mask of the flags that the user can modify with g_io_channel_set_flags().
+ *
+ * Specifies properties of a #GIOChannel. Some of the flags can only be
+ * read with g_io_channel_get_flags(), but not changed with
+ * g_io_channel_set_flags().
+ */
+
+
+/**
+ * GIOFunc:
+ * @source: the #GIOChannel event source
+ * @condition: the condition which has been satisfied
+ * @data: user data set in g_io_add_watch() or g_io_add_watch_full()
+ * @Returns: the function should return %FALSE if the event source should be removed
+ *
+ * Specifies the type of function passed to g_io_add_watch() or
+ * g_io_add_watch_full(), which is called when the requested condition
+ * on a #GIOChannel is satisfied.
+ */
+
+
+/**
+ * GIOFuncs:
+ * @io_read: reads raw bytes from the channel.  This is called from various functions such as g_io_channel_read_chars() to read raw bytes from the channel.  Encoding and buffering issues are dealt with at a higher level.
+ * @io_write: writes raw bytes to the channel.  This is called from various functions such as g_io_channel_write_chars() to write raw bytes to the channel.  Encoding and buffering issues are dealt with at a higher level.
+ * @io_seek: (optional) seeks the channel.  This is called from g_io_channel_seek() on channels that support it.
+ * @io_close: closes the channel.  This is called from g_io_channel_close() after flushing the buffers.
+ * @io_create_watch: creates a watch on the channel.  This call corresponds directly to g_io_create_watch().
+ * @io_free: called from g_io_channel_unref() when the channel needs to be freed.  This function must free the memory associated with the channel, including freeing the #GIOChannel structure itself.  The channel buffers have been flushed and possibly @io_close has been called by the time this function is called.
+ * @io_set_flags: sets the #GIOFlags on the channel.  This is called from g_io_channel_set_flags() with all flags except for %G_IO_FLAG_APPEND and %G_IO_FLAG_NONBLOCK masked out.
+ * @io_get_flags: gets the #GIOFlags for the channel.  This function need only return the %G_IO_FLAG_APPEND and %G_IO_FLAG_NONBLOCK flags; g_io_channel_get_flags() automatically adds the others as appropriate.
+ *
+ * A table of functions used to handle different types of #GIOChannel
+ * in a generic way.
+ */
+
+
+/**
+ * GIOStatus:
+ * @G_IO_STATUS_ERROR: An error occurred.
+ * @G_IO_STATUS_NORMAL: Success.
+ * @G_IO_STATUS_EOF: End of file.
+ * @G_IO_STATUS_AGAIN: Resource temporarily unavailable.
+ *
+ * Stati returned by most of the #GIOFuncs functions.
+ */
+
+
+/**
+ * GIconv:
+ *
+ * The <structname>GIConv</structname> struct wraps an
+ * iconv() conversion descriptor. It contains private data
+ * and should only be accessed using the following functions.
+ */
+
+
+/**
+ * GInitiallyUnowned:
+ *
+ * All the fields in the <structname>GInitiallyUnowned</structname> structure
+ * are private to the #GInitiallyUnowned implementation and should never be
+ * accessed directly.
+ */
+
+
+/**
+ * GInitiallyUnownedClass:
+ *
+ * The class structure for the <structname>GInitiallyUnowned</structname> type.
+ */
+
+
+/**
+ * GInstanceInitFunc:
+ * @instance: The instance to initialize.
+ * @g_class: The class of the type the instance is created for.
+ *
+ * A callback function used by the type system to initialize a new
+ * instance of a type. This function initializes all instance members and
+ * allocates any resources required by it.
+ * Initialization of a derived instance involves calling all its parent
+ * types instance initializers, so the class member of the instance
+ * is altered during its initialization to always point to the class that
+ * belongs to the type the current initializer was introduced for.
+ */
+
+
+/**
+ * GInterfaceFinalizeFunc:
+ * @g_iface: The interface structure to finalize.
+ * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure.
+ *
+ * A callback function used by the type system to finalize an interface.
+ * This function should destroy any internal data and release any resources
+ * allocated by the corresponding GInterfaceInitFunc() function.
+ */
+
+
+/**
+ * GInterfaceInfo:
+ * @interface_init: location of the interface initialization function
+ * @interface_finalize: location of the interface finalization function
+ * @interface_data: user-supplied data passed to the interface init/finalize functions
+ *
+ * A structure that provides information to the type system which is
+ * used specifically for managing interface types.
+ */
+
+
+/**
+ * GInterfaceInitFunc:
+ * @g_iface: The interface structure to initialize.
+ * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure.
+ *
+ * A callback function used by the type system to initialize a new
+ * interface.  This function should initialize all internal data and
+ * allocate any resources required by the interface.
+ */
+
+
+/**
+ * GKeyFile:
+ *
+ * The GKeyFile struct contains only private data
+ * and should not be accessed directly.
+ */
+
+
+/**
+ * GKeyFileError:
+ * @G_KEY_FILE_ERROR_UNKNOWN_ENCODING: the text being parsed was in an unknown encoding
+ * @G_KEY_FILE_ERROR_PARSE: document was ill-formed
+ * @G_KEY_FILE_ERROR_NOT_FOUND: the file was not found
+ * @G_KEY_FILE_ERROR_KEY_NOT_FOUND: a requested key was not found
+ * @G_KEY_FILE_ERROR_GROUP_NOT_FOUND: a requested group was not found
+ * @G_KEY_FILE_ERROR_INVALID_VALUE: a value could not be parsed
+ *
+ * Error codes returned by key file parsing.
+ */
+
+
+/**
+ * GKeyFileFlags:
+ * @G_KEY_FILE_NONE: No flags, default behaviour
+ * @G_KEY_FILE_KEEP_COMMENTS: Use this flag if you plan to write the (possibly modified) contents of the key file back to a file; otherwise all comments will be lost when the key file is written back.
+ * @G_KEY_FILE_KEEP_TRANSLATIONS: Use this flag if you plan to write the (possibly modified) contents of the key file back to a file; otherwise only the translations for the current language will be written back.
+ *
+ * Flags which influence the parsing.
+ */
+
+
+/**
+ * GLIB_CHECK_VERSION:
+ * @major: the major version to check for
+ * @minor: the minor version to check for
+ * @micro: the micro version to check for
+ *
+ * Checks the version of the GLib library that is being compiled
+ * against.
+ *
+ * <example>
+ * <title>Checking the version of the GLib library</title>
+ * <programlisting>
+ * if (!GLIB_CHECK_VERSION (1, 2, 0))
+ * g_error ("GLib version 1.2.0 or above is needed");
+ * </programlisting>
+ * </example>
+ *
+ * See glib_check_version() for a runtime check.
+ *
+ * is the same as or newer than the passed-in version.
+ *
+ * Returns: %TRUE if the version of the GLib header files
+ */
+
+
+/**
+ * GLIB_DISABLE_DEPRECATION_WARNINGS:
+ *
+ * A macro that should be defined before including the glib.h header.
+ * If it is defined, no compiler warnings will be produced for uses
+ * of deprecated GLib APIs.
+ */
+
+
+/**
+ * GLIB_MAJOR_VERSION:
+ *
+ * The major version number of the GLib library.
+ *
+ * Like #glib_major_version, but from the headers used at
+ * application compile time, rather than from the library
+ * linked against at application run time.
+ */
+
+
+/**
+ * GLIB_MICRO_VERSION:
+ *
+ * The micro version number of the GLib library.
+ *
+ * Like #gtk_micro_version, but from the headers used at
+ * application compile time, rather than from the library
+ * linked against at application run time.
+ */
+
+
+/**
+ * GLIB_MINOR_VERSION:
+ *
+ * The minor version number of the GLib library.
+ *
+ * Like #gtk_minor_version, but from the headers used at
+ * application compile time, rather than from the library
+ * linked against at application run time.
+ */
+
+
+/**
+ * GLIB_VERSION_2_26:
+ *
+ * A macro that evaluates to the 2.26 version of GLib, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_2_28:
+ *
+ * A macro that evaluates to the 2.28 version of GLib, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_2_30:
+ *
+ * A macro that evaluates to the 2.30 version of GLib, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_2_32:
+ *
+ * A macro that evaluates to the 2.32 version of GLib, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_MAX_ALLOWED:
+ *
+ * A macro that should be defined by the user prior to including
+ * the glib.h header.
+ * The definition should be one of the predefined GLib version
+ * macros: %GLIB_VERSION_2_26, %GLIB_VERSION_2_28,...
+ *
+ * This macro defines the upper bound for the GLib API to use.
+ *
+ * If a function has been introduced in a newer version of GLib,
+ * it is possible to use this symbol to get compiler warnings when
+ * trying to use that function.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_MIN_REQUIRED:
+ *
+ * A macro that should be defined by the user prior to including
+ * the glib.h header.
+ * The definition should be one of the predefined GLib version
+ * macros: %GLIB_VERSION_2_26, %GLIB_VERSION_2_28,...
+ *
+ * This macro defines the lower bound for the GLib API to use.
+ *
+ * If a function has been deprecated in a newer version of GLib,
+ * it is possible to use this symbol to avoid the compiler warnings
+ * without disabling warning for every deprecated function.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLONG_FROM_BE:
+ * @val: a #glong value in big-endian byte order
+ *
+ * Converts a #glong value from big-endian to the host byte order.
+ *
+ * Returns: @val converted to host byte order
+ */
+
+
+/**
+ * GLONG_FROM_LE:
+ * @val: a #glong value in little-endian byte order
+ *
+ * Converts a #glong value from little-endian to host byte order.
+ *
+ * Returns: @val converted to host byte order
+ */
+
+
+/**
+ * GLONG_TO_BE:
+ * @val: a #glong value in host byte order
+ *
+ * Converts a #glong value from host byte order to big-endian.
+ *
+ * Returns: @val converted to big-endian byte order
+ */
+
+
+/**
+ * GLONG_TO_LE:
+ * @val: a #glong value in host byte order
+ *
+ * Converts a #glong value from host byte order to little-endian.
+ *
+ * Returns: @val converted to little-endian
+ */
+
+
+/**
+ * GList:
+ * @data: holds the element's data, which can be a pointer to any kind of data, or any integer value using the <link linkend="glib-Type-Conversion-Macros">Type Conversion Macros</link>.
+ * @next: contains the link to the next element in the list.
+ * @prev: contains the link to the previous element in the list.
+ *
+ * The #GList struct is used for each element in a doubly-linked list.
+ */
+
+
+/**
+ * GLogFunc:
+ * @log_domain: the log domain of the message
+ * @log_level: the log level of the message (including the fatal and recursion flags)
+ * @message: the message to process
+ * @user_data: user data, set in g_log_set_handler()
+ *
+ * Specifies the prototype of log handler functions.
+ */
+
+
+/**
+ * GLogLevelFlags:
+ * @G_LOG_FLAG_RECURSION: internal flag
+ * @G_LOG_FLAG_FATAL: internal flag
+ * @G_LOG_LEVEL_ERROR: log level for errors, see g_error(). This level is also used for messages produced by g_assert().
+ * @G_LOG_LEVEL_CRITICAL: log level for critical messages, see g_critical(). This level is also used for messages produced by g_return_if_fail() and g_return_val_if_fail().
+ * @G_LOG_LEVEL_WARNING: log level for warnings, see g_warning()
+ * @G_LOG_LEVEL_MESSAGE: log level for messages, see g_message()
+ * @G_LOG_LEVEL_INFO: log level for informational messages
+ * @G_LOG_LEVEL_DEBUG: log level for debug messages, see g_debug()
+ * @G_LOG_LEVEL_MASK: a mask including all log levels
+ *
+ * Flags specifying the level of log messages.
+ *
+ * It is possible to change how GLib treats messages of the various
+ * levels using g_log_set_handler() and g_log_set_fatal_mask().
+ */
+
+
+/**
+ * GMainContext:
+ *
+ * The <structname>GMainContext</structname> struct is an opaque data
+ * type representing a set of sources to be handled in a main loop.
+ */
+
+
+/**
+ * GMainLoop:
+ *
+ * The <structname>GMainLoop</structname> struct is an opaque data type
+ * representing the main event loop of a GLib or GTK+ application.
+ */
+
+
+/**
+ * GMappedFile:
+ *
+ * The #GMappedFile represents a file mapping created with
+ * g_mapped_file_new(). It has only private members and should
+ * not be accessed directly.
+ */
+
+
+/**
+ * GMarkupCollectType:
+ * @G_MARKUP_COLLECT_INVALID: used to terminate the list of attributes to collect
+ * @G_MARKUP_COLLECT_STRING: collect the string pointer directly from the attribute_values[] array. Expects a parameter of type (const char **). If %G_MARKUP_COLLECT_OPTIONAL is specified and the attribute isn't present then the pointer will be set to %NULL
+ * @G_MARKUP_COLLECT_STRDUP: as with %G_MARKUP_COLLECT_STRING, but expects a parameter of type (char **) and g_strdup()s the returned pointer. The pointer must be freed with g_free()
+ * @G_MARKUP_COLLECT_BOOLEAN: expects a parameter of type (gboolean *) and parses the attribute value as a boolean. Sets %FALSE if the attribute isn't present. Valid boolean values consist of (case-insensitive) "false", "f", "no", "n", "0" and "true", "t", "yes", "y", "1"
+ * @G_MARKUP_COLLECT_TRISTATE: as with %G_MARKUP_COLLECT_BOOLEAN, but in the case of a missing attribute a value is set that compares equal to neither %FALSE nor %TRUE G_MARKUP_COLLECT_OPTIONAL is implied
+ * @G_MARKUP_COLLECT_OPTIONAL: can be bitwise ORed with the other fields. If present, allows the attribute not to appear. A default value is set depending on what value type is used
+ *
+ * A mixed enumerated type and flags field. You must specify one type
+ * (string, strdup, boolean, tristate).  Additionally, you may  optionally
+ * bitwise OR the type with the flag %G_MARKUP_COLLECT_OPTIONAL.
+ *
+ * It is likely that this enum will be extended in the future to
+ * support other types.
+ */
+
+
+/**
+ * GMarkupError:
+ * @G_MARKUP_ERROR_BAD_UTF8: text being parsed was not valid UTF-8
+ * @G_MARKUP_ERROR_EMPTY: document contained nothing, or only whitespace
+ * @G_MARKUP_ERROR_PARSE: document was ill-formed
+ * @G_MARKUP_ERROR_UNKNOWN_ELEMENT: error should be set by #GMarkupParser functions; element wasn't known
+ * @G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE: error should be set by #GMarkupParser functions; attribute wasn't known
+ * @G_MARKUP_ERROR_INVALID_CONTENT: error should be set by #GMarkupParser functions; content was invalid
+ * @G_MARKUP_ERROR_MISSING_ATTRIBUTE: error should be set by #GMarkupParser functions; a required attribute was missing
+ *
+ * Error codes returned by markup parsing.
+ */
+
+
+/**
+ * GMarkupParseContext:
+ *
+ * A parse context is used to parse a stream of bytes that
+ * you expect to contain marked-up text.
+ *
+ * See g_markup_parse_context_new(), #GMarkupParser, and so
+ * on for more details.
+ */
+
+
+/**
+ * GMarkupParseFlags:
+ * @G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG: flag you should not use
+ * @G_MARKUP_TREAT_CDATA_AS_TEXT: When this flag is set, CDATA marked sections are not passed literally to the @passthrough function of the parser. Instead, the content of the section (without the <literal>&lt;![CDATA[</literal> and <literal>]]&gt;</literal>) is passed to the @text function. This flag was added in GLib 2.12
+ * @G_MARKUP_PREFIX_ERROR_POSITION: Normally errors caught by GMarkup itself have line/column information prefixed to them to let the caller know the location of the error. When this flag is set the location information is also prefixed to errors generated by the #GMarkupParser implementation functions
+ *
+ * Flags that affect the behaviour of the parser.
+ */
+
+
+/**
+ * GMarkupParser:
+ * @start_element: Callback to invoke when the opening tag of an element is seen.
+ * @end_element: Callback to invoke when the closing tag of an element is seen. Note that this is also called for empty tags like <literal>&lt;empty/&gt;</literal>.
+ * @text: Callback to invoke when some text is seen (text is always inside an element). Note that the text of an element may be spread over multiple calls of this function. If the %G_MARKUP_TREAT_CDATA_AS_TEXT flag is set, this function is also called for the content of CDATA marked sections.
+ * @passthrough: Callback to invoke for comments, processing instructions and doctype declarations; if you're re-writing the parsed document, write the passthrough text back out in the same position. If the %G_MARKUP_TREAT_CDATA_AS_TEXT flag is not set, this function is also called for CDATA marked sections.
+ * @error: Callback to invoke when an error occurs.
+ *
+ * Any of the fields in #GMarkupParser can be %NULL, in which case they
+ * will be ignored. Except for the @error function, any of these callbacks
+ * can set an error; in particular the %G_MARKUP_ERROR_UNKNOWN_ELEMENT,
+ * %G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, and %G_MARKUP_ERROR_INVALID_CONTENT
+ * errors are intended to be set from these callbacks. If you set an error
+ * from a callback, g_markup_parse_context_parse() will report that error
+ * back to its caller.
+ */
+
+
+/**
+ * GMemVTable:
+ * @malloc: function to use for allocating memory.
+ * @realloc: function to use for reallocating memory.
+ * @free: function to use to free memory.
+ * @calloc: function to use for allocating zero-filled memory.
+ * @try_malloc: function to use for allocating memory without a default error handler.
+ * @try_realloc: function to use for reallocating memory without a default error handler.
+ *
+ * A set of functions used to perform memory allocation. The same #GMemVTable must
+ * be used for all allocations in the same program; a call to g_mem_set_vtable(),
+ * if it exists, should be prior to any use of GLib.
+ */
+
+
+/**
+ * GMutex:
+ *
+ * The #GMutex struct is an opaque data structure to represent a mutex
+ * (mutual exclusion). It can be used to protect data against shared
+ * access. Take for example the following function:
+ *
+ * <example>
+ * <title>A function which will not work in a threaded environment</title>
+ * <programlisting>
+ * int
+ * give_me_next_number (void)
+ * {
+ * static int current_number = 0;
+ *
+ * /<!-- -->* now do a very complicated calculation to calculate the new
+ * * number, this might for example be a random number generator
+ * *<!-- -->/
+ * current_number = calc_next_number (current_number);
+ *
+ * return current_number;
+ * }
+ * </programlisting>
+ * </example>
+ *
+ * It is easy to see that this won't work in a multi-threaded
+ * application. There current_number must be protected against shared
+ * access. A #GMutex can be used as a solution to this problem:
+ *
+ * <example>
+ * <title>Using GMutex to protected a shared variable</title>
+ * <programlisting>
+ * int
+ * give_me_next_number (void)
+ * {
+ * static GMutex mutex;
+ * static int current_number = 0;
+ * int ret_val;
+ *
+ * g_mutex_lock (&amp;mutex);
+ * ret_val = current_number = calc_next_number (current_number);
+ * g_mutex_unlock (&amp;mutex);
+ *
+ * return ret_val;
+ * }
+ * </programlisting>
+ * </example>
+ *
+ * Notice that the #GMutex is not initialised to any particular value.
+ * Its placement in static storage ensures that it will be initialised
+ * to all-zeros, which is appropriate.
+ *
+ * If a #GMutex is placed in other contexts (eg: embedded in a struct)
+ * then it must be explicitly initialised using g_mutex_init().
+ *
+ * A #GMutex should only be accessed via <function>g_mutex_</function>
+ * functions.
+ */
+
+
+/**
+ * GNode:
+ * @data: contains the actual data of the node.
+ * @next: points to the node's next sibling (a sibling is another #GNode with the same parent).
+ * @prev: points to the node's previous sibling.
+ * @parent: points to the parent of the #GNode, or is %NULL if the #GNode is the root of the tree.
+ * @children: points to the first child of the #GNode.  The other children are accessed by using the @next pointer of each child.
+ *
+ * The #GNode struct represents one node in a
+ * <link linkend="glib-N-ary-Trees">N-ary Tree</link>. fields
+ */
+
+
+/**
+ * GNodeForeachFunc:
+ * @node: a #GNode.
+ * @data: user data passed to g_node_children_foreach().
+ *
+ * Specifies the type of function passed to g_node_children_foreach().
+ * The function is called with each child node, together with the user
+ * data passed to g_node_children_foreach().
+ */
+
+
+/**
+ * GNodeTraverseFunc:
+ * @node: a #GNode.
+ * @data: user data passed to g_node_traverse().
+ * @Returns: %TRUE to stop the traversal.
+ *
+ * Specifies the type of function passed to g_node_traverse(). The
+ * function is called with each of the nodes visited, together with the
+ * user data passed to g_node_traverse(). If the function returns
+ * %TRUE, then the traversal is stopped.
+ */
+
+
+/**
+ * GNormalizeMode:
+ * @G_NORMALIZE_DEFAULT: standardize differences that do not affect the text content, such as the above-mentioned accent representation
+ * @G_NORMALIZE_NFD: another name for %G_NORMALIZE_DEFAULT
+ * @G_NORMALIZE_DEFAULT_COMPOSE: like %G_NORMALIZE_DEFAULT, but with composed forms rather than a maximally decomposed form
+ * @G_NORMALIZE_NFC: another name for %G_NORMALIZE_DEFAULT_COMPOSE
+ * @G_NORMALIZE_ALL: beyond %G_NORMALIZE_DEFAULT also standardize the "compatibility" characters in Unicode, such as SUPERSCRIPT THREE to the standard forms (in this case DIGIT THREE). Formatting information may be lost but for most text operations such characters should be considered the same
+ * @G_NORMALIZE_NFKD: another name for %G_NORMALIZE_ALL
+ * @G_NORMALIZE_ALL_COMPOSE: like %G_NORMALIZE_ALL, but with composed forms rather than a maximally decomposed form
+ * @G_NORMALIZE_NFKC: another name for %G_NORMALIZE_ALL_COMPOSE
+ *
+ * Defines how a Unicode string is transformed in a canonical
+ * form, standardizing such issues as whether a character with
+ * an accent is represented as a base character and combining
+ * accent or as a single precomposed character. Unicode strings
+ * should generally be normalized before comparing them.
+ */
+
+
+/**
+ * GObject:
+ *
+ * All the fields in the <structname>GObject</structname> structure are private
+ * to the #GObject implementation and should never be accessed directly.
+ */
+
+
+/**
+ * GObjectClass:
+ * @g_type_class: the parent class
+ * @constructor: the @constructor function is called by g_object_new () to complete the object initialization after all the construction properties are set. The first thing a @constructor implementation must do is chain up to the @constructor of the parent class. Overriding @constructor should be rarely needed, e.g. to handle construct properties, or to implement singletons.
+ * @set_property: the generic setter for all properties of this type. Should be overridden for every type with properties. Implementations of @set_property don't need to emit property change notification explicitly, this is handled by the type system.
+ * @get_property: the generic getter for all properties of this type. Should be overridden for every type with properties.
+ * @dispose: the @dispose function is supposed to drop all references to other objects, but keep the instance otherwise intact, so that client method invocations still work. It may be run multiple times (due to reference loops). Before returning, @dispose should chain up to the @dispose method of the parent class.
+ * @finalize: instance finalization function, should finish the finalization of the instance begun in @dispose and chain up to the @finalize method of the parent class.
+ * @dispatch_properties_changed: emits property change notification for a bunch of properties. Overriding @dispatch_properties_changed should be rarely needed.
+ * @notify: the class closure for the notify signal
+ * @constructed: the @constructed function is called by g_object_new() as the final step of the object creation process.  At the point of the call, all construction properties have been set on the object.  The purpose of this call is to allow for object initialisation steps that can only be performed after construction properties have been set.  @constructed implementors should chain up to the @constructed call of their parent class to allow it to complete its initialisation.
+ *
+ * The class structure for the <structname>GObject</structname> type.
+ *
+ * <example>
+ * <title>Implementing singletons using a constructor</title>
+ * <programlisting>
+ * static MySingleton *the_singleton = NULL;
+ *
+ * static GObject*
+ * my_singleton_constructor (GType                  type,
+ * guint                  n_construct_params,
+ * GObjectConstructParam *construct_params)
+ * {
+ * GObject *object;
+ *
+ * if (!the_singleton)
+ * {
+ * object = G_OBJECT_CLASS (parent_class)->constructor (type,
+ * n_construct_params,
+ * construct_params);
+ * the_singleton = MY_SINGLETON (object);
+ * }
+ * else
+ * object = g_object_ref (G_OBJECT (the_singleton));
+ *
+ * return object;
+ * }
+ * </programlisting></example>
+ */
+
+
+/**
+ * GObjectConstructParam:
+ * @pspec: the #GParamSpec of the construct parameter
+ * @value: the value to set the parameter to
+ *
+ * The <structname>GObjectConstructParam</structname> struct is an auxiliary
+ * structure used to hand #GParamSpec/#GValue pairs to the @constructor of
+ * a #GObjectClass.
+ */
+
+
+/**
+ * GObjectFinalizeFunc:
+ * @object: the #GObject being finalized
+ *
+ * The type of the @finalize function of #GObjectClass.
+ */
+
+
+/**
+ * GObjectGetPropertyFunc:
+ * @object: a #GObject
+ * @property_id: the numeric id under which the property was registered with g_object_class_install_property().
+ * @value: a #GValue to return the property value in
+ * @pspec: the #GParamSpec describing the property
+ *
+ * The type of the @get_property function of #GObjectClass.
+ */
+
+
+/**
+ * GObjectSetPropertyFunc:
+ * @object: a #GObject
+ * @property_id: the numeric id under which the property was registered with g_object_class_install_property().
+ * @value: the new value for the property
+ * @pspec: the #GParamSpec describing the property
+ *
+ * The type of the @set_property function of #GObjectClass.
+ */
+
+
+/**
+ * GOnce:
+ * @status: the status of the #GOnce
+ * @retval: the value returned by the call to the function, if @status is %G_ONCE_STATUS_READY
+ *
+ * A #GOnce struct controls a one-time initialization function. Any
+ * one-time initialization function must have its own unique #GOnce
+ * struct.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * GOnceStatus:
+ * @G_ONCE_STATUS_NOTCALLED: the function has not been called yet.
+ * @G_ONCE_STATUS_PROGRESS: the function call is currently in progress.
+ * @G_ONCE_STATUS_READY: the function has been called.
+ *
+ * The possible statuses of a one-time initialization function
+ * controlled by a #GOnce struct.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * GOptionArg:
+ * @G_OPTION_ARG_NONE: No extra argument. This is useful for simple flags.
+ * @G_OPTION_ARG_STRING: The option takes a string argument.
+ * @G_OPTION_ARG_INT: The option takes an integer argument.
+ * @G_OPTION_ARG_CALLBACK: The option provides a callback to parse the extra argument.
+ * @G_OPTION_ARG_FILENAME: The option takes a filename as argument.
+ * @G_OPTION_ARG_STRING_ARRAY: The option takes a string argument, multiple uses of the option are collected into an array of strings.
+ * @G_OPTION_ARG_FILENAME_ARRAY: The option takes a filename as argument, multiple uses of the option are collected into an array of strings.
+ * @G_OPTION_ARG_DOUBLE: The option takes a double argument. The argument can be formatted either for the user's locale or for the "C" locale. Since 2.12
+ * @G_OPTION_ARG_INT64: The option takes a 64-bit integer. Like %G_OPTION_ARG_INT but for larger numbers. The number can be in decimal base, or in hexadecimal (when prefixed with <literal>0x</literal>, for example, <literal>0xffffffff</literal>). Since 2.12
+ *
+ * The #GOptionArg enum values determine which type of extra argument the
+ * options expect to find. If an option expects an extra argument, it
+ * can be specified in several ways; with a short option:
+ * <option>-x arg</option>, with a long option: <option>--name arg</option>
+ * or combined in a single argument: <option>--name=arg</option>.
+ */
+
+
+/**
+ * GOptionArgFunc:
+ * @option_name: The name of the option being parsed. This will be either a single dash followed by a single letter (for a short name) or two dashes followed by a long option name.
+ * @value: The value to be parsed.
+ * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
+ * @error: A return location for errors. The error code %G_OPTION_ERROR_FAILED is intended to be used for errors in #GOptionArgFunc callbacks.
+ *
+ * The type of function to be passed as callback for %G_OPTION_ARG_CALLBACK
+ * options.
+ *
+ * occurred, in which case @error should be set with g_set_error()
+ *
+ * Returns: %TRUE if the option was successfully parsed, %FALSE if an error
+ */
+
+
+/**
+ * GOptionContext:
+ *
+ * A <structname>GOptionContext</structname> struct defines which options
+ * are accepted by the commandline option parser. The struct has only private
+ * fields and should not be directly accessed.
+ */
+
+
+/**
+ * GOptionEntry:
+ * @long_name: The long name of an option can be used to specify it in a commandline as --<replaceable>long_name</replaceable>. Every option must have a long name. To resolve conflicts if multiple option groups contain the same long name, it is also possible to specify the option as --<replaceable>groupname</replaceable>-<replaceable>long_name</replaceable>.
+ * @short_name: If an option has a short name, it can be specified -<replaceable>short_name</replaceable> in a commandline. @short_name must be a printable ASCII character different from '-', or zero if the option has no short name.
+ * @flags: Flags from #GOptionFlags.
+ * @arg: The type of the option, as a #GOptionArg.
+ * @arg_data: If the @arg type is %G_OPTION_ARG_CALLBACK, then @arg_data must point to a #GOptionArgFunc callback function, which will be called to handle the extra argument. Otherwise, @arg_data is a pointer to a location to store the value, the required type of the location depends on the @arg type: <variablelist> <varlistentry> <term>%G_OPTION_ARG_NONE</term> <listitem><para>%gboolean</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_STRING</term> <listitem><para>%gchar*</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_INT</term> <listitem><para>%gint</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_FILENAME</term> <listitem><para>%gchar*</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_STRING_ARRAY</term> <listitem><para>%gchar**</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_FILENAME_ARRAY</term> <listitem><para>%gchar**</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_DOUBLE</term> <listitem><para>%gdouble</para></listitem> </varlistentry> </variablelist> If @arg type is %G_OPTION_ARG_STRING or %G_OPTION_ARG_FILENAME the location will contain a newly allocated string if the option was given. That string needs to be freed by the callee using g_free(). Likewise if @arg type is %G_OPTION_ARG_STRING_ARRAY or %G_OPTION_ARG_FILENAME_ARRAY, the data should be freed using g_strfreev().
+ * @description: the description for the option in <option>--help</option> output. The @description is translated using the @translate_func of the group, see g_option_group_set_translation_domain().
+ * @arg_description: The placeholder to use for the extra argument parsed by the option in <option>--help</option> output. The @arg_description is translated using the @translate_func of the group, see g_option_group_set_translation_domain().
+ *
+ * A <structname>GOptionEntry</structname> defines a single option.
+ * To have an effect, they must be added to a #GOptionGroup with
+ * g_option_context_add_main_entries() or g_option_group_add_entries().
+ */
+
+
+/**
+ * GOptionError:
+ * @G_OPTION_ERROR_UNKNOWN_OPTION: An option was not known to the parser. This error will only be reported, if the parser hasn't been instructed to ignore unknown options, see g_option_context_set_ignore_unknown_options().
+ * @G_OPTION_ERROR_BAD_VALUE: A value couldn't be parsed.
+ * @G_OPTION_ERROR_FAILED: A #GOptionArgFunc callback failed.
+ *
+ * Error codes returned by option parsing.
+ */
+
+
+/**
+ * GOptionErrorFunc:
+ * @context: The active #GOptionContext
+ * @group: The group to which the function belongs
+ * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
+ * @error: The #GError containing details about the parse error
+ *
+ * The type of function to be used as callback when a parse error occurs.
+ */
+
+
+/**
+ * GOptionFlags:
+ * @G_OPTION_FLAG_HIDDEN: The option doesn't appear in <option>--help</option> output.
+ * @G_OPTION_FLAG_IN_MAIN: The option appears in the main section of the <option>--help</option> output, even if it is defined in a group.
+ * @G_OPTION_FLAG_REVERSE: For options of the %G_OPTION_ARG_NONE kind, this flag indicates that the sense of the option is reversed.
+ * @G_OPTION_FLAG_NO_ARG: For options of the %G_OPTION_ARG_CALLBACK kind, this flag indicates that the callback does not take any argument (like a %G_OPTION_ARG_NONE option). Since 2.8
+ * @G_OPTION_FLAG_FILENAME: For options of the %G_OPTION_ARG_CALLBACK kind, this flag indicates that the argument should be passed to the callback in the GLib filename encoding rather than UTF-8. Since 2.8
+ * @G_OPTION_FLAG_OPTIONAL_ARG: For options of the %G_OPTION_ARG_CALLBACK kind, this flag indicates that the argument supply is optional. If no argument is given then data of %GOptionParseFunc will be set to NULL. Since 2.8
+ * @G_OPTION_FLAG_NOALIAS: This flag turns off the automatic conflict resolution which prefixes long option names with <literal>groupname-</literal> if there is a conflict. This option should only be used in situations where aliasing is necessary to model some legacy commandline interface. It is not safe to use this option, unless all option groups are under your direct control. Since 2.8.
+ *
+ * Flags which modify individual options.
+ */
+
+
+/**
+ * GOptionGroup:
+ *
+ * A <structname>GOptionGroup</structname> struct defines the options in a single
+ * group. The struct has only private fields and should not be directly accessed.
+ *
+ * All options in a group share the same translation function. Libraries which
+ * need to parse commandline options are expected to provide a function for
+ * getting a <structname>GOptionGroup</structname> holding their options, which
+ * the application can then add to its #GOptionContext.
+ */
+
+
+/**
+ * GOptionParseFunc:
+ * @context: The active #GOptionContext
+ * @group: The group to which the function belongs
+ * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
+ * @error: A return location for error details
+ *
+ * The type of function that can be called before and after parsing.
+ *
+ * occurred, in which case @error should be set with g_set_error()
+ *
+ * Returns: %TRUE if the function completed successfully, %FALSE if an error
+ */
+
+
+/**
+ * GPOINTER_TO_INT:
+ * @p: pointer containing an integer
+ *
+ * Extracts an integer from a pointer. The integer must have
+ * been stored in the pointer with GINT_TO_POINTER().
+ *
+ * Remember, you may not store pointers in integers. This is not portable
+ * in any way, shape or form. These macros <emphasis>only</emphasis> allow
+ * storing integers in pointers, and only preserve 32 bits of the
+ * integer; values outside the range of a 32-bit integer will be mangled.
+ */
+
+
+/**
+ * GPOINTER_TO_SIZE:
+ * @p: pointer to extract a #gsize from
+ *
+ * Extracts a #gsize from a pointer. The #gsize must have
+ * been stored in the pointer with GSIZE_TO_POINTER().
+ */
+
+
+/**
+ * GPOINTER_TO_UINT:
+ * @p: pointer to extract an unsigned integer from
+ *
+ * Extracts an unsigned integer from a pointer. The integer must have
+ * been stored in the pointer with GUINT_TO_POINTER().
+ */
+
+
+/**
+ * GParamFlags:
+ * @G_PARAM_READABLE: the parameter is readable
+ * @G_PARAM_WRITABLE: the parameter is writable
+ * @G_PARAM_CONSTRUCT: the parameter will be set upon object construction
+ * @G_PARAM_CONSTRUCT_ONLY: the parameter will only be set upon object construction
+ * @G_PARAM_LAX_VALIDATION: upon parameter conversion (see g_param_value_convert()) strict validation is not required
+ * @G_PARAM_STATIC_NAME: the string used as name when constructing the parameter is guaranteed to remain valid and unmodified for the lifetime of the parameter. Since 2.8
+ * @G_PARAM_STATIC_NICK: the string used as nick when constructing the parameter is guaranteed to remain valid and unmmodified for the lifetime of the parameter. Since 2.8
+ * @G_PARAM_STATIC_BLURB: the string used as blurb when constructing the parameter is guaranteed to remain valid and unmodified for the lifetime of the parameter. Since 2.8
+ * @G_PARAM_PRIVATE: internal
+ * @G_PARAM_DEPRECATED: the parameter is deprecated and will be removed in a future version. A warning will be generated if it is used while running with G_ENABLE_DIAGNOSTIC=1. Since: 2.26
+ *
+ * Through the #GParamFlags flag values, certain aspects of parameters
+ * can be configured.
+ */
+
+
+/**
+ * GParamSpec:
+ * @g_type_instance: private #GTypeInstance portion
+ * @name: name of this parameter: always an interned string
+ * @flags: #GParamFlags flags for this parameter
+ * @value_type: the #GValue type for this parameter
+ * @owner_type: #GType type that uses (introduces) this parameter
+ *
+ * All other fields of the <structname>GParamSpec</structname> struct are private and
+ * should not be used directly.
+ */
+
+
+/**
+ * GParamSpecBoolean:
+ * @parent_instance: private #GParamSpec portion
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for boolean properties.
+ */
+
+
+/**
+ * GParamSpecBoxed:
+ * @parent_instance: private #GParamSpec portion
+ *
+ * A #GParamSpec derived structure that contains the meta data for boxed properties.
+ */
+
+
+/**
+ * GParamSpecChar:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for character properties.
+ */
+
+
+/**
+ * GParamSpecClass:
+ * @g_type_class: the parent class
+ * @value_type: the #GValue type for this parameter
+ * @finalize: The instance finalization function (optional), should chain up to the finalize method of the parent class.
+ * @value_set_default: Resets a @value to the default value for this type (recommended, the default is g_value_reset()), see g_param_value_set_default().
+ * @value_validate: Ensures that the contents of @value comply with the specifications set out by this type (optional), see g_param_value_validate().
+ * @values_cmp: Compares @value1 with @value2 according to this type (recommended, the default is memcmp()), see g_param_values_cmp().
+ *
+ * The class structure for the <structname>GParamSpec</structname> type.
+ * Normally, <structname>GParamSpec</structname> classes are filled by
+ * g_param_type_register_static().
+ */
+
+
+/**
+ * GParamSpecDouble:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * @epsilon: values closer than @epsilon will be considered identical by g_param_values_cmp(); the default value is 1e-90.
+ *
+ * A #GParamSpec derived structure that contains the meta data for double properties.
+ */
+
+
+/**
+ * GParamSpecEnum:
+ * @parent_instance: private #GParamSpec portion
+ * @enum_class: the #GEnumClass for the enum
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for enum
+ * properties.
+ */
+
+
+/**
+ * GParamSpecFlags:
+ * @parent_instance: private #GParamSpec portion
+ * @flags_class: the #GFlagsClass for the flags
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for flags
+ * properties.
+ */
+
+
+/**
+ * GParamSpecFloat:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * @epsilon: values closer than @epsilon will be considered identical by g_param_values_cmp(); the default value is 1e-30.
+ *
+ * A #GParamSpec derived structure that contains the meta data for float properties.
+ */
+
+
+/**
+ * GParamSpecGType:
+ * @parent_instance: private #GParamSpec portion
+ * @is_a_type: a #GType whose subtypes can occur as values
+ *
+ * A #GParamSpec derived structure that contains the meta data for #GType properties.
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * GParamSpecInt:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for integer properties.
+ */
+
+
+/**
+ * GParamSpecInt64:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for 64bit integer properties.
+ */
+
+
+/**
+ * GParamSpecLong:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for long integer properties.
+ */
+
+
+/**
+ * GParamSpecObject:
+ * @parent_instance: private #GParamSpec portion
+ *
+ * A #GParamSpec derived structure that contains the meta data for object properties.
+ */
+
+
+/**
+ * GParamSpecOverride:
+ *
+ * This is a type of #GParamSpec type that simply redirects operations to
+ * another paramspec.  All operations other than getting or
+ * setting the value are redirected, including accessing the nick and
+ * blurb, validating a value, and so forth. See
+ * g_param_spec_get_redirect_target() for retrieving the overidden
+ * property. #GParamSpecOverride is used in implementing
+ * g_object_class_override_property(), and will not be directly useful
+ * unless you are implementing a new base type similar to GObject.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * GParamSpecParam:
+ * @parent_instance: private #GParamSpec portion
+ *
+ * A #GParamSpec derived structure that contains the meta data for %G_TYPE_PARAM
+ * properties.
+ */
+
+
+/**
+ * GParamSpecPointer:
+ * @parent_instance: private #GParamSpec portion
+ *
+ * A #GParamSpec derived structure that contains the meta data for pointer properties.
+ */
+
+
+/**
+ * GParamSpecString:
+ * @parent_instance: private #GParamSpec portion
+ * @default_value: default value for the property specified
+ * @cset_first: a string containing the allowed values for the first byte
+ * @cset_nth: a string containing the allowed values for the subsequent bytes
+ * @substitutor: the replacement byte for bytes which don't match @cset_first or @cset_nth.
+ * @null_fold_if_empty: replace empty string by %NULL
+ * @ensure_non_null: replace %NULL strings by an empty string
+ *
+ * A #GParamSpec derived structure that contains the meta data for string
+ * properties.
+ */
+
+
+/**
+ * GParamSpecTypeInfo:
+ * @instance_size: Size of the instance (object) structure.
+ * @n_preallocs: Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the <link linkend="glib-Memory-Slices">slice allocator</link> now.
+ * @instance_init: Location of the instance initialization function (optional).
+ * @value_type: The #GType of values conforming to this #GParamSpec
+ * @finalize: The instance finalization function (optional).
+ * @value_set_default: Resets a @value to the default value for @pspec (recommended, the default is g_value_reset()), see g_param_value_set_default().
+ * @value_validate: Ensures that the contents of @value comply with the specifications set out by @pspec (optional), see g_param_value_validate().
+ * @values_cmp: Compares @value1 with @value2 according to @pspec (recommended, the default is memcmp()), see g_param_values_cmp().
+ *
+ * This structure is used to provide the type system with the information
+ * required to initialize and destruct (finalize) a parameter's class and
+ * instances thereof.
+ * The initialized structure is passed to the g_param_type_register_static()
+ * The type system will perform a deep copy of this structure, so its memory
+ * does not need to be persistent across invocation of
+ * g_param_type_register_static().
+ */
+
+
+/**
+ * GParamSpecUChar:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for unsigned character properties.
+ */
+
+
+/**
+ * GParamSpecUInt:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for unsigned integer properties.
+ */
+
+
+/**
+ * GParamSpecUInt64:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for unsigned 64bit integer properties.
+ */
+
+
+/**
+ * GParamSpecULong:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for unsigned long integer properties.
+ */
+
+
+/**
+ * GParamSpecUnichar:
+ * @parent_instance: private #GParamSpec portion
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for unichar (unsigned integer) properties.
+ */
+
+
+/**
+ * GParamSpecValueArray:
+ * @parent_instance: private #GParamSpec portion
+ * @element_spec: a #GParamSpec describing the elements contained in arrays of this property, may be %NULL
+ * @fixed_n_elements: if greater than 0, arrays of this property will always have this many elements
+ *
+ * A #GParamSpec derived structure that contains the meta data for #GValueArray properties.
+ */
+
+
+/**
+ * GParamSpecVariant:
+ * @parent_instance: private #GParamSpec portion
+ * @type: a #GVariantType, or %NULL
+ * @default_value: a #GVariant, or %NULL
+ *
+ * A #GParamSpec derived structure that contains the meta data for #GVariant properties.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GParameter:
+ * @name: the parameter name
+ * @value: the parameter value
+ *
+ * The <structname>GParameter</structname> struct is an auxiliary structure used
+ * to hand parameter name/value pairs to g_object_newv().
+ */
+
+
+/**
+ * GPatternSpec:
+ *
+ * A <structname>GPatternSpec</structname> is the 'compiled' form of a
+ * pattern. This structure is opaque and its fields cannot be accessed
+ * directly.
+ */
+
+
+/**
+ * GPid:
+ *
+ * A type which is used to hold a process identification.
+ *
+ * On UNIX, processes are identified by a process id (an integer),
+ * while Windows uses process handles (which are pointers).
+ *
+ * GPid is used in GLib only for descendant processes spawned with
+ * the g_spawn functions.
+ */
+
+
+/**
+ * GPollFD:
+ * @fd: the file descriptor to poll (or a <type>HANDLE</type> on Win32)
+ * @events: a bitwise combination from #GIOCondition, specifying which events should be polled for. Typically for reading from a file descriptor you would use %G_IO_IN | %G_IO_HUP | %G_IO_ERR, and for writing you would use %G_IO_OUT | %G_IO_ERR.
+ * @revents: a bitwise combination of flags from #GIOCondition, returned from the poll() function to indicate which events occurred.
+ *
+ * Represents a file descriptor, which events to poll for, and which events
+ * occurred.
+ */
+
+
+/**
+ * GPollFunc:
+ * @ufds: an array of #GPollFD elements
+ * @nfsd: the number of elements in @ufds
+ * @timeout_: the maximum time to wait for an event of the file descriptors. A negative value indicates an infinite timeout.
+ *
+ * Specifies the type of function passed to g_main_context_set_poll_func().
+ * The semantics of the function should match those of the poll() system call.
+ *
+ * reported, or -1 if an error occurred.
+ *
+ * Returns: the number of #GPollFD elements which have events or errors
+ */
+
+
+/**
+ * GPrintFunc:
+ * @string: the message to output
+ *
+ * Specifies the type of the print handler functions.
+ * These are called with the complete formatted string to output.
+ */
+
+
+/**
+ * GPrivate:
+ *
+ * The #GPrivate struct is an opaque data structure to represent a
+ * thread-local data key. It is approximately equivalent to the
+ * pthread_setspecific()/pthread_getspecific() APIs on POSIX and to
+ * TlsSetValue()/TlsGetValue() on Windows.
+ *
+ * If you don't already know why you might want this functionality,
+ * then you probably don't need it.
+ *
+ * #GPrivate is a very limited resource (as far as 128 per program,
+ * shared between all libraries). It is also not possible to destroy a
+ * #GPrivate after it has been used. As such, it is only ever acceptable
+ * to use #GPrivate in static scope, and even then sparingly so.
+ *
+ * See G_PRIVATE_INIT() for a couple of examples.
+ *
+ * The #GPrivate structure should be considered opaque.  It should only
+ * be accessed via the <function>g_private_</function> functions.
+ */
+
+
+/**
+ * GPtrArray:
+ * @pdata: points to the array of pointers, which may be moved when the array grows.
+ * @len: number of pointers in the array.
+ *
+ * Contains the public fields of a pointer array.
+ */
+
+
+/**
+ * GQuark:
+ *
+ * A GQuark is a non-zero integer which uniquely identifies a
+ * particular string. A GQuark value of zero is associated to %NULL.
+ */
+
+
+/**
+ * GQueue:
+ * @head: a pointer to the first element of the queue
+ * @tail: a pointer to the last element of the queue
+ * @length: the number of elements in the queue
+ *
+ * Contains the public fields of a
+ * <link linkend="glib-Double-ended-Queues">Queue</link>.
+ */
+
+
+/**
+ * GRWLock:
+ *
+ * The GRWLock struct is an opaque data structure to represent a
+ * reader-writer lock. It is similar to a #GMutex in that it allows
+ * multiple threads to coordinate access to a shared resource.
+ *
+ * The difference to a mutex is that a reader-writer lock discriminates
+ * between read-only ('reader') and full ('writer') access. While only
+ * one thread at a time is allowed write access (by holding the 'writer'
+ * lock via g_rw_lock_writer_lock()), multiple threads can gain
+ * simultaneous read-only access (by holding the 'reader' lock via
+ * g_rw_lock_reader_lock()).
+ *
+ * <example>
+ * <title>An array with access functions</title>
+ * <programlisting>
+ * GRWLock lock;
+ * GPtrArray *array;
+ *
+ * gpointer
+ * my_array_get (guint index)
+ * {
+ * gpointer retval = NULL;
+ *
+ * if (!array)
+ * return NULL;
+ *
+ * g_rw_lock_reader_lock (&amp;lock);
+ * if (index &lt; array->len)
+ * retval = g_ptr_array_index (array, index);
+ * g_rw_lock_reader_unlock (&amp;lock);
+ *
+ * return retval;
+ * }
+ *
+ * void
+ * my_array_set (guint index, gpointer data)
+ * {
+ * g_rw_lock_writer_lock (&amp;lock);
+ *
+ * if (!array)
+ * array = g_ptr_array_new (<!-- -->);
+ *
+ * if (index >= array->len)
+ * g_ptr_array_set_size (array, index+1);
+ * g_ptr_array_index (array, index) = data;
+ *
+ * g_rw_lock_writer_unlock (&amp;lock);
+ * }
+ * </programlisting>
+ * <para>
+ * This example shows an array which can be accessed by many readers
+ * (the <function>my_array_get()</function> function) simultaneously,
+ * whereas the writers (the <function>my_array_set()</function>
+ * function) will only be allowed once at a time and only if no readers
+ * currently access the array. This is because of the potentially
+ * dangerous resizing of the array. Using these functions is fully
+ * multi-thread safe now.
+ * </para>
+ * </example>
+ *
+ * If a #GRWLock is allocated in static storage then it can be used
+ * without initialisation.  Otherwise, you should call
+ * g_rw_lock_init() on it and g_rw_lock_clear() when done.
+ *
+ * A GRWLock should only be accessed with the
+ * <function>g_rw_lock_</function> functions.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GRand:
+ *
+ * The #GRand struct is an opaque data structure. It should only be
+ * accessed through the <function>g_rand_*</function> functions.
+ */
+
+
+/**
+ * GRecMutex:
+ *
+ * The GRecMutex struct is an opaque data structure to represent a
+ * recursive mutex. It is similar to a #GMutex with the difference
+ * that it is possible to lock a GRecMutex multiple times in the same
+ * thread without deadlock. When doing so, care has to be taken to
+ * unlock the recursive mutex as often as it has been locked.
+ *
+ * If a #GRecMutex is allocated in static storage then it can be used
+ * without initialisation.  Otherwise, you should call
+ * g_rec_mutex_init() on it and g_rec_mutex_clear() when done.
+ *
+ * A GRecMutex should only be accessed with the
+ * <function>g_rec_mutex_</function> functions.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GRegex:
+ *
+ * A GRegex is the "compiled" form of a regular expression pattern. This
+ * structure is opaque and its fields cannot be accessed directly.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * GRegexCompileFlags:
+ * @G_REGEX_CASELESS: Letters in the pattern match both upper- and lowercase letters. This option can be changed within a pattern by a "(?i)" option setting.
+ * @G_REGEX_MULTILINE: By default, GRegex treats the strings as consisting of a single line of characters (even if it actually contains newlines). The "start of line" metacharacter ("^") matches only at the start of the string, while the "end of line" metacharacter ("$") matches only at the end of the string, or before a terminating newline (unless #G_REGEX_DOLLAR_ENDONLY is set). When #G_REGEX_MULTILINE is set, the "start of line" and "end of line" constructs match immediately following or immediately before any newline in the string, respectively, as well as at the very start and end. This can be changed within a pattern by a "(?m)" option setting.
+ * @G_REGEX_DOTALL: A dot metacharater (".") in the pattern matches all characters, including newlines. Without it, newlines are excluded. This option can be changed within a pattern by a ("?s") option setting.
+ * @G_REGEX_EXTENDED: Whitespace data characters in the pattern are totally ignored except when escaped or inside a character class. Whitespace does not include the VT character (code 11). In addition, characters between an unescaped "#" outside a character class and the next newline character, inclusive, are also ignored. This can be changed within a pattern by a "(?x)" option setting.
+ * @G_REGEX_ANCHORED: The pattern is forced to be "anchored", that is, it is constrained to match only at the first matching point in the string that is being searched. This effect can also be achieved by appropriate constructs in the pattern itself such as the "^" metacharater.
+ * @G_REGEX_DOLLAR_ENDONLY: A dollar metacharacter ("$") in the pattern matches only at the end of the string. Without this option, a dollar also matches immediately before the final character if it is a newline (but not before any other newlines). This option is ignored if #G_REGEX_MULTILINE is set.
+ * @G_REGEX_UNGREEDY: Inverts the "greediness" of the quantifiers so that they are not greedy by default, but become greedy if followed by "?". It can also be set by a "(?U)" option setting within the pattern.
+ * @G_REGEX_RAW: Usually strings must be valid UTF-8 strings, using this flag they are considered as a raw sequence of bytes. @G_REGEX_NO_AUTO_CAPTURE: Disables the use of numbered capturing parentheses in the pattern. Any opening parenthesis that is not followed by "?" behaves as if it were followed by "?:" but named parentheses can still be used for capturing (and they acquire numbers in the usual way).
+ * @G_REGEX_OPTIMIZE: Optimize the regular expression. If the pattern will be used many times, then it may be worth the effort to optimize it to improve the speed of matches.
+ * @G_REGEX_DUPNAMES: Names used to identify capturing subpatterns need not be unique. This can be helpful for certain types of pattern when it is known that only one instance of the named subpattern can ever be matched.
+ * @G_REGEX_NEWLINE_CR: Usually any newline character is recognized, if this option is set, the only recognized newline character is '\r'.
+ * @G_REGEX_NEWLINE_LF: Usually any newline character is recognized, if this option is set, the only recognized newline character is '\n'.
+ * @G_REGEX_NEWLINE_CRLF: Usually any newline character is recognized, if this option is set, the only recognized newline character sequence is '\r\n'.
+ *
+ * Flags specifying compile-time options.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * GRegexError:
+ * @G_REGEX_ERROR_COMPILE: Compilation of the regular expression failed.
+ * @G_REGEX_ERROR_OPTIMIZE: Optimization of the regular expression failed.
+ * @G_REGEX_ERROR_REPLACE: Replacement failed due to an ill-formed replacement string.
+ * @G_REGEX_ERROR_MATCH: The match process failed.
+ * @G_REGEX_ERROR_INTERNAL: Internal error of the regular expression engine. Since 2.16
+ * @G_REGEX_ERROR_STRAY_BACKSLASH: "\\" at end of pattern. Since 2.16
+ * @G_REGEX_ERROR_MISSING_CONTROL_CHAR: "\\c" at end of pattern. Since 2.16
+ * @G_REGEX_ERROR_UNRECOGNIZED_ESCAPE: Unrecognized character follows "\\". Since 2.16
+ * @G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER: Numbers out of order in "{}" quantifier. Since 2.16
+ * @G_REGEX_ERROR_QUANTIFIER_TOO_BIG: Number too big in "{}" quantifier. Since 2.16
+ * @G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS: Missing terminating "]" for character class. Since 2.16
+ * @G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS: Invalid escape sequence in character class. Since 2.16
+ * @G_REGEX_ERROR_RANGE_OUT_OF_ORDER: Range out of order in character class. Since 2.16
+ * @G_REGEX_ERROR_NOTHING_TO_REPEAT: Nothing to repeat. Since 2.16
+ * @G_REGEX_ERROR_UNRECOGNIZED_CHARACTER: Unrecognized character after "(?", "(?&lt;" or "(?P". Since 2.16
+ * @G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS: POSIX named classes are supported only within a class. Since 2.16
+ * @G_REGEX_ERROR_UNMATCHED_PARENTHESIS: Missing terminating ")" or ")" without opening "(". Since 2.16
+ * @G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE: Reference to non-existent subpattern. Since 2.16
+ * @G_REGEX_ERROR_UNTERMINATED_COMMENT: Missing terminating ")" after comment. Since 2.16
+ * @G_REGEX_ERROR_EXPRESSION_TOO_LARGE: Regular expression too large. Since 2.16
+ * @G_REGEX_ERROR_MEMORY_ERROR: Failed to get memory. Since 2.16
+ * @G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND: Lookbehind assertion is not fixed length. Since 2.16
+ * @G_REGEX_ERROR_MALFORMED_CONDITION: Malformed number or name after "(?(". Since 2.16
+ * @G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES: Conditional group contains more than two branches. Since 2.16
+ * @G_REGEX_ERROR_ASSERTION_EXPECTED: Assertion expected after "(?(". Since 2.16
+ * @G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME: Unknown POSIX class name. Since 2.16
+ * @G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED: POSIX collating elements are not supported. Since 2.16
+ * @G_REGEX_ERROR_HEX_CODE_TOO_LARGE: Character value in "\\x{...}" sequence is too large. Since 2.16
+ * @G_REGEX_ERROR_INVALID_CONDITION: Invalid condition "(?(0)". Since 2.16
+ * @G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND: \\C not allowed in lookbehind assertion. Since 2.16
+ * @G_REGEX_ERROR_INFINITE_LOOP: Recursive call could loop indefinitely. Since 2.16
+ * @G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR: Missing terminator in subpattern name. Since 2.16
+ * @G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME: Two named subpatterns have the same name. Since 2.16
+ * @G_REGEX_ERROR_MALFORMED_PROPERTY: Malformed "\\P" or "\\p" sequence. Since 2.16
+ * @G_REGEX_ERROR_UNKNOWN_PROPERTY: Unknown property name after "\\P" or "\\p". Since 2.16
+ * @G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG: Subpattern name is too long (maximum 32 characters). Since 2.16
+ * @G_REGEX_ERROR_TOO_MANY_SUBPATTERNS: Too many named subpatterns (maximum 10,000). Since 2.16
+ * @G_REGEX_ERROR_INVALID_OCTAL_VALUE: Octal value is greater than "\\377". Since 2.16
+ * @G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE: "DEFINE" group contains more than one branch. Since 2.16
+ * @G_REGEX_ERROR_DEFINE_REPETION: Repeating a "DEFINE" group is not allowed. Since 2.16
+ * @G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS: Inconsistent newline options. Since 2.16
+ * @G_REGEX_ERROR_MISSING_BACK_REFERENCE: "\\g" is not followed by a braced name or an optionally braced non-zero number. Since 2.16
+ *
+ * Error codes returned by regular expressions functions.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * GRegexEvalCallback:
+ * @match_info: the #GMatchInfo generated by the match. Use g_match_info_get_regex() and g_match_info_get_string() if you need the #GRegex or the matched string.
+ * @result: a #GString containing the new string
+ * @user_data: user data passed to g_regex_replace_eval()
+ *
+ * Specifies the type of the function passed to g_regex_replace_eval().
+ * It is called for each occurrence of the pattern in the string passed
+ * to g_regex_replace_eval(), and it should append the replacement to
+ * @result.
+ *
+ * Returns: %FALSE to continue the replacement process, %TRUE to stop it
+ * Since: 2.14
+ */
+
+
+/**
+ * GRegexMatchFlags:
+ * @G_REGEX_MATCH_ANCHORED: The pattern is forced to be "anchored", that is, it is constrained to match only at the first matching point in the string that is being searched. This effect can also be achieved by appropriate constructs in the pattern itself such as the "^" metacharater.
+ * @G_REGEX_MATCH_NOTBOL: Specifies that first character of the string is not the beginning of a line, so the circumflex metacharacter should not match before it. Setting this without #G_REGEX_MULTILINE (at compile time) causes circumflex never to match. This option affects only the behaviour of the circumflex metacharacter, it does not affect "\A".
+ * @G_REGEX_MATCH_NOTEOL: Specifies that the end of the subject string is not the end of a line, so the dollar metacharacter should not match it nor (except in multiline mode) a newline immediately before it. Setting this without #G_REGEX_MULTILINE (at compile time) causes dollar never to match. This option affects only the behaviour of the dollar metacharacter, it does not affect "\Z" or "\z".
+ * @G_REGEX_MATCH_NOTEMPTY: An empty string is not considered to be a valid match if this option is set. If there are alternatives in the pattern, they are tried. If all the alternatives match the empty string, the entire match fails. For example, if the pattern "a?b?" is applied to a string not beginning with "a" or "b", it matches the empty string at the start of the string. With this flag set, this match is not valid, so GRegex searches further into the string for occurrences of "a" or "b".
+ * @G_REGEX_MATCH_PARTIAL: Turns on the partial matching feature, for more documentation on partial matching see g_match_info_is_partial_match().
+ * @G_REGEX_MATCH_NEWLINE_CR: Overrides the newline definition set when creating a new #GRegex, setting the '\r' character as line terminator.
+ * @G_REGEX_MATCH_NEWLINE_LF: Overrides the newline definition set when creating a new #GRegex, setting the '\n' character as line terminator.
+ * @G_REGEX_MATCH_NEWLINE_CRLF: Overrides the newline definition set when creating a new #GRegex, setting the '\r\n' characters as line terminator.
+ * @G_REGEX_MATCH_NEWLINE_ANY: Overrides the newline definition set when creating a new #GRegex, any newline character or character sequence is recognized.
+ *
+ * Flags specifying match-time options.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * GSIZE_FROM_BE:
+ * @val: a #gsize value in big-endian byte order
+ *
+ * Converts a #gsize value from big-endian to the host byte order.
+ *
+ * Returns: @val converted to host byte order
+ */
+
+
+/**
+ * GSIZE_FROM_LE:
+ * @val: a #gsize value in little-endian byte order
+ *
+ * Converts a #gsize value from little-endian to host byte order.
+ *
+ * Returns: @val converted to host byte order
+ */
+
+
+/**
+ * GSIZE_TO_BE:
+ * @val: a #gsize value in host byte order
+ *
+ * Converts a #gsize value from host byte order to big-endian.
+ *
+ * Returns: @val converted to big-endian byte order
+ */
+
+
+/**
+ * GSIZE_TO_LE:
+ * @val: a #gsize value in host byte order
+ *
+ * Converts a #gsize value from host byte order to little-endian.
+ *
+ * Returns: @val converted to little-endian
+ */
+
+
+/**
+ * GSIZE_TO_POINTER:
+ * @s: #gsize to stuff into the pointer
+ *
+ * Stuffs a #gsize into a pointer type.
+ */
+
+
+/**
+ * GSList:
+ * @data: holds the element's data, which can be a pointer to any kind of data, or any integer value using the <link linkend="glib-Type-Conversion-Macros">Type Conversion Macros</link>.
+ * @next: contains the link to the next element in the list.
+ *
+ * The #GSList struct is used for each element in the singly-linked
+ * list.
+ */
+
+
+/**
+ * GSSIZE_FROM_BE:
+ * @val: a #gssize value in big-endian byte order
+ *
+ * Converts a #gssize value from big-endian to host byte order.
+ *
+ * Returns: @val converted to host byte order
+ */
+
+
+/**
+ * GSSIZE_FROM_LE:
+ * @val: a #gssize value in little-endian byte order
+ *
+ * Converts a #gssize value from little-endian to host byte order.
+ *
+ * Returns: @val converted to host byte order
+ */
+
+
+/**
+ * GSSIZE_TO_BE:
+ * @val: a #gssize value in host byte order
+ *
+ * Converts a #gssize value from host byte order to big-endian.
+ *
+ * Returns: @val converted to big-endian
+ */
+
+
+/**
+ * GSSIZE_TO_LE:
+ * @val: a #gssize value in host byte order
+ *
+ * Converts a #gssize value from host byte order to little-endian.
+ *
+ * Returns: @val converted to little-endian
+ */
+
+
+/**
+ * GScanner:
+ * @user_data: unused
+ * @max_parse_errors: unused
+ * @parse_errors: g_scanner_error() increments this field
+ * @input_name: name of input stream, featured by the default message handler
+ * @qdata: quarked data
+ * @config: link into the scanner configuration
+ * @token: token parsed by the last g_scanner_get_next_token()
+ * @value: value of the last token from g_scanner_get_next_token()
+ * @line: line number of the last token from g_scanner_get_next_token()
+ * @position: char number of the last token from g_scanner_get_next_token()
+ * @next_token: token parsed by the last g_scanner_peek_next_token()
+ * @next_value: value of the last token from g_scanner_peek_next_token()
+ * @next_line: line number of the last token from g_scanner_peek_next_token()
+ * @next_position: char number of the last token from g_scanner_peek_next_token()
+ * @msg_handler: handler function for _warn and _error
+ *
+ * The data structure representing a lexical scanner.
+ *
+ * You should set @input_name after creating the scanner, since
+ * it is used by the default message handler when displaying
+ * warnings and errors. If you are scanning a file, the filename
+ * would be a good choice.
+ *
+ * The @user_data and @max_parse_errors fields are not used.
+ * If you need to associate extra data with the scanner you
+ * can place them here.
+ *
+ * If you want to use your own message handler you can set the
+ * @msg_handler field. The type of the message handler function
+ * is declared by #GScannerMsgFunc.
+ */
+
+
+/**
+ * GScannerConfig:
+ * @cset_skip_characters: specifies which characters should be skipped by the scanner (the default is the whitespace characters: space, tab, carriage-return and line-feed).
+ * @cset_identifier_first: specifies the characters which can start identifiers (the default is #G_CSET_a_2_z, "_", and #G_CSET_A_2_Z).
+ * @cset_identifier_nth: specifies the characters which can be used in identifiers, after the first character (the default is #G_CSET_a_2_z, "_0123456789", #G_CSET_A_2_Z, #G_CSET_LATINS, #G_CSET_LATINC).
+ * @cpair_comment_single: specifies the characters at the start and end of single-line comments. The default is "#\n" which means that single-line comments start with a '#' and continue until a '\n' (end of line).
+ * @case_sensitive: specifies if symbols are case sensitive (the default is %FALSE).
+ * @skip_comment_multi: specifies if multi-line comments are skipped and not returned as tokens (the default is %TRUE).
+ * @skip_comment_single: specifies if single-line comments are skipped and not returned as tokens (the default is %TRUE).
+ * @scan_comment_multi: specifies if multi-line comments are recognized (the default is %TRUE).
+ * @scan_identifier: specifies if identifiers are recognized (the default is %TRUE).
+ * @scan_identifier_1char: specifies if single-character identifiers are recognized (the default is %FALSE).
+ * @scan_identifier_NULL: specifies if %NULL is reported as %G_TOKEN_IDENTIFIER_NULL (the default is %FALSE).
+ * @scan_symbols: specifies if symbols are recognized (the default is %TRUE).
+ * @scan_binary: specifies if binary numbers are recognized (the default is %FALSE).
+ * @scan_octal: specifies if octal numbers are recognized (the default is %TRUE).
+ * @scan_float: specifies if floating point numbers are recognized (the default is %TRUE).
+ * @scan_hex: specifies if hexadecimal numbers are recognized (the default is %TRUE).
+ * @scan_hex_dollar: specifies if '$' is recognized as a prefix for hexadecimal numbers (the default is %FALSE).
+ * @scan_string_sq: specifies if strings can be enclosed in single quotes (the default is %TRUE).
+ * @scan_string_dq: specifies if strings can be enclosed in double quotes (the default is %TRUE).
+ * @numbers_2_int: specifies if binary, octal and hexadecimal numbers are reported as #G_TOKEN_INT (the default is %TRUE).
+ * @int_2_float: specifies if all numbers are reported as %G_TOKEN_FLOAT (the default is %FALSE).
+ * @identifier_2_string: specifies if identifiers are reported as strings (the default is %FALSE).
+ * @char_2_token: specifies if characters are reported by setting <literal>token = ch</literal> or as %G_TOKEN_CHAR (the default is %TRUE).
+ * @symbol_2_token: specifies if symbols are reported by setting <literal>token = v_symbol</literal> or as %G_TOKEN_SYMBOL (the default is %FALSE).
+ * @scope_0_fallback: specifies if a symbol is searched for in the default scope in addition to the current scope (the default is %FALSE).
+ * @store_int64: use value.v_int64 rather than v_int
+ *
+ * Specifies the #GScanner parser configuration. Most settings can
+ * be changed during the parsing phase and will affect the lexical
+ * parsing of the next unpeeked token.
+ */
+
+
+/**
+ * GScannerMsgFunc:
+ * @scanner: a #GScanner
+ * @message: the message
+ * @error: %TRUE if the message signals an error, %FALSE if it signals a warning.
+ *
+ * Specifies the type of the message handler function.
+ */
+
+
+/**
+ * GSeekType:
+ * @G_SEEK_CUR: the current position in the file.
+ * @G_SEEK_SET: the start of the file.
+ * @G_SEEK_END: the end of the file.
+ *
+ * An enumeration specifying the base position for a
+ * g_io_channel_seek_position() operation.
+ */
+
+
+/**
+ * GSequence:
+ *
+ * The #GSequence struct is an opaque data type representing a
+ * <link linkend="glib-Sequences">Sequence</link> data type.
+ */
+
+
+/**
+ * GSequenceIter:
+ *
+ * The #GSequenceIter struct is an opaque data type representing an
+ * iterator pointing into a #GSequence.
+ */
+
+
+/**
+ * GSequenceIterCompareFunc:
+ * @a: a #GSequenceIter
+ * @b: a #GSequenceIter
+ * @data: user data
+ * @Returns: zero if the iterators are equal, a negative value if @a comes before @b, and a positive value if @b comes before @a.
+ *
+ * A #GSequenceIterCompareFunc is a function used to compare iterators.
+ * It must return zero if the iterators compare equal, a negative value
+ * if @a comes before @b, and a positive value if @b comes before @a.
+ */
+
+
+/**
+ * GShellError:
+ * @G_SHELL_ERROR_BAD_QUOTING: Mismatched or otherwise mangled quoting.
+ * @G_SHELL_ERROR_EMPTY_STRING: String to be parsed was empty.
+ * @G_SHELL_ERROR_FAILED: Some other error.
+ *
+ * Error codes returned by shell functions.
+ */
+
+
+/**
+ * GSignalAccumulator:
+ * @ihint: Signal invocation hint, see #GSignalInvocationHint.
+ * @return_accu: Accumulator to collect callback return values in, this is the return value of the current signal emission.
+ * @handler_return: A #GValue holding the return value of the signal handler.
+ * @data: Callback data that was specified when creating the signal.
+ *
+ * The signal accumulator is a special callback function that can be used
+ * to collect return values of the various callbacks that are called
+ * during a signal emission. The signal accumulator is specified at signal
+ * creation time, if it is left %NULL, no accumulation of callback return
+ * values is performed. The return value of signal emissions is then the
+ * value returned by the last callback.
+ *
+ * should be aborted. Returning %FALSE means to abort the
+ * current emission and %TRUE is returned for continuation.
+ *
+ * Returns: The accumulator function returns whether the signal emission
+ */
+
+
+/**
+ * GSignalCMarshaller:
+ *
+ * This is the signature of marshaller functions, required to marshall
+ * arrays of parameter values to signal emissions into C language callback
+ * invocations. It is merely an alias to #GClosureMarshal since the #GClosure
+ * mechanism takes over responsibility of actual function invocation for the
+ * signal system.
+ */
+
+
+/**
+ * GSignalCVaMarshaller:
+ *
+ * This is the signature of va_list marshaller functions, an optional
+ * marshaller that can be used in some situations to avoid
+ * marshalling the signal argument into GValues.
+ */
+
+
+/**
+ * GSignalEmissionHook:
+ * @ihint: Signal invocation hint, see #GSignalInvocationHint.
+ * @n_param_values: the number of parameters to the function, including the instance on which the signal was emitted.
+ * @param_values: (array length=n_param_values): the instance on which the signal was emitted, followed by the parameters of the emission.
+ * @data: user data associated with the hook.
+ *
+ * A simple function pointer to get invoked when the signal is emitted. This
+ * allows you to tie a hook to the signal type, so that it will trap all
+ * emissions of that signal, from any object.
+ *
+ * You may not attach these to signals created with the #G_SIGNAL_NO_HOOKS flag.
+ *
+ * hook is disconnected (and destroyed).
+ *
+ * Returns: whether it wants to stay connected. If it returns %FALSE, the signal
+ */
+
+
+/**
+ * GSignalFlags:
+ * @G_SIGNAL_RUN_FIRST: Invoke the object method handler in the first emission stage.
+ * @G_SIGNAL_RUN_LAST: Invoke the object method handler in the third emission stage.
+ * @G_SIGNAL_RUN_CLEANUP: Invoke the object method handler in the last emission stage.
+ * @G_SIGNAL_NO_RECURSE: 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.
+ * @G_SIGNAL_DETAILED: This signal supports "::detail" appendices to the signal name upon handler connections and emissions.
+ * @G_SIGNAL_ACTION: Action signals are signals that may freely be emitted on alive objects from user code via g_signal_emit() 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.
+ * @G_SIGNAL_NO_HOOKS: No emissions hooks are supported for this signal.
+ * @G_SIGNAL_MUST_COLLECT: Varargs signal emission will always collect the arguments, even if there are no signal handlers connected.  Since 2.30.
+ * @G_SIGNAL_DEPRECATED: The signal is deprecated and will be removed in a future version. A warning will be generated if it is connected while running with G_ENABLE_DIAGNOSTIC=1.  Since 2.32.
+ *
+ * The signal flags are used to specify a signal's behaviour, the overall
+ * signal description outlines how especially the RUN flags control the
+ * stages of a signal emission.
+ */
+
+
+/**
+ * GSignalInvocationHint:
+ * @signal_id: The signal id of the signal invoking the callback
+ * @detail: The detail passed on for this emission
+ * @run_type: The stage the signal emission is currently in, this field will contain one of %G_SIGNAL_RUN_FIRST, %G_SIGNAL_RUN_LAST or %G_SIGNAL_RUN_CLEANUP.
+ *
+ * The #GSignalInvocationHint structure is used to pass on additional information
+ * to callbacks during a signal emission.
+ */
+
+
+/**
+ * GSignalMatchType:
+ * @G_SIGNAL_MATCH_ID: The signal id must be equal.
+ * @G_SIGNAL_MATCH_DETAIL: The signal detail be equal.
+ * @G_SIGNAL_MATCH_CLOSURE: The closure must be the same.
+ * @G_SIGNAL_MATCH_FUNC: The C closure callback must be the same.
+ * @G_SIGNAL_MATCH_DATA: The closure data must be the same.
+ * @G_SIGNAL_MATCH_UNBLOCKED: Only unblocked signals may matched.
+ *
+ * The match types specify what g_signal_handlers_block_matched(),
+ * g_signal_handlers_unblock_matched() and g_signal_handlers_disconnect_matched()
+ * match signals by.
+ */
+
+
+/**
+ * GSignalQuery:
+ * @signal_id: The signal id of the signal being queried, or 0 if the signal to be queried was unknown.
+ * @signal_name: The signal name.
+ * @itype: The interface/instance type that this signal can be emitted for.
+ * @signal_flags: The signal flags as passed in to g_signal_new().
+ * @return_type: The return type for user callbacks.
+ * @n_params: The number of parameters that user callbacks take.
+ * @param_types: The individual parameter types for user callbacks, note that the effective callback signature is: <programlisting> @return_type callback (#gpointer     data1, [param_types param_names,] gpointer     data2); </programlisting>
+ *
+ * A structure holding in-depth information for a specific signal. It is
+ * filled in by the g_signal_query() function.
+ */
+
+
+/**
+ * GSource:
+ *
+ * The <structname>GSource</structname> struct is an opaque data type
+ * representing an event source.
+ */
+
+
+/**
+ * GSourceCallbackFuncs:
+ * @ref: Called when a reference is added to the callback object
+ * @unref: Called when a reference to the callback object is dropped
+ * @get: Called to extract the callback function and data from the callback object. The <structname>GSourceCallbackFuncs</structname> struct contains functions for managing callback objects.
+ *
+ *
+ */
+
+
+/**
+ * GSourceDummyMarshal:
+ *
+ * This is just a placeholder for #GClosureMarshal,
+ * which cannot be used here for dependency reasons.
+ */
+
+
+/**
+ * GSourceFunc:
+ * @user_data: data passed to the function, set when the source was created with one of the above functions
+ *
+ * Specifies the type of function passed to g_timeout_add(),
+ * g_timeout_add_full(), g_idle_add(), and g_idle_add_full().
+ *
+ * Returns: %FALSE if the source should be removed
+ */
+
+
+/**
+ * GSourceFuncs:
+ * @prepare: Called before all the file descriptors are polled. If the source can determine that it is ready here (without waiting for the results of the poll() call) it should return %TRUE. It can also return a @timeout_ value which should be the maximum timeout (in milliseconds) which should be passed to the poll() call. The actual timeout used will be -1 if all sources returned -1, or it will be the minimum of all the @timeout_ values returned which were >= 0.
+ * @check: Called after all the file descriptors are polled. The source should return %TRUE if it is ready to be dispatched. Note that some time may have passed since the previous prepare function was called, so the source should be checked again here.
+ * @dispatch: Called to dispatch the event source, after it has returned %TRUE in either its @prepare or its @check function. The @dispatch function is passed in a callback function and data. The callback function may be %NULL if the source was never connected to a callback using g_source_set_callback(). The @dispatch function should call the callback function with @user_data and whatever additional parameters are needed for this type of event source.
+ * @finalize: Called when the source is finalized.
+ *
+ * The <structname>GSourceFuncs</structname> struct contains a table of
+ * functions used to handle event sources in a generic manner.
+ *
+ * For idle sources, the prepare and check functions always return %TRUE
+ * to indicate that the source is always ready to be processed. The prepare
+ * function also returns a timeout value of 0 to ensure that the poll() call
+ * doesn't block (since that would be time wasted which could have been spent
+ * running the idle function).
+ *
+ * For timeout sources, the prepare and check functions both return %TRUE
+ * if the timeout interval has expired. The prepare function also returns
+ * a timeout value to ensure that the poll() call doesn't block too long
+ * and miss the next timeout.
+ *
+ * For file descriptor sources, the prepare function typically returns %FALSE,
+ * since it must wait until poll() has been called before it knows whether
+ * any events need to be processed. It sets the returned timeout to -1 to
+ * indicate that it doesn't mind how long the poll() call blocks. In the
+ * check function, it tests the results of the poll() call to see if the
+ * required condition has been met, and returns %TRUE if so.
+ */
+
+
+/**
+ * GSpawnChildSetupFunc:
+ * @user_data: user data to pass to the function.
+ *
+ * Specifies the type of the setup function passed to g_spawn_async(),
+ * g_spawn_sync() and g_spawn_async_with_pipes(), which can, in very
+ * limited ways, be used to affect the child's execution.
+ *
+ * On POSIX platforms, the function is called in the child after GLib
+ * has performed all the setup it plans to perform, but before calling
+ * exec(). Actions taken in this function will only affect the child,
+ * not the parent.
+ *
+ * On Windows, the function is called in the parent. Its usefulness on
+ * Windows is thus questionable. In many cases executing the child setup
+ * function in the parent can have ill effects, and you should be very
+ * careful when porting software to Windows that uses child setup
+ * functions.
+ *
+ * However, even on POSIX, you are extremely limited in what you can
+ * safely do from a #GSpawnChildSetupFunc, because any mutexes that
+ * were held by other threads in the parent process at the time of the
+ * fork() will still be locked in the child process, and they will
+ * never be unlocked (since the threads that held them don't exist in
+ * the child). POSIX allows only async-signal-safe functions (see
+ * <citerefentry><refentrytitle>signal</refentrytitle><manvolnum>7</manvolnum></citerefentry>)
+ * to be called in the child between fork() and exec(), which
+ * drastically limits the usefulness of child setup functions.
+ *
+ * In particular, it is not safe to call any function which may
+ * call malloc(), which includes POSIX functions such as setenv().
+ * If you need to set up the child environment differently from
+ * the parent, you should use g_get_environ(), g_environ_setenv(),
+ * and g_environ_unsetenv(), and then pass the complete environment
+ * list to the <literal>g_spawn...</literal> function.
+ */
+
+
+/**
+ * GSpawnError:
+ * @G_SPAWN_ERROR_FORK: Fork failed due to lack of memory.
+ * @G_SPAWN_ERROR_READ: Read or select on pipes failed.
+ * @G_SPAWN_ERROR_CHDIR: Changing to working directory failed.
+ * @G_SPAWN_ERROR_ACCES: execv() returned <literal>EACCES</literal>
+ * @G_SPAWN_ERROR_PERM: execv() returned <literal>EPERM</literal>
+ * @G_SPAWN_ERROR_TOO_BIG: execv() returned <literal>E2BIG</literal>
+ * @G_SPAWN_ERROR_2BIG: deprecated alias for %G_SPAWN_ERROR_TOO_BIG
+ * @G_SPAWN_ERROR_NOEXEC: execv() returned <literal>ENOEXEC</literal>
+ * @G_SPAWN_ERROR_NAMETOOLONG: execv() returned <literal>ENAMETOOLONG</literal>
+ * @G_SPAWN_ERROR_NOENT: execv() returned <literal>ENOENT</literal>
+ * @G_SPAWN_ERROR_NOMEM: execv() returned <literal>ENOMEM</literal>
+ * @G_SPAWN_ERROR_NOTDIR: execv() returned <literal>ENOTDIR</literal>
+ * @G_SPAWN_ERROR_LOOP: execv() returned <literal>ELOOP</literal>
+ * @G_SPAWN_ERROR_TXTBUSY: execv() returned <literal>ETXTBUSY</literal>
+ * @G_SPAWN_ERROR_IO: execv() returned <literal>EIO</literal>
+ * @G_SPAWN_ERROR_NFILE: execv() returned <literal>ENFILE</literal>
+ * @G_SPAWN_ERROR_MFILE: execv() returned <literal>EMFILE</literal>
+ * @G_SPAWN_ERROR_INVAL: execv() returned <literal>EINVAL</literal>
+ * @G_SPAWN_ERROR_ISDIR: execv() returned <literal>EISDIR</literal>
+ * @G_SPAWN_ERROR_LIBBAD: execv() returned <literal>ELIBBAD</literal>
+ * @G_SPAWN_ERROR_FAILED: Some other fatal failure, <literal>error-&gt;message</literal> should explain.
+ *
+ * Error codes returned by spawning processes.
+ */
+
+
+/**
+ * GSpawnFlags:
+ * @G_SPAWN_LEAVE_DESCRIPTORS_OPEN: the parent's open file descriptors will be inherited by the child; otherwise all descriptors except stdin/stdout/stderr will be closed before calling exec() in the child.
+ * @G_SPAWN_DO_NOT_REAP_CHILD: the child will not be automatically reaped; you must use g_child_watch_add() yourself (or call waitpid() or handle <literal>SIGCHLD</literal> yourself), or the child will become a zombie.
+ * @G_SPAWN_SEARCH_PATH: <literal>argv[0]</literal> need not be an absolute path, it will be looked for in the user's <envar>PATH</envar>.
+ * @G_SPAWN_STDOUT_TO_DEV_NULL: the child's standard output will be discarded, instead of going to the same location as the parent's standard output.
+ * @G_SPAWN_STDERR_TO_DEV_NULL: the child's standard error will be discarded.
+ * @G_SPAWN_CHILD_INHERITS_STDIN: the child will inherit the parent's standard input (by default, the child's standard input is attached to <filename>/dev/null</filename>).
+ * @G_SPAWN_FILE_AND_ARGV_ZERO: the first element of <literal>argv</literal> is the file to execute, while the remaining elements are the actual argument vector to pass to the file. Normally g_spawn_async_with_pipes() uses <literal>argv[0]</literal> as the file to execute, and passes all of <literal>argv</literal> to the child.
+ *
+ * Flags passed to g_spawn_sync(), g_spawn_async() and g_spawn_async_with_pipes().
+ */
+
+
+/**
+ * GStatBuf:
+ *
+ * A type corresponding to the appropriate struct type for the stat
+ * system call, depending on the platform and/or compiler being used.
+ *
+ * See g_stat() for more information.
+ */
+
+
+/**
+ * GString:
+ * @str: points to the character data. It may move as text is added. The @str field is null-terminated and so can be used as an ordinary C string.
+ * @len: contains the length of the string, not including the terminating nul byte.
+ * @allocated_len: the number of bytes that can be stored in the string before it needs to be reallocated. May be larger than @len.
+ *
+ * The GString struct contains the public fields of a GString.
+ */
+
+
+/**
+ * GStringChunk:
+ *
+ * An opaque data structure representing String Chunks.
+ * It should only be accessed by using the following functions.
+ */
+
+
+/**
+ * GStrv:
+ *
+ * A C representable type name for #G_TYPE_STRV.
+ */
+
+
+/**
+ * GTestCase:
+ *
+ * An opaque structure representing a test case.
+ */
+
+
+/**
+ * GTestDataFunc:
+ * @user_data: the data provided when registering the test
+ *
+ * The type used for test case functions that take an extra pointer
+ * argument.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GTestFixtureFunc:
+ * @fixture: the test fixture
+ * @user_data: the data provided when registering the test
+ *
+ * The type used for functions that operate on test fixtures.  This is
+ * used for the fixture setup and teardown functions as well as for the
+ * testcases themselves.
+ *
+ * @user_data is a pointer to the data that was given when registering
+ * the test case.
+ *
+ * @fixture will be a pointer to the area of memory allocated by the
+ * test framework, of the size requested.  If the requested size was
+ * zero then @fixture will be equal to @user_data.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GTestFunc:
+ *
+ * The type used for test case functions.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * GTestLogFatalFunc:
+ * @log_domain: the log domain of the message
+ * @log_level: the log level of the message (including the fatal and recursion flags)
+ * @message: the message to process
+ * @user_data: user data, set in g_test_log_set_fatal_handler()
+ *
+ * Specifies the prototype of fatal log handler functions.
+ *
+ * Returns: %TRUE if the program should abort, %FALSE otherwise
+ * Since: 2.22
+ */
+
+
+/**
+ * GTestSuite:
+ *
+ * An opaque structure representing a test suite.
+ */
+
+
+/**
+ * GTestTrapFlags:
+ * @G_TEST_TRAP_SILENCE_STDOUT: Redirect stdout of the test child to <filename>/dev/null</filename> so it cannot be observed on the console during test runs. The actual output is still captured though to allow later tests with g_test_trap_assert_stdout().
+ * @G_TEST_TRAP_SILENCE_STDERR: Redirect stderr of the test child to <filename>/dev/null</filename> so it cannot be observed on the console during test runs. The actual output is still captured though to allow later tests with g_test_trap_assert_stderr().
+ * @G_TEST_TRAP_INHERIT_STDIN: If this flag is given, stdin of the forked child process is shared with stdin of its parent process. It is redirected to <filename>/dev/null</filename> otherwise.
+ *
+ * Test traps are guards around forked tests.
+ * These flags determine what traps to set.
+ */
+
+
+/**
+ * GThread:
+ *
+ * The #GThread struct represents a running thread. This struct
+ * is returned by g_thread_new() or g_thread_try_new(). You can
+ * obtain the #GThread struct representing the current thead by
+ * calling g_thread_self().
+ *
+ * GThread is refcounted, see g_thread_ref() and g_thread_unref().
+ * The thread represented by it holds a reference while it is running,
+ * and g_thread_join() consumes the reference that it is given, so
+ * it is normally not necessary to manage GThread references
+ * explicitly.
+ *
+ * The structure is opaque -- none of its fields may be directly
+ * accessed.
+ */
+
+
+/**
+ * GThreadError:
+ * @G_THREAD_ERROR_AGAIN: a thread couldn't be created due to resource shortage. Try again later.
+ *
+ * Possible errors of thread related functions.
+ */
+
+
+/**
+ * GThreadFunc:
+ * @data: data passed to the thread
+ *
+ * Specifies the type of the @func functions passed to g_thread_new()
+ * or g_thread_try_new().
+ *
+ * Returns: the return value of the thread
+ */
+
+
+/**
+ * GThreadPool:
+ * @func: the function to execute in the threads of this pool
+ * @user_data: the user data for the threads of this pool
+ * @exclusive: are all threads exclusive to this pool
+ *
+ * The #GThreadPool struct represents a thread pool. It has three
+ * public read-only members, but the underlying struct is bigger,
+ * so you must not copy this struct.
+ */
+
+
+/**
+ * GTime:
+ *
+ * Simply a replacement for <type>time_t</type>. It has been deprecated
+ * since it is <emphasis>not</emphasis> equivalent to <type>time_t</type>
+ * on 64-bit platforms with a 64-bit <type>time_t</type>.
+ * Unrelated to #GTimer.
+ *
+ * Note that <type>GTime</type> is defined to always be a 32bit integer,
+ * unlike <type>time_t</type> which may be 64bit on some systems.
+ * Therefore, <type>GTime</type> will overflow in the year 2038, and
+ * you cannot use the address of a <type>GTime</type> variable as argument
+ * to the UNIX time() function. Instead, do the following:
+ * |[
+ * time_t ttime;
+ * GTime gtime;
+ *
+ * time (&amp;ttime);
+ * gtime = (GTime)ttime;
+ * ]|
+ */
+
+
+/**
+ * GTimeSpan:
+ *
+ * A value representing an interval of time, in microseconds.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GTimeType:
+ * @G_TIME_TYPE_STANDARD: the time is in local standard time
+ * @G_TIME_TYPE_DAYLIGHT: the time is in local daylight time
+ * @G_TIME_TYPE_UNIVERSAL: the time is in UTC
+ *
+ * Disambiguates a given time in two ways.
+ *
+ * First, specifies if the given time is in universal or local time.
+ *
+ * Second, if the time is in local time, specifies if it is local
+ * standard time or local daylight time.  This is important for the case
+ * where the same local time occurs twice (during daylight savings time
+ * transitions, for example).
+ */
+
+
+/**
+ * GTimeVal:
+ * @tv_sec: seconds
+ * @tv_usec: microseconds
+ *
+ * Represents a precise time, with seconds and microseconds.
+ * Similar to the <structname>struct timeval</structname> returned by
+ * the gettimeofday() UNIX system call.
+ *
+ * GLib is attempting to unify around the use of 64bit integers to
+ * represent microsecond-precision time. As such, this type will be
+ * removed from a future version of GLib.
+ */
+
+
+/**
+ * GTimeZone:
+ *
+ * #GDateTime is an opaque structure whose members cannot be accessed
+ * directly.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GTimer:
+ *
+ * Opaque datatype that records a start time.
+ */
+
+
+/**
+ * GToggleNotify:
+ * @data: Callback data passed to g_object_add_toggle_ref()
+ * @object: The object on which g_object_add_toggle_ref() was called.
+ * @is_last_ref: %TRUE if the toggle reference is now the last reference to the object. %FALSE if the toggle reference was the last reference and there are now other references.
+ *
+ * A callback function used for notification when the state
+ * of a toggle reference changes. See g_object_add_toggle_ref().
+ */
+
+
+/**
+ * GTokenType:
+ * @G_TOKEN_EOF: the end of the file
+ * @G_TOKEN_LEFT_PAREN: a '(' character
+ * @G_TOKEN_LEFT_CURLY: a '{' character
+ * @G_TOKEN_LEFT_BRACE: a '[' character
+ * @G_TOKEN_RIGHT_CURLY: a '}' character
+ * @G_TOKEN_RIGHT_PAREN: a ')' character
+ * @G_TOKEN_RIGHT_BRACE: a ']' character
+ * @G_TOKEN_EQUAL_SIGN: a '=' character
+ * @G_TOKEN_COMMA: a ',' character
+ * @G_TOKEN_NONE: not a token
+ * @G_TOKEN_ERROR: an error occurred
+ * @G_TOKEN_CHAR: a character
+ * @G_TOKEN_BINARY: a binary integer
+ * @G_TOKEN_OCTAL: an octal integer
+ * @G_TOKEN_INT: an integer
+ * @G_TOKEN_HEX: a hex integer
+ * @G_TOKEN_FLOAT: a floating point number
+ * @G_TOKEN_STRING: a string
+ * @G_TOKEN_SYMBOL: a symbol
+ * @G_TOKEN_IDENTIFIER: an identifier
+ * @G_TOKEN_IDENTIFIER_NULL: a null identifier
+ * @G_TOKEN_COMMENT_SINGLE: one line comment
+ * @G_TOKEN_COMMENT_MULTI: multi line comment
+ *
+ * The possible types of token returned from each
+ * g_scanner_get_next_token() call.
+ */
+
+
+/**
+ * GTokenValue:
+ * @v_symbol: token symbol value
+ * @v_identifier: token identifier value
+ * @v_binary: token binary integer value
+ * @v_octal: octal integer value
+ * @v_int: integer value
+ * @v_int64: 64-bit integer value
+ * @v_float: floating point value
+ * @v_hex: hex integer value
+ * @v_string: string value
+ * @v_comment: comment value
+ * @v_char: character value
+ * @v_error: error value
+ *
+ * A union holding the value of the token.
+ */
+
+
+/**
+ * GTranslateFunc:
+ * @str: the untranslated string
+ * @data: user data specified when installing the function, e.g. in g_option_group_set_translate_func()
+ *
+ * The type of functions which are used to translate user-visible
+ * strings, for <option>--help</option> output.
+ *
+ * The returned string is owned by GLib and must not be freed.
+ *
+ * Returns: a translation of the string for the current locale.
+ */
+
+
+/**
+ * GTrashStack:
+ * @next: pointer to the previous element of the stack, gets stored in the first <literal>sizeof (gpointer)</literal> bytes of the element
+ *
+ * Each piece of memory that is pushed onto the stack
+ * is cast to a <structname>GTrashStack*</structname>.
+ */
+
+
+/**
+ * GTraverseFlags:
+ * @G_TRAVERSE_LEAVES: only leaf nodes should be visited. This name has been introduced in 2.6, for older version use %G_TRAVERSE_LEAFS.
+ * @G_TRAVERSE_NON_LEAVES: only non-leaf nodes should be visited. This name has been introduced in 2.6, for older version use %G_TRAVERSE_NON_LEAFS.
+ * @G_TRAVERSE_ALL: all nodes should be visited.
+ * @G_TRAVERSE_MASK: a mask of all traverse flags.
+ * @G_TRAVERSE_LEAFS: identical to %G_TRAVERSE_LEAVES.
+ * @G_TRAVERSE_NON_LEAFS: identical to %G_TRAVERSE_NON_LEAVES.
+ *
+ * Specifies which nodes are visited during several of the tree
+ * functions, including g_node_traverse() and g_node_find().
+ */
+
+
+/**
+ * GTraverseFunc:
+ * @key: a key of a #GTree node.
+ * @value: the value corresponding to the key.
+ * @data: user data passed to g_tree_traverse().
+ * @Returns: %TRUE to stop the traversal.
+ *
+ * Specifies the type of function passed to g_tree_traverse(). It is
+ * passed the key and value of each node, together with the @user_data
+ * parameter passed to g_tree_traverse(). If the function returns
+ * %TRUE, the traversal is stopped.
+ */
+
+
+/**
+ * GTraverseType:
+ * @G_IN_ORDER: vists a node's left child first, then the node itself, then its right child. This is the one to use if you want the output sorted according to the compare function.
+ * @G_PRE_ORDER: visits a node, then its children.
+ * @G_POST_ORDER: visits the node's children, then the node itself.
+ * @G_LEVEL_ORDER: is not implemented for <link linkend="glib-Balanced-Binary-Trees">Balanced Binary Trees</link>.  For <link linkend="glib-N-ary-Trees">N-ary Trees</link>, it vists the root node first, then its children, then its grandchildren, and so on. Note that this is less efficient than the other orders.
+ *
+ * Specifies the type of traveral performed by g_tree_traverse(),
+ * g_node_traverse() and g_node_find().
+ */
+
+
+/**
+ * GTree:
+ *
+ * The <structname>GTree</structname> struct is an opaque data
+ * structure representing a <link
+ * linkend="glib-Balanced-Binary-Trees">Balanced Binary Tree</link>. It
+ * should be accessed only by using the following functions.
+ */
+
+
+/**
+ * GType:
+ *
+ * A numerical value which represents the unique identifier of a registered
+ * type.
+ */
+
+
+/**
+ * GTypeClass:
+ *
+ * An opaque structure used as the base of all classes.
+ */
+
+
+/**
+ * GTypeClassCacheFunc:
+ * @cache_data: data that was given to the g_type_add_class_cache_func() call
+ * @g_class: The #GTypeClass structure which is unreferenced
+ *
+ * A callback function which is called when the reference count of a class
+ * drops to zero. It may use g_type_class_ref() to prevent the class from
+ * being freed. You should not call g_type_class_unref() from a
+ * #GTypeClassCacheFunc function to prevent infinite recursion, use
+ * g_type_class_unref_uncached() instead.
+ *
+ * The functions have to check the class id passed in to figure
+ * whether they actually want to cache the class of this type, since all
+ * classes are routed through the same #GTypeClassCacheFunc chain.
+ *
+ * called, %FALSE to continue.
+ *
+ * Returns: %TRUE to stop further #GTypeClassCacheFunc<!-- -->s from being
+ */
+
+
+/**
+ * GTypeDebugFlags:
+ * @G_TYPE_DEBUG_NONE: Print no messages.
+ * @G_TYPE_DEBUG_OBJECTS: Print messages about object bookkeeping.
+ * @G_TYPE_DEBUG_SIGNALS: Print messages about signal emissions.
+ * @G_TYPE_DEBUG_MASK: Mask covering all debug flags.
+ *
+ * The <type>GTypeDebugFlags</type> enumeration values can be passed to
+ * g_type_init_with_debug_flags() to trigger debugging messages during runtime.
+ * Note that the messages can also be triggered by setting the
+ * <envar>GOBJECT_DEBUG</envar> environment variable to a ':'-separated list of
+ * "objects" and "signals".
+ */
+
+
+/**
+ * GTypeFlags:
+ * @G_TYPE_FLAG_ABSTRACT: Indicates an abstract type. No instances can be created for an abstract type.
+ * @G_TYPE_FLAG_VALUE_ABSTRACT: Indicates an abstract value type, i.e. a type that introduces a value table, but can't be used for g_value_init().
+ *
+ * Bit masks used to check or determine characteristics of a type.
+ */
+
+
+/**
+ * GTypeFundamentalFlags:
+ * @G_TYPE_FLAG_CLASSED: Indicates a classed type.
+ * @G_TYPE_FLAG_INSTANTIATABLE: Indicates an instantiable type (implies classed).
+ * @G_TYPE_FLAG_DERIVABLE: Indicates a flat derivable type.
+ * @G_TYPE_FLAG_DEEP_DERIVABLE: Indicates a deep derivable type (implies derivable).
+ *
+ * Bit masks used to check or determine specific characteristics of a
+ * fundamental type.
+ */
+
+
+/**
+ * GTypeFundamentalInfo:
+ * @type_flags: #GTypeFundamentalFlags describing the characteristics of the fundamental type
+ *
+ * A structure that provides information to the type system which is
+ * used specifically for managing fundamental types.
+ */
+
+
+/**
+ * GTypeInfo:
+ * @class_size: Size of the class structure (required for interface, classed and instantiatable types).
+ * @base_init: Location of the base initialization function (optional).
+ * @base_finalize: Location of the base finalization function (optional).
+ * @class_init: Location of the class initialization function for classed and instantiatable types. Location of the default vtable inititalization function for interface types. (optional) This function is used both to fill in virtual functions in the class or default vtable, and to do type-specific setup such as registering signals and object properties.
+ * @class_finalize: Location of the class finalization function for classed and instantiatable types. Location fo the default vtable finalization function for interface types. (optional)
+ * @class_data: User-supplied data passed to the class init/finalize functions.
+ * @instance_size: Size of the instance (object) structure (required for instantiatable types only).
+ * @n_preallocs: Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the <link linkend="glib-Memory-Slices">slice allocator</link> now.
+ * @instance_init: Location of the instance initialization function (optional, for instantiatable types only).
+ * @value_table: A #GTypeValueTable function table for generic handling of GValues of this type (usually only useful for fundamental types).
+ *
+ * This structure is used to provide the type system with the information
+ * required to initialize and destruct (finalize) a type's class and
+ * its instances.
+ * The initialized structure is passed to the g_type_register_static() function
+ * (or is copied into the provided #GTypeInfo structure in the
+ * g_type_plugin_complete_type_info()). The type system will perform a deep
+ * copy of this structure, so its memory does not need to be persistent
+ * across invocation of g_type_register_static().
+ */
+
+
+/**
+ * GTypeInstance:
+ *
+ * An opaque structure used as the base of all type instances.
+ */
+
+
+/**
+ * GTypeInterface:
+ *
+ * An opaque structure used as the base of all interface types.
+ */
+
+
+/**
+ * GTypeInterfaceCheckFunc:
+ * @check_data: data passed to g_type_add_interface_check().
+ * @g_iface: the interface that has been initialized
+ *
+ * A callback called after an interface vtable is initialized.
+ * See g_type_add_interface_check().
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * GTypeModule:
+ * @name: the name of the module
+ *
+ * The members of the <structname>GTypeModule</structname> structure should not
+ * be accessed directly, except for the @name field.
+ */
+
+
+/**
+ * GTypeModuleClass:
+ * @parent_class: the parent class
+ * @load: loads the module and registers one or more types using g_type_module_register_type().
+ * @unload: unloads the module
+ *
+ * In order to implement dynamic loading of types based on #GTypeModule,
+ * the @load and @unload functions in #GTypeModuleClass must be implemented.
+ */
+
+
+/**
+ * GTypePlugin:
+ *
+ * The <structname>GTypePlugin</structname> typedef is used as a placeholder
+ * for objects that implement the <structname>GTypePlugin</structname>
+ * interface.
+ */
+
+
+/**
+ * GTypePluginClass:
+ * @use_plugin: Increases the use count of the plugin.
+ * @unuse_plugin: Decreases the use count of the plugin.
+ * @complete_type_info: Fills in the #GTypeInfo and #GTypeValueTable structs for the type. The structs are initialized with <literal>memset(s, 0, sizeof (s))</literal> before calling this function.
+ * @complete_interface_info: Fills in missing parts of the #GInterfaceInfo for the interface. The structs is initialized with <literal>memset(s, 0, sizeof (s))</literal> before calling this function.
+ *
+ * The #GTypePlugin interface is used by the type system in order to handle
+ * the lifecycle of dynamically loaded types.
+ */
+
+
+/**
+ * GTypePluginCompleteInterfaceInfo:
+ * @plugin: the #GTypePlugin
+ * @instance_type: the #GType of an instantiable type to which the interface is added
+ * @interface_type: the #GType of the interface whose info is completed
+ * @info: the #GInterfaceInfo to fill in
+ *
+ * The type of the @complete_interface_info function of #GTypePluginClass.
+ */
+
+
+/**
+ * GTypePluginCompleteTypeInfo:
+ * @plugin: the #GTypePlugin
+ * @g_type: the #GType whose info is completed
+ * @info: the #GTypeInfo struct to fill in
+ * @value_table: the #GTypeValueTable to fill in
+ *
+ * The type of the @complete_type_info function of #GTypePluginClass.
+ */
+
+
+/**
+ * GTypePluginUnuse:
+ * @plugin: the #GTypePlugin whose use count should be decreased
+ *
+ * The type of the @unuse_plugin function of #GTypePluginClass.
+ */
+
+
+/**
+ * GTypePluginUse:
+ * @plugin: the #GTypePlugin whose use count should be increased
+ *
+ * The type of the @use_plugin function of #GTypePluginClass, which gets called
+ * to increase the use count of @plugin.
+ */
+
+
+/**
+ * GTypeQuery:
+ * @type: the #GType value of the type.
+ * @type_name: the name of the type.
+ * @class_size: the size of the class structure.
+ * @instance_size: the size of the instance structure.
+ *
+ * A structure holding information for a specific type. It is
+ * filled in by the g_type_query() function.
+ */
+
+
+/**
+ * GTypeValueTable:
+ * @value_init: Default initialize @values contents by poking values directly into the value->data array. The data array of the #GValue passed into this function was zero-filled with <function>memset()</function>, so no care has to be taken to free any old contents. E.g. for the implementation of a string value that may never be %NULL, the implementation might look like: |[ value->data[0].v_pointer = g_strdup (""); ]|
+ * @value_free: Free any old contents that might be left in the data array of the passed in @value. No resources may remain allocated through the #GValue contents after this function returns. E.g. for our above string type: |[ // only free strings without a specific flag for static storage if (!(value->data[1].v_uint & G_VALUE_NOCOPY_CONTENTS)) g_free (value->data[0].v_pointer); ]|
+ * @value_copy: @dest_value is a #GValue with zero-filled data section and @src_value is a properly setup #GValue of same or derived type. The purpose of this function is to copy the contents of @src_value into @dest_value in a way, that even after @src_value has been freed, the contents of @dest_value remain valid. String type example: |[ dest_value->data[0].v_pointer = g_strdup (src_value->data[0].v_pointer); ]|
+ * @value_peek_pointer: If the value contents fit into a pointer, such as objects or strings, return this pointer, so the caller can peek at the current contents. To extend on our above string example: |[ return value->data[0].v_pointer; ]|
+ * @collect_format: A string format describing how to collect the contents of this value bit-by-bit. Each character in the format represents an argument to be collected, and the characters themselves indicate the type of the argument. Currently supported arguments are: <variablelist> <varlistentry><term /><listitem><para> 'i' - Integers. passed as collect_values[].v_int. </para></listitem></varlistentry> <varlistentry><term /><listitem><para> 'l' - Longs. passed as collect_values[].v_long. </para></listitem></varlistentry> <varlistentry><term /><listitem><para> 'd' - Doubles. passed as collect_values[].v_double. </para></listitem></varlistentry> <varlistentry><term /><listitem><para> 'p' - Pointers. passed as collect_values[].v_pointer. </para></listitem></varlistentry> </variablelist> It should be noted that for variable argument list construction, ANSI C promotes every type smaller than an integer to an int, and floats to doubles. So for collection of short int or char, 'i' needs to be used, and for collection of floats 'd'.
+ * @collect_value: The collect_value() function is responsible for converting the values collected from a variable argument list into contents suitable for storage in a GValue. This function should setup @value similar to value_init(); e.g. for a string value that does not allow %NULL pointers, it needs to either spew an error, or do an implicit conversion by storing an empty string. The @value passed in to this function has a zero-filled data array, so just like for value_init() it is guaranteed to not contain any old contents that might need freeing. @n_collect_values is exactly the string length of @collect_format, and @collect_values is an array of unions #GTypeCValue with length @n_collect_values, containing the collected values according to @collect_format. @collect_flags is an argument provided as a hint by the caller. It may contain the flag %G_VALUE_NOCOPY_CONTENTS indicating, that the collected value contents may be considered "static" for the duration of the @value lifetime. Thus an extra copy of the contents stored in @collect_values is not required for assignment to @value. For our above string example, we continue with: |[ if (!collect_values[0].v_pointer) value->data[0].v_pointer = g_strdup (""); else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { value->data[0].v_pointer = collect_values[0].v_pointer; // keep a flag for the value_free() implementation to not free this string value->data[1].v_uint = G_VALUE_NOCOPY_CONTENTS; } else value->data[0].v_pointer = g_strdup (collect_values[0].v_pointer); return NULL; ]| It should be noted, that it is generally a bad idea to follow the #G_VALUE_NOCOPY_CONTENTS hint for reference counted types. Due to reentrancy requirements and reference count assertions performed by the signal emission code, reference counts should always be incremented for reference counted contents stored in the value->data array.  To deviate from our string example for a moment, and taking a look at an exemplary implementation for collect_value() of #GObject: |[ if (collect_values[0].v_pointer) { GObject *object = G_OBJECT (collect_values[0].v_pointer); // never honour G_VALUE_NOCOPY_CONTENTS for ref-counted types value->data[0].v_pointer = g_object_ref (object); return NULL; } else return g_strdup_printf ("Object passed as invalid NULL pointer"); } ]| The reference count for valid objects is always incremented, regardless of @collect_flags. For invalid objects, the example returns a newly allocated string without altering @value. Upon success, collect_value() needs to return %NULL. If, however, an error condition occurred, collect_value() may spew an error by returning a newly allocated non-%NULL string, giving a suitable description of the error condition. The calling code makes no assumptions about the @value contents being valid upon error returns, @value is simply thrown away without further freeing. As such, it is a good idea to not allocate #GValue contents, prior to returning an error, however, collect_values() is not obliged to return a correctly setup @value for error returns, simply because any non-%NULL return is considered a fatal condition so further program behaviour is undefined.
+ * @lcopy_format: Format description of the arguments to collect for @lcopy_value, analogous to @collect_format. Usually, @lcopy_format string consists only of 'p's to provide lcopy_value() with pointers to storage locations.
+ * @lcopy_value: This function is responsible for storing the @value contents into arguments passed through a variable argument list which got collected into @collect_values according to @lcopy_format. @n_collect_values equals the string length of @lcopy_format, and @collect_flags may contain %G_VALUE_NOCOPY_CONTENTS. In contrast to collect_value(), lcopy_value() is obliged to always properly support %G_VALUE_NOCOPY_CONTENTS. Similar to collect_value() the function may prematurely abort by returning a newly allocated string describing an error condition. To complete the string example: |[ gchar **string_p = collect_values[0].v_pointer; if (!string_p) return g_strdup_printf ("string location passed as NULL"); if (collect_flags & G_VALUE_NOCOPY_CONTENTS) *string_p = value->data[0].v_pointer; else *string_p = g_strdup (value->data[0].v_pointer); ]| And an illustrative version of lcopy_value() for reference-counted types: |[ GObject **object_p = collect_values[0].v_pointer; if (!object_p) return g_strdup_printf ("object location passed as NULL"); if (!value->data[0].v_pointer) *object_p = NULL; else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) /&ast; always honour &ast;/ *object_p = value->data[0].v_pointer; else *object_p = g_object_ref (value->data[0].v_pointer); return NULL; ]|
+ *
+ * The #GTypeValueTable provides the functions required by the #GValue implementation,
+ * to serve as a container for values of a type.
+ */
+
+
+/**
+ * GUINT16_FROM_BE:
+ * @val: a #guint16 value in big-endian byte order
+ *
+ * Converts a #guint16 value from big-endian to host byte order.
+ *
+ * Returns: @val converted to host byte order
+ */
+
+
+/**
+ * GUINT16_FROM_LE:
+ * @val: a #guint16 value in little-endian byte order
+ *
+ * Converts a #guint16 value from little-endian to host byte order.
+ *
+ * Returns: @val converted to host byte order
+ */
+
+
+/**
+ * GUINT16_SWAP_BE_PDP:
+ * @val: a #guint16 value in big-endian or pdp-endian byte order
+ *
+ * Converts a #guint16 value between big-endian and pdp-endian byte order.
+ * The conversion is symmetric so it can be used both ways.
+ *
+ * Returns: @val converted to the opposite byte order
+ */
+
+
+/**
+ * GUINT16_SWAP_LE_BE:
+ * @val: a #guint16 value in little-endian or big-endian byte order
+ *
+ * Converts a #guint16 value between little-endian and big-endian byte order.
+ * The conversion is symmetric so it can be used both ways.
+ *
+ * Returns: @val converted to the opposite byte order
+ */
+
+
+/**
+ * GUINT16_SWAP_LE_PDP:
+ * @val: a #guint16 value in little-endian or pdp-endian byte order
+ *
+ * Converts a #guint16 value between little-endian and pdp-endian byte order.
+ * The conversion is symmetric so it can be used both ways.
+ *
+ * Returns: @val converted to the opposite byte order
+ */
+
+
+/**
+ * GUINT16_TO_BE:
+ * @val: a #guint16 value in host byte order
+ *
+ * Converts a #guint16 value from host byte order to big-endian.
+ *
+ * Returns: @val converted to big-endian
+ */
+
+
+/**
+ * GUINT16_TO_LE:
+ * @val: a #guint16 value in host byte order
+ *
+ * Converts a #guint16 value from host byte order to little-endian.
+ *
+ * Returns: @val converted to little-endian
+ */
+
+
+/**
+ * GUINT32_FROM_BE:
+ * @val: a #guint32 value in big-endian byte order
+ *
+ * Converts a #guint32 value from big-endian to host byte order.
+ *
+ * Returns: @val converted to host byte order
+ */
+
+
+/**
+ * GUINT32_FROM_LE:
+ * @val: a #guint32 value in little-endian byte order
+ *
+ * Converts a #guint32 value from little-endian to host byte order.
+ *
+ * Returns: @val converted to host byte order
+ */
+
+
+/**
+ * GUINT32_SWAP_BE_PDP:
+ * @val: a #guint32 value in big-endian or pdp-endian byte order
+ *
+ * Converts a #guint32 value between big-endian and pdp-endian byte order.
+ * The conversion is symmetric so it can be used both ways.
+ *
+ * Returns: @val converted to the opposite byte order
+ */
+
+
+/**
+ * GUINT32_SWAP_LE_BE:
+ * @val: a #guint32 value in little-endian or big-endian byte order
+ *
+ * Converts a #guint32 value between little-endian and big-endian byte order.
+ * The conversion is symmetric so it can be used both ways.
+ *
+ * Returns: @val converted to the opposite byte order
+ */
+
+
+/**
+ * GUINT32_SWAP_LE_PDP:
+ * @val: a #guint32 value in little-endian or pdp-endian byte order
+ *
+ * Converts a #guint32 value between little-endian and pdp-endian byte order.
+ * The conversion is symmetric so it can be used both ways.
+ *
+ * Returns: @val converted to the opposite byte order
+ */
+
+
+/**
+ * GUINT32_TO_BE:
+ * @val: a #guint32 value in host byte order
+ *
+ * Converts a #guint32 value from host byte order to big-endian.
+ *
+ * Returns: @val converted to big-endian
+ */
+
+
+/**
+ * GUINT32_TO_LE:
+ * @val: a #guint32 value in host byte order
+ *
+ * Converts a #guint32 value from host byte order to little-endian.
+ *
+ * Returns: @val converted to little-endian
+ */
+
+
+/**
+ * GUINT64_FROM_BE:
+ * @val: a #guint64 value in big-endian byte order
+ *
+ * Converts a #guint64 value from big-endian to host byte order.
+ *
+ * Returns: @val converted to host byte order
+ */
+
+
+/**
+ * GUINT64_FROM_LE:
+ * @val: a #guint64 value in little-endian byte order
+ *
+ * Converts a #guint64 value from little-endian to host byte order.
+ *
+ * Returns: @val converted to host byte order
+ */
+
+
+/**
+ * GUINT64_SWAP_LE_BE:
+ * @val: a #guint64 value in little-endian or big-endian byte order
+ *
+ * Converts a #guint64 value between little-endian and big-endian byte order.
+ * The conversion is symmetric so it can be used both ways.
+ *
+ * Returns: @val converted to the opposite byte order
+ */
+
+
+/**
+ * GUINT64_TO_BE:
+ * @val: a #guint64 value in host byte order
+ *
+ * Converts a #guint64 value from host byte order to big-endian.
+ *
+ * Returns: @val converted to big-endian
+ */
+
+
+/**
+ * GUINT64_TO_LE:
+ * @val: a #guint64 value in host byte order
+ *
+ * Converts a #guint64 value from host byte order to little-endian.
+ *
+ * Returns: @val converted to little-endian
+ */
+
+
+/**
+ * GUINT_FROM_BE:
+ * @val: a #guint value in big-endian byte order
+ *
+ * Converts a #guint value from big-endian to host byte order.
+ *
+ * Returns: @val converted to host byte order
+ */
+
+
+/**
+ * GUINT_FROM_LE:
+ * @val: a #guint value in little-endian byte order
+ *
+ * Converts a #guint value from little-endian to host byte order.
+ *
+ * Returns: @val converted to host byte order
+ */
+
+
+/**
+ * GUINT_TO_BE:
+ * @val: a #guint value in host byte order
+ *
+ * Converts a #guint value from host byte order to big-endian.
+ *
+ * Returns: @val converted to big-endian byte order
+ */
+
+
+/**
+ * GUINT_TO_LE:
+ * @val: a #guint value in host byte order
+ *
+ * Converts a #guint value from host byte order to little-endian.
+ *
+ * Returns: @val converted to little-endian byte order.
+ */
+
+
+/**
+ * GUINT_TO_POINTER:
+ * @u: unsigned integer to stuff into the pointer
+ *
+ * Stuffs an unsigned integer into a pointer type.
+ */
+
+
+/**
+ * GULONG_FROM_BE:
+ * @val: a #gulong value in big-endian byte order
+ *
+ * Converts a #gulong value from big-endian to host byte order.
+ *
+ * Returns: @val converted to host byte order
+ */
+
+
+/**
+ * GULONG_FROM_LE:
+ * @val: a #gulong value in little-endian byte order
+ *
+ * Converts a #gulong value from little-endian to host byte order.
+ *
+ * Returns: @val converted to host byte order
+ */
+
+
+/**
+ * GULONG_TO_BE:
+ * @val: a #gulong value in host byte order
+ *
+ * Converts a #gulong value from host byte order to big-endian.
+ *
+ * Returns: @val converted to big-endian
+ */
+
+
+/**
+ * GULONG_TO_LE:
+ * @val: a #gulong value in host byte order
+ *
+ * Converts a #gulong value from host byte order to little-endian.
+ *
+ * Returns: @val converted to little-endian
+ */
+
+
+/**
+ * GUnicodeBreakType:
+ * @G_UNICODE_BREAK_MANDATORY: Mandatory Break (BK)
+ * @G_UNICODE_BREAK_CARRIAGE_RETURN: Carriage Return (CR)
+ * @G_UNICODE_BREAK_LINE_FEED: Line Feed (LF)
+ * @G_UNICODE_BREAK_COMBINING_MARK: Attached Characters and Combining Marks (CM)
+ * @G_UNICODE_BREAK_SURROGATE: Surrogates (SG)
+ * @G_UNICODE_BREAK_ZERO_WIDTH_SPACE: Zero Width Space (ZW)
+ * @G_UNICODE_BREAK_INSEPARABLE: Inseparable (IN)
+ * @G_UNICODE_BREAK_NON_BREAKING_GLUE: Non-breaking ("Glue") (GL)
+ * @G_UNICODE_BREAK_CONTINGENT: Contingent Break Opportunity (CB)
+ * @G_UNICODE_BREAK_SPACE: Space (SP)
+ * @G_UNICODE_BREAK_AFTER: Break Opportunity After (BA)
+ * @G_UNICODE_BREAK_BEFORE: Break Opportunity Before (BB)
+ * @G_UNICODE_BREAK_BEFORE_AND_AFTER: Break Opportunity Before and After (B2)
+ * @G_UNICODE_BREAK_HYPHEN: Hyphen (HY)
+ * @G_UNICODE_BREAK_NON_STARTER: Nonstarter (NS)
+ * @G_UNICODE_BREAK_OPEN_PUNCTUATION: Opening Punctuation (OP)
+ * @G_UNICODE_BREAK_CLOSE_PUNCTUATION: Closing Punctuation (CL)
+ * @G_UNICODE_BREAK_QUOTATION: Ambiguous Quotation (QU)
+ * @G_UNICODE_BREAK_EXCLAMATION: Exclamation/Interrogation (EX)
+ * @G_UNICODE_BREAK_IDEOGRAPHIC: Ideographic (ID)
+ * @G_UNICODE_BREAK_NUMERIC: Numeric (NU)
+ * @G_UNICODE_BREAK_INFIX_SEPARATOR: Infix Separator (Numeric) (IS)
+ * @G_UNICODE_BREAK_SYMBOL: Symbols Allowing Break After (SY)
+ * @G_UNICODE_BREAK_ALPHABETIC: Ordinary Alphabetic and Symbol Characters (AL)
+ * @G_UNICODE_BREAK_PREFIX: Prefix (Numeric) (PR)
+ * @G_UNICODE_BREAK_POSTFIX: Postfix (Numeric) (PO)
+ * @G_UNICODE_BREAK_COMPLEX_CONTEXT: Complex Content Dependent (South East Asian) (SA)
+ * @G_UNICODE_BREAK_AMBIGUOUS: Ambiguous (Alphabetic or Ideographic) (AI)
+ * @G_UNICODE_BREAK_UNKNOWN: Unknown (XX)
+ * @G_UNICODE_BREAK_NEXT_LINE: Next Line (NL)
+ * @G_UNICODE_BREAK_WORD_JOINER: Word Joiner (WJ)
+ * @G_UNICODE_BREAK_HANGUL_L_JAMO: Hangul L Jamo (JL)
+ * @G_UNICODE_BREAK_HANGUL_V_JAMO: Hangul V Jamo (JV)
+ * @G_UNICODE_BREAK_HANGUL_T_JAMO: Hangul T Jamo (JT)
+ * @G_UNICODE_BREAK_HANGUL_LV_SYLLABLE: Hangul LV Syllable (H2)
+ * @G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE: Hangul LVT Syllable (H3)
+ * @G_UNICODE_BREAK_CLOSE_PARANTHESIS: Closing Parenthesis (CP). Since 2.28
+ * @G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER: Conditional Japanese Starter (CJ). Since: 2.32
+ * @G_UNICODE_BREAK_HEBREW_LETTER: Hebrew Letter (HL). Since: 2.32
+ *
+ * These are the possible line break classifications.
+ *
+ * The five Hangul types were added in Unicode 4.1, so, has been
+ * introduced in GLib 2.10. Note that new types may be added in the future.
+ * Applications should be ready to handle unknown values.
+ * They may be regarded as %G_UNICODE_BREAK_UNKNOWN.
+ *
+ * See <ulink url="http://www.unicode.org/unicode/reports/tr14/">http://www.unicode.org/unicode/reports/tr14/</ulink>.
+ */
+
+
+/**
+ * GUnicodeScript:
+ * @G_UNICODE_SCRIPT_COMMON: a character used by multiple different scripts
+ * @G_UNICODE_SCRIPT_INHERITED: a mark glyph that takes its script from the i                             base glyph to which it is attached
+ * @G_UNICODE_SCRIPT_ARABIC: Arabic
+ * @G_UNICODE_SCRIPT_ARMENIAN: Armenian
+ * @G_UNICODE_SCRIPT_BENGALI: Bengali
+ * @G_UNICODE_SCRIPT_BOPOMOFO: Bopomofo
+ * @G_UNICODE_SCRIPT_CHEROKEE: Cherokee
+ * @G_UNICODE_SCRIPT_COPTIC: Coptic
+ * @G_UNICODE_SCRIPT_CYRILLIC: Cyrillic
+ * @G_UNICODE_SCRIPT_DESERET: Deseret
+ * @G_UNICODE_SCRIPT_DEVANAGARI: Devanagari
+ * @G_UNICODE_SCRIPT_ETHIOPIC: Ethiopic
+ * @G_UNICODE_SCRIPT_GEORGIAN: Georgian
+ * @G_UNICODE_SCRIPT_GOTHIC: Gothic
+ * @G_UNICODE_SCRIPT_GREEK: Greek
+ * @G_UNICODE_SCRIPT_GUJARATI: Gujarati
+ * @G_UNICODE_SCRIPT_GURMUKHI: Gurmukhi
+ * @G_UNICODE_SCRIPT_HAN: Han
+ * @G_UNICODE_SCRIPT_HANGUL: Hangul
+ * @G_UNICODE_SCRIPT_HEBREW: Hebrew
+ * @G_UNICODE_SCRIPT_HIRAGANA: Hiragana
+ * @G_UNICODE_SCRIPT_KANNADA: Kannada
+ * @G_UNICODE_SCRIPT_KATAKANA: Katakana
+ * @G_UNICODE_SCRIPT_KHMER: Khmer
+ * @G_UNICODE_SCRIPT_LAO: Lao
+ * @G_UNICODE_SCRIPT_LATIN: Latin
+ * @G_UNICODE_SCRIPT_MALAYALAM: Malayalam
+ * @G_UNICODE_SCRIPT_MONGOLIAN: Mongolian
+ * @G_UNICODE_SCRIPT_MYANMAR: Myanmar
+ * @G_UNICODE_SCRIPT_OGHAM: Ogham
+ * @G_UNICODE_SCRIPT_OLD_ITALIC: Old Italic
+ * @G_UNICODE_SCRIPT_ORIYA: Oriya
+ * @G_UNICODE_SCRIPT_RUNIC: Runic
+ * @G_UNICODE_SCRIPT_SINHALA: Sinhala
+ * @G_UNICODE_SCRIPT_SYRIAC: Syriac
+ * @G_UNICODE_SCRIPT_TAMIL: Tamil
+ * @G_UNICODE_SCRIPT_TELUGU: Telugu
+ * @G_UNICODE_SCRIPT_THAANA: Thaana
+ * @G_UNICODE_SCRIPT_THAI: Thai
+ * @G_UNICODE_SCRIPT_TIBETAN: Tibetan Canadian Aboriginal
+ * @G_UNICODE_SCRIPT_YI: Yi
+ * @G_UNICODE_SCRIPT_TAGALOG: Tagalog
+ * @G_UNICODE_SCRIPT_HANUNOO: Hanunoo
+ * @G_UNICODE_SCRIPT_BUHID: Buhid
+ * @G_UNICODE_SCRIPT_TAGBANWA: Tagbanwa
+ * @G_UNICODE_SCRIPT_BRAILLE: Braille
+ * @G_UNICODE_SCRIPT_CYPRIOT: Cypriot
+ * @G_UNICODE_SCRIPT_LIMBU: Limbu
+ * @G_UNICODE_SCRIPT_OSMANYA: Osmanya
+ * @G_UNICODE_SCRIPT_SHAVIAN: Shavian
+ * @G_UNICODE_SCRIPT_LINEAR_B: Linear B
+ * @G_UNICODE_SCRIPT_TAI_LE: Tai Le
+ * @G_UNICODE_SCRIPT_UGARITIC: Ugaritic New Tai Lue
+ * @G_UNICODE_SCRIPT_BUGINESE: Buginese
+ * @G_UNICODE_SCRIPT_GLAGOLITIC: Glagolitic
+ * @G_UNICODE_SCRIPT_TIFINAGH: Tifinagh Syloti Nagri Old Persian
+ * @G_UNICODE_SCRIPT_KHAROSHTHI: Kharoshthi
+ * @G_UNICODE_SCRIPT_UNKNOWN: an unassigned code point
+ * @G_UNICODE_SCRIPT_BALINESE: Balinese
+ * @G_UNICODE_SCRIPT_CUNEIFORM: Cuneiform
+ * @G_UNICODE_SCRIPT_PHOENICIAN: Phoenician
+ * @G_UNICODE_SCRIPT_PHAGS_PA: Phags-pa
+ * @G_UNICODE_SCRIPT_NKO: N'Ko
+ * @G_UNICODE_SCRIPT_KAYAH_LI: Kayah Li. Since 2.16.3
+ * @G_UNICODE_SCRIPT_LEPCHA: Lepcha. Since 2.16.3
+ * @G_UNICODE_SCRIPT_REJANG: Rejang. Since 2.16.3
+ * @G_UNICODE_SCRIPT_SUNDANESE: Sundanese. Since 2.16.3
+ * @G_UNICODE_SCRIPT_SAURASHTRA: Saurashtra. Since 2.16.3
+ * @G_UNICODE_SCRIPT_CHAM: Cham. Since 2.16.3
+ * @G_UNICODE_SCRIPT_OL_CHIKI: Ol Chiki. Since 2.16.3
+ * @G_UNICODE_SCRIPT_VAI: Vai. Since 2.16.3
+ * @G_UNICODE_SCRIPT_CARIAN: Carian. Since 2.16.3
+ * @G_UNICODE_SCRIPT_LYCIAN: Lycian. Since 2.16.3
+ * @G_UNICODE_SCRIPT_LYDIAN: Lydian. Since 2.16.3
+ * @G_UNICODE_SCRIPT_AVESTAN: Avestan. Since 2.26
+ * @G_UNICODE_SCRIPT_BAMUM: Bamum. Since 2.26 Egyptian Hieroglpyhs. Since 2.26 Imperial Aramaic. Since 2.26 Inscriptional Pahlavi. Since 2.26 Inscriptional Parthian. Since 2.26
+ * @G_UNICODE_SCRIPT_JAVANESE: Javanese. Since 2.26
+ * @G_UNICODE_SCRIPT_KAITHI: Kaithi. Since 2.26
+ * @G_UNICODE_SCRIPT_LISU: Lisu. Since 2.26 Meetei Mayek. Since 2.26 Old South Arabian. Since 2.26
+ * @G_UNICODE_SCRIPT_OLD_TURKIC: Old Turkic. Since 2.28
+ * @G_UNICODE_SCRIPT_SAMARITAN: Samaritan. Since 2.26
+ * @G_UNICODE_SCRIPT_TAI_THAM: Tai Tham. Since 2.26
+ * @G_UNICODE_SCRIPT_TAI_VIET: Tai Viet. Since 2.26
+ * @G_UNICODE_SCRIPT_BATAK: Batak. Since 2.28
+ * @G_UNICODE_SCRIPT_BRAHMI: Brahmi. Since 2.28
+ * @G_UNICODE_SCRIPT_MANDAIC: Mandaic. Since 2.28
+ * @G_UNICODE_SCRIPT_CHAKMA: Chakma. Since: 2.32
+ * @G_UNICODE_SCRIPT_MEROITIC_CURSIVE: Meroitic Cursive. Since: 2.32
+ * @G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS, Meroitic Hieroglyphs. Since: 2.32
+ * @G_UNICODE_SCRIPT_MIAO: Miao. Since: 2.32
+ * @G_UNICODE_SCRIPT_SHARADA: Sharada. Since: 2.32
+ * @G_UNICODE_SCRIPT_SORA_SOMPENG: Sora Sompeng. Since: 2.32
+ * @G_UNICODE_SCRIPT_TAKRI: Takri. Since: 2.32
+ *
+ * The #GUnicodeScript enumeration identifies different writing
+ * systems. The values correspond to the names as defined in the
+ * Unicode standard. The enumeration has been added in GLib 2.14,
+ * and is interchangeable with #PangoScript.
+ *
+ * Note that new types may be added in the future. Applications
+ * should be ready to handle unknown values.
+ * See <ulink
+ * url="http://www.unicode.org/reports/tr24/">Unicode Standard Annex
+ * #24: Script names</ulink>.
+ */
+
+
+/**
+ * GUnicodeType:
+ * @G_UNICODE_CONTROL: General category "Other, Control" (Cc)
+ * @G_UNICODE_FORMAT: General category "Other, Format" (Cf)
+ * @G_UNICODE_UNASSIGNED: General category "Other, Not Assigned" (Cn)
+ * @G_UNICODE_PRIVATE_USE: General category "Other, Private Use" (Co)
+ * @G_UNICODE_SURROGATE: General category "Other, Surrogate" (Cs)
+ * @G_UNICODE_LOWERCASE_LETTER: General category "Letter, Lowercase" (Ll)
+ * @G_UNICODE_MODIFIER_LETTER: General category "Letter, Modifier" (Lm)
+ * @G_UNICODE_OTHER_LETTER: General category "Letter, Other" (Lo)
+ * @G_UNICODE_TITLECASE_LETTER: General category "Letter, Titlecase" (Lt)
+ * @G_UNICODE_UPPERCASE_LETTER: General category "Letter, Uppercase" (Lu)
+ * @G_UNICODE_SPACING_MARK: General category "Mark, Spacing" (Mc)
+ * @G_UNICODE_ENCLOSING_MARK: General category "Mark, Enclosing" (Me)
+ * @G_UNICODE_NON_SPACING_MARK: General category "Mark, Nonspacing" (Mn)
+ * @G_UNICODE_DECIMAL_NUMBER: General category "Number, Decimal Digit" (Nd)
+ * @G_UNICODE_LETTER_NUMBER: General category "Number, Letter" (Nl)
+ * @G_UNICODE_OTHER_NUMBER: General category "Number, Other" (No)
+ * @G_UNICODE_CONNECT_PUNCTUATION: General category "Punctuation, Connector" (Pc)
+ * @G_UNICODE_DASH_PUNCTUATION: General category "Punctuation, Dash" (Pd)
+ * @G_UNICODE_CLOSE_PUNCTUATION: General category "Punctuation, Close" (Pe)
+ * @G_UNICODE_FINAL_PUNCTUATION: General category "Punctuation, Final quote" (Pf)
+ * @G_UNICODE_INITIAL_PUNCTUATION: General category "Punctuation, Initial quote" (Pi)
+ * @G_UNICODE_OTHER_PUNCTUATION: General category "Punctuation, Other" (Po)
+ * @G_UNICODE_OPEN_PUNCTUATION: General category "Punctuation, Open" (Ps)
+ * @G_UNICODE_CURRENCY_SYMBOL: General category "Symbol, Currency" (Sc)
+ * @G_UNICODE_MODIFIER_SYMBOL: General category "Symbol, Modifier" (Sk)
+ * @G_UNICODE_MATH_SYMBOL: General category "Symbol, Math" (Sm)
+ * @G_UNICODE_OTHER_SYMBOL: General category "Symbol, Other" (So)
+ * @G_UNICODE_LINE_SEPARATOR: General category "Separator, Line" (Zl)
+ * @G_UNICODE_PARAGRAPH_SEPARATOR: General category "Separator, Paragraph" (Zp)
+ * @G_UNICODE_SPACE_SEPARATOR: General category "Separator, Space" (Zs)
+ *
+ * These are the possible character classifications from the
+ * Unicode specification.
+ * See <ulink url="http://www.unicode.org/Public/UNIDATA/UnicodeData.html">http://www.unicode.org/Public/UNIDATA/UnicodeData.html</ulink>.
+ */
+
+
+/**
+ * GUserDirectory:
+ * @G_USER_DIRECTORY_DESKTOP: the user's Desktop directory
+ * @G_USER_DIRECTORY_DOCUMENTS: the user's Documents directory
+ * @G_USER_DIRECTORY_DOWNLOAD: the user's Downloads directory
+ * @G_USER_DIRECTORY_MUSIC: the user's Music directory
+ * @G_USER_DIRECTORY_PICTURES: the user's Pictures directory
+ * @G_USER_DIRECTORY_PUBLIC_SHARE: the user's shared directory
+ * @G_USER_DIRECTORY_TEMPLATES: the user's Templates directory
+ * @G_USER_DIRECTORY_VIDEOS: the user's Movies directory
+ * @G_USER_N_DIRECTORIES: the number of enum values
+ *
+ * These are logical ids for special directories which are defined
+ * depending on the platform used. You should use g_get_user_special_dir()
+ * to retrieve the full path associated to the logical id.
+ *
+ * The #GUserDirectory enumeration can be extended at later date. Not
+ * every platform has a directory for every logical id in this
+ * enumeration.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * GValue:
+ *
+ * An opaque structure used to hold different types of values.
+ * The data within the structure has protected scope: it is accessible only
+ * to functions within a #GTypeValueTable structure, or implementations of
+ * the g_value_*() API. That is, code portions which implement new fundamental
+ * types.
+ * #GValue users cannot make any assumptions about how data is stored
+ * within the 2 element @data union, and the @g_type member should
+ * only be accessed through the G_VALUE_TYPE() macro.
+ */
+
+
+/**
+ * GValueArray:
+ * @n_values: number of values contained in the array
+ * @values: array of values
+ *
+ * A #GValueArray contains an array of #GValue elements.
+ */
+
+
+/**
+ * GValueTransform:
+ * @src_value: Source value.
+ * @dest_value: Target value.
+ *
+ * The type of value transformation functions which can be registered with
+ * g_value_register_transform_func().
+ */
+
+
+/**
+ * GVariant:
+ *
+ * #GVariant is an opaque data structure and can only be accessed
+ * using the following functions.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * GVariantBuilder:
+ *
+ * A utility type for constructing container-type #GVariant instances.
+ *
+ * This is an opaque structure and may only be accessed using the
+ * following functions.
+ *
+ * #GVariantBuilder is not threadsafe in any way.  Do not attempt to
+ * access it from more than one thread.
+ */
+
+
+/**
+ * GVariantClass:
+ * @G_VARIANT_CLASS_BOOLEAN: The #GVariant is a boolean.
+ * @G_VARIANT_CLASS_BYTE: The #GVariant is a byte.
+ * @G_VARIANT_CLASS_INT16: The #GVariant is a signed 16 bit integer.
+ * @G_VARIANT_CLASS_UINT16: The #GVariant is an unsigned 16 bit integer.
+ * @G_VARIANT_CLASS_INT32: The #GVariant is a signed 32 bit integer.
+ * @G_VARIANT_CLASS_UINT32: The #GVariant is an unsigned 32 bit integer.
+ * @G_VARIANT_CLASS_INT64: The #GVariant is a signed 64 bit integer.
+ * @G_VARIANT_CLASS_UINT64: The #GVariant is an unsigned 64 bit integer.
+ * @G_VARIANT_CLASS_HANDLE: The #GVariant is a file handle index.
+ * @G_VARIANT_CLASS_DOUBLE: The #GVariant is a double precision floating point value.
+ * @G_VARIANT_CLASS_STRING: The #GVariant is a normal string.
+ * @G_VARIANT_CLASS_OBJECT_PATH: The #GVariant is a D-Bus object path string.
+ * @G_VARIANT_CLASS_SIGNATURE: The #GVariant is a D-Bus signature string.
+ * @G_VARIANT_CLASS_VARIANT: The #GVariant is a variant.
+ * @G_VARIANT_CLASS_MAYBE: The #GVariant is a maybe-typed value.
+ * @G_VARIANT_CLASS_ARRAY: The #GVariant is an array.
+ * @G_VARIANT_CLASS_TUPLE: The #GVariant is a tuple.
+ * @G_VARIANT_CLASS_DICT_ENTRY: The #GVariant is a dictionary entry.
+ *
+ * The range of possible top-level types of #GVariant instances.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * GVariantIter: (skip)
+ *
+ * #GVariantIter is an opaque data structure and can only be accessed
+ * using the following functions.
+ */
+
+
+/**
+ * GVariantParseError:
+ * @G_VARIANT_PARSE_ERROR_FAILED: generic error (unused)
+ * @G_VARIANT_PARSE_ERROR_BASIC_TYPE_EXPECTED: a non-basic #GVariantType was given where a basic type was expected
+ * @G_VARIANT_PARSE_ERROR_CANNOT_INFER_TYPE: cannot infer the #GVariantType
+ * @G_VARIANT_PARSE_ERROR_DEFINITE_TYPE_EXPECTED: an indefinite #GVariantType was given where a definite type was expected
+ * @G_VARIANT_PARSE_ERROR_INPUT_NOT_AT_END: extra data after parsing finished
+ * @G_VARIANT_PARSE_ERROR_INVALID_CHARACTER: invalid character in number or unicode escape
+ * @G_VARIANT_PARSE_ERROR_INVALID_FORMAT_STRING: not a valid #GVariant format string
+ * @G_VARIANT_PARSE_ERROR_INVALID_OBJECT_PATH: not a valid object path
+ * @G_VARIANT_PARSE_ERROR_INVALID_SIGNATURE: not a valid type signature
+ * @G_VARIANT_PARSE_ERROR_INVALID_TYPE_STRING: not a valid #GVariant type string
+ * @G_VARIANT_PARSE_ERROR_NO_COMMON_TYPE: could not find a common type for array entries
+ * @G_VARIANT_PARSE_ERROR_NUMBER_OUT_OF_RANGE: the numerical value is out of range of the given type
+ * @G_VARIANT_PARSE_ERROR_NUMBER_TOO_BIG: the numerical value is out of range for any type
+ * @G_VARIANT_PARSE_ERROR_TYPE_ERROR: cannot parse as variant of the specified type
+ * @G_VARIANT_PARSE_ERROR_UNEXPECTED_TOKEN: an unexpected token was encountered
+ * @G_VARIANT_PARSE_ERROR_UNKNOWN_KEYWORD: an unknown keyword was encountered
+ * @G_VARIANT_PARSE_ERROR_UNTERMINATED_STRING_CONSTANT: unterminated string constant
+ * @G_VARIANT_PARSE_ERROR_VALUE_EXPECTED: no value given
+ *
+ * Error codes returned by parsing text-format GVariants.
+ */
+
+
+/**
+ * GVariantType:
+ *
+ * A type in the GVariant type system.
+ *
+ * Two types may not be compared by value; use g_variant_type_equal() or
+ * g_variant_type_is_subtype_of().  May be copied using
+ * g_variant_type_copy() and freed using g_variant_type_free().
+ */
+
+
+/**
+ * GVoidFunc:
+ *
+ * Declares a type of function which takes no arguments
+ * and has no return value. It is used to specify the type
+ * function passed to g_atexit().
+ */
+
+
+/**
+ * GWeakNotify:
+ * @data: data that was provided when the weak reference was established
+ * @where_the_object_was: the object being finalized
+ *
+ * A #GWeakNotify function can be added to an object as a callback that gets
+ * triggered when the object is finalized. Since the object is already being
+ * finalized when the #GWeakNotify is called, there's not much you could do
+ * with the object, apart from e.g. using its address as hash-index or the like.
+ */
+
+
+/**
+ * G_ASCII_DTOSTR_BUF_SIZE:
+ *
+ * A good size for a buffer to be passed into g_ascii_dtostr().
+ * It is guaranteed to be enough for all output of that function
+ * on systems with 64bit IEEE-compatible doubles.
+ *
+ * The typical usage would be something like:
+ * |[
+ * char buf[G_ASCII_DTOSTR_BUF_SIZE];
+ *
+ * fprintf (out, "value=&percnt;s\n", g_ascii_dtostr (buf, sizeof (buf), value));
+ * ]|
+ */
+
+
+/**
+ * G_ATOMIC_LOCK_FREE:
+ *
+ * This macro is defined if the atomic operations of GLib are
+ * implemented using real hardware atomic operations.  This means that
+ * the GLib atomic API can be used between processes and safely mixed
+ * with other (hardware) atomic APIs.
+ *
+ * If this macro is not defined, the atomic operations may be
+ * emulated using a mutex.  In that case, the GLib atomic operations are
+ * only atomic relative to themselves and within a single process.
+ */
+
+
+/**
+ * G_BEGIN_DECLS:
+ *
+ * Used (along with #G_END_DECLS) to bracket header files. If the
+ * compiler in use is a C++ compiler, adds <literal>extern "C"</literal>
+ * around the header.
+ */
+
+
+/**
+ * G_BIG_ENDIAN:
+ *
+ * Specifies one of the possible types of byte order.
+ * See #G_BYTE_ORDER.
+ */
+
+
+/**
+ * G_BOOKMARK_FILE_ERROR:
+ *
+ * Error domain for bookmark file parsing.
+ * Errors in this domain will be from the #GBookmarkFileError
+ * enumeration. See #GError for information on error domains.
+ */
+
+
+/**
+ * G_BREAKPOINT:
+ *
+ * Inserts a breakpoint instruction into the code.
+ *
+ * On x86 and alpha systems this is implemented as a soft interrupt
+ * and on other architectures it raises a <literal>SIGTRAP</literal> signal.
+ */
+
+
+/**
+ * G_BYTE_ORDER:
+ *
+ * The host byte order.
+ * This can be either #G_LITTLE_ENDIAN or #G_BIG_ENDIAN (support for
+ * #G_PDP_ENDIAN may be added in future.)
+ */
+
+
+/**
+ * G_CALLBACK:
+ * @f: a function pointer.
+ *
+ * Cast a function pointer to a #GCallback.
+ */
+
+
+/**
+ * G_CCLOSURE_SWAP_DATA:
+ * @cclosure: a #GCClosure
+ *
+ * Checks whether the user data of the #GCClosure should be passed as the
+ * first parameter to the callback. See g_cclosure_new_swap().
+ *
+ * Returns: %TRUE if data has to be swapped.
+ */
+
+
+/**
+ * G_CLOSURE_NEEDS_MARSHAL:
+ * @closure: a #GClosure
+ *
+ * Check if the closure still needs a marshaller. See g_closure_set_marshal().
+ *
+ * @closure.
+ *
+ * Returns: %TRUE if a #GClosureMarshal marshaller has not yet been set on
+ */
+
+
+/**
+ * G_CLOSURE_N_NOTIFIERS:
+ * @cl: a #GClosure
+ *
+ * Get the total number of notifiers connected with the closure @cl.
+ * The count includes the meta marshaller, the finalize and invalidate notifiers
+ * and the marshal guards. Note that each guard counts as two notifiers.
+ * See g_closure_set_meta_marshal(), g_closure_add_finalize_notifier(),
+ * g_closure_add_invalidate_notifier() and g_closure_add_marshal_guards().
+ *
+ * Returns: number of notifiers
+ */
+
+
+/**
+ * G_CONST_RETURN:
+ *
+ * If <literal>G_DISABLE_CONST_RETURNS</literal> is defined, this macro expands
+ * to nothing. By default, the macro expands to <literal>const</literal>.
+ * The macro should be used in place of <literal>const</literal> for
+ * functions that return a value that should not be modified. The
+ * purpose of this macro is to allow us to turn on <literal>const</literal>
+ * for returned constant strings by default, while allowing programmers
+ * who find that annoying to turn it off. This macro should only be used
+ * for return values and for <emphasis>out</emphasis> parameters, it doesn't
+ * make sense for <emphasis>in</emphasis> parameters.
+ *
+ * <literal>const</literal> and API consumers should adjust their code
+ * accordingly
+ *
+ * Deprecated: 2.30: API providers should replace all existing uses with
+ */
+
+
+/**
+ * G_CONVERT_ERROR:
+ *
+ * Error domain for character set conversions. Errors in this domain will
+ * be from the #GConvertError enumeration. See #GError for information on
+ * error domains.
+ */
+
+
+/**
+ * G_CSET_A_2_Z:
+ *
+ * The set of uppercase ASCII alphabet characters.
+ * Used for specifying valid identifier characters
+ * in #GScannerConfig.
+ */
+
+
+/**
+ * G_CSET_LATINC:
+ *
+ * The set of uppercase ISO 8859-1 alphabet characters
+ * which are not ASCII characters.
+ * Used for specifying valid identifier characters
+ * in #GScannerConfig.
+ */
+
+
+/**
+ * G_CSET_LATINS:
+ *
+ * The set of lowercase ISO 8859-1 alphabet characters
+ * which are not ASCII characters.
+ * Used for specifying valid identifier characters
+ * in #GScannerConfig.
+ */
+
+
+/**
+ * G_CSET_a_2_z:
+ *
+ * The set of lowercase ASCII alphabet characters.
+ * Used for specifying valid identifier characters
+ * in #GScannerConfig.
+ */
+
+
+/**
+ * G_DATALIST_FLAGS_MASK:
+ *
+ * A bitmask that restricts the possible flags passed to
+ * g_datalist_set_flags(). Passing a flags value where
+ * flags & ~G_DATALIST_FLAGS_MASK != 0 is an error.
+ */
+
+
+/**
+ * G_DATE_BAD_DAY:
+ *
+ * Represents an invalid #GDateDay.
+ */
+
+
+/**
+ * G_DATE_BAD_JULIAN:
+ *
+ * Represents an invalid Julian day number.
+ */
+
+
+/**
+ * G_DATE_BAD_YEAR:
+ *
+ * Represents an invalid year.
+ */
+
+
+/**
+ * G_DEFINE_ABSTRACT_TYPE:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type, in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the parent type.
+ *
+ * A convenience macro for type implementations.
+ * Similar to G_DEFINE_TYPE(), but defines an abstract type.
+ * See G_DEFINE_TYPE_EXTENDED() for an example.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_DEFINE_ABSTRACT_TYPE_WITH_CODE:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type, in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the parent type.
+ * @_C_: Custom code that gets inserted in the @type_name_get_type() function.
+ *
+ * A convenience macro for type implementations.
+ * Similar to G_DEFINE_TYPE_WITH_CODE(), but defines an abstract type and allows you to
+ * insert custom code into the *_get_type() function, e.g. interface implementations
+ * via G_IMPLEMENT_INTERFACE(). See G_DEFINE_TYPE_EXTENDED() for an example.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_DEFINE_BOXED_TYPE:
+ * @TypeName: The name of the new type, in Camel case.
+ * @type_name: The name of the new type, in lowercase, with words separated by '_'.
+ * @copy_func: the #GBoxedCopyFunc for the new type
+ * @free_func: the #GBoxedFreeFunc for the new type
+ *
+ * A convenience macro for boxed type implementations, which defines a
+ * type_name_get_type() function registering the boxed type.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_DEFINE_BOXED_TYPE_WITH_CODE:
+ * @TypeName: The name of the new type, in Camel case.
+ * @type_name: The name of the new type, in lowercase, with words separated by '_'.
+ * @copy_func: the #GBoxedCopyFunc for the new type
+ * @free_func: the #GBoxedFreeFunc for the new type
+ * @_C_: Custom code that gets inserted in the *_get_type() function.
+ *
+ * A convenience macro for boxed type implementations.
+ * Similar to G_DEFINE_BOXED_TYPE(), but allows to insert custom code into the
+ * type_name_get_type() function, e.g. to register value transformations with
+ * g_value_register_transform_func().
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_DEFINE_DYNAMIC_TYPE:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type, in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the parent type.
+ *
+ * A convenience macro for dynamic type implementations, which declares a
+ * class initialization function, an instance initialization function (see
+ * #GTypeInfo for information about these) and a static variable named
+ * @t_n<!-- -->_parent_class pointing to the parent class. Furthermore,
+ * it defines a <function>*_get_type()</function> and a static
+ * <function>*_register_type()</function> function for use in your
+ * <function>module_init()</function>.
+ * See G_DEFINE_DYNAMIC_TYPE_EXTENDED() for an example.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_DEFINE_DYNAMIC_TYPE_EXTENDED:
+ * @TypeName: The name of the new type, in Camel case.
+ * @type_name: The name of the new type, in lowercase, with words separated by '_'.
+ * @TYPE_PARENT: The #GType of the parent type.
+ * @flags: #GTypeFlags to pass to g_type_module_register_type()
+ * @CODE: Custom code that gets inserted in the *_get_type() function.
+ *
+ * A more general version of G_DEFINE_DYNAMIC_TYPE() which
+ * allows to specify #GTypeFlags and custom code.
+ *
+ * |[
+ * G_DEFINE_DYNAMIC_TYPE_EXTENDED (GtkGadget,
+ * gtk_gadget,
+ * GTK_TYPE_THING,
+ * 0,
+ * G_IMPLEMENT_INTERFACE_DYNAMIC (TYPE_GIZMO,
+ * gtk_gadget_gizmo_init));
+ * ]|
+ * expands to
+ * |[
+ * static void     gtk_gadget_init              (GtkGadget      *self);
+ * static void     gtk_gadget_class_init        (GtkGadgetClass *klass);
+ * static void     gtk_gadget_class_finalize    (GtkGadgetClass *klass);
+ *
+ * static gpointer gtk_gadget_parent_class = NULL;
+ * static GType    gtk_gadget_type_id = 0;
+ *
+ * static void     gtk_gadget_class_intern_init (gpointer klass)
+ * {
+ * gtk_gadget_parent_class = g_type_class_peek_parent (klass);
+ * gtk_gadget_class_init ((GtkGadgetClass*) klass);
+ * }
+ *
+ * GType
+ * gtk_gadget_get_type (void)
+ * {
+ * return gtk_gadget_type_id;
+ * }
+ *
+ * static void
+ * gtk_gadget_register_type (GTypeModule *type_module)
+ * {
+ * const GTypeInfo g_define_type_info = {
+ * sizeof (GtkGadgetClass),
+ * (GBaseInitFunc) NULL,
+ * (GBaseFinalizeFunc) NULL,
+ * (GClassInitFunc) gtk_gadget_class_intern_init,
+ * (GClassFinalizeFunc) gtk_gadget_class_finalize,
+ * NULL,   // class_data
+ * sizeof (GtkGadget),
+ * 0,      // n_preallocs
+ * (GInstanceInitFunc) gtk_gadget_init,
+ * NULL    // value_table
+ * };
+ * gtk_gadget_type_id = g_type_module_register_type (type_module,
+ * GTK_TYPE_THING,
+ * GtkGadget,
+ * &g_define_type_info,
+ * (GTypeFlags) flags);
+ * {
+ * const GInterfaceInfo g_implement_interface_info = {
+ * (GInterfaceInitFunc) gtk_gadget_gizmo_init
+ * };
+ * g_type_module_add_interface (type_module, g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
+ * }
+ * }
+ * ]|
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_DEFINE_INTERFACE:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type, in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the prerequisite type for the interface, or 0 (%G_TYPE_INVALID) for no prerequisite type.
+ *
+ * A convenience macro for #GTypeInterface definitions, which declares
+ * a default vtable initialization function and defines a *_get_type()
+ * function.
+ *
+ * The macro expects the interface initialization function to have the
+ * name <literal>t_n ## _default_init</literal>, and the interface
+ * structure to have the name <literal>TN ## Interface</literal>.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * G_DEFINE_INTERFACE_WITH_CODE:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type, in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the prerequisite type for the interface, or 0 (%G_TYPE_INVALID) for no prerequisite type.
+ * @_C_: Custom code that gets inserted in the *_get_type() function.
+ *
+ * A convenience macro for #GTypeInterface definitions. Similar to
+ * G_DEFINE_INTERFACE(), but allows you to insert custom code into the
+ * *_get_type() function, e.g. additional interface implementations
+ * via G_IMPLEMENT_INTERFACE(), or additional prerequisite types. See
+ * G_DEFINE_TYPE_EXTENDED() for a similar example using
+ * G_DEFINE_TYPE_WITH_CODE().
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * G_DEFINE_POINTER_TYPE:
+ * @TypeName: The name of the new type, in Camel case.
+ * @type_name: The name of the new type, in lowercase, with words separated by '_'.
+ *
+ * A convenience macro for pointer type implementations, which defines a
+ * type_name_get_type() function registering the pointer type.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_DEFINE_POINTER_TYPE_WITH_CODE:
+ * @TypeName: The name of the new type, in Camel case.
+ * @type_name: The name of the new type, in lowercase, with words separated by '_'.
+ * @_C_: Custom code that gets inserted in the *_get_type() function.
+ *
+ * A convenience macro for pointer type implementations.
+ * Similar to G_DEFINE_POINTER_TYPE(), but allows to insert custom code into the
+ * type_name_get_type() function.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_DEFINE_TYPE:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type, in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the parent type.
+ *
+ * A convenience macro for type implementations, which declares a
+ * class initialization function, an instance initialization function (see #GTypeInfo for information about
+ * these) and a static variable named @t_n<!-- -->_parent_class pointing to the parent class. Furthermore, it defines
+ * a *_get_type() function. See G_DEFINE_TYPE_EXTENDED() for an example.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_DEFINE_TYPE_EXTENDED:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type, in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the parent type.
+ * @_f_: #GTypeFlags to pass to g_type_register_static()
+ * @_C_: Custom code that gets inserted in the *_get_type() function.
+ *
+ * The most general convenience macro for type implementations, on which
+ * G_DEFINE_TYPE(), etc are based.
+ *
+ * |[
+ * G_DEFINE_TYPE_EXTENDED (GtkGadget,
+ * gtk_gadget,
+ * GTK_TYPE_WIDGET,
+ * 0,
+ * G_IMPLEMENT_INTERFACE (TYPE_GIZMO,
+ * gtk_gadget_gizmo_init));
+ * ]|
+ * expands to
+ * |[
+ * static void     gtk_gadget_init       (GtkGadget      *self);
+ * static void     gtk_gadget_class_init (GtkGadgetClass *klass);
+ * static gpointer gtk_gadget_parent_class = NULL;
+ * static void     gtk_gadget_class_intern_init (gpointer klass)
+ * {
+ * gtk_gadget_parent_class = g_type_class_peek_parent (klass);
+ * gtk_gadget_class_init ((GtkGadgetClass*) klass);
+ * }
+ *
+ * GType
+ * gtk_gadget_get_type (void)
+ * {
+ * static volatile gsize g_define_type_id__volatile = 0;
+ * if (g_once_init_enter (&g_define_type_id__volatile))
+ * {
+ * GType g_define_type_id =
+ * g_type_register_static_simple (GTK_TYPE_WIDGET,
+ * g_intern_static_string ("GtkGadget"),
+ * sizeof (GtkGadgetClass),
+ * (GClassInitFunc) gtk_gadget_class_intern_init,
+ * sizeof (GtkGadget),
+ * (GInstanceInitFunc) gtk_gadget_init,
+ * (GTypeFlags) flags);
+ * {
+ * const GInterfaceInfo g_implement_interface_info = {
+ * (GInterfaceInitFunc) gtk_gadget_gizmo_init
+ * };
+ * g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
+ * }
+ * g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ * }
+ * return g_define_type_id__volatile;
+ * }
+ * ]|
+ * The only pieces which have to be manually provided are the definitions of
+ * the instance and class structure and the definitions of the instance and
+ * class init functions.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_DEFINE_TYPE_WITH_CODE:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the parent type.
+ * @_C_: Custom code that gets inserted in the *_get_type() function.
+ *
+ * A convenience macro for type implementations.
+ * Similar to G_DEFINE_TYPE(), but allows you to insert custom code into the
+ * *_get_type() function, e.g. interface implementations via G_IMPLEMENT_INTERFACE().
+ * See G_DEFINE_TYPE_EXTENDED() for an example.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_DEPRECATED:
+ *
+ * This macro is similar to %G_GNUC_DEPRECATED, and can be used to mark
+ * functions declarations as deprecated. Unlike %G_GNUC_DEPRECATED, it is
+ * meant to be portable across different compilers and must be placed
+ * before the function declaration.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * G_DEPRECATED_FOR:
+ *
+ * This macro is similar to %G_GNUC_DEPRECATED_FOR, and can be used to mark
+ * functions declarations as deprecated. Unlike %G_GNUC_DEPRECATED_FOR, it is
+ * meant to be portable across different compilers and must be placed
+ * before the function declaration.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * G_DIR_SEPARATOR:
+ *
+ * The directory separator character.
+ * This is '/' on UNIX machines and '\' under Windows.
+ */
+
+
+/**
+ * G_DIR_SEPARATOR_S:
+ *
+ * The directory separator as a string.
+ * This is "/" on UNIX machines and "\" under Windows.
+ */
+
+
+/**
+ * G_E:
+ *
+ * The base of natural logarithms.
+ */
+
+
+/**
+ * G_END_DECLS:
+ *
+ * Used (along with #G_BEGIN_DECLS) to bracket header files. If the
+ * compiler in use is a C++ compiler, adds <literal>extern "C"</literal>
+ * around the header.
+ */
+
+
+/**
+ * G_ENUM_CLASS:
+ * @class: a valid #GEnumClass
+ *
+ * Casts a derived #GEnumClass structure into a #GEnumClass structure.
+ */
+
+
+/**
+ * G_ENUM_CLASS_TYPE:
+ * @class: a #GEnumClass
+ *
+ * Get the type identifier from a given #GEnumClass structure.
+ *
+ * Returns: the #GType
+ */
+
+
+/**
+ * G_ENUM_CLASS_TYPE_NAME:
+ * @class: a #GEnumClass
+ *
+ * Get the static type name from a given #GEnumClass structure.
+ *
+ * Returns: the type name.
+ */
+
+
+/**
+ * G_FILE_ERROR:
+ *
+ * Error domain for file operations. Errors in this domain will
+ * be from the #GFileError enumeration. See #GError for information
+ * on error domains.
+ */
+
+
+/**
+ * G_FLAGS_CLASS:
+ * @class: a valid #GFlagsClass
+ *
+ * Casts a derived #GFlagsClass structure into a #GFlagsClass structure.
+ */
+
+
+/**
+ * G_FLAGS_CLASS_TYPE:
+ * @class: a #GFlagsClass
+ *
+ * Get the type identifier from a given #GFlagsClass structure.
+ *
+ * Returns: the #GType
+ */
+
+
+/**
+ * G_FLAGS_CLASS_TYPE_NAME:
+ * @class: a #GFlagsClass
+ *
+ * Get the static type name from a given #GFlagsClass structure.
+ *
+ * Returns: the type name.
+ */
+
+
+/**
+ * G_GINT16_FORMAT:
+ *
+ * This is the platform dependent conversion specifier for scanning and
+ * printing values of type #gint16. It is a string literal, but doesn't
+ * include the percent-sign, such that you can add precision and length
+ * modifiers between percent-sign and conversion specifier.
+ *
+ * |[
+ * gint16 in;
+ * gint32 out;
+ * sscanf ("42", "%" G_GINT16_FORMAT, &amp;in)
+ * out = in * 1000;
+ * g_print ("%" G_GINT32_FORMAT, out);
+ * ]|
+ */
+
+
+/**
+ * G_GINT16_MODIFIER:
+ *
+ * The platform dependent length modifier for conversion specifiers
+ * for scanning and printing values of type #gint16 or #guint16. It
+ * is a string literal, but doesn't include the percent-sign, such
+ * that you can add precision and length modifiers between percent-sign
+ * and conversion specifier and append a conversion specifier.
+ *
+ * The following example prints "0x7b";
+ * |[
+ * gint16 value = 123;
+ * g_print ("%#" G_GINT16_MODIFIER "x", value);
+ * ]|
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_GINT32_FORMAT:
+ *
+ * This is the platform dependent conversion specifier for scanning
+ * and printing values of type #gint32. See also #G_GINT16_FORMAT.
+ */
+
+
+/**
+ * G_GINT32_MODIFIER:
+ *
+ * The platform dependent length modifier for conversion specifiers
+ * for scanning and printing values of type #gint32 or #guint32. It
+ * is a string literal. See also #G_GINT16_MODIFIER.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_GINT64_CONSTANT:
+ * @val: a literal integer value, e.g. 0x1d636b02300a7aa7
+ *
+ * This macro is used to insert 64-bit integer literals
+ * into the source code.
+ */
+
+
+/**
+ * G_GINT64_FORMAT:
+ *
+ * This is the platform dependent conversion specifier for scanning
+ * and printing values of type #gint64. See also #G_GINT16_FORMAT.
+ *
+ * <note><para>
+ * Some platforms do not support scanning and printing 64 bit integers,
+ * even though the types are supported. On such platforms #G_GINT64_FORMAT
+ * is not defined. Note that scanf() may not support 64 bit integers, even
+ * if #G_GINT64_FORMAT is defined. Due to its weak error handling, scanf()
+ * is not recommended for parsing anyway; consider using g_ascii_strtoull()
+ * instead.
+ * </para></note>
+ */
+
+
+/**
+ * G_GINT64_MODIFIER:
+ *
+ * The platform dependent length modifier for conversion specifiers
+ * for scanning and printing values of type #gint64 or #guint64.
+ * It is a string literal.
+ *
+ * <note><para>
+ * Some platforms do not support printing 64 bit integers, even
+ * though the types are supported. On such platforms #G_GINT64_MODIFIER
+ * is not defined.
+ * </para></note>
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_GINTPTR_FORMAT:
+ *
+ * This is the platform dependent conversion specifier for scanning
+ * and printing values of type #gintptr.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * G_GINTPTR_MODIFIER:
+ *
+ * The platform dependent length modifier for conversion specifiers
+ * for scanning and printing values of type #gintptr or #guintptr.
+ * It is a string literal.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * G_GNUC_ALLOC_SIZE:
+ * @x: the index of the argument specifying the allocation size
+ *
+ * Expands to the GNU C <literal>alloc_size</literal> function attribute
+ * if the compiler is a new enough <command>gcc</command>. This attribute
+ * tells the compiler that the function returns a pointer to memory of a
+ * size that is specified by the @x<!-- -->th function parameter.
+ * See the GNU C documentation for details.
+ *
+ * Since: 2.18
+ */
+
+
+/**
+ * G_GNUC_ALLOC_SIZE2:
+ * @x: the index of the argument specifying one factor of the allocation size
+ * @y: the index of the argument specifying the second factor of the allocation size
+ *
+ * Expands to the GNU C <literal>alloc_size</literal> function attribute
+ * if the compiler is a new enough <command>gcc</command>. This attribute
+ * tells the compiler that the function returns a pointer to memory of a
+ * size that is specified by the product of two function parameters.
+ * See the GNU C documentation for details.
+ *
+ * Since: 2.18
+ */
+
+
+/**
+ * G_GNUC_BEGIN_IGNORE_DEPRECATIONS:
+ *
+ * Tells <command>gcc</command> (if it is a new enough version) to
+ * temporarily stop emitting warnings when functions marked with
+ * %G_GNUC_DEPRECATED or %G_GNUC_DEPRECATED_FOR are called. This is
+ * useful for when you have one deprecated function calling another
+ * one, or when you still have regression tests for deprecated
+ * functions.
+ *
+ * Use %G_GNUC_END_IGNORE_DEPRECATIONS to begin warning again. (If you
+ * are not compiling with <literal>-Wdeprecated-declarations</literal>
+ * then neither macro has any effect.)
+ *
+ * This macro can be used either inside or outside of a function body,
+ * but must appear on a line by itself.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * G_GNUC_CONST:
+ *
+ * Expands to the GNU C <literal>const</literal> function attribute if
+ * the compiler is <command>gcc</command>. Declaring a function as const
+ * enables better optimization of calls to the function. A const function
+ * doesn't examine any values except its parameters, and has no effects
+ * except its return value. See the GNU C documentation for details.
+ *
+ * <note><para>
+ * A function that has pointer arguments and examines the data pointed to
+ * must <emphasis>not</emphasis> be declared const. Likewise, a function
+ * that calls a non-const function usually must not be const. It doesn't
+ * make sense for a const function to return void.
+ * </para></note>
+ */
+
+
+/**
+ * G_GNUC_DEPRECATED:
+ *
+ * Expands to the GNU C <literal>deprecated</literal> attribute if the
+ * compiler is <command>gcc</command>. It can be used to mark typedefs,
+ * variables and functions as deprecated. When called with the
+ * <option>-Wdeprecated-declarations</option> option, the compiler will
+ * generate warnings when deprecated interfaces are used.
+ * See the GNU C documentation for details.
+ *
+ * Since: 2.2
+ */
+
+
+/**
+ * G_GNUC_DEPRECATED_FOR:
+ * @f: the intended replacement for the deprecated symbol, such as the name of a function
+ *
+ * Like %G_GNUC_DEPRECATED, but names the intended replacement for the
+ * deprecated symbol if the version of <command>gcc</command> in use is
+ * new enough to support custom deprecation messages.
+ * See the GNU C documentation for details.
+ *
+ * Note that if @f is a macro, it will be expanded in the warning message.
+ * You can enclose it in quotes to prevent this. (The quotes will show up
+ * in the warning, but it's better than showing the macro expansion.)
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_GNUC_END_IGNORE_DEPRECATIONS:
+ *
+ * Undoes the effect of %G_GNUC_BEGIN_IGNORE_DEPRECATIONS, telling
+ * <command>gcc</command> to begin outputting warnings again
+ * (assuming those warnings had been enabled to begin with).
+ *
+ * This macro can be used either inside or outside of a function body,
+ * but must appear on a line by itself.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * G_GNUC_EXTENSION:
+ *
+ * Expands to <literal>__extension__</literal> when <command>gcc</command>
+ * is used as the compiler. This simply tells <command>gcc</command> not
+ * to warn about the following non-standard code when compiling with the
+ * <option>-pedantic</option> option.
+ */
+
+
+/**
+ * G_GNUC_FORMAT:
+ * @arg_idx: the index of the argument
+ *
+ * Expands to the GNU C <literal>format_arg</literal> function attribute
+ * if the compiler is <command>gcc</command>. This function attribute
+ * specifies that a function takes a format string for a printf(),
+ * scanf(), strftime() or strfmon() style function and modifies it,
+ * so that the result can be passed to a printf(), scanf(), strftime()
+ * or strfmon() style function (with the remaining arguments to the
+ * format function the same as they would have been for the unmodified
+ * string). See the GNU C documentation for details.
+ *
+ * |[
+ * gchar *g_dgettext (gchar *domain_name, gchar *msgid) G_GNUC_FORMAT (2);
+ * ]|
+ */
+
+
+/**
+ * G_GNUC_FUNCTION:
+ *
+ * Expands to "" on all modern compilers, and to
+ * <literal>__FUNCTION__</literal> on <command>gcc</command> version 2.x.
+ * Don't use it.
+ *
+ * Deprecated: 2.16: Use #G_STRFUNC instead
+ */
+
+
+/**
+ * G_GNUC_INTERNAL:
+ *
+ * This attribute can be used for marking library functions as being used
+ * internally to the library only, which may allow the compiler to handle
+ * function calls more efficiently. Note that static functions do not need
+ * to be marked as internal in this way. See the GNU C documentation for
+ * details.
+ *
+ * When using a compiler that supports the GNU C hidden visibility attribute,
+ * this macro expands to <literal>__attribute__((visibility("hidden")))</literal>.
+ * When using the Sun Studio compiler, it expands to <literal>__hidden</literal>.
+ *
+ * Note that for portability, the attribute should be placed before the
+ * function declaration. While GCC allows the macro after the declaration,
+ * Sun Studio does not.
+ *
+ * |[
+ * G_GNUC_INTERNAL
+ * void _g_log_fallback_handler (const gchar    *log_domain,
+ * GLogLevelFlags  log_level,
+ * const gchar    *message,
+ * gpointer        unused_data);
+ * ]|
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * G_GNUC_MALLOC:
+ *
+ * Expands to the GNU C <literal>malloc</literal> function attribute if the
+ * compiler is <command>gcc</command>. Declaring a function as malloc enables
+ * better optimization of the function. A function can have the malloc
+ * attribute if it returns a pointer which is guaranteed to not alias with
+ * any other pointer when the function returns (in practice, this means newly
+ * allocated memory). See the GNU C documentation for details.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * G_GNUC_MAY_ALIAS:
+ *
+ * Expands to the GNU C <literal>may_alias</literal> type attribute
+ * if the compiler is <command>gcc</command>. Types with this attribute
+ * will not be subjected to type-based alias analysis, but are assumed
+ * to alias with any other type, just like char.
+ * See the GNU C documentation for details.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_GNUC_NORETURN:
+ *
+ * Expands to the GNU C <literal>noreturn</literal> function attribute
+ * if the compiler is <command>gcc</command>. It is used for declaring
+ * functions which never return. It enables optimization of the function,
+ * and avoids possible compiler warnings. See the GNU C documentation for
+ * details.
+ */
+
+
+/**
+ * G_GNUC_NO_INSTRUMENT:
+ *
+ * Expands to the GNU C <literal>no_instrument_function</literal> function
+ * attribute if the compiler is <command>gcc</command>. Functions with this
+ * attribute will not be instrumented for profiling, when the compiler is
+ * called with the <option>-finstrument-functions</option> option.
+ * See the GNU C documentation for details.
+ */
+
+
+/**
+ * G_GNUC_NULL_TERMINATED:
+ *
+ * Expands to the GNU C <literal>sentinel</literal> function attribute
+ * if the compiler is <command>gcc</command>, or "" if it isn't. This
+ * function attribute only applies to variadic functions and instructs
+ * the compiler to check that the argument list is terminated with an
+ * explicit %NULL. See the GNU C documentation for details.
+ *
+ * Since: 2.8
+ */
+
+
+/**
+ * G_GNUC_PRETTY_FUNCTION:
+ *
+ * Expands to "" on all modern compilers, and to
+ * <literal>__PRETTY_FUNCTION__</literal> on <command>gcc</command>
+ * version 2.x. Don't use it.
+ *
+ * Deprecated: 2.16: Use #G_STRFUNC instead
+ */
+
+
+/**
+ * G_GNUC_PRINTF:
+ * @format_idx: the index of the argument corresponding to the format string (The arguments are numbered from 1)
+ * @arg_idx: the index of the first of the format arguments
+ *
+ * Expands to the GNU C <literal>format</literal> function attribute
+ * if the compiler is <command>gcc</command>. This is used for declaring
+ * functions which take a variable number of arguments, with the same
+ * syntax as printf(). It allows the compiler to type-check the arguments
+ * passed to the function. See the GNU C documentation for details.
+ *
+ * |[
+ * gint g_snprintf (gchar  *string,
+ * gulong       n,
+ * gchar const *format,
+ * ...) G_GNUC_PRINTF (3, 4);
+ * ]|
+ */
+
+
+/**
+ * G_GNUC_PURE:
+ *
+ * Expands to the GNU C <literal>pure</literal> function attribute if the
+ * compiler is <command>gcc</command>. Declaring a function as pure enables
+ * better optimization of calls to the function. A pure function has no
+ * effects except its return value and the return value depends only on
+ * the parameters and/or global variables. See the GNU C documentation
+ * for details.
+ */
+
+
+/**
+ * G_GNUC_SCANF:
+ * @format_idx: the index of the argument corresponding to the format string (The arguments are numbered from 1)
+ * @arg_idx: the index of the first of the format arguments
+ *
+ * Expands to the GNU C <literal>format</literal> function attribute
+ * if the compiler is <command>gcc</command>. This is used for declaring
+ * functions which take a variable number of arguments, with the same
+ * syntax as scanf(). It allows the compiler to type-check the arguments
+ * passed to the function. See the GNU C documentation for details.
+ */
+
+
+/**
+ * G_GNUC_UNUSED:
+ *
+ * Expands to the GNU C <literal>unused</literal> function attribute if
+ * the compiler is <command>gcc</command>. It is used for declaring
+ * functions which may never be used. It avoids possible compiler warnings.
+ * See the GNU C documentation for details.
+ */
+
+
+/**
+ * G_GNUC_WARN_UNUSED_RESULT:
+ *
+ * Expands to the GNU C <literal>warn_unused_result</literal> function
+ * attribute if the compiler is <command>gcc</command>, or "" if it isn't.
+ * This function attribute makes the compiler emit a warning if the result
+ * of a function call is ignored. See the GNU C documentation for details.
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * G_GOFFSET_CONSTANT:
+ * @val: a literal integer value, e.g. 0x1d636b02300a7aa7
+ *
+ * This macro is used to insert #goffset 64-bit integer literals
+ * into the source code.
+ *
+ * See also #G_GINT64_CONSTANT.
+ *
+ * Since: 2.20
+ */
+
+
+/**
+ * G_GOFFSET_FORMAT:
+ *
+ * This is the platform dependent conversion specifier for scanning
+ * and printing values of type #goffset. See also #G_GINT64_FORMAT.
+ *
+ * Since: 2.20
+ */
+
+
+/**
+ * G_GOFFSET_MODIFIER:
+ *
+ * The platform dependent length modifier for conversion specifiers
+ * for scanning and printing values of type #goffset. It is a string
+ * literal. See also #G_GINT64_MODIFIER.
+ *
+ * Since: 2.20
+ */
+
+
+/**
+ * G_GSIZE_FORMAT:
+ *
+ * This is the platform dependent conversion specifier for scanning
+ * and printing values of type #gsize. See also #G_GINT16_FORMAT.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * G_GSIZE_MODIFIER:
+ *
+ * The platform dependent length modifier for conversion specifiers
+ * for scanning and printing values of type #gsize or #gssize. It
+ * is a string literal.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * G_GSSIZE_FORMAT:
+ *
+ * This is the platform dependent conversion specifier for scanning
+ * and printing values of type #gssize. See also #G_GINT16_FORMAT.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * G_GUINT16_FORMAT:
+ *
+ * This is the platform dependent conversion specifier for scanning
+ * and printing values of type #guint16. See also #G_GINT16_FORMAT
+ */
+
+
+/**
+ * G_GUINT32_FORMAT:
+ *
+ * This is the platform dependent conversion specifier for scanning
+ * and printing values of type #guint32. See also #G_GINT16_FORMAT.
+ */
+
+
+/**
+ * G_GUINT64_CONSTANT:
+ * @val: a literal integer value, e.g. 0x1d636b02300a7aa7U
+ *
+ * This macro is used to insert 64-bit unsigned integer
+ * literals into the source code.
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * G_GUINT64_FORMAT:
+ *
+ * This is the platform dependent conversion specifier for scanning
+ * and printing values of type #guint64. See also #G_GINT16_FORMAT.
+ *
+ * <note><para>
+ * Some platforms do not support scanning and printing 64 bit integers,
+ * even though the types are supported. On such platforms #G_GUINT64_FORMAT
+ * is not defined.  Note that scanf() may not support 64 bit integers, even
+ * if #G_GINT64_FORMAT is defined. Due to its weak error handling, scanf()
+ * is not recommended for parsing anyway; consider using g_ascii_strtoull()
+ * instead.
+ * </para></note>
+ */
+
+
+/**
+ * G_GUINTPTR_FORMAT:
+ *
+ * This is the platform dependent conversion specifier
+ * for scanning and printing values of type #guintptr.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * G_HOOK:
+ * @hook: a pointer
+ *
+ * Casts a pointer to a <literal>GHook*</literal>.
+ */
+
+
+/**
+ * G_HOOK_ACTIVE:
+ * @hook: a #GHook
+ *
+ * Returns %TRUE if the #GHook is active, which is normally the case
+ * until the #GHook is destroyed.
+ *
+ * Returns: %TRUE if the #GHook is active
+ */
+
+
+/**
+ * G_HOOK_FLAGS:
+ * @hook: a #GHook
+ *
+ * Gets the flags of a hook.
+ */
+
+
+/**
+ * G_HOOK_FLAG_USER_SHIFT:
+ *
+ * The position of the first bit which is not reserved for internal
+ * use be the #GHook implementation, i.e.
+ * <literal>1 &lt;&lt; G_HOOK_FLAG_USER_SHIFT</literal> is the first
+ * bit which can be used for application-defined flags.
+ */
+
+
+/**
+ * G_HOOK_IN_CALL:
+ * @hook: a #GHook
+ *
+ * Returns %TRUE if the #GHook function is currently executing.
+ *
+ * Returns: %TRUE if the #GHook function is currently executing
+ */
+
+
+/**
+ * G_HOOK_IS_UNLINKED:
+ * @hook: a #GHook
+ *
+ * Returns %TRUE if the #GHook is not in a #GHookList.
+ *
+ * Returns: %TRUE if the #GHook is not in a #GHookList
+ */
+
+
+/**
+ * G_HOOK_IS_VALID:
+ * @hook: a #GHook
+ *
+ * Returns %TRUE if the #GHook is valid, i.e. it is in a #GHookList,
+ * it is active and it has not been destroyed.
+ *
+ * Returns: %TRUE if the #GHook is valid
+ */
+
+
+/**
+ * G_IEEE754_DOUBLE_BIAS:
+ *
+ * The bias by which exponents in double-precision floats are offset.
+ */
+
+
+/**
+ * G_IEEE754_FLOAT_BIAS:
+ *
+ * The bias by which exponents in single-precision floats are offset.
+ */
+
+
+/**
+ * G_IMPLEMENT_INTERFACE:
+ * @TYPE_IFACE: The #GType of the interface to add
+ * @iface_init: The interface init function
+ *
+ * A convenience macro to ease interface addition in the @_C_ section
+ * of G_DEFINE_TYPE_WITH_CODE() or G_DEFINE_ABSTRACT_TYPE_WITH_CODE().
+ * See G_DEFINE_TYPE_EXTENDED() for an example.
+ *
+ * Note that this macro can only be used together with the G_DEFINE_TYPE_*
+ * macros, since it depends on variable names from those macros.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_IMPLEMENT_INTERFACE_DYNAMIC:
+ * @TYPE_IFACE: The #GType of the interface to add
+ * @iface_init: The interface init function
+ *
+ * A convenience macro to ease interface addition in the @_C_ section
+ * of G_DEFINE_DYNAMIC_TYPE_EXTENDED(). See G_DEFINE_DYNAMIC_TYPE_EXTENDED()
+ * for an example.
+ *
+ * Note that this macro can only be used together with the
+ * G_DEFINE_DYNAMIC_TYPE_EXTENDED macros, since it depends on variable
+ * names from that macro.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * G_INITIALLY_UNOWNED:
+ * @object: Object which is subject to casting.
+ *
+ * Casts a #GInitiallyUnowned or derived pointer into a (GInitiallyUnowned*)
+ * pointer. Depending on the current debugging level, this function may invoke
+ * certain runtime checks to identify invalid casts.
+ */
+
+
+/**
+ * G_INITIALLY_UNOWNED_CLASS:
+ * @class: a valid #GInitiallyUnownedClass
+ *
+ * Casts a derived #GInitiallyUnownedClass structure into a
+ * #GInitiallyUnownedClass structure.
+ */
+
+
+/**
+ * G_INITIALLY_UNOWNED_GET_CLASS:
+ * @object: a #GInitiallyUnowned instance.
+ *
+ * Get the class structure associated to a #GInitiallyUnowned instance.
+ *
+ * Returns: pointer to object class structure.
+ */
+
+
+/**
+ * G_INLINE_FUNC:
+ *
+ * This macro is used to export function prototypes so they can be linked
+ * with an external version when no inlining is performed. The file which
+ * implements the functions should define <literal>G_IMPLEMENTS_INLINES</literal>
+ * before including the headers which contain %G_INLINE_FUNC declarations.
+ * Since inlining is very compiler-dependent using these macros correctly
+ * is very difficult. Their use is strongly discouraged.
+ *
+ * This macro is often mistaken for a replacement for the inline keyword;
+ * inline is already declared in a portable manner in the GLib headers
+ * and can be used normally.
+ */
+
+
+/**
+ * G_IO_CHANNEL_ERROR:
+ *
+ * Error domain for #GIOChannel operations. Errors in this domain will
+ * be from the #GIOChannelError enumeration. See #GError for
+ * information on error domains.
+ */
+
+
+/**
+ * G_IO_FLAG_IS_WRITEABLE:
+ *
+ * This is a misspelled version of G_IO_FLAG_IS_WRITABLE that existed
+ * before the spelling was fixed in GLib 2.30.  It is kept here for
+ * compatibility reasons.
+ *
+ * Deprecated:2.30:Use G_IO_FLAG_IS_WRITABLE instead.
+ */
+
+
+/**
+ * G_IS_DIR_SEPARATOR:
+ * @c: a character
+ *
+ * Checks whether a character is a directory
+ * separator. It returns %TRUE for '/' on UNIX
+ * machines and for '\' or '/' under Windows.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * G_IS_ENUM_CLASS:
+ * @class: a #GEnumClass
+ *
+ * Checks whether @class "is a" valid #GEnumClass structure of type %G_TYPE_ENUM
+ * or derived.
+ */
+
+
+/**
+ * G_IS_FLAGS_CLASS:
+ * @class: a #GFlagsClass
+ *
+ * Checks whether @class "is a" valid #GFlagsClass structure of type %G_TYPE_FLAGS
+ * or derived.
+ */
+
+
+/**
+ * G_IS_INITIALLY_UNOWNED:
+ * @object: Instance to check for being a %G_TYPE_INITIALLY_UNOWNED.
+ *
+ * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_INITIALLY_UNOWNED.
+ */
+
+
+/**
+ * G_IS_INITIALLY_UNOWNED_CLASS:
+ * @class: a #GInitiallyUnownedClass
+ *
+ * Checks whether @class "is a" valid #GInitiallyUnownedClass structure of type
+ * %G_TYPE_INITIALLY_UNOWNED or derived.
+ */
+
+
+/**
+ * G_IS_OBJECT:
+ * @object: Instance to check for being a %G_TYPE_OBJECT.
+ *
+ * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_OBJECT.
+ */
+
+
+/**
+ * G_IS_OBJECT_CLASS:
+ * @class: a #GObjectClass
+ *
+ * Checks whether @class "is a" valid #GObjectClass structure of type
+ * %G_TYPE_OBJECT or derived.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC:
+ * @pspec: a #GParamSpec
+ *
+ * Checks whether @pspec "is a" valid #GParamSpec structure of type %G_TYPE_PARAM
+ * or derived.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_BOOLEAN:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOOLEAN.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_BOXED:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOXED.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_CHAR:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_CHAR.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_CLASS:
+ * @pclass: a #GParamSpecClass
+ *
+ * Checks whether @pclass "is a" valid #GParamSpecClass structure of type
+ * %G_TYPE_PARAM or derived.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_DOUBLE:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_DOUBLE.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_ENUM:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ENUM.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_FLAGS:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLAGS.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_FLOAT:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLOAT.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_GTYPE:
+ * @pspec: a #GParamSpec
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_GTYPE.
+ *
+ * Since: 2.10
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_INT:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_INT64:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT64.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_LONG:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_LONG.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_OBJECT:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OBJECT.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_OVERRIDE:
+ * @pspec: a #GParamSpec
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OVERRIDE.
+ *
+ * Since: 2.4
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_PARAM:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_PARAM.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_POINTER:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_POINTER.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_STRING:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_STRING.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_UCHAR:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UCHAR.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_UINT:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_UINT64:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT64.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_ULONG:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ULONG.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_UNICHAR:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UNICHAR.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_VALUE_ARRAY:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VALUE_ARRAY.
+ *
+ * Returns: %TRUE on success.
+ * Deprecated: 2.32: Use #GArray instead of #GValueArray
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_VARIANT:
+ * @pspec: a #GParamSpec
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VARIANT.
+ *
+ * Returns: %TRUE on success
+ * Since: 2.26
+ */
+
+
+/**
+ * G_IS_VALUE:
+ * @value: A #GValue structure.
+ *
+ * Checks if @value is a valid and initialized #GValue structure.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_KEY_FILE_DESKTOP_GROUP:
+ *
+ * The name of the main group of a desktop entry file, as defined in the
+ * <ulink url="http://freedesktop.org/Standards/desktop-entry-spec">Desktop
+ * Entry Specification</ulink>. Consult the specification for more
+ * details about the meanings of the keys below.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_KEY_FILE_DESKTOP_KEY_CATEGORIES:
+ *
+ * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a list
+ * of strings giving the categories in which the desktop entry
+ * should be shown in a menu.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_KEY_FILE_DESKTOP_KEY_COMMENT:
+ *
+ * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a localized
+ * string giving the tooltip for the desktop entry.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_KEY_FILE_DESKTOP_KEY_EXEC:
+ *
+ * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string
+ * giving the command line to execute. It is only valid for desktop
+ * entries with the <literal>Application</literal> type.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_KEY_FILE_DESKTOP_KEY_GENERIC_NAME:
+ *
+ * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a localized
+ * string giving the generic name of the desktop entry.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_KEY_FILE_DESKTOP_KEY_HIDDEN:
+ *
+ * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean
+ * stating whether the desktop entry has been deleted by the user.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_KEY_FILE_DESKTOP_KEY_ICON:
+ *
+ * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a localized
+ * string giving the name of the icon to be displayed for the desktop
+ * entry.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_KEY_FILE_DESKTOP_KEY_MIME_TYPE:
+ *
+ * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a list
+ * of strings giving the MIME types supported by this desktop entry.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_KEY_FILE_DESKTOP_KEY_NAME:
+ *
+ * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a localized
+ * string giving the specific name of the desktop entry.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN:
+ *
+ * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a list of
+ * strings identifying the environments that should not display the
+ * desktop entry.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY:
+ *
+ * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean
+ * stating whether the desktop entry should be shown in menus.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN:
+ *
+ * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a list of
+ * strings identifying the environments that should display the
+ * desktop entry.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_KEY_FILE_DESKTOP_KEY_PATH:
+ *
+ * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string
+ * containing the working directory to run the program in. It is only
+ * valid for desktop entries with the <literal>Application</literal> type.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY:
+ *
+ * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean
+ * stating whether the application supports the <ulink
+ * url="http://www.freedesktop.org/Standards/startup-notification-spec">Startup
+ * Notification Protocol Specification</ulink>.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS:
+ *
+ * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is string
+ * identifying the WM class or name hint of a window that the application
+ * will create, which can be used to emulate Startup Notification with
+ * older applications.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_KEY_FILE_DESKTOP_KEY_TERMINAL:
+ *
+ * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean
+ * stating whether the program should be run in a terminal window.
+ * It is only valid for desktop entries with the
+ * <literal>Application</literal> type.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_KEY_FILE_DESKTOP_KEY_TRY_EXEC:
+ *
+ * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string
+ * giving the file name of a binary on disk used to determine if the
+ * program is actually installed. It is only valid for desktop entries
+ * with the <literal>Application</literal> type.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_KEY_FILE_DESKTOP_KEY_TYPE:
+ *
+ * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string
+ * giving the type of the desktop entry. Usually
+ * #G_KEY_FILE_DESKTOP_TYPE_APPLICATION,
+ * #G_KEY_FILE_DESKTOP_TYPE_LINK, or
+ * #G_KEY_FILE_DESKTOP_TYPE_DIRECTORY.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_KEY_FILE_DESKTOP_KEY_URL :
+ *
+ * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string
+ * giving the URL to access. It is only valid for desktop entries
+ * with the <literal>Link</literal> type.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_KEY_FILE_DESKTOP_KEY_VERSION:
+ *
+ * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string
+ * giving the version of the Desktop Entry Specification used for
+ * the desktop entry file.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_KEY_FILE_DESKTOP_TYPE_APPLICATION:
+ *
+ * The value of the #G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop
+ * entries representing applications.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_KEY_FILE_DESKTOP_TYPE_DIRECTORY:
+ *
+ * The value of the #G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop
+ * entries representing directories.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_KEY_FILE_DESKTOP_TYPE_LINK:
+ *
+ * The value of the #G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop
+ * entries representing links to documents.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_KEY_FILE_ERROR:
+ *
+ * Error domain for key file parsing. Errors in this domain will
+ * be from the #GKeyFileError enumeration.
+ *
+ * See #GError for information on error domains.
+ */
+
+
+/**
+ * G_LIKELY:
+ * @expr: the expression
+ *
+ * Hints the compiler that the expression is likely to evaluate to
+ * a true value. The compiler may use this information for optimizations.
+ *
+ * |[
+ * if (G_LIKELY (random () != 1))
+ * g_print ("not one");
+ * ]|
+ *
+ * Returns: the value of @expr
+ * Since: 2.2
+ */
+
+
+/**
+ * G_LITTLE_ENDIAN:
+ *
+ * Specifies one of the possible types of byte order.
+ * See #G_BYTE_ORDER.
+ */
+
+
+/**
+ * G_LN10:
+ *
+ * The natural logarithm of 10.
+ */
+
+
+/**
+ * G_LN2:
+ *
+ * The natural logarithm of 2.
+ */
+
+
+/**
+ * G_LOCK:
+ * @name: the name of the lock
+ *
+ * Works like g_mutex_lock(), but for a lock defined with
+ * #G_LOCK_DEFINE.
+ */
+
+
+/**
+ * G_LOCK_DEFINE:
+ * @name: the name of the lock
+ *
+ * The <literal>G_LOCK_*</literal> macros provide a convenient interface to #GMutex.
+ * #G_LOCK_DEFINE defines a lock. It can appear in any place where
+ * variable definitions may appear in programs, i.e. in the first block
+ * of a function or outside of functions. The @name parameter will be
+ * mangled to get the name of the #GMutex. This means that you
+ * can use names of existing variables as the parameter - e.g. the name
+ * of the variable you intend to protect with the lock. Look at our
+ * <function>give_me_next_number()</function> example using the
+ * <literal>G_LOCK_*</literal> macros:
+ *
+ * <example>
+ * <title>Using the <literal>G_LOCK_*</literal> convenience macros</title>
+ * <programlisting>
+ * G_LOCK_DEFINE (current_number);
+ *
+ * int
+ * give_me_next_number (void)
+ * {
+ * static int current_number = 0;
+ * int ret_val;
+ *
+ * G_LOCK (current_number);
+ * ret_val = current_number = calc_next_number (current_number);
+ * G_UNLOCK (current_number);
+ *
+ * return ret_val;
+ * }
+ * </programlisting>
+ * </example>
+ */
+
+
+/**
+ * G_LOCK_DEFINE_STATIC:
+ * @name: the name of the lock
+ *
+ * This works like #G_LOCK_DEFINE, but it creates a static object.
+ */
+
+
+/**
+ * G_LOCK_EXTERN:
+ * @name: the name of the lock
+ *
+ * This declares a lock, that is defined with #G_LOCK_DEFINE in another
+ * module.
+ */
+
+
+/**
+ * G_LOG_2_BASE_10:
+ *
+ * Multiplying the base 2 exponent by this number yields the base 10 exponent.
+ */
+
+
+/**
+ * G_LOG_DOMAIN:
+ *
+ * Defines the log domain.
+ *
+ * For applications, this is typically left as the default %NULL
+ * (or "") domain. Libraries should define this so that any messages
+ * which they log can be differentiated from messages from other
+ * libraries and application code. But be careful not to define
+ * it in any public header files.
+ *
+ * For example, GTK+ uses this in its Makefile.am:
+ * |[
+ * INCLUDES = -DG_LOG_DOMAIN=\"Gtk\"
+ * ]|
+ */
+
+
+/**
+ * G_LOG_FATAL_MASK:
+ *
+ * GLib log levels that are considered fatal by default.
+ */
+
+
+/**
+ * G_MARKUP_ERROR:
+ *
+ * Error domain for markup parsing.
+ * Errors in this domain will be from the #GMarkupError enumeration.
+ * See #GError for information on error domains.
+ */
+
+
+/**
+ * G_MAXDOUBLE:
+ *
+ * The maximum value which can be held in a #gdouble.
+ */
+
+
+/**
+ * G_MAXFLOAT:
+ *
+ * The maximum value which can be held in a #gfloat.
+ */
+
+
+/**
+ * G_MAXINT:
+ *
+ * The maximum value which can be held in a #gint.
+ */
+
+
+/**
+ * G_MAXINT16:
+ *
+ * The maximum value which can be held in a #gint16.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_MAXINT32:
+ *
+ * The maximum value which can be held in a #gint32.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_MAXINT64:
+ *
+ * The maximum value which can be held in a #gint64.
+ */
+
+
+/**
+ * G_MAXINT8:
+ *
+ * The maximum value which can be held in a #gint8.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_MAXLONG:
+ *
+ * The maximum value which can be held in a #glong.
+ */
+
+
+/**
+ * G_MAXOFFSET:
+ *
+ * The maximum value which can be held in a #goffset.
+ */
+
+
+/**
+ * G_MAXSHORT:
+ *
+ * The maximum value which can be held in a #gshort.
+ */
+
+
+/**
+ * G_MAXSIZE:
+ *
+ * The maximum value which can be held in a #gsize.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_MAXSSIZE:
+ *
+ * The maximum value which can be held in a #gssize.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_MAXUINT:
+ *
+ * The maximum value which can be held in a #guint.
+ */
+
+
+/**
+ * G_MAXUINT16:
+ *
+ * The maximum value which can be held in a #guint16.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_MAXUINT32:
+ *
+ * The maximum value which can be held in a #guint32.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_MAXUINT64:
+ *
+ * The maximum value which can be held in a #guint64.
+ */
+
+
+/**
+ * G_MAXUINT8:
+ *
+ * The maximum value which can be held in a #guint8.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_MAXULONG:
+ *
+ * The maximum value which can be held in a #gulong.
+ */
+
+
+/**
+ * G_MAXUSHORT:
+ *
+ * The maximum value which can be held in a #gushort.
+ */
+
+
+/**
+ * G_MINDOUBLE:
+ *
+ * The minimum positive value which can be held in a #gdouble.
+ *
+ * If you are interested in the smallest value which can be held
+ * in a #gdouble, use -G_MAXDOUBLE.
+ */
+
+
+/**
+ * G_MINFLOAT:
+ *
+ * The minimum positive value which can be held in a #gfloat.
+ *
+ * If you are interested in the smallest value which can be held
+ * in a #gfloat, use -G_MAXFLOAT.
+ */
+
+
+/**
+ * G_MININT:
+ *
+ * The minimum value which can be held in a #gint.
+ */
+
+
+/**
+ * G_MININT16:
+ *
+ * The minimum value which can be held in a #gint16.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_MININT32:
+ *
+ * The minimum value which can be held in a #gint32.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_MININT64:
+ *
+ * The minimum value which can be held in a #gint64.
+ */
+
+
+/**
+ * G_MININT8:
+ *
+ * The minimum value which can be held in a #gint8.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_MINLONG:
+ *
+ * The minimum value which can be held in a #glong.
+ */
+
+
+/**
+ * G_MINOFFSET:
+ *
+ * The minimum value which can be held in a #goffset.
+ */
+
+
+/**
+ * G_MINSHORT:
+ *
+ * The minimum value which can be held in a #gshort.
+ */
+
+
+/**
+ * G_MINSSIZE:
+ *
+ * The minimum value which can be held in a #gssize.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_NODE_IS_LEAF:
+ * @node: a #GNode
+ *
+ * Returns %TRUE if a #GNode is a leaf node.
+ *
+ * (i.e. it has no children)
+ *
+ * Returns: %TRUE if the #GNode is a leaf node
+ */
+
+
+/**
+ * G_NODE_IS_ROOT:
+ * @node: a #GNode
+ *
+ * Returns %TRUE if a #GNode is the root of a tree.
+ *
+ * (i.e. it has no parent or siblings)
+ *
+ * Returns: %TRUE if the #GNode is the root of a tree
+ */
+
+
+/**
+ * G_N_ELEMENTS:
+ * @arr: the array
+ *
+ * Determines the number of elements in an array. The array must be
+ * declared so the compiler knows its size at compile-time; this
+ * macro will not work on an array allocated on the heap, only static
+ * arrays or arrays on the stack.
+ */
+
+
+/**
+ * G_OBJECT:
+ * @object: Object which is subject to casting.
+ *
+ * Casts a #GObject or derived pointer into a (GObject*) pointer.
+ * Depending on the current debugging level, this function may invoke
+ * certain runtime checks to identify invalid casts.
+ */
+
+
+/**
+ * G_OBJECT_CLASS:
+ * @class: a valid #GObjectClass
+ *
+ * Casts a derived #GObjectClass structure into a #GObjectClass structure.
+ */
+
+
+/**
+ * G_OBJECT_CLASS_NAME:
+ * @class: a valid #GObjectClass
+ *
+ * Return the name of a class structure's type.
+ *
+ * should not be freed.
+ *
+ * Returns: Type name of @class. The string is owned by the type system and
+ */
+
+
+/**
+ * G_OBJECT_CLASS_TYPE:
+ * @class: a valid #GObjectClass
+ *
+ * Get the type id of a class structure.
+ *
+ * Returns: Type id of @class.
+ */
+
+
+/**
+ * G_OBJECT_GET_CLASS:
+ * @object: a #GObject instance.
+ *
+ * Get the class structure associated to a #GObject instance.
+ *
+ * Returns: pointer to object class structure.
+ */
+
+
+/**
+ * G_OBJECT_TYPE:
+ * @object: Object to return the type id for.
+ *
+ * Get the type id of an object.
+ *
+ * Returns: Type id of @object.
+ */
+
+
+/**
+ * G_OBJECT_TYPE_NAME:
+ * @object: Object to return the type name for.
+ *
+ * Get the name of an object's type.
+ *
+ * should not be freed.
+ *
+ * Returns: Type name of @object. The string is owned by the type system and
+ */
+
+
+/**
+ * G_OBJECT_WARN_INVALID_PROPERTY_ID:
+ * @object: the #GObject on which set_property() or get_property() was called
+ * @property_id: the numeric id of the property
+ * @pspec: the #GParamSpec of the property
+ *
+ * This macro should be used to emit a standard warning about unexpected
+ * properties in set_property() and get_property() implementations.
+ */
+
+
+/**
+ * G_ONCE_INIT:
+ *
+ * A #GOnce must be initialized with this macro before it can be used.
+ *
+ * |[
+ * GOnce my_once = G_ONCE_INIT;
+ * ]|
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_OPTION_ERROR:
+ *
+ * Error domain for option parsing. Errors in this domain will
+ * be from the #GOptionError enumeration. See #GError for information on
+ * error domains.
+ */
+
+
+/**
+ * G_OPTION_REMAINING:
+ *
+ * If a long option in the main group has this name, it is not treated as a
+ * regular option. Instead it collects all non-option arguments which would
+ * otherwise be left in <literal>argv</literal>. The option must be of type
+ * %G_OPTION_ARG_CALLBACK, %G_OPTION_ARG_STRING_ARRAY
+ * or %G_OPTION_ARG_FILENAME_ARRAY.
+ *
+ *
+ * Using #G_OPTION_REMAINING instead of simply scanning <literal>argv</literal>
+ * for leftover arguments has the advantage that GOption takes care of
+ * necessary encoding conversions for strings or filenames.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * G_OS_BEOS:
+ *
+ * This macro is defined only on BeOS. So you can bracket
+ * BeOS-specific code in "&num;ifdef G_OS_BEOS".
+ */
+
+
+/**
+ * G_OS_UNIX:
+ *
+ * This macro is defined only on UNIX. So you can bracket
+ * UNIX-specific code in "&num;ifdef G_OS_UNIX".
+ */
+
+
+/**
+ * G_OS_WIN32:
+ *
+ * This macro is defined only on Windows. So you can bracket
+ * Windows-specific code in "&num;ifdef G_OS_WIN32".
+ */
+
+
+/**
+ * G_PARAM_MASK:
+ *
+ * Mask containing the bits of #GParamSpec.flags which are reserved for GLib.
+ */
+
+
+/**
+ * G_PARAM_READWRITE:
+ *
+ * #GParamFlags value alias for %G_PARAM_READABLE | %G_PARAM_WRITABLE.
+ */
+
+
+/**
+ * G_PARAM_SPEC:
+ * @pspec: a valid #GParamSpec
+ *
+ * Casts a derived #GParamSpec object (e.g. of type #GParamSpecInt) into
+ * a #GParamSpec object.
+ */
+
+
+/**
+ * G_PARAM_SPEC_BOOLEAN:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecBoolean.
+ */
+
+
+/**
+ * G_PARAM_SPEC_BOXED:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecBoxed.
+ */
+
+
+/**
+ * G_PARAM_SPEC_CHAR:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecChar.
+ */
+
+
+/**
+ * G_PARAM_SPEC_CLASS:
+ * @pclass: a valid #GParamSpecClass
+ *
+ * Casts a derived #GParamSpecClass structure into a #GParamSpecClass structure.
+ */
+
+
+/**
+ * G_PARAM_SPEC_DOUBLE:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecDouble.
+ */
+
+
+/**
+ * G_PARAM_SPEC_ENUM:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecEnum.
+ */
+
+
+/**
+ * G_PARAM_SPEC_FLAGS:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecFlags.
+ */
+
+
+/**
+ * G_PARAM_SPEC_FLOAT:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecFloat.
+ */
+
+
+/**
+ * G_PARAM_SPEC_GET_CLASS:
+ * @pspec: a valid #GParamSpec
+ *
+ * Retrieves the #GParamSpecClass of a #GParamSpec.
+ */
+
+
+/**
+ * G_PARAM_SPEC_GTYPE:
+ * @pspec: a #GParamSpec
+ *
+ * Casts a #GParamSpec into a #GParamSpecGType.
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * G_PARAM_SPEC_INT:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecInt.
+ */
+
+
+/**
+ * G_PARAM_SPEC_INT64:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecInt64.
+ */
+
+
+/**
+ * G_PARAM_SPEC_LONG:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecLong.
+ */
+
+
+/**
+ * G_PARAM_SPEC_OBJECT:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Casts a #GParamSpec instance into a #GParamSpecObject.
+ */
+
+
+/**
+ * G_PARAM_SPEC_OVERRIDE:
+ * @pspec: a #GParamSpec
+ *
+ * Casts a #GParamSpec into a #GParamSpecOverride.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_PARAM_SPEC_PARAM:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Casts a #GParamSpec instance into a #GParamSpecParam.
+ */
+
+
+/**
+ * G_PARAM_SPEC_POINTER:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Casts a #GParamSpec instance into a #GParamSpecPointer.
+ */
+
+
+/**
+ * G_PARAM_SPEC_STRING:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Casts a #GParamSpec instance into a #GParamSpecString.
+ */
+
+
+/**
+ * G_PARAM_SPEC_TYPE:
+ * @pspec: a valid #GParamSpec
+ *
+ * Retrieves the #GType of this @pspec.
+ */
+
+
+/**
+ * G_PARAM_SPEC_TYPE_NAME:
+ * @pspec: a valid #GParamSpec
+ *
+ * Retrieves the #GType name of this @pspec.
+ */
+
+
+/**
+ * G_PARAM_SPEC_UCHAR:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecUChar.
+ */
+
+
+/**
+ * G_PARAM_SPEC_UINT:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecUInt.
+ */
+
+
+/**
+ * G_PARAM_SPEC_UINT64:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecUInt64.
+ */
+
+
+/**
+ * G_PARAM_SPEC_ULONG:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecULong.
+ */
+
+
+/**
+ * G_PARAM_SPEC_UNICHAR:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecUnichar.
+ */
+
+
+/**
+ * G_PARAM_SPEC_VALUE_ARRAY:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecValueArray.
+ *
+ * Deprecated: 2.32: Use #GArray instead of #GValueArray
+ */
+
+
+/**
+ * G_PARAM_SPEC_VALUE_TYPE:
+ * @pspec: a valid #GParamSpec
+ *
+ * Retrieves the #GType to initialize a #GValue for this parameter.
+ */
+
+
+/**
+ * G_PARAM_SPEC_VARIANT:
+ * @pspec: a #GParamSpec
+ *
+ * Casts a #GParamSpec into a #GParamSpecVariant.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_PARAM_STATIC_STRINGS:
+ *
+ * #GParamFlags value alias for %G_PARAM_STATIC_NAME | %G_PARAM_STATIC_NICK | %G_PARAM_STATIC_BLURB.
+ *
+ * Since 2.13.0
+ */
+
+
+/**
+ * G_PARAM_USER_SHIFT:
+ *
+ * Minimum shift count to be used for user defined flags, to be stored in
+ * #GParamSpec.flags. The maximum allowed is 30 + G_PARAM_USER_SHIFT.
+ */
+
+
+/**
+ * G_PASTE:
+ * @identifier1: an identifier
+ * @identifier2: an identifier
+ *
+ * Yields a new preprocessor pasted identifier
+ * <code>identifier1identifier2</code> from its expanded
+ * arguments @identifier1 and @identifier2. For example,
+ * the following code:
+ * |[
+ * #define GET(traveller,method) G_PASTE(traveller_get_, method) (traveller)
+ * const gchar *name = GET (traveller, name);
+ * const gchar *quest = GET (traveller, quest);
+ * GdkColor *favourite = GET (traveller, favourite_colour);
+ * ]|
+ *
+ * is transformed by the preprocessor into:
+ * |[
+ * const gchar *name = traveller_get_name (traveller);
+ * const gchar *quest = traveller_get_quest (traveller);
+ * GdkColor *favourite = traveller_get_favourite_colour (traveller);
+ * ]|
+ *
+ * Since: 2.20
+ */
+
+
+/**
+ * G_PDP_ENDIAN:
+ *
+ * Specifies one of the possible types of byte order
+ * (currently unused). See #G_BYTE_ORDER.
+ */
+
+
+/**
+ * G_PI:
+ *
+ * The value of pi (ratio of circle's circumference to its diameter).
+ */
+
+
+/**
+ * G_PI_2:
+ *
+ * Pi divided by 2.
+ */
+
+
+/**
+ * G_PI_4:
+ *
+ * Pi divided by 4.
+ */
+
+
+/**
+ * G_PRIORITY_DEFAULT:
+ *
+ * Use this for default priority event sources.
+ *
+ * In GLib this priority is used when adding timeout functions
+ * with g_timeout_add(). In GDK this priority is used for events
+ * from the X server.
+ */
+
+
+/**
+ * G_PRIORITY_DEFAULT_IDLE:
+ *
+ * Use this for default priority idle functions.
+ *
+ * In GLib this priority is used when adding idle functions with
+ * g_idle_add().
+ */
+
+
+/**
+ * G_PRIORITY_HIGH:
+ *
+ * Use this for high priority event sources.
+ *
+ * It is not used within GLib or GTK+.
+ */
+
+
+/**
+ * G_PRIORITY_HIGH_IDLE:
+ *
+ * Use this for high priority idle functions.
+ *
+ * GTK+ uses #G_PRIORITY_HIGH_IDLE + 10 for resizing operations,
+ * and #G_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.)
+ */
+
+
+/**
+ * G_PRIORITY_LOW:
+ *
+ * Use this for very low priority background tasks.
+ *
+ * It is not used within GLib or GTK+.
+ */
+
+
+/**
+ * G_PRIVATE_INIT:
+ * @notify: a #GDestroyNotify
+ *
+ * A macro to assist with the static initialisation of a #GPrivate.
+ *
+ * This macro is useful for the case that a #GDestroyNotify function
+ * should be associated the key.  This is needed when the key will be
+ * used to point at memory that should be deallocated when the thread
+ * exits.
+ *
+ * Additionally, the #GDestroyNotify will also be called on the previous
+ * value stored in the key when g_private_replace() is used.
+ *
+ * If no #GDestroyNotify is needed, then use of this macro is not
+ * required -- if the #GPrivate is declared in static scope then it will
+ * be properly initialised by default (ie: to all zeros).  See the
+ * examples below.
+ *
+ * |[
+ * static GPrivate name_key = G_PRIVATE_INIT (g_free);
+ *
+ * // return value should not be freed
+ * const gchar *
+ * get_local_name (void)
+ * {
+ * return g_private_get (&name_key);
+ * }
+ *
+ * void
+ * set_local_name (const gchar *name)
+ * {
+ * g_private_replace (&name_key, g_strdup (name));
+ * }
+ *
+ *
+ * static GPrivate count_key;   // no free function
+ *
+ * gint
+ * get_local_count (void)
+ * {
+ * return GPOINTER_TO_INT (g_private_get (&count_key));
+ * }
+ *
+ * void
+ * set_local_count (gint count)
+ * {
+ * g_private_set (&count_key, GINT_TO_POINTER (count));
+ * }
+ * ]|
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * G_QUEUE_INIT:
+ *
+ * A statically-allocated #GQueue must be initialized with this
+ * macro before it can be used. This macro can be used to initialize
+ * a variable, but it cannot be assigned to a variable. In that case
+ * you have to use g_queue_init().
+ *
+ * |[
+ * GQueue my_queue = G_QUEUE_INIT;
+ * ]|
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_REGEX_ERROR:
+ *
+ * Error domain for regular expressions. Errors in this domain will be
+ * from the #GRegexError enumeration. See #GError for information on
+ * error domains.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_SEARCHPATH_SEPARATOR:
+ *
+ * The search path separator character.
+ * This is ':' on UNIX machines and ';' under Windows.
+ */
+
+
+/**
+ * G_SEARCHPATH_SEPARATOR_S:
+ *
+ * The search path separator as a string.
+ * This is ":" on UNIX machines and ";" under Windows.
+ */
+
+
+/**
+ * G_SHELL_ERROR:
+ *
+ * Error domain for shell functions. Errors in this domain will be from
+ * the #GShellError enumeration. See #GError for information on error
+ * domains.
+ */
+
+
+/**
+ * G_SIGNAL_FLAGS_MASK:
+ *
+ * A mask for all #GSignalFlags bits.
+ */
+
+
+/**
+ * G_SIGNAL_MATCH_MASK:
+ *
+ * A mask for all #GSignalMatchType bits.
+ */
+
+
+/**
+ * G_SIGNAL_TYPE_STATIC_SCOPE:
+ *
+ * This macro flags signal argument types for which the signal system may
+ * assume that instances thereof remain persistent across all signal emissions
+ * they are used in. This is only useful for non ref-counted, value-copy types.
+ *
+ * To flag a signal argument in this way, add
+ * <literal>| G_SIGNAL_TYPE_STATIC_SCOPE</literal> to the corresponding argument
+ * of g_signal_new().
+ * |[
+ * g_signal_new ("size_request",
+ * G_TYPE_FROM_CLASS (gobject_class),
+ * G_SIGNAL_RUN_FIRST,
+ * G_STRUCT_OFFSET (GtkWidgetClass, size_request),
+ * NULL, NULL,
+ * _gtk_marshal_VOID__BOXED,
+ * G_TYPE_NONE, 1,
+ * GTK_TYPE_REQUISITION | G_SIGNAL_TYPE_STATIC_SCOPE);
+ * ]|
+ */
+
+
+/**
+ * G_SOURCE_CONTINUE:
+ *
+ * Use this macro as the return value of a #GSourceFunc to leave
+ * the #GSource in the main loop.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * G_SOURCE_REMOVE:
+ *
+ * Use this macro as the return value of a #GSourceFunc to remove
+ * the #GSource from the main loop.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * G_SPAWN_ERROR:
+ *
+ * Error domain for spawning processes. Errors in this domain will
+ * be from the #GSpawnError enumeration. See #GError for information on
+ * error domains.
+ */
+
+
+/**
+ * G_SQRT2:
+ *
+ * The square root of two.
+ */
+
+
+/**
+ * G_STATIC_ASSERT:
+ * @expr: a constant expression
+ *
+ * The G_STATIC_ASSERT macro lets the programmer check
+ * a condition at compile time, the condition needs to
+ * be compile time computable. The macro can be used in
+ * any place where a <literal>typedef</literal> is valid.
+ *
+ * <note><para>
+ * A <literal>typedef</literal> is generally allowed in
+ * exactly the same places that a variable declaration is
+ * allowed. For this reason, you should not use
+ * <literal>G_STATIC_ASSERT</literal> in the middle of
+ * blocks of code.
+ * </para></note>
+ *
+ * The macro should only be used once per source code line.
+ *
+ * Since: 2.20
+ */
+
+
+/**
+ * G_STATIC_ASSERT_EXPR:
+ * @expr: a constant expression
+ *
+ * The G_STATIC_ASSERT_EXPR macro lets the programmer check
+ * a condition at compile time. The condition needs to be
+ * compile time computable.
+ *
+ * Unlike <literal>G_STATIC_ASSERT</literal>, this macro
+ * evaluates to an expression and, as such, can be used in
+ * the middle of other expressions. Its value should be
+ * ignored. This can be accomplished by placing it as
+ * the first argument of a comma expression.
+ *
+ * |[
+ * #define ADD_ONE_TO_INT(x) \
+ * (G_STATIC_ASSERT_EXPR(sizeof (x) == sizeof (int)), ((x) + 1))
+ * ]|
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * G_STMT_END:
+ *
+ * Used within multi-statement macros so that they can be used in places
+ * where only one statement is expected by the compiler.
+ */
+
+
+/**
+ * G_STMT_START:
+ *
+ * Used within multi-statement macros so that they can be used in places
+ * where only one statement is expected by the compiler.
+ */
+
+
+/**
+ * G_STRFUNC:
+ *
+ * Expands to a string identifying the current function.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_STRINGIFY:
+ * @macro_or_string: a macro or a string
+ *
+ * Accepts a macro or a string and converts it into a string after
+ * preprocessor argument expansion. For example, the following code:
+ *
+ * |[
+ * #define AGE 27
+ * const gchar *greeting = G_STRINGIFY (AGE) " today!";
+ * ]|
+ *
+ * is transformed by the preprocessor into (code equivalent to):
+ *
+ * |[
+ * const gchar *greeting = "27 today!";
+ * ]|
+ */
+
+
+/**
+ * G_STRLOC:
+ *
+ * Expands to a string identifying the current code position.
+ */
+
+
+/**
+ * G_STRUCT_MEMBER:
+ * @member_type: the type of the struct field
+ * @struct_p: a pointer to a struct
+ * @struct_offset: the offset of the field from the start of the struct, in bytes
+ *
+ * Returns a member of a structure at a given offset, using the given type.
+ *
+ * Returns: the struct member
+ */
+
+
+/**
+ * G_STRUCT_MEMBER_P:
+ * @struct_p: a pointer to a struct
+ * @struct_offset: the offset from the start of the struct, in bytes
+ *
+ * Returns an untyped pointer to a given offset of a struct.
+ *
+ * Returns: an untyped pointer to @struct_p plus @struct_offset bytes
+ */
+
+
+/**
+ * G_STRUCT_OFFSET:
+ * @struct_type: a structure type, e.g. <structname>GtkWidget</structname>
+ * @member: a field in the structure, e.g. <structfield>window</structfield>
+ *
+ * Returns the offset, in bytes, of a member of a struct.
+ *
+ * Returns: the offset of @member from the start of @struct_type
+ */
+
+
+/**
+ * G_STR_DELIMITERS:
+ *
+ * The standard delimiters, used in g_strdelimit().
+ */
+
+
+/**
+ * G_THREAD_ERROR:
+ *
+ * The error domain of the GLib thread subsystem.
+ */
+
+
+/**
+ * G_TIME_SPAN_DAY:
+ *
+ * Evaluates to a time span of one day.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TIME_SPAN_HOUR:
+ *
+ * Evaluates to a time span of one hour.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TIME_SPAN_MILLISECOND:
+ *
+ * Evaluates to a time span of one millisecond.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TIME_SPAN_MINUTE:
+ *
+ * Evaluates to a time span of one minute.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TIME_SPAN_SECOND:
+ *
+ * Evaluates to a time span of one second.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TRYLOCK:
+ * @name: the name of the lock
+ * @Returns: %TRUE, if the lock could be locked.
+ *
+ * Works like g_mutex_trylock(), but for a lock defined with
+ * #G_LOCK_DEFINE.
+ */
+
+
+/**
+ * G_TYPE_ARRAY:
+ *
+ * The #GType for a boxed type holding a #GArray reference.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * G_TYPE_BOOLEAN:
+ *
+ * The fundamental type corresponding to #gboolean.
+ */
+
+
+/**
+ * G_TYPE_BOXED:
+ *
+ * The fundamental type from which all boxed types are derived.
+ */
+
+
+/**
+ * G_TYPE_BYTES:
+ *
+ * The #GType for #GBytes.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * G_TYPE_BYTE_ARRAY:
+ *
+ * The #GType for a boxed type holding a #GByteArray reference.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * G_TYPE_CHAR:
+ *
+ * The fundamental type corresponding to #gchar.
+ * The type designated by G_TYPE_CHAR is unconditionally an 8-bit signed integer.
+ * This may or may not be the same type a the C type "gchar".
+ */
+
+
+/**
+ * G_TYPE_CHECK_CLASS_CAST:
+ * @g_class: Location of a #GTypeClass structure.
+ * @g_type: The type to be returned.
+ * @c_type: The corresponding C type of class structure of @g_type.
+ *
+ * Checks that @g_class is a class structure of the type identified by @g_type
+ * and issues a warning if this is not the case. Returns @g_class casted
+ * to a pointer to @c_type.
+ *
+ * This macro should only be used in type implementations.
+ */
+
+
+/**
+ * G_TYPE_CHECK_CLASS_TYPE:
+ * @g_class: Location of a #GTypeClass structure.
+ * @g_type: The type to be checked.
+ *
+ * Checks if @g_class is a class structure of the type identified by
+ * @g_type.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_CHECK_INSTANCE:
+ * @instance: Location of a #GTypeInstance structure.
+ *
+ * Checks if @instance is a valid #GTypeInstance structure,
+ * otherwise issues a warning and returns %FALSE.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_CHECK_INSTANCE_CAST:
+ * @instance: Location of a #GTypeInstance structure.
+ * @g_type: The type to be returned.
+ * @c_type: The corresponding C type of @g_type.
+ *
+ * Checks that @instance is an instance of the type identified by @g_type
+ * and issues a warning if this is not the case. Returns @instance casted
+ * to a pointer to @c_type.
+ *
+ * This macro should only be used in type implementations.
+ */
+
+
+/**
+ * G_TYPE_CHECK_INSTANCE_TYPE:
+ * @instance: Location of a #GTypeInstance structure.
+ * @g_type: The type to be checked
+ *
+ * Checks if @instance is an instance of the type identified by @g_type.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_CHECK_VALUE:
+ * @value: a #GValue
+ *
+ * Checks if @value has been initialized to hold values
+ * of a value type.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_CHECK_VALUE_TYPE:
+ * @value: a #GValue
+ * @g_type: The type to be checked.
+ *
+ * Checks if @value has been initialized to hold values
+ * of type @g_type.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_CLASS_GET_PRIVATE:
+ * @klass: the class of a type deriving from @private_type.
+ * @g_type: the type identifying which private data to retrieve.
+ * @c_type: The C type for the private structure.
+ *
+ * Gets the private class structure for a particular type.
+ * The private structure must have been registered in the
+ * get_type() function with g_type_add_class_private().
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Since: 2.24
+ * Returns: a pointer to the private data structure.
+ */
+
+
+/**
+ * G_TYPE_CLOSURE:
+ *
+ * The #GType for #GClosure.
+ */
+
+
+/**
+ * G_TYPE_DATE:
+ *
+ * The #GType for #GDate.
+ */
+
+
+/**
+ * G_TYPE_DATE_TIME:
+ *
+ * The #GType for a boxed type holding a #GDateTime.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TYPE_DOUBLE:
+ *
+ * The fundamental type corresponding to #gdouble.
+ */
+
+
+/**
+ * G_TYPE_ENUM:
+ *
+ * The fundamental type from which all enumeration types are derived.
+ */
+
+
+/**
+ * G_TYPE_ERROR:
+ *
+ * The #GType for a boxed type holding a #GError.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TYPE_FLAGS:
+ *
+ * The fundamental type from which all flags types are derived.
+ */
+
+
+/**
+ * G_TYPE_FLAG_RESERVED_ID_BIT:
+ *
+ * A bit in the type number that's supposed to be left untouched.
+ */
+
+
+/**
+ * G_TYPE_FLOAT:
+ *
+ * The fundamental type corresponding to #gfloat.
+ */
+
+
+/**
+ * G_TYPE_FROM_CLASS:
+ * @g_class: Location of a valid #GTypeClass structure.
+ *
+ * Get the type identifier from a given @class structure.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: the #GType
+ */
+
+
+/**
+ * G_TYPE_FROM_INSTANCE:
+ * @instance: Location of a valid #GTypeInstance structure.
+ *
+ * Get the type identifier from a given @instance structure.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: the #GType
+ */
+
+
+/**
+ * G_TYPE_FROM_INTERFACE:
+ * @g_iface: Location of a valid #GTypeInterface structure.
+ *
+ * Get the type identifier from a given @interface structure.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: the #GType
+ */
+
+
+/**
+ * G_TYPE_FUNDAMENTAL:
+ * @type: A #GType value.
+ *
+ * The fundamental type which is the ancestor of @type.
+ * Fundamental types are types that serve as ultimate bases for the derived types,
+ * thus they are the roots of distinct inheritance hierarchies.
+ */
+
+
+/**
+ * G_TYPE_FUNDAMENTAL_MAX:
+ *
+ * An integer constant that represents the number of identifiers reserved
+ * for types that are assigned at compile-time.
+ */
+
+
+/**
+ * G_TYPE_FUNDAMENTAL_SHIFT:
+ *
+ * Shift value used in converting numbers to type IDs.
+ */
+
+
+/**
+ * G_TYPE_GSTRING:
+ *
+ * The #GType for #GString.
+ */
+
+
+/**
+ * G_TYPE_GTYPE:
+ *
+ * The type for #GType.
+ */
+
+
+/**
+ * G_TYPE_HASH_TABLE:
+ *
+ * The #GType for a boxed type holding a #GHashTable reference.
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * G_TYPE_HAS_VALUE_TABLE:
+ * @type: A #GType value.
+ *
+ * Checks if @type has a #GTypeValueTable.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_INITIALLY_UNOWNED:
+ *
+ * The type for #GInitiallyUnowned.
+ */
+
+
+/**
+ * G_TYPE_INSTANCE_GET_CLASS:
+ * @instance: Location of the #GTypeInstance structure.
+ * @g_type: The #GType of the class to be returned.
+ * @c_type: The C type of the class structure.
+ *
+ * Get the class structure of a given @instance, casted
+ * to a specified ancestor type @g_type of the instance.
+ *
+ * Note that while calling a GInstanceInitFunc(), the class pointer gets
+ * modified, so it might not always return the expected pointer.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: a pointer to the class structure
+ */
+
+
+/**
+ * G_TYPE_INSTANCE_GET_INTERFACE:
+ * @instance: Location of the #GTypeInstance structure.
+ * @g_type: The #GType of the interface to be returned.
+ * @c_type: The C type of the interface structure.
+ *
+ * Get the interface structure for interface @g_type of a given @instance.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: a pointer to the interface structure
+ */
+
+
+/**
+ * G_TYPE_INSTANCE_GET_PRIVATE:
+ * @instance: the instance of a type deriving from @private_type.
+ * @g_type: the type identifying which private data to retrieve.
+ * @c_type: The C type for the private structure.
+ *
+ * Gets the private structure for a particular type.
+ * The private structure must have been registered in the
+ * class_init function with g_type_class_add_private().
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Since: 2.4
+ * Returns: a pointer to the private data structure.
+ */
+
+
+/**
+ * G_TYPE_INT:
+ *
+ * The fundamental type corresponding to #gint.
+ */
+
+
+/**
+ * G_TYPE_INT64:
+ *
+ * The fundamental type corresponding to #gint64.
+ */
+
+
+/**
+ * G_TYPE_INTERFACE:
+ *
+ * The fundamental type from which all interfaces are derived.
+ */
+
+
+/**
+ * G_TYPE_INVALID:
+ *
+ * An invalid #GType used as error return value in some functions which return
+ * a #GType.
+ */
+
+
+/**
+ * G_TYPE_IO_CHANNEL:
+ *
+ * The #GType for #GIOChannel.
+ */
+
+
+/**
+ * G_TYPE_IO_CONDITION:
+ *
+ * The #GType for #GIOCondition.
+ */
+
+
+/**
+ * G_TYPE_IS_ABSTRACT:
+ * @type: A #GType value.
+ *
+ * Checks if @type is an abstract type.  An abstract type cannot be
+ * instantiated and is normally used as an abstract base class for
+ * derived classes.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_IS_CLASSED:
+ * @type: A #GType value.
+ *
+ * Checks if @type is a classed type.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_IS_DEEP_DERIVABLE:
+ * @type: A #GType value.
+ *
+ * Checks if @type is a deep derivable type.  A deep derivable type
+ * can be used as the base class of a deep (multi-level) class hierarchy.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_IS_DERIVABLE:
+ * @type: A #GType value.
+ *
+ * Checks if @type is a derivable type.  A derivable type can
+ * be used as the base class of a flat (single-level) class hierarchy.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_IS_DERIVED:
+ * @type: A #GType value.
+ *
+ * Checks if @type is derived (or in object-oriented terminology:
+ * inherited) from another type (this holds true for all non-fundamental
+ * types).
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_IS_ENUM:
+ * @type: a #GType ID.
+ *
+ * Checks whether @type "is a" %G_TYPE_ENUM.
+ *
+ * Returns: %TRUE if @type "is a" %G_TYPE_ENUM.
+ */
+
+
+/**
+ * G_TYPE_IS_FLAGS:
+ * @type: a #GType ID.
+ *
+ * Checks whether @type "is a" %G_TYPE_FLAGS.
+ *
+ * Returns: %TRUE if @type "is a" %G_TYPE_FLAGS.
+ */
+
+
+/**
+ * G_TYPE_IS_FUNDAMENTAL:
+ * @type: A #GType value.
+ *
+ * Checks if @type is a fundamental type.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_IS_INSTANTIATABLE:
+ * @type: A #GType value.
+ *
+ * Checks if @type can be instantiated.  Instantiation is the
+ * process of creating an instance (object) of this type.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_IS_INTERFACE:
+ * @type: A #GType value.
+ *
+ * Checks if @type is an interface type.
+ * An interface type provides a pure API, the implementation
+ * of which is provided by another type (which is then said to conform
+ * to the interface).  GLib interfaces are somewhat analogous to Java
+ * interfaces and C++ classes containing only pure virtual functions,
+ * with the difference that GType interfaces are not derivable (but see
+ * g_type_interface_add_prerequisite() for an alternative).
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_IS_OBJECT:
+ * @type: Type id to check
+ *
+ * Check if the passed in type id is a %G_TYPE_OBJECT or derived from it.
+ *
+ * Returns: %FALSE or %TRUE, indicating whether @type is a %G_TYPE_OBJECT.
+ */
+
+
+/**
+ * G_TYPE_IS_PARAM:
+ * @type: a #GType ID
+ *
+ * Checks whether @type "is a" %G_TYPE_PARAM.
+ */
+
+
+/**
+ * G_TYPE_IS_VALUE:
+ * @type: A #GType value.
+ *
+ * Checks whether the passed in type ID can be used for g_value_init().
+ * That is, this macro checks whether this type provides an implementation
+ * of the #GTypeValueTable functions required for a type to create a #GValue of.
+ *
+ * Returns: Whether @type is suitable as a #GValue type.
+ */
+
+
+/**
+ * G_TYPE_IS_VALUE_ABSTRACT:
+ * @type: A #GType value.
+ *
+ * Checks if @type is an abstract value type.  An abstract value type introduces
+ * a value table, but can't be used for g_value_init() and is normally used as
+ * an abstract base type for derived value types.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_IS_VALUE_TYPE:
+ * @type: A #GType value.
+ *
+ * Checks if @type is a value type and can be used with g_value_init().
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_KEY_FILE:
+ *
+ * The #GType for a boxed type holding a #GKeyFile.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * G_TYPE_LONG:
+ *
+ * The fundamental type corresponding to #glong.
+ */
+
+
+/**
+ * G_TYPE_MAIN_CONTEXT:
+ *
+ * The #GType for a boxed type holding a #GMainContext.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * G_TYPE_MAIN_LOOP:
+ *
+ * The #GType for a boxed type holding a #GMainLoop.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * G_TYPE_MAKE_FUNDAMENTAL:
+ * @x: the fundamental type number.
+ *
+ * Get the type ID for the fundamental type number @x.
+ * Use g_type_fundamental_next() instead of this macro to create new fundamental
+ * types.
+ *
+ * Returns: the GType
+ */
+
+
+/**
+ * G_TYPE_MATCH_INFO:
+ *
+ * The #GType for a boxed type holding a #GMatchInfo reference.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * G_TYPE_NONE:
+ *
+ * A fundamental type which is used as a replacement for the C
+ * <literal>void</literal> return type.
+ */
+
+
+/**
+ * G_TYPE_OBJECT:
+ *
+ * The fundamental type for #GObject.
+ */
+
+
+/**
+ * G_TYPE_PARAM:
+ *
+ * The fundamental type from which all #GParamSpec types are derived.
+ */
+
+
+/**
+ * G_TYPE_PARAM_BOOLEAN:
+ *
+ * The #GType of #GParamSpecBoolean.
+ */
+
+
+/**
+ * G_TYPE_PARAM_BOXED:
+ *
+ * The #GType of #GParamSpecBoxed.
+ */
+
+
+/**
+ * G_TYPE_PARAM_CHAR:
+ *
+ * The #GType of #GParamSpecChar.
+ */
+
+
+/**
+ * G_TYPE_PARAM_DOUBLE:
+ *
+ * The #GType of #GParamSpecDouble.
+ */
+
+
+/**
+ * G_TYPE_PARAM_ENUM:
+ *
+ * The #GType of #GParamSpecEnum.
+ */
+
+
+/**
+ * G_TYPE_PARAM_FLAGS:
+ *
+ * The #GType of #GParamSpecFlags.
+ */
+
+
+/**
+ * G_TYPE_PARAM_FLOAT:
+ *
+ * The #GType of #GParamSpecFloat.
+ */
+
+
+/**
+ * G_TYPE_PARAM_GTYPE:
+ *
+ * The #GType of #GParamSpecGType.
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * G_TYPE_PARAM_INT:
+ *
+ * The #GType of #GParamSpecInt.
+ */
+
+
+/**
+ * G_TYPE_PARAM_INT64:
+ *
+ * The #GType of #GParamSpecInt64.
+ */
+
+
+/**
+ * G_TYPE_PARAM_LONG:
+ *
+ * The #GType of #GParamSpecLong.
+ */
+
+
+/**
+ * G_TYPE_PARAM_OBJECT:
+ *
+ * The #GType of #GParamSpecObject.
+ */
+
+
+/**
+ * G_TYPE_PARAM_OVERRIDE:
+ *
+ * The #GType of #GParamSpecOverride.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_TYPE_PARAM_PARAM:
+ *
+ * The #GType of #GParamSpecParam.
+ */
+
+
+/**
+ * G_TYPE_PARAM_POINTER:
+ *
+ * The #GType of #GParamSpecPointer.
+ */
+
+
+/**
+ * G_TYPE_PARAM_STRING:
+ *
+ * The #GType of #GParamSpecString.
+ */
+
+
+/**
+ * G_TYPE_PARAM_UCHAR:
+ *
+ * The #GType of #GParamSpecUChar.
+ */
+
+
+/**
+ * G_TYPE_PARAM_UINT:
+ *
+ * The #GType of #GParamSpecUInt.
+ */
+
+
+/**
+ * G_TYPE_PARAM_UINT64:
+ *
+ * The #GType of #GParamSpecUInt64.
+ */
+
+
+/**
+ * G_TYPE_PARAM_ULONG:
+ *
+ * The #GType of #GParamSpecULong.
+ */
+
+
+/**
+ * G_TYPE_PARAM_UNICHAR:
+ *
+ * The #GType of #GParamSpecUnichar.
+ */
+
+
+/**
+ * G_TYPE_PARAM_VALUE_ARRAY:
+ *
+ * The #GType of #GParamSpecValueArray.
+ *
+ * Deprecated: 2.32: Use #GArray instead of #GValueArray
+ */
+
+
+/**
+ * G_TYPE_PARAM_VARIANT:
+ *
+ * The #GType of #GParamSpecVariant.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TYPE_POINTER:
+ *
+ * The fundamental type corresponding to #gpointer.
+ */
+
+
+/**
+ * G_TYPE_PTR_ARRAY:
+ *
+ * The #GType for a boxed type holding a #GPtrArray reference.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * G_TYPE_REGEX:
+ *
+ * The #GType for a boxed type holding a #GRegex reference.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_TYPE_RESERVED_BSE_FIRST:
+ *
+ * First fundamental type number to create a new fundamental type id with
+ * G_TYPE_MAKE_FUNDAMENTAL() reserved for BSE.
+ */
+
+
+/**
+ * G_TYPE_RESERVED_BSE_LAST:
+ *
+ * Last fundamental type number reserved for BSE.
+ */
+
+
+/**
+ * G_TYPE_RESERVED_GLIB_FIRST:
+ *
+ * First fundamental type number to create a new fundamental type id with
+ * G_TYPE_MAKE_FUNDAMENTAL() reserved for GLib.
+ */
+
+
+/**
+ * G_TYPE_RESERVED_GLIB_LAST:
+ *
+ * Last fundamental type number reserved for GLib.
+ */
+
+
+/**
+ * G_TYPE_RESERVED_USER_FIRST:
+ *
+ * First available fundamental type number to create new fundamental
+ * type id with G_TYPE_MAKE_FUNDAMENTAL().
+ */
+
+
+/**
+ * G_TYPE_SOURCE:
+ *
+ * The #GType for a boxed type holding a #GSource.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * G_TYPE_STRING:
+ *
+ * The fundamental type corresponding to nul-terminated C strings.
+ */
+
+
+/**
+ * G_TYPE_STRV:
+ *
+ * The #GType for a boxed type holding a %NULL-terminated array of strings.
+ *
+ * The code fragments in the following example show the use of a property of
+ * type #G_TYPE_STRV with g_object_class_install_property(), g_object_set()
+ * and g_object_get().
+ *
+ * |[
+ * g_object_class_install_property (object_class,
+ * PROP_AUTHORS,
+ * g_param_spec_boxed ("authors",
+ * _("Authors"),
+ * _("List of authors"),
+ * G_TYPE_STRV,
+ * G_PARAM_READWRITE));
+ *
+ * gchar *authors[] = { "Owen", "Tim", NULL };
+ * g_object_set (obj, "authors", authors, NULL);
+ *
+ * gchar *writers[];
+ * g_object_get (obj, "authors", &writers, NULL);
+ * /&ast; do something with writers &ast;/
+ * g_strfreev (writers);
+ * ]|
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_TYPE_UCHAR:
+ *
+ * The fundamental type corresponding to #guchar.
+ */
+
+
+/**
+ * G_TYPE_UINT:
+ *
+ * The fundamental type corresponding to #guint.
+ */
+
+
+/**
+ * G_TYPE_UINT64:
+ *
+ * The fundamental type corresponding to #guint64.
+ */
+
+
+/**
+ * G_TYPE_ULONG:
+ *
+ * The fundamental type corresponding to #gulong.
+ */
+
+
+/**
+ * G_TYPE_VALUE:
+ *
+ * The type ID of the "GValue" type which is a boxed type,
+ * used to pass around pointers to GValues.
+ */
+
+
+/**
+ * G_TYPE_VALUE_ARRAY:
+ *
+ * The type ID of the "GValueArray" type which is a boxed type,
+ * used to pass around pointers to GValueArrays.
+ *
+ * Deprecated: 2.32: Use #GArray instead of #GValueArray
+ */
+
+
+/**
+ * G_TYPE_VARIANT:
+ *
+ * The fundamental type corresponding to #GVariant.
+ *
+ * All floating #GVariant instances passed through the #GType system are
+ * consumed.
+ *
+ * Note that callbacks in closures, and signal handlers
+ * for signals of return type %G_TYPE_VARIANT, must never return floating
+ * variants.
+ *
+ * Note: GLib 2.24 did include a boxed type with this name. It was replaced
+ * with this fundamental type in 2.26.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TYPE_VARIANT_BUILDER:
+ *
+ * The #GType for a boxed type holding a #GVariantBuilder.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * G_TYPE_VARIANT_TYPE:
+ *
+ * The #GType for a boxed type holding a #GVariantType.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * G_UNAVAILABLE:
+ *
+ * This macro can be used to mark a function declaration as unavailable.
+ * It must be placed before the function declaration. Use of a function
+ * that has been annotated with this macros will produce a compiler warning.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * G_UNICHAR_MAX_DECOMPOSITION_LENGTH:
+ *
+ * The maximum length (in codepoints) of a compatibility or canonical
+ * decomposition of a single Unicode character.
+ *
+ * This is as defined by Unicode 6.1.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * G_UNICODE_COMBINING_MARK:
+ *
+ * Older name for %G_UNICODE_SPACING_MARK.
+ *
+ * Deprecated: 2.30: Use %G_UNICODE_SPACING_MARK.
+ */
+
+
+/**
+ * G_UNIX_ERROR:
+ *
+ * Error domain for API in the "g_unix_" namespace.  Note that there is
+ * no exported enumeration mapping %errno.  Instead, all functions
+ * ensure that %errno is relevant.  The code for all #G_UNIX_ERROR is
+ * always <literal>0</literal>, and the error message is always
+ * generated via g_strerror().
+ *
+ * It is expected that most code will not look at %errno from these
+ * APIs. Important cases where one would want to differentiate between
+ * errors are already covered by existing cross-platform GLib API,
+ * such as e.g. #GFile wrapping <literal>ENOENT</literal>.  However, it is
+ * provided for completeness, at least.
+ */
+
+
+/**
+ * G_UNLIKELY:
+ * @expr: the expression
+ *
+ * Hints the compiler that the expression is unlikely to evaluate to
+ * a true value. The compiler may use this information for optimizations.
+ *
+ * |[
+ * if (G_UNLIKELY (random () == 1))
+ * g_print ("a random one");
+ * ]|
+ *
+ * Returns: the value of @expr
+ * Since: 2.2
+ */
+
+
+/**
+ * G_UNLOCK:
+ * @name: the name of the lock
+ *
+ * Works like g_mutex_unlock(), but for a lock defined with
+ * #G_LOCK_DEFINE.
+ */
+
+
+/**
+ * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH:
+ *
+ * Allowed characters in a path. Includes "!$&'()*+,;=:@/".
+ */
+
+
+/**
+ * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT:
+ *
+ * Allowed characters in path elements. Includes "!$&'()*+,;=:@".
+ */
+
+
+/**
+ * G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO:
+ *
+ * Allowed characters in userinfo as defined in RFC 3986. Includes "!$&'()*+,;=:".
+ */
+
+
+/**
+ * G_URI_RESERVED_CHARS_GENERIC_DELIMITERS:
+ *
+ * Generic delimiters characters as defined in RFC 3986. Includes ":/?#[]@".
+ */
+
+
+/**
+ * G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS:
+ *
+ * Subcomponent delimiter characters as defined in RFC 3986. Includes "!$&'()*+,;=".
+ */
+
+
+/**
+ * G_USEC_PER_SEC:
+ *
+ * Number of microseconds in one second (1 million).
+ * This macro is provided for code readability.
+ */
+
+
+/**
+ * G_VALUE_HOLDS:
+ * @value: A #GValue structure.
+ * @type: A #GType value.
+ *
+ * Checks if @value holds (or contains) a value of @type.
+ * This macro will also check for @value != %NULL and issue a
+ * warning if the check fails.
+ *
+ * Returns: %TRUE if @value holds the @type.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_BOOLEAN:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_BOOLEAN.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_BOXED:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values derived
+ * from type %G_TYPE_BOXED.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_CHAR:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_CHAR.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_DOUBLE:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_DOUBLE.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_ENUM:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values derived from type %G_TYPE_ENUM.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_FLAGS:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values derived from type %G_TYPE_FLAGS.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_FLOAT:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_FLOAT.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_GTYPE:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_GTYPE.
+ *
+ * Since: 2.12
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_INT:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_INT.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_INT64:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_INT64.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_LONG:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_LONG.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_OBJECT:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values derived from type %G_TYPE_OBJECT.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_PARAM:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values derived from type %G_TYPE_PARAM.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_POINTER:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_POINTER.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_STRING:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_STRING.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_UCHAR:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_UCHAR.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_UINT:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_UINT.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_UINT64:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_UINT64.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_ULONG:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_ULONG.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_VARIANT:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_VARIANT.
+ *
+ * Returns: %TRUE on success.
+ * Since: 2.26
+ */
+
+
+/**
+ * G_VALUE_INIT:
+ *
+ * A #GValue must be initialized before it can be used.
+ * This macro can be used as initializer instead of an explicit
+ * <literal>{ 0 }</literal> when declaring a variable,
+ * but it cannot be assigned to a variable.
+ *
+ * |[
+ * GValue value = G_VALUE_INIT;
+ * ]|
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * G_VALUE_NOCOPY_CONTENTS:
+ *
+ * If passed to G_VALUE_COLLECT(), allocated data won't be copied
+ * but used verbatim. This does not affect ref-counted types like
+ * objects.
+ */
+
+
+/**
+ * G_VALUE_TYPE:
+ * @value: A #GValue structure.
+ *
+ * Get the type identifier of @value.
+ *
+ * Returns: the #GType.
+ */
+
+
+/**
+ * G_VALUE_TYPE_NAME:
+ * @value: A #GValue structure.
+ *
+ * Gets the the type name of @value.
+ *
+ * Returns: the type name.
+ */
+
+
+/**
+ * G_VARIANT_PARSE_ERROR:
+ *
+ * Error domain for GVariant text format parsing.  Specific error codes
+ * are not currently defined for this domain.  See #GError for
+ * information on error domains.
+ */
+
+
+/**
+ * G_VARIANT_TYPE:
+ * @type_string: a well-formed #GVariantType type string
+ *
+ * Converts a string to a const #GVariantType.  Depending on the
+ * current debugging level, this function may perform a runtime check
+ * to ensure that @string is a valid GVariant type string.
+ *
+ * It is always a programmer error to use this macro with an invalid
+ * type string. If in doubt, use g_variant_type_string_is_valid() to
+ * check if the string is valid.
+ *
+ * Since 2.24
+ */
+
+
+/**
+ * G_VARIANT_TYPE_ANY:
+ *
+ * An indefinite type that is a supertype of every type (including
+ * itself).
+ */
+
+
+/**
+ * G_VARIANT_TYPE_ARRAY:
+ *
+ * An indefinite type that is a supertype of every array type.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_BASIC:
+ *
+ * An indefinite type that is a supertype of every basic (ie:
+ * non-container) type.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_BOOLEAN:
+ *
+ * The type of a value that can be either %TRUE or %FALSE.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_BYTE:
+ *
+ * The type of an integer value that can range from 0 to 255.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_BYTESTRING:
+ *
+ * The type of an array of bytes.  This type is commonly used to pass
+ * around strings that may not be valid utf8.  In that case, the
+ * convention is that the nul terminator character should be included as
+ * the last character in the array.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_BYTESTRING_ARRAY:
+ *
+ * The type of an array of byte strings (an array of arrays of bytes).
+ */
+
+
+/**
+ * G_VARIANT_TYPE_DICTIONARY:
+ *
+ * An indefinite type that is a supertype of every dictionary type --
+ * that is, any array type that has an element type equal to any
+ * dictionary entry type.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_DICT_ENTRY:
+ *
+ * An indefinite type that is a supertype of every dictionary entry
+ * type.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_DOUBLE:
+ *
+ * The type of a double precision IEEE754 floating point number.
+ * These guys go up to about 1.80e308 (plus and minus) but miss out on
+ * some numbers in between.  In any case, that's far greater than the
+ * estimated number of fundamental particles in the observable
+ * universe.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_HANDLE:
+ *
+ * The type of a 32bit signed integer value, that by convention, is used
+ * as an index into an array of file descriptors that are sent alongside
+ * a D-Bus message.
+ *
+ * If you are not interacting with D-Bus, then there is no reason to make
+ * use of this type.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_INT16:
+ *
+ * The type of an integer value that can range from -32768 to 32767.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_INT32:
+ *
+ * The type of an integer value that can range from -2147483648 to
+ * 2147483647.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_INT64:
+ *
+ * The type of an integer value that can range from
+ * -9223372036854775808 to 9223372036854775807.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_MAYBE:
+ *
+ * An indefinite type that is a supertype of every maybe type.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_OBJECT_PATH:
+ *
+ * The type of a D-Bus object reference.  These are strings of a
+ * specific format used to identify objects at a given destination on
+ * the bus.
+ *
+ * If you are not interacting with D-Bus, then there is no reason to make
+ * use of this type.  If you are, then the D-Bus specification contains a
+ * precise description of valid object paths.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_OBJECT_PATH_ARRAY:
+ *
+ * The type of an array of object paths.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_SIGNATURE:
+ *
+ * The type of a D-Bus type signature.  These are strings of a specific
+ * format used as type signatures for D-Bus methods and messages.
+ *
+ * If you are not interacting with D-Bus, then there is no reason to make
+ * use of this type.  If you are, then the D-Bus specification contains a
+ * precise description of valid signature strings.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_STRING:
+ *
+ * The type of a string.  "" is a string.  %NULL is not a string.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_STRING_ARRAY:
+ *
+ * The type of an array of strings.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_TUPLE:
+ *
+ * An indefinite type that is a supertype of every tuple type,
+ * regardless of the number of items in the tuple.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_UINT16:
+ *
+ * The type of an integer value that can range from 0 to 65535.
+ * There were about this many people living in Toronto in the 1870s.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_UINT32:
+ *
+ * The type of an integer value that can range from 0 to 4294967295.
+ * That's one number for everyone who was around in the late 1970s.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_UINT64:
+ *
+ * The type of an integer value that can range from 0 to
+ * 18446744073709551616.  That's a really big number, but a Rubik's
+ * cube can have a bit more than twice as many possible positions.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_UNIT:
+ *
+ * The empty tuple type.  Has only one instance.  Known also as "triv"
+ * or "void".
+ */
+
+
+/**
+ * G_VARIANT_TYPE_VARDICT:
+ *
+ * The type of a dictionary mapping strings to variants (the ubiquitous
+ * "a{sv}" type).
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * G_VARIANT_TYPE_VARIANT:
+ *
+ * The type of a box that contains any other value (including another
+ * variant).
+ */
+
+
+/**
+ * G_VA_COPY:
+ * @ap1: the <type>va_list</type> variable to place a copy of @ap2 in
+ * @ap2: a <type>va_list</type>
+ *
+ * Portable way to copy <type>va_list</type> variables.
+ *
+ * In order to use this function, you must include
+ * <filename>string.h</filename> yourself, because this macro may
+ * use memmove() and GLib does not include <filename>string.h</filename>
+ * for you.
+ */
+
+
+/**
+ * G_WIN32_DLLMAIN_FOR_DLL_NAME:
+ * @static: empty or "static"
+ * @dll_name: the name of the (pointer to the) char array where the DLL name will be stored. If this is used, you must also include <filename>windows.h</filename>. If you need a more complex DLL entry point function, you cannot use this
+ *
+ * On Windows, this macro defines a DllMain() function that stores
+ * the actual DLL name that the code being compiled will be included in.
+ *
+ * On non-Windows platforms, expands to nothing.
+ */
+
+
+/**
+ * G_WIN32_HAVE_WIDECHAR_API:
+ *
+ * On Windows, this macro defines an expression which evaluates to
+ * %TRUE if the code is running on a version of Windows where the wide
+ * character versions of the Win32 API functions, and the wide character
+ * versions of the C library functions work. (They are always present in
+ * the DLLs, but don't work on Windows 9x and Me.)
+ *
+ * On non-Windows platforms, it is not defined.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * G_WIN32_IS_NT_BASED:
+ *
+ * On Windows, this macro defines an expression which evaluates to
+ * %TRUE if the code is running on an NT-based Windows operating system.
+ *
+ * On non-Windows platforms, it is not defined.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * MAX:
+ * @a: a numeric value
+ * @b: a numeric value
+ *
+ * Calculates the maximum of @a and @b.
+ *
+ * Returns: the maximum of @a and @b.
+ */
+
+
+/**
+ * MAXPATHLEN:
+ *
+ * Provided for UNIX emulation on Windows; equivalent to UNIX
+ * macro %MAXPATHLEN, which is the maximum length of a filename
+ * (including full path).
+ */
+
+
+/**
+ * MIN:
+ * @a: a numeric value
+ * @b: a numeric value
+ *
+ * Calculates the minimum of @a and @b.
+ *
+ * Returns: the minimum of @a and @b.
+ */
+
+
+/**
+ * NC_:
+ * @Context: a message context, must be a string literal
+ * @String: a message id, must be a string literal
+ *
+ * Only marks a string for translation, with context.
+ * This is useful in situations where the translated strings can't
+ * be directly used, e.g. in string array initializers. To get the
+ * translated string, you should call g_dpgettext2() at runtime.
+ *
+ * |[
+ * {
+ * static const char *messages[] = {
+ * NC_("some context", "some very meaningful message"),
+ * NC_("some context", "and another one")
+ * };
+ * const char *string;
+ * ...
+ * string
+ * = index &gt; 1 ? g_dpgettext2 (NULL, "some context", "a default message")
+ * : g_dpgettext2 (NULL, "some context", messages[index]);
+ *
+ * fputs (string);
+ * ...
+ * }
+ * ]|
+ *
+ * <note><para>If you are using the NC_() macro, you need to make sure
+ * that you pass <option>--keyword=NC_:1c,2</option> to xgettext when
+ * extracting messages. Note that this only works with GNU gettext >= 0.15.
+ * Intltool has support for the NC_() macro since version 0.40.1.
+ * </para></note>
+ *
+ * Since: 2.18
+ */
+
+
+/**
+ * NULL:
+ *
+ * Defines the standard %NULL pointer.
+ */
+
+
+/**
+ * N_:
+ * @String: the string to be translated
+ *
+ * Only marks a string for translation. This is useful in situations
+ * where the translated strings can't be directly used, e.g. in string
+ * array initializers. To get the translated string, call gettext()
+ * at runtime.
+ * |[
+ * {
+ * static const char *messages[] = {
+ * N_("some very meaningful message"),
+ * N_("and another one")
+ * };
+ * const char *string;
+ * ...
+ * string
+ * = index &gt; 1 ? _("a default message") : gettext (messages[index]);
+ *
+ * fputs (string);
+ * ...
+ * }
+ * ]|
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * Q_:
+ * @String: the string to be translated, with a '|'-separated prefix which must not be translated
+ *
+ * Like _(), but handles context in message ids. This has the advantage
+ * that the string can be adorned with a prefix to guarantee uniqueness
+ * and provide context to the translator.
+ *
+ * One use case given in the gettext manual is GUI translation, where one
+ * could e.g. disambiguate two "Open" menu entries as "File|Open" and
+ * "Printer|Open". Another use case is the string "Russian" which may
+ * have to be translated differently depending on whether it's the name
+ * of a character set or a language. This could be solved by using
+ * "charset|Russian" and "language|Russian".
+ *
+ * See the C_() macro for a different way to mark up translatable strings
+ * with context.
+ *
+ * <note><para>If you are using the Q_() macro, you need to make sure
+ * that you pass <option>--keyword=Q_</option> to xgettext when extracting
+ * messages. If you are using GNU gettext >= 0.15, you can also use
+ * <option>--keyword=Q_:1g</option> to let xgettext split the context
+ * string off into a msgctxt line in the po file.</para></note>
+ *
+ * Returns: the translated message
+ * Since: 2.4
+ */
+
+
+/**
+ * SECTION:arrays
+ * @title: Arrays
+ * @short_description: arrays of arbitrary elements which grow automatically as elements are added
+ *
+ * Arrays are similar to standard C arrays, except that they grow
+ * automatically as elements are added.
+ *
+ * Array elements can be of any size (though all elements of one array
+ * are the same size), and the array can be automatically cleared to
+ * '0's and zero-terminated.
+ *
+ * To create a new array use g_array_new().
+ *
+ * To add elements to an array, use g_array_append_val(),
+ * g_array_append_vals(), g_array_prepend_val(), and
+ * g_array_prepend_vals().
+ *
+ * To access an element of an array, use g_array_index().
+ *
+ * To set the size of an array, use g_array_set_size().
+ *
+ * To free an array, use g_array_free().
+ *
+ * <example>
+ * <title>Using a #GArray to store #gint values</title>
+ * <programlisting>
+ * GArray *garray;
+ * gint i;
+ * /<!-- -->* We create a new array to store gint values.
+ * We don't want it zero-terminated or cleared to 0's. *<!-- -->/
+ * garray = g_array_new (FALSE, FALSE, sizeof (gint));
+ * for (i = 0; i &lt; 10000; i++)
+ * g_array_append_val (garray, i);
+ * for (i = 0; i &lt; 10000; i++)
+ * if (g_array_index (garray, gint, i) != i)
+ * g_print ("ERROR: got &percnt;d instead of &percnt;d\n",
+ * g_array_index (garray, gint, i), i);
+ * g_array_free (garray, TRUE);
+ * </programlisting>
+ * </example>
+ */
+
+
+/**
+ * SECTION:arrays_byte
+ * @title: Byte Arrays
+ * @short_description: arrays of bytes
+ *
+ * #GByteArray is a mutable array of bytes based on #GArray, to provide arrays
+ * of bytes which grow automatically as elements are added.
+ *
+ * To create a new #GByteArray use g_byte_array_new(). To add elements to a
+ * #GByteArray, use g_byte_array_append(), and g_byte_array_prepend().
+ *
+ * To set the size of a #GByteArray, use g_byte_array_set_size().
+ *
+ * To free a #GByteArray, use g_byte_array_free().
+ *
+ * <example>
+ * <title>Using a #GByteArray</title>
+ * <programlisting>
+ * GByteArray *gbarray;
+ * gint i;
+ *
+ * gbarray = g_byte_array_new (<!-- -->);
+ * for (i = 0; i &lt; 10000; i++)
+ * g_byte_array_append (gbarray, (guint8*) "abcd", 4);
+ *
+ * for (i = 0; i &lt; 10000; i++)
+ * {
+ * g_assert (gbarray->data[4*i] == 'a');
+ * g_assert (gbarray->data[4*i+1] == 'b');
+ * g_assert (gbarray->data[4*i+2] == 'c');
+ * g_assert (gbarray->data[4*i+3] == 'd');
+ * }
+ *
+ * g_byte_array_free (gbarray, TRUE);
+ * </programlisting>
+ * </example>
+ *
+ * See #GBytes if you are interested in an immutable object representing a
+ * sequence of bytes.
+ */
+
+
+/**
+ * SECTION:arrays_pointer
+ * @title: Pointer Arrays
+ * @short_description: arrays of pointers to any type of data, which grow automatically as new elements are added
+ *
+ * Pointer Arrays are similar to Arrays but are used only for storing
+ * pointers.
+ *
+ * <note><para>If you remove elements from the array, elements at the
+ * end of the array are moved into the space previously occupied by the
+ * removed element. This means that you should not rely on the index of
+ * particular elements remaining the same. You should also be careful
+ * when deleting elements while iterating over the array.</para></note>
+ *
+ * To create a pointer array, use g_ptr_array_new().
+ *
+ * To add elements to a pointer array, use g_ptr_array_add().
+ *
+ * To remove elements from a pointer array, use g_ptr_array_remove(),
+ * g_ptr_array_remove_index() or g_ptr_array_remove_index_fast().
+ *
+ * To access an element of a pointer array, use g_ptr_array_index().
+ *
+ * To set the size of a pointer array, use g_ptr_array_set_size().
+ *
+ * To free a pointer array, use g_ptr_array_free().
+ *
+ * <example>
+ * <title>Using a #GPtrArray</title>
+ * <programlisting>
+ * GPtrArray *gparray;
+ * gchar *string1 = "one", *string2 = "two", *string3 = "three";
+ *
+ * gparray = g_ptr_array_new (<!-- -->);
+ * g_ptr_array_add (gparray, (gpointer) string1);
+ * g_ptr_array_add (gparray, (gpointer) string2);
+ * g_ptr_array_add (gparray, (gpointer) string3);
+ *
+ * if (g_ptr_array_index (gparray, 0) != (gpointer) string1)
+ * g_print ("ERROR: got &percnt;p instead of &percnt;p\n",
+ * g_ptr_array_index (gparray, 0), string1);
+ *
+ * g_ptr_array_free (gparray, TRUE);
+ * </programlisting>
+ * </example>
+ */
+
+
+/**
+ * SECTION:async_queues
+ * @title: Asynchronous Queues
+ * @short_description: asynchronous communication between threads
+ * @see_also: #GThreadPool
+ *
+ * Often you need to communicate between different threads. In general
+ * it's safer not to do this by shared memory, but by explicit message
+ * passing. These messages only make sense asynchronously for
+ * multi-threaded applications though, as a synchronous operation could
+ * as well be done in the same thread.
+ *
+ * Asynchronous queues are an exception from most other GLib data
+ * structures, as they can be used simultaneously from multiple threads
+ * without explicit locking and they bring their own builtin reference
+ * counting. This is because the nature of an asynchronous queue is that
+ * it will always be used by at least 2 concurrent threads.
+ *
+ * For using an asynchronous queue you first have to create one with
+ * g_async_queue_new(). #GAsyncQueue structs are reference counted,
+ * use g_async_queue_ref() and g_async_queue_unref() to manage your
+ * references.
+ *
+ * A thread which wants to send a message to that queue simply calls
+ * g_async_queue_push() to push the message to the queue.
+ *
+ * A thread which is expecting messages from an asynchronous queue
+ * simply calls g_async_queue_pop() for that queue. If no message is
+ * available in the queue at that point, the thread is now put to sleep
+ * until a message arrives. The message will be removed from the queue
+ * and returned. The functions g_async_queue_try_pop() and
+ * g_async_queue_timeout_pop() can be used to only check for the presence
+ * of messages or to only wait a certain time for messages respectively.
+ *
+ * For almost every function there exist two variants, one that locks
+ * the queue and one that doesn't. That way you can hold the queue lock
+ * (acquire it with g_async_queue_lock() and release it with
+ * g_async_queue_unlock()) over multiple queue accessing instructions.
+ * This can be necessary to ensure the integrity of the queue, but should
+ * only be used when really necessary, as it can make your life harder
+ * if used unwisely. Normally you should only use the locking function
+ * variants (those without the _unlocked suffix).
+ *
+ * In many cases, it may be more convenient to use #GThreadPool when
+ * you need to distribute work to a set of worker threads instead of
+ * using #GAsyncQueue manually. #GThreadPool uses a GAsyncQueue
+ * internally.
+ */
+
+
+/**
+ * SECTION:atomic_operations
+ * @title: Atomic Operations
+ * @short_description: basic atomic integer and pointer operations
+ * @see_also: #GMutex
+ *
+ * The following is a collection of compiler macros to provide atomic
+ * access to integer and pointer-sized values.
+ *
+ * The macros that have 'int' in the name will operate on pointers to
+ * #gint and #guint.  The macros with 'pointer' in the name will operate
+ * on pointers to any pointer-sized value, including #gsize.  There is
+ * no support for 64bit operations on platforms with 32bit pointers
+ * because it is not generally possible to perform these operations
+ * atomically.
+ *
+ * The get, set and exchange operations for integers and pointers
+ * nominally operate on #gint and #gpointer, respectively.  Of the
+ * arithmetic operations, the 'add' operation operates on (and returns)
+ * signed integer values (#gint and #gssize) and the 'and', 'or', and
+ * 'xor' operations operate on (and return) unsigned integer values
+ * (#guint and #gsize).
+ *
+ * All of the operations act as a full compiler and (where appropriate)
+ * hardware memory barrier.  Acquire and release or producer and
+ * consumer barrier semantics are not available through this API.
+ *
+ * It is very important that all accesses to a particular integer or
+ * pointer be performed using only this API and that different sizes of
+ * operation are not mixed or used on overlapping memory regions.  Never
+ * read or assign directly from or to a value -- always use this API.
+ *
+ * For simple reference counting purposes you should use
+ * g_atomic_int_inc() and g_atomic_int_dec_and_test().  Other uses that
+ * fall outside of simple reference counting patterns are prone to
+ * subtle bugs and occasionally undefined behaviour.  It is also worth
+ * noting that since all of these operations require global
+ * synchronisation of the entire machine, they can be quite slow.  In
+ * the case of performing multiple atomic operations it can often be
+ * faster to simply acquire a mutex lock around the critical area,
+ * perform the operations normally and then release the lock.
+ */
+
+
+/**
+ * SECTION:base64
+ * @title: Base64 Encoding
+ * @short_description: encodes and decodes data in Base64 format
+ *
+ * Base64 is an encoding that allows a sequence of arbitrary bytes to be
+ * encoded as a sequence of printable ASCII characters. For the definition
+ * of Base64, see <ulink url="http://www.ietf.org/rfc/rfc1421.txt">RFC
+ * 1421</ulink> or <ulink url="http://www.ietf.org/rfc/rfc2045.txt">RFC
+ * 2045</ulink>. Base64 is most commonly used as a MIME transfer encoding
+ * for email.
+ *
+ * GLib supports incremental encoding using g_base64_encode_step() and
+ * g_base64_encode_close(). Incremental decoding can be done with
+ * g_base64_decode_step(). To encode or decode data in one go, use
+ * g_base64_encode() or g_base64_decode(). To avoid memory allocation when
+ * decoding, you can use g_base64_decode_inplace().
+ *
+ * Support for Base64 encoding has been added in GLib 2.12.
+ */
+
+
+/**
+ * SECTION:bookmarkfile
+ * @title: Bookmark file parser
+ * @short_description: parses files containing bookmarks
+ *
+ * GBookmarkFile lets you parse, edit or create files containing bookmarks
+ * to URI, along with some meta-data about the resource pointed by the URI
+ * like its MIME type, the application that is registering the bookmark and
+ * the icon that should be used to represent the bookmark. The data is stored
+ * using the
+ * <ulink url="http://www.gnome.org/~ebassi/bookmark-spec">Desktop Bookmark
+ * Specification</ulink>.
+ *
+ * The syntax of the bookmark files is described in detail inside the Desktop
+ * Bookmark Specification, here is a quick summary: bookmark files use a
+ * sub-class of the <ulink url="">XML Bookmark Exchange Language</ulink>
+ * specification, consisting of valid UTF-8 encoded XML, under the
+ * <literal>xbel</literal> root element; each bookmark is stored inside a
+ * <literal>bookmark</literal> element, using its URI: no relative paths can
+ * be used inside a bookmark file. The bookmark may have a user defined title
+ * and description, to be used instead of the URI. Under the
+ * <literal>metadata</literal> element, with its <literal>owner</literal>
+ * attribute set to <literal>http://freedesktop.org</literal>, is stored the
+ * meta-data about a resource pointed by its URI. The meta-data consists of
+ * the resource's MIME type; the applications that have registered a bookmark;
+ * the groups to which a bookmark belongs to; a visibility flag, used to set
+ * the bookmark as "private" to the applications and groups that has it
+ * registered; the URI and MIME type of an icon, to be used when displaying
+ * the bookmark inside a GUI.
+ * |[<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../glib/tests/bookmarks.xbel"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include>]|
+ *
+ * A bookmark file might contain more than one bookmark; each bookmark
+ * is accessed through its URI.
+ *
+ * The important caveat of bookmark files is that when you add a new
+ * bookmark you must also add the application that is registering it, using
+ * g_bookmark_file_add_application() or g_bookmark_file_set_app_info().
+ * If a bookmark has no applications then it won't be dumped when creating
+ * the on disk representation, using g_bookmark_file_to_data() or
+ * g_bookmark_file_to_file().
+ *
+ * The #GBookmarkFile parser was added in GLib 2.12.
+ */
+
+
+/**
+ * SECTION:byte_order
+ * @title: Byte Order Macros
+ * @short_description: a portable way to convert between different byte orders
+ *
+ * These macros provide a portable way to determine the host byte order
+ * and to convert values between different byte orders.
+ *
+ * The byte order is the order in which bytes are stored to create larger
+ * data types such as the #gint and #glong values.
+ * The host byte order is the byte order used on the current machine.
+ *
+ * Some processors store the most significant bytes (i.e. the bytes that
+ * hold the largest part of the value) first. These are known as big-endian
+ * processors. Other processors (notably the x86 family) store the most
+ * significant byte last. These are known as little-endian processors.
+ *
+ * Finally, to complicate matters, some other processors store the bytes in
+ * a rather curious order known as PDP-endian. For a 4-byte word, the 3rd
+ * most significant byte is stored first, then the 4th, then the 1st and
+ * finally the 2nd.
+ *
+ * Obviously there is a problem when these different processors communicate
+ * with each other, for example over networks or by using binary file formats.
+ * This is where these macros come in. They are typically used to convert
+ * values into a byte order which has been agreed on for use when
+ * communicating between different processors. The Internet uses what is
+ * known as 'network byte order' as the standard byte order (which is in
+ * fact the big-endian byte order).
+ *
+ * Note that the byte order conversion macros may evaluate their arguments
+ * multiple times, thus you should not use them with arguments which have
+ * side-effects.
+ */
+
+
+/**
+ * SECTION:checksum
+ * @title: Data Checksums
+ * @short_description: computes the checksum for data
+ *
+ * GLib provides a generic API for computing checksums (or "digests")
+ * for a sequence of arbitrary bytes, using various hashing algorithms
+ * like MD5, SHA-1 and SHA-256. Checksums are commonly used in various
+ * environments and specifications.
+ *
+ * GLib supports incremental checksums using the GChecksum data
+ * structure, by calling g_checksum_update() as long as there's data
+ * available and then using g_checksum_get_string() or
+ * g_checksum_get_digest() to compute the checksum and return it either
+ * as a string in hexadecimal form, or as a raw sequence of bytes. To
+ * compute the checksum for binary blobs and NUL-terminated strings in
+ * one go, use the convenience functions g_compute_checksum_for_data()
+ * and g_compute_checksum_for_string(), respectively.
+ *
+ * Support for checksums has been added in GLib 2.16
+ */
+
+
+/**
+ * SECTION:conversions
+ * @title: Character Set Conversion
+ * @short_description: convert strings between different character sets
+ *
+ * The g_convert() family of function wraps the functionality of iconv(). In
+ * addition to pure character set conversions, GLib has functions to deal
+ * with the extra complications of encodings for file names.
+ *
+ * <refsect2 id="file-name-encodings">
+ * <title>File Name Encodings</title>
+ * <para>
+ * Historically, Unix has not had a defined encoding for file
+ * names:  a file name is valid as long as it does not have path
+ * separators in it ("/").  However, displaying file names may
+ * require conversion:  from the character set in which they were
+ * created, to the character set in which the application
+ * operates.  Consider the Spanish file name
+ * "<filename>Presentaci&oacute;n.sxi</filename>".  If the
+ * application which created it uses ISO-8859-1 for its encoding,
+ * </para>
+ * <programlisting id="filename-iso8859-1">
+ * Character:  P  r  e  s  e  n  t  a  c  i  &oacute;  n  .  s  x  i
+ * Hex code:   50 72 65 73 65 6e 74 61 63 69 f3 6e 2e 73 78 69
+ * </programlisting>
+ * <para>
+ * However, if the application use UTF-8, the actual file name on
+ * disk would look like this:
+ * </para>
+ * <programlisting id="filename-utf-8">
+ * Character:  P  r  e  s  e  n  t  a  c  i  &oacute;     n  .  s  x  i
+ * Hex code:   50 72 65 73 65 6e 74 61 63 69 c3 b3 6e 2e 73 78 69
+ * </programlisting>
+ * <para>
+ * Glib uses UTF-8 for its strings, and GUI toolkits like GTK+
+ * that use Glib do the same thing.  If you get a file name from
+ * the file system, for example, from readdir(3) or from g_dir_read_name(),
+ * and you wish to display the file name to the user, you
+ * <emphasis>will</emphasis> need to convert it into UTF-8.  The
+ * opposite case is when the user types the name of a file he
+ * wishes to save:  the toolkit will give you that string in
+ * UTF-8 encoding, and you will need to convert it to the
+ * character set used for file names before you can create the
+ * file with open(2) or fopen(3).
+ * </para>
+ * <para>
+ * By default, Glib assumes that file names on disk are in UTF-8
+ * encoding.  This is a valid assumption for file systems which
+ * were created relatively recently:  most applications use UTF-8
+ * encoding for their strings, and that is also what they use for
+ * the file names they create.  However, older file systems may
+ * still contain file names created in "older" encodings, such as
+ * ISO-8859-1. In this case, for compatibility reasons, you may
+ * want to instruct Glib to use that particular encoding for file
+ * names rather than UTF-8.  You can do this by specifying the
+ * encoding for file names in the <link
+ * linkend="G_FILENAME_ENCODING"><envar>G_FILENAME_ENCODING</envar></link>
+ * environment variable.  For example, if your installation uses
+ * ISO-8859-1 for file names, you can put this in your
+ * <filename>~/.profile</filename>:
+ * </para>
+ * <programlisting>
+ * export G_FILENAME_ENCODING=ISO-8859-1
+ * </programlisting>
+ * <para>
+ * Glib provides the functions g_filename_to_utf8() and
+ * g_filename_from_utf8() to perform the necessary conversions. These
+ * functions convert file names from the encoding specified in
+ * <envar>G_FILENAME_ENCODING</envar> to UTF-8 and vice-versa.
+ * <xref linkend="file-name-encodings-diagram"/> illustrates how
+ * these functions are used to convert between UTF-8 and the
+ * encoding for file names in the file system.
+ * </para>
+ * <figure id="file-name-encodings-diagram">
+ * <title>Conversion between File Name Encodings</title>
+ * <graphic fileref="file-name-encodings.png" format="PNG"/>
+ * </figure>
+ * <refsect3 id="file-name-encodings-checklist">
+ * <title>Checklist for Application Writers</title>
+ * <para>
+ * This section is a practical summary of the detailed
+ * description above.  You can use this as a checklist of
+ * things to do to make sure your applications process file
+ * name encodings correctly.
+ * </para>
+ * <orderedlist>
+ * <listitem><para>
+ * If you get a file name from the file system from a function
+ * such as readdir(3) or gtk_file_chooser_get_filename(),
+ * you do not need to do any conversion to pass that
+ * file name to functions like open(2), rename(2), or
+ * fopen(3) &mdash; those are "raw" file names which the file
+ * system understands.
+ * </para></listitem>
+ * <listitem><para>
+ * If you need to display a file name, convert it to UTF-8 first by
+ * using g_filename_to_utf8(). If conversion fails, display a string like
+ * "<literal>Unknown file name</literal>". <emphasis>Do not</emphasis>
+ * convert this string back into the encoding used for file names if you
+ * wish to pass it to the file system; use the original file name instead.
+ * For example, the document window of a word processor could display
+ * "Unknown file name" in its title bar but still let the user save the
+ * file, as it would keep the raw file name internally. This can happen
+ * if the user has not set the <envar>G_FILENAME_ENCODING</envar>
+ * environment variable even though he has files whose names are not
+ * encoded in UTF-8.
+ * </para></listitem>
+ * <listitem><para>
+ * If your user interface lets the user type a file name for saving or
+ * renaming, convert it to the encoding used for file names in the file
+ * system by using g_filename_from_utf8(). Pass the converted file name
+ * to functions like fopen(3). If conversion fails, ask the user to enter
+ * a different file name. This can happen if the user types Japanese
+ * characters when <envar>G_FILENAME_ENCODING</envar> is set to
+ * <literal>ISO-8859-1</literal>, for example.
+ * </para></listitem>
+ * </orderedlist>
+ * </refsect3>
+ * </refsect2>
+ */
+
+
+/**
+ * SECTION:datalist
+ * @title: Keyed Data Lists
+ * @short_description: lists of data elements which are accessible by a string or GQuark identifier
+ *
+ * Keyed data lists provide lists of arbitrary data elements which can
+ * be accessed either with a string or with a #GQuark corresponding to
+ * the string.
+ *
+ * The #GQuark methods are quicker, since the strings have to be
+ * converted to #GQuarks anyway.
+ *
+ * Data lists are used for associating arbitrary data with #GObjects,
+ * using g_object_set_data() and related functions.
+ *
+ * To create a datalist, use g_datalist_init().
+ *
+ * To add data elements to a datalist use g_datalist_id_set_data(),
+ * g_datalist_id_set_data_full(), g_datalist_set_data() and
+ * g_datalist_set_data_full().
+ *
+ * To get data elements from a datalist use g_datalist_id_get_data()
+ * and g_datalist_get_data().
+ *
+ * To iterate over all data elements in a datalist use
+ * g_datalist_foreach() (not thread-safe).
+ *
+ * To remove data elements from a datalist use
+ * g_datalist_id_remove_data() and g_datalist_remove_data().
+ *
+ * To remove all data elements from a datalist, use g_datalist_clear().
+ */
+
+
+/**
+ * SECTION:datasets
+ * @title: Datasets
+ * @short_description: associate groups of data elements with particular memory locations
+ *
+ * Datasets associate groups of data elements with particular memory
+ * locations. These are useful if you need to associate data with a
+ * structure returned from an external library. Since you cannot modify
+ * the structure, you use its location in memory as the key into a
+ * dataset, where you can associate any number of data elements with it.
+ *
+ * There are two forms of most of the dataset functions. The first form
+ * uses strings to identify the data elements associated with a
+ * location. The second form uses #GQuark identifiers, which are
+ * created with a call to g_quark_from_string() or
+ * g_quark_from_static_string(). The second form is quicker, since it
+ * does not require looking up the string in the hash table of #GQuark
+ * identifiers.
+ *
+ * There is no function to create a dataset. It is automatically
+ * created as soon as you add elements to it.
+ *
+ * To add data elements to a dataset use g_dataset_id_set_data(),
+ * g_dataset_id_set_data_full(), g_dataset_set_data() and
+ * g_dataset_set_data_full().
+ *
+ * To get data elements from a dataset use g_dataset_id_get_data() and
+ * g_dataset_get_data().
+ *
+ * To iterate over all data elements in a dataset use
+ * g_dataset_foreach() (not thread-safe).
+ *
+ * To remove data elements from a dataset use
+ * g_dataset_id_remove_data() and g_dataset_remove_data().
+ *
+ * To destroy a dataset, use g_dataset_destroy().
+ */
+
+
+/**
+ * SECTION:date
+ * @title: Date and Time Functions
+ * @short_description: calendrical calculations and miscellaneous time stuff
+ *
+ * The #GDate data structure represents a day between January 1, Year 1,
+ * and sometime a few thousand years in the future (right now it will go
+ * to the year 65535 or so, but g_date_set_parse() only parses up to the
+ * year 8000 or so - just count on "a few thousand"). #GDate is meant to
+ * represent everyday dates, not astronomical dates or historical dates
+ * or ISO timestamps or the like. It extrapolates the current Gregorian
+ * calendar forward and backward in time; there is no attempt to change
+ * the calendar to match time periods or locations. #GDate does not store
+ * time information; it represents a <emphasis>day</emphasis>.
+ *
+ * The #GDate implementation has several nice features; it is only a
+ * 64-bit struct, so storing large numbers of dates is very efficient. It
+ * can keep both a Julian and day-month-year representation of the date,
+ * since some calculations are much easier with one representation or the
+ * other. A Julian representation is simply a count of days since some
+ * fixed day in the past; for #GDate the fixed day is January 1, 1 AD.
+ * ("Julian" dates in the #GDate API aren't really Julian dates in the
+ * technical sense; technically, Julian dates count from the start of the
+ * Julian period, Jan 1, 4713 BC).
+ *
+ * #GDate is simple to use. First you need a "blank" date; you can get a
+ * dynamically allocated date from g_date_new(), or you can declare an
+ * automatic variable or array and initialize it to a sane state by
+ * calling g_date_clear(). A cleared date is sane; it's safe to call
+ * g_date_set_dmy() and the other mutator functions to initialize the
+ * value of a cleared date. However, a cleared date is initially
+ * <emphasis>invalid</emphasis>, meaning that it doesn't represent a day
+ * that exists. It is undefined to call any of the date calculation
+ * routines on an invalid date. If you obtain a date from a user or other
+ * unpredictable source, you should check its validity with the
+ * g_date_valid() predicate. g_date_valid() is also used to check for
+ * errors with g_date_set_parse() and other functions that can
+ * fail. Dates can be invalidated by calling g_date_clear() again.
+ *
+ * <emphasis>It is very important to use the API to access the #GDate
+ * struct.</emphasis> Often only the day-month-year or only the Julian
+ * representation is valid. Sometimes neither is valid. Use the API.
+ *
+ * GLib also features #GDateTime which represents a precise time.
+ */
+
+
+/**
+ * SECTION:date-time
+ * @title: GDateTime
+ * @short_description: a structure representing Date and Time
+ * @see_also: #GTimeZone
+ *
+ * #GDateTime is a structure that combines a Gregorian date and time
+ * into a single structure.  It provides many conversion and methods to
+ * manipulate dates and times.  Time precision is provided down to
+ * microseconds and the time can range (proleptically) from 0001-01-01
+ * 00:00:00 to 9999-12-31 23:59:59.999999.  #GDateTime follows POSIX
+ * time in the sense that it is oblivious to leap seconds.
+ *
+ * #GDateTime is an immutable object; once it has been created it cannot
+ * be modified further.  All modifiers will create a new #GDateTime.
+ * Nearly all such functions can fail due to the date or time going out
+ * of range, in which case %NULL will be returned.
+ *
+ * #GDateTime is reference counted: the reference count is increased by calling
+ * g_date_time_ref() and decreased by calling g_date_time_unref(). When the
+ * reference count drops to 0, the resources allocated by the #GDateTime
+ * structure are released.
+ *
+ * Many parts of the API may produce non-obvious results.  As an
+ * example, adding two months to January 31st will yield March 31st
+ * whereas adding one month and then one month again will yield either
+ * March 28th or March 29th.  Also note that adding 24 hours is not
+ * always the same as adding one day (since days containing daylight
+ * savings time transitions are either 23 or 25 hours in length).
+ *
+ * #GDateTime is available since GLib 2.26.
+ */
+
+
+/**
+ * SECTION:error_reporting
+ * @Title: Error Reporting
+ * @Short_description: a system for reporting errors
+ *
+ * GLib provides a standard method of reporting errors from a called
+ * function to the calling code. (This is the same problem solved by
+ * exceptions in other languages.) It's important to understand that
+ * this method is both a <emphasis>data type</emphasis> (the #GError
+ * object) and a <emphasis>set of rules.</emphasis> If you use #GError
+ * incorrectly, then your code will not properly interoperate with other
+ * code that uses #GError, and users of your API will probably get confused.
+ *
+ * First and foremost: <emphasis>#GError should only be used to report
+ * recoverable runtime errors, never to report programming
+ * errors.</emphasis> If the programmer has screwed up, then you should
+ * use g_warning(), g_return_if_fail(), g_assert(), g_error(), or some
+ * similar facility. (Incidentally, remember that the g_error() function
+ * should <emphasis>only</emphasis> be used for programming errors, it
+ * should not be used to print any error reportable via #GError.)
+ *
+ * Examples of recoverable runtime errors are "file not found" or
+ * "failed to parse input." Examples of programming errors are "NULL
+ * passed to strcmp()" or "attempted to free the same pointer twice."
+ * These two kinds of errors are fundamentally different: runtime errors
+ * should be handled or reported to the user, programming errors should
+ * be eliminated by fixing the bug in the program. This is why most
+ * functions in GLib and GTK+ do not use the #GError facility.
+ *
+ * Functions that can fail take a return location for a #GError as their
+ * last argument. For example:
+ * |[
+ * gboolean g_file_get_contents (const gchar  *filename,
+ * gchar       **contents,
+ * gsize        *length,
+ * GError      **error);
+ * ]|
+ * If you pass a non-%NULL value for the <literal>error</literal>
+ * argument, it should point to a location where an error can be placed.
+ * For example:
+ * |[
+ * gchar *contents;
+ * GError *err = NULL;
+ * g_file_get_contents ("foo.txt", &amp;contents, NULL, &amp;err);
+ * g_assert ((contents == NULL &amp;&amp; err != NULL) || (contents != NULL &amp;&amp; err == NULL));
+ * if (err != NULL)
+ * {
+ * /&ast; Report error to user, and free error &ast;/
+ * g_assert (contents == NULL);
+ * fprintf (stderr, "Unable to read file: &percnt;s\n", err->message);
+ * g_error_free (err);
+ * }
+ * else
+ * {
+ * /&ast; Use file contents &ast;/
+ * g_assert (contents != NULL);
+ * }
+ * ]|
+ * Note that <literal>err != NULL</literal> in this example is a
+ * <emphasis>reliable</emphasis> indicator of whether
+ * g_file_get_contents() failed. Additionally, g_file_get_contents()
+ * returns a boolean which indicates whether it was successful.
+ *
+ * Because g_file_get_contents() returns %FALSE on failure, if you
+ * are only interested in whether it failed and don't need to display
+ * an error message, you can pass %NULL for the <literal>error</literal>
+ * argument:
+ * |[
+ * if (g_file_get_contents ("foo.txt", &amp;contents, NULL, NULL)) /&ast; ignore errors &ast;/
+ * /&ast; no error occurred &ast;/ ;
+ * else
+ * /&ast; error &ast;/ ;
+ * ]|
+ *
+ * The #GError object contains three fields: <literal>domain</literal>
+ * indicates the module the error-reporting function is located in,
+ * <literal>code</literal> indicates the specific error that occurred,
+ * and <literal>message</literal> is a user-readable error message with
+ * as many details as possible. Several functions are provided to deal
+ * with an error received from a called function: g_error_matches()
+ * returns %TRUE if the error matches a given domain and code,
+ * g_propagate_error() copies an error into an error location (so the
+ * calling function will receive it), and g_clear_error() clears an
+ * error location by freeing the error and resetting the location to
+ * %NULL. To display an error to the user, simply display
+ * <literal>error-&gt;message</literal>, perhaps along with additional
+ * context known only to the calling function (the file being opened,
+ * or whatever -- though in the g_file_get_contents() case,
+ * <literal>error-&gt;message</literal> already contains a filename).
+ *
+ * When implementing a function that can report errors, the basic
+ * tool is g_set_error(). Typically, if a fatal error occurs you
+ * want to g_set_error(), then return immediately. g_set_error()
+ * does nothing if the error location passed to it is %NULL.
+ * Here's an example:
+ * |[
+ * gint
+ * foo_open_file (GError **error)
+ * {
+ * gint fd;
+ *
+ * fd = open ("file.txt", O_RDONLY);
+ *
+ * if (fd &lt; 0)
+ * {
+ * g_set_error (error,
+ * FOO_ERROR,                 /&ast; error domain &ast;/
+ * FOO_ERROR_BLAH,            /&ast; error code &ast;/
+ * "Failed to open file: &percnt;s", /&ast; error message format string &ast;/
+ * g_strerror (errno));
+ * return -1;
+ * }
+ * else
+ * return fd;
+ * }
+ * ]|
+ *
+ * Things are somewhat more complicated if you yourself call another
+ * function that can report a #GError. If the sub-function indicates
+ * fatal errors in some way other than reporting a #GError, such as
+ * by returning %TRUE on success, you can simply do the following:
+ * |[
+ * gboolean
+ * my_function_that_can_fail (GError **err)
+ * {
+ * g_return_val_if_fail (err == NULL || *err == NULL, FALSE);
+ *
+ * if (!sub_function_that_can_fail (err))
+ * {
+ * /&ast; assert that error was set by the sub-function &ast;/
+ * g_assert (err == NULL || *err != NULL);
+ * return FALSE;
+ * }
+ *
+ * /&ast; otherwise continue, no error occurred &ast;/
+ * g_assert (err == NULL || *err == NULL);
+ * }
+ * ]|
+ *
+ * If the sub-function does not indicate errors other than by
+ * reporting a #GError, you need to create a temporary #GError
+ * since the passed-in one may be %NULL. g_propagate_error() is
+ * intended for use in this case.
+ * |[
+ * gboolean
+ * my_function_that_can_fail (GError **err)
+ * {
+ * GError *tmp_error;
+ *
+ * g_return_val_if_fail (err == NULL || *err == NULL, FALSE);
+ *
+ * tmp_error = NULL;
+ * sub_function_that_can_fail (&amp;tmp_error);
+ *
+ * if (tmp_error != NULL)
+ * {
+ * /&ast; store tmp_error in err, if err != NULL,
+ * &ast; otherwise call g_error_free() on tmp_error
+ * &ast;/
+ * g_propagate_error (err, tmp_error);
+ * return FALSE;
+ * }
+ *
+ * /&ast; otherwise continue, no error occurred &ast;/
+ * }
+ * ]|
+ *
+ * Error pileups are always a bug. For example, this code is incorrect:
+ * |[
+ * gboolean
+ * my_function_that_can_fail (GError **err)
+ * {
+ * GError *tmp_error;
+ *
+ * g_return_val_if_fail (err == NULL || *err == NULL, FALSE);
+ *
+ * tmp_error = NULL;
+ * sub_function_that_can_fail (&amp;tmp_error);
+ * other_function_that_can_fail (&amp;tmp_error);
+ *
+ * if (tmp_error != NULL)
+ * {
+ * g_propagate_error (err, tmp_error);
+ * return FALSE;
+ * }
+ * }
+ * ]|
+ * <literal>tmp_error</literal> should be checked immediately after
+ * sub_function_that_can_fail(), and either cleared or propagated
+ * upward. The rule is: <emphasis>after each error, you must either
+ * handle the error, or return it to the calling function</emphasis>.
+ * Note that passing %NULL for the error location is the equivalent
+ * of handling an error by always doing nothing about it. So the
+ * following code is fine, assuming errors in sub_function_that_can_fail()
+ * are not fatal to my_function_that_can_fail():
+ * |[
+ * gboolean
+ * my_function_that_can_fail (GError **err)
+ * {
+ * GError *tmp_error;
+ *
+ * g_return_val_if_fail (err == NULL || *err == NULL, FALSE);
+ *
+ * sub_function_that_can_fail (NULL); /&ast; ignore errors &ast;/
+ *
+ * tmp_error = NULL;
+ * other_function_that_can_fail (&amp;tmp_error);
+ *
+ * if (tmp_error != NULL)
+ * {
+ * g_propagate_error (err, tmp_error);
+ * return FALSE;
+ * }
+ * }
+ * ]|
+ *
+ * Note that passing %NULL for the error location
+ * <emphasis>ignores</emphasis> errors; it's equivalent to
+ * <literal>try { sub_function_that_can_fail (); } catch (...) {}</literal>
+ * in C++. It does <emphasis>not</emphasis> mean to leave errors
+ * unhandled; it means to handle them by doing nothing.
+ *
+ * Error domains and codes are conventionally named as follows:
+ * <itemizedlist>
+ * <listitem><para>
+ * The error domain is called
+ * <literal>&lt;NAMESPACE&gt;_&lt;MODULE&gt;_ERROR</literal>,
+ * for example %G_SPAWN_ERROR or %G_THREAD_ERROR:
+ * |[
+ * #define G_SPAWN_ERROR g_spawn_error_quark ()
+ *
+ * GQuark
+ * g_spawn_error_quark (void)
+ * {
+ * return g_quark_from_static_string ("g-spawn-error-quark");
+ * }
+ * ]|
+ * </para></listitem>
+ * <listitem><para>
+ * The quark function for the error domain is called
+ * <literal>&lt;namespace&gt;_&lt;module&gt;_error_quark</literal>,
+ * for example g_spawn_error_quark() or g_thread_error_quark().
+ * </para></listitem>
+ * <listitem><para>
+ * The error codes are in an enumeration called
+ * <literal>&lt;Namespace&gt;&lt;Module&gt;Error</literal>;
+ * for example,#GThreadError or #GSpawnError.
+ * </para></listitem>
+ * <listitem><para>
+ * Members of the error code enumeration are called
+ * <literal>&lt;NAMESPACE&gt;_&lt;MODULE&gt;_ERROR_&lt;CODE&gt;</literal>,
+ * for example %G_SPAWN_ERROR_FORK or %G_THREAD_ERROR_AGAIN.
+ * </para></listitem>
+ * <listitem><para>
+ * If there's a "generic" or "unknown" error code for unrecoverable
+ * errors it doesn't make sense to distinguish with specific codes,
+ * it should be called <literal>&lt;NAMESPACE&gt;_&lt;MODULE&gt;_ERROR_FAILED</literal>,
+ * for example %G_SPAWN_ERROR_FAILED.
+ * </para></listitem>
+ * </itemizedlist>
+ *
+ * Summary of rules for use of #GError:
+ * <itemizedlist>
+ * <listitem><para>
+ * Do not report programming errors via #GError.
+ * </para></listitem>
+ * <listitem><para>
+ * The last argument of a function that returns an error should
+ * be a location where a #GError can be placed (i.e. "#GError** error").
+ * If #GError is used with varargs, the #GError** should be the last
+ * argument before the "...".
+ * </para></listitem>
+ * <listitem><para>
+ * The caller may pass %NULL for the #GError** if they are not interested
+ * in details of the exact error that occurred.
+ * </para></listitem>
+ * <listitem><para>
+ * If %NULL is passed for the #GError** argument, then errors should
+ * not be returned to the caller, but your function should still
+ * abort and return if an error occurs. That is, control flow should
+ * not be affected by whether the caller wants to get a #GError.
+ * </para></listitem>
+ * <listitem><para>
+ * If a #GError is reported, then your function by definition
+ * <emphasis>had a fatal failure and did not complete whatever
+ * it was supposed to do</emphasis>. If the failure was not fatal,
+ * then you handled it and you should not report it. If it was fatal,
+ * then you must report it and discontinue whatever you were doing
+ * immediately.
+ * </para></listitem>
+ * <listitem><para>
+ * If a #GError is reported, out parameters are not guaranteed to
+ * be set to any defined value.
+ * </para></listitem>
+ * <listitem><para>
+ * A #GError* must be initialized to %NULL before passing its address
+ * to a function that can report errors.
+ * </para></listitem>
+ * <listitem><para>
+ * "Piling up" errors is always a bug. That is, if you assign a
+ * new #GError to a #GError* that is non-%NULL, thus overwriting
+ * the previous error, it indicates that you should have aborted
+ * the operation instead of continuing. If you were able to continue,
+ * you should have cleared the previous error with g_clear_error().
+ * g_set_error() will complain if you pile up errors.
+ * </para></listitem>
+ * <listitem><para>
+ * By convention, if you return a boolean value indicating success
+ * then %TRUE means success and %FALSE means failure. If %FALSE is
+ * returned, the error <emphasis>must</emphasis> be set to a non-%NULL
+ * value.
+ * </para></listitem>
+ * <listitem><para>
+ * A %NULL return value is also frequently used to mean that an error
+ * occurred. You should make clear in your documentation whether %NULL
+ * is a valid return value in non-error cases; if %NULL is a valid value,
+ * then users must check whether an error was returned to see if the
+ * function succeeded.
+ * </para></listitem>
+ * <listitem><para>
+ * When implementing a function that can report errors, you may want
+ * to add a check at the top of your function that the error return
+ * location is either %NULL or contains a %NULL error (e.g.
+ * <literal>g_return_if_fail (error == NULL || *error == NULL);</literal>).
+ * </para></listitem>
+ * </itemizedlist>
+ */
+
+
+/**
+ * SECTION:fileutils
+ * @title: File Utilities
+ * @short_description: various file-related functions
+ *
+ * There is a group of functions which wrap the common POSIX functions
+ * dealing with filenames (g_open(), g_rename(), g_mkdir(), g_stat(),
+ * g_unlink(), g_remove(), g_fopen(), g_freopen()). The point of these
+ * wrappers is to make it possible to handle file names with any Unicode
+ * characters in them on Windows without having to use ifdefs and the
+ * wide character API in the application code.
+ *
+ * The pathname argument should be in the GLib file name encoding.
+ * On POSIX this is the actual on-disk encoding which might correspond
+ * to the locale settings of the process (or the
+ * <envar>G_FILENAME_ENCODING</envar> environment variable), or not.
+ *
+ * On Windows the GLib file name encoding is UTF-8. Note that the
+ * Microsoft C library does not use UTF-8, but has separate APIs for
+ * current system code page and wide characters (UTF-16). The GLib
+ * wrappers call the wide character API if present (on modern Windows
+ * systems), otherwise convert to/from the system code page.
+ *
+ * Another group of functions allows to open and read directories
+ * in the GLib file name encoding. These are g_dir_open(),
+ * g_dir_read_name(), g_dir_rewind(), g_dir_close().
+ */
+
+
+/**
+ * SECTION:ghostutils
+ * @short_description: Internet hostname utilities
+ *
+ * Functions for manipulating internet hostnames; in particular, for
+ * converting between Unicode and ASCII-encoded forms of
+ * Internationalized Domain Names (IDNs).
+ *
+ * The <ulink
+ * url="http://www.ietf.org/rfc/rfc3490.txt">Internationalized Domain
+ * Names for Applications (IDNA)</ulink> standards allow for the use
+ * of Unicode domain names in applications, while providing
+ * backward-compatibility with the old ASCII-only DNS, by defining an
+ * ASCII-Compatible Encoding of any given Unicode name, which can be
+ * used with non-IDN-aware applications and protocols. (For example,
+ * "Παν語.org" maps to "xn--4wa8awb4637h.org".)
+ */
+
+
+/**
+ * SECTION:gregex
+ * @title: Perl-compatible regular expressions
+ * @short_description: matches strings against regular expressions
+ * @see_also: <xref linkend="glib-regex-syntax"/>
+ *
+ * The <function>g_regex_*()</function> functions implement regular
+ * expression pattern matching using syntax and semantics similar to
+ * Perl regular expression.
+ *
+ * Some functions accept a @start_position argument, setting it differs
+ * from just passing over a shortened string and setting #G_REGEX_MATCH_NOTBOL
+ * in the case of a pattern that begins with any kind of lookbehind assertion.
+ * For example, consider the pattern "\Biss\B" which finds occurrences of "iss"
+ * in the middle of words. ("\B" matches only if the current position in the
+ * subject is not a word boundary.) When applied to the string "Mississipi"
+ * from the fourth byte, namely "issipi", it does not match, because "\B" is
+ * always false at the start of the subject, which is deemed to be a word
+ * boundary. However, if the entire string is passed , but with
+ * @start_position set to 4, it finds the second occurrence of "iss" because
+ * it is able to look behind the starting point to discover that it is
+ * preceded by a letter.
+ *
+ * Note that, unless you set the #G_REGEX_RAW flag, all the strings passed
+ * to these functions must be encoded in UTF-8. The lengths and the positions
+ * inside the strings are in bytes and not in characters, so, for instance,
+ * "\xc3\xa0" (i.e. "&agrave;") is two bytes long but it is treated as a
+ * single character. If you set #G_REGEX_RAW the strings can be non-valid
+ * UTF-8 strings and a byte is treated as a character, so "\xc3\xa0" is two
+ * bytes and two characters long.
+ *
+ * When matching a pattern, "\n" matches only against a "\n" character in
+ * the string, and "\r" matches only a "\r" character. To match any newline
+ * sequence use "\R". This particular group matches either the two-character
+ * sequence CR + LF ("\r\n"), or one of the single characters LF (linefeed,
+ * U+000A, "\n"), VT vertical tab, U+000B, "\v"), FF (formfeed, U+000C, "\f"),
+ * CR (carriage return, U+000D, "\r"), NEL (next line, U+0085), LS (line
+ * separator, U+2028), or PS (paragraph separator, U+2029).
+ *
+ * The behaviour of the dot, circumflex, and dollar metacharacters are
+ * affected by newline characters, the default is to recognize any newline
+ * character (the same characters recognized by "\R"). This can be changed
+ * with #G_REGEX_NEWLINE_CR, #G_REGEX_NEWLINE_LF and #G_REGEX_NEWLINE_CRLF
+ * compile options, and with #G_REGEX_MATCH_NEWLINE_ANY,
+ * #G_REGEX_MATCH_NEWLINE_CR, #G_REGEX_MATCH_NEWLINE_LF and
+ * #G_REGEX_MATCH_NEWLINE_CRLF match options. These settings are also
+ * relevant when compiling a pattern if #G_REGEX_EXTENDED is set, and an
+ * unescaped "#" outside a character class is encountered. This indicates
+ * a comment that lasts until after the next newline.
+ *
+ * Creating and manipulating the same #GRegex structure from different
+ * threads is not a problem as #GRegex does not modify its internal
+ * state between creation and destruction, on the other hand #GMatchInfo
+ * is not threadsafe.
+ *
+ * The regular expressions low-level functionalities are obtained through
+ * the excellent <ulink url="http://www.pcre.org/">PCRE</ulink> library
+ * written by Philip Hazel.
+ */
+
+
+/**
+ * SECTION:gunix
+ * @title: UNIX-specific utilities and integration
+ * @short_description: pipes, signal handling
+ * @include: glib-unix.h
+ *
+ * Most of GLib is intended to be portable; in contrast, this set of
+ * functions is designed for programs which explicitly target UNIX,
+ * or are using it to build higher level abstractions which would be
+ * conditionally compiled if the platform matches G_OS_UNIX.
+ *
+ * To use these functions, you must explicitly include the
+ * "glib-unix.h" header.
+ */
+
+
+/**
+ * SECTION:gurifuncs
+ * @title: URI Functions
+ * @short_description: manipulating URIs
+ *
+ * Functions for manipulating Universal Resource Identifiers (URIs) as
+ * defined by <ulink url="http://www.ietf.org/rfc/rfc3986.txt">
+ * RFC 3986</ulink>. It is highly recommended that you have read and
+ * understand RFC 3986 for understanding this API.
+ */
+
+
+/**
+ * SECTION:gvariant
+ * @title: GVariant
+ * @short_description: strongly typed value datatype
+ * @see_also: GVariantType
+ *
+ * #GVariant is a variant datatype; it stores a value along with
+ * information about the type of that value.  The range of possible
+ * values is determined by the type.  The type system used by #GVariant
+ * is #GVariantType.
+ *
+ * #GVariant instances always have a type and a value (which are given
+ * at construction time).  The type and value of a #GVariant instance
+ * can never change other than by the #GVariant itself being
+ * destroyed.  A #GVariant cannot contain a pointer.
+ *
+ * #GVariant is reference counted using g_variant_ref() and
+ * g_variant_unref().  #GVariant also has floating reference counts --
+ * see g_variant_ref_sink().
+ *
+ * #GVariant is completely threadsafe.  A #GVariant instance can be
+ * concurrently accessed in any way from any number of threads without
+ * problems.
+ *
+ * #GVariant is heavily optimised for dealing with data in serialised
+ * form.  It works particularly well with data located in memory-mapped
+ * files.  It can perform nearly all deserialisation operations in a
+ * small constant time, usually touching only a single memory page.
+ * Serialised #GVariant data can also be sent over the network.
+ *
+ * #GVariant is largely compatible with D-Bus.  Almost all types of
+ * #GVariant instances can be sent over D-Bus.  See #GVariantType for
+ * exceptions.  (However, #GVariant's serialisation format is not the same
+ * as the serialisation format of a D-Bus message body: use #GDBusMessage,
+ * in the gio library, for those.)
+ *
+ * For space-efficiency, the #GVariant serialisation format does not
+ * automatically include the variant's type or endianness, which must
+ * either be implied from context (such as knowledge that a particular
+ * file format always contains a little-endian %G_VARIANT_TYPE_VARIANT)
+ * or supplied out-of-band (for instance, a type and/or endianness
+ * indicator could be placed at the beginning of a file, network message
+ * or network stream).
+ *
+ * A #GVariant's size is limited mainly by any lower level operating
+ * system constraints, such as the number of bits in #gsize.  For
+ * example, it is reasonable to have a 2GB file mapped into memory
+ * with #GMappedFile, and call g_variant_new_from_data() on it.
+ *
+ * For convenience to C programmers, #GVariant features powerful
+ * varargs-based value construction and destruction.  This feature is
+ * designed to be embedded in other libraries.
+ *
+ * There is a Python-inspired text language for describing #GVariant
+ * values.  #GVariant includes a printer for this language and a parser
+ * with type inferencing.
+ *
+ * <refsect2>
+ * <title>Memory Use</title>
+ * <para>
+ * #GVariant tries to be quite efficient with respect to memory use.
+ * This section gives a rough idea of how much memory is used by the
+ * current implementation.  The information here is subject to change
+ * in the future.
+ * </para>
+ * <para>
+ * The memory allocated by #GVariant can be grouped into 4 broad
+ * purposes: memory for serialised data, memory for the type
+ * information cache, buffer management memory and memory for the
+ * #GVariant structure itself.
+ * </para>
+ * <refsect3 id="gvariant-serialised-data-memory">
+ * <title>Serialised Data Memory</title>
+ * <para>
+ * This is the memory that is used for storing GVariant data in
+ * serialised form.  This is what would be sent over the network or
+ * what would end up on disk.
+ * </para>
+ * <para>
+ * The amount of memory required to store a boolean is 1 byte.  16,
+ * 32 and 64 bit integers and double precision floating point numbers
+ * use their "natural" size.  Strings (including object path and
+ * signature strings) are stored with a nul terminator, and as such
+ * use the length of the string plus 1 byte.
+ * </para>
+ * <para>
+ * Maybe types use no space at all to represent the null value and
+ * use the same amount of space (sometimes plus one byte) as the
+ * equivalent non-maybe-typed value to represent the non-null case.
+ * </para>
+ * <para>
+ * Arrays use the amount of space required to store each of their
+ * members, concatenated.  Additionally, if the items stored in an
+ * array are not of a fixed-size (ie: strings, other arrays, etc)
+ * then an additional framing offset is stored for each item.  The
+ * size of this offset is either 1, 2 or 4 bytes depending on the
+ * overall size of the container.  Additionally, extra padding bytes
+ * are added as required for alignment of child values.
+ * </para>
+ * <para>
+ * Tuples (including dictionary entries) use the amount of space
+ * required to store each of their members, concatenated, plus one
+ * framing offset (as per arrays) for each non-fixed-sized item in
+ * the tuple, except for the last one.  Additionally, extra padding
+ * bytes are added as required for alignment of child values.
+ * </para>
+ * <para>
+ * Variants use the same amount of space as the item inside of the
+ * variant, plus 1 byte, plus the length of the type string for the
+ * item inside the variant.
+ * </para>
+ * <para>
+ * As an example, consider a dictionary mapping strings to variants.
+ * In the case that the dictionary is empty, 0 bytes are required for
+ * the serialisation.
+ * </para>
+ * <para>
+ * If we add an item "width" that maps to the int32 value of 500 then
+ * we will use 4 byte to store the int32 (so 6 for the variant
+ * containing it) and 6 bytes for the string.  The variant must be
+ * aligned to 8 after the 6 bytes of the string, so that's 2 extra
+ * bytes.  6 (string) + 2 (padding) + 6 (variant) is 14 bytes used
+ * for the dictionary entry.  An additional 1 byte is added to the
+ * array as a framing offset making a total of 15 bytes.
+ * </para>
+ * <para>
+ * If we add another entry, "title" that maps to a nullable string
+ * that happens to have a value of null, then we use 0 bytes for the
+ * null value (and 3 bytes for the variant to contain it along with
+ * its type string) plus 6 bytes for the string.  Again, we need 2
+ * padding bytes.  That makes a total of 6 + 2 + 3 = 11 bytes.
+ * </para>
+ * <para>
+ * We now require extra padding between the two items in the array.
+ * After the 14 bytes of the first item, that's 2 bytes required.  We
+ * now require 2 framing offsets for an extra two bytes.  14 + 2 + 11
+ * + 2 = 29 bytes to encode the entire two-item dictionary.
+ * </para>
+ * </refsect3>
+ * <refsect3>
+ * <title>Type Information Cache</title>
+ * <para>
+ * For each GVariant type that currently exists in the program a type
+ * information structure is kept in the type information cache.  The
+ * type information structure is required for rapid deserialisation.
+ * </para>
+ * <para>
+ * Continuing with the above example, if a #GVariant exists with the
+ * type "a{sv}" then a type information struct will exist for
+ * "a{sv}", "{sv}", "s", and "v".  Multiple uses of the same type
+ * will share the same type information.  Additionally, all
+ * single-digit types are stored in read-only static memory and do
+ * not contribute to the writable memory footprint of a program using
+ * #GVariant.
+ * </para>
+ * <para>
+ * Aside from the type information structures stored in read-only
+ * memory, there are two forms of type information.  One is used for
+ * container types where there is a single element type: arrays and
+ * maybe types.  The other is used for container types where there
+ * are multiple element types: tuples and dictionary entries.
+ * </para>
+ * <para>
+ * Array type info structures are 6 * sizeof (void *), plus the
+ * memory required to store the type string itself.  This means that
+ * on 32bit systems, the cache entry for "a{sv}" would require 30
+ * bytes of memory (plus malloc overhead).
+ * </para>
+ * <para>
+ * Tuple type info structures are 6 * sizeof (void *), plus 4 *
+ * sizeof (void *) for each item in the tuple, plus the memory
+ * required to store the type string itself.  A 2-item tuple, for
+ * example, would have a type information structure that consumed
+ * writable memory in the size of 14 * sizeof (void *) (plus type
+ * string)  This means that on 32bit systems, the cache entry for
+ * "{sv}" would require 61 bytes of memory (plus malloc overhead).
+ * </para>
+ * <para>
+ * This means that in total, for our "a{sv}" example, 91 bytes of
+ * type information would be allocated.
+ * </para>
+ * <para>
+ * The type information cache, additionally, uses a #GHashTable to
+ * store and lookup the cached items and stores a pointer to this
+ * hash table in static storage.  The hash table is freed when there
+ * are zero items in the type cache.
+ * </para>
+ * <para>
+ * Although these sizes may seem large it is important to remember
+ * that a program will probably only have a very small number of
+ * different types of values in it and that only one type information
+ * structure is required for many different values of the same type.
+ * </para>
+ * </refsect3>
+ * <refsect3>
+ * <title>Buffer Management Memory</title>
+ * <para>
+ * #GVariant uses an internal buffer management structure to deal
+ * with the various different possible sources of serialised data
+ * that it uses.  The buffer is responsible for ensuring that the
+ * correct call is made when the data is no longer in use by
+ * #GVariant.  This may involve a g_free() or a g_slice_free() or
+ * even g_mapped_file_unref().
+ * </para>
+ * <para>
+ * One buffer management structure is used for each chunk of
+ * serialised data.  The size of the buffer management structure is 4
+ * * (void *).  On 32bit systems, that's 16 bytes.
+ * </para>
+ * </refsect3>
+ * <refsect3>
+ * <title>GVariant structure</title>
+ * <para>
+ * The size of a #GVariant structure is 6 * (void *).  On 32 bit
+ * systems, that's 24 bytes.
+ * </para>
+ * <para>
+ * #GVariant structures only exist if they are explicitly created
+ * with API calls.  For example, if a #GVariant is constructed out of
+ * serialised data for the example given above (with the dictionary)
+ * then although there are 9 individual values that comprise the
+ * entire dictionary (two keys, two values, two variants containing
+ * the values, two dictionary entries, plus the dictionary itself),
+ * only 1 #GVariant instance exists -- the one referring to the
+ * dictionary.
+ * </para>
+ * <para>
+ * If calls are made to start accessing the other values then
+ * #GVariant instances will exist for those values only for as long
+ * as they are in use (ie: until you call g_variant_unref()).  The
+ * type information is shared.  The serialised data and the buffer
+ * management structure for that serialised data is shared by the
+ * child.
+ * </para>
+ * </refsect3>
+ * <refsect3>
+ * <title>Summary</title>
+ * <para>
+ * To put the entire example together, for our dictionary mapping
+ * strings to variants (with two entries, as given above), we are
+ * using 91 bytes of memory for type information, 29 byes of memory
+ * for the serialised data, 16 bytes for buffer management and 24
+ * bytes for the #GVariant instance, or a total of 160 bytes, plus
+ * malloc overhead.  If we were to use g_variant_get_child_value() to
+ * access the two dictionary entries, we would use an additional 48
+ * bytes.  If we were to have other dictionaries of the same type, we
+ * would use more memory for the serialised data and buffer
+ * management for those dictionaries, but the type information would
+ * be shared.
+ * </para>
+ * </refsect3>
+ * </refsect2>
+ */
+
+
+/**
+ * SECTION:gvarianttype
+ * @title: GVariantType
+ * @short_description: introduction to the GVariant type system
+ * @see_also: #GVariantType, #GVariant
+ *
+ * This section introduces the GVariant type system.  It is based, in
+ * large part, on the D-Bus type system, with two major changes and some minor
+ * lifting of restrictions.  The <ulink
+ * url='http://dbus.freedesktop.org/doc/dbus-specification.html'>DBus
+ * specification</ulink>, therefore, provides a significant amount of
+ * information that is useful when working with GVariant.
+ *
+ * The first major change with respect to the D-Bus type system is the
+ * introduction of maybe (or "nullable") types.  Any type in GVariant can be
+ * converted to a maybe type, in which case, "nothing" (or "null") becomes a
+ * valid value.  Maybe types have been added by introducing the
+ * character "<literal>m</literal>" to type strings.
+ *
+ * The second major change is that the GVariant type system supports the
+ * concept of "indefinite types" -- types that are less specific than
+ * the normal types found in D-Bus.  For example, it is possible to speak
+ * of "an array of any type" in GVariant, where the D-Bus type system
+ * would require you to speak of "an array of integers" or "an array of
+ * strings".  Indefinite types have been added by introducing the
+ * characters "<literal>*</literal>", "<literal>?</literal>" and
+ * "<literal>r</literal>" to type strings.
+ *
+ * Finally, all arbitrary restrictions relating to the complexity of
+ * types are lifted along with the restriction that dictionary entries
+ * may only appear nested inside of arrays.
+ *
+ * Just as in D-Bus, GVariant types are described with strings ("type
+ * strings").  Subject to the differences mentioned above, these strings
+ * are of the same form as those found in DBus.  Note, however: D-Bus
+ * always works in terms of messages and therefore individual type
+ * strings appear nowhere in its interface.  Instead, "signatures"
+ * are a concatenation of the strings of the type of each argument in a
+ * message.  GVariant deals with single values directly so GVariant type
+ * strings always describe the type of exactly one value.  This means
+ * that a D-Bus signature string is generally not a valid GVariant type
+ * string -- except in the case that it is the signature of a message
+ * containing exactly one argument.
+ *
+ * An indefinite type is similar in spirit to what may be called an
+ * abstract type in other type systems.  No value can exist that has an
+ * indefinite type as its type, but values can exist that have types
+ * that are subtypes of indefinite types.  That is to say,
+ * g_variant_get_type() will never return an indefinite type, but
+ * calling g_variant_is_of_type() with an indefinite type may return
+ * %TRUE.  For example, you cannot have a value that represents "an
+ * array of no particular type", but you can have an "array of integers"
+ * which certainly matches the type of "an array of no particular type",
+ * since "array of integers" is a subtype of "array of no particular
+ * type".
+ *
+ * This is similar to how instances of abstract classes may not
+ * directly exist in other type systems, but instances of their
+ * non-abstract subtypes may.  For example, in GTK, no object that has
+ * the type of #GtkBin can exist (since #GtkBin is an abstract class),
+ * but a #GtkWindow can certainly be instantiated, and you would say
+ * that the #GtkWindow is a #GtkBin (since #GtkWindow is a subclass of
+ * #GtkBin).
+ *
+ * A detailed description of GVariant type strings is given here:
+ *
+ * <refsect2 id='gvariant-typestrings'>
+ * <title>GVariant Type Strings</title>
+ * <para>
+ * A GVariant type string can be any of the following:
+ * </para>
+ * <itemizedlist>
+ * <listitem>
+ * <para>
+ * any basic type string (listed below)
+ * </para>
+ * </listitem>
+ * <listitem>
+ * <para>
+ * "<literal>v</literal>", "<literal>r</literal>" or
+ * "<literal>*</literal>"
+ * </para>
+ * </listitem>
+ * <listitem>
+ * <para>
+ * one of the characters '<literal>a</literal>' or
+ * '<literal>m</literal>', followed by another type string
+ * </para>
+ * </listitem>
+ * <listitem>
+ * <para>
+ * the character '<literal>(</literal>', followed by a concatenation
+ * of zero or more other type strings, followed by the character
+ * '<literal>)</literal>'
+ * </para>
+ * </listitem>
+ * <listitem>
+ * <para>
+ * the character '<literal>{</literal>', followed by a basic type
+ * string (see below), followed by another type string, followed by
+ * the character '<literal>}</literal>'
+ * </para>
+ * </listitem>
+ * </itemizedlist>
+ * <para>
+ * A basic type string describes a basic type (as per
+ * g_variant_type_is_basic()) and is always a single
+ * character in length.  The valid basic type strings are
+ * "<literal>b</literal>", "<literal>y</literal>",
+ * "<literal>n</literal>", "<literal>q</literal>",
+ * "<literal>i</literal>", "<literal>u</literal>",
+ * "<literal>x</literal>", "<literal>t</literal>",
+ * "<literal>h</literal>", "<literal>d</literal>",
+ * "<literal>s</literal>", "<literal>o</literal>",
+ * "<literal>g</literal>" and "<literal>?</literal>".
+ * </para>
+ * <para>
+ * The above definition is recursive to arbitrary depth.
+ * "<literal>aaaaai</literal>" and "<literal>(ui(nq((y)))s)</literal>"
+ * are both valid type strings, as is
+ * "<literal>a(aa(ui)(qna{ya(yd)}))</literal>".
+ * </para>
+ * <para>
+ * The meaning of each of the characters is as follows:
+ * </para>
+ * <informaltable>
+ * <tgroup cols='2'>
+ * <tbody>
+ * <row>
+ * <entry>
+ * <para>
+ * <emphasis role='strong'>Character</emphasis>
+ * </para>
+ * </entry>
+ * <entry>
+ * <para>
+ * <emphasis role='strong'>Meaning</emphasis>
+ * </para>
+ * </entry>
+ * </row>
+ * <row>
+ * <entry>
+ * <para>
+ * <literal>b</literal>
+ * </para>
+ * </entry>
+ * <entry>
+ * <para>
+ * the type string of %G_VARIANT_TYPE_BOOLEAN; a boolean value.
+ * </para>
+ * </entry>
+ * </row>
+ * <row>
+ * <entry>
+ * <para>
+ * <literal>y</literal>
+ * </para>
+ * </entry>
+ * <entry>
+ * <para>
+ * the type string of %G_VARIANT_TYPE_BYTE; a byte.
+ * </para>
+ * </entry>
+ * </row>
+ * <row>
+ * <entry>
+ * <para>
+ * <literal>n</literal>
+ * </para>
+ * </entry>
+ * <entry>
+ * <para>
+ * the type string of %G_VARIANT_TYPE_INT16; a signed 16 bit
+ * integer.
+ * </para>
+ * </entry>
+ * </row>
+ * <row>
+ * <entry>
+ * <para>
+ * <literal>q</literal>
+ * </para>
+ * </entry>
+ * <entry>
+ * <para>
+ * the type string of %G_VARIANT_TYPE_UINT16; an unsigned 16 bit
+ * integer.
+ * </para>
+ * </entry>
+ * </row>
+ * <row>
+ * <entry>
+ * <para>
+ * <literal>i</literal>
+ * </para>
+ * </entry>
+ * <entry>
+ * <para>
+ * the type string of %G_VARIANT_TYPE_INT32; a signed 32 bit
+ * integer.
+ * </para>
+ * </entry>
+ * </row>
+ * <row>
+ * <entry>
+ * <para>
+ * <literal>u</literal>
+ * </para>
+ * </entry>
+ * <entry>
+ * <para>
+ * the type string of %G_VARIANT_TYPE_UINT32; an unsigned 32 bit
+ * integer.
+ * </para>
+ * </entry>
+ * </row>
+ * <row>
+ * <entry>
+ * <para>
+ * <literal>x</literal>
+ * </para>
+ * </entry>
+ * <entry>
+ * <para>
+ * the type string of %G_VARIANT_TYPE_INT64; a signed 64 bit
+ * integer.
+ * </para>
+ * </entry>
+ * </row>
+ * <row>
+ * <entry>
+ * <para>
+ * <literal>t</literal>
+ * </para>
+ * </entry>
+ * <entry>
+ * <para>
+ * the type string of %G_VARIANT_TYPE_UINT64; an unsigned 64 bit
+ * integer.
+ * </para>
+ * </entry>
+ * </row>
+ * <row>
+ * <entry>
+ * <para>
+ * <literal>h</literal>
+ * </para>
+ * </entry>
+ * <entry>
+ * <para>
+ * the type string of %G_VARIANT_TYPE_HANDLE; a signed 32 bit
+ * value that, by convention, is used as an index into an array
+ * of file descriptors that are sent alongside a D-Bus message.
+ * </para>
+ * </entry>
+ * </row>
+ * <row>
+ * <entry>
+ * <para>
+ * <literal>d</literal>
+ * </para>
+ * </entry>
+ * <entry>
+ * <para>
+ * the type string of %G_VARIANT_TYPE_DOUBLE; a double precision
+ * floating point value.
+ * </para>
+ * </entry>
+ * </row>
+ * <row>
+ * <entry>
+ * <para>
+ * <literal>s</literal>
+ * </para>
+ * </entry>
+ * <entry>
+ * <para>
+ * the type string of %G_VARIANT_TYPE_STRING; a string.
+ * </para>
+ * </entry>
+ * </row>
+ * <row>
+ * <entry>
+ * <para>
+ * <literal>o</literal>
+ * </para>
+ * </entry>
+ * <entry>
+ * <para>
+ * the type string of %G_VARIANT_TYPE_OBJECT_PATH; a string in
+ * the form of a D-Bus object path.
+ * </para>
+ * </entry>
+ * </row>
+ * <row>
+ * <entry>
+ * <para>
+ * <literal>g</literal>
+ * </para>
+ * </entry>
+ * <entry>
+ * <para>
+ * the type string of %G_VARIANT_TYPE_STRING; a string in the
+ * form of a D-Bus type signature.
+ * </para>
+ * </entry>
+ * </row>
+ * <row>
+ * <entry>
+ * <para>
+ * <literal>?</literal>
+ * </para>
+ * </entry>
+ * <entry>
+ * <para>
+ * the type string of %G_VARIANT_TYPE_BASIC; an indefinite type
+ * that is a supertype of any of the basic types.
+ * </para>
+ * </entry>
+ * </row>
+ * <row>
+ * <entry>
+ * <para>
+ * <literal>v</literal>
+ * </para>
+ * </entry>
+ * <entry>
+ * <para>
+ * the type string of %G_VARIANT_TYPE_VARIANT; a container type
+ * that contain any other type of value.
+ * </para>
+ * </entry>
+ * </row>
+ * <row>
+ * <entry>
+ * <para>
+ * <literal>a</literal>
+ * </para>
+ * </entry>
+ * <entry>
+ * <para>
+ * used as a prefix on another type string to mean an array of
+ * that type; the type string "<literal>ai</literal>", for
+ * example, is the type of an array of 32 bit signed integers.
+ * </para>
+ * </entry>
+ * </row>
+ * <row>
+ * <entry>
+ * <para>
+ * <literal>m</literal>
+ * </para>
+ * </entry>
+ * <entry>
+ * <para>
+ * used as a prefix on another type string to mean a "maybe", or
+ * "nullable", version of that type; the type string
+ * "<literal>ms</literal>", for example, is the type of a value
+ * that maybe contains a string, or maybe contains nothing.
+ * </para>
+ * </entry>
+ * </row>
+ * <row>
+ * <entry>
+ * <para>
+ * <literal>()</literal>
+ * </para>
+ * </entry>
+ * <entry>
+ * <para>
+ * used to enclose zero or more other concatenated type strings
+ * to create a tuple type; the type string
+ * "<literal>(is)</literal>", for example, is the type of a pair
+ * of an integer and a string.
+ * </para>
+ * </entry>
+ * </row>
+ * <row>
+ * <entry>
+ * <para>
+ * <literal>r</literal>
+ * </para>
+ * </entry>
+ * <entry>
+ * <para>
+ * the type string of %G_VARIANT_TYPE_TUPLE; an indefinite type
+ * that is a supertype of any tuple type, regardless of the
+ * number of items.
+ * </para>
+ * </entry>
+ * </row>
+ * <row>
+ * <entry>
+ * <para>
+ * <literal>{}</literal>
+ * </para>
+ * </entry>
+ * <entry>
+ * <para>
+ * used to enclose a basic type string concatenated with another
+ * type string to create a dictionary entry type, which usually
+ * appears inside of an array to form a dictionary; the type
+ * string "<literal>a{sd}</literal>", for example, is the type of
+ * a dictionary that maps strings to double precision floating
+ * point values.
+ * </para>
+ * <para>
+ * The first type (the basic type) is the key type and the second
+ * type is the value type.  The reason that the first type is
+ * restricted to being a basic type is so that it can easily be
+ * hashed.
+ * </para>
+ * </entry>
+ * </row>
+ * <row>
+ * <entry>
+ * <para>
+ * <literal>*</literal>
+ * </para>
+ * </entry>
+ * <entry>
+ * <para>
+ * the type string of %G_VARIANT_TYPE_ANY; the indefinite type
+ * that is a supertype of all types.  Note that, as with all type
+ * strings, this character represents exactly one type.  It
+ * cannot be used inside of tuples to mean "any number of items".
+ * </para>
+ * </entry>
+ * </row>
+ * </tbody>
+ * </tgroup>
+ * </informaltable>
+ * <para>
+ * Any type string of a container that contains an indefinite type is,
+ * itself, an indefinite type.  For example, the type string
+ * "<literal>a*</literal>" (corresponding to %G_VARIANT_TYPE_ARRAY) is
+ * an indefinite type that is a supertype of every array type.
+ * "<literal>(*s)</literal>" is a supertype of all tuples that
+ * contain exactly two items where the second item is a string.
+ * </para>
+ * <para>
+ * "<literal>a{?*}</literal>" is an indefinite type that is a
+ * supertype of all arrays containing dictionary entries where the key
+ * is any basic type and the value is any type at all.  This is, by
+ * definition, a dictionary, so this type string corresponds to
+ * %G_VARIANT_TYPE_DICTIONARY.  Note that, due to the restriction that
+ * the key of a dictionary entry must be a basic type,
+ * "<literal>{**}</literal>" is not a valid type string.
+ * </para>
+ * </refsect2>
+ */
+
+
+/**
+ * SECTION:hash_tables
+ * @title: Hash Tables
+ * @short_description: associations between keys and values so that given a key the value can be found quickly
+ *
+ * A #GHashTable provides associations between keys and values which is
+ * optimized so that given a key, the associated value can be found
+ * very quickly.
+ *
+ * Note that neither keys nor values are copied when inserted into the
+ * #GHashTable, so they must exist for the lifetime of the #GHashTable.
+ * This means that the use of static strings is OK, but temporary
+ * strings (i.e. those created in buffers and those returned by GTK+
+ * widgets) should be copied with g_strdup() before being inserted.
+ *
+ * If keys or values are dynamically allocated, you must be careful to
+ * ensure that they are freed when they are removed from the
+ * #GHashTable, and also when they are overwritten by new insertions
+ * into the #GHashTable. It is also not advisable to mix static strings
+ * and dynamically-allocated strings in a #GHashTable, because it then
+ * becomes difficult to determine whether the string should be freed.
+ *
+ * To create a #GHashTable, use g_hash_table_new().
+ *
+ * To insert a key and value into a #GHashTable, use
+ * g_hash_table_insert().
+ *
+ * To lookup a value corresponding to a given key, use
+ * g_hash_table_lookup() and g_hash_table_lookup_extended().
+ *
+ * g_hash_table_lookup_extended() can also be used to simply
+ * check if a key is present in the hash table.
+ *
+ * To remove a key and value, use g_hash_table_remove().
+ *
+ * To call a function for each key and value pair use
+ * g_hash_table_foreach() or use a iterator to iterate over the
+ * key/value pairs in the hash table, see #GHashTableIter.
+ *
+ * To destroy a #GHashTable use g_hash_table_destroy().
+ *
+ * <example>
+ * <title>Using a GHashTable as a set</title>
+ * <para>
+ * A common use-case for hash tables is to store information about
+ * a set of keys, without associating any particular value with each
+ * key. GHashTable optimizes one way of doing so: If you store only
+ * key-value pairs where key == value, then GHashTable does not
+ * allocate memory to store the values, which can be a considerable
+ * space saving, if your set is large.
+ * </para>
+ * <programlisting>
+ * GHashTable *
+ * set_new (GHashFunc      hash_func,
+ * GEqualFunc     equal_func,
+ * GDestroyNotify destroy)
+ * {
+ * return g_hash_table_new_full (hash_func, equal_func, destroy, NULL);
+ * }
+ *
+ * void
+ * set_add (GHashTable *set,
+ * gpointer    element)
+ * {
+ * g_hash_table_replace (set, element, element);
+ * }
+ *
+ * gboolean
+ * set_contains (GHashTable *set,
+ * gpointer    element)
+ * {
+ * return g_hash_table_lookup_extended (set, element, NULL, NULL);
+ * }
+ *
+ * gboolean
+ * set_remove (GHashTable *set,
+ * gpointer    element)
+ * {
+ * return g_hash_table_remove (set, element);
+ * }
+ * </programlisting>
+ * </example>
+ *
+ * As of version 2.32, there is also a g_hash_table_add() function to
+ * add a key to a #GHashTable that is being used as a set.
+ */
+
+
+/**
+ * SECTION:hmac
+ * @title: Secure HMAC Digests
+ * @short_description: computes the HMAC for data
+ *
+ * HMACs should be used when producing a cookie or hash based on data
+ * and a key. Simple mechanisms for using SHA1 and other algorithms to
+ * digest a key and data together are vulnerable to various security
+ * issues. <ulink url="http://en.wikipedia.org/wiki/HMAC">HMAC</ulink>
+ * uses algorithms like SHA1 in a secure way to produce a digest of a
+ * key and data.
+ *
+ * Both the key and data are arbitrary byte arrays of bytes or characters.
+ *
+ * Support for HMAC Digests has been added in GLib 2.30.
+ */
+
+
+/**
+ * SECTION:hooks
+ * @title: Hook Functions
+ * @short_description: support for manipulating lists of hook functions
+ *
+ * The #GHookList, #GHook and their related functions provide support for
+ * lists of hook functions. Functions can be added and removed from the lists,
+ * and the list of hook functions can be invoked.
+ */
+
+
+/**
+ * SECTION:i18n
+ * @title: Internationalization
+ * @short_description: gettext support macros
+ * @see_also: the gettext manual
+ *
+ * GLib doesn't force any particular localization method upon its users.
+ * But since GLib itself is localized using the gettext() mechanism, it seems
+ * natural to offer the de-facto standard gettext() support macros in an
+ * easy-to-use form.
+ *
+ * In order to use these macros in an application, you must include
+ * <filename>glib/gi18n.h</filename>. For use in a library, must include
+ * <filename>glib/gi18n-lib.h</filename> <emphasis>after</emphasis> defining
+ * the GETTEXT_PACKAGE macro suitably for your library:
+ * |[
+ * &num;define GETTEXT_PACKAGE "gtk20"
+ * &num;include &lt;glib/gi18n-lib.h&gt;
+ * ]|
+ * Note that you also have to call setlocale() and textdomain() (as well as
+ * bindtextdomain() and bind_textdomain_codeset()) early on in your main()
+ * to make gettext() work.
+ *
+ * The gettext manual covers details of how to set up message extraction
+ * with xgettext.
+ */
+
+
+/**
+ * SECTION:iochannels
+ * @title: IO Channels
+ * @short_description: portable support for using files, pipes and sockets
+ * @see_also: <para> <variablelist> <varlistentry> <term>g_io_add_watch(), g_io_add_watch_full(), g_source_remove()</term> <listitem><para> Convenience functions for creating #GIOChannel instances and adding them to the <link linkend="glib-The-Main-Event-Loop">main event loop</link>. </para></listitem> </varlistentry> </variablelist> </para>
+ *
+ * The #GIOChannel data type aims to provide a portable method for
+ * using file descriptors, pipes, and sockets, and integrating them
+ * into the <link linkend="glib-The-Main-Event-Loop">main event
+ * loop</link>. Currently full support is available on UNIX platforms,
+ * support for Windows is only partially complete.
+ *
+ * To create a new #GIOChannel on UNIX systems use
+ * g_io_channel_unix_new(). This works for plain file descriptors,
+ * pipes and sockets. Alternatively, a channel can be created for a
+ * file in a system independent manner using g_io_channel_new_file().
+ *
+ * Once a #GIOChannel has been created, it can be used in a generic
+ * manner with the functions g_io_channel_read_chars(),
+ * g_io_channel_write_chars(), g_io_channel_seek_position(), and
+ * g_io_channel_shutdown().
+ *
+ * To add a #GIOChannel to the <link
+ * linkend="glib-The-Main-Event-Loop">main event loop</link> use
+ * g_io_add_watch() or g_io_add_watch_full(). Here you specify which
+ * events you are interested in on the #GIOChannel, and provide a
+ * function to be called whenever these events occur.
+ *
+ * #GIOChannel instances are created with an initial reference count of
+ * 1. g_io_channel_ref() and g_io_channel_unref() can be used to
+ * increment or decrement the reference count respectively. When the
+ * reference count falls to 0, the #GIOChannel is freed. (Though it
+ * isn't closed automatically, unless it was created using
+ * g_io_channel_new_file().) Using g_io_add_watch() or
+ * g_io_add_watch_full() increments a channel's reference count.
+ *
+ * The new functions g_io_channel_read_chars(),
+ * g_io_channel_read_line(), g_io_channel_read_line_string(),
+ * g_io_channel_read_to_end(), g_io_channel_write_chars(),
+ * g_io_channel_seek_position(), and g_io_channel_flush() should not be
+ * mixed with the deprecated functions g_io_channel_read(),
+ * g_io_channel_write(), and g_io_channel_seek() on the same channel.
+ */
+
+
+/**
+ * SECTION:keyfile
+ * @title: Key-value file parser
+ * @short_description: parses .ini-like config files
+ *
+ * #GKeyFile lets you parse, edit or create files containing groups of
+ * key-value pairs, which we call <firstterm>key files</firstterm> for
+ * lack of a better name. Several freedesktop.org specifications use
+ * key files now, e.g the
+ * <ulink url="http://freedesktop.org/Standards/desktop-entry-spec">Desktop
+ * Entry Specification</ulink> and the
+ * <ulink url="http://freedesktop.org/Standards/icon-theme-spec">Icon
+ * Theme Specification</ulink>.
+ *
+ * The syntax of key files is described in detail in the
+ * <ulink url="http://freedesktop.org/Standards/desktop-entry-spec">Desktop
+ * Entry Specification</ulink>, here is a quick summary: Key files
+ * consists of groups of key-value pairs, interspersed with comments.
+ *
+ * |[
+ * # this is just an example
+ * # there can be comments before the first group
+ *
+ * [First Group]
+ *
+ * Name=Key File Example\tthis value shows\nescaping
+ *
+ * # localized strings are stored in multiple key-value pairs
+ * Welcome=Hello
+ * Welcome[de]=Hallo
+ * Welcome[fr_FR]=Bonjour
+ * Welcome[it]=Ciao
+ * Welcome[be@latin]=Hello
+ *
+ * [Another Group]
+ *
+ * Numbers=2;20;-200;0
+ *
+ * Booleans=true;false;true;true
+ * ]|
+ *
+ * Lines beginning with a '#' and blank lines are considered comments.
+ *
+ * Groups are started by a header line containing the group name enclosed
+ * in '[' and ']', and ended implicitly by the start of the next group or
+ * the end of the file. Each key-value pair must be contained in a group.
+ *
+ * Key-value pairs generally have the form <literal>key=value</literal>,
+ * with the exception of localized strings, which have the form
+ * <literal>key[locale]=value</literal>, with a locale identifier of the
+ * form <literal>lang_COUNTRY@MODIFIER</literal> where
+ * <literal>COUNTRY</literal> and <literal>MODIFIER</literal> are optional.
+ * Space before and after the '=' character are ignored. Newline, tab,
+ * carriage return and backslash characters in value are escaped as \n,
+ * \t, \r, and \\, respectively. To preserve leading spaces in values,
+ * these can also be escaped as \s.
+ *
+ * Key files can store strings (possibly with localized variants), integers,
+ * booleans and lists of these. Lists are separated by a separator character,
+ * typically ';' or ','. To use the list separator character in a value in
+ * a list, it has to be escaped by prefixing it with a backslash.
+ *
+ * This syntax is obviously inspired by the .ini files commonly met
+ * on Windows, but there are some important differences:
+ * <itemizedlist>
+ * <listitem>.ini files use the ';' character to begin comments,
+ * key files use the '#' character.</listitem>
+ * <listitem>Key files do not allow for ungrouped keys meaning only
+ * comments can precede the first group.</listitem>
+ * <listitem>Key files are always encoded in UTF-8.</listitem>
+ * <listitem>Key and Group names are case-sensitive. For example, a
+ * group called <literal>[GROUP]</literal> is a different from
+ * <literal>[group]</literal>.</listitem>
+ * <listitem>.ini files don't have a strongly typed boolean entry type,
+ * they only have GetProfileInt(). In key files, only
+ * <literal>true</literal> and <literal>false</literal> (in lower case)
+ * are allowed.</listitem>
+ * </itemizedlist>
+ *
+ * Note that in contrast to the
+ * <ulink url="http://freedesktop.org/Standards/desktop-entry-spec">Desktop
+ * Entry Specification</ulink>, groups in key files may contain the same
+ * key multiple times; the last entry wins. Key files may also contain
+ * multiple groups with the same name; they are merged together.
+ * Another difference is that keys and group names in key files are not
+ * restricted to ASCII characters.
+ */
+
+
+/**
+ * SECTION:linked_lists_double
+ * @title: Doubly-Linked Lists
+ * @short_description: linked lists that can be iterated over in both directions
+ *
+ * The #GList structure and its associated functions provide a standard
+ * doubly-linked list data structure.
+ *
+ * Each element in the list contains a piece of data, together with
+ * pointers which link to the previous and next elements in the list.
+ * Using these pointers it is possible to move through the list in both
+ * directions (unlike the <link
+ * linkend="glib-Singly-Linked-Lists">Singly-Linked Lists</link> which
+ * only allows movement through the list in the forward direction).
+ *
+ * The data contained in each element can be either integer values, by
+ * using one of the <link linkend="glib-Type-Conversion-Macros">Type
+ * Conversion Macros</link>, or simply pointers to any type of data.
+ *
+ * List elements are allocated from the <link
+ * linkend="glib-Memory-Slices">slice allocator</link>, which is more
+ * efficient than allocating elements individually.
+ *
+ * Note that most of the #GList functions expect to be passed a pointer
+ * to the first element in the list. The functions which insert
+ * elements return the new start of the list, which may have changed.
+ *
+ * There is no function to create a #GList. %NULL is considered to be
+ * the empty list so you simply set a #GList* to %NULL.
+ *
+ * To add elements, use g_list_append(), g_list_prepend(),
+ * g_list_insert() and g_list_insert_sorted().
+ *
+ * To remove elements, use g_list_remove().
+ *
+ * To find elements in the list use g_list_first(), g_list_last(),
+ * g_list_next(), g_list_previous(), g_list_nth(), g_list_nth_data(),
+ * g_list_find() and g_list_find_custom().
+ *
+ * To find the index of an element use g_list_position() and
+ * g_list_index().
+ *
+ * To call a function for each element in the list use g_list_foreach().
+ *
+ * To free the entire list, use g_list_free().
+ */
+
+
+/**
+ * SECTION:linked_lists_single
+ * @title: Singly-Linked Lists
+ * @short_description: linked lists that can be iterated in one direction
+ *
+ * The #GSList structure and its associated functions provide a
+ * standard singly-linked list data structure.
+ *
+ * Each element in the list contains a piece of data, together with a
+ * pointer which links to the next element in the list. Using this
+ * pointer it is possible to move through the list in one direction
+ * only (unlike the <link
+ * linkend="glib-Doubly-Linked-Lists">Doubly-Linked Lists</link> which
+ * allow movement in both directions).
+ *
+ * The data contained in each element can be either integer values, by
+ * using one of the <link linkend="glib-Type-Conversion-Macros">Type
+ * Conversion Macros</link>, or simply pointers to any type of data.
+ *
+ * List elements are allocated from the <link
+ * linkend="glib-Memory-Slices">slice allocator</link>, which is more
+ * efficient than allocating elements individually.
+ *
+ * Note that most of the #GSList functions expect to be passed a
+ * pointer to the first element in the list. The functions which insert
+ * elements return the new start of the list, which may have changed.
+ *
+ * There is no function to create a #GSList. %NULL is considered to be
+ * the empty list so you simply set a #GSList* to %NULL.
+ *
+ * To add elements, use g_slist_append(), g_slist_prepend(),
+ * g_slist_insert() and g_slist_insert_sorted().
+ *
+ * To remove elements, use g_slist_remove().
+ *
+ * To find elements in the list use g_slist_last(), g_slist_next(),
+ * g_slist_nth(), g_slist_nth_data(), g_slist_find() and
+ * g_slist_find_custom().
+ *
+ * To find the index of an element use g_slist_position() and
+ * g_slist_index().
+ *
+ * To call a function for each element in the list use
+ * g_slist_foreach().
+ *
+ * To free the entire list, use g_slist_free().
+ */
+
+
+/**
+ * SECTION:macros
+ * @title: Standard Macros
+ * @short_description: commonly-used macros
+ *
+ * These macros provide a few commonly-used features.
+ */
+
+
+/**
+ * SECTION:macros_misc
+ * @title: Miscellaneous Macros
+ * @short_description: specialized macros which are not used often
+ *
+ * These macros provide more specialized features which are not
+ * needed so often by application programmers.
+ */
+
+
+/**
+ * SECTION:main
+ * @title: The Main Event Loop
+ * @short_description: manages all available sources of events
+ *
+ * The main event loop manages all the available sources of events for
+ * GLib and GTK+ applications. These events can come from any number of
+ * different types of sources such as file descriptors (plain files,
+ * pipes or sockets) and timeouts. New types of event sources can also
+ * be added using g_source_attach().
+ *
+ * To allow multiple independent sets of sources to be handled in
+ * different threads, each source is associated with a #GMainContext.
+ * A GMainContext can only be running in a single thread, but
+ * sources can be added to it and removed from it from other threads.
+ *
+ * Each event source is assigned a priority. The default priority,
+ * #G_PRIORITY_DEFAULT, 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.
+ *
+ * Idle functions can also be added, and assigned a priority. These will
+ * be run whenever no events with a higher priority are ready to be processed.
+ *
+ * The #GMainLoop data type represents a main event loop. A GMainLoop is
+ * created with g_main_loop_new(). After adding the initial event sources,
+ * g_main_loop_run() 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 g_main_loop_quit() to
+ * exit the main loop, and g_main_loop_run() returns.
+ *
+ * It is possible to create new instances of #GMainLoop recursively.
+ * This is often used in GTK+ applications when showing modal dialog
+ * boxes. Note that event sources are associated with a particular
+ * #GMainContext, and will be checked and dispatched for all main
+ * loops associated with that GMainContext.
+ *
+ * GTK+ contains wrappers of some of these functions, e.g. gtk_main(),
+ * gtk_main_quit() and gtk_events_pending().
+ *
+ * <refsect2><title>Creating new source types</title>
+ * <para>One of the unusual features of the #GMainLoop functionality
+ * is that new types of event source can be created and used in
+ * addition to the builtin type of event source. A new event source
+ * type is used for handling GDK events. A new source type is created
+ * by <firstterm>deriving</firstterm> from the #GSource structure.
+ * The derived type of source is represented by a structure that has
+ * the #GSource structure as a first element, and other elements specific
+ * to the new source type. To create an instance of the new source type,
+ * call g_source_new() passing in the size of the derived structure and
+ * a table of functions. These #GSourceFuncs determine the behavior of
+ * the new source type.</para>
+ * <para>New source types basically interact with the main context
+ * in two ways. Their prepare function in #GSourceFuncs can set a timeout
+ * to determine the maximum amount of time that the main loop will sleep
+ * before checking the source again. In addition, or as well, the source
+ * can add file descriptors to the set that the main context checks using
+ * g_source_add_poll().</para>
+ * </refsect2>
+ * <refsect2><title>Customizing the main loop iteration</title>
+ * <para>Single iterations of a #GMainContext can be run with
+ * g_main_context_iteration(). In some cases, more detailed control
+ * of exactly how the details of the main loop work is desired, for
+ * instance, when integrating the #GMainLoop with an external main loop.
+ * In such cases, you can call the component functions of
+ * g_main_context_iteration() directly. These functions are
+ * g_main_context_prepare(), g_main_context_query(),
+ * g_main_context_check() and g_main_context_dispatch().</para>
+ * <para>The operation of these functions can best be seen in terms
+ * of a state diagram, as shown in <xref linkend="mainloop-states"/>.</para>
+ * <figure id="mainloop-states"><title>States of a Main Context</title>
+ * <graphic fileref="mainloop-states.gif" format="GIF"></graphic>
+ * </figure>
+ * </refsect2>
+ *
+ * On Unix, the GLib mainloop is incompatible with fork().  Any program
+ * using the mainloop must either exec() or exit() from the child
+ * without returning to the mainloop.
+ */
+
+
+/**
+ * SECTION:markup
+ * @Title: Simple XML Subset Parser
+ * @Short_description: parses a subset of XML
+ * @See_also: <ulink url="http://www.w3.org/TR/REC-xml/">XML Specification</ulink>
+ *
+ * The "GMarkup" parser is intended to parse a simple markup format
+ * that's a subset of XML. This is a small, efficient, easy-to-use
+ * parser. It should not be used if you expect to interoperate with
+ * other applications generating full-scale XML. However, it's very
+ * useful for application data files, config files, etc. where you
+ * know your application will be the only one writing the file.
+ * Full-scale XML parsers should be able to parse the subset used by
+ * GMarkup, so you can easily migrate to full-scale XML at a later
+ * time if the need arises.
+ *
+ * GMarkup is not guaranteed to signal an error on all invalid XML;
+ * the parser may accept documents that an XML parser would not.
+ * However, XML documents which are not well-formed<footnote
+ * id="wellformed">Being wellformed is a weaker condition than being
+ * valid. See the <ulink url="http://www.w3.org/TR/REC-xml/">XML
+ * specification</ulink> for definitions of these terms.</footnote>
+ * are not considered valid GMarkup documents.
+ *
+ * Simplifications to XML include:
+ * <itemizedlist>
+ * <listitem>Only UTF-8 encoding is allowed</listitem>
+ * <listitem>No user-defined entities</listitem>
+ * <listitem>Processing instructions, comments and the doctype declaration
+ * are "passed through" but are not interpreted in any way</listitem>
+ * <listitem>No DTD or validation.</listitem>
+ * </itemizedlist>
+ *
+ * The markup format does support:
+ * <itemizedlist>
+ * <listitem>Elements</listitem>
+ * <listitem>Attributes</listitem>
+ * <listitem>5 standard entities:
+ * <literal>&amp;amp; &amp;lt; &amp;gt; &amp;quot; &amp;apos;</literal>
+ * </listitem>
+ * <listitem>Character references</listitem>
+ * <listitem>Sections marked as CDATA</listitem>
+ * </itemizedlist>
+ */
+
+
+/**
+ * SECTION:memory
+ * @Short_Description: general memory-handling
+ * @Title: Memory Allocation
+ *
+ * These functions provide support for allocating and freeing memory.
+ *
+ * <note>
+ * If any call to allocate memory fails, the application is terminated.
+ * This also means that there is no need to check if the call succeeded.
+ * </note>
+ *
+ * <note>
+ * It's important to match g_malloc() with g_free(), plain malloc() with free(),
+ * and (if you're using C++) new with delete and new[] with delete[]. Otherwise
+ * bad things can happen, since these allocators may use different memory
+ * pools (and new/delete call constructors and destructors). See also
+ * g_mem_set_vtable().
+ * </note>
+ */
+
+
+/**
+ * SECTION:memory_slices
+ * @title: Memory Slices
+ * @short_description: efficient way to allocate groups of equal-sized chunks of memory
+ *
+ * Memory slices provide a space-efficient and multi-processing scalable
+ * way to allocate equal-sized pieces of memory, just like the original
+ * #GMemChunks (from GLib 2.8), while avoiding their excessive
+ * memory-waste, scalability and performance problems.
+ *
+ * To achieve these goals, the slice allocator uses a sophisticated,
+ * layered design that has been inspired by Bonwick's slab allocator
+ * <footnote><para>
+ * <ulink url="http://citeseer.ist.psu.edu/bonwick94slab.html">[Bonwick94]</ulink> Jeff Bonwick, The slab allocator: An object-caching kernel
+ * memory allocator. USENIX 1994, and
+ * <ulink url="http://citeseer.ist.psu.edu/bonwick01magazines.html">[Bonwick01]</ulink> Bonwick and Jonathan Adams, Magazines and vmem: Extending the
+ * slab allocator to many cpu's and arbitrary resources. USENIX 2001
+ * </para></footnote>.
+ * It uses posix_memalign() to optimize allocations of many equally-sized
+ * chunks, and has per-thread free lists (the so-called magazine layer)
+ * to quickly satisfy allocation requests of already known structure sizes.
+ * This is accompanied by extra caching logic to keep freed memory around
+ * for some time before returning it to the system. Memory that is unused
+ * due to alignment constraints is used for cache colorization (random
+ * distribution of chunk addresses) to improve CPU cache utilization. The
+ * caching layer of the slice allocator adapts itself to high lock contention
+ * to improve scalability.
+ *
+ * The slice allocator can allocate blocks as small as two pointers, and
+ * unlike malloc(), it does not reserve extra space per block. For large block
+ * sizes, g_slice_new() and g_slice_alloc() will automatically delegate to the
+ * system malloc() implementation. For newly written code it is recommended
+ * to use the new <literal>g_slice</literal> API instead of g_malloc() and
+ * friends, as long as objects are not resized during their lifetime and the
+ * object size used at allocation time is still available when freeing.
+ *
+ * <example>
+ * <title>Using the slice allocator</title>
+ * <programlisting>
+ * gchar *mem[10000];
+ * gint i;
+ *
+ * /&ast; Allocate 10000 blocks. &ast;/
+ * for (i = 0; i &lt; 10000; i++)
+ * {
+ * mem[i] = g_slice_alloc (50);
+ *
+ * /&ast; Fill in the memory with some junk. &ast;/
+ * for (j = 0; j &lt; 50; j++)
+ * mem[i][j] = i * j;
+ * }
+ *
+ * /&ast; Now free all of the blocks. &ast;/
+ * for (i = 0; i &lt; 10000; i++)
+ * {
+ * g_slice_free1 (50, mem[i]);
+ * }
+ * </programlisting></example>
+ *
+ * <example>
+ * <title>Using the slice allocator with data structures</title>
+ * <programlisting>
+ * GRealArray *array;
+ *
+ * /&ast; Allocate one block, using the g_slice_new() macro. &ast;/
+ * array = g_slice_new (GRealArray);
+ * /&ast; We can now use array just like a normal pointer to a structure. &ast;/
+ * array->data            = NULL;
+ * array->len             = 0;
+ * array->alloc           = 0;
+ * array->zero_terminated = (zero_terminated ? 1 : 0);
+ * array->clear           = (clear ? 1 : 0);
+ * array->elt_size        = elt_size;
+ *
+ * /&ast; We can free the block, so it can be reused. &ast;/
+ * g_slice_free (GRealArray, array);
+ * </programlisting></example>
+ */
+
+
+/**
+ * SECTION:messages
+ * @title: Message Logging
+ * @short_description: versatile support for logging messages with different levels of importance
+ *
+ * These functions provide support for logging error messages
+ * or messages used for debugging.
+ *
+ * There are several built-in levels of messages, defined in
+ * #GLogLevelFlags. These can be extended with user-defined levels.
+ */
+
+
+/**
+ * SECTION:misc_utils
+ * @title: Miscellaneous Utility Functions
+ * @short_description: a selection of portable utility functions
+ *
+ * These are portable utility functions.
+ */
+
+
+/**
+ * SECTION:numerical
+ * @title: Numerical Definitions
+ * @short_description: mathematical constants, and floating point decomposition
+ *
+ * GLib offers mathematical constants such as #G_PI for the value of pi;
+ * many platforms have these in the C library, but some don't, the GLib
+ * versions always exist.
+ *
+ * The #GFloatIEEE754 and #GDoubleIEEE754 unions are used to access the
+ * sign, mantissa and exponent of IEEE floats and doubles. These unions are
+ * defined as appropriate for a given platform. IEEE floats and doubles are
+ * supported (used for storage) by at least Intel, PPC and Sparc. See
+ * <ulink url="http://en.wikipedia.org/wiki/IEEE_float">IEEE 754-2008</ulink>
+ * for more information about IEEE number formats.
+ */
+
+
+/**
+ * SECTION:option
+ * @Short_description: parses commandline options
+ * @Title: Commandline option parser
+ *
+ * The GOption commandline parser is intended to be a simpler replacement
+ * for the popt library. It supports short and long commandline options,
+ * as shown in the following example:
+ *
+ * <literal>testtreemodel -r 1 --max-size 20 --rand --display=:1.0 -vb -- file1 file2</literal>
+ *
+ * The example demonstrates a number of features of the GOption
+ * commandline parser
+ * <itemizedlist><listitem><para>
+ * Options can be single letters, prefixed by a single dash. Multiple
+ * short options can be grouped behind a single dash.
+ * </para></listitem><listitem><para>
+ * Long options are prefixed by two consecutive dashes.
+ * </para></listitem><listitem><para>
+ * Options can have an extra argument, which can be a number, a string or
+ * a filename. For long options, the extra argument can be appended with
+ * an equals sign after the option name, which is useful if the extra
+ * argument starts with a dash, which would otherwise cause it to be
+ * interpreted as another option.
+ * </para></listitem><listitem><para>
+ * Non-option arguments are returned to the application as rest arguments.
+ * </para></listitem><listitem><para>
+ * An argument consisting solely of two dashes turns off further parsing,
+ * any remaining arguments (even those starting with a dash) are returned
+ * to the application as rest arguments.
+ * </para></listitem></itemizedlist>
+ *
+ * Another important feature of GOption is that it can automatically
+ * generate nicely formatted help output. Unless it is explicitly turned
+ * off with g_option_context_set_help_enabled(), GOption will recognize
+ * the <option>--help</option>, <option>-?</option>,
+ * <option>--help-all</option> and
+ * <option>--help-</option><replaceable>groupname</replaceable> options
+ * (where <replaceable>groupname</replaceable> is the name of a
+ * #GOptionGroup) and write a text similar to the one shown in the
+ * following example to stdout.
+ *
+ * <informalexample><screen>
+ * Usage:
+ * testtreemodel [OPTION...] - test tree model performance
+ *
+ * Help Options:
+ * -h, --help               Show help options
+ * --help-all               Show all help options
+ * --help-gtk               Show GTK+ Options
+ *
+ * Application Options:
+ * -r, --repeats=N          Average over N repetitions
+ * -m, --max-size=M         Test up to 2^M items
+ * --display=DISPLAY        X display to use
+ * -v, --verbose            Be verbose
+ * -b, --beep               Beep when done
+ * --rand                   Randomize the data
+ * </screen></informalexample>
+ *
+ * GOption groups options in #GOptionGroup<!-- -->s, which makes it easy to
+ * incorporate options from multiple sources. The intended use for this is
+ * to let applications collect option groups from the libraries it uses,
+ * add them to their #GOptionContext, and parse all options by a single call
+ * to g_option_context_parse(). See gtk_get_option_group() for an example.
+ *
+ * If an option is declared to be of type string or filename, GOption takes
+ * care of converting it to the right encoding; strings are returned in
+ * UTF-8, filenames are returned in the GLib filename encoding. Note that
+ * this only works if setlocale() has been called before
+ * g_option_context_parse().
+ *
+ * Here is a complete example of setting up GOption to parse the example
+ * commandline above and produce the example help output.
+ *
+ * <informalexample><programlisting>
+ * static gint repeats = 2;
+ * static gint max_size = 8;
+ * static gboolean verbose = FALSE;
+ * static gboolean beep = FALSE;
+ * static gboolean rand = FALSE;
+ *
+ * static GOptionEntry entries[] =
+ * {
+ * { "repeats", 'r', 0, G_OPTION_ARG_INT, &repeats, "Average over N repetitions", "N" },
+ * { "max-size", 'm', 0, G_OPTION_ARG_INT, &max_size, "Test up to 2^M items", "M" },
+ * { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, "Be verbose", NULL },
+ * { "beep", 'b', 0, G_OPTION_ARG_NONE, &beep, "Beep when done", NULL },
+ * { "rand", 0, 0, G_OPTION_ARG_NONE, &rand, "Randomize the data", NULL },
+ * { NULL }
+ * };
+ *
+ * int
+ * main (int argc, char *argv[])
+ * {
+ * GError *error = NULL;
+ * GOptionContext *context;
+ *
+ * context = g_option_context_new ("- test tree model performance");
+ * g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
+ * g_option_context_add_group (context, gtk_get_option_group (TRUE));
+ * if (!g_option_context_parse (context, &argc, &argv, &error))
+ * {
+ * g_print ("option parsing failed: %s\n", error->message);
+ * exit (1);
+ * }
+ *
+ * /&ast; ... &ast;/
+ *
+ * }
+ * </programlisting></informalexample>
+ */
+
+
+/**
+ * SECTION:patterns
+ * @title: Glob-style pattern matching
+ * @short_description: matches strings against patterns containing '*' (wildcard) and '?' (joker)
+ *
+ * The <function>g_pattern_match*</function> functions match a string
+ * against a pattern containing '*' and '?' wildcards with similar
+ * semantics as the standard glob() function: '*' matches an arbitrary,
+ * possibly empty, string, '?' matches an arbitrary character.
+ *
+ * Note that in contrast to glob(), the '/' character
+ * <emphasis>can</emphasis> be matched by the wildcards, there are no
+ * '[...]' character ranges and '*' and '?' can
+ * <emphasis>not</emphasis> be escaped to include them literally in a
+ * pattern.
+ *
+ * When multiple strings must be matched against the same pattern, it
+ * is better to compile the pattern to a #GPatternSpec using
+ * g_pattern_spec_new() and use g_pattern_match_string() instead of
+ * g_pattern_match_simple(). This avoids the overhead of repeated
+ * pattern compilation.
+ */
+
+
+/**
+ * SECTION:quarks
+ * @title: Quarks
+ * @short_description: a 2-way association between a string and a unique integer identifier
+ *
+ * Quarks are associations between strings and integer identifiers.
+ * Given either the string or the #GQuark identifier it is possible to
+ * retrieve the other.
+ *
+ * Quarks are used for both <link
+ * linkend="glib-Datasets">Datasets</link> and <link
+ * linkend="glib-Keyed-Data-Lists">Keyed Data Lists</link>.
+ *
+ * To create a new quark from a string, use g_quark_from_string() or
+ * g_quark_from_static_string().
+ *
+ * To find the string corresponding to a given #GQuark, use
+ * g_quark_to_string().
+ *
+ * To find the #GQuark corresponding to a given string, use
+ * g_quark_try_string().
+ *
+ * Another use for the string pool maintained for the quark functions
+ * is string interning, using g_intern_string() or
+ * g_intern_static_string(). An interned string is a canonical
+ * representation for a string. One important advantage of interned
+ * strings is that they can be compared for equality by a simple
+ * pointer comparison, rather than using strcmp().
+ */
+
+
+/**
+ * SECTION:queue
+ * @Title: Double-ended Queues
+ * @Short_description: double-ended queue data structure
+ *
+ * The #GQueue structure and its associated functions provide a standard
+ * queue data structure. Internally, GQueue uses the same data structure
+ * as #GList to store elements.
+ *
+ * The data contained in each element can be either integer values, by
+ * using one of the <link linkend="glib-Type-Conversion-Macros">Type
+ * Conversion Macros</link>, or simply pointers to any type of data.
+ *
+ * To create a new GQueue, use g_queue_new().
+ *
+ * To initialize a statically-allocated GQueue, use #G_QUEUE_INIT or
+ * g_queue_init().
+ *
+ * To add elements, use g_queue_push_head(), g_queue_push_head_link(),
+ * g_queue_push_tail() and g_queue_push_tail_link().
+ *
+ * To remove elements, use g_queue_pop_head() and g_queue_pop_tail().
+ *
+ * To free the entire queue, use g_queue_free().
+ */
+
+
+/**
+ * SECTION:random_numbers
+ * @title: Random Numbers
+ * @short_description: pseudo-random number generator
+ *
+ * The following functions allow you to use a portable, fast and good
+ * pseudo-random number generator (PRNG). It uses the Mersenne Twister
+ * PRNG, which was originally developed by Makoto Matsumoto and Takuji
+ * Nishimura. Further information can be found at
+ * <ulink url="http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html">
+ * http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html</ulink>.
+ *
+ * If you just need a random number, you simply call the
+ * <function>g_random_*</function> functions, which will create a
+ * globally used #GRand and use the according
+ * <function>g_rand_*</function> functions internally. Whenever you
+ * need a stream of reproducible random numbers, you better create a
+ * #GRand yourself and use the <function>g_rand_*</function> functions
+ * directly, which will also be slightly faster. Initializing a #GRand
+ * with a certain seed will produce exactly the same series of random
+ * numbers on all platforms. This can thus be used as a seed for e.g.
+ * games.
+ *
+ * The <function>g_rand*_range</function> functions will return high
+ * quality equally distributed random numbers, whereas for example the
+ * <literal>(g_random_int()&percnt;max)</literal> approach often
+ * doesn't yield equally distributed numbers.
+ *
+ * GLib changed the seeding algorithm for the pseudo-random number
+ * generator Mersenne Twister, as used by
+ * <structname>GRand</structname> and <structname>GRandom</structname>.
+ * This was necessary, because some seeds would yield very bad
+ * pseudo-random streams.  Also the pseudo-random integers generated by
+ * <function>g_rand*_int_range()</function> will have a slightly better
+ * equal distribution with the new version of GLib.
+ *
+ * The original seeding and generation algorithms, as found in GLib
+ * 2.0.x, can be used instead of the new ones by setting the
+ * environment variable <envar>G_RANDOM_VERSION</envar> to the value of
+ * '2.0'. Use the GLib-2.0 algorithms only if you have sequences of
+ * numbers generated with Glib-2.0 that you need to reproduce exactly.
+ */
+
+
+/**
+ * SECTION:scanner
+ * @title: Lexical Scanner
+ * @short_description: a general purpose lexical scanner
+ *
+ * The #GScanner and its associated functions provide a
+ * general purpose lexical scanner.
+ */
+
+
+/**
+ * SECTION:sequence
+ * @title: Sequences
+ * @short_description: scalable lists
+ *
+ * The #GSequence data structure has the API of a list, but is
+ * implemented internally with a balanced binary tree. This means that
+ * it is possible to maintain a sorted list of n elements in time O(n
+ * log n). The data contained in each element can be either integer
+ * values, by using of the <link
+ * linkend="glib-Type-Conversion-Macros">Type Conversion Macros</link>,
+ * or simply pointers to any type of data.
+ *
+ * A #GSequence is accessed through <firstterm>iterators</firstterm>,
+ * represented by a #GSequenceIter. An iterator represents a position
+ * between two elements of the sequence. For example, the
+ * <firstterm>begin</firstterm> iterator represents the gap immediately
+ * before the first element of the sequence, and the
+ * <firstterm>end</firstterm> iterator represents the gap immediately
+ * after the last element. In an empty sequence, the begin and end
+ * iterators are the same.
+ *
+ * Some methods on #GSequence operate on ranges of items. For example
+ * g_sequence_foreach_range() will call a user-specified function on
+ * each element with the given range. The range is delimited by the
+ * gaps represented by the passed-in iterators, so if you pass in the
+ * begin and end iterators, the range in question is the entire
+ * sequence.
+ *
+ * The function g_sequence_get() is used with an iterator to access the
+ * element immediately following the gap that the iterator represents.
+ * The iterator is said to <firstterm>point</firstterm> to that element.
+ *
+ * Iterators are stable across most operations on a #GSequence. For
+ * example an iterator pointing to some element of a sequence will
+ * continue to point to that element even after the sequence is sorted.
+ * Even moving an element to another sequence using for example
+ * g_sequence_move_range() will not invalidate the iterators pointing
+ * to it. The only operation that will invalidate an iterator is when
+ * the element it points to is removed from any sequence.
+ */
+
+
+/**
+ * SECTION:shell
+ * @title: Shell-related Utilities
+ * @short_description: shell-like commandline handling
+ *
+ *
+ */
+
+
+/**
+ * SECTION:spawn
+ * @Short_description: process launching
+ * @Title: Spawning Processes
+ *
+ *
+ */
+
+
+/**
+ * SECTION:string_chunks
+ * @title: String Chunks
+ * @short_description: efficient storage of groups of strings
+ *
+ * String chunks are used to store groups of strings. Memory is
+ * allocated in blocks, and as strings are added to the #GStringChunk
+ * they are copied into the next free position in a block. When a block
+ * is full a new block is allocated.
+ *
+ * When storing a large number of strings, string chunks are more
+ * efficient than using g_strdup() since fewer calls to malloc() are
+ * needed, and less memory is wasted in memory allocation overheads.
+ *
+ * By adding strings with g_string_chunk_insert_const() it is also
+ * possible to remove duplicates.
+ *
+ * To create a new #GStringChunk use g_string_chunk_new().
+ *
+ * To add strings to a #GStringChunk use g_string_chunk_insert().
+ *
+ * To add strings to a #GStringChunk, but without duplicating strings
+ * which are already in the #GStringChunk, use
+ * g_string_chunk_insert_const().
+ *
+ * To free the entire #GStringChunk use g_string_chunk_free(). It is
+ * not possible to free individual strings.
+ */
+
+
+/**
+ * SECTION:string_utils
+ * @title: String Utility Functions
+ * @short_description: various string-related functions
+ *
+ * This section describes a number of utility functions for creating,
+ * duplicating, and manipulating strings.
+ *
+ * Note that the functions g_printf(), g_fprintf(), g_sprintf(),
+ * g_snprintf(), g_vprintf(), g_vfprintf(), g_vsprintf() and g_vsnprintf()
+ * are declared in the header <filename>gprintf.h</filename> which is
+ * <emphasis>not</emphasis> included in <filename>glib.h</filename>
+ * (otherwise using <filename>glib.h</filename> would drag in
+ * <filename>stdio.h</filename>), so you'll have to explicitly include
+ * <literal>&lt;glib/gprintf.h&gt;</literal> in order to use the GLib
+ * printf() functions.
+ *
+ * <para id="string-precision">While you may use the printf() functions
+ * to format UTF-8 strings, notice that the precision of a
+ * <literal>&percnt;Ns</literal> parameter is interpreted as the
+ * number of <emphasis>bytes</emphasis>, not <emphasis>characters</emphasis>
+ * to print. On top of that, the GNU libc implementation of the printf()
+ * functions has the "feature" that it checks that the string given for
+ * the <literal>&percnt;Ns</literal> parameter consists of a whole number
+ * of characters in the current encoding. So, unless you are sure you are
+ * always going to be in an UTF-8 locale or your know your text is restricted
+ * to ASCII, avoid using <literal>&percnt;Ns</literal>. If your intention is
+ * to format strings for a certain number of columns, then
+ * <literal>&percnt;Ns</literal> is not a correct solution anyway, since it
+ * fails to take wide characters (see g_unichar_iswide()) into account.
+ * </para>
+ */
+
+
+/**
+ * SECTION:strings
+ * @title: Strings
+ * @short_description: text buffers which grow automatically as text is added
+ *
+ * A #GString is an object that handles the memory management
+ * of a C string for you. You can think of it as similar to a
+ * Java StringBuffer. In addition to the string itself, GString
+ * stores the length of the string, so can be used for binary
+ * data with embedded nul bytes. To access the C string managed
+ * by the GString @string, simply use @string->str.
+ */
+
+
+/**
+ * SECTION:testing
+ * @title: Testing
+ * @short_description: a test framework
+ * @see_also: <link linkend="gtester">gtester</link>, <link linkend="gtester-report">gtester-report</link>
+ *
+ * GLib provides a framework for writing and maintaining unit tests
+ * in parallel to the code they are testing. The API is designed according
+ * to established concepts found in the other test frameworks (JUnit, NUnit,
+ * RUnit), which in turn is based on smalltalk unit testing concepts.
+ *
+ * <variablelist>
+ * <varlistentry>
+ * <term>Test case</term>
+ * <listitem>Tests (test methods) are grouped together with their
+ * fixture into test cases.</listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term>Fixture</term>
+ * <listitem>A test fixture consists of fixture data and setup and
+ * teardown methods to establish the environment for the test
+ * functions. We use fresh fixtures, i.e. fixtures are newly set
+ * up and torn down around each test invocation to avoid dependencies
+ * between tests.</listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term>Test suite</term>
+ * <listitem>Test cases can be grouped into test suites, to allow
+ * subsets of the available tests to be run. Test suites can be
+ * grouped into other test suites as well.</listitem>
+ * </varlistentry>
+ * </variablelist>
+ * The API is designed to handle creation and registration of test suites
+ * and test cases implicitly. A simple call like
+ * |[
+ * g_test_add_func ("/misc/assertions", test_assertions);
+ * ]|
+ * creates a test suite called "misc" with a single test case named
+ * "assertions", which consists of running the test_assertions function.
+ *
+ * In addition to the traditional g_assert(), the test framework provides
+ * an extended set of assertions for string and numerical comparisons:
+ * g_assert_cmpfloat(), g_assert_cmpint(), g_assert_cmpuint(),
+ * g_assert_cmphex(), g_assert_cmpstr(). The advantage of these variants
+ * over plain g_assert() is that the assertion messages can be more
+ * elaborate, and include the values of the compared entities.
+ *
+ * GLib ships with two utilities called gtester and gtester-report to
+ * facilitate running tests and producing nicely formatted test reports.
+ */
+
+
+/**
+ * SECTION:thread_pools
+ * @title: Thread Pools
+ * @short_description: pools of threads to execute work concurrently
+ * @see_also: #GThread
+ *
+ * Sometimes you wish to asynchronously fork out the execution of work
+ * and continue working in your own thread. If that will happen often,
+ * the overhead of starting and destroying a thread each time might be
+ * too high. In such cases reusing already started threads seems like a
+ * good idea. And it indeed is, but implementing this can be tedious
+ * and error-prone.
+ *
+ * Therefore GLib provides thread pools for your convenience. An added
+ * advantage is, that the threads can be shared between the different
+ * subsystems of your program, when they are using GLib.
+ *
+ * To create a new thread pool, you use g_thread_pool_new().
+ * It is destroyed by g_thread_pool_free().
+ *
+ * If you want to execute a certain task within a thread pool,
+ * you call g_thread_pool_push().
+ *
+ * To get the current number of running threads you call
+ * g_thread_pool_get_num_threads(). To get the number of still
+ * unprocessed tasks you call g_thread_pool_unprocessed(). To control
+ * the maximal number of threads for a thread pool, you use
+ * g_thread_pool_get_max_threads() and g_thread_pool_set_max_threads().
+ *
+ * Finally you can control the number of unused threads, that are kept
+ * alive by GLib for future use. The current number can be fetched with
+ * g_thread_pool_get_num_unused_threads(). The maximal number can be
+ * controlled by g_thread_pool_get_max_unused_threads() and
+ * g_thread_pool_set_max_unused_threads(). All currently unused threads
+ * can be stopped by calling g_thread_pool_stop_unused_threads().
+ */
+
+
+/**
+ * SECTION:threads
+ * @title: Threads
+ * @short_description: portable support for threads, mutexes, locks, conditions and thread private data
+ * @see_also: #GThreadPool, #GAsyncQueue
+ *
+ * Threads act almost like processes, but unlike processes all threads
+ * of one process share the same memory. This is good, as it provides
+ * easy communication between the involved threads via this shared
+ * memory, and it is bad, because strange things (so called
+ * "Heisenbugs") might happen if the program is not carefully designed.
+ * In particular, due to the concurrent nature of threads, no
+ * assumptions on the order of execution of code running in different
+ * threads can be made, unless order is explicitly forced by the
+ * programmer through synchronization primitives.
+ *
+ * The aim of the thread-related functions in GLib is to provide a
+ * portable means for writing multi-threaded software. There are
+ * primitives for mutexes to protect the access to portions of memory
+ * (#GMutex, #GRecMutex and #GRWLock). There is a facility to use
+ * individual bits for locks (g_bit_lock()). There are primitives
+ * for condition variables to allow synchronization of threads (#GCond).
+ * There are primitives for thread-private data - data that every
+ * thread has a private instance of (#GPrivate). There are facilities
+ * for one-time initialization (#GOnce, g_once_init_enter()). Finally,
+ * there are primitives to create and manage threads (#GThread).
+ *
+ * The GLib threading system used to be initialized with g_thread_init().
+ * This is no longer necessary. Since version 2.32, the GLib threading
+ * system is automatically initialized at the start of your program,
+ * and all thread-creation functions and synchronization primitives
+ * are available right away.
+ *
+ * Note that it is not safe to assume that your program has no threads
+ * even if you don't call g_thread_new() yourself. GLib and GIO can
+ * and will create threads for their own purposes in some cases, such
+ * as when using g_unix_signal_source_new() or when using GDBus.
+ *
+ * Originally, UNIX did not have threads, and therefore some traditional
+ * UNIX APIs are problematic in threaded programs. Some notable examples
+ * are
+ * <itemizedlist>
+ * <listitem>
+ * C library functions that return data in statically allocated
+ * buffers, such as strtok() or strerror(). For many of these,
+ * there are thread-safe variants with a _r suffix, or you can
+ * look at corresponding GLib APIs (like g_strsplit() or g_strerror()).
+ * </listitem>
+ * <listitem>
+ * setenv() and unsetenv() manipulate the process environment in
+ * a not thread-safe way, and may interfere with getenv() calls
+ * in other threads. Note that getenv() calls may be
+ * <quote>hidden</quote> behind other APIs. For example, GNU gettext()
+ * calls getenv() under the covers. In general, it is best to treat
+ * the environment as readonly. If you absolutely have to modify the
+ * environment, do it early in main(), when no other threads are around yet.
+ * </listitem>
+ * <listitem>
+ * setlocale() changes the locale for the entire process, affecting
+ * all threads. Temporary changes to the locale are often made to
+ * change the behavior of string scanning or formatting functions
+ * like scanf() or printf(). GLib offers a number of string APIs
+ * (like g_ascii_formatd() or g_ascii_strtod()) that can often be
+ * used as an alternative. Or you can use the uselocale() function
+ * to change the locale only for the current thread.
+ * </listitem>
+ * <listitem>
+ * fork() only takes the calling thread into the child's copy of the
+ * process image.  If other threads were executing in critical
+ * sections they could have left mutexes locked which could easily
+ * cause deadlocks in the new child.  For this reason, you should
+ * call exit() or exec() as soon as possible in the child and only
+ * make signal-safe library calls before that.
+ * </listitem>
+ * <listitem>
+ * daemon() uses fork() in a way contrary to what is described
+ * above.  It should not be used with GLib programs.
+ * </listitem>
+ * </itemizedlist>
+ *
+ * GLib itself is internally completely thread-safe (all global data is
+ * automatically locked), but individual data structure instances are
+ * not automatically locked for performance reasons. For example,
+ * you must coordinate accesses to the same #GHashTable from multiple
+ * threads. The two notable exceptions from this rule are #GMainLoop
+ * and #GAsyncQueue, which <emphasis>are</emphasis> thread-safe and
+ * need no further application-level locking to be accessed from
+ * multiple threads. Most refcounting functions such as g_object_ref()
+ * are also thread-safe.
+ */
+
+
+/**
+ * SECTION:timers
+ * @title: Timers
+ * @short_description: keep track of elapsed time
+ *
+ * #GTimer records a start time, and counts microseconds elapsed since
+ * that time. This is done somewhat differently on different platforms,
+ * and can be tricky to get exactly right, so #GTimer provides a
+ * portable/convenient interface.
+ */
+
+
+/**
+ * SECTION:timezone
+ * @title: GTimeZone
+ * @short_description: a structure representing a time zone
+ * @see_also: #GDateTime
+ *
+ * #GTimeZone is a structure that represents a time zone, at no
+ * particular point in time.  It is refcounted and immutable.
+ *
+ * A time zone contains a number of intervals.  Each interval has
+ * an abbreviation to describe it, an offet to UTC and a flag indicating
+ * if the daylight savings time is in effect during that interval.  A
+ * time zone always has at least one interval -- interval 0.
+ *
+ * Every UTC time is contained within exactly one interval, but a given
+ * local time may be contained within zero, one or two intervals (due to
+ * incontinuities associated with daylight savings time).
+ *
+ * An interval may refer to a specific period of time (eg: the duration
+ * of daylight savings time during 2010) or it may refer to many periods
+ * of time that share the same properties (eg: all periods of daylight
+ * savings time).  It is also possible (usually for political reasons)
+ * that some properties (like the abbreviation) change between intervals
+ * without other properties changing.
+ *
+ * #GTimeZone is available since GLib 2.26.
+ */
+
+
+/**
+ * SECTION:trash_stack
+ * @title: Trash Stacks
+ * @short_description: maintain a stack of unused allocated memory chunks
+ *
+ * A #GTrashStack is an efficient way to keep a stack of unused allocated
+ * memory chunks. Each memory chunk is required to be large enough to hold
+ * a #gpointer. This allows the stack to be maintained without any space
+ * overhead, since the stack pointers can be stored inside the memory chunks.
+ *
+ * There is no function to create a #GTrashStack. A %NULL #GTrashStack*
+ * is a perfectly valid empty stack.
+ */
+
+
+/**
+ * SECTION:trees-binary
+ * @title: Balanced Binary Trees
+ * @short_description: a sorted collection of key/value pairs optimized for searching and traversing in order
+ *
+ * The #GTree structure and its associated functions provide a sorted
+ * collection of key/value pairs optimized for searching and traversing
+ * in order.
+ *
+ * To create a new #GTree use g_tree_new().
+ *
+ * To insert a key/value pair into a #GTree use g_tree_insert().
+ *
+ * To lookup the value corresponding to a given key, use
+ * g_tree_lookup() and g_tree_lookup_extended().
+ *
+ * To find out the number of nodes in a #GTree, use g_tree_nnodes(). To
+ * get the height of a #GTree, use g_tree_height().
+ *
+ * To traverse a #GTree, calling a function for each node visited in
+ * the traversal, use g_tree_foreach().
+ *
+ * To remove a key/value pair use g_tree_remove().
+ *
+ * To destroy a #GTree, use g_tree_destroy().
+ */
+
+
+/**
+ * SECTION:trees-nary
+ * @title: N-ary Trees
+ * @short_description: trees of data with any number of branches
+ *
+ * The #GNode struct and its associated functions provide a N-ary tree
+ * data structure, where nodes in the tree can contain arbitrary data.
+ *
+ * To create a new tree use g_node_new().
+ *
+ * To insert a node into a tree use g_node_insert(),
+ * g_node_insert_before(), g_node_append() and g_node_prepend().
+ *
+ * To create a new node and insert it into a tree use
+ * g_node_insert_data(), g_node_insert_data_after(),
+ * g_node_insert_data_before(), g_node_append_data()
+ * and g_node_prepend_data().
+ *
+ * To reverse the children of a node use g_node_reverse_children().
+ *
+ * To find a node use g_node_get_root(), g_node_find(),
+ * g_node_find_child(), g_node_child_index(), g_node_child_position(),
+ * g_node_first_child(), g_node_last_child(), g_node_nth_child(),
+ * g_node_first_sibling(), g_node_prev_sibling(), g_node_next_sibling()
+ * or g_node_last_sibling().
+ *
+ * To get information about a node or tree use G_NODE_IS_LEAF(),
+ * G_NODE_IS_ROOT(), g_node_depth(), g_node_n_nodes(),
+ * g_node_n_children(), g_node_is_ancestor() or g_node_max_height().
+ *
+ * To traverse a tree, calling a function for each node visited in the
+ * traversal, use g_node_traverse() or g_node_children_foreach().
+ *
+ * To remove a node or subtree from a tree use g_node_unlink() or
+ * g_node_destroy().
+ */
+
+
+/**
+ * SECTION:type_conversion
+ * @title: Type Conversion Macros
+ * @short_description: portably storing integers in pointer variables
+ *
+ * Many times GLib, GTK+, and other libraries allow you to pass "user
+ * data" to a callback, in the form of a void pointer. From time to time
+ * you want to pass an integer instead of a pointer. You could allocate
+ * an integer, with something like:
+ * |[
+ * int *ip = g_new (int, 1);
+ * *ip = 42;
+ * ]|
+ * But this is inconvenient, and it's annoying to have to free the
+ * memory at some later time.
+ *
+ * Pointers are always at least 32 bits in size (on all platforms GLib
+ * intends to support). Thus you can store at least 32-bit integer values
+ * in a pointer value. Naively, you might try this, but it's incorrect:
+ * |[
+ * gpointer p;
+ * int i;
+ * p = (void*) 42;
+ * i = (int) p;
+ * ]|
+ * Again, that example was <emphasis>not</emphasis> correct, don't copy it.
+ * The problem is that on some systems you need to do this:
+ * |[
+ * gpointer p;
+ * int i;
+ * p = (void*) (long) 42;
+ * i = (int) (long) p;
+ * ]|
+ * The GLib macros GPOINTER_TO_INT(), GINT_TO_POINTER(), etc. take care
+ * to do the right thing on the every platform.
+ *
+ * <warning><para>You may not store pointers in integers. This is not
+ * portable in any way, shape or form. These macros <emphasis>only</emphasis>
+ * allow storing integers in pointers, and only preserve 32 bits of the
+ * integer; values outside the range of a 32-bit integer will be mangled.
+ * </para></warning>
+ */
+
+
+/**
+ * SECTION:types
+ * @title: Basic Types
+ * @short_description: standard GLib types, defined for ease-of-use and portability
+ *
+ * GLib defines a number of commonly used types, which can be divided
+ * into 4 groups:
+ * - New types which are not part of standard C (but are defined in
+ * various C standard library header files) - #gboolean, #gsize,
+ * #gssize, #goffset, #gintptr, #guintptr.
+ * - Integer types which are guaranteed to be the same size across
+ * all platforms - #gint8, #guint8, #gint16, #guint16, #gint32,
+ * #guint32, #gint64, #guint64.
+ * - Types which are easier to use than their standard C counterparts -
+ * #gpointer, #gconstpointer, #guchar, #guint, #gushort, #gulong.
+ * - Types which correspond exactly to standard C types, but are
+ * included for completeness - #gchar, #gint, #gshort, #glong,
+ * #gfloat, #gdouble.
+ *
+ * GLib also defines macros for the limits of some of the standard
+ * integer and floating point types, as well as macros for suitable
+ * printf() formats for these types.
+ */
+
+
+/**
+ * SECTION:unicode
+ * @Title: Unicode Manipulation
+ * @Short_description: functions operating on Unicode characters and UTF-8 strings
+ * @See_also: g_locale_to_utf8(), g_locale_from_utf8()
+ *
+ * This section describes a number of functions for dealing with
+ * Unicode characters and strings.  There are analogues of the
+ * traditional <filename>ctype.h</filename> character classification
+ * and case conversion functions, UTF-8 analogues of some string utility
+ * functions, functions to perform normalization, case conversion and
+ * collation on UTF-8 strings and finally functions to convert between
+ * the UTF-8, UTF-16 and UCS-4 encodings of Unicode.
+ *
+ * The implementations of the Unicode functions in GLib are based
+ * on the Unicode Character Data tables, which are available from
+ * <ulink url="http://www.unicode.org/">www.unicode.org</ulink>.
+ * GLib 2.8 supports Unicode 4.0, GLib 2.10 supports Unicode 4.1,
+ * GLib 2.12 supports Unicode 5.0, GLib 2.16.3 supports Unicode 5.1,
+ * GLib 2.30 supports Unicode 6.0.
+ */
+
+
+/**
+ * SECTION:version
+ * @Title: Version Information
+ * @Short_description: variables and functions to check the GLib version
+ *
+ * GLib provides version information, primarily useful in configure
+ * checks for builds that have a configure script. Applications will
+ * not typically use the features described here.
+ *
+ * The GLib headers annotate deprecated APIs in a way that produces
+ * compiler warnings if these deprecated APIs are used. The warnings
+ * can be turned off by defining the macro %GLIB_DISABLE_DEPRECATION_WARNINGS
+ * before including the glib.h header.
+ *
+ * GLib also provides support for building applications against
+ * defined subsets of deprecated or new GLib APIs. Define the macro
+ * %GLIB_VERSION_MIN_REQUIRED to specify up to what version of GLib
+ * you want to receive warnings about deprecated APIs. Define the
+ * macro %GLIB_VERSION_MAX_ALLOWED to specify the newest version of
+ * GLib whose API you want to use.
+ */
+
+
+/**
+ * SECTION:warnings
+ * @Title: Message Output and Debugging Functions
+ * @Short_description: functions to output messages and help debug applications
+ *
+ * These functions provide support for outputting messages.
+ *
+ * The <function>g_return</function> family of macros (g_return_if_fail(),
+ * g_return_val_if_fail(), g_return_if_reached(), g_return_val_if_reached())
+ * should only be used for programming errors, a typical use case is
+ * checking for invalid parameters at the beginning of a public function.
+ * They should not be used if you just mean "if (error) return", they
+ * should only be used if you mean "if (bug in program) return".
+ * The program behavior is generally considered undefined after one
+ * of these checks fails. They are not intended for normal control
+ * flow, only to give a perhaps-helpful warning before giving up.
+ */
+
+
+/**
+ * SECTION:windows
+ * @title: Windows Compatibility Functions
+ * @short_description: UNIX emulation on Windows
+ *
+ * These functions provide some level of UNIX emulation on the
+ * Windows platform. If your application really needs the POSIX
+ * APIs, we suggest you try the Cygwin project.
+ */
+
+
+/**
+ * TRUE:
+ *
+ * Defines the %TRUE value for the #gboolean type.
+ */
+
+
+/**
+ * _:
+ * @String: the string to be translated
+ *
+ * Marks a string for translation, gets replaced with the translated string
+ * at runtime.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * _glib_get_locale_dir:
+ *
+ * Return the path to the share\locale or lib\locale subfolder of the
+ * GLib installation folder. The path is in the system codepage. We
+ * have to use system codepage as bindtextdomain() doesn't have a
+ * UTF-8 interface.
+ */
+
+
+/**
+ * g_access:
+ * @filename: a pathname in the GLib file name encoding (UTF-8 on Windows)
+ * @mode: as in access()
+ *
+ * A wrapper for the POSIX access() function. This function is used to
+ * test a pathname for one or several of read, write or execute
+ * permissions, or just existence.
+ *
+ * On Windows, the file protection mechanism is not at all POSIX-like,
+ * and the underlying function in the C library only checks the
+ * FAT-style READONLY attribute, and does not look at the ACL of a
+ * file at all. This function is this in practise almost useless on
+ * Windows. Software that needs to handle file permissions on Windows
+ * more exactly should use the Win32 API.
+ *
+ * See your C library manual for more details about access().
+ *
+ * object that has all the tested permissions, or -1 otherwise or on
+ * error.
+ *
+ * Returns: zero if the pathname refers to an existing file system
+ * Since: 2.8
+ */
+
+
+/**
+ * g_alloca:
+ * @size: number of bytes to allocate.
+ *
+ * Allocates @size bytes on the stack; these bytes will be freed when the current
+ * stack frame is cleaned up. This macro essentially just wraps the alloca()
+ * function present on most UNIX variants.
+ * Thus it provides the same advantages and pitfalls as alloca():
+ * <variablelist>
+ * <varlistentry><term></term><listitem><para>
+ * + alloca() is very fast, as on most systems it's implemented by just adjusting
+ * the stack pointer register.
+ * </para></listitem></varlistentry>
+ * <varlistentry><term></term><listitem><para>
+ * + It doesn't cause any memory fragmentation, within its scope, separate alloca()
+ * blocks just build up and are released together at function end.
+ * </para></listitem></varlistentry>
+ * <varlistentry><term></term><listitem><para>
+ * - Allocation sizes have to fit into the current stack frame. For instance in a
+ * threaded environment on Linux, the per-thread stack size is limited to 2 Megabytes,
+ * so be sparse with alloca() uses.
+ * </para></listitem></varlistentry>
+ * <varlistentry><term></term><listitem><para>
+ * - Allocation failure due to insufficient stack space is not indicated with a %NULL
+ * return like e.g. with malloc(). Instead, most systems probably handle it the same
+ * way as out of stack space situations from infinite function recursion, i.e.
+ * with a segmentation fault.
+ * </para></listitem></varlistentry>
+ * <varlistentry><term></term><listitem><para>
+ * - Special care has to be taken when mixing alloca() with GNU C variable sized arrays.
+ * Stack space allocated with alloca() in the same scope as a variable sized array
+ * will be freed together with the variable sized array upon exit of that scope, and
+ * not upon exit of the enclosing function scope.
+ * </para></listitem></varlistentry>
+ * </variablelist>
+ *
+ * Returns: space for @size bytes, allocated on the stack
+ */
+
+
+/**
+ * g_array_append_val:
+ * @a: a #GArray.
+ * @v: the value to append to the #GArray.
+ * @Returns: the #GArray.
+ *
+ * Adds the value on to the end of the array. The array will grow in
+ * size automatically if necessary.
+ *
+ * <note><para>g_array_append_val() is a macro which uses a reference
+ * to the value parameter @v. This means that you cannot use it with
+ * literal values such as "27". You must use variables.</para></note>
+ */
+
+
+/**
+ * g_array_append_vals:
+ * @array: a #GArray.
+ * @data: a pointer to the elements to append to the end of the array.
+ * @len: the number of elements to append.
+ * @Returns: the #GArray.
+ *
+ * Adds @len elements onto the end of the array.
+ */
+
+
+/**
+ * g_array_free:
+ * @array: a #GArray.
+ * @free_segment: if %TRUE the actual element data is freed as well.
+ * @Returns: the element data if @free_segment is %FALSE, otherwise %NULL.  The element data should be freed using g_free().
+ *
+ * Frees the memory allocated for the #GArray. If @free_segment is
+ * %TRUE it frees the memory block holding the elements as well and
+ * also each element if @array has a @element_free_func set. Pass
+ * %FALSE if you want to free the #GArray wrapper but preserve the
+ * underlying array for use elsewhere. If the reference count of @array
+ * is greater than one, the #GArray wrapper is preserved but the size
+ * of @array will be set to zero.
+ *
+ * <note><para>If array elements contain dynamically-allocated memory,
+ * they should be freed separately.</para></note>
+ */
+
+
+/**
+ * g_array_get_element_size:
+ * @array: A #GArray.
+ *
+ * Gets the size of the elements in @array.
+ *
+ * Returns: Size of each element, in bytes.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_array_index:
+ * @a: a #GArray.
+ * @t: the type of the elements.
+ * @i: the index of the element to return.
+ * @Returns: the element of the #GArray at the index given by @i.
+ *
+ * Returns the element of a #GArray at the given index. The return
+ * value is cast to the given type.
+ *
+ * <example>
+ * <title>Getting a pointer to an element in a #GArray</title>
+ * <programlisting>
+ * EDayViewEvent *event;
+ * /<!-- -->* This gets a pointer to the 4th element
+ * in the array of EDayViewEvent structs. *<!-- -->/
+ * event = &amp;g_array_index (events, EDayViewEvent, 3);
+ * </programlisting>
+ * </example>
+ */
+
+
+/**
+ * g_array_insert_val:
+ * @a: a #GArray.
+ * @i: the index to place the element at.
+ * @v: the value to insert into the array.
+ * @Returns: the #GArray.
+ *
+ * Inserts an element into an array at the given index.
+ *
+ * <note><para>g_array_insert_val() is a macro which uses a reference
+ * to the value parameter @v. This means that you cannot use it with
+ * literal values such as "27". You must use variables.</para></note>
+ */
+
+
+/**
+ * g_array_insert_vals:
+ * @array: a #GArray.
+ * @index_: the index to place the elements at.
+ * @data: a pointer to the elements to insert.
+ * @len: the number of elements to insert.
+ * @Returns: the #GArray.
+ *
+ * Inserts @len elements into a #GArray at the given index.
+ */
+
+
+/**
+ * g_array_new:
+ * @zero_terminated: %TRUE if the array should have an extra element at the end which is set to 0.
+ * @clear_: %TRUE if #GArray elements should be automatically cleared to 0 when they are allocated.
+ * @element_size: the size of each element in bytes.
+ * @Returns: the new #GArray.
+ *
+ * Creates a new #GArray with a reference count of 1.
+ */
+
+
+/**
+ * g_array_prepend_val:
+ * @a: a #GArray.
+ * @v: the value to prepend to the #GArray.
+ * @Returns: the #GArray.
+ *
+ * Adds the value on to the start of the array. The array will grow in
+ * size automatically if necessary.
+ *
+ * This operation is slower than g_array_append_val() since the
+ * existing elements in the array have to be moved to make space for
+ * the new element.
+ *
+ * <note><para>g_array_prepend_val() is a macro which uses a reference
+ * to the value parameter @v. This means that you cannot use it with
+ * literal values such as "27". You must use variables.</para></note>
+ */
+
+
+/**
+ * g_array_prepend_vals:
+ * @array: a #GArray.
+ * @data: a pointer to the elements to prepend to the start of the array.
+ * @len: the number of elements to prepend.
+ * @Returns: the #GArray.
+ *
+ * Adds @len elements onto the start of the array.
+ *
+ * This operation is slower than g_array_append_vals() since the
+ * existing elements in the array have to be moved to make space for
+ * the new elements.
+ */
+
+
+/**
+ * g_array_ref:
+ * @array: A #GArray.
+ *
+ * Atomically increments the reference count of @array by one. This
+ * function is MT-safe and may be called from any thread.
+ *
+ * Returns: The passed in #GArray.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_array_remove_index:
+ * @array: a #GArray.
+ * @index_: the index of the element to remove.
+ * @Returns: the #GArray.
+ *
+ * Removes the element at the given index from a #GArray. The following
+ * elements are moved down one place.
+ */
+
+
+/**
+ * g_array_remove_index_fast:
+ * @array: a @GArray.
+ * @index_: the index of the element to remove.
+ * @Returns: the #GArray.
+ *
+ * Removes the element at the given index from a #GArray. The last
+ * element in the array is used to fill in the space, so this function
+ * does not preserve the order of the #GArray. But it is faster than
+ * g_array_remove_index().
+ */
+
+
+/**
+ * g_array_remove_range:
+ * @array: a @GArray.
+ * @index_: the index of the first element to remove.
+ * @length: the number of elements to remove.
+ * @Returns: the #GArray.
+ *
+ * Removes the given number of elements starting at the given index
+ * from a #GArray.  The following elements are moved to close the gap.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_array_set_clear_func:
+ * @array: A #GArray
+ * @clear_func: a function to clear an element of @array
+ *
+ * Sets a function to clear an element of @array.
+ *
+ * The @clear_func will be called when an element in the array
+ * data segment is removed and when the array is freed and data
+ * segment is deallocated as well.
+ *
+ * Note that in contrast with other uses of #GDestroyNotify
+ * functions, @clear_func is expected to clear the contents of
+ * the array element it is given, but not free the element itself.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_array_set_size:
+ * @array: a #GArray.
+ * @length: the new size of the #GArray.
+ * @Returns: the #GArray.
+ *
+ * Sets the size of the array, expanding it if necessary. If the array
+ * was created with @clear_ set to %TRUE, the new elements are set to 0.
+ */
+
+
+/**
+ * g_array_sized_new:
+ * @zero_terminated: %TRUE if the array should have an extra element at the end with all bits cleared.
+ * @clear_: %TRUE if all bits in the array should be cleared to 0 on allocation.
+ * @element_size: size of each element in the array.
+ * @reserved_size: number of elements preallocated.
+ * @Returns: the new #GArray.
+ *
+ * Creates a new #GArray with @reserved_size elements preallocated and
+ * a reference count of 1. This avoids frequent reallocation, if you
+ * are going to add many elements to the array. Note however that the
+ * size of the array is still 0.
+ */
+
+
+/**
+ * g_array_sort:
+ * @array: a #GArray.
+ * @compare_func: comparison function.
+ *
+ * Sorts a #GArray using @compare_func which should be a qsort()-style
+ * comparison function (returns less than zero for first arg is less
+ * than second arg, zero for equal, greater zero if first arg is
+ * greater than second arg).
+ *
+ * This is guaranteed to be a stable sort since version 2.32.
+ */
+
+
+/**
+ * g_array_sort_with_data:
+ * @array: a #GArray.
+ * @compare_func: comparison function.
+ * @user_data: data to pass to @compare_func.
+ *
+ * Like g_array_sort(), but the comparison function receives an extra
+ * user data argument.
+ *
+ * This is guaranteed to be a stable sort since version 2.32.
+ *
+ * There used to be a comment here about making the sort stable by
+ * using the addresses of the elements in the comparison function.
+ * This did not actually work, so any such code should be removed.
+ */
+
+
+/**
+ * g_array_unref:
+ * @array: A #GArray.
+ *
+ * Atomically decrements the reference count of @array by one. If the
+ * reference count drops to 0, all memory allocated by the array is
+ * released. This function is MT-safe and may be called from any
+ * thread.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_ascii_digit_value:
+ * @c: an ASCII character.
+ *
+ * Determines the numeric value of a character as a decimal
+ * digit. Differs from g_unichar_digit_value() because it takes
+ * a char, so there's no worry about sign extension if characters
+ * are signed.
+ *
+ * g_ascii_isdigit()), its numeric value. Otherwise, -1.
+ *
+ * Returns: If @c is a decimal digit (according to
+ */
+
+
+/**
+ * g_ascii_dtostr:
+ * @buffer: A buffer to place the resulting string in
+ * @buf_len: The length of the buffer.
+ * @d: The #gdouble to convert
+ *
+ * Converts a #gdouble to a string, using the '.' as
+ * decimal point.
+ *
+ * This functions generates enough precision that converting
+ * the string back using g_ascii_strtod() gives the same machine-number
+ * (on machines with IEEE compatible 64bit doubles). It is
+ * guaranteed that the size of the resulting string will never
+ * be larger than @G_ASCII_DTOSTR_BUF_SIZE bytes.
+ *
+ * Returns: The pointer to the buffer with the converted string.
+ */
+
+
+/**
+ * g_ascii_formatd:
+ * @buffer: A buffer to place the resulting string in
+ * @buf_len: The length of the buffer.
+ * @format: The printf()-style format to use for the code to use for converting.
+ * @d: The #gdouble to convert
+ *
+ * Converts a #gdouble to a string, using the '.' as
+ * decimal point. To format the number you pass in
+ * a printf()-style format string. Allowed conversion
+ * specifiers are 'e', 'E', 'f', 'F', 'g' and 'G'.
+ *
+ * If you just want to want to serialize the value into a
+ * string, use g_ascii_dtostr().
+ *
+ * Returns: The pointer to the buffer with the converted string.
+ */
+
+
+/**
+ * g_ascii_isalnum:
+ * @c: any character
+ *
+ * Determines whether a character is alphanumeric.
+ *
+ * Unlike the standard C library isalnum() function, this only
+ * recognizes standard ASCII letters and ignores the locale,
+ * returning %FALSE for all non-ASCII characters. Also, unlike
+ * the standard library function, this takes a <type>char</type>,
+ * not an <type>int</type>, so don't call it on <literal>EOF</literal>, but no need to
+ * cast to #guchar before passing a possibly non-ASCII character in.
+ *
+ * Returns: %TRUE if @c is an ASCII alphanumeric character
+ */
+
+
+/**
+ * g_ascii_isalpha:
+ * @c: any character
+ *
+ * Determines whether a character is alphabetic (i.e. a letter).
+ *
+ * Unlike the standard C library isalpha() function, this only
+ * recognizes standard ASCII letters and ignores the locale,
+ * returning %FALSE for all non-ASCII characters. Also, unlike
+ * the standard library function, this takes a <type>char</type>,
+ * not an <type>int</type>, so don't call it on <literal>EOF</literal>, but no need to
+ * cast to #guchar before passing a possibly non-ASCII character in.
+ *
+ * Returns: %TRUE if @c is an ASCII alphabetic character
+ */
+
+
+/**
+ * g_ascii_iscntrl:
+ * @c: any character
+ *
+ * Determines whether a character is a control character.
+ *
+ * Unlike the standard C library iscntrl() function, this only
+ * recognizes standard ASCII control characters and ignores the
+ * locale, returning %FALSE for all non-ASCII characters. Also,
+ * unlike the standard library function, this takes a <type>char</type>,
+ * not an <type>int</type>, so don't call it on <literal>EOF</literal>, but no need to
+ * cast to #guchar before passing a possibly non-ASCII character in.
+ *
+ * Returns: %TRUE if @c is an ASCII control character.
+ */
+
+
+/**
+ * g_ascii_isdigit:
+ * @c: any character
+ *
+ * Determines whether a character is digit (0-9).
+ *
+ * Unlike the standard C library isdigit() function, this takes
+ * a <type>char</type>, not an <type>int</type>, so don't call it
+ * on <literal>EOF</literal>, but no need to cast to #guchar before passing a possibly
+ * non-ASCII character in.
+ *
+ * Returns: %TRUE if @c is an ASCII digit.
+ */
+
+
+/**
+ * g_ascii_isgraph:
+ * @c: any character
+ *
+ * Determines whether a character is a printing character and not a space.
+ *
+ * Unlike the standard C library isgraph() function, this only
+ * recognizes standard ASCII characters and ignores the locale,
+ * returning %FALSE for all non-ASCII characters. Also, unlike
+ * the standard library function, this takes a <type>char</type>,
+ * not an <type>int</type>, so don't call it on <literal>EOF</literal>, but no need
+ * to cast to #guchar before passing a possibly non-ASCII character in.
+ *
+ * Returns: %TRUE if @c is an ASCII printing character other than space.
+ */
+
+
+/**
+ * g_ascii_islower:
+ * @c: any character
+ *
+ * Determines whether a character is an ASCII lower case letter.
+ *
+ * Unlike the standard C library islower() function, this only
+ * recognizes standard ASCII letters and ignores the locale,
+ * returning %FALSE for all non-ASCII characters. Also, unlike
+ * the standard library function, this takes a <type>char</type>,
+ * not an <type>int</type>, so don't call it on <literal>EOF</literal>, but no need
+ * to worry about casting to #guchar before passing a possibly
+ * non-ASCII character in.
+ *
+ * Returns: %TRUE if @c is an ASCII lower case letter
+ */
+
+
+/**
+ * g_ascii_isprint:
+ * @c: any character
+ *
+ * Determines whether a character is a printing character.
+ *
+ * Unlike the standard C library isprint() function, this only
+ * recognizes standard ASCII characters and ignores the locale,
+ * returning %FALSE for all non-ASCII characters. Also, unlike
+ * the standard library function, this takes a <type>char</type>,
+ * not an <type>int</type>, so don't call it on <literal>EOF</literal>, but no need
+ * to cast to #guchar before passing a possibly non-ASCII character in.
+ *
+ * Returns: %TRUE if @c is an ASCII printing character.
+ */
+
+
+/**
+ * g_ascii_ispunct:
+ * @c: any character
+ *
+ * Determines whether a character is a punctuation character.
+ *
+ * Unlike the standard C library ispunct() function, this only
+ * recognizes standard ASCII letters and ignores the locale,
+ * returning %FALSE for all non-ASCII characters. Also, unlike
+ * the standard library function, this takes a <type>char</type>,
+ * not an <type>int</type>, so don't call it on <literal>EOF</literal>, but no need to
+ * cast to #guchar before passing a possibly non-ASCII character in.
+ *
+ * Returns: %TRUE if @c is an ASCII punctuation character.
+ */
+
+
+/**
+ * g_ascii_isspace:
+ * @c: any character
+ *
+ * Determines whether a character is a white-space character.
+ *
+ * Unlike the standard C library isspace() function, this only
+ * recognizes standard ASCII white-space and ignores the locale,
+ * returning %FALSE for all non-ASCII characters. Also, unlike
+ * the standard library function, this takes a <type>char</type>,
+ * not an <type>int</type>, so don't call it on <literal>EOF</literal>, but no need to
+ * cast to #guchar before passing a possibly non-ASCII character in.
+ *
+ * Returns: %TRUE if @c is an ASCII white-space character
+ */
+
+
+/**
+ * g_ascii_isupper:
+ * @c: any character
+ *
+ * Determines whether a character is an ASCII upper case letter.
+ *
+ * Unlike the standard C library isupper() function, this only
+ * recognizes standard ASCII letters and ignores the locale,
+ * returning %FALSE for all non-ASCII characters. Also, unlike
+ * the standard library function, this takes a <type>char</type>,
+ * not an <type>int</type>, so don't call it on <literal>EOF</literal>, but no need to
+ * worry about casting to #guchar before passing a possibly non-ASCII
+ * character in.
+ *
+ * Returns: %TRUE if @c is an ASCII upper case letter
+ */
+
+
+/**
+ * g_ascii_isxdigit:
+ * @c: any character
+ *
+ * Determines whether a character is a hexadecimal-digit character.
+ *
+ * Unlike the standard C library isxdigit() function, this takes
+ * a <type>char</type>, not an <type>int</type>, so don't call it
+ * on <literal>EOF</literal>, but no need to cast to #guchar before passing a
+ * possibly non-ASCII character in.
+ *
+ * Returns: %TRUE if @c is an ASCII hexadecimal-digit character.
+ */
+
+
+/**
+ * g_ascii_strcasecmp:
+ * @s1: string to compare with @s2.
+ * @s2: string to compare with @s1.
+ *
+ * Compare two strings, ignoring the case of ASCII characters.
+ *
+ * Unlike the BSD strcasecmp() function, this only recognizes standard
+ * ASCII letters and ignores the locale, treating all non-ASCII
+ * bytes as if they are not letters.
+ *
+ * This function should be used only on strings that are known to be
+ * in encodings where the bytes corresponding to ASCII letters always
+ * represent themselves. This includes UTF-8 and the ISO-8859-*
+ * charsets, but not for instance double-byte encodings like the
+ * Windows Codepage 932, where the trailing bytes of double-byte
+ * characters include all ASCII letters. If you compare two CP932
+ * strings using this function, you will get false matches.
+ *
+ * or a positive value if @s1 &gt; @s2.
+ *
+ * Returns: 0 if the strings match, a negative value if @s1 &lt; @s2,
+ */
+
+
+/**
+ * g_ascii_strdown:
+ * @str: a string.
+ * @len: length of @str in bytes, or -1 if @str is nul-terminated.
+ *
+ * Converts all upper case ASCII letters to lower case ASCII letters.
+ *
+ * characters in @str converted to lower case, with
+ * semantics that exactly match g_ascii_tolower(). (Note
+ * that this is unlike the old g_strdown(), which modified
+ * the string in place.)
+ *
+ * Returns: a newly-allocated string, with all the upper case
+ */
+
+
+/**
+ * g_ascii_strncasecmp:
+ * @s1: string to compare with @s2.
+ * @s2: string to compare with @s1.
+ * @n: number of characters to compare.
+ *
+ * Compare @s1 and @s2, ignoring the case of ASCII characters and any
+ * characters after the first @n in each string.
+ *
+ * Unlike the BSD strcasecmp() function, this only recognizes standard
+ * ASCII letters and ignores the locale, treating all non-ASCII
+ * characters as if they are not letters.
+ *
+ * The same warning as in g_ascii_strcasecmp() applies: Use this
+ * function only on strings known to be in encodings where bytes
+ * corresponding to ASCII letters always represent themselves.
+ *
+ * or a positive value if @s1 &gt; @s2.
+ *
+ * Returns: 0 if the strings match, a negative value if @s1 &lt; @s2,
+ */
+
+
+/**
+ * g_ascii_strtod:
+ * @nptr: the string to convert to a numeric value.
+ * @endptr: if non-%NULL, it returns the character after the last character used in the conversion.
+ *
+ * Converts a string to a #gdouble value.
+ *
+ * This function behaves like the standard strtod() function
+ * does in the C locale. It does this without actually changing
+ * the current locale, since that would not be thread-safe.
+ * A limitation of the implementation is that this function
+ * will still accept localized versions of infinities and NANs.
+ *
+ * This function is typically used when reading configuration
+ * files or other non-user input that should be locale independent.
+ * To handle input from the user you should normally use the
+ * locale-sensitive system strtod() function.
+ *
+ * To convert from a #gdouble to a string in a locale-insensitive
+ * way, use g_ascii_dtostr().
+ *
+ * If the correct value would cause overflow, plus or minus <literal>HUGE_VAL</literal>
+ * is returned (according to the sign of the value), and <literal>ERANGE</literal> is
+ * stored in <literal>errno</literal>. If the correct value would cause underflow,
+ * zero is returned and <literal>ERANGE</literal> is stored in <literal>errno</literal>.
+ *
+ * This function resets <literal>errno</literal> before calling strtod() so that
+ * you can reliably detect overflow and underflow.
+ *
+ * Returns: the #gdouble value.
+ */
+
+
+/**
+ * g_ascii_strtoll:
+ * @nptr: the string to convert to a numeric value.
+ * @endptr: if non-%NULL, it returns the character after the last character used in the conversion.
+ * @base: to be used for the conversion, 2..36 or 0
+ *
+ * Converts a string to a #gint64 value.
+ * This function behaves like the standard strtoll() function
+ * does in the C locale. It does this without actually
+ * changing the current locale, since that would not be
+ * thread-safe.
+ *
+ * This function is typically used when reading configuration
+ * files or other non-user input that should be locale independent.
+ * To handle input from the user you should normally use the
+ * locale-sensitive system strtoll() function.
+ *
+ * If the correct value would cause overflow, %G_MAXINT64 or %G_MININT64
+ * is returned, and <literal>ERANGE</literal> is stored in <literal>errno</literal>.
+ * If the base is outside the valid range, zero is returned, and
+ * <literal>EINVAL</literal> is stored in <literal>errno</literal>. If the
+ * string conversion fails, zero is returned, and @endptr returns @nptr
+ * (if @endptr is non-%NULL).
+ *
+ * Returns: the #gint64 value or zero on error.
+ * Since: 2.12
+ */
+
+
+/**
+ * g_ascii_strtoull:
+ * @nptr: the string to convert to a numeric value.
+ * @endptr: if non-%NULL, it returns the character after the last character used in the conversion.
+ * @base: to be used for the conversion, 2..36 or 0
+ *
+ * Converts a string to a #guint64 value.
+ * This function behaves like the standard strtoull() function
+ * does in the C locale. It does this without actually
+ * changing the current locale, since that would not be
+ * thread-safe.
+ *
+ * This function is typically used when reading configuration
+ * files or other non-user input that should be locale independent.
+ * To handle input from the user you should normally use the
+ * locale-sensitive system strtoull() function.
+ *
+ * If the correct value would cause overflow, %G_MAXUINT64
+ * is returned, and <literal>ERANGE</literal> is stored in <literal>errno</literal>.
+ * If the base is outside the valid range, zero is returned, and
+ * <literal>EINVAL</literal> is stored in <literal>errno</literal>.
+ * If the string conversion fails, zero is returned, and @endptr returns
+ * @nptr (if @endptr is non-%NULL).
+ *
+ * Returns: the #guint64 value or zero on error.
+ * Since: 2.2
+ */
+
+
+/**
+ * g_ascii_strup:
+ * @str: a string.
+ * @len: length of @str in bytes, or -1 if @str is nul-terminated.
+ *
+ * Converts all lower case ASCII letters to upper case ASCII letters.
+ *
+ * characters in @str converted to upper case, with
+ * semantics that exactly match g_ascii_toupper(). (Note
+ * that this is unlike the old g_strup(), which modified
+ * the string in place.)
+ *
+ * Returns: a newly allocated string, with all the lower case
+ */
+
+
+/**
+ * g_ascii_tolower:
+ * @c: any character.
+ *
+ * Convert a character to ASCII lower case.
+ *
+ * Unlike the standard C library tolower() function, this only
+ * recognizes standard ASCII letters and ignores the locale, returning
+ * all non-ASCII characters unchanged, even if they are lower case
+ * letters in a particular character set. Also unlike the standard
+ * library function, this takes and returns a char, not an int, so
+ * don't call it on <literal>EOF</literal> but no need to worry about casting to #guchar
+ * before passing a possibly non-ASCII character in.
+ *
+ * If @c is not an ASCII upper case letter,
+ * @c is returned unchanged.
+ *
+ * Returns: the result of converting @c to lower case.
+ */
+
+
+/**
+ * g_ascii_toupper:
+ * @c: any character.
+ *
+ * Convert a character to ASCII upper case.
+ *
+ * Unlike the standard C library toupper() function, this only
+ * recognizes standard ASCII letters and ignores the locale, returning
+ * all non-ASCII characters unchanged, even if they are upper case
+ * letters in a particular character set. Also unlike the standard
+ * library function, this takes and returns a char, not an int, so
+ * don't call it on <literal>EOF</literal> but no need to worry about casting to #guchar
+ * before passing a possibly non-ASCII character in.
+ *
+ * If @c is not an ASCII lower case letter,
+ * @c is returned unchanged.
+ *
+ * Returns: the result of converting @c to upper case.
+ */
+
+
+/**
+ * g_ascii_xdigit_value:
+ * @c: an ASCII character.
+ *
+ * Determines the numeric value of a character as a hexidecimal
+ * digit. Differs from g_unichar_xdigit_value() because it takes
+ * a char, so there's no worry about sign extension if characters
+ * are signed.
+ *
+ * g_ascii_isxdigit()), its numeric value. Otherwise, -1.
+ *
+ * Returns: If @c is a hex digit (according to
+ */
+
+
+/**
+ * g_assert:
+ * @expr: the expression to check
+ *
+ * Debugging macro to terminate the application if the assertion
+ * fails. If the assertion fails (i.e. the expression is not true),
+ * an error message is logged and the application is terminated.
+ *
+ * The macro can be turned off in final releases of code by defining
+ * <envar>G_DISABLE_ASSERT</envar> when compiling the application.
+ */
+
+
+/**
+ * g_assert_cmpfloat:
+ * @n1: an floating point number
+ * @cmp: The comparison operator to use. One of ==, !=, &lt;, &gt;, &lt;=, &gt;=.
+ * @n2: another floating point number
+ *
+ * Debugging macro to terminate the application with a warning
+ * message if a floating point number comparison fails.
+ *
+ * The effect of <literal>g_assert_cmpfloat (n1, op, n2)</literal> is
+ * the same as <literal>g_assert (n1 op n2)</literal>. The advantage
+ * of this macro is that it can produce a message that includes the
+ * actual values of @n1 and @n2.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_assert_cmphex:
+ * @n1: an unsigned integer
+ * @cmp: The comparison operator to use. One of ==, !=, &lt;, &gt;, &lt;=, &gt;=.
+ * @n2: another unsigned integer
+ *
+ * Debugging macro to terminate the application with a warning
+ * message if an unsigned integer comparison fails.
+ *
+ * This is a variant of g_assert_cmpuint() that displays the numbers
+ * in hexadecimal notation in the message.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_assert_cmpint:
+ * @n1: an integer
+ * @cmp: The comparison operator to use. One of ==, !=, &lt;, &gt;, &lt;=, &gt;=.
+ * @n2: another integer
+ *
+ * Debugging macro to terminate the application with a warning
+ * message if an integer comparison fails.
+ *
+ * The effect of <literal>g_assert_cmpint (n1, op, n2)</literal> is
+ * the same as <literal>g_assert (n1 op n2)</literal>. The advantage
+ * of this macro is that it can produce a message that includes the
+ * actual values of @n1 and @n2.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_assert_cmpstr:
+ * @s1: a string (may be %NULL)
+ * @cmp: The comparison operator to use. One of ==, !=, &lt;, &gt;, &lt;=, &gt;=.
+ * @s2: another string (may be %NULL)
+ *
+ * Debugging macro to terminate the application with a warning
+ * message if a string comparison fails. The strings are compared
+ * using g_strcmp0().
+ *
+ * The effect of <literal>g_assert_cmpstr (s1, op, s2)</literal> is
+ * the same as <literal>g_assert (g_strcmp0 (s1, s2) op 0)</literal>.
+ * The advantage of this macro is that it can produce a message that
+ * includes the actual values of @s1 and @s2.
+ *
+ * |[
+ * g_assert_cmpstr (mystring, ==, "fubar");
+ * ]|
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_assert_cmpuint:
+ * @n1: an unsigned integer
+ * @cmp: The comparison operator to use. One of ==, !=, &lt;, &gt;, &lt;=, &gt;=.
+ * @n2: another unsigned integer
+ *
+ * Debugging macro to terminate the application with a warning
+ * message if an unsigned integer comparison fails.
+ *
+ * The effect of <literal>g_assert_cmpuint (n1, op, n2)</literal> is
+ * the same as <literal>g_assert (n1 op n2)</literal>. The advantage
+ * of this macro is that it can produce a message that includes the
+ * actual values of @n1 and @n2.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_assert_error:
+ * @err: a #GError, possibly %NULL
+ * @dom: the expected error domain (a #GQuark)
+ * @c: the expected error code
+ *
+ * Debugging macro to terminate the application with a warning
+ * message if a method has not returned the correct #GError.
+ *
+ * The effect of <literal>g_assert_error (err, dom, c)</literal> is
+ * the same as <literal>g_assert (err != NULL &amp;&amp; err->domain
+ * == dom &amp;&amp; err->code == c)</literal>. The advantage of this
+ * macro is that it can produce a message that includes the incorrect
+ * error message and code.
+ *
+ * This can only be used to test for a specific error. If you want to
+ * test that @err is set, but don't care what it's set to, just use
+ * <literal>g_assert (err != NULL)</literal>
+ *
+ * Since: 2.20
+ */
+
+
+/**
+ * g_assert_no_error:
+ * @err: a #GError, possibly %NULL
+ *
+ * Debugging macro to terminate the application with a warning
+ * message if a method has returned a #GError.
+ *
+ * The effect of <literal>g_assert_no_error (err)</literal> is
+ * the same as <literal>g_assert (err == NULL)</literal>. The advantage
+ * of this macro is that it can produce a message that includes
+ * the error message and code.
+ *
+ * Since: 2.20
+ */
+
+
+/**
+ * g_assert_not_reached:
+ *
+ * Debugging macro to terminate the application if it is ever
+ * reached. If it is reached, an error message is logged and the
+ * application is terminated.
+ *
+ * The macro can be turned off in final releases of code by defining
+ * <envar>G_DISABLE_ASSERT</envar> when compiling the application.
+ */
+
+
+/**
+ * g_async_queue_length:
+ * @queue: a #GAsyncQueue.
+ *
+ * Returns the length of the queue.
+ *
+ * Actually this function returns the number of data items in
+ * the queue minus the number of waiting threads, so a negative
+ * value means waiting threads, and a positive value means available
+ * entries in the @queue. A return value of 0 could mean n entries
+ * in the queue and n threads waiting. This can happen due to locking
+ * of the queue or due to scheduling.
+ *
+ * Returns: the length of the @queue
+ */
+
+
+/**
+ * g_async_queue_length_unlocked:
+ * @queue: a #GAsyncQueue
+ *
+ * Returns the length of the queue.
+ *
+ * Actually this function returns the number of data items in
+ * the queue minus the number of waiting threads, so a negative
+ * value means waiting threads, and a positive value means available
+ * entries in the @queue. A return value of 0 could mean n entries
+ * in the queue and n threads waiting. This can happen due to locking
+ * of the queue or due to scheduling.
+ *
+ * This function must be called while holding the @queue's lock.
+ *
+ * Returns: the length of the @queue.
+ */
+
+
+/**
+ * g_async_queue_lock:
+ * @queue: a #GAsyncQueue
+ *
+ * Acquires the @queue's lock. If another thread is already
+ * holding the lock, this call will block until the lock
+ * becomes available.
+ *
+ * Call g_async_queue_unlock() to drop the lock again.
+ *
+ * While holding the lock, you can only call the
+ * <function>g_async_queue_*_unlocked()</function> functions
+ * on @queue. Otherwise, deadlock may occur.
+ */
+
+
+/**
+ * g_async_queue_new:
+ *
+ * Creates a new asynchronous queue.
+ *
+ * Returns: a new #GAsyncQueue. Free with g_async_queue_unref()
+ */
+
+
+/**
+ * g_async_queue_new_full:
+ * @item_free_func: function to free queue elements
+ *
+ * Creates a new asynchronous queue and sets up a destroy notify
+ * function that is used to free any remaining queue items when
+ * the queue is destroyed after the final unref.
+ *
+ * Returns: a new #GAsyncQueue. Free with g_async_queue_unref()
+ * Since: 2.16
+ */
+
+
+/**
+ * g_async_queue_pop:
+ * @queue: a #GAsyncQueue
+ *
+ * Pops data from the @queue. If @queue is empty, this function
+ * blocks until data becomes available.
+ *
+ * Returns: data from the queue
+ */
+
+
+/**
+ * g_async_queue_pop_unlocked:
+ * @queue: a #GAsyncQueue
+ *
+ * Pops data from the @queue. If @queue is empty, this function
+ * blocks until data becomes available.
+ *
+ * This function must be called while holding the @queue's lock.
+ *
+ * Returns: data from the queue.
+ */
+
+
+/**
+ * g_async_queue_push:
+ * @queue: a #GAsyncQueue
+ * @data: @data to push into the @queue
+ *
+ * Pushes the @data into the @queue. @data must not be %NULL.
+ */
+
+
+/**
+ * g_async_queue_push_sorted:
+ * @queue: a #GAsyncQueue
+ * @data: the @data to push into the @queue
+ * @func: the #GCompareDataFunc is used to sort @queue
+ * @user_data: user data passed to @func.
+ *
+ * Inserts @data into @queue using @func to determine the new
+ * position.
+ *
+ * This function requires that the @queue is sorted before pushing on
+ * new elements, see g_async_queue_sort().
+ *
+ * This function will lock @queue before it sorts the queue and unlock
+ * it when it is finished.
+ *
+ * For an example of @func see g_async_queue_sort().
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * g_async_queue_push_sorted_unlocked:
+ * @queue: a #GAsyncQueue
+ * @data: the @data to push into the @queue
+ * @func: the #GCompareDataFunc is used to sort @queue
+ * @user_data: user data passed to @func.
+ *
+ * Inserts @data into @queue using @func to determine the new
+ * position.
+ *
+ * The sort function @func is passed two elements of the @queue.
+ * It should return 0 if they are equal, a negative value if the
+ * first element should be higher in the @queue or a positive value
+ * if the first element should be lower in the @queue than the second
+ * element.
+ *
+ * This function requires that the @queue is sorted before pushing on
+ * new elements, see g_async_queue_sort().
+ *
+ * This function must be called while holding the @queue's lock.
+ *
+ * For an example of @func see g_async_queue_sort().
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * g_async_queue_push_unlocked:
+ * @queue: a #GAsyncQueue
+ * @data: @data to push into the @queue
+ *
+ * Pushes the @data into the @queue. @data must not be %NULL.
+ *
+ * This function must be called while holding the @queue's lock.
+ */
+
+
+/**
+ * g_async_queue_ref:
+ * @queue: a #GAsyncQueue
+ *
+ * Increases the reference count of the asynchronous @queue by 1.
+ * You do not need to hold the lock to call this function.
+ *
+ * Returns: the @queue that was passed in (since 2.6)
+ */
+
+
+/**
+ * g_async_queue_ref_unlocked:
+ * @queue: a #GAsyncQueue
+ * @Deprecated: Since 2.8, reference counting is done atomically
+ *
+ * Increases the reference count of the asynchronous @queue by 1.
+ *
+ * so g_async_queue_ref() can be used regardless of the @queue's
+ * lock.
+ */
+
+
+/**
+ * g_async_queue_sort:
+ * @queue: a #GAsyncQueue
+ * @func: the #GCompareDataFunc is used to sort @queue
+ * @user_data: user data passed to @func
+ *
+ * Sorts @queue using @func.
+ *
+ * The sort function @func is passed two elements of the @queue.
+ * It should return 0 if they are equal, a negative value if the
+ * first element should be higher in the @queue or a positive value
+ * if the first element should be lower in the @queue than the second
+ * element.
+ *
+ * This function will lock @queue before it sorts the queue and unlock
+ * it when it is finished.
+ *
+ * If you were sorting a list of priority numbers to make sure the
+ * lowest priority would be at the top of the queue, you could use:
+ * |[
+ * gint32 id1;
+ * gint32 id2;
+ *
+ * id1 = GPOINTER_TO_INT (element1);
+ * id2 = GPOINTER_TO_INT (element2);
+ *
+ * return (id1 > id2 ? +1 : id1 == id2 ? 0 : -1);
+ * ]|
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * g_async_queue_sort_unlocked:
+ * @queue: a #GAsyncQueue
+ * @func: the #GCompareDataFunc is used to sort @queue
+ * @user_data: user data passed to @func
+ *
+ * Sorts @queue using @func.
+ *
+ * The sort function @func is passed two elements of the @queue.
+ * It should return 0 if they are equal, a negative value if the
+ * first element should be higher in the @queue or a positive value
+ * if the first element should be lower in the @queue than the second
+ * element.
+ *
+ * This function must be called while holding the @queue's lock.
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * g_async_queue_timed_pop:
+ * @queue: a #GAsyncQueue
+ * @end_time: a #GTimeVal, determining the final time
+ *
+ * Pops data from the @queue. If the queue is empty, blocks until
+ * @end_time or until data becomes available.
+ *
+ * If no data is received before @end_time, %NULL is returned.
+ *
+ * To easily calculate @end_time, a combination of g_get_current_time()
+ * and g_time_val_add() can be used.
+ *
+ * received before @end_time.
+ *
+ * Returns: data from the queue or %NULL, when no data is
+ * Deprecated: use g_async_queue_timeout_pop().
+ */
+
+
+/**
+ * g_async_queue_timed_pop_unlocked:
+ * @queue: a #GAsyncQueue
+ * @end_time: a #GTimeVal, determining the final time
+ *
+ * Pops data from the @queue. If the queue is empty, blocks until
+ * @end_time or until data becomes available.
+ *
+ * If no data is received before @end_time, %NULL is returned.
+ *
+ * To easily calculate @end_time, a combination of g_get_current_time()
+ * and g_time_val_add() can be used.
+ *
+ * This function must be called while holding the @queue's lock.
+ *
+ * received before @end_time.
+ *
+ * Returns: data from the queue or %NULL, when no data is
+ * Deprecated: use g_async_queue_timeout_pop_unlocked().
+ */
+
+
+/**
+ * g_async_queue_timeout_pop:
+ * @queue: a #GAsyncQueue
+ * @timeout: the number of microseconds to wait
+ *
+ * Pops data from the @queue. If the queue is empty, blocks for
+ * @timeout microseconds, or until data becomes available.
+ *
+ * If no data is received before the timeout, %NULL is returned.
+ *
+ * received before the timeout.
+ *
+ * Returns: data from the queue or %NULL, when no data is
+ */
+
+
+/**
+ * g_async_queue_timeout_pop_unlocked:
+ * @queue: a #GAsyncQueue
+ * @timeout: the number of microseconds to wait
+ *
+ * Pops data from the @queue. If the queue is empty, blocks for
+ * @timeout microseconds, or until data becomes available.
+ *
+ * If no data is received before the timeout, %NULL is returned.
+ *
+ * This function must be called while holding the @queue's lock.
+ *
+ * received before the timeout.
+ *
+ * Returns: data from the queue or %NULL, when no data is
+ */
+
+
+/**
+ * g_async_queue_try_pop:
+ * @queue: a #GAsyncQueue
+ *
+ * Tries to pop data from the @queue. If no data is available,
+ * %NULL is returned.
+ *
+ * available immediately.
+ *
+ * Returns: data from the queue or %NULL, when no data is
+ */
+
+
+/**
+ * g_async_queue_try_pop_unlocked:
+ * @queue: a #GAsyncQueue
+ *
+ * Tries to pop data from the @queue. If no data is available,
+ * %NULL is returned.
+ *
+ * This function must be called while holding the @queue's lock.
+ *
+ * available immediately.
+ *
+ * Returns: data from the queue or %NULL, when no data is
+ */
+
+
+/**
+ * g_async_queue_unlock:
+ * @queue: a #GAsyncQueue
+ *
+ * Releases the queue's lock.
+ *
+ * Calling this function when you have not acquired
+ * the with g_async_queue_lock() leads to undefined
+ * behaviour.
+ */
+
+
+/**
+ * g_async_queue_unref:
+ * @queue: a #GAsyncQueue.
+ *
+ * Decreases the reference count of the asynchronous @queue by 1.
+ *
+ * If the reference count went to 0, the @queue will be destroyed
+ * and the memory allocated will be freed. So you are not allowed
+ * to use the @queue afterwards, as it might have disappeared.
+ * You do not need to hold the lock to call this function.
+ */
+
+
+/**
+ * g_async_queue_unref_and_unlock:
+ * @queue: a #GAsyncQueue
+ * @Deprecated: Since 2.8, reference counting is done atomically
+ *
+ * Decreases the reference count of the asynchronous @queue by 1
+ * and releases the lock. This function must be called while holding
+ * the @queue's lock. If the reference count went to 0, the @queue
+ * will be destroyed and the memory allocated will be freed.
+ *
+ * so g_async_queue_unref() can be used regardless of the @queue's
+ * lock.
+ */
+
+
+/**
+ * g_atexit:
+ * @func: (scope async): the function to call on normal program termination.
+ *
+ * Specifies a function to be called at normal program termination.
+ *
+ * Since GLib 2.8.2, on Windows g_atexit() actually is a preprocessor
+ * macro that maps to a call to the atexit() function in the C
+ * library. This means that in case the code that calls g_atexit(),
+ * i.e. atexit(), is in a DLL, the function will be called when the
+ * DLL is detached from the program. This typically makes more sense
+ * than that the function is called when the GLib DLL is detached,
+ * which happened earlier when g_atexit() was a function in the GLib
+ * DLL.
+ *
+ * The behaviour of atexit() in the context of dynamically loaded
+ * modules is not formally specified and varies wildly.
+ *
+ * On POSIX systems, calling g_atexit() (or atexit()) in a dynamically
+ * loaded module which is unloaded before the program terminates might
+ * well cause a crash at program exit.
+ *
+ * Some POSIX systems implement atexit() like Windows, and have each
+ * dynamically loaded module maintain an own atexit chain that is
+ * called when the module is unloaded.
+ *
+ * On other POSIX systems, before a dynamically loaded module is
+ * unloaded, the registered atexit functions (if any) residing in that
+ * module are called, regardless where the code that registered them
+ * resided. This is presumably the most robust approach.
+ *
+ * As can be seen from the above, for portability it's best to avoid
+ * calling g_atexit() (or atexit()) except in the main executable of a
+ * program.
+ *
+ * Deprecated:2.32: It is best to avoid g_atexit().
+ */
+
+
+/**
+ * g_atomic_int_add:
+ * @atomic: a pointer to a #gint or #guint
+ * @val: the value to add
+ *
+ * Atomically adds @val to the value of @atomic.
+ *
+ * Think of this operation as an atomic version of
+ * <literal>{ tmp = *atomic; *@atomic += @val; return tmp; }</literal>
+ *
+ * This call acts as a full compiler and hardware memory barrier.
+ *
+ * Before version 2.30, this function did not return a value
+ * (but g_atomic_int_exchange_and_add() did, and had the same meaning).
+ *
+ * Returns: the value of @atomic before the add, signed
+ * Since: 2.4
+ */
+
+
+/**
+ * g_atomic_int_and:
+ * @atomic: a pointer to a #gint or #guint
+ * @val: the value to 'and'
+ *
+ * Performs an atomic bitwise 'and' of the value of @atomic and @val,
+ * storing the result back in @atomic.
+ *
+ * This call acts as a full compiler and hardware memory barrier.
+ *
+ * Think of this operation as an atomic version of
+ * <literal>{ tmp = *atomic; *@atomic &= @val; return tmp; }</literal>
+ *
+ * Returns: the value of @atomic before the operation, unsigned
+ * Since: 2.30
+ */
+
+
+/**
+ * g_atomic_int_compare_and_exchange:
+ * @atomic: a pointer to a #gint or #guint
+ * @oldval: the value to compare with
+ * @newval: the value to conditionally replace with
+ *
+ * Compares @atomic to @oldval and, if equal, sets it to @newval.
+ * If @atomic was not equal to @oldval then no change occurs.
+ *
+ * This compare and exchange is done atomically.
+ *
+ * Think of this operation as an atomic version of
+ * <literal>{ if (*@atomic == @oldval) { *@atomic = @newval; return TRUE; } else return FALSE; }</literal>
+ *
+ * This call acts as a full compiler and hardware memory barrier.
+ *
+ * Returns: %TRUE if the exchange took place
+ * Since: 2.4
+ */
+
+
+/**
+ * g_atomic_int_dec_and_test:
+ * @atomic: a pointer to a #gint or #guint
+ *
+ * Decrements the value of @atomic by 1.
+ *
+ * Think of this operation as an atomic version of
+ * <literal>{ *@atomic -= 1; return (*@atomic == 0); }</literal>
+ *
+ * This call acts as a full compiler and hardware memory barrier.
+ *
+ * Returns: %TRUE if the resultant value is zero
+ * Since: 2.4
+ */
+
+
+/**
+ * g_atomic_int_exchange_and_add:
+ * @atomic: a pointer to a #gint
+ * @val: the value to add
+ *
+ * This function existed before g_atomic_int_add() returned the prior
+ * value of the integer (which it now does).  It is retained only for
+ * compatibility reasons.  Don't use this function in new code.
+ *
+ * Returns: the value of @atomic before the add, signed
+ * Since: 2.4
+ * Deprecated: 2.30: Use g_atomic_int_add() instead.
+ */
+
+
+/**
+ * g_atomic_int_get:
+ * @atomic: a pointer to a #gint or #guint
+ *
+ * Gets the current value of @atomic.
+ *
+ * This call acts as a full compiler and hardware
+ * memory barrier (before the get).
+ *
+ * Returns: the value of the integer
+ * Since: 2.4
+ */
+
+
+/**
+ * g_atomic_int_inc:
+ * @atomic: a pointer to a #gint or #guint
+ *
+ * Increments the value of @atomic by 1.
+ *
+ * Think of this operation as an atomic version of
+ * <literal>{ *@atomic += 1; }</literal>
+ *
+ * This call acts as a full compiler and hardware memory barrier.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_atomic_int_or:
+ * @atomic: a pointer to a #gint or #guint
+ * @val: the value to 'or'
+ *
+ * Performs an atomic bitwise 'or' of the value of @atomic and @val,
+ * storing the result back in @atomic.
+ *
+ * Think of this operation as an atomic version of
+ * <literal>{ tmp = *atomic; *@atomic |= @val; return tmp; }</literal>
+ *
+ * This call acts as a full compiler and hardware memory barrier.
+ *
+ * Returns: the value of @atomic before the operation, unsigned
+ * Since: 2.30
+ */
+
+
+/**
+ * g_atomic_int_set:
+ * @atomic: a pointer to a #gint or #guint
+ * @newval: a new value to store
+ *
+ * Sets the value of @atomic to @newval.
+ *
+ * This call acts as a full compiler and hardware
+ * memory barrier (after the set).
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_atomic_int_xor:
+ * @atomic: a pointer to a #gint or #guint
+ * @val: the value to 'xor'
+ *
+ * Performs an atomic bitwise 'xor' of the value of @atomic and @val,
+ * storing the result back in @atomic.
+ *
+ * Think of this operation as an atomic version of
+ * <literal>{ tmp = *atomic; *@atomic ^= @val; return tmp; }</literal>
+ *
+ * This call acts as a full compiler and hardware memory barrier.
+ *
+ * Returns: the value of @atomic before the operation, unsigned
+ * Since: 2.30
+ */
+
+
+/**
+ * g_atomic_pointer_add:
+ * @atomic: a pointer to a #gpointer-sized value
+ * @val: the value to add
+ *
+ * Atomically adds @val to the value of @atomic.
+ *
+ * Think of this operation as an atomic version of
+ * <literal>{ tmp = *atomic; *@atomic += @val; return tmp; }</literal>
+ *
+ * This call acts as a full compiler and hardware memory barrier.
+ *
+ * Returns: the value of @atomic before the add, signed
+ * Since: 2.30
+ */
+
+
+/**
+ * g_atomic_pointer_and:
+ * @atomic: a pointer to a #gpointer-sized value
+ * @val: the value to 'and'
+ *
+ * Performs an atomic bitwise 'and' of the value of @atomic and @val,
+ * storing the result back in @atomic.
+ *
+ * Think of this operation as an atomic version of
+ * <literal>{ tmp = *atomic; *@atomic &= @val; return tmp; }</literal>
+ *
+ * This call acts as a full compiler and hardware memory barrier.
+ *
+ * Returns: the value of @atomic before the operation, unsigned
+ * Since: 2.30
+ */
+
+
+/**
+ * g_atomic_pointer_compare_and_exchange:
+ * @atomic: a pointer to a #gpointer-sized value
+ * @oldval: the value to compare with
+ * @newval: the value to conditionally replace with
+ *
+ * Compares @atomic to @oldval and, if equal, sets it to @newval.
+ * If @atomic was not equal to @oldval then no change occurs.
+ *
+ * This compare and exchange is done atomically.
+ *
+ * Think of this operation as an atomic version of
+ * <literal>{ if (*@atomic == @oldval) { *@atomic = @newval; return TRUE; } else return FALSE; }</literal>
+ *
+ * This call acts as a full compiler and hardware memory barrier.
+ *
+ * Returns: %TRUE if the exchange took place
+ * Since: 2.4
+ */
+
+
+/**
+ * g_atomic_pointer_get:
+ * @atomic: a pointer to a #gpointer-sized value
+ *
+ * Gets the current value of @atomic.
+ *
+ * This call acts as a full compiler and hardware
+ * memory barrier (before the get).
+ *
+ * Returns: the value of the pointer
+ * Since: 2.4
+ */
+
+
+/**
+ * g_atomic_pointer_or:
+ * @atomic: a pointer to a #gpointer-sized value
+ * @val: the value to 'or'
+ *
+ * Performs an atomic bitwise 'or' of the value of @atomic and @val,
+ * storing the result back in @atomic.
+ *
+ * Think of this operation as an atomic version of
+ * <literal>{ tmp = *atomic; *@atomic |= @val; return tmp; }</literal>
+ *
+ * This call acts as a full compiler and hardware memory barrier.
+ *
+ * Returns: the value of @atomic before the operation, unsigned
+ * Since: 2.30
+ */
+
+
+/**
+ * g_atomic_pointer_set:
+ * @atomic: a pointer to a #gpointer-sized value
+ * @newval: a new value to store
+ *
+ * Sets the value of @atomic to @newval.
+ *
+ * This call acts as a full compiler and hardware
+ * memory barrier (after the set).
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_atomic_pointer_xor:
+ * @atomic: a pointer to a #gpointer-sized value
+ * @val: the value to 'xor'
+ *
+ * Performs an atomic bitwise 'xor' of the value of @atomic and @val,
+ * storing the result back in @atomic.
+ *
+ * Think of this operation as an atomic version of
+ * <literal>{ tmp = *atomic; *@atomic ^= @val; return tmp; }</literal>
+ *
+ * This call acts as a full compiler and hardware memory barrier.
+ *
+ * Returns: the value of @atomic before the operation, unsigned
+ * Since: 2.30
+ */
+
+
+/**
+ * g_base64_decode:
+ * @text: zero-terminated string with base64 text to decode
+ * @out_len: (out): The length of the decoded data is written here
+ *
+ * Decode a sequence of Base-64 encoded text into binary data
+ *
+ * newly allocated buffer containing the binary data
+ * that @text represents. The returned buffer must
+ * be freed with g_free().
+ *
+ * Returns: (transfer full) (array length=out_len) (element-type guint8):
+ * Since: 2.12
+ */
+
+
+/**
+ * g_base64_decode_inplace:
+ * @text: (inout) (array length=out_len) (element-type guint8): zero-terminated string with base64 text to decode
+ * @out_len: (inout): The length of the decoded data is written here
+ *
+ * Decode a sequence of Base-64 encoded text into binary data
+ * by overwriting the input data.
+ *
+ * is the same as the input @text.
+ *
+ * Returns: (transfer none): The binary data that @text responds. This pointer
+ * Since: 2.20
+ */
+
+
+/**
+ * g_base64_decode_step:
+ * @in: (array length=len) (element-type guint8): binary input data
+ * @len: max length of @in data to decode
+ * @out: (out) (array) (element-type guint8): output buffer
+ * @state: (inout): Saved state between steps, initialize to 0
+ * @save: (inout): Saved state between steps, initialize to 0
+ *
+ * Incrementally decode a sequence of binary data from its Base-64 stringified
+ * representation. By calling this function multiple times you can convert
+ * data in chunks to avoid having to have the full encoded data in memory.
+ *
+ * The output buffer must be large enough to fit all the data that will
+ * be written to it. Since base64 encodes 3 bytes in 4 chars you need
+ * at least: (@len / 4) * 3 + 3 bytes (+ 3 may be needed in case of non-zero
+ * state).
+ *
+ * Returns: The number of bytes of output that was written
+ * Since: 2.12
+ */
+
+
+/**
+ * g_base64_encode:
+ * @data: (array length=len) (element-type guint8): the binary data to encode
+ * @len: the length of @data
+ *
+ * Encode a sequence of binary data into its Base-64 stringified
+ * representation.
+ *
+ * encoded string representing @data. The returned string must
+ * be freed with g_free().
+ *
+ * Returns: (transfer full): a newly allocated, zero-terminated Base-64
+ * Since: 2.12
+ */
+
+
+/**
+ * g_base64_encode_close:
+ * @break_lines: whether to break long lines
+ * @out: (out) (array) (element-type guint8): pointer to destination buffer
+ * @state: (inout): Saved state from g_base64_encode_step()
+ * @save: (inout): Saved state from g_base64_encode_step()
+ *
+ * Flush the status from a sequence of calls to g_base64_encode_step().
+ *
+ * The output buffer must be large enough to fit all the data that will
+ * be written to it. It will need up to 4 bytes, or up to 5 bytes if
+ * line-breaking is enabled.
+ *
+ * Returns: The number of bytes of output that was written
+ * Since: 2.12
+ */
+
+
+/**
+ * g_base64_encode_step:
+ * @in: (array length=len) (element-type guint8): the binary data to encode
+ * @len: the length of @in
+ * @break_lines: whether to break long lines
+ * @out: (out) (array) (element-type guint8): pointer to destination buffer
+ * @state: (inout): Saved state between steps, initialize to 0
+ * @save: (inout): Saved state between steps, initialize to 0
+ *
+ * Incrementally encode a sequence of binary data into its Base-64 stringified
+ * representation. By calling this function multiple times you can convert
+ * data in chunks to avoid having to have the full encoded data in memory.
+ *
+ * When all of the data has been converted you must call
+ * g_base64_encode_close() to flush the saved state.
+ *
+ * The output buffer must be large enough to fit all the data that will
+ * be written to it. Due to the way base64 encodes you will need
+ * at least: (@len / 3 + 1) * 4 + 4 bytes (+ 4 may be needed in case of
+ * non-zero state). If you enable line-breaking you will need at least:
+ * ((@len / 3 + 1) * 4 + 4) / 72 + 1 bytes of extra space.
+ *
+ * @break_lines is typically used when putting base64-encoded data in emails.
+ * It breaks the lines at 72 columns instead of putting all of the text on
+ * the same line. This avoids problems with long lines in the email system.
+ * Note however that it breaks the lines with <literal>LF</literal>
+ * characters, not <literal>CR LF</literal> sequences, so the result cannot
+ * be passed directly to SMTP or certain other protocols.
+ *
+ * Returns: The number of bytes of output that was written
+ * Since: 2.12
+ */
+
+
+/**
+ * g_basename:
+ * @file_name: the name of the file
+ *
+ * Gets the name of the file without any leading directory
+ * components. It returns a pointer into the given file name
+ * string.
+ *
+ * directory components
+ *
+ * Deprecated:2.2: Use g_path_get_basename() instead, but notice
+ * that g_path_get_basename() allocates new memory for the
+ * returned string, unlike this function which returns a pointer
+ * into the argument.
+ *
+ * Returns: the name of the file without any leading
+ */
+
+
+/**
+ * g_bit_lock:
+ * @address: a pointer to an integer
+ * @lock_bit: a bit value between 0 and 31
+ *
+ * Sets the indicated @lock_bit in @address.  If the bit is already
+ * set, this call will block until g_bit_unlock() unsets the
+ * corresponding bit.
+ *
+ * Attempting to lock on two different bits within the same integer is
+ * not supported and will very probably cause deadlocks.
+ *
+ * The value of the bit that is set is (1u << @bit).  If @bit is not
+ * between 0 and 31 then the result is undefined.
+ *
+ * This function accesses @address atomically.  All other accesses to
+ * @address must be atomic in order for this function to work
+ * reliably.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * g_bit_nth_lsf:
+ * @mask: a #gulong containing flags
+ * @nth_bit: the index of the bit to start the search from
+ *
+ * Find the position of the first bit set in @mask, searching
+ * from (but not including) @nth_bit upwards. Bits are numbered
+ * from 0 (least significant) to sizeof(#gulong) * 8 - 1 (31 or 63,
+ * usually). To start searching from the 0th bit, set @nth_bit to -1.
+ *
+ * Returns: the index of the first bit set which is higher than @nth_bit
+ */
+
+
+/**
+ * g_bit_nth_msf:
+ * @mask: a #gulong containing flags
+ * @nth_bit: the index of the bit to start the search from
+ *
+ * Find the position of the first bit set in @mask, searching
+ * from (but not including) @nth_bit downwards. Bits are numbered
+ * from 0 (least significant) to sizeof(#gulong) * 8 - 1 (31 or 63,
+ * usually). To start searching from the last bit, set @nth_bit to
+ * -1 or GLIB_SIZEOF_LONG * 8.
+ *
+ * Returns: the index of the first bit set which is lower than @nth_bit
+ */
+
+
+/**
+ * g_bit_storage:
+ * @number: a #guint
+ *
+ * Gets the number of bits used to hold @number,
+ * e.g. if @number is 4, 3 bits are needed.
+ *
+ * Returns: the number of bits used to hold @number
+ */
+
+
+/**
+ * g_bit_trylock:
+ * @address: a pointer to an integer
+ * @lock_bit: a bit value between 0 and 31
+ *
+ * Sets the indicated @lock_bit in @address, returning %TRUE if
+ * successful.  If the bit is already set, returns %FALSE immediately.
+ *
+ * Attempting to lock on two different bits within the same integer is
+ * not supported.
+ *
+ * The value of the bit that is set is (1u << @bit).  If @bit is not
+ * between 0 and 31 then the result is undefined.
+ *
+ * This function accesses @address atomically.  All other accesses to
+ * @address must be atomic in order for this function to work
+ * reliably.
+ *
+ * Returns: %TRUE if the lock was acquired
+ * Since: 2.24
+ */
+
+
+/**
+ * g_bit_unlock:
+ * @address: a pointer to an integer
+ * @lock_bit: a bit value between 0 and 31
+ *
+ * Clears the indicated @lock_bit in @address.  If another thread is
+ * currently blocked in g_bit_lock() on this same bit then it will be
+ * woken up.
+ *
+ * This function accesses @address atomically.  All other accesses to
+ * @address must be atomic in order for this function to work
+ * reliably.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * g_bookmark_file_add_application:
+ * @bookmark: a #GBookmarkFile
+ * @uri: a valid URI
+ * @name: (allow-none): the name of the application registering the bookmark or %NULL
+ * @exec: (allow-none): command line to be used to launch the bookmark or %NULL
+ *
+ * Adds the application with @name and @exec to the list of
+ * applications that have registered a bookmark for @uri into
+ * @bookmark.
+ *
+ * Every bookmark inside a #GBookmarkFile must have at least an
+ * application registered.  Each application must provide a name, a
+ * command line useful for launching the bookmark, the number of times
+ * the bookmark has been registered by the application and the last
+ * time the application registered this bookmark.
+ *
+ * If @name is %NULL, the name of the application will be the
+ * same returned by g_get_application_name(); if @exec is %NULL, the
+ * command line will be a composition of the program name as
+ * returned by g_get_prgname() and the "\%u" modifier, which will be
+ * expanded to the bookmark's URI.
+ *
+ * This function will automatically take care of updating the
+ * registrations count and timestamping in case an application
+ * with the same @name had already registered a bookmark for
+ * @uri inside @bookmark.
+ *
+ * If no bookmark for @uri is found, one is created.
+ *
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_add_group:
+ * @bookmark: a #GBookmarkFile
+ * @uri: a valid URI
+ * @group: the group name to be added
+ *
+ * Adds @group to the list of groups to which the bookmark for @uri
+ * belongs to.
+ *
+ * If no bookmark for @uri is found then it is created.
+ *
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_free:
+ * @bookmark: a #GBookmarkFile
+ *
+ * Frees a #GBookmarkFile.
+ *
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_get_added:
+ * @bookmark: a #GBookmarkFile
+ * @uri: a valid URI
+ * @error: return location for a #GError, or %NULL
+ *
+ * Gets the time the bookmark for @uri was added to @bookmark
+ *
+ * In the event the URI cannot be found, -1 is returned and
+ * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.
+ *
+ * Returns: a timestamp
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_get_app_info:
+ * @bookmark: a #GBookmarkFile
+ * @uri: a valid URI
+ * @name: an application's name
+ * @exec: (allow-none): location for the command line of the application, or %NULL
+ * @count: (allow-none): return location for the registration count, or %NULL
+ * @stamp: (allow-none): return location for the last registration time, or %NULL
+ * @error: return location for a #GError, or %NULL
+ *
+ * Gets the registration informations of @app_name for the bookmark for
+ * @uri.  See g_bookmark_file_set_app_info() for more informations about
+ * the returned data.
+ *
+ * The string returned in @app_exec must be freed.
+ *
+ * In the event the URI cannot be found, %FALSE is returned and
+ * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.  In the
+ * event that no application with name @app_name has registered a bookmark
+ * for @uri,  %FALSE is returned and error is set to
+ * #G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. In the event that unquoting
+ * the command line fails, an error of the #G_SHELL_ERROR domain is
+ * set and %FALSE is returned.
+ *
+ * Returns: %TRUE on success.
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_get_applications:
+ * @bookmark: a #GBookmarkFile
+ * @uri: a valid URI
+ * @length: (allow-none): return location of the length of the returned list, or %NULL
+ * @error: return location for a #GError, or %NULL
+ *
+ * Retrieves the names of the applications that have registered the
+ * bookmark for @uri.
+ *
+ * In the event the URI cannot be found, %NULL is returned and
+ * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.
+ *
+ * Use g_strfreev() to free it.
+ *
+ * Returns: a newly allocated %NULL-terminated array of strings.
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_get_description:
+ * @bookmark: a #GBookmarkFile
+ * @uri: a valid URI
+ * @error: return location for a #GError, or %NULL
+ *
+ * Retrieves the description of the bookmark for @uri.
+ *
+ * In the event the URI cannot be found, %NULL is returned and
+ * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.
+ *
+ * URI cannot be found.
+ *
+ * Returns: a newly allocated string or %NULL if the specified
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_get_groups:
+ * @bookmark: a #GBookmarkFile
+ * @uri: a valid URI
+ * @length: (allow-none): return location for the length of the returned string, or %NULL
+ * @error: return location for a #GError, or %NULL
+ *
+ * Retrieves the list of group names of the bookmark for @uri.
+ *
+ * In the event the URI cannot be found, %NULL is returned and
+ * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.
+ *
+ * The returned array is %NULL terminated, so @length may optionally
+ * be %NULL.
+ *
+ * Use g_strfreev() to free it.
+ *
+ * Returns: a newly allocated %NULL-terminated array of group names.
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_get_icon:
+ * @bookmark: a #GBookmarkFile
+ * @uri: a valid URI
+ * @href: (allow-none): return location for the icon's location or %NULL
+ * @mime_type: (allow-none): return location for the icon's MIME type or %NULL
+ * @error: return location for a #GError or %NULL
+ *
+ * Gets the icon of the bookmark for @uri.
+ *
+ * In the event the URI cannot be found, %FALSE is returned and
+ * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.
+ *
+ * You should free the returned strings.
+ *
+ * Returns: %TRUE if the icon for the bookmark for the URI was found.
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_get_is_private:
+ * @bookmark: a #GBookmarkFile
+ * @uri: a valid URI
+ * @error: return location for a #GError, or %NULL
+ *
+ * Gets whether the private flag of the bookmark for @uri is set.
+ *
+ * In the event the URI cannot be found, %FALSE is returned and
+ * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.  In the
+ * event that the private flag cannot be found, %FALSE is returned and
+ * @error is set to #G_BOOKMARK_FILE_ERROR_INVALID_VALUE.
+ *
+ * Returns: %TRUE if the private flag is set, %FALSE otherwise.
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_get_mime_type:
+ * @bookmark: a #GBookmarkFile
+ * @uri: a valid URI
+ * @error: return location for a #GError, or %NULL
+ *
+ * Retrieves the MIME type of the resource pointed by @uri.
+ *
+ * In the event the URI cannot be found, %NULL is returned and
+ * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.  In the
+ * event that the MIME type cannot be found, %NULL is returned and
+ * @error is set to #G_BOOKMARK_FILE_ERROR_INVALID_VALUE.
+ *
+ * URI cannot be found.
+ *
+ * Returns: a newly allocated string or %NULL if the specified
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_get_modified:
+ * @bookmark: a #GBookmarkFile
+ * @uri: a valid URI
+ * @error: return location for a #GError, or %NULL
+ *
+ * Gets the time when the bookmark for @uri was last modified.
+ *
+ * In the event the URI cannot be found, -1 is returned and
+ * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.
+ *
+ * Returns: a timestamp
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_get_size:
+ * @bookmark: a #GBookmarkFile
+ *
+ * Gets the number of bookmarks inside @bookmark.
+ *
+ * Returns: the number of bookmarks
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_get_title:
+ * @bookmark: a #GBookmarkFile
+ * @uri: (allow-none): a valid URI or %NULL
+ * @error: return location for a #GError, or %NULL
+ *
+ * Returns the title of the bookmark for @uri.
+ *
+ * If @uri is %NULL, the title of @bookmark is returned.
+ *
+ * In the event the URI cannot be found, %NULL is returned and
+ * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.
+ *
+ * URI cannot be found.
+ *
+ * Returns: a newly allocated string or %NULL if the specified
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_get_uris:
+ * @bookmark: a #GBookmarkFile
+ * @length: (allow-none): return location for the number of returned URIs, or %NULL
+ *
+ * Returns all URIs of the bookmarks in the bookmark file @bookmark.
+ * The array of returned URIs will be %NULL-terminated, so @length may
+ * optionally be %NULL.
+ *
+ * Use g_strfreev() to free it.
+ *
+ * Returns: a newly allocated %NULL-terminated array of strings.
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_get_visited:
+ * @bookmark: a #GBookmarkFile
+ * @uri: a valid URI
+ * @error: return location for a #GError, or %NULL
+ *
+ * Gets the time the bookmark for @uri was last visited.
+ *
+ * In the event the URI cannot be found, -1 is returned and
+ * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.
+ *
+ * Returns: a timestamp.
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_has_application:
+ * @bookmark: a #GBookmarkFile
+ * @uri: a valid URI
+ * @name: the name of the application
+ * @error: return location for a #GError or %NULL
+ *
+ * Checks whether the bookmark for @uri inside @bookmark has been
+ * registered by application @name.
+ *
+ * In the event the URI cannot be found, %FALSE is returned and
+ * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.
+ *
+ * Returns: %TRUE if the application @name was found
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_has_group:
+ * @bookmark: a #GBookmarkFile
+ * @uri: a valid URI
+ * @group: the group name to be searched
+ * @error: return location for a #GError, or %NULL
+ *
+ * Checks whether @group appears in the list of groups to which
+ * the bookmark for @uri belongs to.
+ *
+ * In the event the URI cannot be found, %FALSE is returned and
+ * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.
+ *
+ * Returns: %TRUE if @group was found.
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_has_item:
+ * @bookmark: a #GBookmarkFile
+ * @uri: a valid URI
+ *
+ * Looks whether the desktop bookmark has an item with its URI set to @uri.
+ *
+ * Returns: %TRUE if @uri is inside @bookmark, %FALSE otherwise
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_load_from_data:
+ * @bookmark: an empty #GBookmarkFile struct
+ * @data: desktop bookmarks loaded in memory
+ * @length: the length of @data in bytes
+ * @error: return location for a #GError, or %NULL
+ *
+ * Loads a bookmark file from memory into an empty #GBookmarkFile
+ * structure.  If the object cannot be created then @error is set to a
+ * #GBookmarkFileError.
+ *
+ * Returns: %TRUE if a desktop bookmark could be loaded.
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_load_from_data_dirs:
+ * @bookmark: a #GBookmarkFile
+ * @file: a relative path to a filename to open and parse
+ * @full_path: (allow-none): return location for a string containing the full path of the file, or %NULL
+ * @error: return location for a #GError, or %NULL
+ *
+ * This function looks for a desktop bookmark file named @file in the
+ * paths returned from g_get_user_data_dir() and g_get_system_data_dirs(),
+ * loads the file into @bookmark and returns the file's full path in
+ * @full_path.  If the file could not be loaded then an %error is
+ * set to either a #GFileError or #GBookmarkFileError.
+ *
+ * Returns: %TRUE if a key file could be loaded, %FALSE otherwise
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_load_from_file:
+ * @bookmark: an empty #GBookmarkFile struct
+ * @filename: the path of a filename to load, in the GLib file name encoding
+ * @error: return location for a #GError, or %NULL
+ *
+ * Loads a desktop bookmark file into an empty #GBookmarkFile structure.
+ * If the file could not be loaded then @error is set to either a #GFileError
+ * or #GBookmarkFileError.
+ *
+ * Returns: %TRUE if a desktop bookmark file could be loaded
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_move_item:
+ * @bookmark: a #GBookmarkFile
+ * @old_uri: a valid URI
+ * @new_uri: (allow-none): a valid URI, or %NULL
+ * @error: return location for a #GError or %NULL
+ *
+ * Changes the URI of a bookmark item from @old_uri to @new_uri.  Any
+ * existing bookmark for @new_uri will be overwritten.  If @new_uri is
+ * %NULL, then the bookmark is removed.
+ *
+ * In the event the URI cannot be found, %FALSE is returned and
+ * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.
+ *
+ * Returns: %TRUE if the URI was successfully changed
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_new:
+ *
+ * Creates a new empty #GBookmarkFile object.
+ *
+ * Use g_bookmark_file_load_from_file(), g_bookmark_file_load_from_data()
+ * or g_bookmark_file_load_from_data_dirs() to read an existing bookmark
+ * file.
+ *
+ * Returns: an empty #GBookmarkFile
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_remove_application:
+ * @bookmark: a #GBookmarkFile
+ * @uri: a valid URI
+ * @name: the name of the application
+ * @error: return location for a #GError or %NULL
+ *
+ * Removes application registered with @name from the list of applications
+ * that have registered a bookmark for @uri inside @bookmark.
+ *
+ * In the event the URI cannot be found, %FALSE is returned and
+ * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.
+ * In the event that no application with name @app_name has registered
+ * a bookmark for @uri,  %FALSE is returned and error is set to
+ * #G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED.
+ *
+ * Returns: %TRUE if the application was successfully removed.
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_remove_group:
+ * @bookmark: a #GBookmarkFile
+ * @uri: a valid URI
+ * @group: the group name to be removed
+ * @error: return location for a #GError, or %NULL
+ *
+ * Removes @group from the list of groups to which the bookmark
+ * for @uri belongs to.
+ *
+ * In the event the URI cannot be found, %FALSE is returned and
+ * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.
+ * In the event no group was defined, %FALSE is returned and
+ * @error is set to #G_BOOKMARK_FILE_ERROR_INVALID_VALUE.
+ *
+ * Returns: %TRUE if @group was successfully removed.
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_remove_item:
+ * @bookmark: a #GBookmarkFile
+ * @uri: a valid URI
+ * @error: return location for a #GError, or %NULL
+ *
+ * Removes the bookmark for @uri from the bookmark file @bookmark.
+ *
+ * Returns: %TRUE if the bookmark was removed successfully.
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_set_added:
+ * @bookmark: a #GBookmarkFile
+ * @uri: a valid URI
+ * @added: a timestamp or -1 to use the current time
+ *
+ * Sets the time the bookmark for @uri was added into @bookmark.
+ *
+ * If no bookmark for @uri is found then it is created.
+ *
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_set_app_info:
+ * @bookmark: a #GBookmarkFile
+ * @uri: a valid URI
+ * @name: an application's name
+ * @exec: an application's command line
+ * @count: the number of registrations done for this application
+ * @stamp: the time of the last registration for this application
+ * @error: return location for a #GError or %NULL
+ * @exec can have one of these two modifiers: "\%f", which will
+ *
+ * Sets the meta-data of application @name inside the list of
+ * applications that have registered a bookmark for @uri inside
+ * @bookmark.
+ *
+ * You should rarely use this function; use g_bookmark_file_add_application()
+ * and g_bookmark_file_remove_application() instead.
+ *
+ * @name can be any UTF-8 encoded string used to identify an
+ * application.
+ * be expanded as the local file name retrieved from the bookmark's
+ * URI; "\%u", which will be expanded as the bookmark's URI.
+ * The expansion is done automatically when retrieving the stored
+ * command line using the g_bookmark_file_get_app_info() function.
+ * @count is the number of times the application has registered the
+ * bookmark; if is < 0, the current registration count will be increased
+ * by one, if is 0, the application with @name will be removed from
+ * the list of registered applications.
+ * @stamp is the Unix time of the last registration; if it is -1, the
+ * current time will be used.
+ *
+ * If you try to remove an application by setting its registration count to
+ * zero, and no bookmark for @uri is found, %FALSE is returned and
+ * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND; similarly,
+ * in the event that no application @name has registered a bookmark
+ * for @uri,  %FALSE is returned and error is set to
+ * #G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED.  Otherwise, if no bookmark
+ * for @uri is found, one is created.
+ *
+ * changed.
+ *
+ * Returns: %TRUE if the application's meta-data was successfully
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_set_description:
+ * @bookmark: a #GBookmarkFile
+ * @uri: (allow-none): a valid URI or %NULL
+ * @description: a string
+ *
+ * Sets @description as the description of the bookmark for @uri.
+ *
+ * If @uri is %NULL, the description of @bookmark is set.
+ *
+ * If a bookmark for @uri cannot be found then it is created.
+ *
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_set_groups:
+ * @bookmark: a #GBookmarkFile
+ * @uri: an item's URI
+ * @groups: (allow-none): an array of group names, or %NULL to remove all groups
+ * @length: number of group name values in @groups
+ *
+ * Sets a list of group names for the item with URI @uri.  Each previously
+ * set group name list is removed.
+ *
+ * If @uri cannot be found then an item for it is created.
+ *
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_set_icon:
+ * @bookmark: a #GBookmarkFile
+ * @uri: a valid URI
+ * @href: (allow-none): the URI of the icon for the bookmark, or %NULL
+ * @mime_type: the MIME type of the icon for the bookmark
+ *
+ * Sets the icon for the bookmark for @uri. If @href is %NULL, unsets
+ * the currently set icon. @href can either be a full URL for the icon
+ * file or the icon name following the Icon Naming specification.
+ *
+ * If no bookmark for @uri is found one is created.
+ *
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_set_is_private:
+ * @bookmark: a #GBookmarkFile
+ * @uri: a valid URI
+ * @is_private: %TRUE if the bookmark should be marked as private
+ *
+ * Sets the private flag of the bookmark for @uri.
+ *
+ * If a bookmark for @uri cannot be found then it is created.
+ *
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_set_mime_type:
+ * @bookmark: a #GBookmarkFile
+ * @uri: a valid URI
+ * @mime_type: a MIME type
+ *
+ * Sets @mime_type as the MIME type of the bookmark for @uri.
+ *
+ * If a bookmark for @uri cannot be found then it is created.
+ *
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_set_modified:
+ * @bookmark: a #GBookmarkFile
+ * @uri: a valid URI
+ * @modified: a timestamp or -1 to use the current time
+ *
+ * Sets the last time the bookmark for @uri was last modified.
+ *
+ * If no bookmark for @uri is found then it is created.
+ *
+ * The "modified" time should only be set when the bookmark's meta-data
+ * was actually changed.  Every function of #GBookmarkFile that
+ * modifies a bookmark also changes the modification time, except for
+ * g_bookmark_file_set_visited().
+ *
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_set_title:
+ * @bookmark: a #GBookmarkFile
+ * @uri: (allow-none): a valid URI or %NULL
+ * @title: a UTF-8 encoded string
+ *
+ * Sets @title as the title of the bookmark for @uri inside the
+ * bookmark file @bookmark.
+ *
+ * If @uri is %NULL, the title of @bookmark is set.
+ *
+ * If a bookmark for @uri cannot be found then it is created.
+ *
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_set_visited:
+ * @bookmark: a #GBookmarkFile
+ * @uri: a valid URI
+ * @visited: a timestamp or -1 to use the current time
+ *
+ * Sets the time the bookmark for @uri was last visited.
+ *
+ * If no bookmark for @uri is found then it is created.
+ *
+ * The "visited" time should only be set if the bookmark was launched,
+ * either using the command line retrieved by g_bookmark_file_get_app_info()
+ * or by the default application for the bookmark's MIME type, retrieved
+ * using g_bookmark_file_get_mime_type().  Changing the "visited" time
+ * does not affect the "modified" time.
+ *
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_to_data:
+ * @bookmark: a #GBookmarkFile
+ * @length: (allow-none): return location for the length of the returned string, or %NULL
+ * @error: return location for a #GError, or %NULL
+ *
+ * This function outputs @bookmark as a string.
+ *
+ * the contents of the #GBookmarkFile
+ *
+ * Returns: a newly allocated string holding
+ * Since: 2.12
+ */
+
+
+/**
+ * g_bookmark_file_to_file:
+ * @bookmark: a #GBookmarkFile
+ * @filename: path of the output file
+ * @error: return location for a #GError, or %NULL
+ *
+ * This function outputs @bookmark into a file.  The write process is
+ * guaranteed to be atomic by using g_file_set_contents() internally.
+ *
+ * Returns: %TRUE if the file was successfully written.
+ * Since: 2.12
+ */
+
+
+/**
+ * g_build_filename:
+ * @first_element: the first element in the path
+ * @...: remaining elements in path, terminated by %NULL
+ *
+ * Creates a filename from a series of elements using the correct
+ * separator for filenames.
+ *
+ * On Unix, this function behaves identically to <literal>g_build_path
+ * (G_DIR_SEPARATOR_S, first_element, ....)</literal>.
+ *
+ * On Windows, it takes into account that either the backslash
+ * (<literal>\</literal> or slash (<literal>/</literal>) can be used
+ * as separator in filenames, but otherwise behaves as on Unix. When
+ * file pathname separators need to be inserted, the one that last
+ * previously occurred in the parameters (reading from left to right)
+ * is used.
+ *
+ * No attempt is made to force the resulting filename to be an absolute
+ * path. If the first element is a relative path, the result will
+ * be a relative path.
+ *
+ * Returns: a newly-allocated string that must be freed with g_free().
+ */
+
+
+/**
+ * g_build_filenamev:
+ * @args: (array zero-terminated=1): %NULL-terminated array of strings containing the path elements.
+ *
+ * Behaves exactly like g_build_filename(), but takes the path elements
+ * as a string array, instead of varargs. This function is mainly
+ * meant for language bindings.
+ *
+ * Returns: a newly-allocated string that must be freed with g_free().
+ * Since: 2.8
+ */
+
+
+/**
+ * g_build_path:
+ * @separator: a string used to separator the elements of the path.
+ * @first_element: the first element in the path
+ * @...: remaining elements in path, terminated by %NULL
+ *
+ * Creates a path from a series of elements using @separator as the
+ * separator between elements. At the boundary between two elements,
+ * any trailing occurrences of separator in the first element, or
+ * leading occurrences of separator in the second element are removed
+ * and exactly one copy of the separator is inserted.
+ *
+ * Empty elements are ignored.
+ *
+ * The number of leading copies of the separator on the result is
+ * the same as the number of leading copies of the separator on
+ * the first non-empty element.
+ *
+ * The number of trailing copies of the separator on the result is
+ * the same as the number of trailing copies of the separator on
+ * the last non-empty element. (Determination of the number of
+ * trailing copies is done without stripping leading copies, so
+ * if the separator is <literal>ABA</literal>, <literal>ABABA</literal>
+ * has 1 trailing copy.)
+ *
+ * However, if there is only a single non-empty element, and there
+ * are no characters in that element not part of the leading or
+ * trailing separators, then the result is exactly the original value
+ * of that element.
+ *
+ * Other than for determination of the number of leading and trailing
+ * copies of the separator, elements consisting only of copies
+ * of the separator are ignored.
+ *
+ * Returns: a newly-allocated string that must be freed with g_free().
+ */
+
+
+/**
+ * g_build_pathv:
+ * @separator: a string used to separator the elements of the path.
+ * @args: (array zero-terminated=1): %NULL-terminated array of strings containing the path elements.
+ *
+ * Behaves exactly like g_build_path(), but takes the path elements
+ * as a string array, instead of varargs. This function is mainly
+ * meant for language bindings.
+ *
+ * Returns: a newly-allocated string that must be freed with g_free().
+ * Since: 2.8
+ */
+
+
+/**
+ * g_byte_array_append:
+ * @array: a #GByteArray.
+ * @data: the byte data to be added.
+ * @len: the number of bytes to add.
+ * @Returns: the #GByteArray.
+ *
+ * Adds the given bytes to the end of the #GByteArray. The array will
+ * grow in size automatically if necessary.
+ */
+
+
+/**
+ * g_byte_array_free:
+ * @array: a #GByteArray.
+ * @free_segment: if %TRUE the actual byte data is freed as well.
+ * @Returns: the element data if @free_segment is %FALSE, otherwise %NULL.  The element data should be freed using g_free().
+ *
+ * Frees the memory allocated by the #GByteArray. If @free_segment is
+ * %TRUE it frees the actual byte data. If the reference count of
+ * @array is greater than one, the #GByteArray wrapper is preserved but
+ * the size of @array will be set to zero.
+ */
+
+
+/**
+ * g_byte_array_free_to_bytes:
+ * @array: (transfer full): a #GByteArray
+ *
+ * Transfers the data from the #GByteArray into a new immutable #GBytes.
+ *
+ * The #GByteArray is freed unless the reference count of @array is greater
+ * than one, the #GByteArray wrapper is preserved but the size of @array
+ * will be set to zero.
+ *
+ * This is identical to using g_bytes_new_take() and g_byte_array_free()
+ * together.
+ *
+ *
+ * data that was in the array
+ *
+ * Since: 2.32
+ * Returns: (transfer full): a new immutable #GBytes representing same byte
+ */
+
+
+/**
+ * g_byte_array_new:
+ * @Returns: the new #GByteArray.
+ *
+ * Creates a new #GByteArray with a reference count of 1.
+ */
+
+
+/**
+ * g_byte_array_new_take:
+ * @data: (array length=len): byte data for the array
+ * @len: length of @data
+ *
+ * Create byte array containing the data. The data will be owned by the array
+ * and will be freed with g_free(), i.e. it could be allocated using g_strdup().
+ *
+ * Since: 2.32
+ * Returns: (transfer full): a new #GByteArray
+ */
+
+
+/**
+ * g_byte_array_prepend:
+ * @array: a #GByteArray.
+ * @data: the byte data to be added.
+ * @len: the number of bytes to add.
+ * @Returns: the #GByteArray.
+ *
+ * Adds the given data to the start of the #GByteArray. The array will
+ * grow in size automatically if necessary.
+ */
+
+
+/**
+ * g_byte_array_ref:
+ * @array: A #GByteArray.
+ *
+ * Atomically increments the reference count of @array by one. This
+ * function is MT-safe and may be called from any thread.
+ *
+ * Returns: The passed in #GByteArray.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_byte_array_remove_index:
+ * @array: a #GByteArray.
+ * @index_: the index of the byte to remove.
+ * @Returns: the #GByteArray.
+ *
+ * Removes the byte at the given index from a #GByteArray. The
+ * following bytes are moved down one place.
+ */
+
+
+/**
+ * g_byte_array_remove_index_fast:
+ * @array: a #GByteArray.
+ * @index_: the index of the byte to remove.
+ * @Returns: the #GByteArray.
+ *
+ * Removes the byte at the given index from a #GByteArray. The last
+ * element in the array is used to fill in the space, so this function
+ * does not preserve the order of the #GByteArray. But it is faster
+ * than g_byte_array_remove_index().
+ */
+
+
+/**
+ * g_byte_array_remove_range:
+ * @array: a @GByteArray.
+ * @index_: the index of the first byte to remove.
+ * @length: the number of bytes to remove.
+ * @Returns: the #GByteArray.
+ *
+ * Removes the given number of bytes starting at the given index from a
+ * #GByteArray.  The following elements are moved to close the gap.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_byte_array_set_size:
+ * @array: a #GByteArray.
+ * @length: the new size of the #GByteArray.
+ * @Returns: the #GByteArray.
+ *
+ * Sets the size of the #GByteArray, expanding it if necessary.
+ */
+
+
+/**
+ * g_byte_array_sized_new:
+ * @reserved_size: number of bytes preallocated.
+ * @Returns: the new #GByteArray.
+ *
+ * Creates a new #GByteArray with @reserved_size bytes preallocated.
+ * This avoids frequent reallocation, if you are going to add many
+ * bytes to the array. Note however that the size of the array is still
+ * 0.
+ */
+
+
+/**
+ * g_byte_array_sort:
+ * @array: a #GByteArray.
+ * @compare_func: comparison function.
+ *
+ * Sorts a byte array, using @compare_func which should be a
+ * qsort()-style comparison function (returns less than zero for first
+ * arg is less than second arg, zero for equal, greater than zero if
+ * first arg is greater than second arg).
+ *
+ * If two array elements compare equal, their order in the sorted array
+ * is undefined. If you want equal elements to keep their order (i.e.
+ * you want a stable sort) you can write a comparison function that,
+ * if two elements would otherwise compare equal, compares them by
+ * their addresses.
+ */
+
+
+/**
+ * g_byte_array_sort_with_data:
+ * @array: a #GByteArray.
+ * @compare_func: comparison function.
+ * @user_data: data to pass to @compare_func.
+ *
+ * Like g_byte_array_sort(), but the comparison function takes an extra
+ * user data argument.
+ */
+
+
+/**
+ * g_byte_array_unref:
+ * @array: A #GByteArray.
+ *
+ * Atomically decrements the reference count of @array by one. If the
+ * reference count drops to 0, all memory allocated by the array is
+ * released. This function is MT-safe and may be called from any
+ * thread.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_bytes_compare:
+ * @bytes1: (type GLib.Bytes): a pointer to a #GBytes
+ * @bytes2: (type GLib.Bytes): a pointer to a #GBytes to compare with @bytes1
+ *
+ * Compares the two #GBytes values.
+ *
+ * This function can be used to sort GBytes instances in lexographical order.
+ *
+ * greater, and zero if bytes2 is equal to bytes1
+ *
+ * Returns: a negative value if bytes2 is lesser, a positive value if bytes2 is
+ * Since: 2.32
+ */
+
+
+/**
+ * g_bytes_equal:
+ * @bytes1: (type GLib.Bytes): a pointer to a #GBytes
+ * @bytes2: (type GLib.Bytes): a pointer to a #GBytes to compare with @bytes1
+ *
+ * Compares the two #GBytes values being pointed to and returns
+ * %TRUE if they are equal.
+ *
+ * This function can be passed to g_hash_table_new() as the @key_equal_func
+ * parameter, when using non-%NULL #GBytes pointers as keys in a #GHashTable.
+ *
+ * Returns: %TRUE if the two keys match.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_bytes_get_data:
+ * @bytes: a #GBytes
+ * @size: (out) (allow-none): location to return size of byte data
+ *
+ * Get the byte data in the #GBytes. This data should not be modified.
+ *
+ * This function will always return the same pointer for a given #GBytes.
+ *
+ * Returns: (array length=size) (type guint8): a pointer to the byte data
+ * Since: 2.32
+ */
+
+
+/**
+ * g_bytes_get_size:
+ * @bytes: a #GBytes
+ *
+ * Get the size of the byte data in the #GBytes.
+ *
+ * This function will always return the same value for a given #GBytes.
+ *
+ * Returns: the size
+ * Since: 2.32
+ */
+
+
+/**
+ * g_bytes_hash:
+ * @bytes: (type GLib.Bytes): a pointer to a #GBytes key
+ *
+ * Creates an integer hash code for the byte data in the #GBytes.
+ *
+ * This function can be passed to g_hash_table_new() as the @key_equal_func
+ * parameter, when using non-%NULL #GBytes pointers as keys in a #GHashTable.
+ *
+ * Returns: a hash value corresponding to the key.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_bytes_new:
+ * @data: (array length=size): the data to be used for the bytes
+ * @size: the size of @data
+ *
+ * Creates a new #GBytes from @data.
+ *
+ * @data is copied.
+ *
+ * Returns: (transfer full): a new #GBytes
+ * Since: 2.32
+ */
+
+
+/**
+ * g_bytes_new_from_bytes:
+ * @bytes: a #GBytes
+ * @offset: offset which subsection starts at
+ * @length: length of subsection
+ *
+ * Creates a #GBytes which is a subsection of another #GBytes. The @offset +
+ * @length may not be longer than the size of @bytes.
+ *
+ * A reference to @bytes will be held by the newly created #GBytes until
+ * the byte data is no longer needed.
+ *
+ * Returns: (transfer full): a new #GBytes
+ * Since: 2.32
+ */
+
+
+/**
+ * g_bytes_new_static:
+ * @data: (array length=size): the data to be used for the bytes
+ * @size: the size of @data
+ * @data must be static (ie: never modified or freed).
+ *
+ * Creates a new #GBytes from static data.
+ *
+ * Returns: (transfer full): a new #GBytes
+ * Since: 2.32
+ */
+
+
+/**
+ * g_bytes_new_take:
+ * @data: (transfer full) (array length=size): the data to be used for the bytes
+ * @size: the size of @data
+ *
+ * Creates a new #GBytes from @data.
+ *
+ * After this call, @data belongs to the bytes and may no longer be
+ * modified by the caller.  g_free() will be called on @data when the
+ * bytes is no longer in use. Because of this @data must have been created by
+ * a call to g_malloc(), g_malloc0() or g_realloc() or by one of the many
+ * functions that wrap these calls (such as g_new(), g_strdup(), etc).
+ *
+ * For creating #GBytes with memory from other allocators, see
+ * g_bytes_new_with_free_func().
+ *
+ * Returns: (transfer full): a new #GBytes
+ * Since: 2.32
+ */
+
+
+/**
+ * g_bytes_new_with_free_func:
+ * @data: (array length=size): the data to be used for the bytes
+ * @size: the size of @data
+ * @free_func: the function to call to release the data
+ * @user_data: data to pass to @free_func
+ *
+ * Creates a #GBytes from @data.
+ *
+ * When the last reference is dropped, @free_func will be called with the
+ * @user_data argument.
+ *
+ * @data must not be modified after this call is made until @free_func has
+ * been called to indicate that the bytes is no longer in use.
+ *
+ * Returns: (transfer full): a new #GBytes
+ * Since: 2.32
+ */
+
+
+/**
+ * g_bytes_ref:
+ * @bytes: a #GBytes
+ *
+ * Increase the reference count on @bytes.
+ *
+ * Returns: the #GBytes
+ * Since: 2.32
+ */
+
+
+/**
+ * g_bytes_unref:
+ * @bytes: (allow-none): a #GBytes
+ *
+ * Releases a reference on @bytes.  This may result in the bytes being
+ * freed.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_bytes_unref_to_array:
+ * @bytes: (transfer full): a #GBytes
+ *
+ * Unreferences the bytes, and returns a new mutable #GByteArray containing
+ * the same byte data.
+ *
+ * As an optimization, the byte data is transferred to the array without copying
+ * if this was the last reference to bytes and bytes was created with
+ * g_bytes_new(), g_bytes_new_take() or g_byte_array_free_to_bytes(). In all
+ * other cases the data is copied.
+ *
+ * Returns: (transfer full): a new mutable #GByteArray containing the same byte data
+ * Since: 2.32
+ */
+
+
+/**
+ * g_bytes_unref_to_data:
+ * @bytes: (transfer full): a #GBytes
+ * @size: location to place the length of the returned data
+ *
+ * Unreferences the bytes, and returns a pointer the same byte data
+ * contents.
+ *
+ * As an optimization, the byte data is returned without copying if this was
+ * the last reference to bytes and bytes was created with g_bytes_new(),
+ * g_bytes_new_take() or g_byte_array_free_to_bytes(). In all other cases the
+ * data is copied.
+ *
+ * be freed with g_free()
+ *
+ * Returns: (transfer full): a pointer to the same byte data, which should
+ * Since: 2.32
+ */
+
+
+/**
+ * g_chdir:
+ * @path: a pathname in the GLib file name encoding (UTF-8 on Windows)
+ *
+ * A wrapper for the POSIX chdir() function. The function changes the
+ * current directory of the process to @path.
+ *
+ * See your C library manual for more details about chdir().
+ *
+ * Returns: 0 on success, -1 if an error occurred.
+ * Since: 2.8
+ */
+
+
+/**
+ * g_checksum_copy:
+ * @checksum: the #GChecksum to copy
+ *
+ * Copies a #GChecksum. If @checksum has been closed, by calling
+ * g_checksum_get_string() or g_checksum_get_digest(), the copied
+ * checksum will be closed as well.
+ *
+ * when finished using it.
+ *
+ * Returns: the copy of the passed #GChecksum. Use g_checksum_free()
+ * Since: 2.16
+ */
+
+
+/**
+ * g_checksum_free:
+ * @checksum: a #GChecksum
+ *
+ * Frees the memory allocated for @checksum.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_checksum_get_digest:
+ * @checksum: a #GChecksum
+ * @buffer: output buffer
+ * @digest_len: an inout parameter. The caller initializes it to the size of @buffer. After the call it contains the length of the digest.
+ *
+ * Gets the digest from @checksum as a raw binary vector and places it
+ * into @buffer. The size of the digest depends on the type of checksum.
+ *
+ * Once this function has been called, the #GChecksum is closed and can
+ * no longer be updated with g_checksum_update().
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_checksum_get_string:
+ * @checksum: a #GChecksum
+ *
+ * Gets the digest as an hexadecimal string.
+ *
+ * Once this function has been called the #GChecksum can no longer be
+ * updated with g_checksum_update().
+ *
+ * The hexadecimal characters will be lower case.
+ *
+ * returned string is owned by the checksum and should not be modified
+ * or freed.
+ *
+ * Returns: the hexadecimal representation of the checksum. The
+ * Since: 2.16
+ */
+
+
+/**
+ * g_checksum_new:
+ * @checksum_type: the desired type of checksum
+ *
+ * Creates a new #GChecksum, using the checksum algorithm @checksum_type.
+ * If the @checksum_type is not known, %NULL is returned.
+ * A #GChecksum can be used to compute the checksum, or digest, of an
+ * arbitrary binary blob, using different hashing algorithms.
+ *
+ * A #GChecksum works by feeding a binary blob through g_checksum_update()
+ * until there is data to be checked; the digest can then be extracted
+ * using g_checksum_get_string(), which will return the checksum as a
+ * hexadecimal string; or g_checksum_get_digest(), which will return a
+ * vector of raw bytes. Once either g_checksum_get_string() or
+ * g_checksum_get_digest() have been called on a #GChecksum, the checksum
+ * will be closed and it won't be possible to call g_checksum_update()
+ * on it anymore.
+ *
+ * Use g_checksum_free() to free the memory allocated by it.
+ *
+ * Returns: the newly created #GChecksum, or %NULL.
+ * Since: 2.16
+ */
+
+
+/**
+ * g_checksum_reset:
+ * @checksum: the #GChecksum to reset
+ *
+ * Resets the state of the @checksum back to its initial state.
+ *
+ * Since: 2.18
+ */
+
+
+/**
+ * g_checksum_type_get_length:
+ * @checksum_type: a #GChecksumType
+ *
+ * Gets the length in bytes of digests of type @checksum_type
+ *
+ * not supported.
+ *
+ * Returns: the checksum length, or -1 if @checksum_type is
+ * Since: 2.16
+ */
+
+
+/**
+ * g_checksum_update:
+ * @checksum: a #GChecksum
+ * @data: buffer used to compute the checksum
+ * @length: size of the buffer, or -1 if it is a null-terminated string.
+ *
+ * Feeds @data into an existing #GChecksum. The checksum must still be
+ * open, that is g_checksum_get_string() or g_checksum_get_digest() must
+ * not have been called on @checksum.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_child_watch_add:
+ * @pid: process id to watch. On POSIX the pid of a child process. On Windows a handle for a process (which doesn't have to be a child).
+ * @function: function to call
+ * @data: data to pass to @function
+ *
+ * Sets a function to be called when the child indicated by @pid
+ * exits, at a default priority, #G_PRIORITY_DEFAULT.
+ *
+ * If you obtain @pid from g_spawn_async() or g_spawn_async_with_pipes()
+ * you will need to pass #G_SPAWN_DO_NOT_REAP_CHILD as flag to
+ * the spawn function for the child watching to work.
+ *
+ * Note that on platforms where #GPid must be explicitly closed
+ * (see g_spawn_close_pid()) @pid must not be closed while the
+ * source is still active. Typically, you will want to call
+ * g_spawn_close_pid() in the callback function for the source.
+ *
+ * GLib supports only a single callback per process id.
+ *
+ * This internally creates a main loop source using
+ * g_child_watch_source_new() and attaches it to the main loop context
+ * using g_source_attach(). You can do these steps manually if you
+ * need greater control.
+ *
+ * Returns: the ID (greater than 0) of the event source.
+ * Since: 2.4
+ */
+
+
+/**
+ * g_child_watch_add_full:
+ * @priority: the priority of the idle source. Typically this will be in the range between #G_PRIORITY_DEFAULT_IDLE and #G_PRIORITY_HIGH_IDLE.
+ * @pid: process to watch. On POSIX the pid of a child process. On Windows a handle for a process (which doesn't have to be a child).
+ * @function: function to call
+ * @data: data to pass to @function
+ * @notify: (allow-none): function to call when the idle is removed, or %NULL
+ *
+ * Sets a function to be called when the child indicated by @pid
+ * exits, at the priority @priority.
+ *
+ * If you obtain @pid from g_spawn_async() or g_spawn_async_with_pipes()
+ * you will need to pass #G_SPAWN_DO_NOT_REAP_CHILD as flag to
+ * the spawn function for the child watching to work.
+ *
+ * Note that on platforms where #GPid must be explicitly closed
+ * (see g_spawn_close_pid()) @pid must not be closed while the
+ * source is still active. Typically, you will want to call
+ * g_spawn_close_pid() in the callback function for the source.
+ *
+ * GLib supports only a single callback per process id.
+ *
+ * This internally creates a main loop source using
+ * g_child_watch_source_new() and attaches it to the main loop context
+ * using g_source_attach(). You can do these steps manually if you
+ * need greater control.
+ *
+ * Returns: the ID (greater than 0) of the event source.
+ * Rename to: g_child_watch_add
+ * Since: 2.4
+ */
+
+
+/**
+ * g_child_watch_source_new:
+ * @pid: process to watch. On POSIX the pid of a child process. On Windows a handle for a process (which doesn't have to be a child).
+ *
+ * Creates a new child_watch source.
+ *
+ * The source will not initially be associated with any #GMainContext
+ * and must be added to one with g_source_attach() before it will be
+ * executed.
+ *
+ * Note that child watch sources can only be used in conjunction with
+ * <literal>g_spawn...</literal> when the %G_SPAWN_DO_NOT_REAP_CHILD
+ * flag is used.
+ *
+ * Note that on platforms where #GPid must be explicitly closed
+ * (see g_spawn_close_pid()) @pid must not be closed while the
+ * source is still active. Typically, you will want to call
+ * g_spawn_close_pid() in the callback function for the source.
+ *
+ * Note further that using g_child_watch_source_new() is not
+ * compatible with calling <literal>waitpid(-1)</literal> in
+ * the application. Calling waitpid() for individual pids will
+ * still work fine.
+ *
+ * Returns: the newly-created child watch source
+ * Since: 2.4
+ */
+
+
+/**
+ * g_chmod:
+ * @filename: a pathname in the GLib file name encoding (UTF-8 on Windows)
+ * @mode: as in chmod()
+ *
+ * A wrapper for the POSIX chmod() function. The chmod() function is
+ * used to set the permissions of a file system object.
+ *
+ * On Windows the file protection mechanism is not at all POSIX-like,
+ * and the underlying chmod() function in the C library just sets or
+ * clears the FAT-style READONLY attribute. It does not touch any
+ * ACL. Software that needs to manage file permissions on Windows
+ * exactly should use the Win32 API.
+ *
+ * See your C library manual for more details about chmod().
+ *
+ * Returns: zero if the operation succeeded, -1 on error.
+ * Since: 2.8
+ */
+
+
+/**
+ * g_clear_error:
+ * @err: a #GError return location
+ *
+ * If @err is %NULL, does nothing. If @err is non-%NULL,
+ * calls g_error_free() on *@err and sets *@err to %NULL.
+ */
+
+
+/**
+ * g_compute_checksum_for_data:
+ * @checksum_type: a #GChecksumType
+ * @data: binary blob to compute the digest of
+ * @length: length of @data
+ *
+ * Computes the checksum for a binary @data of @length. This is a
+ * convenience wrapper for g_checksum_new(), g_checksum_get_string()
+ * and g_checksum_free().
+ *
+ * The hexadecimal string returned will be in lower case.
+ *
+ * The returned string should be freed with g_free() when done using it.
+ *
+ * Returns: the digest of the binary data as a string in hexadecimal.
+ * Since: 2.16
+ */
+
+
+/**
+ * g_compute_checksum_for_string:
+ * @checksum_type: a #GChecksumType
+ * @str: the string to compute the checksum of
+ * @length: the length of the string, or -1 if the string is null-terminated.
+ *
+ * Computes the checksum of a string.
+ *
+ * The hexadecimal string returned will be in lower case.
+ *
+ * should be freed with g_free() when done using it.
+ *
+ * Returns: the checksum as a hexadecimal string. The returned string
+ * Since: 2.16
+ */
+
+
+/**
+ * g_compute_hmac_for_data:
+ * @digest_type: a #GChecksumType to use for the HMAC
+ * @key: (array length=key_len): the key to use in the HMAC
+ * @key_len: the length of the key
+ * @data: binary blob to compute the HMAC of
+ * @length: length of @data
+ *
+ * Computes the HMAC for a binary @data of @length. This is a
+ * convenience wrapper for g_hmac_new(), g_hmac_get_string()
+ * and g_hmac_unref().
+ *
+ * The hexadecimal string returned will be in lower case.
+ *
+ * The returned string should be freed with g_free() when done using it.
+ *
+ * Returns: the HMAC of the binary data as a string in hexadecimal.
+ * Since: 2.30
+ */
+
+
+/**
+ * g_compute_hmac_for_string:
+ * @digest_type: a #GChecksumType to use for the HMAC
+ * @key: (array length=key_len): the key to use in the HMAC
+ * @key_len: the length of the key
+ * @str: the string to compute the HMAC for
+ * @length: the length of the string, or -1 if the string is nul-terminated
+ *
+ * Computes the HMAC for a string.
+ *
+ * The hexadecimal string returned will be in lower case.
+ *
+ * The returned string should be freed with g_free()
+ * when done using it.
+ *
+ * Returns: the HMAC as a hexadecimal string.
+ * Since: 2.30
+ */
+
+
+/**
+ * g_cond_broadcast:
+ * @cond: a #GCond
+ *
+ * If threads are waiting for @cond, all of them are unblocked.
+ * If no threads are waiting for @cond, this function has no effect.
+ * It is good practice to lock the same mutex as the waiting threads
+ * while calling this function, though not required.
+ */
+
+
+/**
+ * g_cond_clear:
+ * @cond: an initialised #GCond
+ *
+ * Frees the resources allocated to a #GCond with g_cond_init().
+ *
+ * This function should not be used with a #GCond that has been
+ * statically allocated.
+ *
+ * Calling g_cond_clear() for a #GCond on which threads are
+ * blocking leads to undefined behaviour.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_cond_init:
+ * @cond: an uninitialized #GCond
+ *
+ * Initialises a #GCond so that it can be used.
+ *
+ * This function is useful to initialise a #GCond that has been
+ * allocated as part of a larger structure.  It is not necessary to
+ * initialise a #GCond that has been statically allocated.
+ *
+ * To undo the effect of g_cond_init() when a #GCond is no longer
+ * needed, use g_cond_clear().
+ *
+ * Calling g_cond_init() on an already-initialised #GCond leads
+ * to undefined behaviour.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_cond_signal:
+ * @cond: a #GCond
+ *
+ * If threads are waiting for @cond, at least one of them is unblocked.
+ * If no threads are waiting for @cond, this function has no effect.
+ * It is good practice to hold the same lock as the waiting thread
+ * while calling this function, though not required.
+ */
+
+
+/**
+ * g_cond_wait:
+ * @cond: a #GCond
+ * @mutex: a #GMutex that is currently locked
+ *
+ * Atomically releases @mutex and waits until @cond is signalled.
+ *
+ * When using condition variables, it is possible that a spurious wakeup
+ * may occur (ie: g_cond_wait() returns even though g_cond_signal() was
+ * not called).  It's also possible that a stolen wakeup may occur.
+ * This is when g_cond_signal() is called, but another thread acquires
+ * @mutex before this thread and modifies the state of the program in
+ * such a way that when g_cond_wait() is able to return, the expected
+ * condition is no longer met.
+ *
+ * For this reason, g_cond_wait() must always be used in a loop.  See
+ * the documentation for #GCond for a complete example.
+ */
+
+
+/**
+ * g_cond_wait_until:
+ * @cond: a #GCond
+ * @mutex: a #GMutex that is currently locked
+ * @end_time: the monotonic time to wait until
+ *
+ * Waits until either @cond is signalled or @end_time has passed.
+ *
+ * As with g_cond_wait() it is possible that a spurious or stolen wakeup
+ * could occur.  For that reason, waiting on a condition variable should
+ * always be in a loop, based on an explicitly-checked predicate.
+ *
+ * %TRUE is returned if the condition variable was signalled (or in the
+ * case of a spurious wakeup).  %FALSE is returned if @end_time has
+ * passed.
+ *
+ * The following code shows how to correctly perform a timed wait on a
+ * condition variable (extended the example presented in the
+ * documentation for #GCond):
+ *
+ * |[
+ * gpointer
+ * pop_data_timed (void)
+ * {
+ * gint64 end_time;
+ * gpointer data;
+ *
+ * g_mutex_lock (&data_mutex);
+ *
+ * end_time = g_get_monotonic_time () + 5 * G_TIME_SPAN_SECOND;
+ * while (!current_data)
+ * if (!g_cond_wait_until (&data_cond, &data_mutex, end_time))
+ * {
+ * // timeout has passed.
+ * g_mutex_unlock (&data_mutex);
+ * return NULL;
+ * }
+ *
+ * // there is data for us
+ * data = current_data;
+ * current_data = NULL;
+ *
+ * g_mutex_unlock (&data_mutex);
+ *
+ * return data;
+ * }
+ * ]|
+ *
+ * Notice that the end time is calculated once, before entering the
+ * loop and reused.  This is the motivation behind the use of absolute
+ * time on this API -- if a relative time of 5 seconds were passed
+ * directly to the call and a spurious wakeup occurred, the program would
+ * have to start over waiting again (which would lead to a total wait
+ * time of more than 5 seconds).
+ *
+ * Returns: %TRUE on a signal, %FALSE on a timeout
+ * Since: 2.32
+ */
+
+
+/**
+ * g_convert:
+ * @str: the string to convert
+ * @len: the length of the string, or -1 if the string is nul-terminated<footnote id="nul-unsafe">
+ * @to_codeset: name of character set into which to convert @str
+ * @from_codeset: character set of @str.
+ * @bytes_read: (out): location to store the number of bytes in the input string that were successfully converted, or %NULL. Even if the conversion was successful, this may be less than @len if there were partial characters at the end of the input. If the error #G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value stored will the byte offset after the last valid input sequence.
+ * @bytes_written: (out): the number of bytes stored in the output buffer (not including the terminating nul).
+ * @error: location to store the error occurring, or %NULL to ignore errors. Any of the errors in #GConvertError may occur.
+ *
+ * Converts a string from one character set to another.
+ *
+ * Note that you should use g_iconv() for streaming
+ * conversions<footnoteref linkend="streaming-state"/>.
+ *
+ * nul-terminated string, which must be freed with
+ * g_free(). Otherwise %NULL and @error will be set.
+ *
+ * Returns: If the conversion was successful, a newly allocated
+ */
+
+
+/**
+ * g_convert_with_fallback:
+ * @str: the string to convert
+ * @len: the length of the string, or -1 if the string is nul-terminated<footnoteref linkend="nul-unsafe"/>.
+ * @to_codeset: name of character set into which to convert @str
+ * @from_codeset: character set of @str.
+ * @fallback: UTF-8 string to use in place of character not present in the target encoding. (The string must be representable in the target encoding).
+ * @bytes_read: location to store the number of bytes in the input string that were successfully converted, or %NULL. Even if the conversion was successful, this may be less than @len if there were partial characters at the end of the input.
+ * @bytes_written: the number of bytes stored in the output buffer (not including the terminating nul).
+ * @error: location to store the error occurring, or %NULL to ignore errors. Any of the errors in #GConvertError may occur.
+ *
+ * Converts a string from one character set to another, possibly
+ * including fallback sequences for characters not representable
+ * in the output. Note that it is not guaranteed that the specification
+ * for the fallback sequences in @fallback will be honored. Some
+ * systems may do an approximate conversion from @from_codeset
+ * to @to_codeset in their iconv() functions,
+ * in which case GLib will simply return that approximate conversion.
+ *
+ * Note that you should use g_iconv() for streaming
+ * conversions<footnoteref linkend="streaming-state"/>.
+ *
+ * nul-terminated string, which must be freed with
+ * g_free(). Otherwise %NULL and @error will be set.
+ *
+ * Returns: If the conversion was successful, a newly allocated
+ */
+
+
+/**
+ * g_convert_with_iconv:
+ * @str: the string to convert
+ * @len: the length of the string, or -1 if the string is nul-terminated<footnoteref linkend="nul-unsafe"/>.
+ * @converter: conversion descriptor from g_iconv_open()
+ * @bytes_read: location to store the number of bytes in the input string that were successfully converted, or %NULL. Even if the conversion was successful, this may be less than @len if there were partial characters at the end of the input. If the error #G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value stored will the byte offset after the last valid input sequence.
+ * @bytes_written: the number of bytes stored in the output buffer (not including the terminating nul).
+ * @error: location to store the error occurring, or %NULL to ignore errors. Any of the errors in #GConvertError may occur.
+ *
+ * Converts a string from one character set to another.
+ *
+ * Note that you should use g_iconv() for streaming
+ * conversions<footnote id="streaming-state">
+ * <para>
+ * Despite the fact that @byes_read can return information about partial
+ * characters, the <literal>g_convert_...</literal> functions
+ * are not generally suitable for streaming. If the underlying converter
+ * being used maintains internal state, then this won't be preserved
+ * across successive calls to g_convert(), g_convert_with_iconv() or
+ * g_convert_with_fallback(). (An example of this is the GNU C converter
+ * for CP1255 which does not emit a base character until it knows that
+ * the next character is not a mark that could combine with the base
+ * character.)
+ * </para>
+ * </footnote>.
+ *
+ * nul-terminated string, which must be freed with
+ * g_free(). Otherwise %NULL and @error will be set.
+ *
+ * Returns: If the conversion was successful, a newly allocated
+ */
+
+
+/**
+ * g_creat:
+ * @filename: a pathname in the GLib file name encoding (UTF-8 on Windows)
+ * @mode: as in creat()
+ *
+ * A wrapper for the POSIX creat() function. The creat() function is
+ * used to convert a pathname into a file descriptor, creating a file
+ * if necessary.
+ * On POSIX systems file descriptors are implemented by the operating
+ * system. On Windows, it's the C library that implements creat() and
+ * file descriptors. The actual Windows API for opening files is
+ * different, see MSDN documentation for CreateFile(). The Win32 API
+ * uses file handles, which are more randomish integers, not small
+ * integers like file descriptors.
+ *
+ * Because file descriptors are specific to the C library on Windows,
+ * the file descriptor returned by this function makes sense only to
+ * functions in the same C library. Thus if the GLib-using code uses a
+ * different C library than GLib does, the file descriptor returned by
+ * this function cannot be passed to C library functions like write()
+ * or read().
+ *
+ * See your C library manual for more details about creat().
+ *
+ * return value can be used exactly like the return value from creat().
+ *
+ * Returns: a new file descriptor, or -1 if an error occurred. The
+ * Since: 2.8
+ */
+
+
+/**
+ * g_critical:
+ * @...: format string, followed by parameters to insert into the format string (as with printf())
+ *
+ * Logs a "critical warning" (#G_LOG_LEVEL_CRITICAL).
+ * It's more or less application-defined what constitutes
+ * a critical vs. a regular warning. You could call
+ * g_log_set_always_fatal() to make critical warnings exit
+ * the program, then use g_critical() for fatal errors, for
+ * example.
+ *
+ * You can also make critical warnings fatal at runtime by
+ * setting the <envar>G_DEBUG</envar> environment variable (see
+ * <ulink url="glib-running.html">Running GLib Applications</ulink>).
+ */
+
+
+/**
+ * g_datalist_clear:
+ * @datalist: a datalist.
+ *
+ * Frees all the data elements of the datalist.
+ * The data elements' destroy functions are called
+ * if they have been set.
+ */
+
+
+/**
+ * g_datalist_foreach:
+ * @datalist: a datalist.
+ * @func: the function to call for each data element.
+ * @user_data: user data to pass to the function.
+ *
+ * Calls the given function for each data element of the datalist. The
+ * function is called with each data element's #GQuark id and data,
+ * together with the given @user_data parameter. Note that this
+ * function is NOT thread-safe. So unless @datalist can be protected
+ * from any modifications during invocation of this function, it should
+ * not be called.
+ */
+
+
+/**
+ * g_datalist_get_data:
+ * @datalist: a datalist.
+ * @key: the string identifying a data element.
+ * @Returns: the data element, or %NULL if it is not found.
+ *
+ * Gets a data element, using its string identifier. This is slower than
+ * g_datalist_id_get_data() because it compares strings.
+ */
+
+
+/**
+ * g_datalist_get_flags:
+ * @datalist: pointer to the location that holds a list
+ *
+ * Gets flags values packed in together with the datalist.
+ * See g_datalist_set_flags().
+ *
+ * Returns: the flags of the datalist
+ * Since: 2.8
+ */
+
+
+/**
+ * g_datalist_id_get_data:
+ * @datalist: a datalist.
+ * @key_id: the #GQuark identifying a data element.
+ * @Returns: the data element, or %NULL if it is not found.
+ *
+ * Retrieves the data element corresponding to @key_id.
+ */
+
+
+/**
+ * g_datalist_id_remove_data:
+ * @dl: a datalist.
+ * @q: the #GQuark identifying the data element.
+ *
+ * Removes an element, using its #GQuark identifier.
+ */
+
+
+/**
+ * g_datalist_id_remove_no_notify:
+ * @datalist: a datalist.
+ * @key_id: the #GQuark identifying a data element.
+ * @Returns: the data previously stored at @key_id, or %NULL if none.
+ *
+ * Removes an element, without calling its destroy notification
+ * function.
+ */
+
+
+/**
+ * g_datalist_id_set_data:
+ * @dl: a datalist.
+ * @q: the #GQuark to identify the data element.
+ * @d: (allow-none): the data element, or %NULL to remove any previous element corresponding to @q.
+ *
+ * Sets the data corresponding to the given #GQuark id. Any previous
+ * data with the same key is removed, and its destroy function is
+ * called.
+ */
+
+
+/**
+ * g_datalist_id_set_data_full:
+ * @datalist: a datalist.
+ * @key_id: the #GQuark to identify the data element.
+ * @data: (allow-none): the data element or %NULL to remove any previous element corresponding to @key_id.
+ * @destroy_func: the function to call when the data element is removed. This function will be called with the data element and can be used to free any memory allocated for it. If @data is %NULL, then @destroy_func must also be %NULL.
+ *
+ * Sets the data corresponding to the given #GQuark id, and the
+ * function to be called when the element is removed from the datalist.
+ * Any previous data with the same key is removed, and its destroy
+ * function is called.
+ */
+
+
+/**
+ * g_datalist_init:
+ * @datalist: a pointer to a pointer to a datalist.
+ *
+ * Resets the datalist to %NULL. It does not free any memory or call
+ * any destroy functions.
+ */
+
+
+/**
+ * g_datalist_remove_data:
+ * @dl: a datalist.
+ * @k: the string identifying the data element.
+ *
+ * Removes an element using its string identifier. The data element's
+ * destroy function is called if it has been set.
+ */
+
+
+/**
+ * g_datalist_remove_no_notify:
+ * @dl: a datalist.
+ * @k: the string identifying the data element.
+ *
+ * Removes an element, without calling its destroy notifier.
+ */
+
+
+/**
+ * g_datalist_set_data:
+ * @dl: a datalist.
+ * @k: the string to identify the data element.
+ * @d: (allow-none): the data element, or %NULL to remove any previous element corresponding to @k.
+ *
+ * Sets the data element corresponding to the given string identifier.
+ */
+
+
+/**
+ * g_datalist_set_data_full:
+ * @dl: a datalist.
+ * @k: the string to identify the data element.
+ * @d: (allow-none): the data element, or %NULL to remove any previous element corresponding to @k.
+ * @f: the function to call when the data element is removed. This function will be called with the data element and can be used to free any memory allocated for it. If @d is %NULL, then @f must also be %NULL.
+ *
+ * Sets the data element corresponding to the given string identifier,
+ * and the function to be called when the data element is removed.
+ */
+
+
+/**
+ * g_datalist_set_flags:
+ * @datalist: pointer to the location that holds a list
+ * @flags: the flags to turn on. The values of the flags are restricted by %G_DATALIST_FLAGS_MASK (currently 3; giving two possible boolean flags). A value for @flags that doesn't fit within the mask is an error.
+ *
+ * Turns on flag values for a data list. This function is used
+ * to keep a small number of boolean flags in an object with
+ * a data list without using any additional space. It is
+ * not generally useful except in circumstances where space
+ * is very tight. (It is used in the base #GObject type, for
+ * example.)
+ *
+ * Since: 2.8
+ */
+
+
+/**
+ * g_datalist_unset_flags:
+ * @datalist: pointer to the location that holds a list
+ * @flags: the flags to turn off. The values of the flags are restricted by %G_DATALIST_FLAGS_MASK (currently 3: giving two possible boolean flags). A value for @flags that doesn't fit within the mask is an error.
+ *
+ * Turns off flag values for a data list. See g_datalist_unset_flags()
+ *
+ * Since: 2.8
+ */
+
+
+/**
+ * g_dataset_destroy:
+ * @dataset_location: the location identifying the dataset.
+ *
+ * Destroys the dataset, freeing all memory allocated, and calling any
+ * destroy functions set for data elements.
+ */
+
+
+/**
+ * g_dataset_foreach:
+ * @dataset_location: the location identifying the dataset.
+ * @func: the function to call for each data element.
+ * @user_data: user data to pass to the function.
+ *
+ * Calls the given function for each data element which is associated
+ * with the given location. Note that this function is NOT thread-safe.
+ * So unless @datalist can be protected from any modifications during
+ * invocation of this function, it should not be called.
+ */
+
+
+/**
+ * g_dataset_get_data:
+ * @l: the location identifying the dataset.
+ * @k: the string identifying the data element.
+ * @Returns: the data element corresponding to the string, or %NULL if it is not found.
+ *
+ * Gets the data element corresponding to a string.
+ */
+
+
+/**
+ * g_dataset_id_get_data:
+ * @dataset_location: the location identifying the dataset.
+ * @key_id: the #GQuark id to identify the data element.
+ * @Returns: the data element corresponding to the #GQuark, or %NULL if it is not found.
+ *
+ * Gets the data element corresponding to a #GQuark.
+ */
+
+
+/**
+ * g_dataset_id_remove_data:
+ * @l: the location identifying the dataset.
+ * @k: the #GQuark id identifying the data element.
+ *
+ * Removes a data element from a dataset. The data element's destroy
+ * function is called if it has been set.
+ */
+
+
+/**
+ * g_dataset_id_remove_no_notify:
+ * @dataset_location: the location identifying the dataset.
+ * @key_id: the #GQuark ID identifying the data element.
+ * @Returns: the data previously stored at @key_id, or %NULL if none.
+ *
+ * Removes an element, without calling its destroy notification
+ * function.
+ */
+
+
+/**
+ * g_dataset_id_set_data:
+ * @l: the location identifying the dataset.
+ * @k: the #GQuark id to identify the data element.
+ * @d: the data element.
+ *
+ * Sets the data element associated with the given #GQuark id. Any
+ * previous data with the same key is removed, and its destroy function
+ * is called.
+ */
+
+
+/**
+ * g_dataset_id_set_data_full:
+ * @dataset_location: the location identifying the dataset.
+ * @key_id: the #GQuark id to identify the data element.
+ * @data: the data element.
+ * @destroy_func: the function to call when the data element is removed. This function will be called with the data element and can be used to free any memory allocated for it.
+ *
+ * Sets the data element associated with the given #GQuark id, and also
+ * the function to call when the data element is destroyed. Any
+ * previous data with the same key is removed, and its destroy function
+ * is called.
+ */
+
+
+/**
+ * g_dataset_remove_data:
+ * @l: the location identifying the dataset.
+ * @k: the string identifying the data element.
+ *
+ * Removes a data element corresponding to a string. Its destroy
+ * function is called if it has been set.
+ */
+
+
+/**
+ * g_dataset_remove_no_notify:
+ * @l: the location identifying the dataset.
+ * @k: the string identifying the data element.
+ *
+ * Removes an element, without calling its destroy notifier.
+ */
+
+
+/**
+ * g_dataset_set_data:
+ * @l: the location identifying the dataset.
+ * @k: the string to identify the data element.
+ * @d: the data element.
+ *
+ * Sets the data corresponding to the given string identifier.
+ */
+
+
+/**
+ * g_dataset_set_data_full:
+ * @l: the location identifying the dataset.
+ * @k: the string to identify the data element.
+ * @d: the data element.
+ * @f: the function to call when the data element is removed. This function will be called with the data element and can be used to free any memory allocated for it.
+ *
+ * Sets the data corresponding to the given string identifier, and the
+ * function to call when the data element is destroyed.
+ */
+
+
+/**
+ * g_date_add_days:
+ * @date: a #GDate to increment
+ * @n_days: number of days to move the date forward
+ *
+ * Increments a date some number of days.
+ * To move forward by weeks, add weeks*7 days.
+ * The date must be valid.
+ */
+
+
+/**
+ * g_date_add_months:
+ * @date: a #GDate to increment
+ * @n_months: number of months to move forward
+ *
+ * Increments a date by some number of months.
+ * If the day of the month is greater than 28,
+ * this routine may change the day of the month
+ * (because the destination month may not have
+ * the current day in it). The date must be valid.
+ */
+
+
+/**
+ * g_date_add_years:
+ * @date: a #GDate to increment
+ * @n_years: number of years to move forward
+ *
+ * Increments a date by some number of years.
+ * If the date is February 29, and the destination
+ * year is not a leap year, the date will be changed
+ * to February 28. The date must be valid.
+ */
+
+
+/**
+ * g_date_clamp:
+ * @date: a #GDate to clamp
+ * @min_date: minimum accepted value for @date
+ * @max_date: maximum accepted value for @date
+ *
+ * If @date is prior to @min_date, sets @date equal to @min_date.
+ * If @date falls after @max_date, sets @date equal to @max_date.
+ * Otherwise, @date is unchanged.
+ * Either of @min_date and @max_date may be %NULL.
+ * All non-%NULL dates must be valid.
+ */
+
+
+/**
+ * g_date_clear:
+ * @date: pointer to one or more dates to clear
+ * @n_dates: number of dates to clear
+ *
+ * Initializes one or more #GDate structs to a sane but invalid
+ * state. The cleared dates will not represent an existing date, but will
+ * not contain garbage. Useful to init a date declared on the stack.
+ * Validity can be tested with g_date_valid().
+ */
+
+
+/**
+ * g_date_compare:
+ * @lhs: first date to compare
+ * @rhs: second date to compare
+ *
+ * qsort()-style comparison function for dates.
+ * Both dates must be valid.
+ *
+ * greater than zero if @lhs is greater than @rhs
+ *
+ * Returns: 0 for equal, less than zero if @lhs is less than @rhs,
+ */
+
+
+/**
+ * g_date_days_between:
+ * @date1: the first date
+ * @date2: the second date
+ *
+ * Computes the number of days between two dates.
+ * If @date2 is prior to @date1, the returned value is negative.
+ * Both dates must be valid.
+ *
+ * Returns: the number of days between @date1 and @date2
+ */
+
+
+/**
+ * g_date_free:
+ * @date: a #GDate to free
+ *
+ * Frees a #GDate returned from g_date_new().
+ */
+
+
+/**
+ * g_date_get_day:
+ * @date: a #GDate to extract the day of the month from
+ *
+ * Returns the day of the month. The date must be valid.
+ *
+ * Returns: day of the month
+ */
+
+
+/**
+ * g_date_get_day_of_year:
+ * @date: a #GDate to extract day of year from
+ *
+ * Returns the day of the year, where Jan 1 is the first day of the
+ * year. The date must be valid.
+ *
+ * Returns: day of the year
+ */
+
+
+/**
+ * g_date_get_days_in_month:
+ * @month: month
+ * @year: year
+ *
+ * Returns the number of days in a month, taking leap
+ * years into account.
+ *
+ * Returns: number of days in @month during the @year
+ */
+
+
+/**
+ * g_date_get_iso8601_week_of_year:
+ * @date: a valid #GDate
+ *
+ * Returns the week of the year, where weeks are interpreted according
+ * to ISO 8601.
+ *
+ * Returns: ISO 8601 week number of the year.
+ * Since: 2.6
+ */
+
+
+/**
+ * g_date_get_julian:
+ * @date: a #GDate to extract the Julian day from
+ *
+ * Returns the Julian day or "serial number" of the #GDate. The
+ * Julian day is simply the number of days since January 1, Year 1; i.e.,
+ * January 1, Year 1 is Julian day 1; January 2, Year 1 is Julian day 2,
+ * etc. The date must be valid.
+ *
+ * Returns: Julian day
+ */
+
+
+/**
+ * g_date_get_monday_week_of_year:
+ * @date: a #GDate
+ *
+ * Returns the week of the year, where weeks are understood to start on
+ * Monday. If the date is before the first Monday of the year, return
+ * 0. The date must be valid.
+ *
+ * Returns: week of the year
+ */
+
+
+/**
+ * g_date_get_monday_weeks_in_year:
+ * @year: a year
+ *
+ * Returns the number of weeks in the year, where weeks
+ * are taken to start on Monday. Will be 52 or 53. The
+ * date must be valid. (Years always have 52 7-day periods,
+ * plus 1 or 2 extra days depending on whether it's a leap
+ * year. This function is basically telling you how many
+ * Mondays are in the year, i.e. there are 53 Mondays if
+ * one of the extra days happens to be a Monday.)
+ *
+ * Returns: number of Mondays in the year
+ */
+
+
+/**
+ * g_date_get_month:
+ * @date: a #GDate to get the month from
+ *
+ * Returns the month of the year. The date must be valid.
+ *
+ * Returns: month of the year as a #GDateMonth
+ */
+
+
+/**
+ * g_date_get_sunday_week_of_year:
+ * @date: a #GDate
+ *
+ * Returns the week of the year during which this date falls, if weeks
+ * are understood to being on Sunday. The date must be valid. Can return
+ * 0 if the day is before the first Sunday of the year.
+ *
+ * Returns: week number
+ */
+
+
+/**
+ * g_date_get_sunday_weeks_in_year:
+ * @year: year to count weeks in
+ *
+ * Returns the number of weeks in the year, where weeks
+ * are taken to start on Sunday. Will be 52 or 53. The
+ * date must be valid. (Years always have 52 7-day periods,
+ * plus 1 or 2 extra days depending on whether it's a leap
+ * year. This function is basically telling you how many
+ * Sundays are in the year, i.e. there are 53 Sundays if
+ * one of the extra days happens to be a Sunday.)
+ *
+ * Returns: the number of weeks in @year
+ */
+
+
+/**
+ * g_date_get_weekday:
+ * @date: a #GDate
+ *
+ * Returns the day of the week for a #GDate. The date must be valid.
+ *
+ * Returns: day of the week as a #GDateWeekday.
+ */
+
+
+/**
+ * g_date_get_year:
+ * @date: a #GDate
+ *
+ * Returns the year of a #GDate. The date must be valid.
+ *
+ * Returns: year in which the date falls
+ */
+
+
+/**
+ * g_date_is_first_of_month:
+ * @date: a #GDate to check
+ *
+ * Returns %TRUE if the date is on the first of a month.
+ * The date must be valid.
+ *
+ * Returns: %TRUE if the date is the first of the month
+ */
+
+
+/**
+ * g_date_is_last_of_month:
+ * @date: a #GDate to check
+ *
+ * Returns %TRUE if the date is the last day of the month.
+ * The date must be valid.
+ *
+ * Returns: %TRUE if the date is the last day of the month
+ */
+
+
+/**
+ * g_date_is_leap_year:
+ * @year: year to check
+ *
+ * Returns %TRUE if the year is a leap year.
+ * <footnote><para>For the purposes of this function,
+ * leap year is every year divisible by 4 unless that year
+ * is divisible by 100. If it is divisible by 100 it would
+ * be a leap year only if that year is also divisible
+ * by 400.</para></footnote>
+ *
+ * Returns: %TRUE if the year is a leap year
+ */
+
+
+/**
+ * g_date_new:
+ *
+ * Allocates a #GDate and initializes
+ * it to a sane state. The new date will
+ * be cleared (as if you'd called g_date_clear()) but invalid (it won't
+ * represent an existing day). Free the return value with g_date_free().
+ *
+ * Returns: a newly-allocated #GDate
+ */
+
+
+/**
+ * g_date_new_dmy:
+ * @day: day of the month
+ * @month: month of the year
+ * @year: year
+ *
+ * Like g_date_new(), but also sets the value of the date. Assuming the
+ * day-month-year triplet you pass in represents an existing day, the
+ * returned date will be valid.
+ *
+ * Returns: a newly-allocated #GDate initialized with @day, @month, and @year
+ */
+
+
+/**
+ * g_date_new_julian:
+ * @julian_day: days since January 1, Year 1
+ *
+ * Like g_date_new(), but also sets the value of the date. Assuming the
+ * Julian day number you pass in is valid (greater than 0, less than an
+ * unreasonably large number), the returned date will be valid.
+ *
+ * Returns: a newly-allocated #GDate initialized with @julian_day
+ */
+
+
+/**
+ * g_date_order:
+ * @date1: the first date
+ * @date2: the second date
+ *
+ * Checks if @date1 is less than or equal to @date2,
+ * and swap the values if this is not the case.
+ */
+
+
+/**
+ * g_date_set_day:
+ * @date: a #GDate
+ * @day: day to set
+ *
+ * Sets the day of the month for a #GDate. If the resulting
+ * day-month-year triplet is invalid, the date will be invalid.
+ */
+
+
+/**
+ * g_date_set_dmy:
+ * @date: a #GDate
+ * @day: day
+ * @month: month
+ * @y: year
+ *
+ * Sets the value of a #GDate from a day, month, and year.
+ * The day-month-year triplet must be valid; if you aren't
+ * sure it is, call g_date_valid_dmy() to check before you
+ * set it.
+ */
+
+
+/**
+ * g_date_set_julian:
+ * @date: a #GDate
+ * @julian_date: Julian day number (days since January 1, Year 1)
+ *
+ * Sets the value of a #GDate from a Julian day number.
+ */
+
+
+/**
+ * g_date_set_month:
+ * @date: a #GDate
+ * @month: month to set
+ *
+ * Sets the month of the year for a #GDate.  If the resulting
+ * day-month-year triplet is invalid, the date will be invalid.
+ */
+
+
+/**
+ * g_date_set_parse:
+ * @date: a #GDate to fill in
+ * @str: string to parse
+ *
+ * Parses a user-inputted string @str, and try to figure out what date it
+ * represents, taking the <link linkend="setlocale">current locale</link>
+ * into account. If the string is successfully parsed, the date will be
+ * valid after the call. Otherwise, it will be invalid. You should check
+ * using g_date_valid() to see whether the parsing succeeded.
+ *
+ * This function is not appropriate for file formats and the like; it
+ * isn't very precise, and its exact behavior varies with the locale.
+ * It's intended to be a heuristic routine that guesses what the user
+ * means by a given string (and it does work pretty well in that
+ * capacity).
+ */
+
+
+/**
+ * g_date_set_time:
+ * @date: a #GDate.
+ * @time_: #GTime value to set.
+ *
+ * Sets the value of a date from a #GTime value.
+ * The time to date conversion is done using the user's current timezone.
+ *
+ * Deprecated: 2.10: Use g_date_set_time_t() instead.
+ */
+
+
+/**
+ * g_date_set_time_t:
+ * @date: a #GDate
+ * @timet: <type>time_t</type> value to set
+ *
+ * Sets the value of a date to the date corresponding to a time
+ * specified as a time_t. The time to date conversion is done using
+ * the user's current timezone.
+ *
+ * To set the value of a date to the current day, you could write:
+ * |[
+ * g_date_set_time_t (date, time (NULL));
+ * ]|
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * g_date_set_time_val:
+ * @date: a #GDate
+ * @timeval: #GTimeVal value to set
+ *
+ * Sets the value of a date from a #GTimeVal value.  Note that the
+ * @tv_usec member is ignored, because #GDate can't make use of the
+ * additional precision.
+ *
+ * The time to date conversion is done using the user's current timezone.
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * g_date_set_year:
+ * @date: a #GDate
+ * @year: year to set
+ *
+ * Sets the year for a #GDate. If the resulting day-month-year
+ * triplet is invalid, the date will be invalid.
+ */
+
+
+/**
+ * g_date_strftime:
+ * @s: destination buffer
+ * @slen: buffer size
+ * @format: format string
+ * @date: valid #GDate
+ *
+ * Generates a printed representation of the date, in a
+ * <link linkend="setlocale">locale</link>-specific way.
+ * Works just like the platform's C library strftime() function,
+ * but only accepts date-related formats; time-related formats
+ * give undefined results. Date must be valid. Unlike strftime()
+ * (which uses the locale encoding), works on a UTF-8 format
+ * string and stores a UTF-8 result.
+ *
+ * This function does not provide any conversion specifiers in
+ * addition to those implemented by the platform's C library.
+ * For example, don't expect that using g_date_strftime() would
+ * make the \%F provided by the C99 strftime() work on Windows
+ * where the C library only complies to C89.
+ *
+ * Returns: number of characters written to the buffer, or 0 the buffer was too small
+ */
+
+
+/**
+ * g_date_subtract_days:
+ * @date: a #GDate to decrement
+ * @n_days: number of days to move
+ *
+ * Moves a date some number of days into the past.
+ * To move by weeks, just move by weeks*7 days.
+ * The date must be valid.
+ */
+
+
+/**
+ * g_date_subtract_months:
+ * @date: a #GDate to decrement
+ * @n_months: number of months to move
+ *
+ * Moves a date some number of months into the past.
+ * If the current day of the month doesn't exist in
+ * the destination month, the day of the month
+ * may change. The date must be valid.
+ */
+
+
+/**
+ * g_date_subtract_years:
+ * @date: a #GDate to decrement
+ * @n_years: number of years to move
+ *
+ * Moves a date some number of years into the past.
+ * If the current day doesn't exist in the destination
+ * year (i.e. it's February 29 and you move to a non-leap-year)
+ * then the day is changed to February 29. The date
+ * must be valid.
+ */
+
+
+/**
+ * g_date_time_add:
+ * @datetime: a #GDateTime
+ * @timespan: a #GTimeSpan
+ *
+ * Creates a copy of @datetime and adds the specified timespan to the copy.
+ *
+ * g_date_time_unref().
+ *
+ * Returns: the newly created #GDateTime which should be freed with
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_add_days:
+ * @datetime: a #GDateTime
+ * @days: the number of days
+ *
+ * Creates a copy of @datetime and adds the specified number of days to the
+ * copy.
+ *
+ * g_date_time_unref().
+ *
+ * Returns: the newly created #GDateTime which should be freed with
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_add_full:
+ * @datetime: a #GDateTime
+ * @years: the number of years to add
+ * @months: the number of months to add
+ * @days: the number of days to add
+ * @hours: the number of hours to add
+ * @minutes: the number of minutes to add
+ * @seconds: the number of seconds to add
+ *
+ * Creates a new #GDateTime adding the specified values to the current date and
+ * time in @datetime.
+ *
+ * g_date_time_unref().
+ *
+ * Returns: the newly created #GDateTime that should be freed with
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_add_hours:
+ * @datetime: a #GDateTime
+ * @hours: the number of hours to add
+ *
+ * Creates a copy of @datetime and adds the specified number of hours
+ *
+ * g_date_time_unref().
+ *
+ * Returns: the newly created #GDateTime which should be freed with
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_add_minutes:
+ * @datetime: a #GDateTime
+ * @minutes: the number of minutes to add
+ *
+ * Creates a copy of @datetime adding the specified number of minutes.
+ *
+ * g_date_time_unref().
+ *
+ * Returns: the newly created #GDateTime which should be freed with
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_add_months:
+ * @datetime: a #GDateTime
+ * @months: the number of months
+ *
+ * Creates a copy of @datetime and adds the specified number of months to the
+ * copy.
+ *
+ * g_date_time_unref().
+ *
+ * Returns: the newly created #GDateTime which should be freed with
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_add_seconds:
+ * @datetime: a #GDateTime
+ * @seconds: the number of seconds to add
+ *
+ * Creates a copy of @datetime and adds the specified number of seconds.
+ *
+ * g_date_time_unref().
+ *
+ * Returns: the newly created #GDateTime which should be freed with
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_add_weeks:
+ * @datetime: a #GDateTime
+ * @weeks: the number of weeks
+ *
+ * Creates a copy of @datetime and adds the specified number of weeks to the
+ * copy.
+ *
+ * g_date_time_unref().
+ *
+ * Returns: the newly created #GDateTime which should be freed with
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_add_years:
+ * @datetime: a #GDateTime
+ * @years: the number of years
+ *
+ * Creates a copy of @datetime and adds the specified number of years to the
+ * copy.
+ *
+ * g_date_time_unref().
+ *
+ * Returns: the newly created #GDateTime which should be freed with
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_compare:
+ * @dt1: first #GDateTime to compare
+ * @dt2: second #GDateTime to compare
+ *
+ * A comparison function for #GDateTimes that is suitable
+ * as a #GCompareFunc. Both #GDateTimes must be non-%NULL.
+ *
+ * than @dt2.
+ *
+ * Returns: -1, 0 or 1 if @dt1 is less than, equal to or greater
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_difference:
+ * @end: a #GDateTime
+ * @begin: a #GDateTime
+ *
+ * Calculates the difference in time between @end and @begin.  The
+ * #GTimeSpan that is returned is effectively @end - @begin (ie:
+ * positive if the first simparameter is larger).
+ *
+ * span expressed in microseconds.
+ *
+ * Returns: the difference between the two #GDateTime, as a time
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_equal:
+ * @dt1: a #GDateTime
+ * @dt2: a #GDateTime
+ *
+ * Checks to see if @dt1 and @dt2 are equal.
+ *
+ * Equal here means that they represent the same moment after converting
+ * them to the same time zone.
+ *
+ * Returns: %TRUE if @dt1 and @dt2 are equal
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_format:
+ * @datetime: A #GDateTime
+ * @format: a valid UTF-8 string, containing the format for the #GDateTime
+ *
+ * Creates a newly allocated string representing the requested @format.
+ *
+ * The format strings understood by this function are a subset of the
+ * strftime() format language as specified by C99.  The \%D, \%U and \%W
+ * conversions are not supported, nor is the 'E' modifier.  The GNU
+ * extensions \%k, \%l, \%s and \%P are supported, however, as are the
+ * '0', '_' and '-' modifiers.
+ *
+ * In contrast to strftime(), this function always produces a UTF-8
+ * string, regardless of the current locale.  Note that the rendering of
+ * many formats is locale-dependent and may not match the strftime()
+ * output exactly.
+ *
+ * The following format specifiers are supported:
+ *
+ * <variablelist>
+ * <varlistentry><term>
+ * <literal>\%a</literal>:
+ * </term><listitem><simpara>
+ * the abbreviated weekday name according to the current locale
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%A</literal>:
+ * </term><listitem><simpara>
+ * the full weekday name according to the current locale
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%b</literal>:
+ * </term><listitem><simpara>
+ * the abbreviated month name according to the current locale
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%B</literal>:
+ * </term><listitem><simpara>
+ * the full month name according to the current locale
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%c</literal>:
+ * </term><listitem><simpara>
+ * the  preferred  date  and  time  representation  for the current locale
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%C</literal>:
+ * </term><listitem><simpara>
+ * The century number (year/100) as a 2-digit integer (00-99)
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%d</literal>:
+ * </term><listitem><simpara>
+ * the day of the month as a decimal number (range 01 to 31)
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%e</literal>:
+ * </term><listitem><simpara>
+ * the day of the month as a decimal number (range  1 to 31)
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%F</literal>:
+ * </term><listitem><simpara>
+ * equivalent to <literal>\%Y-\%m-\%d</literal> (the ISO 8601 date
+ * format)
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%g</literal>:
+ * </term><listitem><simpara>
+ * the last two digits of the ISO 8601 week-based year as a decimal
+ * number (00-99).  This works well with \%V and \%u.
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%G</literal>:
+ * </term><listitem><simpara>
+ * the ISO 8601 week-based year as a decimal number.  This works well
+ * with \%V and \%u.
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%h</literal>:
+ * </term><listitem><simpara>
+ * equivalent to <literal>\%b</literal>
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%H</literal>:
+ * </term><listitem><simpara>
+ * the hour as a decimal number using a 24-hour clock (range 00 to
+ * 23)
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%I</literal>:
+ * </term><listitem><simpara>
+ * the hour as a decimal number using a 12-hour clock (range 01 to
+ * 12)
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%j</literal>:
+ * </term><listitem><simpara>
+ * the day of the year as a decimal number (range 001 to 366)
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%k</literal>:
+ * </term><listitem><simpara>
+ * the hour (24-hour clock) as a decimal number (range 0 to 23);
+ * single digits are preceded by a blank
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%l</literal>:
+ * </term><listitem><simpara>
+ * the hour (12-hour clock) as a decimal number (range 1 to 12);
+ * single digits are preceded by a blank
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%m</literal>:
+ * </term><listitem><simpara>
+ * the month as a decimal number (range 01 to 12)
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%M</literal>:
+ * </term><listitem><simpara>
+ * the minute as a decimal number (range 00 to 59)
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%p</literal>:
+ * </term><listitem><simpara>
+ * either "AM" or "PM" according to the given time value, or the
+ * corresponding  strings for the current locale.  Noon is treated as
+ * "PM" and midnight as "AM".
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%P</literal>:
+ * </term><listitem><simpara>
+ * like \%p but lowercase: "am" or "pm" or a corresponding string for
+ * the current locale
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%r</literal>:
+ * </term><listitem><simpara>
+ * the time in a.m. or p.m. notation
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%R</literal>:
+ * </term><listitem><simpara>
+ * the time in 24-hour notation (<literal>\%H:\%M</literal>)
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%s</literal>:
+ * </term><listitem><simpara>
+ * the number of seconds since the Epoch, that is, since 1970-01-01
+ * 00:00:00 UTC
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%S</literal>:
+ * </term><listitem><simpara>
+ * the second as a decimal number (range 00 to 60)
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%t</literal>:
+ * </term><listitem><simpara>
+ * a tab character
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%T</literal>:
+ * </term><listitem><simpara>
+ * the time in 24-hour notation with seconds (<literal>\%H:\%M:\%S</literal>)
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%u</literal>:
+ * </term><listitem><simpara>
+ * the ISO 8601 standard day of the week as a decimal, range 1 to 7,
+ * Monday being 1.  This works well with \%G and \%V.
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%V</literal>:
+ * </term><listitem><simpara>
+ * the ISO 8601 standard week number of the current year as a decimal
+ * number, range 01 to 53, where week 1 is the first week that has at
+ * least 4 days in the new year. See g_date_time_get_week_of_year().
+ * This works well with \%G and \%u.
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%w</literal>:
+ * </term><listitem><simpara>
+ * the day of the week as a decimal, range 0 to 6, Sunday being 0.
+ * This is not the ISO 8601 standard format -- use \%u instead.
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%x</literal>:
+ * </term><listitem><simpara>
+ * the preferred date representation for the current locale without
+ * the time
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%X</literal>:
+ * </term><listitem><simpara>
+ * the preferred time representation for the current locale without
+ * the date
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%y</literal>:
+ * </term><listitem><simpara>
+ * the year as a decimal number without the century
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%Y</literal>:
+ * </term><listitem><simpara>
+ * the year as a decimal number including the century
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%z</literal>:
+ * </term><listitem><simpara>
+ * the time-zone as hour offset from UTC
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%Z</literal>:
+ * </term><listitem><simpara>
+ * the time zone or name or abbreviation
+ * </simpara></listitem></varlistentry>
+ * <varlistentry><term>
+ * <literal>\%\%</literal>:
+ * </term><listitem><simpara>
+ * a literal <literal>\%</literal> character
+ * </simpara></listitem></varlistentry>
+ * </variablelist>
+ *
+ * Some conversion specifications can be modified by preceding the
+ * conversion specifier by one or more modifier characters. The
+ * following modifiers are supported for many of the numeric
+ * conversions:
+ * <variablelist>
+ * <varlistentry>
+ * <term>O</term>
+ * <listitem>
+ * Use alternative numeric symbols, if the current locale
+ * supports those.
+ * </listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term>_</term>
+ * <listitem>
+ * Pad a numeric result with spaces.
+ * This overrides the default padding for the specifier.
+ * </listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term>-</term>
+ * <listitem>
+ * Do not pad a numeric result.
+ * This overrides the default padding for the specifier.
+ * </listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term>0</term>
+ * <listitem>
+ * Pad a numeric result with zeros.
+ * This overrides the default padding for the specifier.
+ * </listitem>
+ * </varlistentry>
+ * </variablelist>
+ *
+ * or %NULL in the case that there was an error.  The string
+ * should be freed with g_free().
+ *
+ * Returns: a newly allocated string formatted to the requested format
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_get_day_of_month:
+ * @datetime: a #GDateTime
+ *
+ * Retrieves the day of the month represented by @datetime in the gregorian
+ * calendar.
+ *
+ * Returns: the day of the month
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_get_day_of_week:
+ * @datetime: a #GDateTime
+ *
+ * Retrieves the ISO 8601 day of the week on which @datetime falls (1 is
+ * Monday, 2 is Tuesday... 7 is Sunday).
+ *
+ * Returns: the day of the week
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_get_day_of_year:
+ * @datetime: a #GDateTime
+ *
+ * Retrieves the day of the year represented by @datetime in the Gregorian
+ * calendar.
+ *
+ * Returns: the day of the year
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_get_hour:
+ * @datetime: a #GDateTime
+ *
+ * Retrieves the hour of the day represented by @datetime
+ *
+ * Returns: the hour of the day
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_get_microsecond:
+ * @datetime: a #GDateTime
+ *
+ * Retrieves the microsecond of the date represented by @datetime
+ *
+ * Returns: the microsecond of the second
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_get_minute:
+ * @datetime: a #GDateTime
+ *
+ * Retrieves the minute of the hour represented by @datetime
+ *
+ * Returns: the minute of the hour
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_get_month:
+ * @datetime: a #GDateTime
+ *
+ * Retrieves the month of the year represented by @datetime in the Gregorian
+ * calendar.
+ *
+ * Returns: the month represented by @datetime
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_get_second:
+ * @datetime: a #GDateTime
+ *
+ * Retrieves the second of the minute represented by @datetime
+ *
+ * Returns: the second represented by @datetime
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_get_seconds:
+ * @datetime: a #GDateTime
+ *
+ * Retrieves the number of seconds since the start of the last minute,
+ * including the fractional part.
+ *
+ * Returns: the number of seconds
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_get_timezone_abbreviation:
+ * @datetime: a #GDateTime
+ *
+ * Determines the time zone abbreviation to be used at the time and in
+ * the time zone of @datetime.
+ *
+ * For example, in Toronto this is currently "EST" during the winter
+ * months and "EDT" during the summer months when daylight savings
+ * time is in effect.
+ *
+ * string is owned by the #GDateTime and it should not be
+ * modified or freed
+ *
+ * Returns: (transfer none): the time zone abbreviation. The returned
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_get_utc_offset:
+ * @datetime: a #GDateTime
+ *
+ * Determines the offset to UTC in effect at the time and in the time
+ * zone of @datetime.
+ *
+ * The offset is the number of microseconds that you add to UTC time to
+ * arrive at local time for the time zone (ie: negative numbers for time
+ * zones west of GMT, positive numbers for east).
+ *
+ * If @datetime represents UTC time, then the offset is always zero.
+ *
+ * get the local time
+ *
+ * Returns: the number of microseconds that should be added to UTC to
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_get_week_numbering_year:
+ * @datetime: a #GDateTime
+ *
+ * Returns the ISO 8601 week-numbering year in which the week containing
+ * @datetime falls.
+ *
+ * This function, taken together with g_date_time_get_week_of_year() and
+ * g_date_time_get_day_of_week() can be used to determine the full ISO
+ * week date on which @datetime falls.
+ *
+ * This is usually equal to the normal Gregorian year (as returned by
+ * g_date_time_get_year()), except as detailed below:
+ *
+ * For Thursday, the week-numbering year is always equal to the usual
+ * calendar year.  For other days, the number is such that every day
+ * within a complete week (Monday to Sunday) is contained within the
+ * same week-numbering year.
+ *
+ * For Monday, Tuesday and Wednesday occurring near the end of the year,
+ * this may mean that the week-numbering year is one greater than the
+ * calendar year (so that these days have the same week-numbering year
+ * as the Thursday occurring early in the next year).
+ *
+ * For Friday, Saturaday and Sunday occurring near the start of the year,
+ * this may mean that the week-numbering year is one less than the
+ * calendar year (so that these days have the same week-numbering year
+ * as the Thursday occurring late in the previous year).
+ *
+ * An equivalent description is that the week-numbering year is equal to
+ * the calendar year containing the majority of the days in the current
+ * week (Monday to Sunday).
+ *
+ * Note that January 1 0001 in the proleptic Gregorian calendar is a
+ * Monday, so this function never returns 0.
+ *
+ * Returns: the ISO 8601 week-numbering year for @datetime
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_get_week_of_year:
+ * @datetime: a #GDateTime
+ *
+ * Returns the ISO 8601 week number for the week containing @datetime.
+ * The ISO 8601 week number is the same for every day of the week (from
+ * Moday through Sunday).  That can produce some unusual results
+ * (described below).
+ *
+ * The first week of the year is week 1.  This is the week that contains
+ * the first Thursday of the year.  Equivalently, this is the first week
+ * that has more than 4 of its days falling within the calendar year.
+ *
+ * The value 0 is never returned by this function.  Days contained
+ * within a year but occurring before the first ISO 8601 week of that
+ * year are considered as being contained in the last week of the
+ * previous year.  Similarly, the final days of a calendar year may be
+ * considered as being part of the first ISO 8601 week of the next year
+ * if 4 or more days of that week are contained within the new year.
+ *
+ * Returns: the ISO 8601 week number for @datetime.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_get_year:
+ * @datetime: A #GDateTime
+ *
+ * Retrieves the year represented by @datetime in the Gregorian calendar.
+ *
+ * Returns: the year represented by @datetime
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_get_ymd:
+ * @datetime: a #GDateTime.
+ * @year: (out) (allow-none): the return location for the gregorian year, or %NULL.
+ * @month: (out) (allow-none): the return location for the month of the year, or %NULL.
+ * @day: (out) (allow-none): the return location for the day of the month, or %NULL.
+ *
+ * Retrieves the Gregorian day, month, and year of a given #GDateTime.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_hash:
+ * @datetime: a #GDateTime
+ *
+ * Hashes @datetime into a #guint, suitable for use within #GHashTable.
+ *
+ * Returns: a #guint containing the hash
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_is_daylight_savings:
+ * @datetime: a #GDateTime
+ *
+ * Determines if daylight savings time is in effect at the time and in
+ * the time zone of @datetime.
+ *
+ * Returns: %TRUE if daylight savings time is in effect
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_new:
+ * @tz: a #GTimeZone
+ * @year: the year component of the date
+ * @month: the month component of the date
+ * @day: the day component of the date
+ * @hour: the hour component of the date
+ * @minute: the minute component of the date
+ * @seconds: the number of seconds past the minute
+ *
+ * Creates a new #GDateTime corresponding to the given date and time in
+ * the time zone @tz.
+ *
+ * The @year must be between 1 and 9999, @month between 1 and 12 and @day
+ * between 1 and 28, 29, 30 or 31 depending on the month and the year.
+ *
+ * @hour must be between 0 and 23 and @minute must be between 0 and 59.
+ *
+ * @seconds must be at least 0.0 and must be strictly less than 60.0.
+ * It will be rounded down to the nearest microsecond.
+ *
+ * If the given time is not representable in the given time zone (for
+ * example, 02:30 on March 14th 2010 in Toronto, due to daylight savings
+ * time) then the time will be rounded up to the nearest existing time
+ * (in this case, 03:00).  If this matters to you then you should verify
+ * the return value for containing the same as the numbers you gave.
+ *
+ * In the case that the given time is ambiguous in the given time zone
+ * (for example, 01:30 on November 7th 2010 in Toronto, due to daylight
+ * savings time) then the time falling within standard (ie:
+ * non-daylight) time is taken.
+ *
+ * It not considered a programmer error for the values to this function
+ * to be out of range, but in the case that they are, the function will
+ * return %NULL.
+ *
+ * You should release the return value by calling g_date_time_unref()
+ * when you are done with it.
+ *
+ * Returns: a new #GDateTime, or %NULL
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_new_from_timeval_local:
+ * @tv: a #GTimeVal
+ *
+ * Creates a #GDateTime corresponding to the given #GTimeVal @tv in the
+ * local time zone.
+ *
+ * The time contained in a #GTimeVal is always stored in the form of
+ * seconds elapsed since 1970-01-01 00:00:00 UTC, regardless of the
+ * local time offset.
+ *
+ * This call can fail (returning %NULL) if @tv represents a time outside
+ * of the supported range of #GDateTime.
+ *
+ * You should release the return value by calling g_date_time_unref()
+ * when you are done with it.
+ *
+ * Returns: a new #GDateTime, or %NULL
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_new_from_timeval_utc:
+ * @tv: a #GTimeVal
+ *
+ * Creates a #GDateTime corresponding to the given #GTimeVal @tv in UTC.
+ *
+ * The time contained in a #GTimeVal is always stored in the form of
+ * seconds elapsed since 1970-01-01 00:00:00 UTC.
+ *
+ * This call can fail (returning %NULL) if @tv represents a time outside
+ * of the supported range of #GDateTime.
+ *
+ * You should release the return value by calling g_date_time_unref()
+ * when you are done with it.
+ *
+ * Returns: a new #GDateTime, or %NULL
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_new_from_unix_local:
+ * @t: the Unix time
+ *
+ * Creates a #GDateTime corresponding to the given Unix time @t in the
+ * local time zone.
+ *
+ * Unix time is the number of seconds that have elapsed since 1970-01-01
+ * 00:00:00 UTC, regardless of the local time offset.
+ *
+ * This call can fail (returning %NULL) if @t represents a time outside
+ * of the supported range of #GDateTime.
+ *
+ * You should release the return value by calling g_date_time_unref()
+ * when you are done with it.
+ *
+ * Returns: a new #GDateTime, or %NULL
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_new_from_unix_utc:
+ * @t: the Unix time
+ *
+ * Creates a #GDateTime corresponding to the given Unix time @t in UTC.
+ *
+ * Unix time is the number of seconds that have elapsed since 1970-01-01
+ * 00:00:00 UTC.
+ *
+ * This call can fail (returning %NULL) if @t represents a time outside
+ * of the supported range of #GDateTime.
+ *
+ * You should release the return value by calling g_date_time_unref()
+ * when you are done with it.
+ *
+ * Returns: a new #GDateTime, or %NULL
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_new_local:
+ * @year: the year component of the date
+ * @month: the month component of the date
+ * @day: the day component of the date
+ * @hour: the hour component of the date
+ * @minute: the minute component of the date
+ * @seconds: the number of seconds past the minute
+ *
+ * Creates a new #GDateTime corresponding to the given date and time in
+ * the local time zone.
+ *
+ * This call is equivalent to calling g_date_time_new() with the time
+ * zone returned by g_time_zone_new_local().
+ *
+ * Returns: a #GDateTime, or %NULL
+ * Since: 2.26.
+ */
+
+
+/**
+ * g_date_time_new_now:
+ * @tz: a #GTimeZone
+ *
+ * Creates a #GDateTime corresponding to this exact instant in the given
+ * time zone @tz.  The time is as accurate as the system allows, to a
+ * maximum accuracy of 1 microsecond.
+ *
+ * This function will always succeed unless the system clock is set to
+ * truly insane values (or unless GLib is still being used after the
+ * year 9999).
+ *
+ * You should release the return value by calling g_date_time_unref()
+ * when you are done with it.
+ *
+ * Returns: a new #GDateTime, or %NULL
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_new_now_local:
+ *
+ * Creates a #GDateTime corresponding to this exact instant in the local
+ * time zone.
+ *
+ * This is equivalent to calling g_date_time_new_now() with the time
+ * zone returned by g_time_zone_new_local().
+ *
+ * Returns: a new #GDateTime, or %NULL
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_new_now_utc:
+ *
+ * Creates a #GDateTime corresponding to this exact instant in UTC.
+ *
+ * This is equivalent to calling g_date_time_new_now() with the time
+ * zone returned by g_time_zone_new_utc().
+ *
+ * Returns: a new #GDateTime, or %NULL
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_new_utc:
+ * @year: the year component of the date
+ * @month: the month component of the date
+ * @day: the day component of the date
+ * @hour: the hour component of the date
+ * @minute: the minute component of the date
+ * @seconds: the number of seconds past the minute
+ *
+ * Creates a new #GDateTime corresponding to the given date and time in
+ * UTC.
+ *
+ * This call is equivalent to calling g_date_time_new() with the time
+ * zone returned by g_time_zone_new_utc().
+ *
+ * Returns: a #GDateTime, or %NULL
+ * Since: 2.26.
+ */
+
+
+/**
+ * g_date_time_ref:
+ * @datetime: a #GDateTime
+ *
+ * Atomically increments the reference count of @datetime by one.
+ *
+ * Returns: the #GDateTime with the reference count increased
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_to_local:
+ * @datetime: a #GDateTime
+ *
+ * Creates a new #GDateTime corresponding to the same instant in time as
+ * @datetime, but in the local time zone.
+ *
+ * This call is equivalent to calling g_date_time_to_timezone() with the
+ * time zone returned by g_time_zone_new_local().
+ *
+ * Returns: the newly created #GDateTime
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_to_timeval:
+ * @datetime: a #GDateTime
+ * @tv: a #GTimeVal to modify
+ *
+ * Stores the instant in time that @datetime represents into @tv.
+ *
+ * The time contained in a #GTimeVal is always stored in the form of
+ * seconds elapsed since 1970-01-01 00:00:00 UTC, regardless of the time
+ * zone associated with @datetime.
+ *
+ * On systems where 'long' is 32bit (ie: all 32bit systems and all
+ * Windows systems), a #GTimeVal is incapable of storing the entire
+ * range of values that #GDateTime is capable of expressing.  On those
+ * systems, this function returns %FALSE to indicate that the time is
+ * out of range.
+ *
+ * On systems where 'long' is 64bit, this function never fails.
+ *
+ * Returns: %TRUE if successful, else %FALSE
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_to_timezone:
+ * @datetime: a #GDateTime
+ * @tz: the new #GTimeZone
+ *
+ * Create a new #GDateTime corresponding to the same instant in time as
+ * @datetime, but in the time zone @tz.
+ *
+ * This call can fail in the case that the time goes out of bounds.  For
+ * example, converting 0001-01-01 00:00:00 UTC to a time zone west of
+ * Greenwich will fail (due to the year 0 being out of range).
+ *
+ * You should release the return value by calling g_date_time_unref()
+ * when you are done with it.
+ *
+ * Returns: a new #GDateTime, or %NULL
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_to_unix:
+ * @datetime: a #GDateTime
+ *
+ * Gives the Unix time corresponding to @datetime, rounding down to the
+ * nearest second.
+ *
+ * Unix time is the number of seconds that have elapsed since 1970-01-01
+ * 00:00:00 UTC, regardless of the time zone associated with @datetime.
+ *
+ * Returns: the Unix time corresponding to @datetime
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_to_utc:
+ * @datetime: a #GDateTime
+ *
+ * Creates a new #GDateTime corresponding to the same instant in time as
+ * @datetime, but in UTC.
+ *
+ * This call is equivalent to calling g_date_time_to_timezone() with the
+ * time zone returned by g_time_zone_new_utc().
+ *
+ * Returns: the newly created #GDateTime
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_time_unref:
+ * @datetime: a #GDateTime
+ *
+ * Atomically decrements the reference count of @datetime by one.
+ *
+ * When the reference count reaches zero, the resources allocated by
+ * @datetime are freed
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_date_to_struct_tm:
+ * @date: a #GDate to set the <structname>struct tm</structname> from
+ * @tm: <structname>struct tm</structname> to fill
+ *
+ * Fills in the date-related bits of a <structname>struct tm</structname>
+ * using the @date value. Initializes the non-date parts with something
+ * sane but meaningless.
+ */
+
+
+/**
+ * g_date_valid:
+ * @date: a #GDate to check
+ *
+ * Returns %TRUE if the #GDate represents an existing day. The date must not
+ * contain garbage; it should have been initialized with g_date_clear()
+ * if it wasn't allocated by one of the g_date_new() variants.
+ *
+ * Returns: Whether the date is valid
+ */
+
+
+/**
+ * g_date_valid_day:
+ * @day: day to check
+ *
+ * Returns %TRUE if the day of the month is valid (a day is valid if it's
+ * between 1 and 31 inclusive).
+ *
+ * Returns: %TRUE if the day is valid
+ */
+
+
+/**
+ * g_date_valid_dmy:
+ * @day: day
+ * @month: month
+ * @year: year
+ *
+ * Returns %TRUE if the day-month-year triplet forms a valid, existing day
+ * in the range of days #GDate understands (Year 1 or later, no more than
+ * a few thousand years in the future).
+ *
+ * Returns: %TRUE if the date is a valid one
+ */
+
+
+/**
+ * g_date_valid_julian:
+ * @julian_date: Julian day to check
+ *
+ * Returns %TRUE if the Julian day is valid. Anything greater than zero
+ * is basically a valid Julian, though there is a 32-bit limit.
+ *
+ * Returns: %TRUE if the Julian day is valid
+ */
+
+
+/**
+ * g_date_valid_month:
+ * @month: month
+ *
+ * Returns %TRUE if the month value is valid. The 12 #GDateMonth
+ * enumeration values are the only valid months.
+ *
+ * Returns: %TRUE if the month is valid
+ */
+
+
+/**
+ * g_date_valid_weekday:
+ * @weekday: weekday
+ *
+ * Returns %TRUE if the weekday is valid. The seven #GDateWeekday enumeration
+ * values are the only valid weekdays.
+ *
+ * Returns: %TRUE if the weekday is valid
+ */
+
+
+/**
+ * g_date_valid_year:
+ * @year: year
+ *
+ * Returns %TRUE if the year is valid. Any year greater than 0 is valid,
+ * though there is a 16-bit limit to what #GDate will understand.
+ *
+ * Returns: %TRUE if the year is valid
+ */
+
+
+/**
+ * g_dcgettext:
+ * @domain: (allow-none): the translation domain to use, or %NULL to use the domain set with textdomain()
+ * @msgid: message to translate
+ * @category: a locale category
+ *
+ * This is a variant of g_dgettext() that allows specifying a locale
+ * category instead of always using <envar>LC_MESSAGES</envar>. See g_dgettext() for
+ * more information about how this functions differs from calling
+ * dcgettext() directly.
+ *
+ * Returns: the translated string for the given locale category
+ * Since: 2.26
+ */
+
+
+/**
+ * g_debug:
+ * @...: format string, followed by parameters to insert into the format string (as with printf())
+ *
+ * A convenience function/macro to log a debug message.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * g_dgettext:
+ * @domain: (allow-none): the translation domain to use, or %NULL to use the domain set with textdomain()
+ * @msgid: message to translate
+ *
+ * This function is a wrapper of dgettext() which does not translate
+ * the message if the default domain as set with textdomain() has no
+ * translations for the current locale.
+ *
+ * The advantage of using this function over dgettext() proper is that
+ * libraries using this function (like GTK+) will not use translations
+ * if the application using the library does not have translations for
+ * the current locale.  This results in a consistent English-only
+ * interface instead of one having partial translations.  For this
+ * feature to work, the call to textdomain() and setlocale() should
+ * precede any g_dgettext() invocations.  For GTK+, it means calling
+ * textdomain() before gtk_init or its variants.
+ *
+ * This function disables translations if and only if upon its first
+ * call all the following conditions hold:
+ * <itemizedlist>
+ * <listitem>@domain is not %NULL</listitem>
+ * <listitem>textdomain() has been called to set a default text domain</listitem>
+ * <listitem>there is no translations available for the default text domain
+ * and the current locale</listitem>
+ * <listitem>current locale is not "C" or any English locales (those
+ * starting with "en_")</listitem>
+ * </itemizedlist>
+ *
+ * Note that this behavior may not be desired for example if an application
+ * has its untranslated messages in a language other than English.  In those
+ * cases the application should call textdomain() after initializing GTK+.
+ *
+ * Applications should normally not use this function directly,
+ * but use the _() macro for translations.
+ *
+ * Returns: The translated string
+ * Since: 2.18
+ */
+
+
+/**
+ * g_dir_close:
+ * @dir: a #GDir* created by g_dir_open()
+ *
+ * Closes the directory and deallocates all related resources.
+ */
+
+
+/**
+ * g_dir_make_tmp:
+ * @tmpl: (type filename) (allow-none): Template for directory name, as in g_mkdtemp(), basename only, or %NULL for a default template
+ * @error: return location for a #GError
+ *
+ * Creates a subdirectory in the preferred directory for temporary
+ * files (as returned by g_get_tmp_dir()).
+ *
+ * @tmpl should be a string in the GLib file name encoding containing
+ * a sequence of six 'X' characters, as the parameter to g_mkstemp().
+ * However, unlike these functions, the template should only be a
+ * basename, no directory components are allowed. If template is
+ * %NULL, a default template is used.
+ *
+ * Note that in contrast to g_mkdtemp() (and mkdtemp()) @tmpl is not
+ * modified, and might thus be a read-only literal string.
+ *
+ * should be freed with g_free() when not needed any longer and is
+ * is in the GLib file name encoding. In case of errors, %NULL is
+ * returned and @error will be set.
+ *
+ * Returns: (type filename): The actual name used. This string
+ * Since: 2.30
+ */
+
+
+/**
+ * g_dir_open:
+ * @path: the path to the directory you are interested in. On Unix in the on-disk encoding. On Windows in UTF-8
+ * @flags: Currently must be set to 0. Reserved for future use.
+ * @error: return location for a #GError, or %NULL. If non-%NULL, an error will be set if and only if g_dir_open() fails.
+ *
+ * Opens a directory for reading. The names of the files in the
+ * directory can then be retrieved using g_dir_read_name().  Note
+ * that the ordering is not defined.
+ *
+ * If non-%NULL, you must free the result with g_dir_close()
+ * when you are finished with it.
+ *
+ * Returns: a newly allocated #GDir on success, %NULL on failure.
+ */
+
+
+/**
+ * g_dir_read_name:
+ * @dir: a #GDir* created by g_dir_open()
+ *
+ * Retrieves the name of another entry in the directory, or %NULL.
+ * The order of entries returned from this function is not defined,
+ * and may vary by file system or other operating-system dependent
+ * factors.
+ *
+ * On Unix, the '.' and '..' entries are omitted, and the returned
+ * name is in the on-disk encoding.
+ *
+ * On Windows, as is true of all GLib functions which operate on
+ * filenames, the returned name is in UTF-8.
+ *
+ * more entries. The return value is owned by GLib and
+ * must not be modified or freed.
+ *
+ * Returns: The entry's name or %NULL if there are no
+ */
+
+
+/**
+ * g_dir_rewind:
+ * @dir: a #GDir* created by g_dir_open()
+ *
+ * Resets the given directory. The next call to g_dir_read_name()
+ * will return the first entry again.
+ */
+
+
+/**
+ * g_direct_equal:
+ * @v1: (allow-none): a key
+ * @v2: (allow-none): a key to compare with @v1
+ *
+ * Compares two #gpointer arguments and returns %TRUE if they are equal.
+ * It can be passed to g_hash_table_new() as the @key_equal_func
+ * parameter, when using opaque pointers compared by pointer value as keys
+ * in a #GHashTable.
+ *
+ * This equality function is also appropriate for keys that are integers stored
+ * in pointers, such as <literal>GINT_TO_POINTER (n)</literal>.
+ *
+ * Returns: %TRUE if the two keys match.
+ */
+
+
+/**
+ * g_direct_hash:
+ * @v: (allow-none): a #gpointer key
+ *
+ * Converts a gpointer to a hash value.
+ * It can be passed to g_hash_table_new() as the @hash_func parameter,
+ * when using opaque pointers compared by pointer value as keys in a
+ * #GHashTable.
+ *
+ * This hash function is also appropriate for keys that are integers stored
+ * in pointers, such as <literal>GINT_TO_POINTER (n)</literal>.
+ *
+ * Returns: a hash value corresponding to the key.
+ */
+
+
+/**
+ * g_dirname:
+ * @file_name: the name of the file
+ *
+ * Gets the directory components of a file name.
+ *
+ * If the file name has no directory components "." is returned.
+ * The returned string should be freed when no longer needed.
+ *
+ * Returns: the directory components of the file
+ * Deprecated: use g_path_get_dirname() instead
+ */
+
+
+/**
+ * g_dngettext:
+ * @domain: (allow-none): the translation domain to use, or %NULL to use the domain set with textdomain()
+ * @msgid: message to translate
+ * @msgid_plural: plural form of the message
+ * @n: the quantity for which translation is needed
+ *
+ * This function is a wrapper of dngettext() which does not translate
+ * the message if the default domain as set with textdomain() has no
+ * translations for the current locale.
+ *
+ * See g_dgettext() for details of how this differs from dngettext()
+ * proper.
+ *
+ * Returns: The translated string
+ * Since: 2.18
+ */
+
+
+/**
+ * g_double_equal:
+ * @v1: a pointer to a #gdouble key
+ * @v2: a pointer to a #gdouble key to compare with @v1
+ *
+ * Compares the two #gdouble values being pointed to and returns
+ * %TRUE if they are equal.
+ * It can be passed to g_hash_table_new() as the @key_equal_func
+ * parameter, when using non-%NULL pointers to doubles as keys in a
+ * #GHashTable.
+ *
+ * Returns: %TRUE if the two keys match.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_double_hash:
+ * @v: a pointer to a #gdouble key
+ *
+ * Converts a pointer to a #gdouble to a hash value.
+ * It can be passed to g_hash_table_new() as the @hash_func parameter,
+ * It can be passed to g_hash_table_new() as the @hash_func parameter,
+ * when using non-%NULL pointers to doubles as keys in a #GHashTable.
+ *
+ * Returns: a hash value corresponding to the key.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_dpgettext:
+ * @domain: (allow-none): the translation domain to use, or %NULL to use the domain set with textdomain()
+ * @msgctxtid: a combined message context and message id, separated by a \004 character
+ * @msgidoffset: the offset of the message id in @msgctxid
+ *
+ * This function is a variant of g_dgettext() which supports
+ * a disambiguating message context. GNU gettext uses the
+ * '\004' character to separate the message context and
+ * message id in @msgctxtid.
+ * If 0 is passed as @msgidoffset, this function will fall back to
+ * trying to use the deprecated convention of using "|" as a separation
+ * character.
+ *
+ * This uses g_dgettext() internally. See that functions for differences
+ * with dgettext() proper.
+ *
+ * Applications should normally not use this function directly,
+ * but use the C_() macro for translations with context.
+ *
+ * Returns: The translated string
+ * Since: 2.16
+ */
+
+
+/**
+ * g_dpgettext2:
+ * @domain: (allow-none): the translation domain to use, or %NULL to use the domain set with textdomain()
+ * @context: the message context
+ * @msgid: the message
+ *
+ * This function is a variant of g_dgettext() which supports
+ * a disambiguating message context. GNU gettext uses the
+ * '\004' character to separate the message context and
+ * message id in @msgctxtid.
+ *
+ * This uses g_dgettext() internally. See that functions for differences
+ * with dgettext() proper.
+ *
+ * This function differs from C_() in that it is not a macro and
+ * thus you may use non-string-literals as context and msgid arguments.
+ *
+ * Returns: The translated string
+ * Since: 2.18
+ */
+
+
+/**
+ * g_environ_getenv:
+ * @envp: (array zero-terminated=1) (transfer none): an environment list (eg, as returned from g_get_environ())
+ * @variable: the environment variable to get, in the GLib file name encoding
+ *
+ * Returns the value of the environment variable @variable in the
+ * provided list @envp.
+ *
+ * The name and value are in the GLib file name encoding.
+ * On UNIX, this means the actual bytes which might or might not
+ * be in some consistent character set and encoding. On Windows,
+ * it is in UTF-8. On Windows, in case the environment variable's
+ * value contains references to other environment variables, they
+ * are expanded.
+ *
+ * the environment variable is not set in @envp. The returned
+ * string is owned by @envp, and will be freed if @variable is
+ * set or unset again.
+ *
+ * Returns: the value of the environment variable, or %NULL if
+ * Since: 2.32
+ */
+
+
+/**
+ * g_environ_setenv:
+ * @envp: (array zero-terminated=1) (transfer full): an environment list that can be freed using g_strfreev() (e.g., as returned from g_get_environ())
+ * @variable: the environment variable to set, must not contain '='
+ * @value: the value for to set the variable to
+ * @overwrite: whether to change the variable if it already exists
+ *
+ * Sets the environment variable @variable in the provided list
+ * @envp to @value.
+ *
+ * Both the variable's name and value should be in the GLib
+ * file name encoding. On UNIX, this means that they can be
+ * arbitrary byte strings. On Windows, they should be in UTF-8.
+ *
+ * updated environment list. Free it using g_strfreev().
+ *
+ * Returns: (array zero-terminated=1) (transfer full): the
+ * Since: 2.32
+ */
+
+
+/**
+ * g_environ_unsetenv:
+ * @envp: (array zero-terminated=1) (transfer full): an environment list that can be freed using g_strfreev() (e.g., as returned from g_get_environ())
+ * @variable: the environment variable to remove, must not contain '='
+ *
+ * Removes the environment variable @variable from the provided
+ * environment @envp.
+ *
+ * updated environment list. Free it using g_strfreev().
+ *
+ * Returns: (array zero-terminated=1) (transfer full): the
+ * Since: 2.32
+ */
+
+
+/**
+ * g_error:
+ * @...: format string, followed by parameters to insert into the format string (as with printf())
+ *
+ * A convenience function/macro to log an error message.
+ *
+ * Error messages are always fatal, resulting in a call to
+ * abort() to terminate the application. This function will
+ * result in a core dump; don't use it for errors you expect.
+ * Using this function indicates a bug in your program, i.e.
+ * an assertion failure.
+ */
+
+
+/**
+ * g_error_copy:
+ * @error: a #GError
+ *
+ * Makes a copy of @error.
+ *
+ * Returns: a new #GError
+ */
+
+
+/**
+ * g_error_free:
+ * @error: a #GError
+ *
+ * Frees a #GError and associated resources.
+ */
+
+
+/**
+ * g_error_matches:
+ * @error: (allow-none): a #GError or %NULL
+ * @domain: an error domain
+ * @code: an error code
+ *
+ * Returns %TRUE if @error matches @domain and @code, %FALSE
+ * otherwise. In particular, when @error is %NULL, %FALSE will
+ * be returned.
+ *
+ * Returns: whether @error has @domain and @code
+ */
+
+
+/**
+ * g_error_new:
+ * @domain: error domain
+ * @code: error code
+ * @format: printf()-style format for error message
+ * @...: parameters for message format
+ *
+ * Creates a new #GError with the given @domain and @code,
+ * and a message formatted with @format.
+ *
+ * Returns: a new #GError
+ */
+
+
+/**
+ * g_error_new_literal:
+ * @domain: error domain
+ * @code: error code
+ * @message: error message
+ *
+ * Creates a new #GError; unlike g_error_new(), @message is
+ * not a printf()-style format string. Use this function if
+ * @message contains text you don't have control over,
+ * that could include printf() escape sequences.
+ *
+ * Returns: a new #GError
+ */
+
+
+/**
+ * g_error_new_valist:
+ * @domain: error domain
+ * @code: error code
+ * @format: printf()-style format for error message
+ * @args: #va_list of parameters for the message format
+ *
+ * Creates a new #GError with the given @domain and @code,
+ * and a message formatted with @format.
+ *
+ * Returns: a new #GError
+ * Since: 2.22
+ */
+
+
+/**
+ * g_file_error_from_errno:
+ * @err_no: an "errno" value
+ *
+ * Gets a #GFileError constant based on the passed-in @err_no.
+ * For example, if you pass in <literal>EEXIST</literal> this function returns
+ * #G_FILE_ERROR_EXIST. Unlike <literal>errno</literal> values, you can portably
+ * assume that all #GFileError values will exist.
+ *
+ * Normally a #GFileError value goes into a #GError returned
+ * from a function that manipulates files. So you would use
+ * g_file_error_from_errno() when constructing a #GError.
+ *
+ * Returns: #GFileError corresponding to the given @errno
+ */
+
+
+/**
+ * g_file_get_contents:
+ * @filename: (type filename): name of a file to read contents from, in the GLib file name encoding
+ * @contents: (out) (array length=length) (element-type guint8): location to store an allocated string, use g_free() to free the returned string
+ * @length: (allow-none): location to store length in bytes of the contents, or %NULL
+ * @error: return location for a #GError, or %NULL
+ *
+ * Reads an entire file into allocated memory, with good error
+ * checking.
+ *
+ * If the call was successful, it returns %TRUE and sets @contents to the file
+ * contents and @length to the length of the file contents in bytes. The string
+ * stored in @contents will be nul-terminated, so for text files you can pass
+ * %NULL for the @length argument. If the call was not successful, it returns
+ * %FALSE and sets @error. The error domain is #G_FILE_ERROR. Possible error
+ * codes are those in the #GFileError enumeration. In the error case,
+ * @contents is set to %NULL and @length is set to zero.
+ *
+ * Returns: %TRUE on success, %FALSE if an error occurred
+ */
+
+
+/**
+ * g_file_open_tmp:
+ * @tmpl: (type filename) (allow-none): Template for file name, as in g_mkstemp(), basename only, or %NULL for a default template
+ * @name_used: (out) (type filename): location to store actual name used, or %NULL
+ * @error: return location for a #GError
+ *
+ * Opens a file for writing in the preferred directory for temporary
+ * files (as returned by g_get_tmp_dir()).
+ *
+ * @tmpl should be a string in the GLib file name encoding containing
+ * a sequence of six 'X' characters, as the parameter to g_mkstemp().
+ * However, unlike these functions, the template should only be a
+ * basename, no directory components are allowed. If template is
+ * %NULL, a default template is used.
+ *
+ * Note that in contrast to g_mkstemp() (and mkstemp()) @tmpl is not
+ * modified, and might thus be a read-only literal string.
+ *
+ * Upon success, and if @name_used is non-%NULL, the actual name used
+ * is returned in @name_used. This string should be freed with g_free()
+ * when not needed any longer. The returned name is in the GLib file
+ * name encoding.
+ *
+ * reading and writing. The file is opened in binary mode on platforms
+ * where there is a difference. The file handle should be closed with
+ * close(). In case of errors, -1 is returned and @error will be set.
+ *
+ * Returns: A file handle (as from open()) to the file opened for
+ */
+
+
+/**
+ * g_file_read_link:
+ * @filename: the symbolic link
+ * @error: return location for a #GError
+ *
+ * Reads the contents of the symbolic link @filename like the POSIX
+ * readlink() function.  The returned string is in the encoding used
+ * for filenames. Use g_filename_to_utf8() to convert it to UTF-8.
+ *
+ * or %NULL if an error occurred.
+ *
+ * Returns: A newly-allocated string with the contents of the symbolic link,
+ * Since: 2.4
+ */
+
+
+/**
+ * g_file_set_contents:
+ * @filename: (type filename): name of a file to write @contents to, in the GLib file name encoding
+ * @contents: (array length=length) (element-type guint8): string to write to the file
+ * @length: length of @contents, or -1 if @contents is a nul-terminated string
+ * @error: return location for a #GError, or %NULL
+ *
+ * Writes all of @contents to a file named @filename, with good error checking.
+ * If a file called @filename already exists it will be overwritten.
+ *
+ * This write is atomic in the sense that it is first written to a temporary
+ * file which is then renamed to the final name. Notes:
+ * <itemizedlist>
+ * <listitem>
+ * On Unix, if @filename already exists hard links to @filename will break.
+ * Also since the file is recreated, existing permissions, access control
+ * lists, metadata etc. may be lost. If @filename is a symbolic link,
+ * the link itself will be replaced, not the linked file.
+ * </listitem>
+ * <listitem>
+ * On Windows renaming a file will not remove an existing file with the
+ * new name, so on Windows there is a race condition between the existing
+ * file being removed and the temporary file being renamed.
+ * </listitem>
+ * <listitem>
+ * On Windows there is no way to remove a file that is open to some
+ * process, or mapped into memory. Thus, this function will fail if
+ * @filename already exists and is open.
+ * </listitem>
+ * </itemizedlist>
+ *
+ * If the call was successful, it returns %TRUE. If the call was not successful,
+ * it returns %FALSE and sets @error. The error domain is #G_FILE_ERROR.
+ * Possible error codes are those in the #GFileError enumeration.
+ *
+ * Note that the name for the temporary file is constructed by appending up
+ * to 7 characters to @filename.
+ *
+ * Returns: %TRUE on success, %FALSE if an error occurred
+ * Since: 2.8
+ */
+
+
+/**
+ * g_file_test:
+ * @filename: a filename to test in the GLib file name encoding
+ * @test: bitfield of #GFileTest flags
+ *
+ * Returns %TRUE if any of the tests in the bitfield @test are
+ * %TRUE. For example, <literal>(G_FILE_TEST_EXISTS |
+ * G_FILE_TEST_IS_DIR)</literal> will return %TRUE if the file exists;
+ * the check whether it's a directory doesn't matter since the existence
+ * test is %TRUE. With the current set of available tests, there's no point
+ * passing in more than one test at a time.
+ *
+ * Apart from %G_FILE_TEST_IS_SYMLINK all tests follow symbolic links,
+ * so for a symbolic link to a regular file g_file_test() will return
+ * %TRUE for both %G_FILE_TEST_IS_SYMLINK and %G_FILE_TEST_IS_REGULAR.
+ *
+ * Note, that for a dangling symbolic link g_file_test() will return
+ * %TRUE for %G_FILE_TEST_IS_SYMLINK and %FALSE for all other flags.
+ *
+ * You should never use g_file_test() to test whether it is safe
+ * to perform an operation, because there is always the possibility
+ * of the condition changing before you actually perform the operation.
+ * For example, you might think you could use %G_FILE_TEST_IS_SYMLINK
+ * to know whether it is safe to write to a file without being
+ * tricked into writing into a different location. It doesn't work!
+ * |[
+ * /&ast; DON'T DO THIS &ast;/
+ * if (!g_file_test (filename, G_FILE_TEST_IS_SYMLINK))
+ * {
+ * fd = g_open (filename, O_WRONLY);
+ * /&ast; write to fd &ast;/
+ * }
+ * ]|
+ *
+ * Another thing to note is that %G_FILE_TEST_EXISTS and
+ * %G_FILE_TEST_IS_EXECUTABLE are implemented using the access()
+ * system call. This usually doesn't matter, but if your program
+ * is setuid or setgid it means that these tests will give you
+ * the answer for the real user ID and group ID, rather than the
+ * effective user ID and group ID.
+ *
+ * On Windows, there are no symlinks, so testing for
+ * %G_FILE_TEST_IS_SYMLINK will always return %FALSE. Testing for
+ * %G_FILE_TEST_IS_EXECUTABLE will just check that the file exists and
+ * its name indicates that it is executable, checking for well-known
+ * extensions and those listed in the <envar>PATHEXT</envar> environment variable.
+ *
+ * Returns: whether a test was %TRUE
+ */
+
+
+/**
+ * g_filename_display_basename:
+ * @filename: an absolute pathname in the GLib file name encoding
+ *
+ * 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.
+ *
+ * If GLib cannot make sense of the encoding of @filename, as a last resort it
+ * replaces unknown characters with U+FFFD, the Unicode replacement character.
+ * You can search the result for the UTF-8 encoding of this character (which is
+ * "\357\277\275" in octal notation) to find out if @filename was in an invalid
+ * encoding.
+ *
+ * You must pass the whole absolute pathname to this functions so that
+ * translation of well known locations can be done.
+ *
+ * This function is preferred over g_filename_display_name() if you know the
+ * whole path, as it allows translation.
+ *
+ * a rendition of the basename of the filename in valid UTF-8
+ *
+ * Returns: a newly allocated string containing
+ * Since: 2.6
+ */
+
+
+/**
+ * g_filename_display_name:
+ * @filename: a pathname hopefully in the GLib file name encoding
+ *
+ * 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-%NULL
+ * even if the filename actually isn't in the GLib file name encoding.
+ *
+ * If GLib cannot make sense of the encoding of @filename, as a last resort it
+ * replaces unknown characters with U+FFFD, the Unicode replacement character.
+ * You can search the result for the UTF-8 encoding of this character (which is
+ * "\357\277\275" in octal notation) to find out if @filename was in an invalid
+ * encoding.
+ *
+ * If you know the whole pathname of the file you should use
+ * g_filename_display_basename(), since that allows location-based
+ * translation of filenames.
+ *
+ * a rendition of the filename in valid UTF-8
+ *
+ * Returns: a newly allocated string containing
+ * Since: 2.6
+ */
+
+
+/**
+ * g_filename_from_uri:
+ * @uri: a uri describing a filename (escaped, encoded in ASCII).
+ * @hostname: (allow-none): Location to store hostname for the URI, or %NULL. If there is no hostname in the URI, %NULL will be stored in this location.
+ * @error: location to store the error occurring, or %NULL to ignore errors. Any of the errors in #GConvertError may occur.
+ *
+ * Converts an escaped ASCII-encoded URI to a local filename in the
+ * encoding used for filenames.
+ *
+ * filename, or %NULL on an error.
+ *
+ * Returns: a newly-allocated string holding the resulting
+ */
+
+
+/**
+ * g_filename_from_utf8:
+ * @utf8string: a UTF-8 encoded string.
+ * @len: the length of the string, or -1 if the string is nul-terminated.
+ * @bytes_read: location to store the number of bytes in the input string that were successfully converted, or %NULL. Even if the conversion was successful, this may be less than @len if there were partial characters at the end of the input. If the error #G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value stored will the byte offset after the last valid input sequence.
+ * @bytes_written: the number of bytes stored in the output buffer (not including the terminating nul).
+ * @error: location to store the error occurring, or %NULL to ignore errors. Any of the errors in #GConvertError may occur.
+ *
+ * Converts a string from UTF-8 to the encoding GLib uses for
+ * filenames. Note that on Windows GLib uses UTF-8 for filenames;
+ * on other platforms, this function indirectly depends on the
+ * <link linkend="setlocale">current locale</link>.
+ *
+ * Returns: The converted string, or %NULL on an error.
+ */
+
+
+/**
+ * g_filename_to_uri:
+ * @filename: an absolute filename specified in the GLib file name encoding, which is the on-disk file name bytes on Unix, and UTF-8 on Windows
+ * @hostname: (allow-none): A UTF-8 encoded hostname, or %NULL for none.
+ * @error: location to store the error occurring, or %NULL to ignore errors. Any of the errors in #GConvertError may occur.
+ *
+ * Converts an absolute filename to an escaped ASCII-encoded URI, with the path
+ * component following Section 3.3. of RFC 2396.
+ *
+ * URI, or %NULL on an error.
+ *
+ * Returns: a newly-allocated string holding the resulting
+ */
+
+
+/**
+ * g_filename_to_utf8:
+ * @opsysstring: a string in the encoding for filenames
+ * @len: the length of the string, or -1 if the string is nul-terminated<footnoteref linkend="nul-unsafe"/>.
+ * @bytes_read: location to store the number of bytes in the input string that were successfully converted, or %NULL. Even if the conversion was successful, this may be less than @len if there were partial characters at the end of the input. If the error #G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value stored will the byte offset after the last valid input sequence.
+ * @bytes_written: the number of bytes stored in the output buffer (not including the terminating nul).
+ * @error: location to store the error occurring, or %NULL to ignore errors. Any of the errors in #GConvertError may occur.
+ *
+ * Converts a string which is in the encoding used by GLib for
+ * filenames into a UTF-8 string. Note that on Windows GLib uses UTF-8
+ * for filenames; on other platforms, this function indirectly depends on
+ * the <link linkend="setlocale">current locale</link>.
+ *
+ * Returns: The converted string, or %NULL on an error.
+ */
+
+
+/**
+ * g_find_program_in_path:
+ * @program: a program name in the GLib file name encoding
+ *
+ * Locates the first executable named @program in the user's path, in the
+ * same way that execvp() would locate it. Returns an allocated string
+ * with the absolute path name, or %NULL if the program is not found in
+ * the path. If @program is already an absolute path, returns a copy of
+ * @program if @program exists and is executable, and %NULL otherwise.
+ *
+ * On Windows, if @program does not have a file type suffix, tries
+ * with the suffixes .exe, .cmd, .bat and .com, and the suffixes in
+ * the <envar>PATHEXT</envar> environment variable.
+ *
+ * On Windows, it looks for the file in the same way as CreateProcess()
+ * would. This means first in the directory where the executing
+ * program was loaded from, then in the current directory, then in the
+ * Windows 32-bit system directory, then in the Windows directory, and
+ * finally in the directories in the <envar>PATH</envar> environment
+ * variable. If the program is found, the return value contains the
+ * full name including the type suffix.
+ *
+ * Returns: absolute path, or %NULL
+ */
+
+
+/**
+ * g_fopen:
+ * @filename: a pathname in the GLib file name encoding (UTF-8 on Windows)
+ * @mode: a string describing the mode in which the file should be opened
+ *
+ * A wrapper for the stdio fopen() function. The fopen() function
+ * opens a file and associates a new stream with it.
+ *
+ * Because file descriptors are specific to the C library on Windows,
+ * and a file descriptor is partof the <type>FILE</type> struct, the
+ * <type>FILE</type> pointer returned by this function makes sense
+ * only to functions in the same C library. Thus if the GLib-using
+ * code uses a different C library than GLib does, the
+ * <type>FILE</type> pointer returned by this function cannot be
+ * passed to C library functions like fprintf() or fread().
+ *
+ * See your C library manual for more details about fopen().
+ *
+ * opened, or %NULL if an error occurred
+ *
+ * Returns: A <type>FILE</type> pointer if the file was successfully
+ * Since: 2.6
+ */
+
+
+/**
+ * g_format_size:
+ * @size: a size in bytes
+ *
+ * Formats a size (for example the size of a file) into a human readable
+ * string.  Sizes are rounded to the nearest size prefix (kB, MB, GB)
+ * and are displayed rounded to the nearest tenth. E.g. the file size
+ * 3292528 bytes will be converted into the string "3.2 MB".
+ *
+ * The prefix units base is 1000 (i.e. 1 kB is 1000 bytes).
+ *
+ * This string should be freed with g_free() when not needed any longer.
+ *
+ * See g_format_size_full() for more options about how the size might be
+ * formatted.
+ *
+ * file size
+ *
+ * Returns: a newly-allocated formatted string containing a human readable
+ * Since: 2.30
+ */
+
+
+/**
+ * g_format_size_for_display:
+ * @size: a size in bytes
+ *
+ * Formats a size (for example the size of a file) into a human
+ * readable string. Sizes are rounded to the nearest size prefix
+ * (KB, MB, GB) and are displayed rounded to the nearest tenth.
+ * E.g. the file size 3292528 bytes will be converted into the
+ * string "3.1 MB".
+ *
+ * The prefix units base is 1024 (i.e. 1 KB is 1024 bytes).
+ *
+ * This string should be freed with g_free() when not needed any longer.
+ *
+ * readable file size
+ *
+ *
+ * Deprecated:2.30: This function is broken due to its use of SI
+ * suffixes to denote IEC units. Use g_format_size() instead.
+ *
+ * Returns: a newly-allocated formatted string containing a human
+ * Since: 2.16
+ */
+
+
+/**
+ * g_format_size_full:
+ * @size: a size in bytes
+ * @flags: #GFormatSizeFlags to modify the output
+ *
+ * Formats a size.
+ *
+ * This function is similar to g_format_size() but allows for flags
+ * that modify the output. See #GFormatSizeFlags.
+ *
+ * readable file size
+ *
+ * Returns: a newly-allocated formatted string containing a human
+ * Since: 2.30
+ */
+
+
+/**
+ * g_fprintf:
+ * @file: the stream to write to.
+ * @format: a standard printf() format string, but notice <link linkend="string-precision">string precision pitfalls</link>.
+ * @...: the arguments to insert in the output.
+ *
+ * An implementation of the standard fprintf() function which supports
+ * positional parameters, as specified in the Single Unix Specification.
+ *
+ * Returns: the number of bytes printed.
+ * Since: 2.2
+ */
+
+
+/**
+ * g_free:
+ * @mem: the memory to free
+ *
+ * Frees the memory pointed to by @mem.
+ * If @mem is %NULL it simply returns.
+ */
+
+
+/**
+ * g_freopen:
+ * @filename: a pathname in the GLib file name encoding (UTF-8 on Windows)
+ * @mode: a string describing the mode in which the file should be opened
+ * @stream: (allow-none): an existing stream which will be reused, or %NULL
+ *
+ * A wrapper for the POSIX freopen() function. The freopen() function
+ * opens a file and associates it with an existing stream.
+ *
+ * See your C library manual for more details about freopen().
+ *
+ * opened, or %NULL if an error occurred.
+ *
+ * Returns: A <literal>FILE</literal> pointer if the file was successfully
+ * Since: 2.6
+ */
+
+
+/**
+ * g_get_application_name:
+ *
+ * Gets a human-readable name for the application, as set by
+ * g_set_application_name(). This name should be localized if
+ * possible, and is intended for display to the user.  Contrast with
+ * g_get_prgname(), which gets a non-localized name. If
+ * g_set_application_name() has not been called, returns the result of
+ * g_get_prgname() (which may be %NULL if g_set_prgname() has also not
+ * been called).
+ *
+ * Returns: human-readable application name. may return %NULL
+ * Since: 2.2
+ */
+
+
+/**
+ * g_get_charset:
+ * @charset: return location for character set name
+ *
+ * Obtains the character set for the <link linkend="setlocale">current
+ * locale</link>; you might use this character set as an argument to
+ * g_convert(), to convert from the current locale's encoding to some
+ * other encoding. (Frequently g_locale_to_utf8() and g_locale_from_utf8()
+ * are nice shortcuts, though.)
+ *
+ * On Windows the character set returned by this function is the
+ * so-called system default ANSI code-page. That is the character set
+ * used by the "narrow" versions of C library and Win32 functions that
+ * handle file names. It might be different from the character set
+ * used by the C library's current locale.
+ *
+ * The return value is %TRUE if the locale's encoding is UTF-8, in that
+ * case you can perhaps avoid calling g_convert().
+ *
+ * The string returned in @charset is not allocated, and should not be
+ * freed.
+ *
+ * Returns: %TRUE if the returned charset is UTF-8
+ */
+
+
+/**
+ * g_get_codeset:
+ *
+ * Gets the character set for the current locale.
+ *
+ * of the character set. This string must be freed with g_free().
+ *
+ * Returns: a newly allocated string containing the name
+ */
+
+
+/**
+ * g_get_current_dir:
+ *
+ * Gets the current directory.
+ *
+ * The returned string should be freed when no longer needed.
+ * The encoding of the returned string is system defined.
+ * On Windows, it is always UTF-8.
+ *
+ * Returns: the current directory
+ */
+
+
+/**
+ * g_get_current_time:
+ * @result: #GTimeVal structure in which to store current time.
+ *
+ * Equivalent to the UNIX gettimeofday() function, but portable.
+ *
+ * You may find g_get_real_time() to be more convenient.
+ */
+
+
+/**
+ * g_get_environ:
+ *
+ * Gets the list of environment variables for the current process.
+ *
+ * The list is %NULL terminated and each item in the list is of the
+ * form 'NAME=VALUE'.
+ *
+ * This is equivalent to direct access to the 'environ' global variable,
+ * except portable.
+ *
+ * The return value is freshly allocated and it should be freed with
+ * g_strfreev() when it is no longer needed.
+ *
+ * environment variables
+ *
+ * Returns: (array zero-terminated=1) (transfer full): the list of
+ * Since: 2.28
+ */
+
+
+/**
+ * g_get_filename_charsets:
+ * @charsets: return location for the %NULL-terminated list of encoding names
+ *
+ * Determines the preferred character sets used for filenames.
+ * The first character set from the @charsets is the filename encoding, the
+ * subsequent character sets are used when trying to generate a displayable
+ * representation of a filename, see g_filename_display_name().
+ *
+ * On Unix, the character sets are determined by consulting the
+ * environment variables <envar>G_FILENAME_ENCODING</envar> and
+ * <envar>G_BROKEN_FILENAMES</envar>. On Windows, the character set
+ * used in the GLib API is always UTF-8 and said environment variables
+ * have no effect.
+ *
+ * <envar>G_FILENAME_ENCODING</envar> may be set to a comma-separated list
+ * of character set names. The special token "&commat;locale" is taken to
+ * mean the character set for the <link linkend="setlocale">current
+ * locale</link>. If <envar>G_FILENAME_ENCODING</envar> is not set, but
+ * <envar>G_BROKEN_FILENAMES</envar> is, the character set of the current
+ * locale is taken as the filename encoding. If neither environment variable
+ * is set, UTF-8 is taken as the filename encoding, but the character
+ * set of the current locale is also put in the list of encodings.
+ *
+ * The returned @charsets belong to GLib and must not be freed.
+ *
+ * Note that on Unix, regardless of the locale character set or
+ * <envar>G_FILENAME_ENCODING</envar> value, the actual file names present
+ * on a system might be in any random encoding or just gibberish.
+ *
+ * Returns: %TRUE if the filename encoding is UTF-8.
+ * Since: 2.6
+ */
+
+
+/**
+ * g_get_home_dir:
+ *
+ * Gets the current user's home directory as defined in the
+ * password database.
+ *
+ * Note that in contrast to traditional UNIX tools, this function
+ * prefers <filename>passwd</filename> entries over the <envar>HOME</envar>
+ * environment variable.
+ *
+ * One of the reasons for this decision is that applications in many
+ * cases need special handling to deal with the case where
+ * <envar>HOME</envar> is
+ * <simplelist>
+ * <member>Not owned by the user</member>
+ * <member>Not writeable</member>
+ * <member>Not even readable</member>
+ * </simplelist>
+ * Since applications are in general <emphasis>not</emphasis> written
+ * to deal with these situations it was considered better to make
+ * g_get_home_dir() not pay attention to <envar>HOME</envar> and to
+ * return the real home directory for the user. If applications
+ * want to pay attention to <envar>HOME</envar>, they can do:
+ * |[
+ * const char *homedir = g_getenv ("HOME");
+ * if (!homedir)
+ * homedir = g_get_home_dir (<!-- -->);
+ * ]|
+ *
+ * Returns: the current user's home directory
+ */
+
+
+/**
+ * g_get_host_name:
+ *
+ * Return a name for the machine.
+ *
+ * The returned name is not necessarily a fully-qualified domain name,
+ * or even present in DNS or some other name service at all. It need
+ * not even be unique on your local network or site, but usually it
+ * is. Callers should not rely on the return value having any specific
+ * properties like uniqueness for security purposes. Even if the name
+ * of the machine is changed while an application is running, the
+ * return value from this function does not change. The returned
+ * string is owned by GLib and should not be modified or freed. If no
+ * name can be determined, a default fixed string "localhost" is
+ * returned.
+ *
+ * Returns: the host name of the machine.
+ * Since: 2.8
+ */
+
+
+/**
+ * g_get_language_names:
+ *
+ * Computes a list of applicable locale names, which can be used to
+ * e.g. construct locale-dependent filenames or search paths. The returned
+ * list is sorted from most desirable to least desirable and always contains
+ * the default locale "C".
+ *
+ * For example, if LANGUAGE=de:en_US, then the returned list is
+ * "de", "en_US", "en", "C".
+ *
+ * This function consults the environment variables <envar>LANGUAGE</envar>,
+ * <envar>LC_ALL</envar>, <envar>LC_MESSAGES</envar> and <envar>LANG</envar>
+ * to find the list of locales specified by the user.
+ *
+ * that must not be modified or freed.
+ *
+ * Returns: (array zero-terminated=1) (transfer none): a %NULL-terminated array of strings owned by GLib
+ * Since: 2.6
+ */
+
+
+/**
+ * g_get_locale_variants:
+ * @locale: a locale identifier
+ *
+ * Returns a list of derived variants of @locale, which can be used to
+ * e.g. construct locale-dependent filenames or search paths. The returned
+ * list is sorted from most desirable to least desirable.
+ * This function handles territory, charset and extra locale modifiers.
+ *
+ * For example, if @locale is "fr_BE", then the returned list
+ * is "fr_BE", "fr".
+ *
+ * If you need the list of variants for the <emphasis>current locale</emphasis>,
+ * use g_get_language_names().
+ *
+ * allocated array of newly allocated strings with the locale variants. Free with
+ * g_strfreev().
+ *
+ * Returns: (transfer full) (array zero-terminated=1) (element-type utf8): a newly
+ * Since: 2.28
+ */
+
+
+/**
+ * g_get_monotonic_time:
+ *
+ * Queries the system monotonic time, if available.
+ *
+ * On POSIX systems with clock_gettime() and <literal>CLOCK_MONOTONIC</literal> this call
+ * is a very shallow wrapper for that.  Otherwise, we make a best effort
+ * that probably involves returning the wall clock time (with at least
+ * microsecond accuracy, subject to the limitations of the OS kernel).
+ *
+ * It's important to note that POSIX <literal>CLOCK_MONOTONIC</literal> does
+ * not count time spent while the machine is suspended.
+ *
+ * On Windows, "limitations of the OS kernel" is a rather substantial
+ * statement.  Depending on the configuration of the system, the wall
+ * clock time is updated as infrequently as 64 times a second (which
+ * is approximately every 16ms). Also, on XP (but not on Vista or later)
+ * the monotonic clock is locally monotonic, but may differ in exact
+ * value between processes due to timer wrap handling.
+ *
+ * Returns: the monotonic time, in microseconds
+ * Since: 2.28
+ */
+
+
+/**
+ * g_get_prgname:
+ *
+ * Gets the name of the program. This name should <emphasis>not</emphasis>
+ * be localized, contrast with g_get_application_name().
+ * (If you are using GDK or GTK+ the program name is set in gdk_init(),
+ * which is called by gtk_init(). The program name is found by taking
+ * the last component of <literal>argv[0]</literal>.)
+ *
+ * to GLib and must not be modified or freed.
+ *
+ * Returns: the name of the program. The returned string belongs
+ */
+
+
+/**
+ * g_get_real_name:
+ *
+ * Gets the real name of the user. This usually comes from the user's entry
+ * in the <filename>passwd</filename> file. The encoding of the returned
+ * string is system-defined. (On Windows, it is, however, always UTF-8.)
+ * If the real user name cannot be determined, the string "Unknown" is
+ * returned.
+ *
+ * Returns: the user's real name.
+ */
+
+
+/**
+ * g_get_real_time:
+ *
+ * Queries the system wall-clock time.
+ *
+ * This call is functionally equivalent to g_get_current_time() except
+ * that the return value is often more convenient than dealing with a
+ * #GTimeVal.
+ *
+ * You should only use this call if you are actually interested in the real
+ * wall-clock time.  g_get_monotonic_time() is probably more useful for
+ * measuring intervals.
+ *
+ * Returns: the number of microseconds since January 1, 1970 UTC.
+ * Since: 2.28
+ */
+
+
+/**
+ * g_get_system_config_dirs:
+ *
+ * Returns an ordered list of base directories in which to access
+ * system-wide configuration information.
+ *
+ * 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>.
+ * In this case the list of directories retrieved will be XDG_CONFIG_DIRS.
+ *
+ * On Windows is the directory that contains application data for all users.
+ * A typical path is C:\Documents and Settings\All Users\Application Data.
+ * This folder is used for application data that is not user specific.
+ * For example, an application can store a spell-check dictionary, a database
+ * of clip art, or a log file in the CSIDL_COMMON_APPDATA folder.
+ * This information will not roam and is available to anyone using the computer.
+ *
+ * not be modified or freed.
+ *
+ * Returns: (array zero-terminated=1) (transfer none): a %NULL-terminated array of strings owned by GLib that must
+ * Since: 2.6
+ */
+
+
+/**
+ * g_get_system_data_dirs:
+ *
+ * Returns an ordered list of base directories in which to access
+ * system-wide application data.
+ *
+ * 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>
+ * In this case the list of directories retrieved will be XDG_DATA_DIRS.
+ *
+ * On Windows the first elements in the list are the Application Data
+ * and Documents folders for All Users. (These can be determined only
+ * on Windows 2000 or later and are not present in the list on other
+ * Windows versions.) See documentation for CSIDL_COMMON_APPDATA and
+ * CSIDL_COMMON_DOCUMENTS.
+ *
+ * Then follows the "share" subfolder in the installation folder for
+ * the package containing the DLL that calls this function, if it can
+ * be determined.
+ *
+ * Finally the list contains the "share" subfolder in the installation
+ * folder for GLib, and in the installation folder for the package the
+ * application's .exe file belongs to.
+ *
+ * The installation folders above are determined by looking up the
+ * folder where the module (DLL or EXE) in question is located. If the
+ * folder's name is "bin", its parent is used, otherwise the folder
+ * itself.
+ *
+ * Note that on Windows the returned list can vary depending on where
+ * this function is called.
+ *
+ * not be modified or freed.
+ *
+ * Returns: (array zero-terminated=1) (transfer none): a %NULL-terminated array of strings owned by GLib that must
+ * Since: 2.6
+ */
+
+
+/**
+ * g_get_tmp_dir:
+ *
+ * Gets the directory to use for temporary files. This is found from
+ * inspecting the environment variables <envar>TMPDIR</envar>,
+ * <envar>TMP</envar>, and <envar>TEMP</envar> in that order. If none
+ * of those are defined "/tmp" is returned on UNIX and "C:\" on Windows.
+ * The encoding of the returned string is system-defined. On Windows,
+ * it is always UTF-8. The return value is never %NULL or the empty string.
+ *
+ * Returns: the directory to use for temporary files.
+ */
+
+
+/**
+ * g_get_user_cache_dir:
+ *
+ * Returns a base directory in which to store non-essential, cached
+ * data specific to particular user.
+ *
+ * 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>.
+ * In this case the directory retrieved will be XDG_CACHE_HOME.
+ *
+ * On Windows is the directory that serves as a common repository for
+ * temporary Internet files. A typical path is
+ * C:\Documents and Settings\username\Local Settings\Temporary Internet Files.
+ * See documentation for CSIDL_INTERNET_CACHE.
+ *
+ * or freed.
+ *
+ * Returns: a string owned by GLib that must not be modified
+ * Since: 2.6
+ */
+
+
+/**
+ * g_get_user_config_dir:
+ *
+ * Returns a base directory in which to store user-specific application
+ * configuration information such as user preferences and settings.
+ *
+ * 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>.
+ * In this case the directory retrieved will be XDG_CONFIG_HOME.
+ *
+ * On Windows this is the folder to use for local (as opposed to
+ * roaming) application data. See documentation for
+ * CSIDL_LOCAL_APPDATA. Note that on Windows it thus is the same as
+ * what g_get_user_data_dir() returns.
+ *
+ * or freed.
+ *
+ * Returns: a string owned by GLib that must not be modified
+ * Since: 2.6
+ */
+
+
+/**
+ * g_get_user_data_dir:
+ *
+ * Returns a base directory in which to access application data such
+ * as icons that is customized for a particular user.
+ *
+ * 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>.
+ * In this case the directory retrieved will be XDG_DATA_HOME.
+ *
+ * On Windows this is the folder to use for local (as opposed to
+ * roaming) application data. See documentation for
+ * CSIDL_LOCAL_APPDATA. Note that on Windows it thus is the same as
+ * what g_get_user_config_dir() returns.
+ *
+ * or freed.
+ *
+ * Returns: a string owned by GLib that must not be modified
+ * Since: 2.6
+ */
+
+
+/**
+ * g_get_user_name:
+ *
+ * Gets the user name of the current user. The encoding of the returned
+ * string is system-defined. On UNIX, it might be the preferred file name
+ * encoding, or something else, and there is no guarantee that it is even
+ * consistent on a machine. On Windows, it is always UTF-8.
+ *
+ * Returns: the user name of the current user.
+ */
+
+
+/**
+ * g_get_user_runtime_dir:
+ *
+ * Returns a directory that is unique to the current user on the local
+ * system.
+ *
+ * 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>.  This is the directory
+ * specified in the <envar>XDG_RUNTIME_DIR</envar> environment variable.
+ * In the case that this variable is not set, GLib will issue a warning
+ * message to stderr and return the value of g_get_user_cache_dir().
+ *
+ * On Windows this is the folder to use for local (as opposed to
+ * roaming) application data. See documentation for
+ * CSIDL_LOCAL_APPDATA.  Note that on Windows it thus is the same as
+ * what g_get_user_config_dir() returns.
+ *
+ * Returns: a string owned by GLib that must not be modified or freed.
+ * Since: 2.28
+ */
+
+
+/**
+ * g_get_user_special_dir:
+ * @directory: the logical id of special directory
+ *
+ * Returns the full path of a special directory using its logical id.
+ *
+ * On Unix this is done using the XDG special user directories.
+ * For compatibility with existing practise, %G_USER_DIRECTORY_DESKTOP
+ * falls back to <filename>$HOME/Desktop</filename> when XDG special
+ * user directories have not been set up.
+ *
+ * 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.
+ *
+ * if the logical id was not found. The returned string is owned by
+ * GLib and should not be modified or freed.
+ *
+ * Returns: the path to the specified special directory, or %NULL
+ * Since: 2.14
+ */
+
+
+/**
+ * g_getenv:
+ * @variable: the environment variable to get, in the GLib file name encoding
+ *
+ * Returns the value of an environment variable.
+ *
+ * The name and value are in the GLib file name encoding. On UNIX,
+ * this means the actual bytes which might or might not be in some
+ * consistent character set and encoding. On Windows, it is in UTF-8.
+ * On Windows, in case the environment variable's value contains
+ * references to other environment variables, they are expanded.
+ *
+ * the environment variable is not found. The returned string
+ * may be overwritten by the next call to g_getenv(), g_setenv()
+ * or g_unsetenv().
+ *
+ * Returns: the value of the environment variable, or %NULL if
+ */
+
+
+/**
+ * g_hash_table_add:
+ * @hash_table: a #GHashTable
+ * @key: a key to insert
+ *
+ * This is a convenience function for using a #GHashTable as a set.  It
+ * is equivalent to calling g_hash_table_replace() with @key as both the
+ * key and the value.
+ *
+ * When a hash table only ever contains keys that have themselves as the
+ * corresponding value it is able to be stored more efficiently.  See
+ * the discussion in the section description.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_hash_table_contains:
+ * @hash_table: a #GHashTable
+ * @key: a key to check
+ *
+ * Checks if @key is in @hash_table.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_hash_table_destroy:
+ * @hash_table: a #GHashTable
+ *
+ * Destroys all keys and values in the #GHashTable and decrements its
+ * reference count by 1. If keys and/or values are dynamically allocated,
+ * you should either free them first or create the #GHashTable with destroy
+ * notifiers using g_hash_table_new_full(). In the latter case the destroy
+ * functions you supplied will be called on all keys and values during the
+ * destruction phase.
+ */
+
+
+/**
+ * g_hash_table_find:
+ * @hash_table: a #GHashTable
+ * @predicate: function to test the key/value pairs for a certain property
+ * @user_data: user data to pass to the function
+ *
+ * Calls the given function for key/value pairs in the #GHashTable
+ * until @predicate returns %TRUE. The function is passed the key
+ * and value of each pair, and the given @user_data parameter. The
+ * hash table may not be modified while iterating over it (you can't
+ * add/remove items).
+ *
+ * Note, that hash tables are really only optimized for forward
+ * lookups, i.e. g_hash_table_lookup(). So code that frequently issues
+ * g_hash_table_find() or g_hash_table_foreach() (e.g. in the order of
+ * once per every entry in a hash table) should probably be reworked
+ * to use additional or different data structures for reverse lookups
+ * (keep in mind that an O(n) find/foreach operation issued for all n
+ * values in a hash table ends up needing O(n*n) operations).
+ *
+ * for which @predicate evaluates to %TRUE. If no pair with the
+ * requested property is found, %NULL is returned.
+ *
+ * Returns: (allow-none): The value of the first key/value pair is returned,
+ * Since: 2.4
+ */
+
+
+/**
+ * g_hash_table_foreach:
+ * @hash_table: a #GHashTable
+ * @func: the function to call for each key/value pair
+ * @user_data: user data to pass to the function
+ *
+ * Calls the given function for each of the key/value pairs in the
+ * #GHashTable.  The function is passed the key and value of each
+ * pair, and the given @user_data parameter.  The hash table may not
+ * be modified while iterating over it (you can't add/remove
+ * items). To remove all items matching a predicate, use
+ * g_hash_table_foreach_remove().
+ *
+ * See g_hash_table_find() for performance caveats for linear
+ * order searches in contrast to g_hash_table_lookup().
+ */
+
+
+/**
+ * g_hash_table_foreach_remove:
+ * @hash_table: a #GHashTable
+ * @func: the function to call for each key/value pair
+ * @user_data: user data to pass to the function
+ *
+ * Calls the given function for each key/value pair in the
+ * #GHashTable. If the function returns %TRUE, then the key/value
+ * pair is removed from the #GHashTable. If you supplied key or
+ * value destroy functions when creating the #GHashTable, they are
+ * used to free the memory allocated for the removed keys and values.
+ *
+ * See #GHashTableIter for an alternative way to loop over the
+ * key/value pairs in the hash table.
+ *
+ * Returns: the number of key/value pairs removed
+ */
+
+
+/**
+ * g_hash_table_foreach_steal:
+ * @hash_table: a #GHashTable
+ * @func: the function to call for each key/value pair
+ * @user_data: user data to pass to the function
+ *
+ * Calls the given function for each key/value pair in the
+ * #GHashTable. If the function returns %TRUE, then the key/value
+ * pair is removed from the #GHashTable, but no key or value
+ * destroy functions are called.
+ *
+ * See #GHashTableIter for an alternative way to loop over the
+ * key/value pairs in the hash table.
+ *
+ * Returns: the number of key/value pairs removed.
+ */
+
+
+/**
+ * g_hash_table_freeze:
+ * @hash_table: a #GHashTable
+ *
+ * This function is deprecated and will be removed in the next major
+ * release of GLib. It does nothing.
+ */
+
+
+/**
+ * g_hash_table_get_keys:
+ * @hash_table: a #GHashTable
+ *
+ * Retrieves every key inside @hash_table. The returned data
+ * is valid until @hash_table is modified.
+ *
+ * table. The content of the list is owned by the hash table and
+ * should not be modified or freed. Use g_list_free() when done
+ * using the list.
+ *
+ * Returns: a #GList containing all the keys inside the hash
+ * Since: 2.14
+ */
+
+
+/**
+ * g_hash_table_get_values:
+ * @hash_table: a #GHashTable
+ *
+ * Retrieves every value inside @hash_table. The returned data
+ * is valid until @hash_table is modified.
+ *
+ * table. The content of the list is owned by the hash table and
+ * should not be modified or freed. Use g_list_free() when done
+ * using the list.
+ *
+ * Returns: a #GList containing all the values inside the hash
+ * Since: 2.14
+ */
+
+
+/**
+ * g_hash_table_insert:
+ * @hash_table: a #GHashTable
+ * @key: a key to insert
+ * @value: the value to associate with the key
+ *
+ * Inserts a new key and value into a #GHashTable.
+ *
+ * If the key already exists in the #GHashTable its current
+ * value is replaced with the new value. If you supplied a
+ * @value_destroy_func when creating the #GHashTable, the old
+ * value is freed using that function. If you supplied a
+ * @key_destroy_func when creating the #GHashTable, the passed
+ * key is freed using that function.
+ */
+
+
+/**
+ * g_hash_table_iter_get_hash_table:
+ * @iter: an initialized #GHashTableIter
+ *
+ * Returns the #GHashTable associated with @iter.
+ *
+ * Returns: the #GHashTable associated with @iter.
+ * Since: 2.16
+ */
+
+
+/**
+ * g_hash_table_iter_init:
+ * @iter: an uninitialized #GHashTableIter
+ * @hash_table: a #GHashTable
+ *
+ * Initializes a key/value pair iterator and associates it with
+ * @hash_table. Modifying the hash table after calling this function
+ * invalidates the returned iterator.
+ * |[
+ * GHashTableIter iter;
+ * gpointer key, value;
+ *
+ * g_hash_table_iter_init (&iter, hash_table);
+ * while (g_hash_table_iter_next (&iter, &key, &value))
+ * {
+ * /&ast; do something with key and value &ast;/
+ * }
+ * ]|
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_hash_table_iter_next:
+ * @iter: an initialized #GHashTableIter
+ * @key: (allow-none): a location to store the key, or %NULL
+ * @value: (allow-none): a location to store the value, or %NULL
+ *
+ * Advances @iter and retrieves the key and/or value that are now
+ * pointed to as a result of this advancement. If %FALSE is returned,
+ * @key and @value are not set, and the iterator becomes invalid.
+ *
+ * Returns: %FALSE if the end of the #GHashTable has been reached.
+ * Since: 2.16
+ */
+
+
+/**
+ * g_hash_table_iter_remove:
+ * @iter: an initialized #GHashTableIter
+ *
+ * Removes the key/value pair currently pointed to by the iterator
+ * from its associated #GHashTable. Can only be called after
+ * g_hash_table_iter_next() returned %TRUE, and cannot be called
+ * more than once for the same key/value pair.
+ *
+ * If the #GHashTable was created using g_hash_table_new_full(),
+ * the key and value are freed using the supplied destroy functions,
+ * otherwise you have to make sure that any dynamically allocated
+ * values are freed yourself.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_hash_table_iter_replace:
+ * @iter: an initialized #GHashTableIter
+ * @value: the value to replace with
+ *
+ * Replaces the value currently pointed to by the iterator
+ * from its associated #GHashTable. Can only be called after
+ * g_hash_table_iter_next() returned %TRUE.
+ *
+ * If you supplied a @value_destroy_func when creating the
+ * #GHashTable, the old value is freed using that function.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_hash_table_iter_steal:
+ * @iter: an initialized #GHashTableIter
+ *
+ * Removes the key/value pair currently pointed to by the
+ * iterator from its associated #GHashTable, without calling
+ * the key and value destroy functions. Can only be called
+ * after g_hash_table_iter_next() returned %TRUE, and cannot
+ * be called more than once for the same key/value pair.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_hash_table_lookup:
+ * @hash_table: a #GHashTable
+ * @key: the key to look up
+ *
+ * Looks up a key in a #GHashTable. Note that this function cannot
+ * distinguish between a key that is not present and one which is present
+ * and has the value %NULL. If you need this distinction, use
+ * g_hash_table_lookup_extended().
+ *
+ * Returns: (allow-none): the associated value, or %NULL if the key is not found
+ */
+
+
+/**
+ * g_hash_table_lookup_extended:
+ * @hash_table: a #GHashTable
+ * @lookup_key: the key to look up
+ * @orig_key: (allow-none): return location for the original key, or %NULL
+ * @value: (allow-none): return location for the value associated with the key, or %NULL
+ *
+ * Looks up a key in the #GHashTable, returning the original key and the
+ * associated value and a #gboolean which is %TRUE if the key was found. This
+ * is useful if you need to free the memory allocated for the original key,
+ * for example before calling g_hash_table_remove().
+ *
+ * You can actually pass %NULL for @lookup_key to test
+ * whether the %NULL key exists, provided the hash and equal functions
+ * of @hash_table are %NULL-safe.
+ *
+ * Returns: %TRUE if the key was found in the #GHashTable
+ */
+
+
+/**
+ * g_hash_table_new:
+ * @hash_func: a function to create a hash value from a key
+ * @key_equal_func: a function to check two keys for equality
+ *
+ * Creates a new #GHashTable with a reference count of 1.
+ *
+ * Hash values returned by @hash_func are used to determine where keys
+ * are stored within the #GHashTable data structure. The g_direct_hash(),
+ * g_int_hash(), g_int64_hash(), g_double_hash() and g_str_hash()
+ * functions are provided for some common types of keys.
+ * If @hash_func is %NULL, g_direct_hash() is used.
+ *
+ * @key_equal_func is used when looking up keys in the #GHashTable.
+ * The g_direct_equal(), g_int_equal(), g_int64_equal(), g_double_equal()
+ * and g_str_equal() functions are provided for the most common types
+ * of keys. If @key_equal_func is %NULL, keys are compared directly in
+ * a similar fashion to g_direct_equal(), but without the overhead of
+ * a function call.
+ *
+ * Returns: a new #GHashTable
+ */
+
+
+/**
+ * g_hash_table_new_full:
+ * @hash_func: a function to create a hash value from a key
+ * @key_equal_func: a function to check two keys for equality
+ * @key_destroy_func: (allow-none): a function to free the memory allocated for the key used when removing the entry from the #GHashTable, or %NULL if you don't want to supply such a function.
+ * @value_destroy_func: (allow-none): a function to free the memory allocated for the value used when removing the entry from the #GHashTable, or %NULL if you don't want to supply such a function.
+ *
+ * Creates a new #GHashTable like g_hash_table_new() with a reference
+ * count of 1 and allows to specify functions to free the memory
+ * allocated for the key and value that get called when removing the
+ * entry from the #GHashTable.
+ *
+ * Returns: a new #GHashTable
+ */
+
+
+/**
+ * g_hash_table_ref:
+ * @hash_table: a valid #GHashTable
+ *
+ * Atomically increments the reference count of @hash_table by one.
+ * This function is MT-safe and may be called from any thread.
+ *
+ * Returns: the passed in #GHashTable
+ * Since: 2.10
+ */
+
+
+/**
+ * g_hash_table_remove:
+ * @hash_table: a #GHashTable
+ * @key: the key to remove
+ *
+ * Removes a key and its associated value from a #GHashTable.
+ *
+ * If the #GHashTable was created using g_hash_table_new_full(), the
+ * key and value are freed using the supplied destroy functions, otherwise
+ * you have to make sure that any dynamically allocated values are freed
+ * yourself.
+ *
+ * Returns: %TRUE if the key was found and removed from the #GHashTable
+ */
+
+
+/**
+ * g_hash_table_remove_all:
+ * @hash_table: a #GHashTable
+ *
+ * Removes all keys and their associated values from a #GHashTable.
+ *
+ * If the #GHashTable was created using g_hash_table_new_full(),
+ * the keys and values are freed using the supplied destroy functions,
+ * otherwise you have to make sure that any dynamically allocated
+ * values are freed yourself.
+ *
+ * Since: 2.12
+ */
+
+
+/**
+ * g_hash_table_replace:
+ * @hash_table: a #GHashTable
+ * @key: a key to insert
+ * @value: the value to associate with the key
+ *
+ * Inserts a new key and value into a #GHashTable similar to
+ * g_hash_table_insert(). The difference is that if the key
+ * already exists in the #GHashTable, it gets replaced by the
+ * new key. If you supplied a @value_destroy_func when creating
+ * the #GHashTable, the old value is freed using that function.
+ * If you supplied a @key_destroy_func when creating the
+ * #GHashTable, the old key is freed using that function.
+ */
+
+
+/**
+ * g_hash_table_size:
+ * @hash_table: a #GHashTable
+ *
+ * Returns the number of elements contained in the #GHashTable.
+ *
+ * Returns: the number of key/value pairs in the #GHashTable.
+ */
+
+
+/**
+ * g_hash_table_steal:
+ * @hash_table: a #GHashTable
+ * @key: the key to remove
+ *
+ * Removes a key and its associated value from a #GHashTable without
+ * calling the key and value destroy functions.
+ *
+ * Returns: %TRUE if the key was found and removed from the #GHashTable
+ */
+
+
+/**
+ * g_hash_table_steal_all:
+ * @hash_table: a #GHashTable
+ *
+ * Removes all keys and their associated values from a #GHashTable
+ * without calling the key and value destroy functions.
+ *
+ * Since: 2.12
+ */
+
+
+/**
+ * g_hash_table_thaw:
+ * @hash_table: a #GHashTable
+ *
+ * This function is deprecated and will be removed in the next major
+ * release of GLib. It does nothing.
+ */
+
+
+/**
+ * g_hash_table_unref:
+ * @hash_table: a valid #GHashTable
+ *
+ * Atomically decrements the reference count of @hash_table by one.
+ * If the reference count drops to 0, all keys and values will be
+ * destroyed, and all memory allocated by the hash table is released.
+ * This function is MT-safe and may be called from any thread.
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * g_hmac_copy:
+ * @hmac: the #GHmac to copy
+ *
+ * Copies a #GHmac. If @hmac has been closed, by calling
+ * g_hmac_get_string() or g_hmac_get_digest(), the copied
+ * HMAC will be closed as well.
+ *
+ * when finished using it.
+ *
+ * Returns: the copy of the passed #GHmac. Use g_hmac_unref()
+ * Since: 2.30
+ */
+
+
+/**
+ * g_hmac_get_digest:
+ * @hmac: a #GHmac
+ * @buffer: output buffer
+ * @digest_len: an inout parameter. The caller initializes it to the size of @buffer. After the call it contains the length of the digest
+ *
+ * Gets the digest from @checksum as a raw binary array and places it
+ * into @buffer. The size of the digest depends on the type of checksum.
+ *
+ * Once this function has been called, the #GHmac is closed and can
+ * no longer be updated with g_checksum_update().
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_hmac_get_string:
+ * @hmac: a #GHmac
+ *
+ * Gets the HMAC as an hexadecimal string.
+ *
+ * Once this function has been called the #GHmac can no longer be
+ * updated with g_hmac_update().
+ *
+ * The hexadecimal characters will be lower case.
+ *
+ * returned string is owned by the HMAC and should not be modified
+ * or freed.
+ *
+ * Returns: the hexadecimal representation of the HMAC. The
+ * Since: 2.30
+ */
+
+
+/**
+ * g_hmac_new:
+ * @digest_type: the desired type of digest
+ * @key: (array length=key_len): the key for the HMAC
+ * @key_len: the length of the keys
+ *
+ * Creates a new #GHmac, using the digest algorithm @digest_type.
+ * If the @digest_type is not known, %NULL is returned.
+ * A #GHmac can be used to compute the HMAC of a key and an
+ * arbitrary binary blob, using different hashing algorithms.
+ *
+ * A #GHmac works by feeding a binary blob through g_hmac_update()
+ * until the data is complete; the digest can then be extracted
+ * using g_hmac_get_string(), which will return the checksum as a
+ * hexadecimal string; or g_hmac_get_digest(), which will return a
+ * array of raw bytes. Once either g_hmac_get_string() or
+ * g_hmac_get_digest() have been called on a #GHmac, the HMAC
+ * will be closed and it won't be possible to call g_hmac_update()
+ * on it anymore.
+ *
+ * Use g_hmac_unref() to free the memory allocated by it.
+ *
+ * Returns: the newly created #GHmac, or %NULL.
+ * Since: 2.30
+ */
+
+
+/**
+ * g_hmac_ref:
+ * @hmac: a valid #GHmac
+ *
+ * Atomically increments the reference count of @hmac by one.
+ *
+ * This function is MT-safe and may be called from any thread.
+ *
+ * Returns: the passed in #GHmac.
+ * Since: 2.30
+ */
+
+
+/**
+ * g_hmac_unref:
+ * @hmac: a #GHmac
+ *
+ * Atomically decrements the reference count of @hmac by one.
+ *
+ * If the reference count drops to 0, all keys and values will be
+ * destroyed, and all memory allocated by the hash table is released.
+ * This function is MT-safe and may be called from any thread.
+ * Frees the memory allocated for @hmac.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_hmac_update:
+ * @hmac: a #GHmac
+ * @data: (array length=length): buffer used to compute the checksum
+ * @length: size of the buffer, or -1 if it is a nul-terminated string
+ *
+ * Feeds @data into an existing #GHmac.
+ *
+ * The HMAC must still be open, that is g_hmac_get_string() or
+ * g_hmac_get_digest() must not have been called on @hmac.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_hook_alloc:
+ * @hook_list: a #GHookList
+ *
+ * Allocates space for a #GHook and initializes it.
+ *
+ * Returns: a new #GHook
+ */
+
+
+/**
+ * g_hook_append:
+ * @hook_list: a #GHookList
+ * @hook: the #GHook to add to the end of @hook_list
+ *
+ * Appends a #GHook onto the end of a #GHookList.
+ */
+
+
+/**
+ * g_hook_compare_ids:
+ * @new_hook: a #GHook
+ * @sibling: a #GHook to compare with @new_hook
+ *
+ * Compares the ids of two #GHook elements, returning a negative value
+ * if the second id is greater than the first.
+ *
+ * Returns: a value &lt;= 0 if the id of @sibling is >= the id of @new_hook
+ */
+
+
+/**
+ * g_hook_destroy:
+ * @hook_list: a #GHookList
+ * @hook_id: a hook ID
+ *
+ * Destroys a #GHook, given its ID.
+ *
+ * Returns: %TRUE if the #GHook was found in the #GHookList and destroyed
+ */
+
+
+/**
+ * g_hook_destroy_link:
+ * @hook_list: a #GHookList
+ * @hook: the #GHook to remove
+ *
+ * Removes one #GHook from a #GHookList, marking it
+ * inactive and calling g_hook_unref() on it.
+ */
+
+
+/**
+ * g_hook_find:
+ * @hook_list: a #GHookList
+ * @need_valids: %TRUE if #GHook elements which have been destroyed should be skipped
+ * @func: the function to call for each #GHook, which should return %TRUE when the #GHook has been found
+ * @data: the data to pass to @func
+ *
+ * Finds a #GHook in a #GHookList using the given function to
+ * test for a match.
+ *
+ * Returns: the found #GHook or %NULL if no matching #GHook is found
+ */
+
+
+/**
+ * g_hook_find_data:
+ * @hook_list: a #GHookList
+ * @need_valids: %TRUE if #GHook elements which have been destroyed should be skipped
+ * @data: the data to find
+ *
+ * Finds a #GHook in a #GHookList with the given data.
+ *
+ * #GHook is found
+ *
+ * Returns: the #GHook with the given @data or %NULL if no matching
+ */
+
+
+/**
+ * g_hook_find_func:
+ * @hook_list: a #GHookList
+ * @need_valids: %TRUE if #GHook elements which have been destroyed should be skipped
+ * @func: the function to find
+ *
+ * Finds a #GHook in a #GHookList with the given function.
+ *
+ * #GHook is found
+ *
+ * Returns: the #GHook with the given @func or %NULL if no matching
+ */
+
+
+/**
+ * g_hook_find_func_data:
+ * @hook_list: a #GHookList
+ * @need_valids: %TRUE if #GHook elements which have been destroyed should be skipped
+ * @func: the function to find
+ * @data: the data to find
+ *
+ * Finds a #GHook in a #GHookList with the given function and data.
+ *
+ * no matching #GHook is found
+ *
+ * Returns: the #GHook with the given @func and @data or %NULL if
+ */
+
+
+/**
+ * g_hook_first_valid:
+ * @hook_list: a #GHookList
+ * @may_be_in_call: %TRUE if hooks which are currently running (e.g. in another thread) are considered valid. If set to %FALSE, these are skipped
+ *
+ * Returns the first #GHook in a #GHookList which has not been destroyed.
+ * The reference count for the #GHook is incremented, so you must call
+ * g_hook_unref() to restore it when no longer needed. (Or call
+ * g_hook_next_valid() if you are stepping through the #GHookList.)
+ *
+ * Returns: the first valid #GHook, or %NULL if none are valid
+ */
+
+
+/**
+ * g_hook_free:
+ * @hook_list: a #GHookList
+ * @hook: the #GHook to free
+ *
+ * Calls the #GHookList @finalize_hook function if it exists,
+ * and frees the memory allocated for the #GHook.
+ */
+
+
+/**
+ * g_hook_get:
+ * @hook_list: a #GHookList
+ * @hook_id: a hook id
+ *
+ * Returns the #GHook with the given id, or %NULL if it is not found.
+ *
+ * Returns: the #GHook with the given id, or %NULL if it is not found
+ */
+
+
+/**
+ * g_hook_insert_before:
+ * @hook_list: a #GHookList
+ * @sibling: the #GHook to insert the new #GHook before
+ * @hook: the #GHook to insert
+ *
+ * Inserts a #GHook into a #GHookList, before a given #GHook.
+ */
+
+
+/**
+ * g_hook_insert_sorted:
+ * @hook_list: a #GHookList
+ * @hook: the #GHook to insert
+ * @func: the comparison function used to sort the #GHook elements
+ *
+ * Inserts a #GHook into a #GHookList, sorted by the given function.
+ */
+
+
+/**
+ * g_hook_list_clear:
+ * @hook_list: a #GHookList
+ *
+ * Removes all the #GHook elements from a #GHookList.
+ */
+
+
+/**
+ * g_hook_list_init:
+ * @hook_list: a #GHookList
+ * @hook_size: the size of each element in the #GHookList, typically <literal>sizeof (GHook)</literal>
+ *
+ * Initializes a #GHookList.
+ * This must be called before the #GHookList is used.
+ */
+
+
+/**
+ * g_hook_list_invoke:
+ * @hook_list: a #GHookList
+ * @may_recurse: %TRUE if functions which are already running (e.g. in another thread) can be called. If set to %FALSE, these are skipped
+ *
+ * Calls all of the #GHook functions in a #GHookList.
+ */
+
+
+/**
+ * g_hook_list_invoke_check:
+ * @hook_list: a #GHookList
+ * @may_recurse: %TRUE if functions which are already running (e.g. in another thread) can be called. If set to %FALSE, these are skipped
+ *
+ * Calls all of the #GHook functions in a #GHookList.
+ * Any function which returns %FALSE is removed from the #GHookList.
+ */
+
+
+/**
+ * g_hook_list_marshal:
+ * @hook_list: a #GHookList
+ * @may_recurse: %TRUE if hooks which are currently running (e.g. in another thread) are considered valid. If set to %FALSE, these are skipped
+ * @marshaller: the function to call for each #GHook
+ * @marshal_data: data to pass to @marshaller
+ *
+ * Calls a function on each valid #GHook.
+ */
+
+
+/**
+ * g_hook_list_marshal_check:
+ * @hook_list: a #GHookList
+ * @may_recurse: %TRUE if hooks which are currently running (e.g. in another thread) are considered valid. If set to %FALSE, these are skipped
+ * @marshaller: the function to call for each #GHook
+ * @marshal_data: data to pass to @marshaller
+ *
+ * Calls a function on each valid #GHook and destroys it if the
+ * function returns %FALSE.
+ */
+
+
+/**
+ * g_hook_next_valid:
+ * @hook_list: a #GHookList
+ * @hook: the current #GHook
+ * @may_be_in_call: %TRUE if hooks which are currently running (e.g. in another thread) are considered valid. If set to %FALSE, these are skipped
+ *
+ * Returns the next #GHook in a #GHookList which has not been destroyed.
+ * The reference count for the #GHook is incremented, so you must call
+ * g_hook_unref() to restore it when no longer needed. (Or continue to call
+ * g_hook_next_valid() until %NULL is returned.)
+ *
+ * Returns: the next valid #GHook, or %NULL if none are valid
+ */
+
+
+/**
+ * g_hook_prepend:
+ * @hook_list: a #GHookList
+ * @hook: the #GHook to add to the start of @hook_list
+ *
+ * Prepends a #GHook on the start of a #GHookList.
+ */
+
+
+/**
+ * g_hook_ref:
+ * @hook_list: a #GHookList
+ * @hook: the #GHook to increment the reference count of
+ *
+ * Increments the reference count for a #GHook.
+ *
+ * Returns: the @hook that was passed in (since 2.6)
+ */
+
+
+/**
+ * g_hook_unref:
+ * @hook_list: a #GHookList
+ * @hook: the #GHook to unref
+ *
+ * Decrements the reference count of a #GHook.
+ * If the reference count falls to 0, the #GHook is removed
+ * from the #GHookList and g_hook_free() is called to free it.
+ */
+
+
+/**
+ * g_hostname_is_ascii_encoded:
+ * @hostname: a hostname
+ *
+ * Tests if @hostname contains segments with an ASCII-compatible
+ * encoding of an Internationalized Domain Name. If this returns
+ * %TRUE, you should decode the hostname with g_hostname_to_unicode()
+ * before displaying it to the user.
+ *
+ * Note that a hostname might contain a mix of encoded and unencoded
+ * segments, and so it is possible for g_hostname_is_non_ascii() and
+ * g_hostname_is_ascii_encoded() to both return %TRUE for a name.
+ *
+ * segments.
+ *
+ * Returns: %TRUE if @hostname contains any ASCII-encoded
+ * Since: 2.22
+ */
+
+
+/**
+ * g_hostname_is_ip_address:
+ * @hostname: a hostname (or IP address in string form)
+ *
+ * Tests if @hostname is the string form of an IPv4 or IPv6 address.
+ * (Eg, "192.168.0.1".)
+ *
+ * Returns: %TRUE if @hostname is an IP address
+ * Since: 2.22
+ */
+
+
+/**
+ * g_hostname_is_non_ascii:
+ * @hostname: a hostname
+ *
+ * Tests if @hostname contains Unicode characters. If this returns
+ * %TRUE, you need to encode the hostname with g_hostname_to_ascii()
+ * before using it in non-IDN-aware contexts.
+ *
+ * Note that a hostname might contain a mix of encoded and unencoded
+ * segments, and so it is possible for g_hostname_is_non_ascii() and
+ * g_hostname_is_ascii_encoded() to both return %TRUE for a name.
+ *
+ * Returns: %TRUE if @hostname contains any non-ASCII characters
+ * Since: 2.22
+ */
+
+
+/**
+ * g_hostname_to_ascii:
+ * @hostname: a valid UTF-8 or ASCII hostname
+ *
+ * Converts @hostname to its canonical ASCII form; an ASCII-only
+ * string containing no uppercase letters and not ending with a
+ * trailing dot.
+ *
+ * @hostname is in some way invalid.
+ *
+ * Returns: an ASCII hostname, which must be freed, or %NULL if
+ * Since: 2.22
+ */
+
+
+/**
+ * g_hostname_to_unicode:
+ * @hostname: a valid UTF-8 or ASCII hostname
+ *
+ * Converts @hostname to its canonical presentation form; a UTF-8
+ * string in Unicode normalization form C, containing no uppercase
+ * letters, no forbidden characters, and no ASCII-encoded segments,
+ * and not ending with a trailing dot.
+ *
+ * Of course if @hostname is not an internationalized hostname, then
+ * the canonical presentation form will be entirely ASCII.
+ *
+ * @hostname is in some way invalid.
+ *
+ * Returns: a UTF-8 hostname, which must be freed, or %NULL if
+ * Since: 2.22
+ */
+
+
+/**
+ * g_htonl:
+ * @val: a 32-bit integer value in host byte order
+ *
+ * Converts a 32-bit integer value from host to network byte order.
+ *
+ * Returns: @val converted to network byte order
+ */
+
+
+/**
+ * g_htons:
+ * @val: a 16-bit integer value in host byte order
+ *
+ * Converts a 16-bit integer value from host to network byte order.
+ *
+ * Returns: @val converted to network byte order
+ */
+
+
+/**
+ * g_iconv:
+ * @converter: conversion descriptor from g_iconv_open()
+ * @inbuf: bytes to convert
+ * @inbytes_left: inout parameter, bytes remaining to convert in @inbuf
+ * @outbuf: converted output bytes
+ * @outbytes_left: inout parameter, bytes available to fill in @outbuf
+ *
+ * Same as the standard UNIX routine iconv(), but
+ * may be implemented via libiconv on UNIX flavors that lack
+ * a native implementation.
+ *
+ * GLib provides g_convert() and g_locale_to_utf8() which are likely
+ * more convenient than the raw iconv wrappers.
+ *
+ * Returns: count of non-reversible conversions, or -1 on error
+ */
+
+
+/**
+ * g_iconv_close:
+ * @converter: a conversion descriptor from g_iconv_open()
+ *
+ * Same as the standard UNIX routine iconv_close(), but
+ * may be implemented via libiconv on UNIX flavors that lack
+ * a native implementation. Should be called to clean up
+ * the conversion descriptor from g_iconv_open() when
+ * you are done converting things.
+ *
+ * GLib provides g_convert() and g_locale_to_utf8() which are likely
+ * more convenient than the raw iconv wrappers.
+ *
+ * Returns: -1 on error, 0 on success
+ */
+
+
+/**
+ * g_iconv_open:
+ * @to_codeset: destination codeset
+ * @from_codeset: source codeset
+ *
+ * Same as the standard UNIX routine iconv_open(), but
+ * may be implemented via libiconv on UNIX flavors that lack
+ * a native implementation.
+ *
+ * GLib provides g_convert() and g_locale_to_utf8() which are likely
+ * more convenient than the raw iconv wrappers.
+ *
+ * opening the converter failed.
+ *
+ * Returns: a "conversion descriptor", or (GIConv)-1 if
+ */
+
+
+/**
+ * g_idle_add:
+ * @function: function to call
+ * @data: data to pass to @function.
+ *
+ * Adds a function to be called whenever there are no higher priority
+ * events pending to the default main loop. The function is given the
+ * default idle priority, #G_PRIORITY_DEFAULT_IDLE.  If the function
+ * returns %FALSE it is automatically removed from the list of event
+ * sources and will not be called again.
+ *
+ * This internally creates a main loop source using g_idle_source_new()
+ * and attaches it to the main loop context using g_source_attach().
+ * You can do these steps manually if you need greater control.
+ *
+ * Returns: the ID (greater than 0) of the event source.
+ */
+
+
+/**
+ * g_idle_add_full:
+ * @priority: the priority of the idle source. Typically this will be in the range between #G_PRIORITY_DEFAULT_IDLE and #G_PRIORITY_HIGH_IDLE.
+ * @function: function to call
+ * @data: data to pass to @function
+ * @notify: (allow-none): function to call when the idle is removed, or %NULL
+ *
+ * Adds a function to be called whenever there are no higher priority
+ * events pending.  If the function returns %FALSE it is automatically
+ * removed from the list of event sources and will not be called again.
+ *
+ * This internally creates a main loop source using g_idle_source_new()
+ * and attaches it to the main loop context using g_source_attach().
+ * You can do these steps manually if you need greater control.
+ *
+ * Returns: the ID (greater than 0) of the event source.
+ * Rename to: g_idle_add
+ */
+
+
+/**
+ * g_idle_remove_by_data:
+ * @data: the data for the idle source's callback.
+ *
+ * Removes the idle function with the given data.
+ *
+ * Returns: %TRUE if an idle source was found and removed.
+ */
+
+
+/**
+ * g_idle_source_new:
+ *
+ * Creates a new idle source.
+ *
+ * The source will not initially be associated with any #GMainContext
+ * and must be added to one with g_source_attach() before it will be
+ * executed. Note that the default priority for idle sources is
+ * %G_PRIORITY_DEFAULT_IDLE, as compared to other sources which
+ * have a default priority of %G_PRIORITY_DEFAULT.
+ *
+ * Returns: the newly-created idle source
+ */
+
+
+/**
+ * g_int64_equal:
+ * @v1: a pointer to a #gint64 key
+ * @v2: a pointer to a #gint64 key to compare with @v1
+ *
+ * Compares the two #gint64 values being pointed to and returns
+ * %TRUE if they are equal.
+ * It can be passed to g_hash_table_new() as the @key_equal_func
+ * parameter, when using non-%NULL pointers to 64-bit integers as keys in a
+ * #GHashTable.
+ *
+ * Returns: %TRUE if the two keys match.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_int64_hash:
+ * @v: a pointer to a #gint64 key
+ *
+ * Converts a pointer to a #gint64 to a hash value.
+ *
+ * It can be passed to g_hash_table_new() as the @hash_func parameter,
+ * when using non-%NULL pointers to 64-bit integer values as keys in a
+ * #GHashTable.
+ *
+ * Returns: a hash value corresponding to the key.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_int_equal:
+ * @v1: a pointer to a #gint key
+ * @v2: a pointer to a #gint key to compare with @v1
+ *
+ * Compares the two #gint values being pointed to and returns
+ * %TRUE if they are equal.
+ * It can be passed to g_hash_table_new() as the @key_equal_func
+ * parameter, when using non-%NULL pointers to integers as keys in a
+ * #GHashTable.
+ *
+ * Note that this function acts on pointers to #gint, not on #gint directly:
+ * if your hash table's keys are of the form
+ * <literal>GINT_TO_POINTER (n)</literal>, use g_direct_equal() instead.
+ *
+ * Returns: %TRUE if the two keys match.
+ */
+
+
+/**
+ * g_int_hash:
+ * @v: a pointer to a #gint key
+ *
+ * Converts a pointer to a #gint to a hash value.
+ * It can be passed to g_hash_table_new() as the @hash_func parameter,
+ * when using non-%NULL pointers to integer values as keys in a #GHashTable.
+ *
+ * Note that this function acts on pointers to #gint, not on #gint directly:
+ * if your hash table's keys are of the form
+ * <literal>GINT_TO_POINTER (n)</literal>, use g_direct_hash() instead.
+ *
+ * Returns: a hash value corresponding to the key.
+ */
+
+
+/**
+ * g_intern_static_string:
+ * @string: (allow-none): a static string
+ *
+ * Returns a canonical representation for @string. Interned strings can
+ * be compared for equality by comparing the pointers, instead of using strcmp().
+ * g_intern_static_string() does not copy the string, therefore @string must
+ * not be freed or modified.
+ *
+ * Returns: a canonical representation for the string
+ * Since: 2.10
+ */
+
+
+/**
+ * g_intern_string:
+ * @string: (allow-none): a string
+ *
+ * Returns a canonical representation for @string. Interned strings can
+ * be compared for equality by comparing the pointers, instead of using strcmp().
+ *
+ * Returns: a canonical representation for the string
+ * Since: 2.10
+ */
+
+
+/**
+ * g_io_add_watch:
+ * @channel: a #GIOChannel
+ * @condition: the condition to watch for
+ * @func: the function to call when the condition is satisfied
+ * @user_data: user data to pass to @func
+ *
+ * Adds the #GIOChannel into the default main loop context
+ * with the default priority.
+ *
+ * Returns: the event source id
+ */
+
+
+/**
+ * g_io_add_watch_full:
+ * @channel: a #GIOChannel
+ * @priority: the priority of the #GIOChannel source
+ * @condition: the condition to watch for
+ * @func: the function to call when the condition is satisfied
+ * @user_data: user data to pass to @func
+ * @notify: the function to call when the source is removed
+ *
+ * Adds the #GIOChannel into the default main loop context
+ * with the given priority.
+ *
+ * This internally creates a main loop source using g_io_create_watch()
+ * and attaches it to the main loop context with g_source_attach().
+ * You can do these steps manually if you need greater control.
+ *
+ * Returns: the event source id
+ * Rename to: g_io_add_watch
+ */
+
+
+/**
+ * g_io_channel_close:
+ * @channel: A #GIOChannel
+ *
+ * Close an IO channel. Any pending data to be written will be
+ * flushed, ignoring errors. The channel will not be freed until the
+ * last reference is dropped using g_io_channel_unref().
+ *
+ * Deprecated:2.2: Use g_io_channel_shutdown() instead.
+ */
+
+
+/**
+ * g_io_channel_error_from_errno:
+ * @en: an <literal>errno</literal> error number, e.g. <literal>EINVAL</literal>
+ *
+ * Converts an <literal>errno</literal> error number to a #GIOChannelError.
+ *
+ * %G_IO_CHANNEL_ERROR_INVAL.
+ *
+ * Returns: a #GIOChannelError error number, e.g.
+ */
+
+
+/**
+ * g_io_channel_error_quark:
+ *
+ *
+ *
+ * Returns: the quark used as %G_IO_CHANNEL_ERROR
+ */
+
+
+/**
+ * g_io_channel_flush:
+ * @channel: a #GIOChannel
+ * @error: location to store an error of type #GIOChannelError
+ *
+ * Flushes the write buffer for the GIOChannel.
+ *
+ * #G_IO_STATUS_NORMAL, #G_IO_STATUS_AGAIN, or
+ * #G_IO_STATUS_ERROR.
+ *
+ * Returns: the status of the operation: One of
+ */
+
+
+/**
+ * g_io_channel_get_buffer_condition:
+ * @channel: A #GIOChannel
+ *
+ * This function returns a #GIOCondition depending on whether there
+ * is data to be read/space to write data in the internal buffers in
+ * the #GIOChannel. Only the flags %G_IO_IN and %G_IO_OUT may be set.
+ *
+ * Returns: A #GIOCondition
+ */
+
+
+/**
+ * g_io_channel_get_buffer_size:
+ * @channel: a #GIOChannel
+ *
+ * Gets the buffer size.
+ *
+ * Returns: the size of the buffer.
+ */
+
+
+/**
+ * g_io_channel_get_buffered:
+ * @channel: a #GIOChannel
+ *
+ * Returns whether @channel is buffered.
+ *
+ * Returns: %TRUE if the @channel is buffered.
+ */
+
+
+/**
+ * g_io_channel_get_close_on_unref:
+ * @channel: a #GIOChannel.
+ *
+ * Returns whether the file/socket/whatever associated with @channel
+ * will be closed when @channel receives its final unref and is
+ * destroyed. The default value of this is %TRUE for channels created
+ * by g_io_channel_new_file (), and %FALSE for all other channels.
+ *
+ * the GIOChannel data structure.
+ *
+ * Returns: Whether the channel will be closed on the final unref of
+ */
+
+
+/**
+ * g_io_channel_get_encoding:
+ * @channel: a #GIOChannel
+ *
+ * Gets the encoding for the input/output of the channel.
+ * The internal encoding is always UTF-8. The encoding %NULL
+ * makes the channel safe for binary data.
+ *
+ * owned by GLib and must not be freed.
+ *
+ * Returns: A string containing the encoding, this string is
+ */
+
+
+/**
+ * g_io_channel_get_flags:
+ * @channel: a #GIOChannel
+ *
+ * Gets the current flags for a #GIOChannel, including read-only
+ * flags such as %G_IO_FLAG_IS_READABLE.
+ *
+ * The values of the flags %G_IO_FLAG_IS_READABLE and %G_IO_FLAG_IS_WRITABLE
+ * are cached for internal use by the channel when it is created.
+ * If they should change at some later point (e.g. partial shutdown
+ * of a socket with the UNIX shutdown() function), the user
+ * should immediately call g_io_channel_get_flags() to update
+ * the internal values of these flags.
+ *
+ * Returns: the flags which are set on the channel
+ */
+
+
+/**
+ * g_io_channel_get_line_term:
+ * @channel: a #GIOChannel
+ * @length: a location to return the length of the line terminator
+ *
+ * This returns the string that #GIOChannel uses to determine
+ * where in the file a line break occurs. A value of %NULL
+ * indicates autodetection.
+ *
+ * is owned by GLib and must not be freed.
+ *
+ * Returns: The line termination string. This value
+ */
+
+
+/**
+ * g_io_channel_init:
+ * @channel: a #GIOChannel
+ *
+ * Initializes a #GIOChannel struct.
+ *
+ * This is called by each of the above functions when creating a
+ * #GIOChannel, and so is not often needed by the application
+ * programmer (unless you are creating a new type of #GIOChannel).
+ */
+
+
+/**
+ * g_io_channel_new_file:
+ * @filename: A string containing the name of a file
+ * @mode: One of "r", "w", "a", "r+", "w+", "a+". These have the same meaning as in fopen()
+ * @error: A location to return an error of type %G_FILE_ERROR
+ *
+ * Open a file @filename as a #GIOChannel using mode @mode. This
+ * channel will be closed when the last reference to it is dropped,
+ * so there is no need to call g_io_channel_close() (though doing
+ * so will not cause problems, as long as no attempt is made to
+ * access the channel after it is closed).
+ *
+ * Returns: A #GIOChannel on success, %NULL on failure.
+ */
+
+
+/**
+ * g_io_channel_read:
+ * @channel: a #GIOChannel
+ * @buf: a buffer to read the data into (which should be at least count bytes long)
+ * @count: the number of bytes to read from the #GIOChannel
+ * @bytes_read: returns the number of bytes actually read
+ *
+ * Reads data from a #GIOChannel.
+ *
+ *
+ * Deprecated:2.2: Use g_io_channel_read_chars() instead.
+ *
+ * Returns: %G_IO_ERROR_NONE if the operation was successful.
+ */
+
+
+/**
+ * g_io_channel_read_chars:
+ * @channel: a #GIOChannel
+ * @buf: a buffer to read data into
+ * @count: the size of the buffer. Note that the buffer may not be complelely filled even if there is data in the buffer if the remaining data is not a complete character.
+ * @bytes_read: (allow-none): The number of bytes read. This may be zero even on success if count < 6 and the channel's encoding is non-%NULL. This indicates that the next UTF-8 character is too wide for the buffer.
+ * @error: a location to return an error of type #GConvertError or #GIOChannelError.
+ *
+ * Replacement for g_io_channel_read() with the new API.
+ *
+ * Returns: the status of the operation.
+ */
+
+
+/**
+ * g_io_channel_read_line:
+ * @channel: a #GIOChannel
+ * @str_return: The line read from the #GIOChannel, including the line terminator. This data should be freed with g_free() when no longer needed. This is a nul-terminated string. If a @length of zero is returned, this will be %NULL instead.
+ * @length: (allow-none): location to store length of the read data, or %NULL
+ * @terminator_pos: (allow-none): location to store position of line terminator, or %NULL
+ * @error: A location to return an error of type #GConvertError or #GIOChannelError
+ *
+ * Reads a line, including the terminating character(s),
+ * from a #GIOChannel into a newly-allocated string.
+ * @str_return will contain allocated memory if the return
+ * is %G_IO_STATUS_NORMAL.
+ *
+ * Returns: the status of the operation.
+ */
+
+
+/**
+ * g_io_channel_read_line_string:
+ * @channel: a #GIOChannel
+ * @buffer: a #GString into which the line will be written. If @buffer already contains data, the old data will be overwritten.
+ * @terminator_pos: (allow-none): location to store position of line terminator, or %NULL
+ * @error: a location to store an error of type #GConvertError or #GIOChannelError
+ *
+ * Reads a line from a #GIOChannel, using a #GString as a buffer.
+ *
+ * Returns: the status of the operation.
+ */
+
+
+/**
+ * g_io_channel_read_to_end:
+ * @channel: a #GIOChannel
+ * @str_return: Location to store a pointer to a string holding the remaining data in the #GIOChannel. This data should be freed with g_free() when no longer needed. This data is terminated by an extra nul character, but there may be other nuls in the intervening data.
+ * @length: location to store length of the data
+ * @error: location to return an error of type #GConvertError or #GIOChannelError
+ *
+ * Reads all the remaining data from the file.
+ *
+ * This function never returns %G_IO_STATUS_EOF.
+ *
+ * Returns: %G_IO_STATUS_NORMAL on success.
+ */
+
+
+/**
+ * g_io_channel_read_unichar:
+ * @channel: a #GIOChannel
+ * @thechar: a location to return a character
+ * @error: a location to return an error of type #GConvertError or #GIOChannelError
+ *
+ * Reads a Unicode character from @channel.
+ * This function cannot be called on a channel with %NULL encoding.
+ *
+ * Returns: a #GIOStatus
+ */
+
+
+/**
+ * g_io_channel_ref:
+ * @channel: a #GIOChannel
+ *
+ * Increments the reference count of a #GIOChannel.
+ *
+ * Returns: the @channel that was passed in (since 2.6)
+ */
+
+
+/**
+ * g_io_channel_seek:
+ * @channel: a #GIOChannel
+ * @offset: an offset, in bytes, which is added to the position specified by @type
+ * @type: the position in the file, which can be %G_SEEK_CUR (the current position), %G_SEEK_SET (the start of the file), or %G_SEEK_END (the end of the file)
+ *
+ * Sets the current position in the #GIOChannel, similar to the standard
+ * library function fseek().
+ *
+ *
+ * Deprecated:2.2: Use g_io_channel_seek_position() instead.
+ *
+ * Returns: %G_IO_ERROR_NONE if the operation was successful.
+ */
+
+
+/**
+ * g_io_channel_seek_position:
+ * @channel: a #GIOChannel
+ * @offset: The offset in bytes from the position specified by @type
+ * @type: a #GSeekType. The type %G_SEEK_CUR is only allowed in those cases where a call to g_io_channel_set_encoding () is allowed. See the documentation for g_io_channel_set_encoding () for details.
+ * @error: A location to return an error of type #GIOChannelError
+ *
+ * Replacement for g_io_channel_seek() with the new API.
+ *
+ * Returns: the status of the operation.
+ */
+
+
+/**
+ * g_io_channel_set_buffer_size:
+ * @channel: a #GIOChannel
+ * @size: the size of the buffer, or 0 to let GLib pick a good size
+ *
+ * Sets the buffer size.
+ */
+
+
+/**
+ * g_io_channel_set_buffered:
+ * @channel: a #GIOChannel
+ * @buffered: whether to set the channel buffered or unbuffered
+ *
+ * The buffering state can only be set if the channel's encoding
+ * is %NULL. For any other encoding, the channel must be buffered.
+ *
+ * A buffered channel can only be set unbuffered if the channel's
+ * internal buffers have been flushed. Newly created channels or
+ * channels which have returned %G_IO_STATUS_EOF
+ * not require such a flush. For write-only channels, a call to
+ * g_io_channel_flush () is sufficient. For all other channels,
+ * the buffers may be flushed by a call to g_io_channel_seek_position ().
+ * This includes the possibility of seeking with seek type %G_SEEK_CUR
+ * and an offset of zero. Note that this means that socket-based
+ * channels cannot be set unbuffered once they have had data
+ * read from them.
+ *
+ * On unbuffered channels, it is safe to mix read and write
+ * calls from the new and old APIs, if this is necessary for
+ * maintaining old code.
+ *
+ * The default state of the channel is buffered.
+ */
+
+
+/**
+ * g_io_channel_set_close_on_unref:
+ * @channel: a #GIOChannel
+ * @do_close: Whether to close the channel on the final unref of the GIOChannel data structure. The default value of this is %TRUE for channels created by g_io_channel_new_file (), and %FALSE for all other channels.
+ *
+ * Setting this flag to %TRUE for a channel you have already closed
+ * can cause problems.
+ */
+
+
+/**
+ * g_io_channel_set_encoding:
+ * @channel: a #GIOChannel
+ * @encoding: the encoding type
+ * @error: location to store an error of type #GConvertError
+ *
+ * Sets the encoding for the input/output of the channel.
+ * The internal encoding is always UTF-8. The default encoding
+ * for the external file is UTF-8.
+ *
+ * The encoding %NULL is safe to use with binary data.
+ *
+ * The encoding can only be set if one of the following conditions
+ * is true:
+ * <itemizedlist>
+ * <listitem><para>
+ * The channel was just created, and has not been written to or read
+ * from yet.
+ * </para></listitem>
+ * <listitem><para>
+ * The channel is write-only.
+ * </para></listitem>
+ * <listitem><para>
+ * The channel is a file, and the file pointer was just
+ * repositioned by a call to g_io_channel_seek_position().
+ * (This flushes all the internal buffers.)
+ * </para></listitem>
+ * <listitem><para>
+ * The current encoding is %NULL or UTF-8.
+ * </para></listitem>
+ * <listitem><para>
+ * One of the (new API) read functions has just returned %G_IO_STATUS_EOF
+ * (or, in the case of g_io_channel_read_to_end(), %G_IO_STATUS_NORMAL).
+ * </para></listitem>
+ * <listitem><para>
+ * One of the functions g_io_channel_read_chars() or
+ * g_io_channel_read_unichar() has returned %G_IO_STATUS_AGAIN or
+ * %G_IO_STATUS_ERROR. This may be useful in the case of
+ * %G_CONVERT_ERROR_ILLEGAL_SEQUENCE.
+ * Returning one of these statuses from g_io_channel_read_line(),
+ * g_io_channel_read_line_string(), or g_io_channel_read_to_end()
+ * does <emphasis>not</emphasis> guarantee that the encoding can
+ * be changed.
+ * </para></listitem>
+ * </itemizedlist>
+ * Channels which do not meet one of the above conditions cannot call
+ * g_io_channel_seek_position() with an offset of %G_SEEK_CUR, and, if
+ * they are "seekable", cannot call g_io_channel_write_chars() after
+ * calling one of the API "read" functions.
+ *
+ * Returns: %G_IO_STATUS_NORMAL if the encoding was successfully set.
+ */
+
+
+/**
+ * g_io_channel_set_flags:
+ * @channel: a #GIOChannel
+ * @flags: the flags to set on the IO channel
+ * @error: A location to return an error of type #GIOChannelError
+ *
+ * Sets the (writeable) flags in @channel to (@flags & %G_IO_FLAG_SET_MASK).
+ *
+ * Returns: the status of the operation.
+ */
+
+
+/**
+ * g_io_channel_set_line_term:
+ * @channel: a #GIOChannel
+ * @line_term: The line termination string. Use %NULL for autodetect. Autodetection breaks on "\n", "\r\n", "\r", "\0", and the Unicode paragraph separator. Autodetection should not be used for anything other than file-based channels.
+ * @length: The length of the termination string. If -1 is passed, the string is assumed to be nul-terminated. This option allows termination strings with embedded nuls.
+ *
+ * This sets the string that #GIOChannel uses to determine
+ * where in the file a line break occurs.
+ */
+
+
+/**
+ * g_io_channel_shutdown:
+ * @channel: a #GIOChannel
+ * @flush: if %TRUE, flush pending
+ * @err: location to store a #GIOChannelError
+ *
+ * Close an IO channel. Any pending data to be written will be
+ * flushed if @flush is %TRUE. The channel will not be freed until the
+ * last reference is dropped using g_io_channel_unref().
+ *
+ * Returns: the status of the operation.
+ */
+
+
+/**
+ * g_io_channel_unix_get_fd:
+ * @channel: a #GIOChannel, created with g_io_channel_unix_new().
+ * @Returns: the file descriptor of the #GIOChannel.
+ *
+ * Returns the file descriptor of the #GIOChannel.
+ *
+ * On Windows this function returns the file descriptor or socket of
+ * the #GIOChannel.
+ */
+
+
+/**
+ * g_io_channel_unix_new:
+ * @fd: a file descriptor.
+ * @Returns: a new #GIOChannel.
+ *
+ * Creates a new #GIOChannel given a file descriptor. On UNIX systems
+ * this works for plain files, pipes, and sockets.
+ *
+ * The returned #GIOChannel has a reference count of 1.
+ *
+ * The default encoding for #GIOChannel is UTF-8. If your application
+ * is reading output from a command using via pipe, you may need to set
+ * the encoding to the encoding of the current locale (see
+ * g_get_charset()) with the g_io_channel_set_encoding() function.
+ *
+ * If you want to read raw binary data without interpretation, then
+ * call the g_io_channel_set_encoding() function with %NULL for the
+ * encoding argument.
+ *
+ * This function is available in GLib on Windows, too, but you should
+ * avoid using it on Windows. The domain of file descriptors and
+ * sockets overlap. There is no way for GLib to know which one you mean
+ * in case the argument you pass to this function happens to be both a
+ * valid file descriptor and socket. If that happens a warning is
+ * issued, and GLib assumes that it is the file descriptor you mean.
+ */
+
+
+/**
+ * g_io_channel_unref:
+ * @channel: a #GIOChannel
+ *
+ * Decrements the reference count of a #GIOChannel.
+ */
+
+
+/**
+ * g_io_channel_win32_new_fd:
+ * @fd: a C library file descriptor.
+ * @Returns: a new #GIOChannel.
+ *
+ * Creates a new #GIOChannel given a file descriptor on Windows. This
+ * works for file descriptors from the C runtime.
+ *
+ * This function works for file descriptors as returned by the open(),
+ * creat(), pipe() and fileno() calls in the Microsoft C runtime. In
+ * order to meaningfully use this function your code should use the
+ * same C runtime as GLib uses, which is msvcrt.dll. Note that in
+ * current Microsoft compilers it is near impossible to convince it to
+ * build code that would use msvcrt.dll. The last Microsoft compiler
+ * version that supported using msvcrt.dll as the C runtime was version
+ * 6. The GNU compiler and toolchain for Windows, also known as Mingw,
+ * fully supports msvcrt.dll.
+ *
+ * If you have created a #GIOChannel for a file descriptor and started
+ * watching (polling) it, you shouldn't call read() on the file
+ * descriptor. This is because adding polling for a file descriptor is
+ * implemented in GLib on Windows by starting a thread that sits
+ * blocked in a read() from the file descriptor most of the time. All
+ * reads from the file descriptor should be done by this internal GLib
+ * thread. Your code should call only g_io_channel_read().
+ *
+ * This function is available only in GLib on Windows.
+ */
+
+
+/**
+ * g_io_channel_win32_new_messages:
+ * @hwnd: a window handle.
+ * @Returns: a new #GIOChannel.
+ *
+ * Creates a new #GIOChannel given a window handle on Windows.
+ *
+ * This function creates a #GIOChannel that can be used to poll for
+ * Windows messages for the window in question.
+ */
+
+
+/**
+ * g_io_channel_win32_new_socket:
+ * @socket: a Winsock socket
+ * @Returns: a new #GIOChannel
+ *
+ * Creates a new #GIOChannel given a socket on Windows.
+ *
+ * This function works for sockets created by Winsock. It's available
+ * only in GLib on Windows.
+ *
+ * Polling a #GSource created to watch a channel for a socket puts the
+ * socket in non-blocking mode. This is a side-effect of the
+ * implementation and unavoidable.
+ */
+
+
+/**
+ * g_io_channel_write:
+ * @channel: a #GIOChannel
+ * @buf: the buffer containing the data to write
+ * @count: the number of bytes to write
+ * @bytes_written: the number of bytes actually written
+ *
+ * Writes data to a #GIOChannel.
+ *
+ *
+ * Deprecated:2.2: Use g_io_channel_write_chars() instead.
+ *
+ * Returns: %G_IO_ERROR_NONE if the operation was successful.
+ */
+
+
+/**
+ * g_io_channel_write_chars:
+ * @channel: a #GIOChannel
+ * @buf: a buffer to write data from
+ * @count: the size of the buffer. If -1, the buffer is taken to be a nul-terminated string.
+ * @bytes_written: The number of bytes written. This can be nonzero even if the return value is not %G_IO_STATUS_NORMAL. If the return value is %G_IO_STATUS_NORMAL and the channel is blocking, this will always be equal to @count if @count >= 0.
+ * @error: a location to return an error of type #GConvertError or #GIOChannelError
+ *
+ * Replacement for g_io_channel_write() with the new API.
+ *
+ * On seekable channels with encodings other than %NULL or UTF-8, generic
+ * mixing of reading and writing is not allowed. A call to g_io_channel_write_chars ()
+ * may only be made on a channel from which data has been read in the
+ * cases described in the documentation for g_io_channel_set_encoding ().
+ *
+ * Returns: the status of the operation.
+ */
+
+
+/**
+ * g_io_channel_write_unichar:
+ * @channel: a #GIOChannel
+ * @thechar: a character
+ * @error: location to return an error of type #GConvertError or #GIOChannelError
+ *
+ * Writes a Unicode character to @channel.
+ * This function cannot be called on a channel with %NULL encoding.
+ *
+ * Returns: a #GIOStatus
+ */
+
+
+/**
+ * g_io_create_watch:
+ * @channel: a #GIOChannel to watch
+ * @condition: conditions to watch for
+ *
+ * Creates a #GSource that's dispatched when @condition is met for the
+ * given @channel. For example, if condition is #G_IO_IN, the source will
+ * be dispatched when there's data available for reading.
+ *
+ * g_io_add_watch() is a simpler interface to this same functionality, for
+ * the case where you want to add the source to the default main loop context
+ * at the default priority.
+ *
+ * On Windows, polling a #GSource created to watch a channel for a socket
+ * puts the socket in non-blocking mode. This is a side-effect of the
+ * implementation and unavoidable.
+ *
+ * Returns: a new #GSource
+ */
+
+
+/**
+ * g_key_file_free: (skip)
+ * @key_file: a #GKeyFile
+ *
+ * Clears all keys and groups from @key_file, and decreases the
+ * reference count by 1. If the reference count reaches zero,
+ * frees the key file and all its allocated memory.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_get_boolean:
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ * @key: a key
+ * @error: return location for a #GError
+ *
+ * Returns the value associated with @key under @group_name as a
+ * boolean.
+ *
+ * If @key cannot be found then %FALSE is returned and @error is set
+ * to #G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the value
+ * associated with @key cannot be interpreted as a boolean then %FALSE
+ * is returned and @error is set to #G_KEY_FILE_ERROR_INVALID_VALUE.
+ *
+ * or %FALSE if the key was not found or could not be parsed.
+ *
+ * Returns: the value associated with the key as a boolean,
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_get_boolean_list:
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ * @key: a key
+ * @length: (out): the number of booleans returned
+ * @error: return location for a #GError
+ *
+ * Returns the values associated with @key under @group_name as
+ * booleans.
+ *
+ * If @key cannot be found then %NULL is returned and @error is set to
+ * #G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the values associated
+ * with @key cannot be interpreted as booleans then %NULL is returned
+ * and @error is set to #G_KEY_FILE_ERROR_INVALID_VALUE.
+ *
+ * the values associated with the key as a list of booleans, or %NULL if the
+ * key was not found or could not be parsed. The returned list of booleans
+ * should be freed with g_free() when no longer needed.
+ *
+ * Returns: (array length=length) (element-type gboolean) (transfer container):
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_get_comment:
+ * @key_file: a #GKeyFile
+ * @group_name: (allow-none): a group name, or %NULL
+ * @key: a key
+ * @error: return location for a #GError
+ *
+ * Retrieves a comment above @key from @group_name.
+ * If @key is %NULL then @comment will be read from above
+ * @group_name. If both @key and @group_name are %NULL, then
+ * @comment will be read from above the first group in the file.
+ *
+ * Returns: a comment that should be freed with g_free()
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_get_double:
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ * @key: a key
+ * @error: return location for a #GError
+ *
+ * Returns the value associated with @key under @group_name as a
+ * double. If @group_name is %NULL, the start_group is used.
+ *
+ * If @key cannot be found then 0.0 is returned and @error is set to
+ * #G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the value associated
+ * with @key cannot be interpreted as a double then 0.0 is returned
+ * and @error is set to #G_KEY_FILE_ERROR_INVALID_VALUE.
+ *
+ * 0.0 if the key was not found or could not be parsed.
+ *
+ * Returns: the value associated with the key as a double, or
+ * Since: 2.12
+ */
+
+
+/**
+ * g_key_file_get_double_list:
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ * @key: a key
+ * @length: (out): the number of doubles returned
+ * @error: return location for a #GError
+ *
+ * Returns the values associated with @key under @group_name as
+ * doubles.
+ *
+ * If @key cannot be found then %NULL is returned and @error is set to
+ * #G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the values associated
+ * with @key cannot be interpreted as doubles then %NULL is returned
+ * and @error is set to #G_KEY_FILE_ERROR_INVALID_VALUE.
+ *
+ * the values associated with the key as a list of doubles, or %NULL if the
+ * key was not found or could not be parsed. The returned list of doubles
+ * should be freed with g_free() when no longer needed.
+ *
+ * Returns: (array length=length) (element-type gdouble) (transfer container):
+ * Since: 2.12
+ */
+
+
+/**
+ * g_key_file_get_groups:
+ * @key_file: a #GKeyFile
+ * @length: (out) (allow-none): return location for the number of returned groups, or %NULL
+ *
+ * Returns all groups in the key file loaded with @key_file.
+ * The array of returned groups will be %NULL-terminated, so
+ * @length may optionally be %NULL.
+ *
+ * Use g_strfreev() to free it.
+ *
+ * Returns: (array zero-terminated=1) (transfer full): a newly-allocated %NULL-terminated array of strings.
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_get_int64:
+ * @key_file: a non-%NULL #GKeyFile
+ * @group_name: a non-%NULL group name
+ * @key: a non-%NULL key
+ * @error: return location for a #GError
+ *
+ * Returns the value associated with @key under @group_name as a signed
+ * 64-bit integer. This is similar to g_key_file_get_integer() but can return
+ * 64-bit results without truncation.
+ *
+ * 0 if the key was not found or could not be parsed.
+ *
+ * Returns: the value associated with the key as a signed 64-bit integer, or
+ * Since: 2.26
+ */
+
+
+/**
+ * g_key_file_get_integer:
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ * @key: a key
+ * @error: return location for a #GError
+ *
+ * Returns the value associated with @key under @group_name as an
+ * integer.
+ *
+ * If @key cannot be found then 0 is returned and @error is set to
+ * #G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the value associated
+ * with @key cannot be interpreted as an integer then 0 is returned
+ * and @error is set to #G_KEY_FILE_ERROR_INVALID_VALUE.
+ *
+ * 0 if the key was not found or could not be parsed.
+ *
+ * Returns: the value associated with the key as an integer, or
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_get_integer_list:
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ * @key: a key
+ * @length: (out): the number of integers returned
+ * @error: return location for a #GError
+ *
+ * Returns the values associated with @key under @group_name as
+ * integers.
+ *
+ * If @key cannot be found then %NULL is returned and @error is set to
+ * #G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the values associated
+ * with @key cannot be interpreted as integers then %NULL is returned
+ * and @error is set to #G_KEY_FILE_ERROR_INVALID_VALUE.
+ *
+ * the values associated with the key as a list of integers, or %NULL if
+ * the key was not found or could not be parsed. The returned list of
+ * integers should be freed with g_free() when no longer needed.
+ *
+ * Returns: (array length=length) (element-type gint) (transfer container):
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_get_keys:
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ * @length: (out) (allow-none): return location for the number of keys returned, or %NULL
+ * @error: return location for a #GError, or %NULL
+ *
+ * Returns all keys for the group name @group_name.  The array of
+ * returned keys will be %NULL-terminated, so @length may
+ * optionally be %NULL. In the event that the @group_name cannot
+ * be found, %NULL is returned and @error is set to
+ * #G_KEY_FILE_ERROR_GROUP_NOT_FOUND.
+ *
+ * Use g_strfreev() to free it.
+ *
+ * Returns: (array zero-terminated=1) (transfer full): a newly-allocated %NULL-terminated array of strings.
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_get_locale_string:
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ * @key: a key
+ * @locale: (allow-none): a locale identifier or %NULL
+ * @error: return location for a #GError, or %NULL
+ *
+ * Returns the value associated with @key under @group_name
+ * translated in the given @locale if available.  If @locale is
+ * %NULL then the current locale is assumed.
+ *
+ * If @key cannot be found then %NULL is returned and @error is set
+ * to #G_KEY_FILE_ERROR_KEY_NOT_FOUND. If the value associated
+ * with @key cannot be interpreted or no suitable translation can
+ * be found then the untranslated value is returned.
+ *
+ * key cannot be found.
+ *
+ * Returns: a newly allocated string or %NULL if the specified
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_get_locale_string_list:
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ * @key: a key
+ * @locale: (allow-none): a locale identifier or %NULL
+ * @length: (out) (allow-none): return location for the number of returned strings or %NULL
+ * @error: return location for a #GError or %NULL
+ *
+ * Returns the values associated with @key under @group_name
+ * translated in the given @locale if available.  If @locale is
+ * %NULL then the current locale is assumed.
+ * If @key cannot be found then %NULL is returned and @error is set
+ * to #G_KEY_FILE_ERROR_KEY_NOT_FOUND. If the values associated
+ * with @key cannot be interpreted or no suitable translations
+ * can be found then the untranslated values are returned. The
+ * returned array is %NULL-terminated, so @length may optionally
+ * be %NULL.
+ *
+ * or %NULL if the key isn't found. The string array should be freed
+ * with g_strfreev().
+ *
+ * Returns: (array length=length zero-terminated=1) (element-type utf8) (transfer full): a newly allocated %NULL-terminated string array
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_get_start_group:
+ * @key_file: a #GKeyFile
+ *
+ * Returns the name of the start group of the file.
+ *
+ * Returns: The start group of the key file.
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_get_string:
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ * @key: a key
+ * @error: return location for a #GError, or %NULL
+ *
+ * Returns the string value associated with @key under @group_name.
+ * Unlike g_key_file_get_value(), this function handles escape sequences
+ * like \s.
+ *
+ * In the event the key cannot be found, %NULL is returned and
+ * @error is set to #G_KEY_FILE_ERROR_KEY_NOT_FOUND.  In the
+ * event that the @group_name cannot be found, %NULL is returned
+ * and @error is set to #G_KEY_FILE_ERROR_GROUP_NOT_FOUND.
+ *
+ * key cannot be found.
+ *
+ * Returns: a newly allocated string or %NULL if the specified
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_get_string_list:
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ * @key: a key
+ * @length: (out) (allow-none): return location for the number of returned strings, or %NULL
+ * @error: return location for a #GError, or %NULL
+ *
+ * Returns the values associated with @key under @group_name.
+ *
+ * In the event the key cannot be found, %NULL is returned and
+ * @error is set to #G_KEY_FILE_ERROR_KEY_NOT_FOUND.  In the
+ * event that the @group_name cannot be found, %NULL is returned
+ * and @error is set to #G_KEY_FILE_ERROR_GROUP_NOT_FOUND.
+ *
+ * a %NULL-terminated string array or %NULL if the specified
+ * key cannot be found. The array should be freed with g_strfreev().
+ *
+ * Returns: (array length=length zero-terminated=1) (element-type utf8) (transfer full):
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_get_uint64:
+ * @key_file: a non-%NULL #GKeyFile
+ * @group_name: a non-%NULL group name
+ * @key: a non-%NULL key
+ * @error: return location for a #GError
+ *
+ * Returns the value associated with @key under @group_name as an unsigned
+ * 64-bit integer. This is similar to g_key_file_get_integer() but can return
+ * large positive results without truncation.
+ *
+ * or 0 if the key was not found or could not be parsed.
+ *
+ * Returns: the value associated with the key as an unsigned 64-bit integer,
+ * Since: 2.26
+ */
+
+
+/**
+ * g_key_file_get_value:
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ * @key: a key
+ * @error: return location for a #GError, or %NULL
+ *
+ * Returns the raw value associated with @key under @group_name.
+ * Use g_key_file_get_string() to retrieve an unescaped UTF-8 string.
+ *
+ * In the event the key cannot be found, %NULL is returned and
+ * @error is set to #G_KEY_FILE_ERROR_KEY_NOT_FOUND.  In the
+ * event that the @group_name cannot be found, %NULL is returned
+ * and @error is set to #G_KEY_FILE_ERROR_GROUP_NOT_FOUND.
+ *
+ *
+ * key cannot be found.
+ *
+ * Returns: a newly allocated string or %NULL if the specified
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_has_group:
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ *
+ * Looks whether the key file has the group @group_name.
+ *
+ * otherwise.
+ *
+ * Returns: %TRUE if @group_name is a part of @key_file, %FALSE
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_has_key: (skip)
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ * @key: a key name
+ * @error: return location for a #GError
+ *
+ * Looks whether the key file has the key @key in the group
+ * @group_name.
+ *
+ * <note>This function does not follow the rules for #GError strictly;
+ * the return value both carries meaning and signals an error.  To use
+ * this function, you must pass a #GError pointer in @error, and check
+ * whether it is not %NULL to see if an error occurred.</note>
+ *
+ * Language bindings should use g_key_file_get_value() to test whether
+ * or not a key exists.
+ *
+ * otherwise.
+ *
+ * Returns: %TRUE if @key is a part of @group_name, %FALSE
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_load_from_data:
+ * @key_file: an empty #GKeyFile struct
+ * @data: key file loaded in memory
+ * @length: the length of @data in bytes (or -1 if data is nul-terminated)
+ * @flags: flags from #GKeyFileFlags
+ * @error: return location for a #GError, or %NULL
+ *
+ * Loads a key file from memory into an empty #GKeyFile structure.
+ * If the object cannot be created then %error is set to a #GKeyFileError.
+ *
+ * Returns: %TRUE if a key file could be loaded, %FALSE otherwise
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_load_from_data_dirs:
+ * @key_file: an empty #GKeyFile struct
+ * @file: (type filename): a relative path to a filename to open and parse
+ * @full_path: (out) (type filename) (allow-none): return location for a string containing the full path of the file, or %NULL
+ * @flags: flags from #GKeyFileFlags
+ * @error: return location for a #GError, or %NULL
+ *
+ * This function looks for a key file named @file in the paths
+ * returned from g_get_user_data_dir() and g_get_system_data_dirs(),
+ * loads the file into @key_file and returns the file's full path in
+ * @full_path.  If the file could not be loaded then an %error is
+ * set to either a #GFileError or #GKeyFileError.
+ *
+ * Returns: %TRUE if a key file could be loaded, %FALSE othewise
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_load_from_dirs:
+ * @key_file: an empty #GKeyFile struct
+ * @file: (type filename): a relative path to a filename to open and parse
+ * @search_dirs: (array zero-terminated=1) (element-type filename): %NULL-terminated array of directories to search
+ * @full_path: (out) (type filename) (allow-none): return location for a string containing the full path of the file, or %NULL
+ * @flags: flags from #GKeyFileFlags
+ * @error: return location for a #GError, or %NULL
+ *
+ * This function looks for a key file named @file in the paths
+ * specified in @search_dirs, loads the file into @key_file and
+ * returns the file's full path in @full_path.  If the file could not
+ * be loaded then an %error is set to either a #GFileError or
+ * #GKeyFileError.
+ *
+ * Returns: %TRUE if a key file could be loaded, %FALSE otherwise
+ * Since: 2.14
+ */
+
+
+/**
+ * g_key_file_load_from_file:
+ * @key_file: an empty #GKeyFile struct
+ * @file: (type filename): the path of a filename to load, in the GLib filename encoding
+ * @flags: flags from #GKeyFileFlags
+ * @error: return location for a #GError, or %NULL
+ *
+ * Loads a key file into an empty #GKeyFile structure.
+ * If the file could not be loaded then @error is set to
+ * either a #GFileError or #GKeyFileError.
+ *
+ * Returns: %TRUE if a key file could be loaded, %FALSE otherwise
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_new:
+ *
+ * Creates a new empty #GKeyFile object. Use
+ * g_key_file_load_from_file(), g_key_file_load_from_data(),
+ * g_key_file_load_from_dirs() or g_key_file_load_from_data_dirs() to
+ * read an existing key file.
+ *
+ * Returns: (transfer full): an empty #GKeyFile.
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_ref: (skip)
+ * @key_file: a #GKeyFile
+ *
+ * Increases the reference count of @key_file.
+ *
+ * Returns: the same @key_file.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_key_file_remove_comment:
+ * @key_file: a #GKeyFile
+ * @group_name: (allow-none): a group name, or %NULL
+ * @key: (allow-none): a key
+ * @error: return location for a #GError
+ *
+ * Removes a comment above @key from @group_name.
+ * If @key is %NULL then @comment will be removed above @group_name.
+ * If both @key and @group_name are %NULL, then @comment will
+ * be removed above the first group in the file.
+ *
+ * Returns: %TRUE if the comment was removed, %FALSE otherwise
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_remove_group:
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ * @error: return location for a #GError or %NULL
+ *
+ * Removes the specified group, @group_name,
+ * from the key file.
+ *
+ * Returns: %TRUE if the group was removed, %FALSE otherwise
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_remove_key:
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ * @key: a key name to remove
+ * @error: return location for a #GError or %NULL
+ *
+ * Removes @key in @group_name from the key file.
+ *
+ * Returns: %TRUE if the key was removed, %FALSE otherwise
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_set_boolean:
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ * @key: a key
+ * @value: %TRUE or %FALSE
+ *
+ * Associates a new boolean value with @key under @group_name.
+ * If @key cannot be found then it is created.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_set_boolean_list:
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ * @key: a key
+ * @list: (array length=length): an array of boolean values
+ * @length: length of @list
+ *
+ * Associates a list of boolean values with @key under @group_name.
+ * If @key cannot be found then it is created.
+ * If @group_name is %NULL, the start_group is used.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_set_comment:
+ * @key_file: a #GKeyFile
+ * @group_name: (allow-none): a group name, or %NULL
+ * @key: (allow-none): a key
+ * @comment: a comment
+ * @error: return location for a #GError
+ *
+ * Places a comment above @key from @group_name.
+ * If @key is %NULL then @comment will be written above @group_name.
+ * If both @key and @group_name  are %NULL, then @comment will be
+ * written above the first group in the file.
+ *
+ * Returns: %TRUE if the comment was written, %FALSE otherwise
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_set_double:
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ * @key: a key
+ * @value: an double value
+ *
+ * Associates a new double value with @key under @group_name.
+ * If @key cannot be found then it is created.
+ *
+ * Since: 2.12
+ */
+
+
+/**
+ * g_key_file_set_double_list:
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ * @key: a key
+ * @list: (array length=length): an array of double values
+ * @length: number of double values in @list
+ *
+ * Associates a list of double values with @key under
+ * @group_name.  If @key cannot be found then it is created.
+ *
+ * Since: 2.12
+ */
+
+
+/**
+ * g_key_file_set_int64:
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ * @key: a key
+ * @value: an integer value
+ *
+ * Associates a new integer value with @key under @group_name.
+ * If @key cannot be found then it is created.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_key_file_set_integer:
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ * @key: a key
+ * @value: an integer value
+ *
+ * Associates a new integer value with @key under @group_name.
+ * If @key cannot be found then it is created.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_set_integer_list:
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ * @key: a key
+ * @list: (array length=length): an array of integer values
+ * @length: number of integer values in @list
+ *
+ * Associates a list of integer values with @key under @group_name.
+ * If @key cannot be found then it is created.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_set_list_separator:
+ * @key_file: a #GKeyFile
+ * @separator: the separator
+ *
+ * Sets the character which is used to separate
+ * values in lists. Typically ';' or ',' are used
+ * as separators. The default list separator is ';'.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_set_locale_string:
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ * @key: a key
+ * @locale: a locale identifier
+ * @string: a string
+ *
+ * Associates a string value for @key and @locale under @group_name.
+ * If the translation for @key cannot be found then it is created.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_set_locale_string_list:
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ * @key: a key
+ * @locale: a locale identifier
+ * @list: (array length=length zero-terminated=1): a %NULL-terminated array of locale string values
+ * @length: the length of @list
+ *
+ * Associates a list of string values for @key and @locale under
+ * @group_name.  If the translation for @key cannot be found then
+ * it is created.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_set_string:
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ * @key: a key
+ * @string: a string
+ *
+ * Associates a new string value with @key under @group_name.
+ * If @key cannot be found then it is created.
+ * If @group_name cannot be found then it is created.
+ * Unlike g_key_file_set_value(), this function handles characters
+ * that need escaping, such as newlines.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_set_string_list:
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ * @key: a key
+ * @list: (array length=length zero-terminated=1) (element-type utf8): an array of string values
+ * @length: number of string values in @list
+ *
+ * Associates a list of string values for @key under @group_name.
+ * If @key cannot be found then it is created.
+ * If @group_name cannot be found then it is created.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_set_uint64:
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ * @key: a key
+ * @value: an integer value
+ *
+ * Associates a new integer value with @key under @group_name.
+ * If @key cannot be found then it is created.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_key_file_set_value:
+ * @key_file: a #GKeyFile
+ * @group_name: a group name
+ * @key: a key
+ * @value: a string
+ *
+ * Associates a new value with @key under @group_name.
+ *
+ * If @key cannot be found then it is created. If @group_name cannot
+ * be found then it is created. To set an UTF-8 string which may contain
+ * characters that need escaping (such as newlines or spaces), use
+ * g_key_file_set_string().
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_to_data:
+ * @key_file: a #GKeyFile
+ * @length: (out) (allow-none): return location for the length of the returned string, or %NULL
+ * @error: return location for a #GError, or %NULL
+ *
+ * This function outputs @key_file as a string.
+ *
+ * Note that this function never reports an error,
+ * so it is safe to pass %NULL as @error.
+ *
+ * the contents of the #GKeyFile
+ *
+ * Returns: a newly allocated string holding
+ * Since: 2.6
+ */
+
+
+/**
+ * g_key_file_unref:
+ * @key_file: a #GKeyFile
+ *
+ * Decreases the reference count of @key_file by 1. If the reference count
+ * reaches zero, frees the key file and all its allocated memory.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_list_alloc:
+ * @Returns: a pointer to the newly-allocated #GList element.
+ *
+ * Allocates space for one #GList element. It is called by
+ * g_list_append(), g_list_prepend(), g_list_insert() and
+ * g_list_insert_sorted() and so is rarely used on its own.
+ */
+
+
+/**
+ * g_list_append:
+ * @list: a pointer to a #GList
+ * @data: the data for the new element
+ *
+ * Adds a new element on to the end of the list.
+ *
+ * <note><para>
+ * The return value is the new start of the list, which
+ * may have changed, so make sure you store the new value.
+ * </para></note>
+ *
+ * <note><para>
+ * Note that g_list_append() has to traverse the entire list
+ * to find the end, which is inefficient when adding multiple
+ * elements. A common idiom to avoid the inefficiency is to prepend
+ * the elements and reverse the list when all elements have been added.
+ * </para></note>
+ *
+ * |[
+ * /&ast; Notice that these are initialized to the empty list. &ast;/
+ * GList *list = NULL, *number_list = NULL;
+ *
+ * /&ast; This is a list of strings. &ast;/
+ * list = g_list_append (list, "first");
+ * list = g_list_append (list, "second");
+ *
+ * /&ast; This is a list of integers. &ast;/
+ * number_list = g_list_append (number_list, GINT_TO_POINTER (27));
+ * number_list = g_list_append (number_list, GINT_TO_POINTER (14));
+ * ]|
+ *
+ * Returns: the new start of the #GList
+ */
+
+
+/**
+ * g_list_concat:
+ * @list1: a #GList
+ * @list2: the #GList to add to the end of the first #GList
+ *
+ * Adds the second #GList onto the end of the first #GList.
+ * Note that the elements of the second #GList are not copied.
+ * They are used directly.
+ *
+ * Returns: the start of the new #GList
+ */
+
+
+/**
+ * g_list_copy:
+ * @list: a #GList
+ *
+ * Copies a #GList.
+ *
+ * <note><para>
+ * Note that this is a "shallow" copy. If the list elements
+ * consist of pointers to data, the pointers are copied but
+ * the actual data is not.
+ * </para></note>
+ *
+ * Returns: a copy of @list
+ */
+
+
+/**
+ * g_list_delete_link:
+ * @list: a #GList
+ * @link_: node to delete from @list
+ *
+ * Removes the node link_ from the list and frees it.
+ * Compare this to g_list_remove_link() which removes the node
+ * without freeing it.
+ *
+ * Returns: the new head of @list
+ */
+
+
+/**
+ * g_list_find:
+ * @list: a #GList
+ * @data: the element data to find
+ *
+ * Finds the element in a #GList which
+ * contains the given data.
+ *
+ * or %NULL if it is not found
+ *
+ * Returns: the found #GList element,
+ */
+
+
+/**
+ * g_list_find_custom:
+ * @list: a #GList
+ * @data: user data passed to the function
+ * @func: the function to call for each element. It should return 0 when the desired element is found
+ *
+ * Finds an element in a #GList, using a supplied function to
+ * find the desired element. It iterates over the list, calling
+ * the given function which should return 0 when the desired
+ * element is found. The function takes two #gconstpointer arguments,
+ * the #GList element's data as the first argument and the
+ * given user data.
+ *
+ * Returns: the found #GList element, or %NULL if it is not found
+ */
+
+
+/**
+ * g_list_first:
+ * @list: a #GList
+ *
+ * Gets the first element in a #GList.
+ *
+ * or %NULL if the #GList has no elements
+ *
+ * Returns: the first element in the #GList,
+ */
+
+
+/**
+ * g_list_foreach:
+ * @list: a #GList
+ * @func: the function to call with each element's data
+ * @user_data: user data to pass to the function
+ *
+ * Calls a function for each element of a #GList.
+ */
+
+
+/**
+ * g_list_free:
+ * @list: a #GList
+ *
+ * Frees all of the memory used by a #GList.
+ * The freed elements are returned to the slice allocator.
+ *
+ * <note><para>
+ * If list elements contain dynamically-allocated memory,
+ * you should either use g_list_free_full() or free them manually
+ * first.
+ * </para></note>
+ */
+
+
+/**
+ * g_list_free1:
+ *
+ * Another name for g_list_free_1().
+ */
+
+
+/**
+ * g_list_free_1:
+ * @list: a #GList element
+ *
+ * Frees one #GList element.
+ * It is usually used after g_list_remove_link().
+ */
+
+
+/**
+ * g_list_free_full:
+ * @list: a pointer to a #GList
+ * @free_func: the function to be called to free each element's data
+ *
+ * Convenience method, which frees all the memory used by a #GList, and
+ * calls the specified destroy function on every element's data.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_list_index:
+ * @list: a #GList
+ * @data: the data to find
+ *
+ * Gets the position of the element containing
+ * the given data (starting from 0).
+ *
+ * or -1 if the data is not found
+ *
+ * Returns: the index of the element containing the data,
+ */
+
+
+/**
+ * g_list_insert:
+ * @list: a pointer to a #GList
+ * @data: the data for the new element
+ * @position: the position to insert the element. If this is negative, or is larger than the number of elements in the list, the new element is added on to the end of the list.
+ *
+ * Inserts a new element into the list at the given position.
+ *
+ * Returns: the new start of the #GList
+ */
+
+
+/**
+ * g_list_insert_before:
+ * @list: a pointer to a #GList
+ * @sibling: the list element before which the new element is inserted or %NULL to insert at the end of the list
+ * @data: the data for the new element
+ *
+ * Inserts a new element into the list before the given position.
+ *
+ * Returns: the new start of the #GList
+ */
+
+
+/**
+ * g_list_insert_sorted:
+ * @list: a pointer to a #GList
+ * @data: the data for the new element
+ * @func: the function to compare elements in the list. It should return a number > 0 if the first parameter comes after the second parameter in the sort order.
+ *
+ * Inserts a new element into the list, using the given comparison
+ * function to determine its position.
+ *
+ * Returns: the new start of the #GList
+ */
+
+
+/**
+ * g_list_insert_sorted_with_data:
+ * @list: a pointer to a #GList
+ * @data: the data for the new element
+ * @func: the function to compare elements in the list. It should return a number > 0 if the first parameter comes after the second parameter in the sort order.
+ * @user_data: user data to pass to comparison function.
+ *
+ * Inserts a new element into the list, using the given comparison
+ * function to determine its position.
+ *
+ * Returns: the new start of the #GList
+ * Since: 2.10
+ */
+
+
+/**
+ * g_list_last:
+ * @list: a #GList
+ *
+ * Gets the last element in a #GList.
+ *
+ * or %NULL if the #GList has no elements
+ *
+ * Returns: the last element in the #GList,
+ */
+
+
+/**
+ * g_list_length:
+ * @list: a #GList
+ *
+ * Gets the number of elements in a #GList.
+ *
+ * <note><para>
+ * This function iterates over the whole list to
+ * count its elements.
+ * </para></note>
+ *
+ * Returns: the number of elements in the #GList
+ */
+
+
+/**
+ * g_list_next:
+ * @list: an element in a #GList.
+ * @Returns: the next element, or %NULL if there are no more elements.
+ *
+ * A convenience macro to get the next element in a #GList.
+ */
+
+
+/**
+ * g_list_nth:
+ * @list: a #GList
+ * @n: the position of the element, counting from 0
+ *
+ * Gets the element at the given position in a #GList.
+ *
+ * the end of the #GList
+ *
+ * Returns: the element, or %NULL if the position is off
+ */
+
+
+/**
+ * g_list_nth_data:
+ * @list: a #GList
+ * @n: the position of the element
+ *
+ * Gets the data of the element at the given position.
+ *
+ * is off the end of the #GList
+ *
+ * Returns: the element's data, or %NULL if the position
+ */
+
+
+/**
+ * g_list_nth_prev:
+ * @list: a #GList
+ * @n: the position of the element, counting from 0
+ *
+ * Gets the element @n places before @list.
+ *
+ * off the end of the #GList
+ *
+ * Returns: the element, or %NULL if the position is
+ */
+
+
+/**
+ * g_list_position:
+ * @list: a #GList
+ * @llink: an element in the #GList
+ *
+ * Gets the position of the given element
+ * in the #GList (starting from 0).
+ *
+ * or -1 if the element is not found
+ *
+ * Returns: the position of the element in the #GList,
+ */
+
+
+/**
+ * g_list_prepend:
+ * @list: a pointer to a #GList
+ * @data: the data for the new element
+ *
+ * Adds a new element on to the start of the list.
+ *
+ * <note><para>
+ * The return value is the new start of the list, which
+ * may have changed, so make sure you store the new value.
+ * </para></note>
+ *
+ * |[
+ * /&ast; Notice that it is initialized to the empty list. &ast;/
+ * GList *list = NULL;
+ * list = g_list_prepend (list, "last");
+ * list = g_list_prepend (list, "first");
+ * ]|
+ *
+ * Returns: the new start of the #GList
+ */
+
+
+/**
+ * g_list_previous:
+ * @list: an element in a #GList.
+ * @Returns: the previous element, or %NULL if there are no previous elements.
+ *
+ * A convenience macro to get the previous element in a #GList.
+ */
+
+
+/**
+ * g_list_remove:
+ * @list: a #GList
+ * @data: the data of the element to remove
+ *
+ * Removes an element from a #GList.
+ * If two elements contain the same data, only the first is removed.
+ * If none of the elements contain the data, the #GList is unchanged.
+ *
+ * Returns: the new start of the #GList
+ */
+
+
+/**
+ * g_list_remove_all:
+ * @list: a #GList
+ * @data: data to remove
+ *
+ * Removes all list nodes with data equal to @data.
+ * Returns the new head of the list. Contrast with
+ * g_list_remove() which removes only the first node
+ * matching the given data.
+ *
+ * Returns: new head of @list
+ */
+
+
+/**
+ * g_list_remove_link:
+ * @list: a #GList
+ * @llink: an element in the #GList
+ *
+ * Removes an element from a #GList, without freeing the element.
+ * The removed element's prev and next links are set to %NULL, so
+ * that it becomes a self-contained list with one element.
+ *
+ * Returns: the new start of the #GList, without the element
+ */
+
+
+/**
+ * g_list_reverse:
+ * @list: a #GList
+ *
+ * Reverses a #GList.
+ * It simply switches the next and prev pointers of each element.
+ *
+ * Returns: the start of the reversed #GList
+ */
+
+
+/**
+ * g_list_sort:
+ * @list: a #GList
+ * @compare_func: the comparison function used to sort the #GList. This function is passed the data from 2 elements of the #GList and should return 0 if they are equal, a negative value if the first element comes before the second, or a positive value if the first element comes after the second.
+ *
+ * Sorts a #GList using the given comparison function. The algorithm
+ * used is a stable sort.
+ *
+ * Returns: the start of the sorted #GList
+ */
+
+
+/**
+ * g_list_sort_with_data:
+ * @list: a #GList
+ * @compare_func: comparison function
+ * @user_data: user data to pass to comparison function
+ *
+ * Like g_list_sort(), but the comparison function accepts
+ * a user data argument.
+ *
+ * Returns: the new head of @list
+ */
+
+
+/**
+ * g_listenv:
+ *
+ * Gets the names of all variables set in the environment.
+ *
+ * Programs that want to be portable to Windows should typically use
+ * this function and g_getenv() instead of using the environ array
+ * from the C library directly. On Windows, the strings in the environ
+ * array are in system codepage encoding, while in most of the typical
+ * use cases for environment variables in GLib-using programs you want
+ * the UTF-8 encoding that this function and g_getenv() provide.
+ *
+ * list of strings which must be freed with g_strfreev().
+ *
+ * Returns: (array zero-terminated=1) (transfer full): a %NULL-terminated
+ * Since: 2.8
+ */
+
+
+/**
+ * g_locale_from_utf8:
+ * @utf8string: a UTF-8 encoded string
+ * @len: the length of the string, or -1 if the string is nul-terminated<footnoteref linkend="nul-unsafe"/>.
+ * @bytes_read: location to store the number of bytes in the input string that were successfully converted, or %NULL. Even if the conversion was successful, this may be less than @len if there were partial characters at the end of the input. If the error #G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value stored will the byte offset after the last valid input sequence.
+ * @bytes_written: the number of bytes stored in the output buffer (not including the terminating nul).
+ * @error: location to store the error occurring, or %NULL to ignore errors. Any of the errors in #GConvertError may occur.
+ *
+ * Converts a string from UTF-8 to the encoding used for strings by
+ * the C runtime (usually the same as that used by the operating
+ * system) in the <link linkend="setlocale">current locale</link>. On
+ * Windows this means the system codepage.
+ *
+ * Returns: The converted string, or %NULL on an error.
+ */
+
+
+/**
+ * g_locale_to_utf8:
+ * @opsysstring: a string in the encoding of the current locale. On Windows this means the system codepage.
+ * @len: the length of the string, or -1 if the string is nul-terminated<footnoteref linkend="nul-unsafe"/>.
+ * @bytes_read: location to store the number of bytes in the input string that were successfully converted, or %NULL. Even if the conversion was successful, this may be less than @len if there were partial characters at the end of the input. If the error #G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value stored will the byte offset after the last valid input sequence.
+ * @bytes_written: the number of bytes stored in the output buffer (not including the terminating nul).
+ * @error: location to store the error occurring, or %NULL to ignore errors. Any of the errors in #GConvertError may occur.
+ *
+ * Converts a string which is in the encoding used for strings by
+ * the C runtime (usually the same as that used by the operating
+ * system) in the <link linkend="setlocale">current locale</link> into a
+ * UTF-8 string.
+ *
+ * Returns: The converted string, or %NULL on an error.
+ */
+
+
+/**
+ * g_log:
+ * @log_domain: the log domain, usually #G_LOG_DOMAIN
+ * @log_level: the log level, either from #GLogLevelFlags or a user-defined level
+ * @format: the message format. See the printf() documentation
+ * @...: the parameters to insert into the format string
+ *
+ * Logs an error or debugging message.
+ *
+ * If the log level has been set as fatal, the abort()
+ * function is called to terminate the program.
+ */
+
+
+/**
+ * g_log_default_handler:
+ * @log_domain: the log domain of the message
+ * @log_level: the level of the message
+ * @message: the message
+ * @unused_data: data passed from g_log() which is unused
+ *
+ * The default log handler set up by GLib; g_log_set_default_handler()
+ * allows to install an alternate default log handler.
+ * This is used if no log handler has been set for the particular log
+ * domain and log level combination. It outputs the message to stderr
+ * or stdout and if the log level is fatal it calls abort().
+ *
+ * The behavior of this log handler can be influenced by a number of
+ * environment variables:
+ * <variablelist>
+ * <varlistentry>
+ * <term><envar>G_MESSAGES_PREFIXED</envar></term>
+ * <listitem>
+ * A :-separated list of log levels for which messages should
+ * be prefixed by the program name and PID of the aplication.
+ * </listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term><envar>G_MESSAGES_DEBUG</envar></term>
+ * <listitem>
+ * A space-separated list of log domains for which debug and
+ * informational messages are printed. By default these
+ * messages are not printed.
+ * </listitem>
+ * </varlistentry>
+ * </variablelist>
+ *
+ * stderr is used for levels %G_LOG_LEVEL_ERROR, %G_LOG_LEVEL_CRITICAL,
+ * %G_LOG_LEVEL_WARNING and %G_LOG_LEVEL_MESSAGE. stdout is used for
+ * the rest.
+ */
+
+
+/**
+ * g_log_remove_handler:
+ * @log_domain: the log domain
+ * @handler_id: the id of the handler, which was returned in g_log_set_handler()
+ *
+ * Removes the log handler.
+ */
+
+
+/**
+ * g_log_set_always_fatal:
+ * @fatal_mask: the mask containing bits set for each level of error which is to be fatal
+ *
+ * Sets the message levels which are always fatal, in any log domain.
+ * When a message with any of these levels is logged the program terminates.
+ * You can only set the levels defined by GLib to be fatal.
+ * %G_LOG_LEVEL_ERROR is always fatal.
+ *
+ * You can also make some message levels fatal at runtime by setting
+ * the <envar>G_DEBUG</envar> environment variable (see
+ * <ulink url="glib-running.html">Running GLib Applications</ulink>).
+ *
+ * Returns: the old fatal mask
+ */
+
+
+/**
+ * g_log_set_default_handler:
+ * @log_func: the log handler function
+ * @user_data: data passed to the log handler
+ *
+ * Installs a default log handler which is used if no
+ * log handler has been set for the particular log domain
+ * and log level combination. By default, GLib uses
+ * g_log_default_handler() as default log handler.
+ *
+ * Returns: the previous default log handler
+ * Since: 2.6
+ */
+
+
+/**
+ * g_log_set_fatal_mask:
+ * @log_domain: the log domain
+ * @fatal_mask: the new fatal mask
+ *
+ * Sets the log levels which are fatal in the given domain.
+ * %G_LOG_LEVEL_ERROR is always fatal.
+ *
+ * Returns: the old fatal mask for the log domain
+ */
+
+
+/**
+ * g_log_set_handler:
+ * @log_domain: (allow-none): the log domain, or %NULL for the default "" application domain
+ * @log_levels: the log levels to apply the log handler for. To handle fatal and recursive messages as well, combine the log levels with the #G_LOG_FLAG_FATAL and #G_LOG_FLAG_RECURSION bit flags.
+ * @log_func: the log handler function
+ * @user_data: data passed to the log handler
+ *
+ * Sets the log handler for a domain and a set of log levels.
+ * To handle fatal and recursive messages the @log_levels parameter
+ * must be combined with the #G_LOG_FLAG_FATAL and #G_LOG_FLAG_RECURSION
+ * bit flags.
+ *
+ * Note that since the #G_LOG_LEVEL_ERROR log level is always fatal, if
+ * you want to set a handler for this log level you must combine it with
+ * #G_LOG_FLAG_FATAL.
+ *
+ * <example>
+ * <title>Adding a log handler for all warning messages in the default
+ * (application) domain</title>
+ * <programlisting>
+ * g_log_set_handler (NULL, G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL
+ * | G_LOG_FLAG_RECURSION, my_log_handler, NULL);
+ * </programlisting>
+ * </example>
+ *
+ * <example>
+ * <title>Adding a log handler for all critical messages from GTK+</title>
+ * <programlisting>
+ * g_log_set_handler ("Gtk", G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL
+ * | G_LOG_FLAG_RECURSION, my_log_handler, NULL);
+ * </programlisting>
+ * </example>
+ *
+ * <example>
+ * <title>Adding a log handler for <emphasis>all</emphasis> messages from
+ * GLib</title>
+ * <programlisting>
+ * g_log_set_handler ("GLib", G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL
+ * | G_LOG_FLAG_RECURSION, my_log_handler, NULL);
+ * </programlisting>
+ * </example>
+ *
+ * Returns: the id of the new handler
+ */
+
+
+/**
+ * g_logv:
+ * @log_domain: the log domain
+ * @log_level: the log level
+ * @format: the message format. See the printf() documentation
+ * @args: the parameters to insert into the format string
+ *
+ * Logs an error or debugging message.
+ *
+ * If the log level has been set as fatal, the abort()
+ * function is called to terminate the program.
+ */
+
+
+/**
+ * g_lstat:
+ * @filename: a pathname in the GLib file name encoding (UTF-8 on Windows)
+ * @buf: a pointer to a <structname>stat</structname> struct, which will be filled with the file information
+ *
+ * A wrapper for the POSIX lstat() function. The lstat() function is
+ * like stat() except that in the case of symbolic links, it returns
+ * information about the symbolic link itself and not the file that it
+ * refers to. If the system does not support symbolic links g_lstat()
+ * is identical to g_stat().
+ *
+ * See your C library manual for more details about lstat().
+ *
+ * occurred
+ *
+ * Returns: 0 if the information was successfully retrieved, -1 if an error
+ * Since: 2.6
+ */
+
+
+/**
+ * g_main_context_acquire:
+ * @context: a #GMainContext
+ *
+ * Tries to become the owner of the specified context.
+ * If some other thread is the owner of the context,
+ * returns %FALSE immediately. Ownership is properly
+ * recursive: the owner can require ownership again
+ * and will release ownership when g_main_context_release()
+ * is called as many times as g_main_context_acquire().
+ *
+ * You must be the owner of a context before you
+ * can call g_main_context_prepare(), g_main_context_query(),
+ * g_main_context_check(), g_main_context_dispatch().
+ *
+ * this thread is now the owner of @context.
+ *
+ * Returns: %TRUE if the operation succeeded, and
+ */
+
+
+/**
+ * g_main_context_add_poll:
+ * @context: (allow-none): a #GMainContext (or %NULL for the default context)
+ * @fd: a #GPollFD structure holding information about a file descriptor to watch.
+ * @priority: the priority for this file descriptor which should be the same as the priority used for g_source_attach() to ensure that the file descriptor is polled whenever the results may be needed.
+ *
+ * Adds a file descriptor to the set of file descriptors polled for
+ * this context. This will very seldom be used directly. Instead
+ * a typical event source will use g_source_add_poll() instead.
+ */
+
+
+/**
+ * g_main_context_check:
+ * @context: a #GMainContext
+ * @max_priority: the maximum numerical priority of sources to check
+ * @fds: (array length=n_fds): array of #GPollFD's that was passed to the last call to g_main_context_query()
+ * @n_fds: return value of g_main_context_query()
+ *
+ * Passes the results of polling back to the main loop.
+ *
+ * Returns: %TRUE if some sources are ready to be dispatched.
+ */
+
+
+/**
+ * g_main_context_default:
+ *
+ * Returns the global default main context. This is the main context
+ * used for main loop functions when a main loop is not explicitly
+ * specified, and corresponds to the "main" main loop. See also
+ * g_main_context_get_thread_default().
+ *
+ * Returns: (transfer none): the global default main context.
+ */
+
+
+/**
+ * g_main_context_dispatch:
+ * @context: a #GMainContext
+ *
+ * Dispatches all pending sources.
+ */
+
+
+/**
+ * g_main_context_find_source_by_funcs_user_data:
+ * @context: (allow-none): a #GMainContext (if %NULL, the default context will be used).
+ * @funcs: the @source_funcs passed to g_source_new().
+ * @user_data: the user data from the callback.
+ *
+ * Finds a source with the given source functions and user data.  If
+ * multiple sources exist with the same source function and user data,
+ * the first one found will be returned.
+ *
+ * Returns: (transfer none): the source, if one was found, otherwise %NULL
+ */
+
+
+/**
+ * g_main_context_find_source_by_id:
+ * @context: (allow-none): a #GMainContext (if %NULL, the default context will be used)
+ * @source_id: the source ID, as returned by g_source_get_id().
+ *
+ * Finds a #GSource given a pair of context and ID.
+ *
+ * Returns: (transfer none): the #GSource if found, otherwise, %NULL
+ */
+
+
+/**
+ * g_main_context_find_source_by_user_data:
+ * @context: a #GMainContext
+ * @user_data: the user_data for the callback.
+ *
+ * Finds a source with the given user data for the callback.  If
+ * multiple sources exist with the same user data, the first
+ * one found will be returned.
+ *
+ * Returns: (transfer none): the source, if one was found, otherwise %NULL
+ */
+
+
+/**
+ * g_main_context_get_poll_func:
+ * @context: a #GMainContext
+ *
+ * Gets the poll function set by g_main_context_set_poll_func().
+ *
+ * Returns: the poll function
+ */
+
+
+/**
+ * g_main_context_get_thread_default:
+ *
+ * Gets the thread-default #GMainContext for this thread. Asynchronous
+ * operations that want to be able to be run in contexts other than
+ * the default one should call this method or
+ * g_main_context_ref_thread_default() to get a #GMainContext to add
+ * their #GSource<!-- -->s to. (Note that even in single-threaded
+ * programs applications may sometimes want to temporarily push a
+ * non-default context, so it is not safe to assume that this will
+ * always return %NULL if you are running in the default thread.)
+ *
+ * If you need to hold a reference on the context, use
+ * g_main_context_ref_thread_default() instead.
+ *
+ * %NULL if the thread-default context is the global default context.
+ *
+ * Returns: (transfer none): the thread-default #GMainContext, or
+ * Since: 2.22
+ */
+
+
+/**
+ * g_main_context_invoke:
+ * @context: (allow-none): a #GMainContext, or %NULL
+ * @function: function to call
+ * @data: data to pass to @function
+ *
+ * Invokes a function in such a way that @context is owned during the
+ * invocation of @function.
+ *
+ * If @context is %NULL then the global default main context â€” as
+ * returned by g_main_context_default() â€” is used.
+ *
+ * If @context is owned by the current thread, @function is called
+ * directly.  Otherwise, if @context is the thread-default main context
+ * of the current thread and g_main_context_acquire() succeeds, then
+ * @function is called and g_main_context_release() is called
+ * afterwards.
+ *
+ * In any other case, an idle source is created to call @function and
+ * that source is attached to @context (presumably to be run in another
+ * thread).  The idle source is attached with #G_PRIORITY_DEFAULT
+ * priority.  If you want a different priority, use
+ * g_main_context_invoke_full().
+ *
+ * Note that, as with normal idle functions, @function should probably
+ * return %FALSE.  If it returns %TRUE, it will be continuously run in a
+ * loop (and may prevent this call from returning).
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_main_context_invoke_full:
+ * @context: (allow-none): a #GMainContext, or %NULL
+ * @priority: the priority at which to run @function
+ * @function: function to call
+ * @data: data to pass to @function
+ * @notify: (allow-none): a function to call when @data is no longer in use, or %NULL.
+ *
+ * Invokes a function in such a way that @context is owned during the
+ * invocation of @function.
+ *
+ * This function is the same as g_main_context_invoke() except that it
+ * lets you specify the priority incase @function ends up being
+ * scheduled as an idle and also lets you give a #GDestroyNotify for @data.
+ *
+ * @notify should not assume that it is called from any particular
+ * thread or with any particular context acquired.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_main_context_is_owner:
+ * @context: a #GMainContext
+ *
+ * Determines whether this thread holds the (recursive)
+ * ownership of this #GMainContext. This is useful to
+ * know before waiting on another thread that may be
+ * blocking to get ownership of @context.
+ *
+ * Returns: %TRUE if current thread is owner of @context.
+ * Since: 2.10
+ */
+
+
+/**
+ * g_main_context_iteration:
+ * @context: (allow-none): a #GMainContext (if %NULL, the default context will be used)
+ * @may_block: whether the call may block.
+ *
+ * Runs a single iteration for the given main loop. This involves
+ * checking to see if any event sources are ready to be processed,
+ * then if no events sources are ready and @may_block is %TRUE, waiting
+ * for a source to become ready, then dispatching the highest priority
+ * events sources that are ready. Otherwise, if @may_block is %FALSE
+ * sources are not waited to become ready, only those highest priority
+ * events sources will be dispatched (if any), that are ready at this
+ * given moment without further waiting.
+ *
+ * Note that even when @may_block is %TRUE, it is still possible for
+ * g_main_context_iteration() to return %FALSE, since the the wait may
+ * be interrupted for other reasons than an event source becoming ready.
+ *
+ * Returns: %TRUE if events were dispatched.
+ */
+
+
+/**
+ * g_main_context_new:
+ *
+ * Creates a new #GMainContext structure.
+ *
+ * Returns: the new #GMainContext
+ */
+
+
+/**
+ * g_main_context_pending:
+ * @context: (allow-none): a #GMainContext (if %NULL, the default context will be used)
+ *
+ * Checks if any sources have pending events for the given context.
+ *
+ * Returns: %TRUE if events are pending.
+ */
+
+
+/**
+ * g_main_context_pop_thread_default:
+ * @context: (allow-none): a #GMainContext object, or %NULL
+ *
+ * Pops @context off the thread-default context stack (verifying that
+ * it was on the top of the stack).
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_main_context_prepare:
+ * @context: a #GMainContext
+ * @priority: location to store priority of highest priority source already ready.
+ *
+ * Prepares to poll sources within a main loop. The resulting information
+ * for polling is determined by calling g_main_context_query ().
+ *
+ * prior to polling.
+ *
+ * Returns: %TRUE if some source is ready to be dispatched
+ */
+
+
+/**
+ * g_main_context_push_thread_default:
+ * @context: (allow-none): a #GMainContext, or %NULL for the global default context
+ *
+ * Acquires @context and sets it as the thread-default context for the
+ * current thread. This will cause certain asynchronous operations
+ * (such as most <link linkend="gio">gio</link>-based I/O) which are
+ * started in this thread to run under @context and deliver their
+ * results to its main loop, rather than running under the global
+ * default context in the main thread. Note that calling this function
+ * changes the context returned by
+ * g_main_context_get_thread_default(), <emphasis>not</emphasis> the
+ * one returned by g_main_context_default(), so it does not affect the
+ * context used by functions like g_idle_add().
+ *
+ * Normally you would call this function shortly after creating a new
+ * thread, passing it a #GMainContext which will be run by a
+ * #GMainLoop in that thread, to set a new default context for all
+ * async operations in that thread. (In this case, you don't need to
+ * ever call g_main_context_pop_thread_default().) In some cases
+ * however, you may want to schedule a single operation in a
+ * non-default context, or temporarily use a non-default context in
+ * the main thread. In that case, you can wrap the call to the
+ * asynchronous operation inside a
+ * g_main_context_push_thread_default() /
+ * g_main_context_pop_thread_default() pair, but it is up to you to
+ * ensure that no other asynchronous operations accidentally get
+ * started while the non-default context is active.
+ *
+ * Beware that libraries that predate this function may not correctly
+ * handle being used from a thread with a thread-default context. Eg,
+ * see g_file_supports_thread_contexts().
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_main_context_query:
+ * @context: a #GMainContext
+ * @max_priority: maximum priority source to check
+ * @timeout_: (out): location to store timeout to be used in polling
+ * @fds: (out caller-allocates) (array length=n_fds): location to store #GPollFD records that need to be polled.
+ * @n_fds: length of @fds.
+ *
+ * Determines information necessary to poll this main loop.
+ *
+ * or, if more than @n_fds records need to be stored, the number
+ * of records that need to be stored.
+ *
+ * Returns: the number of records actually stored in @fds,
+ */
+
+
+/**
+ * g_main_context_ref:
+ * @context: a #GMainContext
+ *
+ * Increases the reference count on a #GMainContext object by one.
+ *
+ * Returns: the @context that was passed in (since 2.6)
+ */
+
+
+/**
+ * g_main_context_ref_thread_default:
+ *
+ * Gets the thread-default #GMainContext for this thread, as with
+ * g_main_context_get_thread_default(), but also adds a reference to
+ * it with g_main_context_ref(). In addition, unlike
+ * g_main_context_get_thread_default(), if the thread-default context
+ * is the global default context, this will return that #GMainContext
+ * (with a ref added to it) rather than returning %NULL.
+ *
+ * with g_main_context_unref() when you are done with it.
+ *
+ * Returns: (transfer full): the thread-default #GMainContext. Unref
+ * Since: 2.32
+ */
+
+
+/**
+ * g_main_context_release:
+ * @context: a #GMainContext
+ *
+ * Releases ownership of a context previously acquired by this thread
+ * with g_main_context_acquire(). If the context was acquired multiple
+ * times, the ownership will be released only when g_main_context_release()
+ * is called as many times as it was acquired.
+ */
+
+
+/**
+ * g_main_context_remove_poll:
+ * @fd: a #GPollFD descriptor previously added with g_main_context_add_poll()
+ *
+ * Removes file descriptor from the set of file descriptors to be
+ * polled for a particular context.
+ */
+
+
+/**
+ * g_main_context_set_poll_func:
+ * @context: a #GMainContext
+ * @func: the function to call to poll all file descriptors
+ *
+ * Sets the function to use to handle polling of file descriptors. It
+ * will be used instead of the poll() system call
+ * (or GLib's replacement function, which is used where
+ * poll() isn't available).
+ *
+ * This function could possibly be used to integrate the GLib event
+ * loop with an external event loop.
+ */
+
+
+/**
+ * g_main_context_unref:
+ * @context: a #GMainContext
+ *
+ * Decreases the reference count on a #GMainContext object by one. If
+ * the result is zero, free the context and free all associated memory.
+ */
+
+
+/**
+ * g_main_context_wait:
+ * @context: a #GMainContext
+ * @cond: a condition variable
+ * @mutex: a mutex, currently held
+ *
+ * Tries to become the owner of the specified context,
+ * as with g_main_context_acquire(). But if another thread
+ * is the owner, atomically drop @mutex and wait on @cond until
+ * that owner releases ownership or until @cond is signaled, then
+ * try again (once) to become the owner.
+ *
+ * this thread is now the owner of @context.
+ *
+ * Returns: %TRUE if the operation succeeded, and
+ */
+
+
+/**
+ * g_main_context_wakeup:
+ * @context: a #GMainContext
+ *
+ * If @context is currently waiting in a poll(), interrupt
+ * the poll(), and continue the iteration process.
+ */
+
+
+/**
+ * g_main_current_source:
+ *
+ * Returns the currently firing source for this thread.
+ *
+ * Returns: (transfer none): The currently firing source or %NULL.
+ * Since: 2.12
+ */
+
+
+/**
+ * g_main_depth:
+ *
+ * Returns the depth of the stack of calls to
+ * g_main_context_dispatch() on any #GMainContext in the current thread.
+ * That is, when called from the toplevel, it gives 0. When
+ * called from within a callback from g_main_context_iteration()
+ * (or g_main_loop_run(), etc.) it returns 1. When called from within
+ * a callback to a recursive call to g_main_context_iteration(),
+ * it returns 2. And so forth.
+ *
+ * This function is useful in a situation like the following:
+ * Imagine an extremely simple "garbage collected" system.
+ *
+ * |[
+ * static GList *free_list;
+ *
+ * gpointer
+ * allocate_memory (gsize size)
+ * {
+ * gpointer result = g_malloc (size);
+ * free_list = g_list_prepend (free_list, result);
+ * return result;
+ * }
+ *
+ * void
+ * free_allocated_memory (void)
+ * {
+ * GList *l;
+ * for (l = free_list; l; l = l->next);
+ * g_free (l->data);
+ * g_list_free (free_list);
+ * free_list = NULL;
+ * }
+ *
+ * [...]
+ *
+ * while (TRUE);
+ * {
+ * g_main_context_iteration (NULL, TRUE);
+ * free_allocated_memory();
+ * }
+ * ]|
+ *
+ * This works from an application, however, if you want to do the same
+ * thing from a library, it gets more difficult, since you no longer
+ * control the main loop. You might think you can simply use an idle
+ * function to make the call to free_allocated_memory(), but that
+ * doesn't work, since the idle function could be called from a
+ * recursive callback. This can be fixed by using g_main_depth()
+ *
+ * |[
+ * gpointer
+ * allocate_memory (gsize size)
+ * {
+ * FreeListBlock *block = g_new (FreeListBlock, 1);
+ * block->mem = g_malloc (size);
+ * block->depth = g_main_depth ();
+ * free_list = g_list_prepend (free_list, block);
+ * return block->mem;
+ * }
+ *
+ * void
+ * free_allocated_memory (void)
+ * {
+ * GList *l;
+ *
+ * int depth = g_main_depth ();
+ * for (l = free_list; l; );
+ * {
+ * GList *next = l->next;
+ * FreeListBlock *block = l->data;
+ * if (block->depth > depth)
+ * {
+ * g_free (block->mem);
+ * g_free (block);
+ * free_list = g_list_delete_link (free_list, l);
+ * }
+ *
+ * l = next;
+ * }
+ * }
+ * ]|
+ *
+ * There is a temptation to use g_main_depth() to solve
+ * problems with reentrancy. For instance, while waiting for data
+ * to be received from the network in response to a menu item,
+ * the menu item might be selected again. It might seem that
+ * one could make the menu item's callback return immediately
+ * and do nothing if g_main_depth() returns a value greater than 1.
+ * However, this should be avoided since the user then sees selecting
+ * the menu item do nothing. Furthermore, you'll find yourself adding
+ * these checks all over your code, since there are doubtless many,
+ * many things that the user could do. Instead, you can use the
+ * following techniques:
+ *
+ * <orderedlist>
+ * <listitem>
+ * <para>
+ * Use gtk_widget_set_sensitive() or modal dialogs to prevent
+ * the user from interacting with elements while the main
+ * loop is recursing.
+ * </para>
+ * </listitem>
+ * <listitem>
+ * <para>
+ * Avoid main loop recursion in situations where you can't handle
+ * arbitrary  callbacks. Instead, structure your code so that you
+ * simply return to the main loop and then get called again when
+ * there is more work to do.
+ * </para>
+ * </listitem>
+ * </orderedlist>
+ *
+ * Returns: The main loop recursion level in the current thread
+ */
+
+
+/**
+ * g_main_destroy:
+ * @loop: a #GMainLoop
+ *
+ * Frees the memory allocated for the #GMainLoop.
+ *
+ * Deprecated: 2.2: Use g_main_loop_unref() instead
+ */
+
+
+/**
+ * g_main_is_running:
+ * @loop: a #GMainLoop
+ *
+ * Checks if the main loop is running.
+ *
+ * Returns: %TRUE if the main loop is running
+ * Deprecated: 2.2: Use g_main_loop_is_running() instead
+ */
+
+
+/**
+ * g_main_iteration:
+ * @may_block: set to %TRUE if it should block (i.e. wait) until an event source becomes ready. It will return after an event source has been processed. If set to %FALSE it will return immediately if no event source is ready to be processed.
+ *
+ * Runs a single iteration for the default #GMainContext.
+ *
+ * Returns: %TRUE if more events are pending.
+ * Deprecated: 2.2: Use g_main_context_iteration() instead.
+ */
+
+
+/**
+ * g_main_loop_get_context:
+ * @loop: a #GMainLoop.
+ *
+ * Returns the #GMainContext of @loop.
+ *
+ * Returns: (transfer none): the #GMainContext of @loop
+ */
+
+
+/**
+ * g_main_loop_is_running:
+ * @loop: a #GMainLoop.
+ *
+ * Checks to see if the main loop is currently being run via g_main_loop_run().
+ *
+ * Returns: %TRUE if the mainloop is currently being run.
+ */
+
+
+/**
+ * g_main_loop_new:
+ * @context: (allow-none): a #GMainContext  (if %NULL, the default context will be used).
+ * @is_running: set to %TRUE to indicate that the loop is running. This is not very important since calling g_main_loop_run() will set this to %TRUE anyway.
+ *
+ * Creates a new #GMainLoop structure.
+ *
+ * Returns: a new #GMainLoop.
+ */
+
+
+/**
+ * g_main_loop_quit:
+ * @loop: a #GMainLoop
+ *
+ * Stops a #GMainLoop from running. Any calls to g_main_loop_run()
+ * for the loop will return.
+ *
+ * Note that sources that have already been dispatched when
+ * g_main_loop_quit() is called will still be executed.
+ */
+
+
+/**
+ * g_main_loop_ref:
+ * @loop: a #GMainLoop
+ *
+ * Increases the reference count on a #GMainLoop object by one.
+ *
+ * Returns: @loop
+ */
+
+
+/**
+ * g_main_loop_run:
+ * @loop: a #GMainLoop
+ *
+ * Runs a main loop until g_main_loop_quit() is called on the loop.
+ * If this is called for the thread of the loop's #GMainContext,
+ * it will process events from the loop, otherwise it will
+ * simply wait.
+ */
+
+
+/**
+ * g_main_loop_unref:
+ * @loop: a #GMainLoop
+ *
+ * Decreases the reference count on a #GMainLoop object by one. If
+ * the result is zero, free the loop and free all associated memory.
+ */
+
+
+/**
+ * g_main_new:
+ * @is_running: set to %TRUE to indicate that the loop is running. This is not very important since calling g_main_run() will set this to %TRUE anyway.
+ *
+ * Creates a new #GMainLoop for th default main context.
+ *
+ * Returns: a new #GMainLoop
+ * Deprecated: 2.2: Use g_main_loop_new() instead
+ */
+
+
+/**
+ * g_main_pending:
+ *
+ * Checks if any events are pending for the default #GMainContext
+ * (i.e. ready to be processed).
+ *
+ *
+ * Deprected: 2.2: Use g_main_context_pending() instead.
+ *
+ * Returns: %TRUE if any events are pending.
+ */
+
+
+/**
+ * g_main_quit:
+ * @loop: a #GMainLoop
+ *
+ * Stops the #GMainLoop.
+ * If g_main_run() was called to run the #GMainLoop, it will now return.
+ *
+ * Deprecated: 2.2: Use g_main_loop_quit() instead
+ */
+
+
+/**
+ * g_main_run:
+ * @loop: a #GMainLoop
+ *
+ * Runs a main loop until it stops running.
+ *
+ * Deprecated: 2.2: Use g_main_loop_run() instead
+ */
+
+
+/**
+ * g_main_set_poll_func:
+ * @func: the function to call to poll all file descriptors
+ *
+ * Sets the function to use for the handle polling of file descriptors
+ * for the default main context.
+ *
+ * Deprecated: 2.2: Use g_main_context_set_poll_func() again
+ */
+
+
+/**
+ * g_malloc:
+ * @n_bytes: the number of bytes to allocate
+ *
+ * Allocates @n_bytes bytes of memory.
+ * If @n_bytes is 0 it returns %NULL.
+ *
+ * Returns: a pointer to the allocated memory
+ */
+
+
+/**
+ * g_malloc0:
+ * @n_bytes: the number of bytes to allocate
+ *
+ * Allocates @n_bytes bytes of memory, initialized to 0's.
+ * If @n_bytes is 0 it returns %NULL.
+ *
+ * Returns: a pointer to the allocated memory
+ */
+
+
+/**
+ * g_malloc0_n:
+ * @n_blocks: the number of blocks to allocate
+ * @n_block_bytes: the size of each block in bytes
+ *
+ * This function is similar to g_malloc0(), allocating (@n_blocks * @n_block_bytes) bytes,
+ * but care is taken to detect possible overflow during multiplication.
+ *
+ * Since: 2.24
+ * Returns: a pointer to the allocated memory
+ */
+
+
+/**
+ * g_malloc_n:
+ * @n_blocks: the number of blocks to allocate
+ * @n_block_bytes: the size of each block in bytes
+ *
+ * This function is similar to g_malloc(), allocating (@n_blocks * @n_block_bytes) bytes,
+ * but care is taken to detect possible overflow during multiplication.
+ *
+ * Since: 2.24
+ * Returns: a pointer to the allocated memory
+ */
+
+
+/**
+ * g_mapped_file_free:
+ * @file: a #GMappedFile
+ *
+ * This call existed before #GMappedFile had refcounting and is currently
+ * exactly the same as g_mapped_file_unref().
+ *
+ * Deprecated:2.22: Use g_mapped_file_unref() instead.
+ *
+ * Since: 2.8
+ */
+
+
+/**
+ * g_mapped_file_get_contents:
+ * @file: a #GMappedFile
+ *
+ * Returns the contents of a #GMappedFile.
+ *
+ * Note that the contents may not be zero-terminated,
+ * even if the #GMappedFile is backed by a text file.
+ *
+ * If the file is empty then %NULL is returned.
+ *
+ * Returns: the contents of @file, or %NULL.
+ * Since: 2.8
+ */
+
+
+/**
+ * g_mapped_file_get_length:
+ * @file: a #GMappedFile
+ *
+ * Returns the length of the contents of a #GMappedFile.
+ *
+ * Returns: the length of the contents of @file.
+ * Since: 2.8
+ */
+
+
+/**
+ * g_mapped_file_new:
+ * @filename: The path of the file to load, in the GLib filename encoding
+ * @writable: whether the mapping should be writable
+ * @error: return location for a #GError, or %NULL
+ *
+ * Maps a file into memory. On UNIX, this is using the mmap() function.
+ *
+ * If @writable is %TRUE, the mapped buffer may be modified, otherwise
+ * it is an error to modify the mapped buffer. Modifications to the buffer
+ * are not visible to other processes mapping the same file, and are not
+ * written back to the file.
+ *
+ * Note that modifications of the underlying file might affect the contents
+ * of the #GMappedFile. Therefore, mapping should only be used if the file
+ * will not be modified, or if all modifications of the file are done
+ * atomically (e.g. using g_file_set_contents()).
+ *
+ * If @filename is the name of an empty, regular file, the function
+ * will successfully return an empty #GMappedFile. In other cases of
+ * size 0 (e.g. device files such as /dev/null), @error will be set
+ * to the #GFileError value #G_FILE_ERROR_INVAL.
+ *
+ * with g_mapped_file_unref(), or %NULL if the mapping failed.
+ *
+ * Returns: a newly allocated #GMappedFile which must be unref'd
+ * Since: 2.8
+ */
+
+
+/**
+ * g_mapped_file_new_from_fd:
+ * @fd: The file descriptor of the file to load
+ * @writable: whether the mapping should be writable
+ * @error: return location for a #GError, or %NULL
+ *
+ * Maps a file into memory. On UNIX, this is using the mmap() function.
+ *
+ * If @writable is %TRUE, the mapped buffer may be modified, otherwise
+ * it is an error to modify the mapped buffer. Modifications to the buffer
+ * are not visible to other processes mapping the same file, and are not
+ * written back to the file.
+ *
+ * Note that modifications of the underlying file might affect the contents
+ * of the #GMappedFile. Therefore, mapping should only be used if the file
+ * will not be modified, or if all modifications of the file are done
+ * atomically (e.g. using g_file_set_contents()).
+ *
+ * with g_mapped_file_unref(), or %NULL if the mapping failed.
+ *
+ * Returns: a newly allocated #GMappedFile which must be unref'd
+ * Since: 2.32
+ */
+
+
+/**
+ * g_mapped_file_ref:
+ * @file: a #GMappedFile
+ *
+ * Increments the reference count of @file by one.  It is safe to call
+ * this function from any thread.
+ *
+ * Returns: the passed in #GMappedFile.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_mapped_file_unref:
+ * @file: a #GMappedFile
+ *
+ * Decrements the reference count of @file by one.  If the reference count
+ * drops to 0, unmaps the buffer of @file and frees it.
+ *
+ * It is safe to call this function from any thread.
+ *
+ * Since 2.22
+ */
+
+
+/**
+ * g_markup_collect_attributes:
+ * @element_name: the current tag name
+ * @attribute_names: the attribute names
+ * @attribute_values: the attribute values
+ * @error: a pointer to a #GError or %NULL
+ * @first_type: the #GMarkupCollectType of the first attribute
+ * @first_attr: the name of the first attribute
+ * @...: a pointer to the storage location of the first attribute (or %NULL), followed by more types names and pointers, ending with %G_MARKUP_COLLECT_INVALID
+ *
+ * Collects the attributes of the element from the data passed to the
+ * #GMarkupParser start_element function, dealing with common error
+ * conditions and supporting boolean values.
+ *
+ * This utility function is not required to write a parser but can save
+ * a lot of typing.
+ *
+ * The @element_name, @attribute_names, @attribute_values and @error
+ * parameters passed to the start_element callback should be passed
+ * unmodified to this function.
+ *
+ * Following these arguments is a list of "supported" attributes to collect.
+ * It is an error to specify multiple attributes with the same name. If any
+ * attribute not in the list appears in the @attribute_names array then an
+ * unknown attribute error will result.
+ *
+ * The #GMarkupCollectType field allows specifying the type of collection
+ * to perform and if a given attribute must appear or is optional.
+ *
+ * The attribute name is simply the name of the attribute to collect.
+ *
+ * The pointer should be of the appropriate type (see the descriptions
+ * under #GMarkupCollectType) and may be %NULL in case a particular
+ * attribute is to be allowed but ignored.
+ *
+ * This function deals with issuing errors for missing attributes
+ * (of type %G_MARKUP_ERROR_MISSING_ATTRIBUTE), unknown attributes
+ * (of type %G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE) and duplicate
+ * attributes (of type %G_MARKUP_ERROR_INVALID_CONTENT) as well
+ * as parse errors for boolean-valued attributes (again of type
+ * %G_MARKUP_ERROR_INVALID_CONTENT). In all of these cases %FALSE
+ * will be returned and @error will be set as appropriate.
+ *
+ * Returns: %TRUE if successful
+ * Since: 2.16
+ */
+
+
+/**
+ * g_markup_escape_text:
+ * @text: some valid UTF-8 text
+ * @length: length of @text in bytes, or -1 if the text is nul-terminated
+ *
+ * Escapes text 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.
+ *
+ * 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.
+ *
+ * Note also that this function will produce character references in
+ * the range of &amp;#x1; ... &amp;#x1f; for all control sequences
+ * except for tabstop, newline and carriage return.  The character
+ * references in this range are not valid XML 1.0, but they are
+ * valid XML 1.1 and will be accepted by the GMarkup parser.
+ *
+ * Returns: a newly allocated string with the escaped text
+ */
+
+
+/**
+ * g_markup_parse_context_end_parse:
+ * @context: a #GMarkupParseContext
+ * @error: return location for a #GError
+ *
+ * Signals to the #GMarkupParseContext that all data has been
+ * fed into the parse context with g_markup_parse_context_parse().
+ *
+ * This function reports an error if the document isn't complete,
+ * for example if elements are still open.
+ *
+ * Returns: %TRUE on success, %FALSE if an error was set
+ */
+
+
+/**
+ * g_markup_parse_context_free:
+ * @context: a #GMarkupParseContext
+ *
+ * Frees a #GMarkupParseContext.
+ *
+ * This function can't be called from inside one of the
+ * #GMarkupParser functions or while a subparser is pushed.
+ */
+
+
+/**
+ * g_markup_parse_context_get_element:
+ * @context: a #GMarkupParseContext
+ *
+ * Retrieves the name of the currently open element.
+ *
+ * If called from the start_element or end_element handlers this will
+ * give the element_name as passed to those functions. For the parent
+ * elements, see g_markup_parse_context_get_element_stack().
+ *
+ * Returns: the name of the currently open element, or %NULL
+ * Since: 2.2
+ */
+
+
+/**
+ * g_markup_parse_context_get_element_stack:
+ * @context: a #GMarkupParseContext
+ *
+ * Retrieves the element stack from the internal state of the parser.
+ *
+ * The returned #GSList is a list of strings where the first item is
+ * the currently open tag (as would be returned by
+ * g_markup_parse_context_get_element()) and the next item is its
+ * immediate parent.
+ *
+ * This function is intended to be used in the start_element and
+ * end_element handlers where g_markup_parse_context_get_element()
+ * would merely return the name of the element that is being
+ * processed.
+ *
+ * Returns: the element stack, which must not be modified
+ * Since: 2.16
+ */
+
+
+/**
+ * g_markup_parse_context_get_position:
+ * @context: a #GMarkupParseContext
+ * @line_number: (allow-none): return location for a line number, or %NULL
+ * @char_number: (allow-none): return location for a char-on-line number, or %NULL
+ *
+ * Retrieves the current line number and the number of the character on
+ * that line. Intended for use in error messages; there are no strict
+ * semantics for what constitutes the "current" line number other than
+ * "the best number we could come up with for error messages."
+ */
+
+
+/**
+ * g_markup_parse_context_get_user_data:
+ * @context: a #GMarkupParseContext
+ *
+ * Returns the user_data associated with @context.
+ *
+ * This will either be the user_data that was provided to
+ * g_markup_parse_context_new() or to the most recent call
+ * of g_markup_parse_context_push().
+ *
+ * the markup context and will be freed when
+ * g_markup_parse_context_free() is called.
+ *
+ * Returns: the provided user_data. The returned data belongs to
+ * Since: 2.18
+ */
+
+
+/**
+ * g_markup_parse_context_new:
+ * @parser: a #GMarkupParser
+ * @flags: one or more #GMarkupParseFlags
+ * @user_data: user data to pass to #GMarkupParser functions
+ * @user_data_dnotify: user data destroy notifier called when the parse context is freed
+ *
+ * Creates a new parse context. A parse context is used to parse
+ * marked-up documents. You can feed any number of documents into
+ * a context, as long as no errors occur; once an error occurs,
+ * the parse context can't continue to parse text (you have to
+ * free it and create a new parse context).
+ *
+ * Returns: a new #GMarkupParseContext
+ */
+
+
+/**
+ * g_markup_parse_context_parse:
+ * @context: a #GMarkupParseContext
+ * @text: chunk of text to parse
+ * @text_len: length of @text in bytes
+ * @error: return location for a #GError
+ *
+ * Feed some data to the #GMarkupParseContext.
+ *
+ * The data need not be valid UTF-8; an error will be signaled if
+ * it's invalid. The data need not be an entire document; you can
+ * feed a document into the parser incrementally, via multiple calls
+ * to this function. Typically, as you receive data from a network
+ * connection or file, you feed each received chunk of data into this
+ * function, aborting the process if an error occurs. Once an error
+ * is reported, no further data may be fed to the #GMarkupParseContext;
+ * all errors are fatal.
+ *
+ * Returns: %FALSE if an error occurred, %TRUE on success
+ */
+
+
+/**
+ * g_markup_parse_context_pop:
+ * @context: a #GMarkupParseContext
+ *
+ * Completes the process of a temporary sub-parser redirection.
+ *
+ * This function exists to collect the user_data allocated by a
+ * matching call to g_markup_parse_context_push(). It must be called
+ * in the end_element handler corresponding to the start_element
+ * handler during which g_markup_parse_context_push() was called.
+ * You must not call this function from the error callback -- the
+ * @user_data is provided directly to the callback in that case.
+ *
+ * This function is not intended to be directly called by users
+ * interested in invoking subparsers. Instead, it is intended to
+ * be used by the subparsers themselves to implement a higher-level
+ * interface.
+ *
+ * Returns: the user data passed to g_markup_parse_context_push()
+ * Since: 2.18
+ */
+
+
+/**
+ * g_markup_parse_context_push:
+ * @context: a #GMarkupParseContext
+ * @parser: a #GMarkupParser
+ * @user_data: user data to pass to #GMarkupParser functions
+ *
+ * Temporarily redirects markup data to a sub-parser.
+ *
+ * This function may only be called from the start_element handler of
+ * a #GMarkupParser. It must be matched with a corresponding call to
+ * g_markup_parse_context_pop() in the matching end_element handler
+ * (except in the case that the parser aborts due to an error).
+ *
+ * All tags, text and other data between the matching tags is
+ * redirected to the subparser given by @parser. @user_data is used
+ * as the user_data for that parser. @user_data is also passed to the
+ * error callback in the event that an error occurs. This includes
+ * errors that occur in subparsers of the subparser.
+ *
+ * The end tag matching the start tag for which this call was made is
+ * handled by the previous parser (which is given its own user_data)
+ * which is why g_markup_parse_context_pop() is provided to allow "one
+ * last access" to the @user_data provided to this function. In the
+ * case of error, the @user_data provided here is passed directly to
+ * the error callback of the subparser and g_markup_parse_context_pop()
+ * should not be called. In either case, if @user_data was allocated
+ * then it ought to be freed from both of these locations.
+ *
+ * This function is not intended to be directly called by users
+ * interested in invoking subparsers. Instead, it is intended to be
+ * used by the subparsers themselves to implement a higher-level
+ * interface.
+ *
+ * As an example, see the following implementation of a simple
+ * parser that counts the number of tags encountered.
+ *
+ * |[
+ * typedef struct
+ * {
+ * gint tag_count;
+ * } CounterData;
+ *
+ * static void
+ * counter_start_element (GMarkupParseContext  *context,
+ * const gchar          *element_name,
+ * const gchar         **attribute_names,
+ * const gchar         **attribute_values,
+ * gpointer              user_data,
+ * GError              **error)
+ * {
+ * CounterData *data = user_data;
+ *
+ * data->tag_count++;
+ * }
+ *
+ * static void
+ * counter_error (GMarkupParseContext *context,
+ * GError              *error,
+ * gpointer             user_data)
+ * {
+ * CounterData *data = user_data;
+ *
+ * g_slice_free (CounterData, data);
+ * }
+ *
+ * static GMarkupParser counter_subparser =
+ * {
+ * counter_start_element,
+ * NULL,
+ * NULL,
+ * NULL,
+ * counter_error
+ * };
+ * ]|
+ *
+ * In order to allow this parser to be easily used as a subparser, the
+ * following interface is provided:
+ *
+ * |[
+ * void
+ * start_counting (GMarkupParseContext *context)
+ * {
+ * CounterData *data = g_slice_new (CounterData);
+ *
+ * data->tag_count = 0;
+ * g_markup_parse_context_push (context, &counter_subparser, data);
+ * }
+ *
+ * gint
+ * end_counting (GMarkupParseContext *context)
+ * {
+ * CounterData *data = g_markup_parse_context_pop (context);
+ * int result;
+ *
+ * result = data->tag_count;
+ * g_slice_free (CounterData, data);
+ *
+ * return result;
+ * }
+ * ]|
+ *
+ * The subparser would then be used as follows:
+ *
+ * |[
+ * static void start_element (context, element_name, ...)
+ * {
+ * if (strcmp (element_name, "count-these") == 0)
+ * start_counting (context);
+ *
+ * /&ast; else, handle other tags... &ast;/
+ * }
+ *
+ * static void end_element (context, element_name, ...)
+ * {
+ * if (strcmp (element_name, "count-these") == 0)
+ * g_print ("Counted %d tags\n", end_counting (context));
+ *
+ * /&ast; else, handle other tags... &ast;/
+ * }
+ * ]|
+ *
+ * Since: 2.18
+ */
+
+
+/**
+ * g_markup_printf_escaped:
+ * @format: printf() style format string
+ * @...: the arguments to insert in the format string
+ *
+ * Formats arguments according to @format, escaping
+ * all string and character arguments in the fashion
+ * of g_markup_escape_text(). This is useful when you
+ * want to insert literal strings into XML-style markup
+ * output, without having to worry that the strings
+ * might themselves contain markup.
+ *
+ * |[
+ * const char *store = "Fortnum &amp; Mason";
+ * const char *item = "Tea";
+ * char *output;
+ * &nbsp;
+ * output = g_markup_printf_escaped ("&lt;purchase&gt;"
+ * "&lt;store&gt;&percnt;s&lt;/store&gt;"
+ * "&lt;item&gt;&percnt;s&lt;/item&gt;"
+ * "&lt;/purchase&gt;",
+ * store, item);
+ * ]|
+ *
+ * operation. Free with g_free().
+ *
+ * Returns: newly allocated result from formatting
+ * Since: 2.4
+ */
+
+
+/**
+ * g_markup_vprintf_escaped:
+ * @format: printf() style format string
+ * @args: variable argument list, similar to vprintf()
+ *
+ * Formats the data in @args according to @format, escaping
+ * all string and character arguments in the fashion
+ * of g_markup_escape_text(). See g_markup_printf_escaped().
+ *
+ * operation. Free with g_free().
+ *
+ * Returns: newly allocated result from formatting
+ * Since: 2.4
+ */
+
+
+/**
+ * g_match_info_expand_references:
+ * @match_info: (allow-none): a #GMatchInfo or %NULL
+ * @string_to_expand: the string to expand
+ * @error: location to store the error occurring, or %NULL to ignore errors
+ *
+ * Returns a new string containing the text in @string_to_expand with
+ * references and escape sequences expanded. References refer to the last
+ * match done with @string against @regex and have the same syntax used by
+ * g_regex_replace().
+ *
+ * The @string_to_expand must be UTF-8 encoded even if #G_REGEX_RAW was
+ * passed to g_regex_new().
+ *
+ * The backreferences are extracted from the string passed to the match
+ * function, so you cannot call this function after freeing the string.
+ *
+ * @match_info may be %NULL in which case @string_to_expand must not
+ * contain references. For instance "foo\n" does not refer to an actual
+ * pattern and '\n' merely will be replaced with \n character,
+ * while to expand "\0" (whole match) one needs the result of a match.
+ * Use g_regex_check_replacement() to find out whether @string_to_expand
+ * contains references.
+ *
+ * Returns: (allow-none): the expanded string, or %NULL if an error occurred
+ * Since: 2.14
+ */
+
+
+/**
+ * g_match_info_fetch:
+ * @match_info: #GMatchInfo structure
+ * @match_num: number of the sub expression
+ *
+ * Retrieves the text matching the @match_num<!-- -->'th capturing
+ * parentheses. 0 is the full text of the match, 1 is the first paren
+ * set, 2 the second, and so on.
+ *
+ * If @match_num is a valid sub pattern but it didn't match anything
+ * (e.g. sub pattern 1, matching "b" against "(a)?b") then an empty
+ * string is returned.
+ *
+ * If the match was obtained using the DFA algorithm, that is using
+ * g_regex_match_all() or g_regex_match_all_full(), the retrieved
+ * string is not that of a set of parentheses but that of a matched
+ * substring. Substrings are matched in reverse order of length, so
+ * 0 is the longest match.
+ *
+ * The string is fetched from the string passed to the match function,
+ * so you cannot call this function after freeing the string.
+ *
+ * occurred. You have to free the string yourself
+ *
+ * Returns: (allow-none): The matched substring, or %NULL if an error
+ * Since: 2.14
+ */
+
+
+/**
+ * g_match_info_fetch_all:
+ * @match_info: a #GMatchInfo structure
+ *
+ * Bundles up pointers to each of the matching substrings from a match
+ * and stores them in an array of gchar pointers. The first element in
+ * the returned array is the match number 0, i.e. the entire matched
+ * text.
+ *
+ * If a sub pattern didn't match anything (e.g. sub pattern 1, matching
+ * "b" against "(a)?b") then an empty string is inserted.
+ *
+ * If the last match was obtained using the DFA algorithm, that is using
+ * g_regex_match_all() or g_regex_match_all_full(), the retrieved
+ * strings are not that matched by sets of parentheses but that of the
+ * matched substring. Substrings are matched in reverse order of length,
+ * so the first one is the longest match.
+ *
+ * The strings are fetched from the string passed to the match function,
+ * so you cannot call this function after freeing the string.
+ *
+ * It must be freed using g_strfreev(). If the previous match failed
+ * %NULL is returned
+ *
+ * Returns: (allow-none): a %NULL-terminated array of gchar * pointers.
+ * Since: 2.14
+ */
+
+
+/**
+ * g_match_info_fetch_named:
+ * @match_info: #GMatchInfo structure
+ * @name: name of the subexpression
+ *
+ * Retrieves the text matching the capturing parentheses named @name.
+ *
+ * If @name is a valid sub pattern name but it didn't match anything
+ * (e.g. sub pattern "X", matching "b" against "(?P&lt;X&gt;a)?b")
+ * then an empty string is returned.
+ *
+ * The string is fetched from the string passed to the match function,
+ * so you cannot call this function after freeing the string.
+ *
+ * occurred. You have to free the string yourself
+ *
+ * Returns: (allow-none): The matched substring, or %NULL if an error
+ * Since: 2.14
+ */
+
+
+/**
+ * g_match_info_fetch_named_pos:
+ * @match_info: #GMatchInfo structure
+ * @name: name of the subexpression
+ * @start_pos: (out) (allow-none): pointer to location where to store the start position, or %NULL
+ * @end_pos: (out) (allow-none): pointer to location where to store the end position, or %NULL
+ *
+ * Retrieves the position in bytes of the capturing parentheses named @name.
+ *
+ * If @name is a valid sub pattern name but it didn't match anything
+ * (e.g. sub pattern "X", matching "b" against "(?P&lt;X&gt;a)?b")
+ * then @start_pos and @end_pos are set to -1 and %TRUE is returned.
+ *
+ * If the position cannot be fetched, @start_pos and @end_pos
+ * are left unchanged.
+ *
+ * Returns: %TRUE if the position was fetched, %FALSE otherwise.
+ * Since: 2.14
+ */
+
+
+/**
+ * g_match_info_fetch_pos:
+ * @match_info: #GMatchInfo structure
+ * @match_num: number of the sub expression
+ * @start_pos: (out) (allow-none): pointer to location where to store the start position, or %NULL
+ * @end_pos: (out) (allow-none): pointer to location where to store the end position, or %NULL
+ *
+ * Retrieves the position in bytes of the @match_num<!-- -->'th capturing
+ * parentheses. 0 is the full text of the match, 1 is the first
+ * paren set, 2 the second, and so on.
+ *
+ * If @match_num is a valid sub pattern but it didn't match anything
+ * (e.g. sub pattern 1, matching "b" against "(a)?b") then @start_pos
+ * and @end_pos are set to -1 and %TRUE is returned.
+ *
+ * If the match was obtained using the DFA algorithm, that is using
+ * g_regex_match_all() or g_regex_match_all_full(), the retrieved
+ * position is not that of a set of parentheses but that of a matched
+ * substring. Substrings are matched in reverse order of length, so
+ * 0 is the longest match.
+ *
+ * the position cannot be fetched, @start_pos and @end_pos are left
+ * unchanged
+ *
+ * Returns: %TRUE if the position was fetched, %FALSE otherwise. If
+ * Since: 2.14
+ */
+
+
+/**
+ * g_match_info_free:
+ * @match_info: (allow-none): a #GMatchInfo, or %NULL
+ *
+ * If @match_info is not %NULL, calls g_match_info_unref(); otherwise does
+ * nothing.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * g_match_info_get_match_count:
+ * @match_info: a #GMatchInfo structure
+ *
+ * Retrieves the number of matched substrings (including substring 0,
+ * that is the whole matched text), so 1 is returned if the pattern
+ * has no substrings in it and 0 is returned if the match failed.
+ *
+ * If the last match was obtained using the DFA algorithm, that is
+ * using g_regex_match_all() or g_regex_match_all_full(), the retrieved
+ * count is not that of the number of capturing parentheses but that of
+ * the number of matched substrings.
+ *
+ * Returns: Number of matched substrings, or -1 if an error occurred
+ * Since: 2.14
+ */
+
+
+/**
+ * g_match_info_get_regex:
+ * @match_info: a #GMatchInfo
+ *
+ * Returns #GRegex object used in @match_info. It belongs to Glib
+ * and must not be freed. Use g_regex_ref() if you need to keep it
+ * after you free @match_info object.
+ *
+ * Returns: #GRegex object used in @match_info
+ * Since: 2.14
+ */
+
+
+/**
+ * g_match_info_get_string:
+ * @match_info: a #GMatchInfo
+ *
+ * Returns the string searched with @match_info. This is the
+ * string passed to g_regex_match() or g_regex_replace() so
+ * you may not free it before calling this function.
+ *
+ * Returns: the string searched with @match_info
+ * Since: 2.14
+ */
+
+
+/**
+ * g_match_info_is_partial_match:
+ * @match_info: a #GMatchInfo structure
+ *
+ * Usually if the string passed to g_regex_match*() matches as far as
+ * it goes, but is too short to match the entire pattern, %FALSE is
+ * returned. There are circumstances where it might be helpful to
+ * distinguish this case from other cases in which there is no match.
+ *
+ * Consider, for example, an application where a human is required to
+ * type in data for a field with specific formatting requirements. An
+ * example might be a date in the form ddmmmyy, defined by the pattern
+ * "^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$".
+ * If the application sees the user’s keystrokes one by one, and can
+ * check that what has been typed so far is potentially valid, it is
+ * able to raise an error as soon as a mistake is made.
+ *
+ * GRegex supports the concept of partial matching by means of the
+ * #G_REGEX_MATCH_PARTIAL flag. When this is set the return code for
+ * g_regex_match() or g_regex_match_full() is, as usual, %TRUE
+ * for a complete match, %FALSE otherwise. But, when these functions
+ * return %FALSE, you can check if the match was partial calling
+ * g_match_info_is_partial_match().
+ *
+ * When using partial matching you cannot use g_match_info_fetch*().
+ *
+ * Because of the way certain internal optimizations are implemented
+ * the partial matching algorithm cannot be used with all patterns.
+ * So repeated single characters such as "a{2,4}" and repeated single
+ * meta-sequences such as "\d+" are not permitted if the maximum number
+ * of occurrences is greater than one. Optional items such as "\d?"
+ * (where the maximum is one) are permitted. Quantifiers with any values
+ * are permitted after parentheses, so the invalid examples above can be
+ * coded thus "(a){2,4}" and "(\d)+". If #G_REGEX_MATCH_PARTIAL is set
+ * for a pattern that does not conform to the restrictions, matching
+ * functions return an error.
+ *
+ * Returns: %TRUE if the match was partial, %FALSE otherwise
+ * Since: 2.14
+ */
+
+
+/**
+ * g_match_info_matches:
+ * @match_info: a #GMatchInfo structure
+ *
+ * Returns whether the previous match operation succeeded.
+ *
+ * %FALSE otherwise
+ *
+ * Returns: %TRUE if the previous match operation succeeded,
+ * Since: 2.14
+ */
+
+
+/**
+ * g_match_info_next:
+ * @match_info: a #GMatchInfo structure
+ * @error: location to store the error occurring, or %NULL to ignore errors
+ *
+ * Scans for the next match using the same parameters of the previous
+ * call to g_regex_match_full() or g_regex_match() that returned
+ * @match_info.
+ *
+ * The match is done on the string passed to the match function, so you
+ * cannot free it before calling this function.
+ *
+ * Returns: %TRUE is the string matched, %FALSE otherwise
+ * Since: 2.14
+ */
+
+
+/**
+ * g_match_info_ref:
+ * @match_info: a #GMatchInfo
+ *
+ * Increases reference count of @match_info by 1.
+ *
+ * Returns: @match_info
+ * Since: 2.30
+ */
+
+
+/**
+ * g_match_info_unref:
+ * @match_info: a #GMatchInfo
+ *
+ * Decreases reference count of @match_info by 1. When reference count drops
+ * to zero, it frees all the memory associated with the match_info structure.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_mem_gc_friendly:
+ *
+ * This variable is %TRUE if the <envar>G_DEBUG</envar> environment variable
+ * includes the key <literal>gc-friendly</literal>.
+ */
+
+
+/**
+ * g_mem_is_system_malloc:
+ *
+ * Checks whether the allocator used by g_malloc() is the system's
+ * malloc implementation. If it returns %TRUE memory allocated with
+ * malloc() can be used interchangeable with memory allocated using g_malloc().
+ * This function is useful for avoiding an extra copy of allocated memory returned
+ * by a non-GLib-based API.
+ *
+ * A different allocator can be set using g_mem_set_vtable().
+ *
+ * Returns: if %TRUE, malloc() and g_malloc() can be mixed.
+ */
+
+
+/**
+ * g_mem_profile:
+ *
+ * Outputs a summary of memory usage.
+ *
+ * It outputs the frequency of allocations of different sizes,
+ * the total number of bytes which have been allocated,
+ * the total number of bytes which have been freed,
+ * and the difference between the previous two values, i.e. the number of bytes
+ * still in use.
+ *
+ * Note that this function will not output anything unless you have
+ * previously installed the #glib_mem_profiler_table with g_mem_set_vtable().
+ */
+
+
+/**
+ * g_mem_set_vtable:
+ * @vtable: table of memory allocation routines.
+ *
+ * Sets the #GMemVTable to use for memory allocation. You can use this to provide
+ * custom memory allocation routines. <emphasis>This function must be called
+ * before using any other GLib functions.</emphasis> The @vtable only needs to
+ * provide malloc(), realloc(), and free() functions; GLib can provide default
+ * implementations of the others. The malloc() and realloc() implementations
+ * should return %NULL on failure, GLib will handle error-checking for you.
+ * @vtable is copied, so need not persist after this function has been called.
+ */
+
+
+/**
+ * g_memdup:
+ * @mem: the memory to copy.
+ * @byte_size: the number of bytes to copy.
+ *
+ * Allocates @byte_size bytes of memory, and copies @byte_size bytes into it
+ * from @mem. If @mem is %NULL it returns %NULL.
+ *
+ * is %NULL.
+ *
+ * Returns: a pointer to the newly-allocated copy of the memory, or %NULL if @mem
+ */
+
+
+/**
+ * g_memmove:
+ * @dest: the destination address to copy the bytes to.
+ * @src: the source address to copy the bytes from.
+ * @len: the number of bytes to copy.
+ *
+ * Copies a block of memory @len bytes long, from @src to @dest.
+ * The source and destination areas may overlap.
+ *
+ * In order to use this function, you must include
+ * <filename>string.h</filename> yourself, because this macro will
+ * typically simply resolve to memmove() and GLib does not include
+ * <filename>string.h</filename> for you.
+ */
+
+
+/**
+ * g_message:
+ * @...: format string, followed by parameters to insert into the format string (as with printf())
+ *
+ * A convenience function/macro to log a normal message.
+ */
+
+
+/**
+ * g_mkdir:
+ * @filename: a pathname in the GLib file name encoding (UTF-8 on Windows)
+ * @mode: permissions to use for the newly created directory
+ *
+ * A wrapper for the POSIX mkdir() function. The mkdir() function
+ * attempts to create a directory with the given name and permissions.
+ * The mode argument is ignored on Windows.
+ *
+ * See your C library manual for more details about mkdir().
+ *
+ * occurred
+ *
+ * Returns: 0 if the directory was successfully created, -1 if an error
+ * Since: 2.6
+ */
+
+
+/**
+ * g_mkdir_with_parents:
+ * @pathname: a pathname in the GLib file name encoding
+ * @mode: permissions to use for newly created directories
+ *
+ * Create a directory if it doesn't already exist. Create intermediate
+ * parent directories as needed, too.
+ *
+ * created. Returns -1 if an error occurred, with errno set.
+ *
+ * Returns: 0 if the directory already exists, or was successfully
+ * Since: 2.8
+ */
+
+
+/**
+ * g_mkdtemp:
+ * @tmpl: (type filename): template directory name
+ *
+ * Creates a temporary directory. See the mkdtemp() documentation
+ * on most UNIX-like systems.
+ *
+ * The parameter is a string that should follow the rules for
+ * mkdtemp() templates, i.e. contain the string "XXXXXX".
+ * g_mkdtemp() is slightly more flexible than mkdtemp() in that the
+ * sequence does not have to occur at the very end of the template
+ * and you can pass a @mode and additional @flags. The X string will
+ * be modified to form the name of a directory that didn't exist.
+ * The string should be in the GLib file name encoding. Most importantly,
+ * on Windows it should be in UTF-8.
+ *
+ * to hold the directory name.  In case of errors, %NULL is
+ * returned and %errno will be set.
+ *
+ * Returns: A pointer to @tmpl, which has been modified
+ * Since: 2.30
+ */
+
+
+/**
+ * g_mkdtemp_full:
+ * @tmpl: (type filename): template directory name
+ * @mode: permissions to create the temporary directory with
+ *
+ * Creates a temporary directory. See the mkdtemp() documentation
+ * on most UNIX-like systems.
+ *
+ * The parameter is a string that should follow the rules for
+ * mkdtemp() templates, i.e. contain the string "XXXXXX".
+ * g_mkdtemp() is slightly more flexible than mkdtemp() in that the
+ * sequence does not have to occur at the very end of the template
+ * and you can pass a @mode. The X string will be modified to form
+ * the name of a directory that didn't exist. The string should be
+ * in the GLib file name encoding. Most importantly, on Windows it
+ * should be in UTF-8.
+ *
+ * to hold the directory name. In case of errors, %NULL is
+ * returned, and %errno will be set.
+ *
+ * Returns: A pointer to @tmpl, which has been modified
+ * Since: 2.30
+ */
+
+
+/**
+ * g_mkstemp:
+ * @tmpl: (type filename): template filename
+ *
+ * Opens a temporary file. See the mkstemp() documentation
+ * on most UNIX-like systems.
+ *
+ * The parameter is a string that should follow the rules for
+ * mkstemp() templates, i.e. contain the string "XXXXXX".
+ * g_mkstemp() is slightly more flexible than mkstemp() in that the
+ * sequence does not have to occur at the very end of the template.
+ * The X string will be modified to form the name of a file that
+ * didn't exist. The string should be in the GLib file name encoding.
+ * Most importantly, on Windows it should be in UTF-8.
+ *
+ * opened for reading and writing. The file is opened in binary
+ * mode on platforms where there is a difference. The file handle
+ * should be closed with close(). In case of errors, -1 is
+ * returned and %errno will be set.
+ *
+ * Returns: A file handle (as from open()) to the file
+ */
+
+
+/**
+ * g_mkstemp_full:
+ * @tmpl: (type filename): template filename
+ * @flags: flags to pass to an open() call in addition to O_EXCL and O_CREAT, which are passed automatically
+ * @mode: permissions to create the temporary file with
+ *
+ * Opens a temporary file. See the mkstemp() documentation
+ * on most UNIX-like systems.
+ *
+ * The parameter is a string that should follow the rules for
+ * mkstemp() templates, i.e. contain the string "XXXXXX".
+ * g_mkstemp_full() is slightly more flexible than mkstemp()
+ * in that the sequence does not have to occur at the very end of the
+ * template and you can pass a @mode and additional @flags. The X
+ * string will be modified to form the name of a file that didn't exist.
+ * The string should be in the GLib file name encoding. Most importantly,
+ * on Windows it should be in UTF-8.
+ *
+ * opened for reading and writing. The file handle should be
+ * closed with close(). In case of errors, -1 is returned
+ * and %errno will be set.
+ *
+ * Returns: A file handle (as from open()) to the file
+ * Since: 2.22
+ */
+
+
+/**
+ * g_mutex_clear:
+ * @mutex: an initialized #GMutex
+ *
+ * Frees the resources allocated to a mutex with g_mutex_init().
+ *
+ * This function should not be used with a #GMutex that has been
+ * statically allocated.
+ *
+ * Calling g_mutex_clear() on a locked mutex leads to undefined
+ * behaviour.
+ *
+ * Sine: 2.32
+ */
+
+
+/**
+ * g_mutex_init:
+ * @mutex: an uninitialized #GMutex
+ *
+ * Initializes a #GMutex so that it can be used.
+ *
+ * This function is useful to initialize a mutex that has been
+ * allocated on the stack, or as part of a larger structure.
+ * It is not necessary to initialize a mutex that has been
+ * created that has been statically allocated.
+ *
+ * |[
+ * typedef struct {
+ * GMutex m;
+ * ...
+ * } Blob;
+ *
+ * Blob *b;
+ *
+ * b = g_new (Blob, 1);
+ * g_mutex_init (&b->m);
+ * ]|
+ *
+ * To undo the effect of g_mutex_init() when a mutex is no longer
+ * needed, use g_mutex_clear().
+ *
+ * Calling g_mutex_init() on an already initialized #GMutex leads
+ * to undefined behaviour.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_mutex_lock:
+ * @mutex: a #GMutex
+ *
+ * Locks @mutex. If @mutex is already locked by another thread, the
+ * current thread will block until @mutex is unlocked by the other
+ * thread.
+ *
+ * <note>#GMutex is neither guaranteed to be recursive nor to be
+ * non-recursive.  As such, calling g_mutex_lock() on a #GMutex that has
+ * already been locked by the same thread results in undefined behaviour
+ * (including but not limited to deadlocks).</note>
+ */
+
+
+/**
+ * g_mutex_trylock:
+ * @mutex: a #GMutex
+ *
+ * Tries to lock @mutex. If @mutex is already locked by another thread,
+ * it immediately returns %FALSE. Otherwise it locks @mutex and returns
+ * %TRUE.
+ *
+ * <note>#GMutex is neither guaranteed to be recursive nor to be
+ * non-recursive.  As such, calling g_mutex_lock() on a #GMutex that has
+ * already been locked by the same thread results in undefined behaviour
+ * (including but not limited to deadlocks or arbitrary return values).
+ * </note>
+ *
+ * Returns: %TRUE if @mutex could be locked
+ */
+
+
+/**
+ * g_mutex_unlock:
+ * @mutex: a #GMutex
+ *
+ * Unlocks @mutex. If another thread is blocked in a g_mutex_lock()
+ * call for @mutex, it will become unblocked and can lock @mutex itself.
+ *
+ * Calling g_mutex_unlock() on a mutex that is not locked by the
+ * current thread leads to undefined behaviour.
+ */
+
+
+/**
+ * g_new:
+ * @struct_type: the type of the elements to allocate
+ * @n_structs: the number of elements to allocate
+ *
+ * Allocates @n_structs elements of type @struct_type.
+ * The returned pointer is cast to a pointer to the given type.
+ * If @n_structs is 0 it returns %NULL.
+ * Care is taken to avoid overflow when calculating the size of the allocated block.
+ *
+ * Since the returned pointer is already casted to the right type,
+ * it is normally unnecessary to cast it explicitly, and doing
+ * so might hide memory allocation errors.
+ *
+ * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
+ */
+
+
+/**
+ * g_new0:
+ * @struct_type: the type of the elements to allocate.
+ * @n_structs: the number of elements to allocate.
+ *
+ * Allocates @n_structs elements of type @struct_type, initialized to 0's.
+ * The returned pointer is cast to a pointer to the given type.
+ * If @n_structs is 0 it returns %NULL.
+ * Care is taken to avoid overflow when calculating the size of the allocated block.
+ *
+ * Since the returned pointer is already casted to the right type,
+ * it is normally unnecessary to cast it explicitly, and doing
+ * so might hide memory allocation errors.
+ *
+ * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type.
+ */
+
+
+/**
+ * g_newa:
+ * @struct_type: Type of memory chunks to be allocated
+ * @n_structs: Number of chunks to be allocated
+ *
+ * Wraps g_alloca() in a more typesafe manner.
+ *
+ * Returns: Pointer to stack space for @n_structs chunks of type @struct_type
+ */
+
+
+/**
+ * g_node_append:
+ * @parent: the #GNode to place the new #GNode under
+ * @node: the #GNode to insert
+ *
+ * Inserts a #GNode as the last child of the given parent.
+ *
+ * Returns: the inserted #GNode
+ */
+
+
+/**
+ * g_node_append_data:
+ * @parent: the #GNode to place the new #GNode under
+ * @data: the data for the new #GNode
+ *
+ * Inserts a new #GNode as the last child of the given parent.
+ *
+ * Returns: the new #GNode
+ */
+
+
+/**
+ * g_node_child_index:
+ * @node: a #GNode
+ * @data: the data to find
+ *
+ * Gets the position of the first child of a #GNode
+ * which contains the given data.
+ *
+ * @data, or -1 if the data is not found
+ *
+ * Returns: the index of the child of @node which contains
+ */
+
+
+/**
+ * g_node_child_position:
+ * @node: a #GNode
+ * @child: a child of @node
+ *
+ * Gets the position of a #GNode with respect to its siblings.
+ * @child must be a child of @node. The first child is numbered 0,
+ * the second 1, and so on.
+ *
+ * Returns: the position of @child with respect to its siblings
+ */
+
+
+/**
+ * g_node_children_foreach:
+ * @node: a #GNode
+ * @flags: which types of children are to be visited, one of %G_TRAVERSE_ALL, %G_TRAVERSE_LEAVES and %G_TRAVERSE_NON_LEAVES
+ * @func: the function to call for each visited node
+ * @data: user data to pass to the function
+ *
+ * Calls a function for each of the children of a #GNode.
+ * Note that it doesn't descend beneath the child nodes.
+ */
+
+
+/**
+ * g_node_copy:
+ * @node: a #GNode
+ *
+ * Recursively copies a #GNode (but does not deep-copy the data inside the
+ * nodes, see g_node_copy_deep() if you need that).
+ *
+ * Returns: a new #GNode containing the same data pointers
+ */
+
+
+/**
+ * g_node_copy_deep:
+ * @node: a #GNode
+ * @copy_func: the function which is called to copy the data inside each node, or %NULL to use the original data.
+ * @data: data to pass to @copy_func
+ *
+ * Recursively copies a #GNode and its data.
+ *
+ * Returns: a new #GNode containing copies of the data in @node.
+ * Since: 2.4
+ */
+
+
+/**
+ * g_node_depth:
+ * @node: a #GNode
+ *
+ * Gets the depth of a #GNode.
+ *
+ * If @node is %NULL the depth is 0. The root node has a depth of 1.
+ * For the children of the root node the depth is 2. And so on.
+ *
+ * Returns: the depth of the #GNode
+ */
+
+
+/**
+ * g_node_destroy:
+ * @root: the root of the tree/subtree to destroy
+ *
+ * Removes @root and its children from the tree, freeing any memory
+ * allocated.
+ */
+
+
+/**
+ * g_node_find:
+ * @root: the root #GNode of the tree to search
+ * @order: the order in which nodes are visited - %G_IN_ORDER, %G_PRE_ORDER, %G_POST_ORDER, or %G_LEVEL_ORDER
+ * @flags: which types of children are to be searched, one of %G_TRAVERSE_ALL, %G_TRAVERSE_LEAVES and %G_TRAVERSE_NON_LEAVES
+ * @data: the data to find
+ *
+ * Finds a #GNode in a tree.
+ *
+ * Returns: the found #GNode, or %NULL if the data is not found
+ */
+
+
+/**
+ * g_node_find_child:
+ * @node: a #GNode
+ * @flags: which types of children are to be searched, one of %G_TRAVERSE_ALL, %G_TRAVERSE_LEAVES and %G_TRAVERSE_NON_LEAVES
+ * @data: the data to find
+ *
+ * Finds the first child of a #GNode with the given data.
+ *
+ * Returns: the found child #GNode, or %NULL if the data is not found
+ */
+
+
+/**
+ * g_node_first_child:
+ * @node: a #GNode
+ *
+ * Gets the first child of a #GNode.
+ *
+ * or has no children
+ *
+ * Returns: the first child of @node, or %NULL if @node is %NULL
+ */
+
+
+/**
+ * g_node_first_sibling:
+ * @node: a #GNode
+ *
+ * Gets the first sibling of a #GNode.
+ * This could possibly be the node itself.
+ *
+ * Returns: the first sibling of @node
+ */
+
+
+/**
+ * g_node_get_root:
+ * @node: a #GNode
+ *
+ * Gets the root of a tree.
+ *
+ * Returns: the root of the tree
+ */
+
+
+/**
+ * g_node_insert:
+ * @parent: the #GNode to place @node under
+ * @position: the position to place @node at, with respect to its siblings If position is -1, @node is inserted as the last child of @parent
+ * @node: the #GNode to insert
+ *
+ * Inserts a #GNode beneath the parent at the given position.
+ *
+ * Returns: the inserted #GNode
+ */
+
+
+/**
+ * g_node_insert_after:
+ * @parent: the #GNode to place @node under
+ * @sibling: the sibling #GNode to place @node after. If sibling is %NULL, the node is inserted as the first child of @parent.
+ * @node: the #GNode to insert
+ *
+ * Inserts a #GNode beneath the parent after the given sibling.
+ *
+ * Returns: the inserted #GNode
+ */
+
+
+/**
+ * g_node_insert_before:
+ * @parent: the #GNode to place @node under
+ * @sibling: the sibling #GNode to place @node before. If sibling is %NULL, the node is inserted as the last child of @parent.
+ * @node: the #GNode to insert
+ *
+ * Inserts a #GNode beneath the parent before the given sibling.
+ *
+ * Returns: the inserted #GNode
+ */
+
+
+/**
+ * g_node_insert_data:
+ * @parent: the #GNode to place the new #GNode under
+ * @position: the position to place the new #GNode at. If position is -1, the new #GNode is inserted as the last child of @parent
+ * @data: the data for the new #GNode
+ *
+ * Inserts a new #GNode at the given position.
+ *
+ * Returns: the new #GNode
+ */
+
+
+/**
+ * g_node_insert_data_after:
+ * @parent: the #GNode to place the new #GNode under
+ * @sibling: the sibling #GNode to place the new #GNode after
+ * @data: the data for the new #GNode
+ *
+ * Inserts a new #GNode after the given sibling.
+ *
+ * Returns: the new #GNode
+ */
+
+
+/**
+ * g_node_insert_data_before:
+ * @parent: the #GNode to place the new #GNode under
+ * @sibling: the sibling #GNode to place the new #GNode before
+ * @data: the data for the new #GNode
+ *
+ * Inserts a new #GNode before the given sibling.
+ *
+ * Returns: the new #GNode
+ */
+
+
+/**
+ * g_node_is_ancestor:
+ * @node: a #GNode
+ * @descendant: a #GNode
+ *
+ * Returns %TRUE if @node is an ancestor of @descendant.
+ * This is true if node is the parent of @descendant,
+ * or if node is the grandparent of @descendant etc.
+ *
+ * Returns: %TRUE if @node is an ancestor of @descendant
+ */
+
+
+/**
+ * g_node_last_child:
+ * @node: a #GNode (must not be %NULL)
+ *
+ * Gets the last child of a #GNode.
+ *
+ * Returns: the last child of @node, or %NULL if @node has no children
+ */
+
+
+/**
+ * g_node_last_sibling:
+ * @node: a #GNode
+ *
+ * Gets the last sibling of a #GNode.
+ * This could possibly be the node itself.
+ *
+ * Returns: the last sibling of @node
+ */
+
+
+/**
+ * g_node_max_height:
+ * @root: a #GNode
+ *
+ * Gets the maximum height of all branches beneath a #GNode.
+ * This is the maximum distance from the #GNode to all leaf nodes.
+ *
+ * If @root is %NULL, 0 is returned. If @root has no children,
+ * 1 is returned. If @root has children, 2 is returned. And so on.
+ *
+ * Returns: the maximum height of the tree beneath @root
+ */
+
+
+/**
+ * g_node_n_children:
+ * @node: a #GNode
+ *
+ * Gets the number of children of a #GNode.
+ *
+ * Returns: the number of children of @node
+ */
+
+
+/**
+ * g_node_n_nodes:
+ * @root: a #GNode
+ * @flags: which types of children are to be counted, one of %G_TRAVERSE_ALL, %G_TRAVERSE_LEAVES and %G_TRAVERSE_NON_LEAVES
+ *
+ * Gets the number of nodes in a tree.
+ *
+ * Returns: the number of nodes in the tree
+ */
+
+
+/**
+ * g_node_new:
+ * @data: the data of the new node
+ *
+ * Creates a new #GNode containing the given data.
+ * Used to create the first node in a tree.
+ *
+ * Returns: a new #GNode
+ */
+
+
+/**
+ * g_node_next_sibling:
+ * @node: a #GNode
+ *
+ * Gets the next sibling of a #GNode.
+ *
+ * or %NULL
+ *
+ * Returns: the next sibling of @node, or %NULL if @node is the last node
+ */
+
+
+/**
+ * g_node_nth_child:
+ * @node: a #GNode
+ * @n: the index of the desired child
+ *
+ * Gets a child of a #GNode, using the given index.
+ * The first child is at index 0. If the index is
+ * too big, %NULL is returned.
+ *
+ * Returns: the child of @node at index @n
+ */
+
+
+/**
+ * g_node_prepend:
+ * @parent: the #GNode to place the new #GNode under
+ * @node: the #GNode to insert
+ *
+ * Inserts a #GNode as the first child of the given parent.
+ *
+ * Returns: the inserted #GNode
+ */
+
+
+/**
+ * g_node_prepend_data:
+ * @parent: the #GNode to place the new #GNode under
+ * @data: the data for the new #GNode
+ *
+ * Inserts a new #GNode as the first child of the given parent.
+ *
+ * Returns: the new #GNode
+ */
+
+
+/**
+ * g_node_prev_sibling:
+ * @node: a #GNode
+ *
+ * Gets the previous sibling of a #GNode.
+ *
+ * node or %NULL
+ *
+ * Returns: the previous sibling of @node, or %NULL if @node is the first
+ */
+
+
+/**
+ * g_node_reverse_children:
+ * @node: a #GNode.
+ *
+ * Reverses the order of the children of a #GNode.
+ * (It doesn't change the order of the grandchildren.)
+ */
+
+
+/**
+ * g_node_traverse:
+ * @root: the root #GNode of the tree to traverse
+ * @order: the order in which nodes are visited - %G_IN_ORDER, %G_PRE_ORDER, %G_POST_ORDER, or %G_LEVEL_ORDER.
+ * @flags: which types of children are to be visited, one of %G_TRAVERSE_ALL, %G_TRAVERSE_LEAVES and %G_TRAVERSE_NON_LEAVES
+ * @max_depth: the maximum depth of the traversal. Nodes below this depth will not be visited. If max_depth is -1 all nodes in the tree are visited. If depth is 1, only the root is visited. If depth is 2, the root and its children are visited. And so on.
+ * @func: the function to call for each visited #GNode
+ * @data: user data to pass to the function
+ *
+ * Traverses a tree starting at the given root #GNode.
+ * It calls the given function for each node visited.
+ * The traversal can be halted at any point by returning %TRUE from @func.
+ */
+
+
+/**
+ * g_node_unlink:
+ * @node: the #GNode to unlink, which becomes the root of a new tree
+ *
+ * Unlinks a #GNode from a tree, resulting in two separate trees.
+ */
+
+
+/**
+ * g_ntohl:
+ * @val: a 32-bit integer value in network byte order
+ *
+ * Converts a 32-bit integer value from network to host byte order.
+ *
+ * Returns: @val converted to host byte order.
+ */
+
+
+/**
+ * g_ntohs:
+ * @val: a 16-bit integer value in network byte order
+ *
+ * Converts a 16-bit integer value from network to host byte order.
+ *
+ * Returns: @val converted to host byte order
+ */
+
+
+/**
+ * g_nullify_pointer:
+ * @nullify_location: the memory address of the pointer.
+ *
+ * Set the pointer at the specified location to %NULL.
+ */
+
+
+/**
+ * g_on_error_query:
+ * @prg_name: the program name, needed by <command>gdb</command> for the [S]tack trace option. If @prg_name is %NULL, g_get_prgname() is called to get the program name (which will work correctly if gdk_init() or gtk_init() has been called)
+ *
+ * Prompts the user with
+ * <computeroutput>[E]xit, [H]alt, show [S]tack trace or [P]roceed</computeroutput>.
+ * This function is intended to be used for debugging use only.
+ * The following example shows how it can be used together with
+ * the g_log() functions.
+ *
+ * |[
+ * &num;include &lt;glib.h&gt;
+ *
+ * static void
+ * log_handler (const gchar   *log_domain,
+ * GLogLevelFlags log_level,
+ * const gchar   *message,
+ * gpointer       user_data)
+ * {
+ * g_log_default_handler (log_domain, log_level, message, user_data);
+ *
+ * g_on_error_query (MY_PROGRAM_NAME);
+ * }
+ *
+ * int
+ * main (int argc, char *argv[])
+ * {
+ * g_log_set_handler (MY_LOG_DOMAIN,
+ * G_LOG_LEVEL_WARNING |
+ * G_LOG_LEVEL_ERROR |
+ * G_LOG_LEVEL_CRITICAL,
+ * log_handler,
+ * NULL);
+ * /&ast; ... &ast;/
+ * ]|
+ *
+ * If [E]xit is selected, the application terminates with a call
+ * to <literal>_exit(0)</literal>.
+ *
+ * If [S]tack trace is selected, g_on_error_stack_trace() is called.
+ * This invokes <command>gdb</command>, which attaches to the current
+ * process and shows a stack trace. The prompt is then shown again.
+ *
+ * If [P]roceed is selected, the function returns.
+ *
+ * This function may cause different actions on non-UNIX platforms.
+ */
+
+
+/**
+ * g_on_error_stack_trace:
+ * @prg_name: the program name, needed by <command>gdb</command> for the [S]tack trace option.
+ *
+ * Invokes <command>gdb</command>, which attaches to the current
+ * process and shows a stack trace. Called by g_on_error_query()
+ * when the [S]tack trace option is selected. You can get the current
+ * process's "program name" with g_get_prgname(), assuming that you
+ * have called gtk_init() or gdk_init().
+ *
+ * This function may cause different actions on non-UNIX platforms.
+ */
+
+
+/**
+ * g_once:
+ * @once: a #GOnce structure
+ * @func: the #GThreadFunc function associated to @once. This function is called only once, regardless of the number of times it and its associated #GOnce struct are passed to g_once().
+ * @arg: data to be passed to @func
+ *
+ * The first call to this routine by a process with a given #GOnce
+ * struct calls @func with the given argument. Thereafter, subsequent
+ * calls to g_once()  with the same #GOnce struct do not call @func
+ * again, but return the stored result of the first call. On return
+ * from g_once(), the status of @once will be %G_ONCE_STATUS_READY.
+ *
+ * For example, a mutex or a thread-specific data key must be created
+ * exactly once. In a threaded environment, calling g_once() ensures
+ * that the initialization is serialized across multiple threads.
+ *
+ * Calling g_once() recursively on the same #GOnce struct in
+ * @func will lead to a deadlock.
+ *
+ * |[
+ * gpointer
+ * get_debug_flags (void)
+ * {
+ * static GOnce my_once = G_ONCE_INIT;
+ *
+ * g_once (&my_once, parse_debug_flags, NULL);
+ *
+ * return my_once.retval;
+ * }
+ * ]|
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_once_init_enter:
+ * @location: location of a static initializable variable containing 0
+ *
+ * Function to be called when starting a critical initialization
+ * section. The argument @location must point to a static
+ * 0-initialized variable that will be set to a value other than 0 at
+ * the end of the initialization section. In combination with
+ * g_once_init_leave() and the unique address @value_location, it can
+ * be ensured that an initialization section will be executed only once
+ * during a program's life time, and that concurrent threads are
+ * blocked until initialization completed. To be used in constructs
+ * like this:
+ *
+ * |[
+ * static gsize initialization_value = 0;
+ *
+ * if (g_once_init_enter (&amp;initialization_value))
+ * {
+ * gsize setup_value = 42; /&ast;* initialization code here *&ast;/
+ *
+ * g_once_init_leave (&amp;initialization_value, setup_value);
+ * }
+ *
+ * /&ast;* use initialization_value here *&ast;/
+ * ]|
+ *
+ * %FALSE and blocks otherwise
+ *
+ * Returns: %TRUE if the initialization section should be entered,
+ * Since: 2.14
+ */
+
+
+/**
+ * g_once_init_leave:
+ * @location: location of a static initializable variable containing 0
+ * @result: new non-0 value for *@value_location
+ *
+ * Counterpart to g_once_init_enter(). Expects a location of a static
+ * 0-initialized initialization variable, and an initialization value
+ * other than 0. Sets the variable to the initialization value, and
+ * releases concurrent threads blocking in g_once_init_enter() on this
+ * initialization variable.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * g_open:
+ * @filename: a pathname in the GLib file name encoding (UTF-8 on Windows)
+ * @flags: as in open()
+ * @mode: as in open()
+ *
+ * A wrapper for the POSIX open() function. The open() function is
+ * used to convert a pathname into a file descriptor.
+ *
+ * On POSIX systems file descriptors are implemented by the operating
+ * system. On Windows, it's the C library that implements open() and
+ * file descriptors. The actual Win32 API for opening files is quite
+ * different, see MSDN documentation for CreateFile(). The Win32 API
+ * uses file handles, which are more randomish integers, not small
+ * integers like file descriptors.
+ *
+ * Because file descriptors are specific to the C library on Windows,
+ * the file descriptor returned by this function makes sense only to
+ * functions in the same C library. Thus if the GLib-using code uses a
+ * different C library than GLib does, the file descriptor returned by
+ * this function cannot be passed to C library functions like write()
+ * or read().
+ *
+ * See your C library manual for more details about open().
+ *
+ * return value can be used exactly like the return value from open().
+ *
+ * Returns: a new file descriptor, or -1 if an error occurred. The
+ * Since: 2.6
+ */
+
+
+/**
+ * g_option_context_add_group:
+ * @context: a #GOptionContext
+ * @group: the group to add
+ *
+ * Adds a #GOptionGroup to the @context, so that parsing with @context
+ * will recognize the options in the group. Note that the group will
+ * be freed together with the context when g_option_context_free() is
+ * called, so you must not free the group yourself after adding it
+ * to a context.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * g_option_context_add_main_entries:
+ * @context: a #GOptionContext
+ * @entries: a %NULL-terminated array of #GOptionEntry<!-- -->s
+ * @translation_domain: (allow-none): a translation domain to use for translating the <option>--help</option> output for the options in @entries with gettext(), or %NULL
+ *
+ * A convenience function which creates a main group if it doesn't
+ * exist, adds the @entries to it and sets the translation domain.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * g_option_context_free:
+ * @context: a #GOptionContext
+ *
+ * Frees context and all the groups which have been
+ * added to it.
+ *
+ * Please note that parsed arguments need to be freed separately (see
+ * #GOptionEntry).
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * g_option_context_get_description:
+ * @context: a #GOptionContext
+ *
+ * Returns the description. See g_option_context_set_description().
+ *
+ * Returns: the description
+ * Since: 2.12
+ */
+
+
+/**
+ * g_option_context_get_help:
+ * @context: a #GOptionContext
+ * @main_help: if %TRUE, only include the main group
+ * @group: (allow-none): the #GOptionGroup to create help for, or %NULL
+ *
+ * Returns a formatted, translated help text for the given context.
+ * To obtain the text produced by <option>--help</option>, call
+ * <literal>g_option_context_get_help (context, TRUE, NULL)</literal>.
+ * To obtain the text produced by <option>--help-all</option>, call
+ * <literal>g_option_context_get_help (context, FALSE, NULL)</literal>.
+ * To obtain the help text for an option group, call
+ * <literal>g_option_context_get_help (context, FALSE, group)</literal>.
+ *
+ * Returns: A newly allocated string containing the help text
+ * Since: 2.14
+ */
+
+
+/**
+ * g_option_context_get_help_enabled:
+ * @context: a #GOptionContext
+ *
+ * Returns whether automatic <option>--help</option> generation
+ * is turned on for @context. See g_option_context_set_help_enabled().
+ *
+ * Returns: %TRUE if automatic help generation is turned on.
+ * Since: 2.6
+ */
+
+
+/**
+ * g_option_context_get_ignore_unknown_options:
+ * @context: a #GOptionContext
+ *
+ * Returns whether unknown options are ignored or not. See
+ * g_option_context_set_ignore_unknown_options().
+ *
+ * Returns: %TRUE if unknown options are ignored.
+ * Since: 2.6
+ */
+
+
+/**
+ * g_option_context_get_main_group:
+ * @context: a #GOptionContext
+ *
+ * Returns a pointer to the main group of @context.
+ *
+ * have a main group. Note that group belongs to @context and should
+ * not be modified or freed.
+ *
+ * Returns: the main group of @context, or %NULL if @context doesn't
+ * Since: 2.6
+ */
+
+
+/**
+ * g_option_context_get_summary:
+ * @context: a #GOptionContext
+ *
+ * Returns the summary. See g_option_context_set_summary().
+ *
+ * Returns: the summary
+ * Since: 2.12
+ */
+
+
+/**
+ * g_option_context_new:
+ * @parameter_string: a string which is displayed in the first line of <option>--help</option> output, after the usage summary <literal><replaceable>programname</replaceable> [OPTION...]</literal>
+ *
+ * Creates a new option context.
+ *
+ * The @parameter_string can serve multiple purposes. It can be used
+ * to add descriptions for "rest" arguments, which are not parsed by
+ * the #GOptionContext, typically something like "FILES" or
+ * "FILE1 FILE2...". If you are using #G_OPTION_REMAINING for
+ * collecting "rest" arguments, GLib handles this automatically by
+ * using the @arg_description of the corresponding #GOptionEntry in
+ * the usage summary.
+ *
+ * Another usage is to give a short summary of the program
+ * functionality, like " - frob the strings", which will be displayed
+ * in the same line as the usage. For a longer description of the
+ * program functionality that should be displayed as a paragraph
+ * below the usage line, use g_option_context_set_summary().
+ *
+ * Note that the @parameter_string is translated using the
+ * function set with g_option_context_set_translate_func(), so
+ * it should normally be passed untranslated.
+ *
+ * freed with g_option_context_free() after use.
+ *
+ * Returns: a newly created #GOptionContext, which must be
+ * Since: 2.6
+ */
+
+
+/**
+ * g_option_context_parse:
+ * @context: a #GOptionContext
+ * @argc: (inout) (allow-none): a pointer to the number of command line arguments
+ * @argv: (inout) (array length=argc) (allow-none): a pointer to the array of command line arguments
+ * @error: a return location for errors
+ *
+ * Parses the command line arguments, recognizing options
+ * which have been added to @context. A side-effect of
+ * calling this function is that g_set_prgname() will be
+ * called.
+ *
+ * If the parsing is successful, any parsed arguments are
+ * removed from the array and @argc and @argv are updated
+ * accordingly. A '--' option is stripped from @argv
+ * unless there are unparsed options before and after it,
+ * or some of the options after it start with '-'. In case
+ * of an error, @argc and @argv are left unmodified.
+ *
+ * If automatic <option>--help</option> support is enabled
+ * (see g_option_context_set_help_enabled()), and the
+ * @argv array contains one of the recognized help options,
+ * this function will produce help output to stdout and
+ * call <literal>exit (0)</literal>.
+ *
+ * Note that function depends on the
+ * <link linkend="setlocale">current locale</link> for
+ * automatic character set conversion of string and filename
+ * arguments.
+ *
+ * %FALSE if an error occurred
+ *
+ * Returns: %TRUE if the parsing was successful,
+ * Since: 2.6
+ */
+
+
+/**
+ * g_option_context_set_description:
+ * @context: a #GOptionContext
+ * @description: (allow-none): a string to be shown in <option>--help</option> output after the list of options, or %NULL
+ *
+ * Adds a string to be displayed in <option>--help</option> output
+ * after the list of options. This text often includes a bug reporting
+ * address.
+ *
+ * Note that the summary is translated (see
+ * g_option_context_set_translate_func()).
+ *
+ * Since: 2.12
+ */
+
+
+/**
+ * g_option_context_set_help_enabled:
+ * @context: a #GOptionContext
+ * @help_enabled: %TRUE to enable <option>--help</option>, %FALSE to disable it
+ *
+ * Enables or disables automatic generation of <option>--help</option>
+ * output. By default, g_option_context_parse() recognizes
+ * <option>--help</option>, <option>-h</option>,
+ * <option>-?</option>, <option>--help-all</option>
+ * and <option>--help-</option><replaceable>groupname</replaceable> and creates
+ * suitable output to stdout.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * g_option_context_set_ignore_unknown_options:
+ * @context: a #GOptionContext
+ * @ignore_unknown: %TRUE to ignore unknown options, %FALSE to produce an error when unknown options are met
+ *
+ * Sets whether to ignore unknown options or not. If an argument is
+ * ignored, it is left in the @argv array after parsing. By default,
+ * g_option_context_parse() treats unknown options as error.
+ *
+ * This setting does not affect non-option arguments (i.e. arguments
+ * which don't start with a dash). But note that GOption cannot reliably
+ * determine whether a non-option belongs to a preceding unknown option.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * g_option_context_set_main_group:
+ * @context: a #GOptionContext
+ * @group: the group to set as main group
+ *
+ * Sets a #GOptionGroup as main group of the @context.
+ * This has the same effect as calling g_option_context_add_group(),
+ * the only difference is that the options in the main group are
+ * treated differently when generating <option>--help</option> output.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * g_option_context_set_summary:
+ * @context: a #GOptionContext
+ * @summary: (allow-none): a string to be shown in <option>--help</option> output before the list of options, or %NULL
+ *
+ * Adds a string to be displayed in <option>--help</option> output
+ * before the list of options. This is typically a summary of the
+ * program functionality.
+ *
+ * Note that the summary is translated (see
+ * g_option_context_set_translate_func() and
+ * g_option_context_set_translation_domain()).
+ *
+ * Since: 2.12
+ */
+
+
+/**
+ * g_option_context_set_translate_func:
+ * @context: a #GOptionContext
+ * @func: (allow-none): the #GTranslateFunc, or %NULL
+ * @data: (allow-none): user data to pass to @func, or %NULL
+ * @destroy_notify: (allow-none): a function which gets called to free @data, or %NULL
+ *
+ * Sets the function which is used to translate the contexts
+ * user-visible strings, for <option>--help</option> output.
+ * If @func is %NULL, strings are not translated.
+ *
+ * Note that option groups have their own translation functions,
+ * this function only affects the @parameter_string (see g_option_context_new()),
+ * the summary (see g_option_context_set_summary()) and the description
+ * (see g_option_context_set_description()).
+ *
+ * If you are using gettext(), you only need to set the translation
+ * domain, see g_option_context_set_translation_domain().
+ *
+ * Since: 2.12
+ */
+
+
+/**
+ * g_option_context_set_translation_domain:
+ * @context: a #GOptionContext
+ * @domain: the domain to use
+ *
+ * A convenience function to use gettext() for translating
+ * user-visible strings.
+ *
+ * Since: 2.12
+ */
+
+
+/**
+ * g_option_group_add_entries:
+ * @group: a #GOptionGroup
+ * @entries: a %NULL-terminated array of #GOptionEntry<!-- -->s
+ *
+ * Adds the options specified in @entries to @group.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * g_option_group_free:
+ * @group: a #GOptionGroup
+ *
+ * Frees a #GOptionGroup. Note that you must <emphasis>not</emphasis>
+ * free groups which have been added to a #GOptionContext.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * g_option_group_new:
+ * @name: the name for the option group, this is used to provide help for the options in this group with <option>--help-</option>@name
+ * @description: a description for this group to be shown in <option>--help</option>. This string is translated using the translation domain or translation function of the group
+ * @help_description: a description for the <option>--help-</option>@name option. This string is translated using the translation domain or translation function of the group
+ * @user_data: (allow-none): user data that will be passed to the pre- and post-parse hooks, the error hook and to callbacks of %G_OPTION_ARG_CALLBACK options, or %NULL
+ * @destroy: (allow-none): a function that will be called to free @user_data, or %NULL
+ *
+ * Creates a new #GOptionGroup.
+ *
+ * to a #GOptionContext or freed with g_option_group_free().
+ *
+ * Returns: a newly created option group. It should be added
+ * Since: 2.6
+ */
+
+
+/**
+ * g_option_group_set_error_hook:
+ * @group: a #GOptionGroup
+ * @error_func: a function to call when an error occurs
+ *
+ * Associates a function with @group which will be called
+ * from g_option_context_parse() when an error occurs.
+ *
+ * Note that the user data to be passed to @error_func can be
+ * specified when constructing the group with g_option_group_new().
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * g_option_group_set_parse_hooks:
+ * @group: a #GOptionGroup
+ * @pre_parse_func: (allow-none): a function to call before parsing, or %NULL
+ * @post_parse_func: (allow-none): a function to call after parsing, or %NULL
+ *
+ * Associates two functions with @group which will be called
+ * from g_option_context_parse() before the first option is parsed
+ * and after the last option has been parsed, respectively.
+ *
+ * Note that the user data to be passed to @pre_parse_func and
+ * @post_parse_func can be specified when constructing the group
+ * with g_option_group_new().
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * g_option_group_set_translate_func:
+ * @group: a #GOptionGroup
+ * @func: (allow-none): the #GTranslateFunc, or %NULL
+ * @data: (allow-none): user data to pass to @func, or %NULL
+ * @destroy_notify: (allow-none): a function which gets called to free @data, or %NULL
+ *
+ * Sets the function which is used to translate user-visible
+ * strings, for <option>--help</option> output. Different
+ * groups can use different #GTranslateFunc<!-- -->s. If @func
+ * is %NULL, strings are not translated.
+ *
+ * If you are using gettext(), you only need to set the translation
+ * domain, see g_option_group_set_translation_domain().
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * g_option_group_set_translation_domain:
+ * @group: a #GOptionGroup
+ * @domain: the domain to use
+ *
+ * A convenience function to use gettext() for translating
+ * user-visible strings.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * g_parse_debug_string:
+ * @string: (allow-none): a list of debug options separated by colons, spaces, or commas, or %NULL.
+ * @keys: (array length=nkeys): pointer to an array of #GDebugKey which associate strings with bit flags.
+ * @nkeys: the number of #GDebugKey<!-- -->s in the array.
+ *
+ * Parses a string containing debugging options
+ * into a %guint containing bit flags. This is used
+ * within GDK and GTK+ to parse the debug options passed on the
+ * command line or through environment variables.
+ *
+ * If @string is equal to <code>"all"</code>, all flags are set. Any flags
+ * specified along with <code>"all"</code> in @string are inverted; thus,
+ * <code>"all,foo,bar"</code> or <code>"foo,bar,all"</code> sets all flags
+ * except those corresponding to <code>"foo"</code> and <code>"bar"</code>.
+ *
+ * If @string is equal to <code>"help"</code>, all the available keys in @keys
+ * are printed out to standard error.
+ *
+ * Returns: the combined set of bit flags.
+ */
+
+
+/**
+ * g_path_get_basename:
+ * @file_name: the name of the file
+ *
+ * Gets the last component of the filename.
+ *
+ * If @file_name ends with a directory separator it gets the component
+ * before the last slash. If @file_name consists only of directory
+ * separators (and on Windows, possibly a drive letter), a single
+ * separator is returned. If @file_name is empty, it gets ".".
+ *
+ * component of the filename
+ *
+ * Returns: a newly allocated string containing the last
+ */
+
+
+/**
+ * g_path_get_dirname:
+ * @file_name: the name of the file
+ *
+ * Gets the directory components of a file name.
+ *
+ * If the file name has no directory components "." is returned.
+ * The returned string should be freed when no longer needed.
+ *
+ * Returns: the directory components of the file
+ */
+
+
+/**
+ * g_path_is_absolute:
+ * @file_name: a file name
+ *
+ * Returns %TRUE if the given @file_name is an absolute file name.
+ * Note that this is a somewhat vague concept on Windows.
+ *
+ * On POSIX systems, an absolute file name is well-defined. It always
+ * starts from the single root directory. For example "/usr/local".
+ *
+ * On Windows, the concepts of current drive and drive-specific
+ * current directory introduce vagueness. This function interprets as
+ * an absolute file name one that either begins with a directory
+ * separator such as "\Users\tml" or begins with the root on a drive,
+ * for example "C:\Windows". The first case also includes UNC paths
+ * such as "\\myserver\docs\foo". In all cases, either slashes or
+ * backslashes are accepted.
+ *
+ * Note that a file name relative to the current drive root does not
+ * truly specify a file uniquely over time and across processes, as
+ * the current drive is a per-process value and can be changed.
+ *
+ * File names relative the current directory on some specific drive,
+ * such as "D:foo/bar", are not interpreted as absolute by this
+ * function, but they obviously are not relative to the normal current
+ * directory as returned by getcwd() or g_get_current_dir()
+ * either. Such paths should be avoided, or need to be handled using
+ * Windows-specific code.
+ *
+ * Returns: %TRUE if @file_name is absolute
+ */
+
+
+/**
+ * g_path_skip_root:
+ * @file_name: a file name
+ *
+ * Returns a pointer into @file_name after the root component,
+ * i.e. after the "/" in UNIX or "C:\" under Windows. If @file_name
+ * is not an absolute path it returns %NULL.
+ *
+ * Returns: a pointer into @file_name after the root component
+ */
+
+
+/**
+ * g_pattern_match:
+ * @pspec: a #GPatternSpec
+ * @string_length: the length of @string (in bytes, i.e. strlen(), <emphasis>not</emphasis> g_utf8_strlen())
+ * @string: the UTF-8 encoded string to match
+ * @string_reversed: (allow-none): the reverse of @string or %NULL
+ * @Returns: %TRUE if @string matches @pspec
+ *
+ * Matches a string against a compiled pattern. Passing the correct
+ * length of the string given is mandatory. The reversed string can be
+ * omitted by passing %NULL, this is more efficient if the reversed
+ * version of the string to be matched is not at hand, as
+ * g_pattern_match() will only construct it if the compiled pattern
+ * requires reverse matches.
+ *
+ * Note that, if the user code will (possibly) match a string against a
+ * multitude of patterns containing wildcards, chances are high that
+ * some patterns will require a reversed string. In this case, it's
+ * more efficient to provide the reversed string to avoid multiple
+ * constructions thereof in the various calls to g_pattern_match().
+ *
+ * Note also that the reverse of a UTF-8 encoded string can in general
+ * <emphasis>not</emphasis> be obtained by g_strreverse(). This works
+ * only if the string doesn't contain any multibyte characters. GLib
+ * offers the g_utf8_strreverse() function to reverse UTF-8 encoded
+ * strings.
+ */
+
+
+/**
+ * g_pattern_match_simple:
+ * @pattern: the UTF-8 encoded pattern
+ * @string: the UTF-8 encoded string to match
+ * @Returns: %TRUE if @string matches @pspec
+ *
+ * Matches a string against a pattern given as a string. If this
+ * function is to be called in a loop, it's more efficient to compile
+ * the pattern once with g_pattern_spec_new() and call
+ * g_pattern_match_string() repeatedly.
+ */
+
+
+/**
+ * g_pattern_match_string:
+ * @pspec: a #GPatternSpec
+ * @string: the UTF-8 encoded string to match
+ * @Returns: %TRUE if @string matches @pspec
+ *
+ * Matches a string against a compiled pattern. If the string is to be
+ * matched against more than one pattern, consider using
+ * g_pattern_match() instead while supplying the reversed string.
+ */
+
+
+/**
+ * g_pattern_spec_equal:
+ * @pspec1: a #GPatternSpec
+ * @pspec2: another #GPatternSpec
+ * @Returns: Whether the compiled patterns are equal
+ *
+ * Compares two compiled pattern specs and returns whether they will
+ * match the same set of strings.
+ */
+
+
+/**
+ * g_pattern_spec_free:
+ * @pspec: a #GPatternSpec
+ *
+ * Frees the memory allocated for the #GPatternSpec.
+ */
+
+
+/**
+ * g_pattern_spec_new:
+ * @pattern: a zero-terminated UTF-8 encoded string
+ * @Returns: a newly-allocated #GPatternSpec
+ *
+ * Compiles a pattern to a #GPatternSpec.
+ */
+
+
+/**
+ * g_pointer_bit_lock:
+ * @address: a pointer to a #gpointer-sized value
+ * @lock_bit: a bit value between 0 and 31
+ *
+ * This is equivalent to g_bit_lock, but working on pointers (or other
+ * pointer-sized values).
+ *
+ * For portability reasons, you may only lock on the bottom 32 bits of
+ * the pointer.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_pointer_bit_trylock:
+ * @address: a pointer to a #gpointer-sized value
+ * @lock_bit: a bit value between 0 and 31
+ *
+ * This is equivalent to g_bit_trylock, but working on pointers (or
+ * other pointer-sized values).
+ *
+ * For portability reasons, you may only lock on the bottom 32 bits of
+ * the pointer.
+ *
+ * Returns: %TRUE if the lock was acquired
+ * Since: 2.30
+ */
+
+
+/**
+ * g_pointer_bit_unlock:
+ * @address: a pointer to a #gpointer-sized value
+ * @lock_bit: a bit value between 0 and 31
+ *
+ * This is equivalent to g_bit_unlock, but working on pointers (or other
+ * pointer-sized values).
+ *
+ * For portability reasons, you may only lock on the bottom 32 bits of
+ * the pointer.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_poll:
+ * @fds: file descriptors to poll
+ * @nfds: the number of file descriptors in @fds
+ * @timeout: amount of time to wait, in milliseconds, or -1 to wait forever
+ *
+ * Polls @fds, as with the poll() system call, but portably. (On
+ * systems that don't have poll(), it is emulated using select().)
+ * This is used internally by #GMainContext, but it can be called
+ * directly if you need to block until a file descriptor is ready, but
+ * don't want to run the full main loop.
+ *
+ * Each element of @fds is a #GPollFD describing a single file
+ * descriptor to poll. The %fd field indicates the file descriptor,
+ * and the %events field indicates the events to poll for. On return,
+ * the %revents fields will be filled with the events that actually
+ * occurred.
+ *
+ * On POSIX systems, the file descriptors in @fds can be any sort of
+ * file descriptor, but the situation is much more complicated on
+ * Windows. If you need to use g_poll() in code that has to run on
+ * Windows, the easiest solution is to construct all of your
+ * #GPollFD<!-- -->s with g_io_channel_win32_make_pollfd().
+ *
+ * were filled in, or 0 if the operation timed out, or -1 on error or
+ * if the call was interrupted.
+ *
+ * Returns: the number of entries in @fds whose %revents fields
+ * Since: 2.20
+ */
+
+
+/**
+ * g_prefix_error:
+ * @err: (allow-none): a return location for a #GError, or %NULL
+ * @format: printf()-style format string
+ * @...: arguments to @format
+ * @err is %NULL (ie: no error variable) then do
+ *
+ * Formats a string according to @format and
+ * prefix it to an existing error message.  If
+ * nothing.
+ *
+ * If *@err is %NULL (ie: an error variable is
+ * present but there is no error condition) then
+ * also do nothing.  Whether or not it makes
+ * sense to take advantage of this feature is up
+ * to you.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_print:
+ * @format: the message format. See the printf() documentation
+ * @...: the parameters to insert into the format string
+ *
+ * Outputs a formatted message via the print handler.
+ * The default print handler simply outputs the message to stdout.
+ *
+ * g_print() should not be used from within libraries for debugging
+ * messages, since it may be redirected by applications to special
+ * purpose message windows or even files. Instead, libraries should
+ * use g_log(), or the convenience functions g_message(), g_warning()
+ * and g_error().
+ */
+
+
+/**
+ * g_printerr:
+ * @format: the message format. See the printf() documentation
+ * @...: the parameters to insert into the format string
+ *
+ * Outputs a formatted message via the error message handler.
+ * The default handler simply outputs the message to stderr.
+ *
+ * g_printerr() should not be used from within libraries.
+ * Instead g_log() should be used, or the convenience functions
+ * g_message(), g_warning() and g_error().
+ */
+
+
+/**
+ * g_printf:
+ * @format: a standard printf() format string, but notice <link linkend="string-precision">string precision pitfalls</link>.
+ * @...: the arguments to insert in the output.
+ *
+ * An implementation of the standard printf() function which supports
+ * positional parameters, as specified in the Single Unix Specification.
+ *
+ * Returns: the number of bytes printed.
+ * Since: 2.2
+ */
+
+
+/**
+ * g_printf_string_upper_bound:
+ * @format: the format string. See the printf() documentation
+ * @args: the parameters to be inserted into the format string
+ *
+ * Calculates the maximum space needed to store the output
+ * of the sprintf() function.
+ *
+ * Returns: the maximum space needed to store the formatted string
+ */
+
+
+/**
+ * g_private_get:
+ * @key: a #GPrivate
+ *
+ * Returns the current value of the thread local variable @key.
+ *
+ * If the value has not yet been set in this thread, %NULL is returned.
+ * Values are never copied between threads (when a new thread is
+ * created, for example).
+ *
+ * Returns: the thread-local value
+ */
+
+
+/**
+ * g_private_replace:
+ * @key: a #GPrivate
+ * @value: the new value
+ *
+ * Sets the thread local variable @key to have the value @value in the
+ * current thread.
+ *
+ * This function differs from g_private_set() in the following way: if
+ * the previous value was non-%NULL then the #GDestroyNotify handler for
+ * @key is run on it.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_private_set:
+ * @key: a #GPrivate
+ * @value: the new value
+ *
+ * Sets the thread local variable @key to have the value @value in the
+ * current thread.
+ *
+ * This function differs from g_private_replace() in the following way:
+ * the #GDestroyNotify for @key is not called on the old value.
+ */
+
+
+/**
+ * g_propagate_error:
+ * @dest: error return location
+ * @src: error to move into the return location
+ *
+ * If @dest is %NULL, free @src; otherwise, moves @src into *@dest.
+ * The error variable @dest points to must be %NULL.
+ */
+
+
+/**
+ * g_propagate_prefixed_error:
+ * @dest: error return location
+ * @src: error to move into the return location
+ * @format: printf()-style format string
+ * @...: arguments to @format
+ *
+ * If @dest is %NULL, free @src; otherwise,
+ * moves @src into *@dest. *@dest must be %NULL.
+ * After the move, add a prefix as with
+ * g_prefix_error().
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_ptr_array_add:
+ * @array: a #GPtrArray.
+ * @data: the pointer to add.
+ *
+ * Adds a pointer to the end of the pointer array. The array will grow
+ * in size automatically if necessary.
+ */
+
+
+/**
+ * g_ptr_array_foreach:
+ * @array: a #GPtrArray
+ * @func: the function to call for each array element
+ * @user_data: user data to pass to the function
+ *
+ * Calls a function for each element of a #GPtrArray.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_ptr_array_free:
+ * @array: a #GPtrArray.
+ * @free_seg: if %TRUE the actual pointer array is freed as well.
+ * @Returns: the pointer array if @free_seg is %FALSE, otherwise %NULL. The pointer array should be freed using g_free().
+ *
+ * Frees the memory allocated for the #GPtrArray. If @free_seg is %TRUE
+ * it frees the memory block holding the elements as well. Pass %FALSE
+ * if you want to free the #GPtrArray wrapper but preserve the
+ * underlying array for use elsewhere. If the reference count of @array
+ * is greater than one, the #GPtrArray wrapper is preserved but the
+ * size of @array will be set to zero.
+ *
+ * <note><para>If array contents point to dynamically-allocated
+ * memory, they should be freed separately if @free_seg is %TRUE and no
+ * #GDestroyNotify function has been set for @array.</para></note>
+ */
+
+
+/**
+ * g_ptr_array_index:
+ * @array: a #GPtrArray.
+ * @index_: the index of the pointer to return.
+ * @Returns: the pointer at the given index.
+ *
+ * Returns the pointer at the given index of the pointer array.
+ */
+
+
+/**
+ * g_ptr_array_new:
+ * @Returns: the new #GPtrArray.
+ *
+ * Creates a new #GPtrArray with a reference count of 1.
+ */
+
+
+/**
+ * g_ptr_array_new_full:
+ * @reserved_size: number of pointers preallocated.
+ * @element_free_func: (allow-none): A function to free elements with destroy @array or %NULL.
+ *
+ * Creates a new #GPtrArray with @reserved_size pointers preallocated
+ * and a reference count of 1. This avoids frequent reallocation, if
+ * you are going to add many pointers to the array. Note however that
+ * the size of the array is still 0. It also set @element_free_func
+ * for freeing each element when the array is destroyed either via
+ * g_ptr_array_unref(), when g_ptr_array_free() is called with @free_segment
+ * set to %TRUE or when removing elements.
+ *
+ * Returns: A new #GPtrArray.
+ * Since: 2.30
+ */
+
+
+/**
+ * g_ptr_array_new_with_free_func:
+ * @element_free_func: (allow-none): A function to free elements with destroy @array or %NULL.
+ *
+ * Creates a new #GPtrArray with a reference count of 1 and use @element_free_func
+ * for freeing each element when the array is destroyed either via
+ * g_ptr_array_unref(), when g_ptr_array_free() is called with @free_segment
+ * set to %TRUE or when removing elements.
+ *
+ * Returns: A new #GPtrArray.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_ptr_array_ref:
+ * @array: A #GArray.
+ *
+ * Atomically increments the reference count of @array by one. This
+ * function is MT-safe and may be called from any thread.
+ *
+ * Returns: The passed in #GPtrArray.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_ptr_array_remove:
+ * @array: a #GPtrArray.
+ * @data: the pointer to remove.
+ * @Returns: %TRUE if the pointer is removed. %FALSE if the pointer is not found in the array.
+ *
+ * Removes the first occurrence of the given pointer from the pointer
+ * array. The following elements are moved down one place. If @array
+ * has a non-%NULL #GDestroyNotify function it is called for the
+ * removed element.
+ *
+ * It returns %TRUE if the pointer was removed, or %FALSE if the
+ * pointer was not found.
+ */
+
+
+/**
+ * g_ptr_array_remove_fast:
+ * @array: a #GPtrArray.
+ * @data: the pointer to remove.
+ * @Returns: %TRUE if the pointer was found in the array.
+ *
+ * Removes the first occurrence of the given pointer from the pointer
+ * array. The last element in the array is used to fill in the space,
+ * so this function does not preserve the order of the array. But it is
+ * faster than g_ptr_array_remove(). If @array has a non-%NULL
+ * #GDestroyNotify function it is called for the removed element.
+ *
+ * It returns %TRUE if the pointer was removed, or %FALSE if the
+ * pointer was not found.
+ */
+
+
+/**
+ * g_ptr_array_remove_index:
+ * @array: a #GPtrArray.
+ * @index_: the index of the pointer to remove.
+ * @Returns: the pointer which was removed.
+ *
+ * Removes the pointer at the given index from the pointer array. The
+ * following elements are moved down one place. If @array has a
+ * non-%NULL #GDestroyNotify function it is called for the removed
+ * element.
+ */
+
+
+/**
+ * g_ptr_array_remove_index_fast:
+ * @array: a #GPtrArray.
+ * @index_: the index of the pointer to remove.
+ * @Returns: the pointer which was removed.
+ *
+ * Removes the pointer at the given index from the pointer array. The
+ * last element in the array is used to fill in the space, so this
+ * function does not preserve the order of the array. But it is faster
+ * than g_ptr_array_remove_index(). If @array has a non-%NULL
+ * #GDestroyNotify function it is called for the removed element.
+ */
+
+
+/**
+ * g_ptr_array_remove_range:
+ * @array: a @GPtrArray.
+ * @index_: the index of the first pointer to remove.
+ * @length: the number of pointers to remove.
+ *
+ * Removes the given number of pointers starting at the given index
+ * from a #GPtrArray.  The following elements are moved to close the
+ * gap. If @array has a non-%NULL #GDestroyNotify function it is called
+ * for the removed elements.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_ptr_array_set_free_func:
+ * @array: A #GPtrArray.
+ * @element_free_func: (allow-none): A function to free elements with destroy @array or %NULL.
+ *
+ * Sets a function for freeing each element when @array is destroyed
+ * either via g_ptr_array_unref(), when g_ptr_array_free() is called
+ * with @free_segment set to %TRUE or when removing elements.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_ptr_array_set_size:
+ * @array: a #GPtrArray.
+ * @length: the new length of the pointer array.
+ *
+ * Sets the size of the array. When making the array larger,
+ * newly-added elements will be set to %NULL. When making it smaller,
+ * if @array has a non-%NULL #GDestroyNotify function then it will be
+ * called for the removed elements.
+ */
+
+
+/**
+ * g_ptr_array_sized_new:
+ * @reserved_size: number of pointers preallocated.
+ * @Returns: the new #GPtrArray.
+ *
+ * Creates a new #GPtrArray with @reserved_size pointers preallocated
+ * and a reference count of 1. This avoids frequent reallocation, if
+ * you are going to add many pointers to the array. Note however that
+ * the size of the array is still 0.
+ */
+
+
+/**
+ * g_ptr_array_sort:
+ * @array: a #GPtrArray.
+ * @compare_func: comparison function.
+ *
+ * Sorts the array, using @compare_func which should be a qsort()-style
+ * comparison function (returns less than zero for first arg is less
+ * than second arg, zero for equal, greater than zero if irst arg is
+ * greater than second arg).
+ *
+ * <note><para>The comparison function for g_ptr_array_sort() doesn't
+ * take the pointers from the array as arguments, it takes pointers to
+ * the pointers in the array.</para></note>
+ *
+ * This is guaranteed to be a stable sort since version 2.32.
+ */
+
+
+/**
+ * g_ptr_array_sort_with_data:
+ * @array: a #GPtrArray.
+ * @compare_func: comparison function.
+ * @user_data: data to pass to @compare_func.
+ *
+ * Like g_ptr_array_sort(), but the comparison function has an extra
+ * user data argument.
+ *
+ * <note><para>The comparison function for g_ptr_array_sort_with_data()
+ * doesn't take the pointers from the array as arguments, it takes
+ * pointers to the pointers in the array.</para></note>
+ *
+ * This is guaranteed to be a stable sort since version 2.32.
+ */
+
+
+/**
+ * g_ptr_array_unref:
+ * @array: A #GPtrArray.
+ *
+ * Atomically decrements the reference count of @array by one. If the
+ * reference count drops to 0, the effect is the same as calling
+ * g_ptr_array_free() with @free_segment set to %TRUE. This function
+ * is MT-safe and may be called from any thread.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_qsort_with_data:
+ * @pbase: start of array to sort
+ * @total_elems: elements in the array
+ * @size: size of each element
+ * @compare_func: function to compare elements
+ * @user_data: data to pass to @compare_func
+ *
+ * This is just like the standard C qsort() function, but
+ * the comparison routine accepts a user data argument.
+ *
+ * This is guaranteed to be a stable sort since version 2.32.
+ */
+
+
+/**
+ * g_quark_from_static_string:
+ * @string: (allow-none): a string.
+ * @Returns: the #GQuark identifying the string, or 0 if @string is %NULL.
+ *
+ * Gets the #GQuark identifying the given (static) string. If the
+ * string does not currently have an associated #GQuark, a new #GQuark
+ * is created, linked to the given string.
+ *
+ * Note that this function is identical to g_quark_from_string() except
+ * that if a new #GQuark is created the string itself is used rather
+ * than a copy. This saves memory, but can only be used if the string
+ * will <emphasis>always</emphasis> exist. It can be used with
+ * statically allocated strings in the main program, but not with
+ * statically allocated memory in dynamically loaded modules, if you
+ * expect to ever unload the module again (e.g. do not use this
+ * function in GTK+ theme engines).
+ */
+
+
+/**
+ * g_quark_from_string:
+ * @string: (allow-none): a string.
+ * @Returns: the #GQuark identifying the string, or 0 if @string is %NULL.
+ *
+ * Gets the #GQuark identifying the given string. If the string does
+ * not currently have an associated #GQuark, a new #GQuark is created,
+ * using a copy of the string.
+ */
+
+
+/**
+ * g_quark_to_string:
+ * @quark: a #GQuark.
+ * @Returns: the string associated with the #GQuark.
+ *
+ * Gets the string associated with the given #GQuark.
+ */
+
+
+/**
+ * g_quark_try_string:
+ * @string: (allow-none): a string.
+ * @Returns: the #GQuark associated with the string, or 0 if @string is %NULL or there is no #GQuark associated with it.
+ *
+ * Gets the #GQuark associated with the given string, or 0 if string is
+ * %NULL or it has no associated #GQuark.
+ *
+ * If you want the GQuark to be created if it doesn't already exist,
+ * use g_quark_from_string() or g_quark_from_static_string().
+ */
+
+
+/**
+ * g_queue_clear:
+ * @queue: a #GQueue
+ *
+ * Removes all the elements in @queue. If queue elements contain
+ * dynamically-allocated memory, they should be freed first.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * g_queue_copy:
+ * @queue: a #GQueue
+ *
+ * Copies a @queue. Note that is a shallow copy. If the elements in the
+ * queue consist of pointers to data, the pointers are copied, but the
+ * actual data is not.
+ *
+ * Returns: A copy of @queue
+ * Since: 2.4
+ */
+
+
+/**
+ * g_queue_delete_link:
+ * @queue: a #GQueue
+ * @link_: a #GList link that <emphasis>must</emphasis> be part of @queue
+ *
+ * Removes @link_ from @queue and frees it.
+ *
+ * @link_ must be part of @queue.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_queue_find:
+ * @queue: a #GQueue
+ * @data: data to find
+ *
+ * Finds the first link in @queue which contains @data.
+ *
+ * Returns: The first link in @queue which contains @data.
+ * Since: 2.4
+ */
+
+
+/**
+ * g_queue_find_custom:
+ * @queue: a #GQueue
+ * @data: user data passed to @func
+ * @func: a #GCompareFunc to call for each element. It should return 0 when the desired element is found
+ *
+ * Finds an element in a #GQueue, using a supplied function to find the
+ * desired element. It iterates over the queue, calling the given function
+ * which should return 0 when the desired element is found. The function
+ * takes two gconstpointer arguments, the #GQueue element's data as the
+ * first argument and the given user data as the second argument.
+ *
+ * Returns: The found link, or %NULL if it wasn't found
+ * Since: 2.4
+ */
+
+
+/**
+ * g_queue_foreach:
+ * @queue: a #GQueue
+ * @func: the function to call for each element's data
+ * @user_data: user data to pass to @func
+ *
+ * Calls @func for each element in the queue passing @user_data to the
+ * function.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_queue_free:
+ * @queue: a #GQueue.
+ *
+ * Frees the memory allocated for the #GQueue. Only call this function if
+ * @queue was created with g_queue_new(). If queue elements contain
+ * dynamically-allocated memory, they should be freed first.
+ *
+ * <note><para>
+ * If queue elements contain dynamically-allocated memory,
+ * you should either use g_queue_free_full() or free them manually
+ * first.
+ * </para></note>
+ */
+
+
+/**
+ * g_queue_free_full:
+ * @queue: a pointer to a #GQueue
+ * @free_func: the function to be called to free each element's data
+ *
+ * Convenience method, which frees all the memory used by a #GQueue, and
+ * calls the specified destroy function on every element's data.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_queue_get_length:
+ * @queue: a #GQueue
+ *
+ * Returns the number of items in @queue.
+ *
+ * Returns: The number of items in @queue.
+ * Since: 2.4
+ */
+
+
+/**
+ * g_queue_index:
+ * @queue: a #GQueue
+ * @data: the data to find.
+ *
+ * Returns the position of the first element in @queue which contains @data.
+ *
+ * Returns: The position of the first element in @queue which contains @data, or -1 if no element in @queue contains @data.
+ * Since: 2.4
+ */
+
+
+/**
+ * g_queue_init:
+ * @queue: an uninitialized #GQueue
+ *
+ * A statically-allocated #GQueue must be initialized with this function
+ * before it can be used. Alternatively you can initialize it with
+ * #G_QUEUE_INIT. It is not necessary to initialize queues created with
+ * g_queue_new().
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * g_queue_insert_after:
+ * @queue: a #GQueue
+ * @sibling: a #GList link that <emphasis>must</emphasis> be part of @queue
+ * @data: the data to insert
+ *
+ * Inserts @data into @queue after @sibling
+ *
+ * @sibling must be part of @queue
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_queue_insert_before:
+ * @queue: a #GQueue
+ * @sibling: a #GList link that <emphasis>must</emphasis> be part of @queue
+ * @data: the data to insert
+ *
+ * Inserts @data into @queue before @sibling.
+ *
+ * @sibling must be part of @queue.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_queue_insert_sorted:
+ * @queue: a #GQueue
+ * @data: the data to insert
+ * @func: the #GCompareDataFunc used to compare elements in the queue. It is called with two elements of the @queue and @user_data. It should return 0 if the elements are equal, a negative value if the first element comes before the second, and a positive value if the second element comes before the first.
+ * @user_data: user data passed to @func.
+ *
+ * Inserts @data into @queue using @func to determine the new position.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_queue_is_empty:
+ * @queue: a #GQueue.
+ *
+ * Returns %TRUE if the queue is empty.
+ *
+ * Returns: %TRUE if the queue is empty.
+ */
+
+
+/**
+ * g_queue_link_index:
+ * @queue: a #GQueue
+ * @link_: A #GList link
+ *
+ * Returns the position of @link_ in @queue.
+ *
+ * not part of @queue
+ *
+ * Returns: The position of @link_, or -1 if the link is
+ * Since: 2.4
+ */
+
+
+/**
+ * g_queue_new:
+ *
+ * Creates a new #GQueue.
+ *
+ * Returns: a new #GQueue.
+ */
+
+
+/**
+ * g_queue_peek_head:
+ * @queue: a #GQueue.
+ *
+ * Returns the first element of the queue.
+ *
+ * is empty.
+ *
+ * Returns: the data of the first element in the queue, or %NULL if the queue
+ */
+
+
+/**
+ * g_queue_peek_head_link:
+ * @queue: a #GQueue
+ *
+ * Returns the first link in @queue
+ *
+ * Returns: the first link in @queue, or %NULL if @queue is empty
+ * Since: 2.4
+ */
+
+
+/**
+ * g_queue_peek_nth:
+ * @queue: a #GQueue
+ * @n: the position of the element.
+ *
+ * Returns the @n'th element of @queue.
+ *
+ * off the end of @queue.
+ *
+ * Returns: The data for the @n'th element of @queue, or %NULL if @n is
+ * Since: 2.4
+ */
+
+
+/**
+ * g_queue_peek_nth_link:
+ * @queue: a #GQueue
+ * @n: the position of the link
+ *
+ * Returns the link at the given position
+ *
+ * end of the list
+ *
+ * Returns: The link at the @n'th position, or %NULL if @n is off the
+ * Since: 2.4
+ */
+
+
+/**
+ * g_queue_peek_tail:
+ * @queue: a #GQueue.
+ *
+ * Returns the last element of the queue.
+ *
+ * is empty.
+ *
+ * Returns: the data of the last element in the queue, or %NULL if the queue
+ */
+
+
+/**
+ * g_queue_peek_tail_link:
+ * @queue: a #GQueue
+ *
+ * Returns the last link @queue.
+ *
+ * Returns: the last link in @queue, or %NULL if @queue is empty
+ * Since: 2.4
+ */
+
+
+/**
+ * g_queue_pop_head:
+ * @queue: a #GQueue.
+ *
+ * Removes the first element of the queue.
+ *
+ * is empty.
+ *
+ * Returns: the data of the first element in the queue, or %NULL if the queue
+ */
+
+
+/**
+ * g_queue_pop_head_link:
+ * @queue: a #GQueue.
+ *
+ * Removes the first element of the queue.
+ *
+ * is empty.
+ *
+ * Returns: the #GList element at the head of the queue, or %NULL if the queue
+ */
+
+
+/**
+ * g_queue_pop_nth:
+ * @queue: a #GQueue
+ * @n: the position of the element.
+ *
+ * Removes the @n'th element of @queue.
+ *
+ * Returns: the element's data, or %NULL if @n is off the end of @queue.
+ * Since: 2.4
+ */
+
+
+/**
+ * g_queue_pop_nth_link:
+ * @queue: a #GQueue
+ * @n: the link's position
+ *
+ * Removes and returns the link at the given position.
+ *
+ * Returns: The @n'th link, or %NULL if @n is off the end of @queue.
+ * Since: 2.4
+ */
+
+
+/**
+ * g_queue_pop_tail:
+ * @queue: a #GQueue.
+ *
+ * Removes the last element of the queue.
+ *
+ * is empty.
+ *
+ * Returns: the data of the last element in the queue, or %NULL if the queue
+ */
+
+
+/**
+ * g_queue_pop_tail_link:
+ * @queue: a #GQueue.
+ *
+ * Removes the last element of the queue.
+ *
+ * is empty.
+ *
+ * Returns: the #GList element at the tail of the queue, or %NULL if the queue
+ */
+
+
+/**
+ * g_queue_push_head:
+ * @queue: a #GQueue.
+ * @data: the data for the new element.
+ *
+ * Adds a new element at the head of the queue.
+ */
+
+
+/**
+ * g_queue_push_head_link:
+ * @queue: a #GQueue.
+ * @link_: a single #GList element, <emphasis>not</emphasis> a list with more than one element.
+ *
+ * Adds a new element at the head of the queue.
+ */
+
+
+/**
+ * g_queue_push_nth:
+ * @queue: a #GQueue
+ * @data: the data for the new element
+ * @n: the position to insert the new element. If @n is negative or larger than the number of elements in the @queue, the element is added to the end of the queue.
+ *
+ * Inserts a new element into @queue at the given position
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_queue_push_nth_link:
+ * @queue: a #GQueue
+ * @n: the position to insert the link. If this is negative or larger than the number of elements in @queue, the link is added to the end of @queue.
+ * @link_: the link to add to @queue
+ *
+ * Inserts @link into @queue at the given position.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_queue_push_tail:
+ * @queue: a #GQueue.
+ * @data: the data for the new element.
+ *
+ * Adds a new element at the tail of the queue.
+ */
+
+
+/**
+ * g_queue_push_tail_link:
+ * @queue: a #GQueue.
+ * @link_: a single #GList element, <emphasis>not</emphasis> a list with more than one element.
+ *
+ * Adds a new element at the tail of the queue.
+ */
+
+
+/**
+ * g_queue_remove:
+ * @queue: a #GQueue
+ * @data: data to remove.
+ *
+ * Removes the first element in @queue that contains @data.
+ *
+ * Returns: %TRUE if @data was found and removed from @queue
+ * Since: 2.4
+ */
+
+
+/**
+ * g_queue_remove_all:
+ * @queue: a #GQueue
+ * @data: data to remove
+ *
+ * Remove all elements whose data equals @data from @queue.
+ *
+ * Returns: the number of elements removed from @queue
+ * Since: 2.4
+ */
+
+
+/**
+ * g_queue_reverse:
+ * @queue: a #GQueue
+ *
+ * Reverses the order of the items in @queue.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_queue_sort:
+ * @queue: a #GQueue
+ * @compare_func: the #GCompareDataFunc used to sort @queue. This function is passed two elements of the queue and should return 0 if they are equal, a negative value if the first comes before the second, and a positive value if the second comes before the first.
+ * @user_data: user data passed to @compare_func
+ *
+ * Sorts @queue using @compare_func.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_queue_unlink:
+ * @queue: a #GQueue
+ * @link_: a #GList link that <emphasis>must</emphasis> be part of @queue
+ *
+ * Unlinks @link_ so that it will no longer be part of @queue. The link is
+ * not freed.
+ *
+ * @link_ must be part of @queue,
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_rand_boolean:
+ * @rand_: a #GRand.
+ * @Returns: a random #gboolean.
+ *
+ * Returns a random #gboolean from @rand_. This corresponds to a
+ * unbiased coin toss.
+ */
+
+
+/**
+ * g_rand_copy:
+ * @rand_: a #GRand.
+ *
+ * Copies a #GRand into a new one with the same exact state as before.
+ * This way you can take a snapshot of the random number generator for
+ * replaying later.
+ *
+ * Returns: the new #GRand.
+ * Since: 2.4
+ */
+
+
+/**
+ * g_rand_double:
+ * @rand_: a #GRand.
+ *
+ * Returns the next random #gdouble from @rand_ equally distributed over
+ * the range [0..1).
+ *
+ * Returns: A random number.
+ */
+
+
+/**
+ * g_rand_double_range:
+ * @rand_: a #GRand.
+ * @begin: lower closed bound of the interval.
+ * @end: upper open bound of the interval.
+ *
+ * Returns the next random #gdouble from @rand_ equally distributed over
+ * the range [@begin..@end).
+ *
+ * Returns: A random number.
+ */
+
+
+/**
+ * g_rand_free:
+ * @rand_: a #GRand.
+ *
+ * Frees the memory allocated for the #GRand.
+ */
+
+
+/**
+ * g_rand_int:
+ * @rand_: a #GRand.
+ *
+ * Returns the next random #guint32 from @rand_ equally distributed over
+ * the range [0..2^32-1].
+ *
+ * Returns: A random number.
+ */
+
+
+/**
+ * g_rand_int_range:
+ * @rand_: a #GRand.
+ * @begin: lower closed bound of the interval.
+ * @end: upper open bound of the interval.
+ *
+ * Returns the next random #gint32 from @rand_ equally distributed over
+ * the range [@begin..@end-1].
+ *
+ * Returns: A random number.
+ */
+
+
+/**
+ * g_rand_new:
+ *
+ * Creates a new random number generator initialized with a seed taken
+ * either from <filename>/dev/urandom</filename> (if existing) or from
+ * the current time (as a fallback).
+ *
+ * Returns: the new #GRand.
+ */
+
+
+/**
+ * g_rand_new_with_seed:
+ * @seed: a value to initialize the random number generator.
+ *
+ * Creates a new random number generator initialized with @seed.
+ *
+ * Returns: the new #GRand.
+ */
+
+
+/**
+ * g_rand_new_with_seed_array:
+ * @seed: an array of seeds to initialize the random number generator.
+ * @seed_length: an array of seeds to initialize the random number generator.
+ *
+ * Creates a new random number generator initialized with @seed.
+ *
+ * Returns: the new #GRand.
+ * Since: 2.4
+ */
+
+
+/**
+ * g_rand_set_seed:
+ * @rand_: a #GRand.
+ * @seed: a value to reinitialize the random number generator.
+ *
+ * Sets the seed for the random number generator #GRand to @seed.
+ */
+
+
+/**
+ * g_rand_set_seed_array:
+ * @rand_: a #GRand.
+ * @seed: array to initialize with
+ * @seed_length: length of array
+ *
+ * Initializes the random number generator by an array of
+ * longs.  Array can be of arbitrary size, though only the
+ * first 624 values are taken.  This function is useful
+ * if you have many low entropy seeds, or if you require more then
+ * 32bits of actual entropy for your application.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_random_boolean:
+ * @Returns: a random #gboolean.
+ *
+ * Returns a random #gboolean. This corresponds to a unbiased coin toss.
+ */
+
+
+/**
+ * g_random_double:
+ *
+ * Returns a random #gdouble equally distributed over the range [0..1).
+ *
+ * Returns: A random number.
+ */
+
+
+/**
+ * g_random_double_range:
+ * @begin: lower closed bound of the interval.
+ * @end: upper open bound of the interval.
+ *
+ * Returns a random #gdouble equally distributed over the range [@begin..@end).
+ *
+ * Returns: A random number.
+ */
+
+
+/**
+ * g_random_int:
+ *
+ * Return a random #guint32 equally distributed over the range
+ * [0..2^32-1].
+ *
+ * Returns: A random number.
+ */
+
+
+/**
+ * g_random_int_range:
+ * @begin: lower closed bound of the interval.
+ * @end: upper open bound of the interval.
+ *
+ * Returns a random #gint32 equally distributed over the range
+ * [@begin..@end-1].
+ *
+ * Returns: A random number.
+ */
+
+
+/**
+ * g_random_set_seed:
+ * @seed: a value to reinitialize the global random number generator.
+ *
+ * Sets the seed for the global random number generator, which is used
+ * by the <function>g_random_*</function> functions, to @seed.
+ */
+
+
+/**
+ * g_realloc:
+ * @mem: the memory to reallocate
+ * @n_bytes: new size of the memory in bytes
+ *
+ * Reallocates the memory pointed to by @mem, so that it now has space for
+ * @n_bytes bytes of memory. It returns the new address of the memory, which may
+ * have been moved. @mem may be %NULL, in which case it's considered to
+ * have zero-length. @n_bytes may be 0, in which case %NULL will be returned
+ * and @mem will be freed unless it is %NULL.
+ *
+ * Returns: the new address of the allocated memory
+ */
+
+
+/**
+ * g_realloc_n:
+ * @mem: the memory to reallocate
+ * @n_blocks: the number of blocks to allocate
+ * @n_block_bytes: the size of each block in bytes
+ *
+ * This function is similar to g_realloc(), allocating (@n_blocks * @n_block_bytes) bytes,
+ * but care is taken to detect possible overflow during multiplication.
+ *
+ * Since: 2.24
+ * Returns: the new address of the allocated memory
+ */
+
+
+/**
+ * g_rec_mutex_clear:
+ * @rec_mutex: an initialized #GRecMutex
+ *
+ * Frees the resources allocated to a recursive mutex with
+ * g_rec_mutex_init().
+ *
+ * This function should not be used with a #GRecMutex that has been
+ * statically allocated.
+ *
+ * Calling g_rec_mutex_clear() on a locked recursive mutex leads
+ * to undefined behaviour.
+ *
+ * Sine: 2.32
+ */
+
+
+/**
+ * g_rec_mutex_init:
+ * @rec_mutex: an uninitialized #GRecMutex
+ *
+ * Initializes a #GRecMutex so that it can be used.
+ *
+ * This function is useful to initialize a recursive mutex
+ * that has been allocated on the stack, or as part of a larger
+ * structure.
+ *
+ * It is not necessary to initialise a recursive mutex that has been
+ * statically allocated.
+ *
+ * |[
+ * typedef struct {
+ * GRecMutex m;
+ * ...
+ * } Blob;
+ *
+ * Blob *b;
+ *
+ * b = g_new (Blob, 1);
+ * g_rec_mutex_init (&b->m);
+ * ]|
+ *
+ * Calling g_rec_mutex_init() on an already initialized #GRecMutex
+ * leads to undefined behaviour.
+ *
+ * To undo the effect of g_rec_mutex_init() when a recursive mutex
+ * is no longer needed, use g_rec_mutex_clear().
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_rec_mutex_lock:
+ * @rec_mutex: a #GRecMutex
+ *
+ * Locks @rec_mutex. If @rec_mutex is already locked by another
+ * thread, the current thread will block until @rec_mutex is
+ * unlocked by the other thread. If @rec_mutex is already locked
+ * by the current thread, the 'lock count' of @rec_mutex is increased.
+ * The mutex will only become available again when it is unlocked
+ * as many times as it has been locked.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_rec_mutex_trylock:
+ * @rec_mutex: a #GRecMutex
+ *
+ * Tries to lock @rec_mutex. If @rec_mutex is already locked
+ * by another thread, it immediately returns %FALSE. Otherwise
+ * it locks @rec_mutex and returns %TRUE.
+ *
+ * Returns: %TRUE if @rec_mutex could be locked
+ * Since: 2.32
+ */
+
+
+/**
+ * g_rec_mutex_unlock:
+ * @rec_mutex: a #GRecMutex
+ *
+ * Unlocks @rec_mutex. If another thread is blocked in a
+ * g_rec_mutex_lock() call for @rec_mutex, it will become unblocked
+ * and can lock @rec_mutex itself.
+ *
+ * Calling g_rec_mutex_unlock() on a recursive mutex that is not
+ * locked by the current thread leads to undefined behaviour.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_regex_check_replacement:
+ * @replacement: the replacement string
+ * @has_references: (out) (allow-none): location to store information about references in @replacement or %NULL
+ * @error: location to store error
+ *
+ * Checks whether @replacement is a valid replacement string
+ * (see g_regex_replace()), i.e. that all escape sequences in
+ * it are valid.
+ *
+ * If @has_references is not %NULL then @replacement is checked
+ * for pattern references. For instance, replacement text 'foo\n'
+ * does not contain references and may be evaluated without information
+ * about actual match, but '\0\1' (whole match followed by first
+ * subpattern) requires valid #GMatchInfo object.
+ *
+ * Returns: whether @replacement is a valid replacement string
+ * Since: 2.14
+ */
+
+
+/**
+ * g_regex_escape_nul:
+ * @string: the string to escape
+ * @length: the length of @string
+ *
+ * Escapes the nul characters in @string to "\x00".  It can be used
+ * to compile a regex with embedded nul characters.
+ *
+ * For completeness, @length can be -1 for a nul-terminated string.
+ * In this case the output string will be of course equal to @string.
+ *
+ * Returns: a newly-allocated escaped string
+ * Since: 2.30
+ */
+
+
+/**
+ * g_regex_escape_string:
+ * @string: (array length=length): the string to escape
+ * @length: the length of @string, or -1 if @string is nul-terminated
+ *
+ * Escapes the special characters used for regular expressions
+ * in @string, for instance "a.b*c" becomes "a\.b\*c". This
+ * function is useful to dynamically generate regular expressions.
+ *
+ * @string can contain nul characters that are replaced with "\0",
+ * in this case remember to specify the correct length of @string
+ * in @length.
+ *
+ * Returns: a newly-allocated escaped string
+ * Since: 2.14
+ */
+
+
+/**
+ * g_regex_get_capture_count:
+ * @regex: a #GRegex
+ *
+ * Returns the number of capturing subpatterns in the pattern.
+ *
+ * Returns: the number of capturing subpatterns
+ * Since: 2.14
+ */
+
+
+/**
+ * g_regex_get_compile_flags:
+ * @regex: a #GRegex
+ *
+ * Returns the compile options that @regex was created with.
+ *
+ * Returns: flags from #GRegexCompileFlags
+ * Since: 2.26
+ */
+
+
+/**
+ * g_regex_get_match_flags:
+ * @regex: a #GRegex
+ *
+ * Returns the match options that @regex was created with.
+ *
+ * Returns: flags from #GRegexMatchFlags
+ * Since: 2.26
+ */
+
+
+/**
+ * g_regex_get_max_backref:
+ * @regex: a #GRegex
+ *
+ * Returns the number of the highest back reference
+ * in the pattern, or 0 if the pattern does not contain
+ * back references.
+ *
+ * Returns: the number of the highest back reference
+ * Since: 2.14
+ */
+
+
+/**
+ * g_regex_get_pattern:
+ * @regex: a #GRegex structure
+ *
+ * Gets the pattern string associated with @regex, i.e. a copy of
+ * the string passed to g_regex_new().
+ *
+ * Returns: the pattern of @regex
+ * Since: 2.14
+ */
+
+
+/**
+ * g_regex_get_string_number:
+ * @regex: #GRegex structure
+ * @name: name of the subexpression
+ *
+ * Retrieves the number of the subexpression named @name.
+ *
+ * does not exists
+ *
+ * Returns: The number of the subexpression or -1 if @name
+ * Since: 2.14
+ */
+
+
+/**
+ * g_regex_match:
+ * @regex: a #GRegex structure from g_regex_new()
+ * @string: the string to scan for matches
+ * @match_options: match options
+ * @match_info: (out) (allow-none): pointer to location where to store the #GMatchInfo, or %NULL if you do not need it
+ *
+ * Scans for a match in string for the pattern in @regex.
+ * The @match_options are combined with the match options specified
+ * when the @regex structure was created, letting you have more
+ * flexibility in reusing #GRegex structures.
+ *
+ * A #GMatchInfo structure, used to get information on the match,
+ * is stored in @match_info if not %NULL. Note that if @match_info
+ * is not %NULL then it is created even if the function returns %FALSE,
+ * i.e. you must free it regardless if regular expression actually matched.
+ *
+ * To retrieve all the non-overlapping matches of the pattern in
+ * string you can use g_match_info_next().
+ *
+ * |[
+ * static void
+ * print_uppercase_words (const gchar *string)
+ * {
+ * /&ast; Print all uppercase-only words. &ast;/
+ * GRegex *regex;
+ * GMatchInfo *match_info;
+ * &nbsp;
+ * regex = g_regex_new ("[A-Z]+", 0, 0, NULL);
+ * g_regex_match (regex, string, 0, &amp;match_info);
+ * while (g_match_info_matches (match_info))
+ * {
+ * gchar *word = g_match_info_fetch (match_info, 0);
+ * g_print ("Found: %s\n", word);
+ * g_free (word);
+ * g_match_info_next (match_info, NULL);
+ * }
+ * g_match_info_free (match_info);
+ * g_regex_unref (regex);
+ * }
+ * ]|
+ *
+ * @string is not copied and is used in #GMatchInfo internally. If
+ * you use any #GMatchInfo method (except g_match_info_free()) after
+ * freeing or modifying @string then the behaviour is undefined.
+ *
+ * Returns: %TRUE is the string matched, %FALSE otherwise
+ * Since: 2.14
+ */
+
+
+/**
+ * g_regex_match_all:
+ * @regex: a #GRegex structure from g_regex_new()
+ * @string: the string to scan for matches
+ * @match_options: match options
+ * @match_info: (out) (allow-none): pointer to location where to store the #GMatchInfo, or %NULL if you do not need it
+ *
+ * Using the standard algorithm for regular expression matching only
+ * the longest match in the string is retrieved. This function uses
+ * a different algorithm so it can retrieve all the possible matches.
+ * For more documentation see g_regex_match_all_full().
+ *
+ * A #GMatchInfo structure, used to get information on the match, is
+ * stored in @match_info if not %NULL. Note that if @match_info is
+ * not %NULL then it is created even if the function returns %FALSE,
+ * i.e. you must free it regardless if regular expression actually
+ * matched.
+ *
+ * @string is not copied and is used in #GMatchInfo internally. If
+ * you use any #GMatchInfo method (except g_match_info_free()) after
+ * freeing or modifying @string then the behaviour is undefined.
+ *
+ * Returns: %TRUE is the string matched, %FALSE otherwise
+ * Since: 2.14
+ */
+
+
+/**
+ * g_regex_match_all_full:
+ * @regex: a #GRegex structure from g_regex_new()
+ * @string: (array length=string_len): the string to scan for matches
+ * @string_len: the length of @string, or -1 if @string is nul-terminated
+ * @start_position: starting index of the string to match
+ * @match_options: match options
+ * @match_info: (out) (allow-none): pointer to location where to store the #GMatchInfo, or %NULL if you do not need it
+ * @error: location to store the error occurring, or %NULL to ignore errors
+ *
+ * Using the standard algorithm for regular expression matching only
+ * the longest match in the string is retrieved, it is not possible
+ * to obtain all the available matches. For instance matching
+ * "&lt;a&gt; &lt;b&gt; &lt;c&gt;" against the pattern "&lt;.*&gt;"
+ * you get "&lt;a&gt; &lt;b&gt; &lt;c&gt;".
+ *
+ * This function uses a different algorithm (called DFA, i.e. deterministic
+ * finite automaton), so it can retrieve all the possible matches, all
+ * starting at the same point in the string. For instance matching
+ * "&lt;a&gt; &lt;b&gt; &lt;c&gt;" against the pattern "&lt;.*&gt;"
+ * you would obtain three matches: "&lt;a&gt; &lt;b&gt; &lt;c&gt;",
+ * "&lt;a&gt; &lt;b&gt;" and "&lt;a&gt;".
+ *
+ * The number of matched strings is retrieved using
+ * g_match_info_get_match_count(). To obtain the matched strings and
+ * their position you can use, respectively, g_match_info_fetch() and
+ * g_match_info_fetch_pos(). Note that the strings are returned in
+ * reverse order of length; that is, the longest matching string is
+ * given first.
+ *
+ * Note that the DFA algorithm is slower than the standard one and it
+ * is not able to capture substrings, so backreferences do not work.
+ *
+ * Setting @start_position differs from just passing over a shortened
+ * string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern
+ * that begins with any kind of lookbehind assertion, such as "\b".
+ *
+ * A #GMatchInfo structure, used to get information on the match, is
+ * stored in @match_info if not %NULL. Note that if @match_info is
+ * not %NULL then it is created even if the function returns %FALSE,
+ * i.e. you must free it regardless if regular expression actually
+ * matched.
+ *
+ * @string is not copied and is used in #GMatchInfo internally. If
+ * you use any #GMatchInfo method (except g_match_info_free()) after
+ * freeing or modifying @string then the behaviour is undefined.
+ *
+ * Returns: %TRUE is the string matched, %FALSE otherwise
+ * Since: 2.14
+ */
+
+
+/**
+ * g_regex_match_full:
+ * @regex: a #GRegex structure from g_regex_new()
+ * @string: (array length=string_len): the string to scan for matches
+ * @string_len: the length of @string, or -1 if @string is nul-terminated
+ * @start_position: starting index of the string to match
+ * @match_options: match options
+ * @match_info: (out) (allow-none): pointer to location where to store the #GMatchInfo, or %NULL if you do not need it
+ * @error: location to store the error occurring, or %NULL to ignore errors
+ *
+ * Scans for a match in string for the pattern in @regex.
+ * The @match_options are combined with the match options specified
+ * when the @regex structure was created, letting you have more
+ * flexibility in reusing #GRegex structures.
+ *
+ * Setting @start_position differs from just passing over a shortened
+ * string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern
+ * that begins with any kind of lookbehind assertion, such as "\b".
+ *
+ * A #GMatchInfo structure, used to get information on the match, is
+ * stored in @match_info if not %NULL. Note that if @match_info is
+ * not %NULL then it is created even if the function returns %FALSE,
+ * i.e. you must free it regardless if regular expression actually
+ * matched.
+ *
+ * @string is not copied and is used in #GMatchInfo internally. If
+ * you use any #GMatchInfo method (except g_match_info_free()) after
+ * freeing or modifying @string then the behaviour is undefined.
+ *
+ * To retrieve all the non-overlapping matches of the pattern in
+ * string you can use g_match_info_next().
+ *
+ * |[
+ * static void
+ * print_uppercase_words (const gchar *string)
+ * {
+ * /&ast; Print all uppercase-only words. &ast;/
+ * GRegex *regex;
+ * GMatchInfo *match_info;
+ * GError *error = NULL;
+ * &nbsp;
+ * regex = g_regex_new ("[A-Z]+", 0, 0, NULL);
+ * g_regex_match_full (regex, string, -1, 0, 0, &amp;match_info, &amp;error);
+ * while (g_match_info_matches (match_info))
+ * {
+ * gchar *word = g_match_info_fetch (match_info, 0);
+ * g_print ("Found: %s\n", word);
+ * g_free (word);
+ * g_match_info_next (match_info, &amp;error);
+ * }
+ * g_match_info_free (match_info);
+ * g_regex_unref (regex);
+ * if (error != NULL)
+ * {
+ * g_printerr ("Error while matching: %s\n", error->message);
+ * g_error_free (error);
+ * }
+ * }
+ * ]|
+ *
+ * Returns: %TRUE is the string matched, %FALSE otherwise
+ * Since: 2.14
+ */
+
+
+/**
+ * g_regex_match_simple:
+ * @pattern: the regular expression
+ * @string: the string to scan for matches
+ * @compile_options: compile options for the regular expression, or 0
+ * @match_options: match options, or 0
+ *
+ * Scans for a match in @string for @pattern.
+ *
+ * This function is equivalent to g_regex_match() but it does not
+ * require to compile the pattern with g_regex_new(), avoiding some
+ * lines of code when you need just to do a match without extracting
+ * substrings, capture counts, and so on.
+ *
+ * If this function is to be called on the same @pattern more than
+ * once, it's more efficient to compile the pattern once with
+ * g_regex_new() and then use g_regex_match().
+ *
+ * Returns: %TRUE if the string matched, %FALSE otherwise
+ * Since: 2.14
+ */
+
+
+/**
+ * g_regex_new:
+ * @pattern: the regular expression
+ * @compile_options: compile options for the regular expression, or 0
+ * @match_options: match options for the regular expression, or 0
+ * @error: return location for a #GError
+ *
+ * Compiles the regular expression to an internal form, and does
+ * the initial setup of the #GRegex structure.
+ *
+ * are done with it
+ *
+ * Returns: a #GRegex structure. Call g_regex_unref() when you
+ * Since: 2.14
+ */
+
+
+/**
+ * g_regex_ref:
+ * @regex: a #GRegex
+ *
+ * Increases reference count of @regex by 1.
+ *
+ * Returns: @regex
+ * Since: 2.14
+ */
+
+
+/**
+ * g_regex_replace:
+ * @regex: a #GRegex structure
+ * @string: (array length=string_len): the string to perform matches against
+ * @string_len: the length of @string, or -1 if @string is nul-terminated
+ * @start_position: starting index of the string to match
+ * @replacement: text to replace each match with
+ * @match_options: options for the match
+ * @error: location to store the error occurring, or %NULL to ignore errors
+ *
+ * Replaces all occurrences of the pattern in @regex with the
+ * replacement text. Backreferences of the form '\number' or
+ * '\g&lt;number&gt;' in the replacement text are interpolated by the
+ * number-th captured subexpression of the match, '\g&lt;name&gt;' refers
+ * to the captured subexpression with the given name. '\0' refers to the
+ * complete match, but '\0' followed by a number is the octal representation
+ * of a character. To include a literal '\' in the replacement, write '\\'.
+ * There are also escapes that changes the case of the following text:
+ *
+ * <variablelist>
+ * <varlistentry><term>\l</term>
+ * <listitem>
+ * <para>Convert to lower case the next character</para>
+ * </listitem>
+ * </varlistentry>
+ * <varlistentry><term>\u</term>
+ * <listitem>
+ * <para>Convert to upper case the next character</para>
+ * </listitem>
+ * </varlistentry>
+ * <varlistentry><term>\L</term>
+ * <listitem>
+ * <para>Convert to lower case till \E</para>
+ * </listitem>
+ * </varlistentry>
+ * <varlistentry><term>\U</term>
+ * <listitem>
+ * <para>Convert to upper case till \E</para>
+ * </listitem>
+ * </varlistentry>
+ * <varlistentry><term>\E</term>
+ * <listitem>
+ * <para>End case modification</para>
+ * </listitem>
+ * </varlistentry>
+ * </variablelist>
+ *
+ * If you do not need to use backreferences use g_regex_replace_literal().
+ *
+ * The @replacement string must be UTF-8 encoded even if #G_REGEX_RAW was
+ * passed to g_regex_new(). If you want to use not UTF-8 encoded stings
+ * you can use g_regex_replace_literal().
+ *
+ * Setting @start_position differs from just passing over a shortened
+ * string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern that
+ * begins with any kind of lookbehind assertion, such as "\b".
+ *
+ * Returns: a newly allocated string containing the replacements
+ * Since: 2.14
+ */
+
+
+/**
+ * g_regex_replace_eval:
+ * @regex: a #GRegex structure from g_regex_new()
+ * @string: (array length=string_len): string to perform matches against
+ * @string_len: the length of @string, or -1 if @string is nul-terminated
+ * @start_position: starting index of the string to match
+ * @match_options: options for the match
+ * @eval: a function to call for each match
+ * @user_data: user data to pass to the function
+ * @error: location to store the error occurring, or %NULL to ignore errors
+ *
+ * Replaces occurrences of the pattern in regex with the output of
+ * @eval for that occurrence.
+ *
+ * Setting @start_position differs from just passing over a shortened
+ * string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern
+ * that begins with any kind of lookbehind assertion, such as "\b".
+ *
+ * The following example uses g_regex_replace_eval() to replace multiple
+ * strings at once:
+ * |[
+ * static gboolean
+ * eval_cb (const GMatchInfo *info,
+ * GString          *res,
+ * gpointer          data)
+ * {
+ * gchar *match;
+ * gchar *r;
+ *
+ * match = g_match_info_fetch (info, 0);
+ * r = g_hash_table_lookup ((GHashTable *)data, match);
+ * g_string_append (res, r);
+ * g_free (match);
+ *
+ * return FALSE;
+ * }
+ *
+ * /&ast; ... &ast;/
+ *
+ * GRegex *reg;
+ * GHashTable *h;
+ * gchar *res;
+ *
+ * h = g_hash_table_new (g_str_hash, g_str_equal);
+ *
+ * g_hash_table_insert (h, "1", "ONE");
+ * g_hash_table_insert (h, "2", "TWO");
+ * g_hash_table_insert (h, "3", "THREE");
+ * g_hash_table_insert (h, "4", "FOUR");
+ *
+ * reg = g_regex_new ("1|2|3|4", 0, 0, NULL);
+ * res = g_regex_replace_eval (reg, text, -1, 0, 0, eval_cb, h, NULL);
+ * g_hash_table_destroy (h);
+ *
+ * /&ast; ... &ast;/
+ * ]|
+ *
+ * Returns: a newly allocated string containing the replacements
+ * Since: 2.14
+ */
+
+
+/**
+ * g_regex_replace_literal:
+ * @regex: a #GRegex structure
+ * @string: (array length=string_len): the string to perform matches against
+ * @string_len: the length of @string, or -1 if @string is nul-terminated
+ * @start_position: starting index of the string to match
+ * @replacement: text to replace each match with
+ * @match_options: options for the match
+ * @error: location to store the error occurring, or %NULL to ignore errors
+ *
+ * Replaces all occurrences of the pattern in @regex with the
+ * replacement text. @replacement is replaced literally, to
+ * include backreferences use g_regex_replace().
+ *
+ * Setting @start_position differs from just passing over a
+ * shortened string and setting #G_REGEX_MATCH_NOTBOL in the
+ * case of a pattern that begins with any kind of lookbehind
+ * assertion, such as "\b".
+ *
+ * Returns: a newly allocated string containing the replacements
+ * Since: 2.14
+ */
+
+
+/**
+ * g_regex_split:
+ * @regex: a #GRegex structure
+ * @string: the string to split with the pattern
+ * @match_options: match time option flags
+ *
+ * Breaks the string on the pattern, and returns an array of the tokens.
+ * If the pattern contains capturing parentheses, then the text for each
+ * of the substrings will also be returned. If the pattern does not match
+ * anywhere in the string, then the whole string is returned as the first
+ * token.
+ *
+ * As a special case, the result of splitting the empty string "" is an
+ * empty vector, not a vector containing a single string. The reason for
+ * this special case is that being able to represent a empty vector is
+ * typically more useful than consistent handling of empty elements. If
+ * you do need to represent empty elements, you'll need to check for the
+ * empty string before calling this function.
+ *
+ * A pattern that can match empty strings splits @string into separate
+ * characters wherever it matches the empty string between characters.
+ * For example splitting "ab c" using as a separator "\s*", you will get
+ * "a", "b" and "c".
+ *
+ * Returns: a %NULL-terminated gchar ** array. Free it using g_strfreev()
+ * Since: 2.14
+ */
+
+
+/**
+ * g_regex_split_full:
+ * @regex: a #GRegex structure
+ * @string: (array length=string_len): the string to split with the pattern
+ * @string_len: the length of @string, or -1 if @string is nul-terminated
+ * @start_position: starting index of the string to match
+ * @match_options: match time option flags
+ * @max_tokens: the maximum number of tokens to split @string into. If this is less than 1, the string is split completely
+ * @error: return location for a #GError
+ *
+ * Breaks the string on the pattern, and returns an array of the tokens.
+ * If the pattern contains capturing parentheses, then the text for each
+ * of the substrings will also be returned. If the pattern does not match
+ * anywhere in the string, then the whole string is returned as the first
+ * token.
+ *
+ * As a special case, the result of splitting the empty string "" is an
+ * empty vector, not a vector containing a single string. The reason for
+ * this special case is that being able to represent a empty vector is
+ * typically more useful than consistent handling of empty elements. If
+ * you do need to represent empty elements, you'll need to check for the
+ * empty string before calling this function.
+ *
+ * A pattern that can match empty strings splits @string into separate
+ * characters wherever it matches the empty string between characters.
+ * For example splitting "ab c" using as a separator "\s*", you will get
+ * "a", "b" and "c".
+ *
+ * Setting @start_position differs from just passing over a shortened
+ * string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern
+ * that begins with any kind of lookbehind assertion, such as "\b".
+ *
+ * Returns: a %NULL-terminated gchar ** array. Free it using g_strfreev()
+ * Since: 2.14
+ */
+
+
+/**
+ * g_regex_split_simple:
+ * @pattern: the regular expression
+ * @string: the string to scan for matches
+ * @compile_options: compile options for the regular expression, or 0
+ * @match_options: match options, or 0
+ *
+ * Breaks the string on the pattern, and returns an array of
+ * the tokens. If the pattern contains capturing parentheses,
+ * then the text for each of the substrings will also be returned.
+ * If the pattern does not match anywhere in the string, then the
+ * whole string is returned as the first token.
+ *
+ * This function is equivalent to g_regex_split() but it does
+ * not require to compile the pattern with g_regex_new(), avoiding
+ * some lines of code when you need just to do a split without
+ * extracting substrings, capture counts, and so on.
+ *
+ * If this function is to be called on the same @pattern more than
+ * once, it's more efficient to compile the pattern once with
+ * g_regex_new() and then use g_regex_split().
+ *
+ * As a special case, the result of splitting the empty string ""
+ * is an empty vector, not a vector containing a single string.
+ * The reason for this special case is that being able to represent
+ * a empty vector is typically more useful than consistent handling
+ * of empty elements. If you do need to represent empty elements,
+ * you'll need to check for the empty string before calling this
+ * function.
+ *
+ * A pattern that can match empty strings splits @string into
+ * separate characters wherever it matches the empty string between
+ * characters. For example splitting "ab c" using as a separator
+ * "\s*", you will get "a", "b" and "c".
+ *
+ * Returns: a %NULL-terminated array of strings. Free it using g_strfreev()
+ * Since: 2.14
+ */
+
+
+/**
+ * g_regex_unref:
+ * @regex: a #GRegex
+ *
+ * Decreases reference count of @regex by 1. When reference count drops
+ * to zero, it frees all the memory associated with the regex structure.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * g_reload_user_special_dirs_cache:
+ *
+ * Resets the cache used for g_get_user_special_dir(), so
+ * that the latest on-disk version is used. Call this only
+ * if you just changed the data on disk yourself.
+ *
+ * Due to threadsafety issues this may cause leaking of strings
+ * that were previously returned from g_get_user_special_dir()
+ * that can't be freed. We ensure to only leak the data for
+ * the directories that actually changed value though.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_remove:
+ * @filename: a pathname in the GLib file name encoding (UTF-8 on Windows)
+ *
+ * A wrapper for the POSIX remove() function. The remove() function
+ * deletes a name from the filesystem.
+ *
+ * See your C library manual for more details about how remove() works
+ * on your system. On Unix, remove() removes also directories, as it
+ * calls unlink() for files and rmdir() for directories. On Windows,
+ * although remove() in the C library only works for files, this
+ * function tries first remove() and then if that fails rmdir(), and
+ * thus works for both files and directories. Note however, that on
+ * Windows, it is in general not possible to remove a file that is
+ * open to some process, or mapped into memory.
+ *
+ * If this function fails on Windows you can't infer too much from the
+ * errno value. rmdir() is tried regardless of what caused remove() to
+ * fail. Any errno value set by remove() will be overwritten by that
+ * set by rmdir().
+ *
+ * occurred
+ *
+ * Returns: 0 if the file was successfully removed, -1 if an error
+ * Since: 2.6
+ */
+
+
+/**
+ * g_rename:
+ * @oldfilename: a pathname in the GLib file name encoding (UTF-8 on Windows)
+ * @newfilename: a pathname in the GLib file name encoding
+ *
+ * A wrapper for the POSIX rename() function. The rename() function
+ * renames a file, moving it between directories if required.
+ *
+ * See your C library manual for more details about how rename() works
+ * on your system. It is not possible in general on Windows to rename
+ * a file that is open to some process.
+ *
+ * Returns: 0 if the renaming succeeded, -1 if an error occurred
+ * Since: 2.6
+ */
+
+
+/**
+ * g_renew:
+ * @struct_type: the type of the elements to allocate
+ * @mem: the currently allocated memory
+ * @n_structs: the number of elements to allocate
+ *
+ * Reallocates the memory pointed to by @mem, so that it now has space for
+ * @n_structs elements of type @struct_type. It returns the new address of
+ * the memory, which may have been moved.
+ * Care is taken to avoid overflow when calculating the size of the allocated block.
+ *
+ * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
+ */
+
+
+/**
+ * g_rmdir:
+ * @filename: a pathname in the GLib file name encoding (UTF-8 on Windows)
+ *
+ * A wrapper for the POSIX rmdir() function. The rmdir() function
+ * deletes a directory from the filesystem.
+ *
+ * See your C library manual for more details about how rmdir() works
+ * on your system.
+ *
+ * occurred
+ *
+ * Returns: 0 if the directory was successfully removed, -1 if an error
+ * Since: 2.6
+ */
+
+
+/**
+ * g_rw_lock_clear:
+ * @rw_lock: an initialized #GRWLock
+ *
+ * Frees the resources allocated to a lock with g_rw_lock_init().
+ *
+ * This function should not be used with a #GRWLock that has been
+ * statically allocated.
+ *
+ * Calling g_rw_lock_clear() when any thread holds the lock
+ * leads to undefined behaviour.
+ *
+ * Sine: 2.32
+ */
+
+
+/**
+ * g_rw_lock_init:
+ * @rw_lock: an uninitialized #GRWLock
+ *
+ * Initializes a #GRWLock so that it can be used.
+ *
+ * This function is useful to initialize a lock that has been
+ * allocated on the stack, or as part of a larger structure.  It is not
+ * necessary to initialise a reader-writer lock that has been statically
+ * allocated.
+ *
+ * |[
+ * typedef struct {
+ * GRWLock l;
+ * ...
+ * } Blob;
+ *
+ * Blob *b;
+ *
+ * b = g_new (Blob, 1);
+ * g_rw_lock_init (&b->l);
+ * ]|
+ *
+ * To undo the effect of g_rw_lock_init() when a lock is no longer
+ * needed, use g_rw_lock_clear().
+ *
+ * Calling g_rw_lock_init() on an already initialized #GRWLock leads
+ * to undefined behaviour.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_rw_lock_reader_lock:
+ * @rw_lock: a #GRWLock
+ *
+ * Obtain a read lock on @rw_lock. If another thread currently holds
+ * the write lock on @rw_lock or blocks waiting for it, the current
+ * thread will block. Read locks can be taken recursively.
+ *
+ * It is implementation-defined how many threads are allowed to
+ * hold read locks on the same lock simultaneously.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_rw_lock_reader_trylock:
+ * @rw_lock: a #GRWLock
+ *
+ * Tries to obtain a read lock on @rw_lock and returns %TRUE if
+ * the read lock was successfully obtained. Otherwise it
+ * returns %FALSE.
+ *
+ * Returns: %TRUE if @rw_lock could be locked
+ * Since: 2.32
+ */
+
+
+/**
+ * g_rw_lock_reader_unlock:
+ * @rw_lock: a #GRWLock
+ *
+ * Release a read lock on @rw_lock.
+ *
+ * Calling g_rw_lock_reader_unlock() on a lock that is not held
+ * by the current thread leads to undefined behaviour.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_rw_lock_writer_lock:
+ * @rw_lock: a #GRWLock
+ *
+ * Obtain a write lock on @rw_lock. If any thread already holds
+ * a read or write lock on @rw_lock, the current thread will block
+ * until all other threads have dropped their locks on @rw_lock.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_rw_lock_writer_trylock:
+ * @rw_lock: a #GRWLock
+ *
+ * Tries to obtain a write lock on @rw_lock. If any other thread holds
+ * a read or write lock on @rw_lock, it immediately returns %FALSE.
+ * Otherwise it locks @rw_lock and returns %TRUE.
+ *
+ * Returns: %TRUE if @rw_lock could be locked
+ * Since: 2.32
+ */
+
+
+/**
+ * g_rw_lock_writer_unlock:
+ * @rw_lock: a #GRWLock
+ *
+ * Release a write lock on @rw_lock.
+ *
+ * Calling g_rw_lock_writer_unlock() on a lock that is not held
+ * by the current thread leads to undefined behaviour.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_scanner_add_symbol:
+ * @scanner: a #GScanner
+ * @symbol: the symbol to add
+ * @value: the value of the symbol
+ *
+ * Adds a symbol to the default scope.
+ *
+ * Deprecated: 2.2: Use g_scanner_scope_add_symbol() instead.
+ */
+
+
+/**
+ * g_scanner_cur_line:
+ * @scanner: a #GScanner
+ *
+ * Returns the current line in the input stream (counting
+ * from 1). This is the line of the last token parsed via
+ * g_scanner_get_next_token().
+ *
+ * Returns: the current line
+ */
+
+
+/**
+ * g_scanner_cur_position:
+ * @scanner: a #GScanner
+ *
+ * Returns the current position in the current line (counting
+ * from 0). This is the position of the last token parsed via
+ * g_scanner_get_next_token().
+ *
+ * Returns: the current position on the line
+ */
+
+
+/**
+ * g_scanner_cur_token:
+ * @scanner: a #GScanner
+ *
+ * Gets the current token type. This is simply the @token
+ * field in the #GScanner structure.
+ *
+ * Returns: the current token type
+ */
+
+
+/**
+ * g_scanner_cur_value:
+ * @scanner: a #GScanner
+ *
+ * Gets the current token value. This is simply the @value
+ * field in the #GScanner structure.
+ *
+ * Returns: the current token value
+ */
+
+
+/**
+ * g_scanner_destroy:
+ * @scanner: a #GScanner
+ *
+ * Frees all memory used by the #GScanner.
+ */
+
+
+/**
+ * g_scanner_eof:
+ * @scanner: a #GScanner
+ *
+ * Returns %TRUE if the scanner has reached the end of
+ * the file or text buffer.
+ *
+ * the file or text buffer
+ *
+ * Returns: %TRUE if the scanner has reached the end of
+ */
+
+
+/**
+ * g_scanner_error:
+ * @scanner: a #GScanner
+ * @format: the message format. See the printf() documentation
+ * @...: the parameters to insert into the format string
+ *
+ * Outputs an error message, via the #GScanner message handler.
+ */
+
+
+/**
+ * g_scanner_foreach_symbol:
+ * @scanner: a #GScanner
+ * @func: the function to call with each symbol
+ * @data: data to pass to the function
+ *
+ * Calls a function for each symbol in the default scope.
+ *
+ * Deprecated: 2.2: Use g_scanner_scope_foreach_symbol() instead.
+ */
+
+
+/**
+ * g_scanner_freeze_symbol_table:
+ * @scanner: a #GScanner
+ *
+ * There is no reason to use this macro, since it does nothing.
+ *
+ * Deprecated: 2.2: This macro does nothing.
+ */
+
+
+/**
+ * g_scanner_get_next_token:
+ * @scanner: a #GScanner
+ *
+ * Parses the next token just like g_scanner_peek_next_token()
+ * and also removes it from the input stream. The token data is
+ * placed in the @token, @value, @line, and @position fields of
+ * the #GScanner structure.
+ *
+ * Returns: the type of the token
+ */
+
+
+/**
+ * g_scanner_input_file:
+ * @scanner: a #GScanner
+ * @input_fd: a file descriptor
+ *
+ * Prepares to scan a file.
+ */
+
+
+/**
+ * g_scanner_input_text:
+ * @scanner: a #GScanner
+ * @text: the text buffer to scan
+ * @text_len: the length of the text buffer
+ *
+ * Prepares to scan a text buffer.
+ */
+
+
+/**
+ * g_scanner_lookup_symbol:
+ * @scanner: a #GScanner
+ * @symbol: the symbol to look up
+ *
+ * Looks up a symbol in the current scope and return its value.
+ * If the symbol is not bound in the current scope, %NULL is
+ * returned.
+ *
+ * if @symbol is not bound in the current scope
+ *
+ * Returns: the value of @symbol in the current scope, or %NULL
+ */
+
+
+/**
+ * g_scanner_new:
+ * @config_templ: the initial scanner settings
+ *
+ * Creates a new #GScanner.
+ *
+ * The @config_templ structure specifies the initial settings
+ * of the scanner, which are copied into the #GScanner
+ * @config field. If you pass %NULL then the default settings
+ * are used.
+ *
+ * Returns: the new #GScanner
+ */
+
+
+/**
+ * g_scanner_peek_next_token:
+ * @scanner: a #GScanner
+ *
+ * Parses the next token, without removing it from the input stream.
+ * The token data is placed in the @next_token, @next_value, @next_line,
+ * and @next_position fields of the #GScanner structure.
+ *
+ * Note that, while the token is not removed from the input stream
+ * (i.e. the next call to g_scanner_get_next_token() will return the
+ * same token), it will not be reevaluated. This can lead to surprising
+ * results when changing scope or the scanner configuration after peeking
+ * the next token. Getting the next token after switching the scope or
+ * configuration will return whatever was peeked before, regardless of
+ * any symbols that may have been added or removed in the new scope.
+ *
+ * Returns: the type of the token
+ */
+
+
+/**
+ * g_scanner_remove_symbol:
+ * @scanner: a #GScanner
+ * @symbol: the symbol to remove
+ *
+ * Removes a symbol from the default scope.
+ *
+ * Deprecated: 2.2: Use g_scanner_scope_remove_symbol() instead.
+ */
+
+
+/**
+ * g_scanner_scope_add_symbol:
+ * @scanner: a #GScanner
+ * @scope_id: the scope id
+ * @symbol: the symbol to add
+ * @value: the value of the symbol
+ *
+ * Adds a symbol to the given scope.
+ */
+
+
+/**
+ * g_scanner_scope_foreach_symbol:
+ * @scanner: a #GScanner
+ * @scope_id: the scope id
+ * @func: the function to call for each symbol/value pair
+ * @user_data: user data to pass to the function
+ *
+ * Calls the given function for each of the symbol/value pairs
+ * in the given scope of the #GScanner. The function is passed
+ * the symbol and value of each pair, and the given @user_data
+ * parameter.
+ */
+
+
+/**
+ * g_scanner_scope_lookup_symbol:
+ * @scanner: a #GScanner
+ * @scope_id: the scope id
+ * @symbol: the symbol to look up
+ *
+ * Looks up a symbol in a scope and return its value. If the
+ * symbol is not bound in the scope, %NULL is returned.
+ *
+ * if @symbol is not bound in the given scope.
+ *
+ * Returns: the value of @symbol in the given scope, or %NULL
+ */
+
+
+/**
+ * g_scanner_scope_remove_symbol:
+ * @scanner: a #GScanner
+ * @scope_id: the scope id
+ * @symbol: the symbol to remove
+ *
+ * Removes a symbol from a scope.
+ */
+
+
+/**
+ * g_scanner_set_scope:
+ * @scanner: a #GScanner
+ * @scope_id: the new scope id
+ *
+ * Sets the current scope.
+ *
+ * Returns: the old scope id
+ */
+
+
+/**
+ * g_scanner_sync_file_offset:
+ * @scanner: a #GScanner
+ *
+ * Rewinds the filedescriptor to the current buffer position
+ * and blows the file read ahead buffer. This is useful for
+ * third party uses of the scanners filedescriptor, which hooks
+ * onto the current scanning position.
+ */
+
+
+/**
+ * g_scanner_thaw_symbol_table:
+ * @scanner: a #GScanner
+ *
+ * There is no reason to use this macro, since it does nothing.
+ *
+ * Deprecated: 2.2: This macro does nothing.
+ */
+
+
+/**
+ * g_scanner_unexp_token:
+ * @scanner: a #GScanner
+ * @expected_token: the expected token
+ * @identifier_spec: a string describing how the scanner's user refers to identifiers (%NULL defaults to "identifier"). This is used if @expected_token is %G_TOKEN_IDENTIFIER or %G_TOKEN_IDENTIFIER_NULL.
+ * @symbol_spec: a string describing how the scanner's user refers to symbols (%NULL defaults to "symbol"). This is used if @expected_token is %G_TOKEN_SYMBOL or any token value greater than %G_TOKEN_LAST.
+ * @symbol_name: the name of the symbol, if the scanner's current token is a symbol.
+ * @message: a message string to output at the end of the warning/error, or %NULL.
+ * @is_error: if %TRUE it is output as an error. If %FALSE it is output as a warning.
+ *
+ * Outputs a message through the scanner's msg_handler,
+ * resulting from an unexpected token in the input stream.
+ * Note that you should not call g_scanner_peek_next_token()
+ * followed by g_scanner_unexp_token() without an intermediate
+ * call to g_scanner_get_next_token(), as g_scanner_unexp_token()
+ * evaluates the scanner's current token (not the peeked token)
+ * to construct part of the message.
+ */
+
+
+/**
+ * g_scanner_warn:
+ * @scanner: a #GScanner
+ * @format: the message format. See the printf() documentation
+ * @...: the parameters to insert into the format string
+ *
+ * Outputs a warning message, via the #GScanner message handler.
+ */
+
+
+/**
+ * g_sequence_append:
+ * @seq: a #GSequence
+ * @data: the data for the new item
+ *
+ * Adds a new item to the end of @seq.
+ *
+ * Returns: an iterator pointing to the new item
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_foreach:
+ * @seq: a #GSequence
+ * @func: the function to call for each item in @seq
+ * @user_data: user data passed to @func
+ *
+ * Calls @func for each item in the sequence passing @user_data
+ * to the function.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_foreach_range:
+ * @begin: a #GSequenceIter
+ * @end: a #GSequenceIter
+ * @func: a #GFunc
+ * @user_data: user data passed to @func
+ *
+ * Calls @func for each item in the range (@begin, @end) passing
+ * @user_data to the function.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_free:
+ * @seq: a #GSequence
+ *
+ * Frees the memory allocated for @seq. If @seq has a data destroy
+ * function associated with it, that function is called on all items in
+ * @seq.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_get:
+ * @iter: a #GSequenceIter
+ *
+ * Returns the data that @iter points to.
+ *
+ * Returns: the data that @iter points to
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_get_begin_iter:
+ * @seq: a #GSequence
+ *
+ * Returns the begin iterator for @seq.
+ *
+ * Returns: the begin iterator for @seq.
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_get_end_iter:
+ * @seq: a #GSequence
+ *
+ * Returns the end iterator for @seg
+ *
+ * Returns: the end iterator for @seq
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_get_iter_at_pos:
+ * @seq: a #GSequence
+ * @pos: a position in @seq, or -1 for the end.
+ *
+ * Returns the iterator at position @pos. If @pos is negative or larger
+ * than the number of items in @seq, the end iterator is returned.
+ *
+ * Returns: The #GSequenceIter at position @pos
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_get_length:
+ * @seq: a #GSequence
+ *
+ * Returns the length of @seq
+ *
+ * Returns: the length of @seq
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_insert_before:
+ * @iter: a #GSequenceIter
+ * @data: the data for the new item
+ *
+ * Inserts a new item just before the item pointed to by @iter.
+ *
+ * Returns: an iterator pointing to the new item
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_insert_sorted:
+ * @seq: a #GSequence
+ * @data: the data to insert
+ * @cmp_func: the function used to compare items in the sequence
+ * @cmp_data: user data passed to @cmp_func.
+ *
+ * Inserts @data into @sequence using @func to determine the new
+ * position. The sequence must already be sorted according to @cmp_func;
+ * otherwise the new position of @data is undefined.
+ *
+ * @cmp_func is called with two items of the @seq and @user_data.
+ * It should return 0 if the items are equal, a negative value
+ * if the first item comes before the second, and a positive value
+ * if the second  item comes before the first.
+ *
+ * Returns: a #GSequenceIter pointing to the new item.
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_insert_sorted_iter:
+ * @seq: a #GSequence
+ * @data: data for the new item
+ * @iter_cmp: the function used to compare iterators in the sequence
+ * @cmp_data: user data passed to @cmp_func
+ *
+ * Like g_sequence_insert_sorted(), but uses
+ * a #GSequenceIterCompareFunc instead of a #GCompareDataFunc as
+ * the compare function.
+ *
+ * @iter_cmp is called with two iterators pointing into @seq.
+ * It should return 0 if the iterators are equal, a negative
+ * value if the first iterator comes before the second, and a
+ * positive value if the second iterator comes before the first.
+ *
+ * It is called with two iterators pointing into @seq. It should
+ * return 0 if the iterators are equal, a negative value if the
+ * first iterator comes before the second, and a positive value
+ * if the second iterator comes before the first.
+ *
+ * Returns: a #GSequenceIter pointing to the new item
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_iter_compare:
+ * @a: a #GSequenceIter
+ * @b: a #GSequenceIter
+ *
+ * Returns a negative number if @a comes before @b, 0 if they are equal,
+ * and a positive number if @a comes after @b.
+ *
+ * The @a and @b iterators must point into the same sequence.
+ *
+ * equal, and a positive number if @a comes after @b.
+ *
+ * Returns: A negative number if @a comes before @b, 0 if they are
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_iter_get_position:
+ * @iter: a #GSequenceIter
+ *
+ * Returns the position of @iter
+ *
+ * Returns: the position of @iter
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_iter_get_sequence:
+ * @iter: a #GSequenceIter
+ *
+ * Returns the #GSequence that @iter points into.
+ *
+ * Returns: the #GSequence that @iter points into.
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_iter_is_begin:
+ * @iter: a #GSequenceIter
+ *
+ * Returns whether @iter is the begin iterator
+ *
+ * Returns: whether @iter is the begin iterator
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_iter_is_end:
+ * @iter: a #GSequenceIter
+ *
+ * Returns whether @iter is the end iterator
+ *
+ * Returns: Whether @iter is the end iterator.
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_iter_move:
+ * @iter: a #GSequenceIter
+ * @delta: A positive or negative number indicating how many positions away from @iter the returned #GSequenceIter will be.
+ *
+ * Returns the #GSequenceIter which is @delta positions away from @iter.
+ * If @iter is closer than -@delta positions to the beginning of the sequence,
+ * the begin iterator is returned. If @iter is closer than @delta positions
+ * to the end of the sequence, the end iterator is returned.
+ *
+ * Returns: a #GSequenceIter which is @delta positions away from @iter.
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_iter_next:
+ * @iter: a #GSequenceIter
+ *
+ * Returns an iterator pointing to the next position after @iter. If
+ * @iter is the end iterator, the end iterator is returned.
+ *
+ * Returns: a #GSequenceIter pointing to the next position after @iter.
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_iter_prev:
+ * @iter: a #GSequenceIter
+ *
+ * Returns an iterator pointing to the previous position before @iter. If
+ * @iter is the begin iterator, the begin iterator is returned.
+ *
+ * @iter.
+ *
+ * Returns: a #GSequenceIter pointing to the previous position before
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_lookup:
+ * @seq: a #GSequence
+ * @data: data to lookup
+ * @cmp_func: the function used to compare items in the sequence
+ * @cmp_data: user data passed to @cmp_func.
+ *
+ * Returns an iterator pointing to the position of the first item found
+ * equal to @data according to @cmp_func and @cmp_data. If more than one
+ * item is equal, it is not guaranteed that it is the first which is
+ * returned. In that case, you can use g_sequence_iter_next() and
+ * g_sequence_iter_prev() to get others.
+ *
+ * @cmp_func is called with two items of the @seq and @user_data.
+ * It should return 0 if the items are equal, a negative value if
+ * the first item comes before the second, and a positive value if
+ * the second item comes before the first.
+ *
+ * <note><para>
+ * This function will fail if the data contained in the sequence is
+ * unsorted.  Use g_sequence_insert_sorted() or
+ * g_sequence_insert_sorted_iter() to add data to your sequence or, if
+ * you want to add a large amount of data, call g_sequence_sort() after
+ * doing unsorted insertions.
+ * </para></note>
+ *
+ * first item found equal to @data according to @cmp_func and @cmp_data.
+ *
+ * Returns: an #GSequenceIter pointing to the position of the
+ * Since: 2.28
+ */
+
+
+/**
+ * g_sequence_lookup_iter:
+ * @seq: a #GSequence
+ * @data: data to lookup
+ * @iter_cmp: the function used to compare iterators in the sequence
+ * @cmp_data: user data passed to @iter_cmp
+ *
+ * Like g_sequence_lookup(), but uses a #GSequenceIterCompareFunc
+ * instead of a #GCompareDataFunc as the compare function.
+ *
+ * @iter_cmp is called with two iterators pointing into @seq.
+ * It should return 0 if the iterators are equal, a negative value
+ * if the first iterator comes before the second, and a positive
+ * value if the second iterator comes before the first.
+ *
+ * <note><para>
+ * This function will fail if the data contained in the sequence is
+ * unsorted.  Use g_sequence_insert_sorted() or
+ * g_sequence_insert_sorted_iter() to add data to your sequence or, if
+ * you want to add a large amount of data, call g_sequence_sort() after
+ * doing unsorted insertions.
+ * </para></note>
+ *
+ * the first item found equal to @data according to @cmp_func
+ * and @cmp_data.
+ *
+ * Returns: an #GSequenceIter pointing to the position of
+ * Since: 2.28
+ */
+
+
+/**
+ * g_sequence_move:
+ * @src: a #GSequenceIter pointing to the item to move
+ * @dest: a #GSequenceIter pointing to the position to which the item is moved.
+ *
+ * Moves the item pointed to by @src to the position indicated by @dest.
+ * After calling this function @dest will point to the position immediately
+ * after @src. It is allowed for @src and @dest to point into different
+ * sequences.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_move_range:
+ * @dest: a #GSequenceIter
+ * @begin: a #GSequenceIter
+ * @end: a #GSequenceIter
+ *
+ * Inserts the (@begin, @end) range at the destination pointed to by ptr.
+ * The @begin and @end iters must point into the same sequence. It is
+ * allowed for @dest to point to a different sequence than the one pointed
+ * into by @begin and @end.
+ *
+ * If @dest is NULL, the range indicated by @begin and @end is
+ * removed from the sequence. If @dest iter points to a place within
+ * the (@begin, @end) range, the range does not move.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_new:
+ * @data_destroy: (allow-none): a #GDestroyNotify function, or %NULL
+ *
+ * Creates a new GSequence. The @data_destroy function, if non-%NULL will
+ * be called on all items when the sequence is destroyed and on items that
+ * are removed from the sequence.
+ *
+ * Returns: a new #GSequence
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_prepend:
+ * @seq: a #GSequence
+ * @data: the data for the new item
+ *
+ * Adds a new item to the front of @seq
+ *
+ * Returns: an iterator pointing to the new item
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_range_get_midpoint:
+ * @begin: a #GSequenceIter
+ * @end: a #GSequenceIter
+ *
+ * Finds an iterator somewhere in the range (@begin, @end). This
+ * iterator will be close to the middle of the range, but is not
+ * guaranteed to be <emphasis>exactly</emphasis> in the middle.
+ *
+ * The @begin and @end iterators must both point to the same sequence and
+ * @begin must come before or be equal to @end in the sequence.
+ *
+ * (@begin, @end) range.
+ *
+ * Returns: A #GSequenceIter pointing somewhere in the
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_remove:
+ * @iter: a #GSequenceIter
+ *
+ * Removes the item pointed to by @iter. It is an error to pass the
+ * end iterator to this function.
+ *
+ * If the sequence has a data destroy function associated with it, this
+ * function is called on the data for the removed item.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_remove_range:
+ * @begin: a #GSequenceIter
+ * @end: a #GSequenceIter
+ *
+ * Removes all items in the (@begin, @end) range.
+ *
+ * If the sequence has a data destroy function associated with it, this
+ * function is called on the data for the removed items.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_search:
+ * @seq: a #GSequence
+ * @data: data for the new item
+ * @cmp_func: the function used to compare items in the sequence
+ * @cmp_data: user data passed to @cmp_func.
+ *
+ * Returns an iterator pointing to the position where @data would
+ * be inserted according to @cmp_func and @cmp_data.
+ *
+ * @cmp_func is called with two items of the @seq and @user_data.
+ * It should return 0 if the items are equal, a negative value if
+ * the first item comes before the second, and a positive value if
+ * the second item comes before the first.
+ *
+ * If you are simply searching for an existing element of the sequence,
+ * consider using g_sequence_lookup().
+ *
+ * <note><para>
+ * This function will fail if the data contained in the sequence is
+ * unsorted.  Use g_sequence_insert_sorted() or
+ * g_sequence_insert_sorted_iter() to add data to your sequence or, if
+ * you want to add a large amount of data, call g_sequence_sort() after
+ * doing unsorted insertions.
+ * </para></note>
+ *
+ * would have been inserted according to @cmp_func and @cmp_data.
+ *
+ * Returns: an #GSequenceIter pointing to the position where @data
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_search_iter:
+ * @seq: a #GSequence
+ * @data: data for the new item
+ * @iter_cmp: the function used to compare iterators in the sequence
+ * @cmp_data: user data passed to @iter_cmp
+ *
+ * Like g_sequence_search(), but uses a #GSequenceIterCompareFunc
+ * instead of a #GCompareDataFunc as the compare function.
+ *
+ * @iter_cmp is called with two iterators pointing into @seq.
+ * It should return 0 if the iterators are equal, a negative value
+ * if the first iterator comes before the second, and a positive
+ * value if the second iterator comes before the first.
+ *
+ * If you are simply searching for an existing element of the sequence,
+ * consider using g_sequence_lookup_iter().
+ *
+ * <note><para>
+ * This function will fail if the data contained in the sequence is
+ * unsorted.  Use g_sequence_insert_sorted() or
+ * g_sequence_insert_sorted_iter() to add data to your sequence or, if
+ * you want to add a large amount of data, call g_sequence_sort() after
+ * doing unsorted insertions.
+ * </para></note>
+ *
+ * where @data would have been inserted according to @iter_cmp
+ * and @cmp_data.
+ *
+ * Returns: a #GSequenceIter pointing to the position in @seq
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_set:
+ * @iter: a #GSequenceIter
+ * @data: new data for the item
+ *
+ * Changes the data for the item pointed to by @iter to be @data. If
+ * the sequence has a data destroy function associated with it, that
+ * function is called on the existing data that @iter pointed to.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_sort:
+ * @seq: a #GSequence
+ * @cmp_func: the function used to sort the sequence
+ * @cmp_data: user data passed to @cmp_func
+ *
+ * Sorts @seq using @cmp_func.
+ *
+ * @cmp_func is passed two items of @seq and should
+ * return 0 if they are equal, a negative value if the
+ * first comes before the second, and a positive value
+ * if the second comes before the first.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_sort_changed:
+ * @iter: A #GSequenceIter
+ * @cmp_func: the function used to compare items in the sequence
+ * @cmp_data: user data passed to @cmp_func.
+ *
+ * Moves the data pointed to a new position as indicated by @cmp_func. This
+ * function should be called for items in a sequence already sorted according
+ * to @cmp_func whenever some aspect of an item changes so that @cmp_func
+ * may return different values for that item.
+ *
+ * @cmp_func is called with two items of the @seq and @user_data.
+ * It should return 0 if the items are equal, a negative value if
+ * the first item comes before the second, and a positive value if
+ * the second item comes before the first.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_sort_changed_iter:
+ * @iter: a #GSequenceIter
+ * @iter_cmp: the function used to compare iterators in the sequence
+ * @cmp_data: user data passed to @cmp_func
+ *
+ * Like g_sequence_sort_changed(), but uses
+ * a #GSequenceIterCompareFunc instead of a #GCompareDataFunc as
+ * the compare function.
+ *
+ * @iter_cmp is called with two iterators pointing into @seq. It should
+ * return 0 if the iterators are equal, a negative value if the first
+ * iterator comes before the second, and a positive value if the second
+ * iterator comes before the first.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_sort_iter:
+ * @seq: a #GSequence
+ * @cmp_func: the function used to compare iterators in the sequence
+ * @cmp_data: user data passed to @cmp_func
+ *
+ * Like g_sequence_sort(), but uses a #GSequenceIterCompareFunc instead
+ * of a GCompareDataFunc as the compare function
+ *
+ * @cmp_func is called with two iterators pointing into @seq. It should
+ * return 0 if the iterators are equal, a negative value if the first
+ * iterator comes before the second, and a positive value if the second
+ * iterator comes before the first.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * g_sequence_swap:
+ * @a: a #GSequenceIter
+ * @b: a #GSequenceIter
+ *
+ * Swaps the items pointed to by @a and @b. It is allowed for @a and @b
+ * to point into difference sequences.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * g_set_application_name:
+ * @application_name: localized name of the application
+ *
+ * Sets a human-readable name for the application. This name should be
+ * localized if possible, and is intended for display to the user.
+ * Contrast with g_set_prgname(), which sets a non-localized name.
+ * g_set_prgname() will be called automatically by gtk_init(),
+ * but g_set_application_name() will not.
+ *
+ * Note that for thread safety reasons, this function can only
+ * be called once.
+ *
+ * The application name will be used in contexts such as error messages,
+ * or when displaying an application's name in the task list.
+ *
+ * Since: 2.2
+ */
+
+
+/**
+ * g_set_error:
+ * @err: (allow-none): a return location for a #GError, or %NULL
+ * @domain: error domain
+ * @code: error code
+ * @format: printf()-style format
+ * @...: args for @format
+ *
+ * Does nothing if @err is %NULL; if @err is non-%NULL, then *@err
+ * must be %NULL. A new #GError is created and assigned to *@err.
+ */
+
+
+/**
+ * g_set_error_literal:
+ * @err: (allow-none): a return location for a #GError, or %NULL
+ * @domain: error domain
+ * @code: error code
+ * @message: error message
+ *
+ * Does nothing if @err is %NULL; if @err is non-%NULL, then *@err
+ * must be %NULL. A new #GError is created and assigned to *@err.
+ * Unlike g_set_error(), @message is not a printf()-style format string.
+ * Use this function if @message contains text you don't have control over,
+ * that could include printf() escape sequences.
+ *
+ * Since: 2.18
+ */
+
+
+/**
+ * g_set_prgname:
+ * @prgname: the name of the program.
+ *
+ * Sets the name of the program. This name should <emphasis>not</emphasis>
+ * be localized, contrast with g_set_application_name(). Note that for
+ * thread-safety reasons this function can only be called once.
+ */
+
+
+/**
+ * g_set_print_handler:
+ * @func: the new print handler
+ *
+ * Sets the print handler.
+ *
+ * Any messages passed to g_print() will be output via
+ * the new handler. The default handler simply outputs
+ * the message to stdout. By providing your own handler
+ * you can redirect the output, to a GTK+ widget or a
+ * log file for example.
+ *
+ * Returns: the old print handler
+ */
+
+
+/**
+ * g_set_printerr_handler:
+ * @func: the new error message handler
+ *
+ * Sets the handler for printing error messages.
+ *
+ * Any messages passed to g_printerr() will be output via
+ * the new handler. The default handler simply outputs the
+ * message to stderr. By providing your own handler you can
+ * redirect the output, to a GTK+ widget or a log file for
+ * example.
+ *
+ * Returns: the old error message handler
+ */
+
+
+/**
+ * g_setenv:
+ * @variable: the environment variable to set, must not contain '='.
+ * @value: the value for to set the variable to.
+ * @overwrite: whether to change the variable if it already exists.
+ *
+ * Sets an environment variable. Both the variable's name and value
+ * should be in the GLib file name encoding. On UNIX, this means that
+ * they can be arbitrary byte strings. On Windows, they should be in
+ * UTF-8.
+ *
+ * Note that on some systems, when variables are overwritten, the memory
+ * used for the previous variables and its value isn't reclaimed.
+ *
+ * <warning><para>
+ * Environment variable handling in UNIX is not thread-safe, and your
+ * program may crash if one thread calls g_setenv() while another
+ * thread is calling getenv(). (And note that many functions, such as
+ * gettext(), call getenv() internally.) This function is only safe to
+ * use at the very start of your program, before creating any other
+ * threads (or creating objects that create worker threads of their
+ * own).
+ * </para><para>
+ * If you need to set up the environment for a child process, you can
+ * use g_get_environ() to get an environment array, modify that with
+ * g_environ_setenv() and g_environ_unsetenv(), and then pass that
+ * array directly to execvpe(), g_spawn_async(), or the like.
+ * </para></warning>
+ *
+ * Returns: %FALSE if the environment variable couldn't be set.
+ * Since: 2.4
+ */
+
+
+/**
+ * g_shell_parse_argv:
+ * @command_line: command line to parse
+ * @argcp: (out): return location for number of args
+ * @argvp: (out) (array length=argcp zero-terminated=1): return location for array of args
+ * @error: return location for error
+ *
+ * Parses a command line into an argument vector, in much the same way
+ * the shell would, but without many of the expansions the shell would
+ * perform (variable expansion, globs, operators, filename expansion,
+ * etc. are not supported). The results are defined to be the same as
+ * those you would get from a UNIX98 /bin/sh, as long as the input
+ * contains none of the unsupported shell expansions. If the input
+ * does contain such expansions, they are passed through
+ * literally. Possible errors are those from the #G_SHELL_ERROR
+ * domain. Free the returned vector with g_strfreev().
+ *
+ * Returns: %TRUE on success, %FALSE if error set
+ */
+
+
+/**
+ * g_shell_quote:
+ * @unquoted_string: a literal string
+ *
+ * Quotes a string so that the shell (/bin/sh) will interpret the
+ * quoted string to mean @unquoted_string. If you pass a filename to
+ * the shell, for example, you should first quote it with this
+ * function.  The return value must be freed with g_free(). The
+ * quoting style used is undefined (single or double quotes may be
+ * used).
+ *
+ * Returns: quoted string
+ */
+
+
+/**
+ * g_shell_unquote:
+ * @quoted_string: shell-quoted string
+ * @error: error return location or NULL
+ *
+ * Unquotes a string as the shell (/bin/sh) would. Only handles
+ * quotes; if a string contains file globs, arithmetic operators,
+ * variables, backticks, redirections, or other special-to-the-shell
+ * features, the result will be different from the result a real shell
+ * would produce (the variables, backticks, etc. will be passed
+ * through literally instead of being expanded). This function is
+ * guaranteed to succeed if applied to the result of
+ * g_shell_quote(). If it fails, it returns %NULL and sets the
+ * error. The @quoted_string need not actually contain quoted or
+ * escaped text; g_shell_unquote() simply goes through the string and
+ * unquotes/unescapes anything that the shell would. Both single and
+ * double quotes are handled, as are escapes including escaped
+ * newlines. The return value must be freed with g_free(). Possible
+ * errors are in the #G_SHELL_ERROR domain.
+ *
+ * Shell quoting rules are a bit strange. Single quotes preserve the
+ * literal string exactly. escape sequences are not allowed; not even
+ * \' - if you want a ' in the quoted text, you have to do something
+ * like 'foo'\''bar'.  Double quotes allow $, `, ", \, and newline to
+ * be escaped with backslash. Otherwise double quotes preserve things
+ * literally.
+ *
+ * Returns: an unquoted string
+ */
+
+
+/**
+ * g_signal_connect:
+ * @instance: the instance to connect to.
+ * @detailed_signal: a string of the form "signal-name::detail".
+ * @c_handler: the #GCallback to connect.
+ * @data: data to pass to @c_handler calls.
+ *
+ * Connects a #GCallback function to a signal for a particular object.
+ *
+ * The handler will be called before the default handler of the signal.
+ *
+ * Returns: the handler id
+ */
+
+
+/**
+ * g_signal_connect_after:
+ * @instance: the instance to connect to.
+ * @detailed_signal: a string of the form "signal-name::detail".
+ * @c_handler: the #GCallback to connect.
+ * @data: data to pass to @c_handler calls.
+ *
+ * Connects a #GCallback function to a signal for a particular object.
+ *
+ * The handler will be called after the default handler of the signal.
+ *
+ * Returns: the handler id
+ */
+
+
+/**
+ * g_signal_connect_swapped:
+ * @instance: the instance to connect to.
+ * @detailed_signal: a string of the form "signal-name::detail".
+ * @c_handler: the #GCallback to connect.
+ * @data: data to pass to @c_handler calls.
+ *
+ * Connects a #GCallback function to a signal for a particular object.
+ *
+ * The instance on which the signal is emitted and @data will be swapped when
+ * calling the handler.
+ *
+ * Returns: the handler id
+ */
+
+
+/**
+ * g_signal_handlers_block_by_func:
+ * @instance: The instance to block handlers from.
+ * @func: The C closure callback of the handlers (useless for non-C closures).
+ * @data: The closure data of the handlers' closures.
+ *
+ * Blocks all handlers on an instance that match @func and @data.
+ *
+ * Returns: The number of handlers that matched.
+ */
+
+
+/**
+ * g_signal_handlers_disconnect_by_data:
+ * @instance: The instance to remove handlers from
+ * @data: the closure data of the handlers' closures
+ *
+ * Disconnects all handlers on an instance that match @data.
+ *
+ * Returns: The number of handlers that matched.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_signal_handlers_disconnect_by_func:
+ * @instance: The instance to remove handlers from.
+ * @func: The C closure callback of the handlers (useless for non-C closures).
+ * @data: The closure data of the handlers' closures.
+ *
+ * Disconnects all handlers on an instance that match @func and @data.
+ *
+ * Returns: The number of handlers that matched.
+ */
+
+
+/**
+ * g_signal_handlers_unblock_by_func:
+ * @instance: The instance to unblock handlers from.
+ * @func: The C closure callback of the handlers (useless for non-C closures).
+ * @data: The closure data of the handlers' closures.
+ *
+ * Unblocks all handlers on an instance that match @func and @data.
+ *
+ * Returns: The number of handlers that matched.
+ */
+
+
+/**
+ * g_slice_alloc:
+ * @block_size: the number of bytes to allocate
+ *
+ * Allocates a block of memory from the slice allocator.
+ * The block adress handed out can be expected to be aligned
+ * to at least <literal>1 * sizeof (void*)</literal>,
+ * though in general slices are 2 * sizeof (void*) bytes aligned,
+ * if a malloc() fallback implementation is used instead,
+ * the alignment may be reduced in a libc dependent fashion.
+ * Note that the underlying slice allocation mechanism can
+ * be changed with the <link linkend="G_SLICE">G_SLICE=always-malloc</link>
+ * environment variable.
+ *
+ * Returns: a pointer to the allocated memory block
+ * Since: 2.10
+ */
+
+
+/**
+ * g_slice_alloc0:
+ * @block_size: the number of bytes to allocate
+ *
+ * Allocates a block of memory via g_slice_alloc() and initializes
+ * the returned memory to 0. Note that the underlying slice allocation
+ * mechanism can be changed with the
+ * <link linkend="G_SLICE">G_SLICE=always-malloc</link>
+ * environment variable.
+ *
+ * Returns: a pointer to the allocated block
+ * Since: 2.10
+ */
+
+
+/**
+ * g_slice_copy:
+ * @block_size: the number of bytes to allocate
+ * @mem_block: the memory to copy
+ *
+ * Allocates a block of memory from the slice allocator
+ * and copies @block_size bytes into it from @mem_block.
+ *
+ * Returns: a pointer to the allocated memory block
+ * Since: 2.14
+ */
+
+
+/**
+ * g_slice_dup:
+ * @type: the type to duplicate, typically a structure name
+ * @mem: the memory to copy into the allocated block
+ *
+ * A convenience macro to duplicate a block of memory using
+ * the slice allocator.
+ *
+ * It calls g_slice_copy() with <literal>sizeof (@type)</literal>
+ * and casts the returned pointer to a pointer of the given type,
+ * avoiding a type cast in the source code.
+ * Note that the underlying slice allocation mechanism can
+ * be changed with the <link linkend="G_SLICE">G_SLICE=always-malloc</link>
+ * environment variable.
+ *
+ * Returns: a pointer to the allocated block, cast to a pointer to @type
+ * Since: 2.14
+ */
+
+
+/**
+ * g_slice_free:
+ * @type: the type of the block to free, typically a structure name
+ * @mem: a pointer to the block to free
+ *
+ * A convenience macro to free a block of memory that has
+ * been allocated from the slice allocator.
+ *
+ * It calls g_slice_free1() using <literal>sizeof (type)</literal>
+ * as the block size.
+ * Note that the exact release behaviour can be changed with the
+ * <link linkend="G_DEBUG">G_DEBUG=gc-friendly</link> environment
+ * variable, also see <link linkend="G_SLICE">G_SLICE</link> for
+ * related debugging options.
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * g_slice_free1:
+ * @block_size: the size of the block
+ * @mem_block: a pointer to the block to free
+ *
+ * Frees a block of memory.
+ *
+ * The memory must have been allocated via g_slice_alloc() or
+ * g_slice_alloc0() and the @block_size has to match the size
+ * specified upon allocation. Note that the exact release behaviour
+ * can be changed with the
+ * <link linkend="G_DEBUG">G_DEBUG=gc-friendly</link> environment
+ * variable, also see <link linkend="G_SLICE">G_SLICE</link> for
+ * related debugging options.
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * g_slice_free_chain:
+ * @type: the type of the @mem_chain blocks
+ * @mem_chain: a pointer to the first block of the chain
+ * @next: the field name of the next pointer in @type
+ *
+ * Frees a linked list of memory blocks of structure type @type.
+ * The memory blocks must be equal-sized, allocated via
+ * g_slice_alloc() or g_slice_alloc0() and linked together by
+ * a @next pointer (similar to #GSList). The name of the
+ * @next field in @type is passed as third argument.
+ * Note that the exact release behaviour can be changed with the
+ * <link linkend="G_DEBUG">G_DEBUG=gc-friendly</link> environment
+ * variable, also see <link linkend="G_SLICE">G_SLICE</link> for
+ * related debugging options.
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * g_slice_free_chain_with_offset:
+ * @block_size: the size of the blocks
+ * @mem_chain: a pointer to the first block of the chain
+ * @next_offset: the offset of the @next field in the blocks
+ *
+ * Frees a linked list of memory blocks of structure type @type.
+ *
+ * The memory blocks must be equal-sized, allocated via
+ * g_slice_alloc() or g_slice_alloc0() and linked together by a
+ * @next pointer (similar to #GSList). The offset of the @next
+ * field in each block is passed as third argument.
+ * Note that the exact release behaviour can be changed with the
+ * <link linkend="G_DEBUG">G_DEBUG=gc-friendly</link> environment
+ * variable, also see <link linkend="G_SLICE">G_SLICE</link> for
+ * related debugging options.
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * g_slice_new:
+ * @type: the type to allocate, typically a structure name
+ *
+ * A convenience macro to allocate a block of memory from the
+ * slice allocator.
+ *
+ * It calls g_slice_alloc() with <literal>sizeof (@type)</literal>
+ * and casts the returned pointer to a pointer of the given type,
+ * avoiding a type cast in the source code.
+ * Note that the underlying slice allocation mechanism can
+ * be changed with the <link linkend="G_SLICE">G_SLICE=always-malloc</link>
+ * environment variable.
+ *
+ * Returns: a pointer to the allocated block, cast to a pointer to @type
+ * Since: 2.10
+ */
+
+
+/**
+ * g_slice_new0:
+ * @type: the type to allocate, typically a structure name
+ *
+ * A convenience macro to allocate a block of memory from the
+ * slice allocator and set the memory to 0.
+ *
+ * It calls g_slice_alloc0() with <literal>sizeof (@type)</literal>
+ * and casts the returned pointer to a pointer of the given type,
+ * avoiding a type cast in the source code.
+ * Note that the underlying slice allocation mechanism can
+ * be changed with the <link linkend="G_SLICE">G_SLICE=always-malloc</link>
+ * environment variable.
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * g_slist_alloc:
+ * @Returns: a pointer to the newly-allocated #GSList element.
+ *
+ * Allocates space for one #GSList element. It is called by the
+ * g_slist_append(), g_slist_prepend(), g_slist_insert() and
+ * g_slist_insert_sorted() functions and so is rarely used on its own.
+ */
+
+
+/**
+ * g_slist_append:
+ * @list: a #GSList
+ * @data: the data for the new element
+ *
+ * Adds a new element on to the end of the list.
+ *
+ * <note><para>
+ * The return value is the new start of the list, which may
+ * have changed, so make sure you store the new value.
+ * </para></note>
+ *
+ * <note><para>
+ * Note that g_slist_append() has to traverse the entire list
+ * to find the end, which is inefficient when adding multiple
+ * elements. A common idiom to avoid the inefficiency is to prepend
+ * the elements and reverse the list when all elements have been added.
+ * </para></note>
+ *
+ * |[
+ * /&ast; Notice that these are initialized to the empty list. &ast;/
+ * GSList *list = NULL, *number_list = NULL;
+ *
+ * /&ast; This is a list of strings. &ast;/
+ * list = g_slist_append (list, "first");
+ * list = g_slist_append (list, "second");
+ *
+ * /&ast; This is a list of integers. &ast;/
+ * number_list = g_slist_append (number_list, GINT_TO_POINTER (27));
+ * number_list = g_slist_append (number_list, GINT_TO_POINTER (14));
+ * ]|
+ *
+ * Returns: the new start of the #GSList
+ */
+
+
+/**
+ * g_slist_concat:
+ * @list1: a #GSList
+ * @list2: the #GSList to add to the end of the first #GSList
+ *
+ * Adds the second #GSList onto the end of the first #GSList.
+ * Note that the elements of the second #GSList are not copied.
+ * They are used directly.
+ *
+ * Returns: the start of the new #GSList
+ */
+
+
+/**
+ * g_slist_copy:
+ * @list: a #GSList
+ *
+ * Copies a #GSList.
+ *
+ * <note><para>
+ * Note that this is a "shallow" copy. If the list elements
+ * consist of pointers to data, the pointers are copied but
+ * the actual data isn't.
+ * </para></note>
+ *
+ * Returns: a copy of @list
+ */
+
+
+/**
+ * g_slist_delete_link:
+ * @list: a #GSList
+ * @link_: node to delete
+ *
+ * Removes the node link_ from the list and frees it.
+ * Compare this to g_slist_remove_link() which removes the node
+ * without freeing it.
+ *
+ * Returns: the new head of @list
+ */
+
+
+/**
+ * g_slist_find:
+ * @list: a #GSList
+ * @data: the element data to find
+ *
+ * Finds the element in a #GSList which
+ * contains the given data.
+ *
+ * or %NULL if it is not found
+ *
+ * Returns: the found #GSList element,
+ */
+
+
+/**
+ * g_slist_find_custom:
+ * @list: a #GSList
+ * @data: user data passed to the function
+ * @func: the function to call for each element. It should return 0 when the desired element is found
+ *
+ * Finds an element in a #GSList, using a supplied function to
+ * find the desired element. It iterates over the list, calling
+ * the given function which should return 0 when the desired
+ * element is found. The function takes two #gconstpointer arguments,
+ * the #GSList element's data as the first argument and the
+ * given user data.
+ *
+ * Returns: the found #GSList element, or %NULL if it is not found
+ */
+
+
+/**
+ * g_slist_foreach:
+ * @list: a #GSList
+ * @func: the function to call with each element's data
+ * @user_data: user data to pass to the function
+ *
+ * Calls a function for each element of a #GSList.
+ */
+
+
+/**
+ * g_slist_free:
+ * @list: a #GSList
+ *
+ * Frees all of the memory used by a #GSList.
+ * The freed elements are returned to the slice allocator.
+ *
+ * <note><para>
+ * If list elements contain dynamically-allocated memory,
+ * you should either use g_slist_free_full() or free them manually
+ * first.
+ * </para></note>
+ */
+
+
+/**
+ * g_slist_free1:
+ *
+ * A macro which does the same as g_slist_free_1().
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * g_slist_free_1:
+ * @list: a #GSList element
+ *
+ * Frees one #GSList element.
+ * It is usually used after g_slist_remove_link().
+ */
+
+
+/**
+ * g_slist_free_full:
+ * @list: a pointer to a #GSList
+ * @free_func: the function to be called to free each element's data
+ *
+ * Convenience method, which frees all the memory used by a #GSList, and
+ * calls the specified destroy function on every element's data.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_slist_index:
+ * @list: a #GSList
+ * @data: the data to find
+ *
+ * Gets the position of the element containing
+ * the given data (starting from 0).
+ *
+ * or -1 if the data is not found
+ *
+ * Returns: the index of the element containing the data,
+ */
+
+
+/**
+ * g_slist_insert:
+ * @list: a #GSList
+ * @data: the data for the new element
+ * @position: the position to insert the element. If this is negative, or is larger than the number of elements in the list, the new element is added on to the end of the list.
+ *
+ * Inserts a new element into the list at the given position.
+ *
+ * Returns: the new start of the #GSList
+ */
+
+
+/**
+ * g_slist_insert_before:
+ * @slist: a #GSList
+ * @sibling: node to insert @data before
+ * @data: data to put in the newly-inserted node
+ *
+ * Inserts a node before @sibling containing @data.
+ *
+ * Returns: the new head of the list.
+ */
+
+
+/**
+ * g_slist_insert_sorted:
+ * @list: a #GSList
+ * @data: the data for the new element
+ * @func: the function to compare elements in the list. It should return a number > 0 if the first parameter comes after the second parameter in the sort order.
+ *
+ * Inserts a new element into the list, using the given
+ * comparison function to determine its position.
+ *
+ * Returns: the new start of the #GSList
+ */
+
+
+/**
+ * g_slist_insert_sorted_with_data:
+ * @list: a #GSList
+ * @data: the data for the new element
+ * @func: the function to compare elements in the list. It should return a number > 0 if the first parameter comes after the second parameter in the sort order.
+ * @user_data: data to pass to comparison function
+ *
+ * Inserts a new element into the list, using the given
+ * comparison function to determine its position.
+ *
+ * Returns: the new start of the #GSList
+ * Since: 2.10
+ */
+
+
+/**
+ * g_slist_last:
+ * @list: a #GSList
+ *
+ * Gets the last element in a #GSList.
+ *
+ * <note><para>
+ * This function iterates over the whole list.
+ * </para></note>
+ *
+ * or %NULL if the #GSList has no elements
+ *
+ * Returns: the last element in the #GSList,
+ */
+
+
+/**
+ * g_slist_length:
+ * @list: a #GSList
+ *
+ * Gets the number of elements in a #GSList.
+ *
+ * <note><para>
+ * This function iterates over the whole list to
+ * count its elements.
+ * </para></note>
+ *
+ * Returns: the number of elements in the #GSList
+ */
+
+
+/**
+ * g_slist_next:
+ * @slist: an element in a #GSList.
+ * @Returns: the next element, or %NULL if there are no more elements.
+ *
+ * A convenience macro to get the next element in a #GSList.
+ */
+
+
+/**
+ * g_slist_nth:
+ * @list: a #GSList
+ * @n: the position of the element, counting from 0
+ *
+ * Gets the element at the given position in a #GSList.
+ *
+ * the end of the #GSList
+ *
+ * Returns: the element, or %NULL if the position is off
+ */
+
+
+/**
+ * g_slist_nth_data:
+ * @list: a #GSList
+ * @n: the position of the element
+ *
+ * Gets the data of the element at the given position.
+ *
+ * is off the end of the #GSList
+ *
+ * Returns: the element's data, or %NULL if the position
+ */
+
+
+/**
+ * g_slist_position:
+ * @list: a #GSList
+ * @llink: an element in the #GSList
+ *
+ * Gets the position of the given element
+ * in the #GSList (starting from 0).
+ *
+ * or -1 if the element is not found
+ *
+ * Returns: the position of the element in the #GSList,
+ */
+
+
+/**
+ * g_slist_prepend:
+ * @list: a #GSList
+ * @data: the data for the new element
+ *
+ * Adds a new element on to the start of the list.
+ *
+ * <note><para>
+ * The return value is the new start of the list, which
+ * may have changed, so make sure you store the new value.
+ * </para></note>
+ *
+ * |[
+ * /&ast; Notice that it is initialized to the empty list. &ast;/
+ * GSList *list = NULL;
+ * list = g_slist_prepend (list, "last");
+ * list = g_slist_prepend (list, "first");
+ * ]|
+ *
+ * Returns: the new start of the #GSList
+ */
+
+
+/**
+ * g_slist_remove:
+ * @list: a #GSList
+ * @data: the data of the element to remove
+ *
+ * Removes an element from a #GSList.
+ * If two elements contain the same data, only the first is removed.
+ * If none of the elements contain the data, the #GSList is unchanged.
+ *
+ * Returns: the new start of the #GSList
+ */
+
+
+/**
+ * g_slist_remove_all:
+ * @list: a #GSList
+ * @data: data to remove
+ *
+ * Removes all list nodes with data equal to @data.
+ * Returns the new head of the list. Contrast with
+ * g_slist_remove() which removes only the first node
+ * matching the given data.
+ *
+ * Returns: new head of @list
+ */
+
+
+/**
+ * g_slist_remove_link:
+ * @list: a #GSList
+ * @link_: an element in the #GSList
+ *
+ * Removes an element from a #GSList, without
+ * freeing the element. The removed element's next
+ * link is set to %NULL, so that it becomes a
+ * self-contained list with one element.
+ *
+ * Returns: the new start of the #GSList, without the element
+ */
+
+
+/**
+ * g_slist_reverse:
+ * @list: a #GSList
+ *
+ * Reverses a #GSList.
+ *
+ * Returns: the start of the reversed #GSList
+ */
+
+
+/**
+ * g_slist_sort:
+ * @list: a #GSList
+ * @compare_func: the comparison function used to sort the #GSList. This function is passed the data from 2 elements of the #GSList and should return 0 if they are equal, a negative value if the first element comes before the second, or a positive value if the first element comes after the second.
+ *
+ * Sorts a #GSList using the given comparison function.
+ *
+ * Returns: the start of the sorted #GSList
+ */
+
+
+/**
+ * g_slist_sort_with_data:
+ * @list: a #GSList
+ * @compare_func: comparison function
+ * @user_data: data to pass to comparison function
+ *
+ * Like g_slist_sort(), but the sort function accepts a user data argument.
+ *
+ * Returns: new head of the list
+ */
+
+
+/**
+ * g_snprintf:
+ * @string: the buffer to hold the output.
+ * @n: the maximum number of bytes to produce (including the terminating nul character).
+ * @format: a standard printf() format string, but notice <link linkend="string-precision">string precision pitfalls</link>.
+ * @...: the arguments to insert in the output.
+ *
+ * A safer form of the standard sprintf() function. The output is guaranteed
+ * to not exceed @n characters (including the terminating nul character), so
+ * it is easy to ensure that a buffer overflow cannot occur.
+ *
+ * See also g_strdup_printf().
+ *
+ * In versions of GLib prior to 1.2.3, this function may return -1 if the
+ * output was truncated, and the truncated string may not be nul-terminated.
+ * In versions prior to 1.3.12, this function returns the length of the output
+ * string.
+ *
+ * The return value of g_snprintf() conforms to the snprintf()
+ * function as standardized in ISO C99. Note that this is different from
+ * traditional snprintf(), which returns the length of the output string.
+ *
+ * The format string may contain positional parameters, as specified in
+ * the Single Unix Specification.
+ *
+ * was large enough.
+ *
+ * Returns: the number of bytes which would be produced if the buffer
+ */
+
+
+/**
+ * g_source_add_child_source:
+ * @child_source: a second #GSource that @source should "poll"
+ *
+ * Adds @child_source to @source as a "polled" source; when @source is
+ * added to a #GMainContext, @child_source will be automatically added
+ * with the same priority, when @child_source is triggered, it will
+ * cause @source to dispatch (in addition to calling its own
+ * callback), and when @source is destroyed, it will destroy
+ * @child_source as well. (@source will also still be dispatched if
+ * its own prepare/check functions indicate that it is ready.)
+ *
+ * If you don't need @child_source to do anything on its own when it
+ * triggers, you can call g_source_set_dummy_callback() on it to set a
+ * callback that does nothing (except return %TRUE if appropriate).
+ *
+ * @source will hold a reference on @child_source while @child_source
+ * is attached to it.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_source_add_poll:
+ * @fd: a #GPollFD structure holding information about a file descriptor to watch.
+ *
+ * Adds a file descriptor to the set of file descriptors polled for
+ * this source. This is usually combined with g_source_new() to add an
+ * event source. The event source's check function will typically test
+ * the @revents field in the #GPollFD struct and return %TRUE if events need
+ * to be processed.
+ */
+
+
+/**
+ * g_source_attach:
+ * @source: a #GSource
+ * @context: (allow-none): a #GMainContext (if %NULL, the default context will be used)
+ *
+ * Adds a #GSource to a @context so that it will be executed within
+ * that context. Remove it by calling g_source_destroy().
+ *
+ * #GMainContext.
+ *
+ * Returns: the ID (greater than 0) for the source within the
+ */
+
+
+/**
+ * g_source_destroy:
+ * @source: a #GSource
+ *
+ * Removes a source from its #GMainContext, if any, and mark it as
+ * destroyed.  The source cannot be subsequently added to another
+ * context.
+ */
+
+
+/**
+ * g_source_get_can_recurse:
+ * @source: a #GSource
+ *
+ * Checks whether a source is allowed to be called recursively.
+ * see g_source_set_can_recurse().
+ *
+ * Returns: whether recursion is allowed.
+ */
+
+
+/**
+ * g_source_get_context:
+ * @source: a #GSource
+ *
+ * Gets the #GMainContext with which the source is associated.
+ * Calling this function on a destroyed source is an error.
+ *
+ * source is associated, or %NULL if the context has not
+ * yet been added to a source.
+ *
+ * Returns: (transfer none) (allow-none): the #GMainContext with which the
+ */
+
+
+/**
+ * g_source_get_current_time:
+ * @source: a #GSource
+ * @timeval: #GTimeVal structure in which to store current time.
+ *
+ * This function ignores @source and is otherwise the same as
+ * g_get_current_time().
+ *
+ * Deprecated: 2.28: use g_source_get_time() instead
+ */
+
+
+/**
+ * g_source_get_id:
+ * @source: a #GSource
+ *
+ * Returns the numeric ID for a particular source. The ID of a source
+ * is a positive integer which is unique within a particular main loop
+ * context. The reverse
+ * mapping from ID to source is done by g_main_context_find_source_by_id().
+ *
+ * Returns: the ID (greater than 0) for the source
+ */
+
+
+/**
+ * g_source_get_name:
+ * @source: a #GSource
+ *
+ * Gets a name for the source, used in debugging and profiling.
+ * The name may be #NULL if it has never been set with
+ * g_source_set_name().
+ *
+ * Returns: the name of the source
+ * Since: 2.26
+ */
+
+
+/**
+ * g_source_get_priority:
+ * @source: a #GSource
+ *
+ * Gets the priority of a source.
+ *
+ * Returns: the priority of the source
+ */
+
+
+/**
+ * g_source_get_time:
+ * @source: a #GSource
+ *
+ * Gets the time to be used when checking this source. The advantage of
+ * calling this function over calling g_get_monotonic_time() directly is
+ * that when checking multiple sources, GLib can cache a single value
+ * instead of having to repeatedly get the system monotonic time.
+ *
+ * The time here is the system monotonic time, if available, or some
+ * other reasonable alternative otherwise.  See g_get_monotonic_time().
+ *
+ * Returns: the monotonic time in microseconds
+ * Since: 2.28
+ */
+
+
+/**
+ * g_source_is_destroyed:
+ * @source: a #GSource
+ *
+ * Returns whether @source has been destroyed.
+ *
+ * This is important when you operate upon your objects
+ * from within idle handlers, but may have freed the object
+ * before the dispatch of your idle handler.
+ *
+ * |[
+ * static gboolean
+ * idle_callback (gpointer data)
+ * {
+ * SomeWidget *self = data;
+ *
+ * GDK_THREADS_ENTER (<!-- -->);
+ * /<!-- -->* do stuff with self *<!-- -->/
+ * self->idle_id = 0;
+ * GDK_THREADS_LEAVE (<!-- -->);
+ *
+ * return G_SOURCE_REMOVE;
+ * }
+ *
+ * static void
+ * some_widget_do_stuff_later (SomeWidget *self)
+ * {
+ * self->idle_id = g_idle_add (idle_callback, self);
+ * }
+ *
+ * static void
+ * some_widget_finalize (GObject *object)
+ * {
+ * SomeWidget *self = SOME_WIDGET (object);
+ *
+ * if (self->idle_id)
+ * g_source_remove (self->idle_id);
+ *
+ * G_OBJECT_CLASS (parent_class)->finalize (object);
+ * }
+ * ]|
+ *
+ * This will fail in a multi-threaded application if the
+ * widget is destroyed before the idle handler fires due
+ * to the use after free in the callback. A solution, to
+ * this particular problem, is to check to if the source
+ * has already been destroy within the callback.
+ *
+ * |[
+ * static gboolean
+ * idle_callback (gpointer data)
+ * {
+ * SomeWidget *self = data;
+ *
+ * GDK_THREADS_ENTER ();
+ * if (!g_source_is_destroyed (g_main_current_source ()))
+ * {
+ * /<!-- -->* do stuff with self *<!-- -->/
+ * }
+ * GDK_THREADS_LEAVE ();
+ *
+ * return FALSE;
+ * }
+ * ]|
+ *
+ * Returns: %TRUE if the source has been destroyed
+ * Since: 2.12
+ */
+
+
+/**
+ * g_source_new:
+ * @source_funcs: structure containing functions that implement the sources behavior.
+ * @struct_size: size of the #GSource structure to create.
+ *
+ * Creates a new #GSource structure. The size is specified to
+ * allow creating structures derived from #GSource that contain
+ * additional data. The size passed in must be at least
+ * <literal>sizeof (GSource)</literal>.
+ *
+ * The source will not initially be associated with any #GMainContext
+ * and must be added to one with g_source_attach() before it will be
+ * executed.
+ *
+ * Returns: the newly-created #GSource.
+ */
+
+
+/**
+ * g_source_ref:
+ * @source: a #GSource
+ *
+ * Increases the reference count on a source by one.
+ *
+ * Returns: @source
+ */
+
+
+/**
+ * g_source_remove:
+ * @tag: the ID of the source to remove.
+ *
+ * Removes the source with the given id from the default main context.
+ * The id of
+ * a #GSource is given by g_source_get_id(), or will be returned by the
+ * functions g_source_attach(), g_idle_add(), g_idle_add_full(),
+ * g_timeout_add(), g_timeout_add_full(), g_child_watch_add(),
+ * g_child_watch_add_full(), g_io_add_watch(), and g_io_add_watch_full().
+ *
+ * See also g_source_destroy(). You must use g_source_destroy() for sources
+ * added to a non-default main context.
+ *
+ * Returns: %TRUE if the source was found and removed.
+ */
+
+
+/**
+ * g_source_remove_by_funcs_user_data:
+ * @funcs: The @source_funcs passed to g_source_new()
+ * @user_data: the user data for the callback
+ *
+ * Removes a source from the default main loop context given the
+ * source functions and user data. If multiple sources exist with the
+ * same source functions and user data, only one will be destroyed.
+ *
+ * Returns: %TRUE if a source was found and removed.
+ */
+
+
+/**
+ * g_source_remove_by_user_data:
+ * @user_data: the user_data for the callback.
+ *
+ * Removes a source from the default main loop context given the user
+ * data for the callback. If multiple sources exist with the same user
+ * data, only one will be destroyed.
+ *
+ * Returns: %TRUE if a source was found and removed.
+ */
+
+
+/**
+ * g_source_remove_child_source:
+ * @child_source: a #GSource previously passed to g_source_add_child_source().
+ *
+ * Detaches @child_source from @source and destroys it.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_source_remove_poll:
+ * @fd: a #GPollFD structure previously passed to g_source_add_poll().
+ *
+ * Removes a file descriptor from the set of file descriptors polled for
+ * this source.
+ */
+
+
+/**
+ * g_source_set_callback:
+ * @source: the source
+ * @func: a callback function
+ * @data: the data to pass to callback function
+ * @notify: (allow-none): a function to call when @data is no longer in use, or %NULL.
+ *
+ * Sets the callback function for a source. The callback for a source is
+ * called from the source's dispatch function.
+ *
+ * The exact type of @func depends on the type of source; ie. you
+ * should not count on @func being called with @data as its first
+ * parameter.
+ *
+ * Typically, you won't use this function. Instead use functions specific
+ * to the type of source you are using.
+ */
+
+
+/**
+ * g_source_set_callback_indirect:
+ * @source: the source
+ * @callback_data: pointer to callback data "object"
+ * @callback_funcs: functions for reference counting @callback_data and getting the callback and data
+ *
+ * Sets the callback function storing the data as a refcounted callback
+ * "object". This is used internally. Note that calling
+ * g_source_set_callback_indirect() assumes
+ * an initial reference count on @callback_data, and thus
+ * @callback_funcs->unref will eventually be called once more
+ * than @callback_funcs->ref.
+ */
+
+
+/**
+ * g_source_set_can_recurse:
+ * @source: a #GSource
+ * @can_recurse: whether recursion is allowed for this source
+ *
+ * Sets whether a source can be called recursively. If @can_recurse is
+ * %TRUE, then while the source is being dispatched then this source
+ * will be processed normally. Otherwise, all processing of this
+ * source is blocked until the dispatch function returns.
+ */
+
+
+/**
+ * g_source_set_funcs:
+ * @source: a #GSource
+ * @funcs: the new #GSourceFuncs
+ *
+ * Sets the source functions (can be used to override
+ * default implementations) of an unattached source.
+ *
+ * Since: 2.12
+ */
+
+
+/**
+ * g_source_set_name:
+ * @source: a #GSource
+ * @name: debug name for the source
+ *
+ * Sets a name for the source, used in debugging and profiling.
+ * The name defaults to #NULL.
+ *
+ * The source name should describe in a human-readable way
+ * what the source does. For example, "X11 event queue"
+ * or "GTK+ repaint idle handler" or whatever it is.
+ *
+ * It is permitted to call this function multiple times, but is not
+ * recommended due to the potential performance impact.  For example,
+ * one could change the name in the "check" function of a #GSourceFuncs
+ * to include details like the event type in the source name.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_source_set_name_by_id:
+ * @tag: a #GSource ID
+ * @name: debug name for the source
+ *
+ * Sets the name of a source using its ID.
+ *
+ * This is a convenience utility to set source names from the return
+ * value of g_idle_add(), g_timeout_add(), etc.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_source_set_priority:
+ * @source: a #GSource
+ * @priority: the new priority.
+ *
+ * Sets the priority of a source. While the main loop is being run, a
+ * source will be dispatched if it is ready to be dispatched and no
+ * sources at a higher (numerically smaller) priority are ready to be
+ * dispatched.
+ */
+
+
+/**
+ * g_source_unref:
+ * @source: a #GSource
+ *
+ * Decreases the reference count of a source by one. If the
+ * resulting reference count is zero the source and associated
+ * memory will be destroyed.
+ */
+
+
+/**
+ * g_spaced_primes_closest:
+ * @num: a #guint
+ *
+ * Gets the smallest prime number from a built-in array of primes which
+ * is larger than @num. This is used within GLib to calculate the optimum
+ * size of a #GHashTable.
+ *
+ * The built-in array of primes ranges from 11 to 13845163 such that
+ * each prime is approximately 1.5-2 times the previous prime.
+ *
+ * which is larger than @num
+ *
+ * Returns: the smallest prime number from a built-in array of primes
+ */
+
+
+/**
+ * g_spawn_async:
+ * @working_directory: (allow-none): child's current working directory, or %NULL to inherit parent's
+ * @argv: (array zero-terminated=1): child's argument vector
+ * @envp: (array zero-terminated=1) (allow-none): child's environment, or %NULL to inherit parent's
+ * @flags: flags from #GSpawnFlags
+ * @child_setup: (scope async) (allow-none): function to run in the child just before exec()
+ * @user_data: (closure): user data for @child_setup
+ * @child_pid: (out) (allow-none): return location for child process reference, or %NULL
+ * @error: return location for error
+ *
+ * See g_spawn_async_with_pipes() for a full description; this function
+ * simply calls the g_spawn_async_with_pipes() without any pipes.
+ *
+ * You should call g_spawn_close_pid() on the returned child process
+ * reference when you don't need it any more.
+ *
+ * <note><para>
+ * If you are writing a GTK+ application, and the program you
+ * are spawning is a graphical application, too, then you may
+ * want to use gdk_spawn_on_screen() instead to ensure that
+ * the spawned program opens its windows on the right screen.
+ * </para></note>
+ *
+ * <note><para> Note that the returned @child_pid on Windows is a
+ * handle to the child process and not its identifier. Process handles
+ * and process identifiers are different concepts on Windows.
+ * </para></note>
+ *
+ * Returns: %TRUE on success, %FALSE if error is set
+ */
+
+
+/**
+ * g_spawn_async_with_pipes:
+ * @working_directory: (allow-none): child's current working directory, or %NULL to inherit parent's, in the GLib file name encoding
+ * @argv: (array zero-terminated=1): child's argument vector, in the GLib file name encoding
+ * @envp: (array zero-terminated=1) (allow-none): child's environment, or %NULL to inherit parent's, in the GLib file name encoding
+ * @flags: flags from #GSpawnFlags
+ * @child_setup: (scope async) (allow-none): function to run in the child just before exec()
+ * @user_data: (closure): user data for @child_setup
+ * @child_pid: (out) (allow-none): return location for child process ID, or %NULL
+ * @standard_input: (out) (allow-none): return location for file descriptor to write to child's stdin, or %NULL
+ * @standard_output: (out) (allow-none): return location for file descriptor to read child's stdout, or %NULL
+ * @standard_error: (out) (allow-none): return location for file descriptor to read child's stderr, or %NULL
+ * @error: return location for error
+ *
+ * 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, @argv. @argv
+ * should be a %NULL-terminated array of strings, to be passed as the
+ * argument vector for the child. The first string in @argv 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 %G_SPAWN_SEARCH_PATH flag.
+ * If the program name is not a full path and %G_SPAWN_SEARCH_PATH flag is not
+ * used, then the program will be run from the current directory (or
+ * @working_directory, if specified); this might be unexpected or even
+ * dangerous in some cases when the current directory is world-writable.
+ *
+ * On Windows, note that all the string or string vector arguments to
+ * this function and the other g_spawn*() functions are in UTF-8, the
+ * GLib file name encoding. Unicode characters that are not part of
+ * the system codepage passed in these arguments will be correctly
+ * available in the spawned program only if it uses wide character API
+ * to retrieve its command line. For C programs built with Microsoft's
+ * tools it is enough to make the program have a wmain() instead of
+ * main(). wmain() has a wide character argument vector as parameter.
+ *
+ * At least currently, mingw doesn't support wmain(), so if you use
+ * mingw to develop the spawned program, it will have to call the
+ * undocumented function __wgetmainargs() to get the wide character
+ * argument vector and environment. See gspawn-win32-helper.c in the
+ * GLib sources or init.c in the mingw runtime sources for a prototype
+ * for that function. Alternatively, you can retrieve the Win32 system
+ * level wide character command line passed to the spawned program
+ * using the GetCommandLineW() function.
+ *
+ * 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
+ * g_spawn_async_with_pipes() eventually calls) paste the argument
+ * vector elements together 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 main(). 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,
+ * g_spawn_async_with_pipes() will do quoting and escaping on argument
+ * vector elements that need it before calling the C runtime
+ * spawn() function.
+ *
+ * The returned @child_pid on Windows is a handle to the child
+ * process, not its identifier. Process handles and process
+ * identifiers are different concepts on Windows.
+ *
+ * @envp is a %NULL-terminated array of strings, where each string
+ * has the form <literal>KEY=VALUE</literal>. This will become
+ * the child's environment. If @envp is %NULL, the child inherits its
+ * parent's environment.
+ *
+ * @flags should be the bitwise OR of any flags you want to affect the
+ * function's behaviour. The %G_SPAWN_DO_NOT_REAP_CHILD means that the
+ * child will not automatically be reaped; you must use a child watch 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 child watch is equivalent to calling waitpid() or handling
+ * the <literal>SIGCHLD</literal> signal manually. On Windows, calling g_spawn_close_pid()
+ * is equivalent to calling CloseHandle() on the process handle returned
+ * in @child_pid).  See g_child_watch_add().
+ *
+ * %G_SPAWN_LEAVE_DESCRIPTORS_OPEN 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 exec() in the child. %G_SPAWN_SEARCH_PATH
+ * means that <literal>argv[0]</literal> need not be an absolute path, it
+ * will be looked for in the user's <envar>PATH</envar>.
+ * %G_SPAWN_STDOUT_TO_DEV_NULL 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, @standard_output must be %NULL.
+ * %G_SPAWN_STDERR_TO_DEV_NULL 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, @standard_error must be %NULL.
+ * %G_SPAWN_CHILD_INHERITS_STDIN means that the child will inherit the parent's
+ * standard input (by default, the child's standard input is attached to
+ * /dev/null). If you use this flag, @standard_input must be %NULL.
+ * %G_SPAWN_FILE_AND_ARGV_ZERO means that the first element of @argv is
+ * the file to execute, while the remaining elements are the
+ * actual argument vector to pass to the file. Normally
+ * g_spawn_async_with_pipes() uses @argv[0] as the file to execute, and
+ * passes all of @argv to the child.
+ *
+ * @child_setup and @user_data 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
+ * exec(). That is, @child_setup is called just
+ * before calling exec() in the child. Obviously
+ * actions taken in this function will only affect the child, not the
+ * parent.
+ *
+ * On Windows, there is no separate fork() and exec()
+ * functionality. Child processes are created and run with a single
+ * API call, CreateProcess(). There is no sensible thing @child_setup
+ * could be used for on Windows so it is ignored and not called.
+ *
+ * If non-%NULL, @child_pid will on Unix be filled with the child's
+ * process ID. You can use the process ID to send signals to the
+ * child, or to use g_child_watch_add() (or waitpid()) if you specified the
+ * %G_SPAWN_DO_NOT_REAP_CHILD flag. On Windows, @child_pid will be
+ * filled with a handle to the child process only if you specified the
+ * %G_SPAWN_DO_NOT_REAP_CHILD flag. You can then access the child
+ * process using the Win32 API, for example wait for its termination
+ * with the <function>WaitFor*()</function> functions, or examine its
+ * exit code with GetExitCodeProcess(). You should close the handle
+ * with CloseHandle() or g_spawn_close_pid() when you no longer need it.
+ *
+ * If non-%NULL, the @standard_input, @standard_output, @standard_error
+ * locations will be filled with file descriptors for writing to the child's
+ * standard input or reading from its standard output or standard error.
+ * The caller of g_spawn_async_with_pipes() must close these file descriptors
+ * when they are no longer in use. If these parameters are %NULL, the corresponding
+ * pipe won't be created.
+ *
+ * If @standard_input is NULL, the child's standard input is attached to
+ * /dev/null unless %G_SPAWN_CHILD_INHERITS_STDIN is set.
+ *
+ * If @standard_error is NULL, the child's standard error goes to the same
+ * location as the parent's standard error unless %G_SPAWN_STDERR_TO_DEV_NULL
+ * is set.
+ *
+ * If @standard_output is NULL, the child's standard output goes to the same
+ * location as the parent's standard output unless %G_SPAWN_STDOUT_TO_DEV_NULL
+ * is set.
+ *
+ * @error can be %NULL to ignore errors, or non-%NULL to report errors.
+ * If an error is set, the function returns %FALSE. Errors
+ * are reported even if they occur in the child (for example if the
+ * executable in <literal>argv[0]</literal> is not found). Typically
+ * the <literal>message</literal> field of returned errors should be displayed
+ * to users. Possible errors are those from the #G_SPAWN_ERROR domain.
+ *
+ * If an error occurs, @child_pid, @standard_input, @standard_output,
+ * and @standard_error will not be filled with valid values.
+ *
+ * If @child_pid is not %NULL and an error does not occur then the returned
+ * process reference must be closed using g_spawn_close_pid().
+ *
+ * <note><para>
+ * If you are writing a GTK+ application, and the program you
+ * are spawning is a graphical application, too, then you may
+ * want to use gdk_spawn_on_screen_with_pipes() instead to ensure that
+ * the spawned program opens its windows on the right screen.
+ * </para></note>
+ *
+ * Returns: %TRUE on success, %FALSE if an error was set
+ */
+
+
+/**
+ * g_spawn_close_pid:
+ * @pid: The process reference to close
+ *
+ * On some platforms, notably Windows, the #GPid type represents a resource
+ * which must be closed to prevent resource leaking. g_spawn_close_pid()
+ * is provided for this purpose. It should be used on all platforms, even
+ * though it doesn't do anything under UNIX.
+ */
+
+
+/**
+ * g_spawn_command_line_async:
+ * @command_line: a command line
+ * @error: return location for errors
+ *
+ * A simple version of g_spawn_async() that parses a command line with
+ * g_shell_parse_argv() and passes it to g_spawn_async(). Runs a
+ * command line in the background. Unlike g_spawn_async(), the
+ * %G_SPAWN_SEARCH_PATH flag is enabled, other flags are not. Note
+ * that %G_SPAWN_SEARCH_PATH can have security implications, so
+ * consider using g_spawn_async() directly if appropriate. Possible
+ * errors are those from g_shell_parse_argv() and g_spawn_async().
+ *
+ * The same concerns on Windows apply as for g_spawn_command_line_sync().
+ *
+ * Returns: %TRUE on success, %FALSE if error is set.
+ */
+
+
+/**
+ * g_spawn_command_line_sync:
+ * @command_line: a command line
+ * @standard_output: (out) (array zero-terminated=1) (element-type guint8) (allow-none): return location for child output
+ * @standard_error: (out) (array zero-terminated=1) (element-type guint8) (allow-none): return location for child errors
+ * @exit_status: (out) (allow-none): return location for child exit status, as returned by waitpid()
+ * @error: return location for errors
+ *
+ * A simple version of g_spawn_sync() with little-used parameters
+ * removed, taking a command line instead of an argument vector.  See
+ * g_spawn_sync() for full details. @command_line will be parsed by
+ * g_shell_parse_argv(). Unlike g_spawn_sync(), the %G_SPAWN_SEARCH_PATH flag
+ * is enabled. Note that %G_SPAWN_SEARCH_PATH can have security
+ * implications, so consider using g_spawn_sync() directly if
+ * appropriate. Possible errors are those from g_spawn_sync() and those
+ * from g_shell_parse_argv().
+ *
+ * If @exit_status is non-%NULL, the exit status of the child is stored there as
+ * it would be returned by waitpid(); standard UNIX macros such as WIFEXITED()
+ * and WEXITSTATUS() must be used to evaluate the exit status.
+ *
+ * On Windows, please note the implications of g_shell_parse_argv()
+ * parsing @command_line. Parsing is done according to Unix shell rules, not
+ * Windows command interpreter rules.
+ * Space is a separator, and backslashes are
+ * special. Thus you cannot simply pass a @command_line containing
+ * canonical Windows paths, like "c:\\program files\\app\\app.exe", as
+ * the backslashes will be eaten, and the space will act as a
+ * separator. You need to enclose such paths with single quotes, like
+ * "'c:\\program files\\app\\app.exe' 'e:\\folder\\argument.txt'".
+ *
+ * Returns: %TRUE on success, %FALSE if an error was set
+ */
+
+
+/**
+ * g_spawn_sync:
+ * @working_directory: (allow-none): child's current working directory, or %NULL to inherit parent's
+ * @argv: (array zero-terminated=1): child's argument vector
+ * @envp: (array zero-terminated=1) (allow-none): child's environment, or %NULL to inherit parent's
+ * @flags: flags from #GSpawnFlags
+ * @child_setup: (scope async) (allow-none): function to run in the child just before exec()
+ * @user_data: (closure): user data for @child_setup
+ * @standard_output: (out) (array zero-terminated=1) (element-type guint8) (allow-none): return location for child output, or %NULL
+ * @standard_error: (out) (array zero-terminated=1) (element-type guint8) (allow-none): return location for child error messages, or %NULL
+ * @exit_status: (out) (allow-none): return location for child exit status, as returned by waitpid(), or %NULL
+ * @error: return location for error, or %NULL
+ *
+ * Executes a child synchronously (waits for the child to exit before returning).
+ * All output from the child is stored in @standard_output and @standard_error,
+ * if those parameters are non-%NULL. Note that you must set the
+ * %G_SPAWN_STDOUT_TO_DEV_NULL and %G_SPAWN_STDERR_TO_DEV_NULL flags when
+ * passing %NULL for @standard_output and @standard_error.
+ * If @exit_status is non-%NULL, the exit status of the child is stored
+ * there as it would be returned by waitpid(); standard UNIX macros such
+ * as WIFEXITED() and WEXITSTATUS() must be used to evaluate the exit status.
+ * Note that this function call waitpid() even if @exit_status is %NULL, and
+ * does not accept the %G_SPAWN_DO_NOT_REAP_CHILD flag.
+ * If an error occurs, no data is returned in @standard_output,
+ * @standard_error, or @exit_status.
+ *
+ * This function calls g_spawn_async_with_pipes() internally; see that
+ * function for full details on the other parameters and details on
+ * how these functions work on Windows.
+ *
+ * Returns: %TRUE on success, %FALSE if an error was set.
+ */
+
+
+/**
+ * g_sprintf:
+ * @string: A pointer to a memory buffer to contain the resulting string. It is up to the caller to ensure that the allocated buffer is large enough to hold the formatted result
+ * @format: a standard printf() format string, but notice <link linkend="string-precision">string precision pitfalls</link>.
+ * @...: the arguments to insert in the output.
+ *
+ * An implementation of the standard sprintf() function which supports
+ * positional parameters, as specified in the Single Unix Specification.
+ *
+ * Note that it is usually better to use g_snprintf(), to avoid the
+ * risk of buffer overflow.
+ *
+ * See also g_strdup_printf().
+ *
+ * Returns: the number of bytes printed.
+ * Since: 2.2
+ */
+
+
+/**
+ * g_stat:
+ * @filename: a pathname in the GLib file name encoding (UTF-8 on Windows)
+ * @buf: a pointer to a <structname>stat</structname> struct, which will be filled with the file information
+ *
+ * A wrapper for the POSIX stat() function. The stat() function
+ * returns information about a file. On Windows the stat() function in
+ * the C library checks only the FAT-style READONLY attribute and does
+ * not look at the ACL at all. Thus on Windows the protection bits in
+ * the st_mode field are a fabrication of little use.
+ *
+ * On Windows the Microsoft C libraries have several variants of the
+ * <structname>stat</structname> struct and stat() function with names
+ * like "_stat", "_stat32", "_stat32i64" and "_stat64i32". The one
+ * used here is for 32-bit code the one with 32-bit size and time
+ * fields, specifically called "_stat32".
+ *
+ * In Microsoft's compiler, by default "struct stat" means one with
+ * 64-bit time fields while in MinGW "struct stat" is the legacy one
+ * with 32-bit fields. To hopefully clear up this messs, the gstdio.h
+ * header defines a type GStatBuf which is the appropriate struct type
+ * depending on the platform and/or compiler being used. On POSIX it
+ * is just "struct stat", but note that even on POSIX platforms,
+ * "stat" might be a macro.
+ *
+ * See your C library manual for more details about stat().
+ *
+ * occurred
+ *
+ * Returns: 0 if the information was successfully retrieved, -1 if an error
+ * Since: 2.6
+ */
+
+
+/**
+ * g_stpcpy:
+ * @dest: destination buffer.
+ * @src: source string.
+ *
+ * Copies a nul-terminated string into the dest buffer, include the
+ * trailing nul, and return a pointer to the trailing nul byte.
+ * This is useful for concatenating multiple strings together
+ * without having to repeatedly scan for the end.
+ *
+ * Returns: a pointer to trailing nul byte.
+ */
+
+
+/**
+ * g_str_equal:
+ * @v1: a key
+ * @v2: a key to compare with @v1
+ *
+ * Compares two strings for byte-by-byte equality and returns %TRUE
+ * if they are equal. It can be passed to g_hash_table_new() as the
+ * @key_equal_func parameter, when using non-%NULL strings as keys in a
+ * #GHashTable.
+ *
+ * Note that this function is primarily meant as a hash table comparison
+ * function. For a general-purpose, %NULL-safe string comparison function,
+ * see g_strcmp0().
+ *
+ * Returns: %TRUE if the two keys match
+ */
+
+
+/**
+ * g_str_has_prefix:
+ * @str: a nul-terminated string
+ * @prefix: the nul-terminated prefix to look for
+ *
+ * Looks whether the string @str begins with @prefix.
+ *
+ * Returns: %TRUE if @str begins with @prefix, %FALSE otherwise.
+ * Since: 2.2
+ */
+
+
+/**
+ * g_str_has_suffix:
+ * @str: a nul-terminated string
+ * @suffix: the nul-terminated suffix to look for
+ *
+ * Looks whether the string @str ends with @suffix.
+ *
+ * Returns: %TRUE if @str end with @suffix, %FALSE otherwise.
+ * Since: 2.2
+ */
+
+
+/**
+ * g_str_hash:
+ * @v: a string key
+ *
+ * Converts a string to a hash value.
+ *
+ * This function implements the widely used "djb" hash apparently posted
+ * by Daniel Bernstein to comp.lang.c some time ago.  The 32 bit
+ * unsigned hash value starts at 5381 and for each byte 'c' in the
+ * string, is updated: <literal>hash = hash * 33 + c</literal>.  This
+ * function uses the signed value of each byte.
+ *
+ * It can be passed to g_hash_table_new() as the @hash_func parameter,
+ * when using non-%NULL strings as keys in a #GHashTable.
+ *
+ * Returns: a hash value corresponding to the key
+ */
+
+
+/**
+ * g_strcanon:
+ * @string: a nul-terminated array of bytes
+ * @valid_chars: bytes permitted in @string
+ * @substitutor: replacement character for disallowed bytes
+ *
+ * For each character in @string, if the character is not in
+ * @valid_chars, replaces the character with @substitutor.
+ * Modifies @string in place, and return @string itself, not
+ * a copy. The return value is to allow nesting such as
+ * |[
+ * g_ascii_strup (g_strcanon (str, "abc", '?'))
+ * ]|
+ *
+ * Returns: @string
+ */
+
+
+/**
+ * g_strcasecmp:
+ * @s1: a string.
+ * @s2: a string to compare with @s1.
+ *
+ * A case-insensitive string comparison, corresponding to the standard
+ * strcasecmp() function on platforms which support it.
+ *
+ * or a positive value if @s1 &gt; @s2.
+ *
+ * Deprecated:2.2: See g_strncasecmp() for a discussion of why this function
+ * is deprecated and how to replace it.
+ *
+ * Returns: 0 if the strings match, a negative value if @s1 &lt; @s2,
+ */
+
+
+/**
+ * g_strchomp:
+ * @string: a string to remove the trailing whitespace from
+ *
+ * Removes trailing whitespace from a string.
+ *
+ * This function doesn't allocate or reallocate any memory;
+ * it modifies @string in place. The pointer to @string is
+ * returned to allow the nesting of functions.
+ *
+ * Also see g_strchug() and g_strstrip().
+ *
+ * Returns: @string.
+ */
+
+
+/**
+ * g_strchug:
+ * @string: a string to remove the leading whitespace from
+ *
+ * Removes leading whitespace from a string, by moving the rest
+ * of the characters forward.
+ *
+ * This function doesn't allocate or reallocate any memory;
+ * it modifies @string in place. The pointer to @string is
+ * returned to allow the nesting of functions.
+ *
+ * Also see g_strchomp() and g_strstrip().
+ *
+ * Returns: @string
+ */
+
+
+/**
+ * g_strcmp0:
+ * @str1: (allow-none): a C string or %NULL
+ * @str2: (allow-none): another C string or %NULL
+ *
+ * Compares @str1 and @str2 like strcmp(). Handles %NULL
+ * gracefully by sorting it before non-%NULL strings.
+ * Comparing two %NULL pointers returns 0.
+ *
+ * Returns: -1, 0 or 1, if @str1 is <, == or > than @str2.
+ * Since: 2.16
+ */
+
+
+/**
+ * g_strcompress:
+ * @source: a string to compress
+ *
+ * Replaces all escaped characters with their one byte equivalent.
+ *
+ * This function does the reverse conversion of g_strescape().
+ *
+ * character compressed
+ *
+ * Returns: a newly-allocated copy of @source with all escaped
+ */
+
+
+/**
+ * g_strconcat:
+ * @string1: the first string to add, which must not be %NULL
+ * @...: a %NULL-terminated list of strings to append to the string
+ *
+ * Concatenates all of the given strings into one long string.
+ * The returned string should be freed with g_free() when no longer needed.
+ *
+ * Note that this function is usually not the right function to use to
+ * assemble a translated message from pieces, since proper translation
+ * often requires the pieces to be reordered.
+ *
+ * <warning><para>The variable argument list <emphasis>must</emphasis> end
+ * with %NULL. If you forget the %NULL, g_strconcat() will start appending
+ * random memory junk to your string.</para></warning>
+ *
+ * Returns: a newly-allocated string containing all the string arguments
+ */
+
+
+/**
+ * g_strdelimit:
+ * @string: the string to convert
+ * @delimiters: (allow-none): a string containing the current delimiters, or %NULL to use the standard delimiters defined in #G_STR_DELIMITERS
+ * @new_delimiter: the new delimiter character
+ *
+ * Converts any delimiter characters in @string to @new_delimiter.
+ * Any characters in @string which are found in @delimiters are
+ * changed to the @new_delimiter character. Modifies @string in place,
+ * and returns @string itself, not a copy. The return value is to
+ * allow nesting such as
+ * |[
+ * g_ascii_strup (g_strdelimit (str, "abc", '?'))
+ * ]|
+ *
+ * Returns: @string
+ */
+
+
+/**
+ * g_strdown:
+ * @string: the string to convert.
+ *
+ * Converts a string to lower case.
+ *
+ *
+ * Deprecated:2.2: This function is totally broken for the reasons discussed
+ * in the g_strncasecmp() docs - use g_ascii_strdown() or g_utf8_strdown()
+ * instead.
+ *
+ * Returns: the string
+ */
+
+
+/**
+ * g_strdup:
+ * @str: the string to duplicate
+ *
+ * Duplicates a string. If @str is %NULL it returns %NULL.
+ * The returned string should be freed with g_free()
+ * when no longer needed.
+ *
+ * Returns: a newly-allocated copy of @str
+ */
+
+
+/**
+ * g_strdup_printf:
+ * @format: a standard printf() format string, but notice <link linkend="string-precision">string precision pitfalls</link>
+ * @...: the parameters to insert into the format string
+ *
+ * Similar to the standard C sprintf() function but safer, since it
+ * calculates the maximum space required and allocates memory to hold
+ * the result. The returned string should be freed with g_free() when no
+ * longer needed.
+ *
+ * Returns: a newly-allocated string holding the result
+ */
+
+
+/**
+ * g_strdup_vprintf:
+ * @format: a standard printf() format string, but notice <link linkend="string-precision">string precision pitfalls</link>
+ * @args: the list of parameters to insert into the format string
+ *
+ * Similar to the standard C vsprintf() function but safer, since it
+ * calculates the maximum space required and allocates memory to hold
+ * the result. The returned string should be freed with g_free() when
+ * no longer needed.
+ *
+ * See also g_vasprintf(), which offers the same functionality, but
+ * additionally returns the length of the allocated string.
+ *
+ * Returns: a newly-allocated string holding the result
+ */
+
+
+/**
+ * g_strdupv:
+ * @str_array: a %NULL-terminated array of strings
+ *
+ * Copies %NULL-terminated array of strings. The copy is a deep copy;
+ * the new array should be freed by first freeing each string, then
+ * the array itself. g_strfreev() does this for you. If called
+ * on a %NULL value, g_strdupv() simply returns %NULL.
+ *
+ * Returns: a new %NULL-terminated array of strings.
+ */
+
+
+/**
+ * g_strerror:
+ * @errnum: the system error number. See the standard C %errno documentation
+ *
+ * Returns a string corresponding to the given error code, e.g.
+ * "no such process". You should use this function in preference to
+ * strerror(), because it returns a string in UTF-8 encoding, and since
+ * not all platforms support the strerror() function.
+ *
+ * is unknown, it returns "unknown error (&lt;code&gt;)".
+ *
+ * Returns: a UTF-8 string describing the error code. If the error code
+ */
+
+
+/**
+ * g_strescape:
+ * @source: a string to escape
+ * @exceptions: a string of characters not to escape in @source
+ *
+ * Escapes the special characters '\b', '\f', '\n', '\r', '\t', '\v', '\'
+ * and '&quot;' in the string @source by inserting a '\' before
+ * them. Additionally all characters in the range 0x01-0x1F (everything
+ * below SPACE) and in the range 0x7F-0xFF (all non-ASCII chars) are
+ * replaced with a '\' followed by their octal representation.
+ * Characters supplied in @exceptions are not escaped.
+ *
+ * g_strcompress() does the reverse conversion.
+ *
+ * characters escaped. See above.
+ *
+ * Returns: a newly-allocated copy of @source with certain
+ */
+
+
+/**
+ * g_strfreev:
+ * @str_array: a %NULL-terminated array of strings to free Frees a %NULL-terminated array of strings, and the array itself. If called on a %NULL value, g_strfreev() simply returns.
+ *
+ *
+ */
+
+
+/**
+ * g_string_append:
+ * @string: a #GString
+ * @val: the string to append onto the end of @string
+ *
+ * Adds a string onto the end of a #GString, expanding
+ * it if necessary.
+ *
+ * Returns: @string
+ */
+
+
+/**
+ * g_string_append_c:
+ * @string: a #GString
+ * @c: the byte to append onto the end of @string
+ *
+ * Adds a byte onto the end of a #GString, expanding
+ * it if necessary.
+ *
+ * Returns: @string
+ */
+
+
+/**
+ * g_string_append_len:
+ * @string: a #GString
+ * @val: bytes to append
+ * @len: number of bytes of @val to use
+ *
+ * Appends @len bytes of @val to @string. Because @len is
+ * provided, @val may contain embedded nuls and need not
+ * be nul-terminated.
+ *
+ * Since this function does not stop at nul bytes, it is
+ * the caller's responsibility to ensure that @val has at
+ * least @len addressable bytes.
+ *
+ * Returns: @string
+ */
+
+
+/**
+ * g_string_append_printf:
+ * @string: a #GString
+ * @format: the string format. See the printf() documentation
+ * @...: the parameters to insert into the format string
+ *
+ * Appends a formatted string onto the end of a #GString.
+ * This function is similar to g_string_printf() except
+ * that the text is appended to the #GString.
+ */
+
+
+/**
+ * g_string_append_unichar:
+ * @string: a #GString
+ * @wc: a Unicode character
+ *
+ * Converts a Unicode character into UTF-8, and appends it
+ * to the string.
+ *
+ * Returns: @string
+ */
+
+
+/**
+ * g_string_append_uri_escaped:
+ * @string: a #GString
+ * @unescaped: a string
+ * @reserved_chars_allowed: a string of reserved characters allowed to be used, or %NULL
+ * @allow_utf8: set %TRUE if the escaped string may include UTF8 characters
+ *
+ * Appends @unescaped to @string, escaped any characters that
+ * are reserved in URIs using URI-style escape sequences.
+ *
+ * Returns: @string
+ * Since: 2.16
+ */
+
+
+/**
+ * g_string_append_vprintf:
+ * @string: a #GString
+ * @format: the string format. See the printf() documentation
+ * @args: the list of arguments to insert in the output
+ *
+ * Appends a formatted string onto the end of a #GString.
+ * This function is similar to g_string_append_printf()
+ * except that the arguments to the format string are passed
+ * as a va_list.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * g_string_ascii_down:
+ * @string: a GString
+ *
+ * Converts all uppercase ASCII letters to lowercase ASCII letters.
+ *
+ * uppercase characters converted to lowercase in place,
+ * with semantics that exactly match g_ascii_tolower().
+ *
+ * Returns: passed-in @string pointer, with all the
+ */
+
+
+/**
+ * g_string_ascii_up:
+ * @string: a GString
+ *
+ * Converts all lowercase ASCII letters to uppercase ASCII letters.
+ *
+ * lowercase characters converted to uppercase in place,
+ * with semantics that exactly match g_ascii_toupper().
+ *
+ * Returns: passed-in @string pointer, with all the
+ */
+
+
+/**
+ * g_string_assign:
+ * @string: the destination #GString. Its current contents are destroyed.
+ * @rval: the string to copy into @string
+ *
+ * Copies the bytes from a string into a #GString,
+ * destroying any previous contents. It is rather like
+ * the standard strcpy() function, except that you do not
+ * have to worry about having enough space to copy the string.
+ *
+ * Returns: @string
+ */
+
+
+/**
+ * g_string_chunk_clear:
+ * @chunk: a #GStringChunk
+ *
+ * Frees all strings contained within the #GStringChunk.
+ * After calling g_string_chunk_clear() it is not safe to
+ * access any of the strings which were contained within it.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * g_string_chunk_free:
+ * @chunk: a #GStringChunk
+ *
+ * Frees all memory allocated by the #GStringChunk.
+ * After calling g_string_chunk_free() it is not safe to
+ * access any of the strings which were contained within it.
+ */
+
+
+/**
+ * g_string_chunk_insert:
+ * @chunk: a #GStringChunk
+ * @string: the string to add
+ *
+ * Adds a copy of @string to the #GStringChunk.
+ * It returns a pointer to the new copy of the string
+ * in the #GStringChunk. The characters in the string
+ * can be changed, if necessary, though you should not
+ * change anything after the end of the string.
+ *
+ * Unlike g_string_chunk_insert_const(), this function
+ * does not check for duplicates. Also strings added
+ * with g_string_chunk_insert() will not be searched
+ * by g_string_chunk_insert_const() when looking for
+ * duplicates.
+ *
+ * the #GStringChunk
+ *
+ * Returns: a pointer to the copy of @string within
+ */
+
+
+/**
+ * g_string_chunk_insert_const:
+ * @chunk: a #GStringChunk
+ * @string: the string to add
+ *
+ * Adds a copy of @string to the #GStringChunk, unless the same
+ * string has already been added to the #GStringChunk with
+ * g_string_chunk_insert_const().
+ *
+ * This function is useful if you need to copy a large number
+ * of strings but do not want to waste space storing duplicates.
+ * But you must remember that there may be several pointers to
+ * the same string, and so any changes made to the strings
+ * should be done very carefully.
+ *
+ * Note that g_string_chunk_insert_const() will not return a
+ * pointer to a string added with g_string_chunk_insert(), even
+ * if they do match.
+ *
+ * within the #GStringChunk
+ *
+ * Returns: a pointer to the new or existing copy of @string
+ */
+
+
+/**
+ * g_string_chunk_insert_len:
+ * @chunk: a #GStringChunk
+ * @string: bytes to insert
+ * @len: number of bytes of @string to insert, or -1 to insert a nul-terminated string
+ *
+ * Adds a copy of the first @len bytes of @string to the #GStringChunk.
+ * The copy is nul-terminated.
+ *
+ * Since this function does not stop at nul bytes, it is the caller's
+ * responsibility to ensure that @string has at least @len addressable
+ * bytes.
+ *
+ * The characters in the returned string can be changed, if necessary,
+ * though you should not change anything after the end of the string.
+ *
+ * Returns: a pointer to the copy of @string within the #GStringChunk
+ * Since: 2.4
+ */
+
+
+/**
+ * g_string_chunk_new:
+ * @size: the default size of the blocks of memory which are allocated to store the strings. If a particular string is larger than this default size, a larger block of memory will be allocated for it.
+ *
+ * Creates a new #GStringChunk.
+ *
+ * Returns: a new #GStringChunk
+ */
+
+
+/**
+ * g_string_down:
+ * @string: a #GString
+ *
+ * Converts a #GString to lowercase.
+ *
+ *
+ * Deprecated:2.2: This function uses the locale-specific
+ * tolower() function, which is almost never the right thing.
+ * Use g_string_ascii_down() or g_utf8_strdown() instead.
+ *
+ * Returns: the #GString
+ */
+
+
+/**
+ * g_string_equal:
+ * @v: a #GString
+ * @v2: another #GString
+ *
+ * Compares two strings for equality, returning %TRUE if they are equal.
+ * For use with #GHashTable.
+ *
+ * same bytes
+ *
+ * Returns: %TRUE if they strings are the same length and contain the
+ */
+
+
+/**
+ * g_string_erase:
+ * @string: a #GString
+ * @pos: the position of the content to remove
+ * @len: the number of bytes to remove, or -1 to remove all following bytes
+ *
+ * Removes @len bytes from a #GString, starting at position @pos.
+ * The rest of the #GString is shifted down to fill the gap.
+ *
+ * Returns: @string
+ */
+
+
+/**
+ * g_string_free:
+ * @string: a #GString
+ * @free_segment: if %TRUE, the actual character data is freed as well
+ *
+ * Frees the memory allocated for the #GString.
+ * If @free_segment is %TRUE it also frees the character data.  If
+ * it's %FALSE, the caller gains ownership of the buffer and must
+ * free it after use with g_free().
+ *
+ * (i.e. %NULL if @free_segment is %TRUE)
+ *
+ * Returns: the character data of @string
+ */
+
+
+/**
+ * g_string_hash:
+ * @str: a string to hash
+ *
+ * Creates a hash code for @str; for use with #GHashTable.
+ *
+ * Returns: hash code for @str
+ */
+
+
+/**
+ * g_string_insert:
+ * @string: a #GString
+ * @pos: the position to insert the copy of the string
+ * @val: the string to insert
+ *
+ * Inserts a copy of a string into a #GString,
+ * expanding it if necessary.
+ *
+ * Returns: @string
+ */
+
+
+/**
+ * g_string_insert_c:
+ * @string: a #GString
+ * @pos: the position to insert the byte
+ * @c: the byte to insert
+ *
+ * Inserts a byte into a #GString, expanding it if necessary.
+ *
+ * Returns: @string
+ */
+
+
+/**
+ * g_string_insert_len:
+ * @string: a #GString
+ * @pos: position in @string where insertion should happen, or -1 for at the end
+ * @val: bytes to insert
+ * @len: number of bytes of @val to insert
+ *
+ * Inserts @len bytes of @val into @string at @pos.
+ * Because @len is provided, @val may contain embedded
+ * nuls and need not be nul-terminated. If @pos is -1,
+ * bytes are inserted at the end of the string.
+ *
+ * Since this function does not stop at nul bytes, it is
+ * the caller's responsibility to ensure that @val has at
+ * least @len addressable bytes.
+ *
+ * Returns: @string
+ */
+
+
+/**
+ * g_string_insert_unichar:
+ * @string: a #GString
+ * @pos: the position at which to insert character, or -1 to append at the end of the string
+ * @wc: a Unicode character
+ *
+ * Converts a Unicode character into UTF-8, and insert it
+ * into the string at the given position.
+ *
+ * Returns: @string
+ */
+
+
+/**
+ * g_string_new:
+ * @init: the initial text to copy into the string
+ *
+ * Creates a new #GString, initialized with the given string.
+ *
+ * Returns: the new #GString
+ */
+
+
+/**
+ * g_string_new_len:
+ * @init: initial contents of the string
+ * @len: length of @init to use
+ *
+ * Creates a new #GString with @len bytes of the @init buffer.
+ * Because a length is provided, @init need not be nul-terminated,
+ * and can contain embedded nul bytes.
+ *
+ * Since this function does not stop at nul bytes, it is the caller's
+ * responsibility to ensure that @init has at least @len addressable
+ * bytes.
+ *
+ * Returns: a new #GString
+ */
+
+
+/**
+ * g_string_overwrite:
+ * @string: a #GString
+ * @pos: the position at which to start overwriting
+ * @val: the string that will overwrite the @string starting at @pos
+ *
+ * Overwrites part of a string, lengthening it if necessary.
+ *
+ * Returns: @string
+ * Since: 2.14
+ */
+
+
+/**
+ * g_string_overwrite_len:
+ * @string: a #GString
+ * @pos: the position at which to start overwriting
+ * @val: the string that will overwrite the @string starting at @pos
+ * @len: the number of bytes to write from @val
+ *
+ * Overwrites part of a string, lengthening it if necessary.
+ * This function will work with embedded nuls.
+ *
+ * Returns: @string
+ * Since: 2.14
+ */
+
+
+/**
+ * g_string_prepend:
+ * @string: a #GString
+ * @val: the string to prepend on the start of @string
+ *
+ * Adds a string on to the start of a #GString,
+ * expanding it if necessary.
+ *
+ * Returns: @string
+ */
+
+
+/**
+ * g_string_prepend_c:
+ * @string: a #GString
+ * @c: the byte to prepend on the start of the #GString
+ *
+ * Adds a byte onto the start of a #GString,
+ * expanding it if necessary.
+ *
+ * Returns: @string
+ */
+
+
+/**
+ * g_string_prepend_len:
+ * @string: a #GString
+ * @val: bytes to prepend
+ * @len: number of bytes in @val to prepend
+ *
+ * Prepends @len bytes of @val to @string.
+ * Because @len is provided, @val may contain
+ * embedded nuls and need not be nul-terminated.
+ *
+ * Since this function does not stop at nul bytes,
+ * it is the caller's responsibility to ensure that
+ * @val has at least @len addressable bytes.
+ *
+ * Returns: @string
+ */
+
+
+/**
+ * g_string_prepend_unichar:
+ * @string: a #GString
+ * @wc: a Unicode character
+ *
+ * Converts a Unicode character into UTF-8, and prepends it
+ * to the string.
+ *
+ * Returns: @string
+ */
+
+
+/**
+ * g_string_printf:
+ * @string: a #GString
+ * @format: the string format. See the printf() documentation
+ * @...: the parameters to insert into the format string
+ *
+ * Writes a formatted string into a #GString.
+ * This is similar to the standard sprintf() function,
+ * except that the #GString buffer automatically expands
+ * to contain the results. The previous contents of the
+ * #GString are destroyed.
+ */
+
+
+/**
+ * g_string_set_size:
+ * @string: a #GString
+ * @len: the new length
+ *
+ * Sets the length of a #GString. If the length is less than
+ * the current length, the string will be truncated. If the
+ * length is greater than the current length, the contents
+ * of the newly added area are undefined. (However, as
+ * always, string->str[string->len] will be a nul byte.)
+ *
+ * Returns: @string
+ */
+
+
+/**
+ * g_string_sized_new:
+ * @dfl_size: the default size of the space allocated to hold the string
+ *
+ * Creates a new #GString, with enough space for @dfl_size
+ * bytes. This is useful if you are going to add a lot of
+ * text to the string and don't want it to be reallocated
+ * too often.
+ *
+ * Returns: the new #GString
+ */
+
+
+/**
+ * g_string_sprintf:
+ * @string: a #GString
+ * @format: the string format. See the sprintf() documentation
+ * @...: the parameters to insert into the format string
+ *
+ * Writes a formatted string into a #GString.
+ * This is similar to the standard sprintf() function,
+ * except that the #GString buffer automatically expands
+ * to contain the results. The previous contents of the
+ * #GString are destroyed.
+ *
+ * Deprecated: This function has been renamed to g_string_printf().
+ */
+
+
+/**
+ * g_string_sprintfa:
+ * @string: a #GString
+ * @format: the string format. See the sprintf() documentation
+ * @...: the parameters to insert into the format string
+ *
+ * Appends a formatted string onto the end of a #GString.
+ * This function is similar to g_string_sprintf() except that
+ * the text is appended to the #GString.
+ *
+ * Deprecated: This function has been renamed to g_string_append_printf()
+ */
+
+
+/**
+ * g_string_truncate:
+ * @string: a #GString
+ * @len: the new size of @string
+ *
+ * Cuts off the end of the GString, leaving the first @len bytes.
+ *
+ * Returns: @string
+ */
+
+
+/**
+ * g_string_up:
+ * @string: a #GString
+ *
+ * Converts a #GString to uppercase.
+ *
+ *
+ * Deprecated:2.2: This function uses the locale-specific
+ * toupper() function, which is almost never the right thing.
+ * Use g_string_ascii_up() or g_utf8_strup() instead.
+ *
+ * Returns: @string
+ */
+
+
+/**
+ * g_string_vprintf:
+ * @string: a #GString
+ * @format: the string format. See the printf() documentation
+ * @args: the parameters to insert into the format string
+ *
+ * Writes a formatted string into a #GString.
+ * This function is similar to g_string_printf() except that
+ * the arguments to the format string are passed as a va_list.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * g_strip_context:
+ * @msgid: a string
+ * @msgval: another string
+ *
+ * An auxiliary function for gettext() support (see Q_()).
+ *
+ * and contains a '|' character, in which case a pointer to
+ * the substring of msgid after the first '|' character is returned.
+ *
+ * Returns: @msgval, unless @msgval is identical to @msgid
+ * Since: 2.4
+ */
+
+
+/**
+ * g_strjoin:
+ * @separator: (allow-none): a string to insert between each of the strings, or %NULL
+ * @...: a %NULL-terminated list of strings to join
+ *
+ * Joins a number of strings together to form one long string, with the
+ * optional @separator inserted between each of them. The returned string
+ * should be freed with g_free().
+ *
+ * together, with @separator between them
+ *
+ * Returns: a newly-allocated string containing all of the strings joined
+ */
+
+
+/**
+ * g_strjoinv:
+ * @separator: (allow-none): a string to insert between each of the strings, or %NULL
+ * @str_array: a %NULL-terminated array of strings to join
+ *
+ * Joins a number of strings together to form one long string, with the
+ * optional @separator inserted between each of them. The returned string
+ * should be freed with g_free().
+ *
+ * together, with @separator between them
+ *
+ * Returns: a newly-allocated string containing all of the strings joined
+ */
+
+
+/**
+ * g_strlcat:
+ * @dest: destination buffer, already containing one nul-terminated string
+ * @src: source buffer
+ * @dest_size: length of @dest buffer in bytes (not length of existing string inside @dest)
+ *
+ * Portability wrapper that calls strlcat() on systems which have it,
+ * and emulates it otherwise. Appends nul-terminated @src string to @dest,
+ * guaranteeing nul-termination for @dest. The total size of @dest won't
+ * exceed @dest_size.
+ *
+ * At most dest_size - 1 characters will be copied.
+ * Unlike strncat, dest_size is the full size of dest, not the space left over.
+ * This function does NOT allocate memory.
+ * This always NUL terminates (unless siz == 0 or there were no NUL characters
+ * in the dest_size characters of dest to start with).
+ *
+ * <note><para>Caveat: this is supposedly a more secure alternative to
+ * strcat() or strncat(), but for real security g_strconcat() is harder
+ * to mess up.</para></note>
+ *
+ * (original dest)) + strlen (src), so if retval >= dest_size,
+ * truncation occurred.
+ *
+ * Returns: size of attempted result, which is MIN (dest_size, strlen
+ */
+
+
+/**
+ * g_strlcpy:
+ * @dest: destination buffer
+ * @src: source buffer
+ * @dest_size: length of @dest in bytes
+ *
+ * Portability wrapper that calls strlcpy() on systems which have it,
+ * and emulates strlcpy() otherwise. Copies @src to @dest; @dest is
+ * guaranteed to be nul-terminated; @src must be nul-terminated;
+ * @dest_size is the buffer size, not the number of chars to copy.
+ *
+ * At most dest_size - 1 characters will be copied. Always nul-terminates
+ * (unless dest_size == 0). This function does <emphasis>not</emphasis>
+ * allocate memory. Unlike strncpy(), this function doesn't pad dest (so
+ * it's often faster). It returns the size of the attempted result,
+ * strlen (src), so if @retval >= @dest_size, truncation occurred.
+ *
+ * <note><para>Caveat: strlcpy() is supposedly more secure than
+ * strcpy() or strncpy(), but if you really want to avoid screwups,
+ * g_strdup() is an even better idea.</para></note>
+ *
+ * Returns: length of @src
+ */
+
+
+/**
+ * g_strncasecmp:
+ * @s1: a string.
+ * @s2: a string to compare with @s1.
+ * @n: the maximum number of characters to compare.
+ *
+ * A case-insensitive string comparison, corresponding to the standard
+ * strncasecmp() function on platforms which support it.
+ * It is similar to g_strcasecmp() except it only compares the first @n
+ * characters of the strings.
+ *
+ * or a positive value if @s1 &gt; @s2.
+ *
+ * Deprecated:2.2: The problem with g_strncasecmp() is that it does the
+ * comparison by calling toupper()/tolower(). These functions are
+ * locale-specific and operate on single bytes. However, it is impossible
+ * to handle things correctly from an I18N standpoint by operating on
+ * bytes, since characters may be multibyte. Thus g_strncasecmp() is
+ * broken if your string is guaranteed to be ASCII, since it's
+ * locale-sensitive, and it's broken if your string is localized, since
+ * it doesn't work on many encodings at all, including UTF-8, EUC-JP,
+ * etc.
+ *
+ * There are therefore two replacement functions: g_ascii_strncasecmp(),
+ * which only works on ASCII and is not locale-sensitive, and
+ * g_utf8_casefold(), which is good for case-insensitive sorting of UTF-8.
+ *
+ * Returns: 0 if the strings match, a negative value if @s1 &lt; @s2,
+ */
+
+
+/**
+ * g_strndup:
+ * @str: the string to duplicate
+ * @n: the maximum number of bytes to copy from @str
+ *
+ * Duplicates the first @n bytes of a string, returning a newly-allocated
+ * buffer @n + 1 bytes long which will always be nul-terminated.
+ * If @str is less than @n bytes long the buffer is padded with nuls.
+ * If @str is %NULL it returns %NULL.
+ * The returned value should be freed when no longer needed.
+ *
+ * <note><para>
+ * To copy a number of characters from a UTF-8 encoded string, use
+ * g_utf8_strncpy() instead.
+ * </para></note>
+ *
+ * of @str, nul-terminated
+ *
+ * Returns: a newly-allocated buffer containing the first @n bytes
+ */
+
+
+/**
+ * g_strnfill:
+ * @length: the length of the new string
+ * @fill_char: the byte to fill the string with
+ *
+ * Creates a new string @length bytes long filled with @fill_char.
+ * The returned string should be freed when no longer needed.
+ *
+ * Returns: a newly-allocated string filled the @fill_char
+ */
+
+
+/**
+ * g_strreverse:
+ * @string: the string to reverse
+ *
+ * Reverses all of the bytes in a string. For example,
+ * <literal>g_strreverse ("abcdef")</literal> will result
+ * in "fedcba".
+ *
+ * Note that g_strreverse() doesn't work on UTF-8 strings
+ * containing multibyte characters. For that purpose, use
+ * g_utf8_strreverse().
+ *
+ * Returns: the same pointer passed in as @string
+ */
+
+
+/**
+ * g_strrstr:
+ * @haystack: a nul-terminated string
+ * @needle: the nul-terminated string to search for
+ *
+ * Searches the string @haystack for the last occurrence
+ * of the string @needle.
+ *
+ * %NULL if not found.
+ *
+ * Returns: a pointer to the found occurrence, or
+ */
+
+
+/**
+ * g_strrstr_len:
+ * @haystack: a nul-terminated string
+ * @haystack_len: the maximum length of @haystack
+ * @needle: the nul-terminated string to search for
+ *
+ * Searches the string @haystack for the last occurrence
+ * of the string @needle, limiting the length of the search
+ * to @haystack_len.
+ *
+ * %NULL if not found.
+ *
+ * Returns: a pointer to the found occurrence, or
+ */
+
+
+/**
+ * g_strsignal:
+ * @signum: the signal number. See the <literal>signal</literal> documentation
+ *
+ * Returns a string describing the given signal, e.g. "Segmentation fault".
+ * You should use this function in preference to strsignal(), because it
+ * returns a string in UTF-8 encoding, and since not all platforms support
+ * the strsignal() function.
+ *
+ * it returns "unknown signal (&lt;signum&gt;)".
+ *
+ * Returns: a UTF-8 string describing the signal. If the signal is unknown,
+ */
+
+
+/**
+ * g_strsplit:
+ * @string: a string to split
+ * @delimiter: a string which specifies the places at which to split the string. The delimiter is not included in any of the resulting strings, unless @max_tokens is reached.
+ * @max_tokens: the maximum number of pieces to split @string into. If this is less than 1, the string is split completely.
+ *
+ * Splits a string into a maximum of @max_tokens pieces, using the given
+ * @delimiter. If @max_tokens is reached, the remainder of @string is
+ * appended to the last token.
+ *
+ * As a special case, the result of splitting the empty string "" is an empty
+ * vector, not a vector containing a single string. The reason for this
+ * special case is that being able to represent a empty vector is typically
+ * more useful than consistent handling of empty elements. If you do need
+ * to represent empty elements, you'll need to check for the empty string
+ * before calling g_strsplit().
+ *
+ * g_strfreev() to free it.
+ *
+ * Returns: a newly-allocated %NULL-terminated array of strings. Use
+ */
+
+
+/**
+ * g_strsplit_set:
+ * @string: The string to be tokenized
+ * @delimiters: A nul-terminated string containing bytes that are used to split the string.
+ * @max_tokens: The maximum number of tokens to split @string into. If this is less than 1, the string is split completely
+ *
+ * Splits @string into a number of tokens not containing any of the characters
+ * in @delimiter. A token is the (possibly empty) longest string that does not
+ * contain any of the characters in @delimiters. If @max_tokens is reached, the
+ * remainder is appended to the last token.
+ *
+ * For example the result of g_strsplit_set ("abc:def/ghi", ":/", -1) is a
+ * %NULL-terminated vector containing the three strings "abc", "def",
+ * and "ghi".
+ *
+ * The result if g_strsplit_set (":def/ghi:", ":/", -1) is a %NULL-terminated
+ * vector containing the four strings "", "def", "ghi", and "".
+ *
+ * As a special case, the result of splitting the empty string "" is an empty
+ * vector, not a vector containing a single string. The reason for this
+ * special case is that being able to represent a empty vector is typically
+ * more useful than consistent handling of empty elements. If you do need
+ * to represent empty elements, you'll need to check for the empty string
+ * before calling g_strsplit_set().
+ *
+ * Note that this function works on bytes not characters, so it can't be used
+ * to delimit UTF-8 strings for anything but ASCII characters.
+ *
+ * g_strfreev() to free it.
+ *
+ * Returns: a newly-allocated %NULL-terminated array of strings. Use
+ * Since: 2.4
+ */
+
+
+/**
+ * g_strstr_len:
+ * @haystack: a string
+ * @haystack_len: the maximum length of @haystack. Note that -1 is a valid length, if @haystack is nul-terminated, meaning it will search through the whole string.
+ * @needle: the string to search for
+ *
+ * Searches the string @haystack for the first occurrence
+ * of the string @needle, limiting the length of the search
+ * to @haystack_len.
+ *
+ * %NULL if not found.
+ *
+ * Returns: a pointer to the found occurrence, or
+ */
+
+
+/**
+ * g_strstrip:
+ * @string: a string to remove the leading and trailing whitespace from
+ *
+ * Removes leading and trailing whitespace from a string.
+ * See g_strchomp() and g_strchug().
+ *
+ * Returns: @string
+ */
+
+
+/**
+ * g_strtod:
+ * @nptr: the string to convert to a numeric value.
+ * @endptr: if non-%NULL, it returns the character after the last character used in the conversion.
+ *
+ * Converts a string to a #gdouble value.
+ * It calls the standard strtod() function to handle the conversion, but
+ * if the string is not completely converted it attempts the conversion
+ * again with g_ascii_strtod(), and returns the best match.
+ *
+ * This function should seldom be used. The normal situation when reading
+ * numbers not for human consumption is to use g_ascii_strtod(). Only when
+ * you know that you must expect both locale formatted and C formatted numbers
+ * should you use this. Make sure that you don't pass strings such as comma
+ * separated lists of values, since the commas may be interpreted as a decimal
+ * point in some locales, causing unexpected results.
+ *
+ * Returns: the #gdouble value.
+ */
+
+
+/**
+ * g_strup:
+ * @string: the string to convert.
+ *
+ * Converts a string to upper case.
+ *
+ *
+ * Deprecated:2.2: This function is totally broken for the reasons discussed
+ * in the g_strncasecmp() docs - use g_ascii_strup() or g_utf8_strup() instead.
+ *
+ * Returns: the string
+ */
+
+
+/**
+ * g_strv_length:
+ * @str_array: a %NULL-terminated array of strings
+ *
+ * Returns the length of the given %NULL-terminated
+ * string array @str_array.
+ *
+ * Returns: length of @str_array.
+ * Since: 2.6
+ */
+
+
+/**
+ * g_test_add:
+ * @testpath: The test path for a new test case.
+ * @Fixture: The type of a fixture data structure.
+ * @tdata: Data argument for the test functions.
+ * @fsetup: The function to set up the fixture data.
+ * @ftest: The actual test function.
+ * @fteardown: The function to tear down the fixture data.
+ *
+ * Hook up a new test case at @testpath, similar to g_test_add_func().
+ * A fixture data structure with setup and teardown function may be provided
+ * though, similar to g_test_create_case().
+ * g_test_add() is implemented as a macro, so that the fsetup(), ftest() and
+ * fteardown() callbacks can expect a @Fixture pointer as first argument in
+ * a type safe manner.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_add_data_func:
+ * @testpath: Slash-separated test case path name for the test.
+ * @test_data: Test data argument for the test function.
+ * @test_func: The test function to invoke for this test.
+ *
+ * Create a new test case, similar to g_test_create_case(). However
+ * the test is assumed to use no fixture, and test suites are automatically
+ * created on the fly and added to the root fixture, based on the
+ * slash-separated portions of @testpath. The @test_data argument
+ * will be passed as first argument to @test_func.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_add_func:
+ * @testpath: Slash-separated test case path name for the test.
+ * @test_func: The test function to invoke for this test.
+ *
+ * Create a new test case, similar to g_test_create_case(). However
+ * the test is assumed to use no fixture, and test suites are automatically
+ * created on the fly and added to the root fixture, based on the
+ * slash-separated portions of @testpath.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_bug:
+ * @bug_uri_snippet: Bug specific bug tracker URI portion.
+ *
+ * This function adds a message to test reports that
+ * associates a bug URI with a test case.
+ * Bug URIs are constructed from a base URI set with g_test_bug_base()
+ * and @bug_uri_snippet.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_bug_base:
+ * @uri_pattern: the base pattern for bug URIs
+ *
+ * Specify the base URI for bug reports.
+ *
+ * The base URI is used to construct bug report messages for
+ * g_test_message() when g_test_bug() is called.
+ * Calling this function outside of a test case sets the
+ * default base URI for all test cases. Calling it from within
+ * a test case changes the base URI for the scope of the test
+ * case only.
+ * Bug URIs are constructed by appending a bug specific URI
+ * portion to @uri_pattern, or by replacing the special string
+ * '\%s' within @uri_pattern if that is present.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_create_case:
+ * @test_name: the name for the test case
+ * @data_size: the size of the fixture data structure
+ * @test_data: test data argument for the test functions
+ * @data_setup: the function to set up the fixture data
+ * @data_test: the actual test function
+ * @data_teardown: the function to teardown the fixture data
+ *
+ * Create a new #GTestCase, named @test_name, this API is fairly
+ * low level, calling g_test_add() or g_test_add_func() is preferable.
+ * When this test is executed, a fixture structure of size @data_size
+ * will be allocated and filled with 0s. Then @data_setup is called
+ * to initialize the fixture. After fixture setup, the actual test
+ * function @data_test is called. Once the test run completed, the
+ * fixture structure is torn down  by calling @data_teardown and
+ * after that the memory is released.
+ *
+ * Splitting up a test run into fixture setup, test function and
+ * fixture teardown is most usful if the same fixture is used for
+ * multiple tests. In this cases, g_test_create_case() will be
+ * called with the same fixture, but varying @test_name and
+ * @data_test arguments.
+ *
+ * Returns: a newly allocated #GTestCase.
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_create_suite:
+ * @suite_name: a name for the suite
+ *
+ * Create a new test suite with the name @suite_name.
+ *
+ * Returns: A newly allocated #GTestSuite instance.
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_fail:
+ *
+ * Indicates that a test failed. This function can be called
+ * multiple times from the same test. You can use this function
+ * if your test failed in a recoverable way.
+ *
+ * Do not use this function if the failure of a test could cause
+ * other tests to malfunction.
+ *
+ * Calling this function will not stop the test from running, you
+ * need to return from the test function yourself. So you can
+ * produce additional diagnostic messages or even continue running
+ * the test.
+ *
+ * If not called from inside a test, this function does nothing.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_test_get_root:
+ *
+ * Get the toplevel test suite for the test path API.
+ *
+ * Returns: the toplevel #GTestSuite
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_init:
+ * @argc: Address of the @argc parameter of the main() function. Changed if any arguments were handled.
+ * @argv: Address of the @argv parameter of main(). Any parameters understood by g_test_init() stripped before return.
+ * @...: Reserved for future extension. Currently, you must pass %NULL.
+ *
+ * Initialize the GLib testing framework, e.g. by seeding the
+ * test random number generator, the name for g_get_prgname()
+ * and parsing test related command line args.
+ * So far, the following arguments are understood:
+ * <variablelist>
+ * <varlistentry>
+ * <term><option>-l</option></term>
+ * <listitem><para>
+ * list test cases available in a test executable.
+ * </para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term><option>--seed=<replaceable>RANDOMSEED</replaceable></option></term>
+ * <listitem><para>
+ * provide a random seed to reproduce test runs using random numbers.
+ * </para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term><option>--verbose</option></term>
+ * <listitem><para>run tests verbosely.</para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term><option>-q</option>, <option>--quiet</option></term>
+ * <listitem><para>run tests quietly.</para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term><option>-p <replaceable>TESTPATH</replaceable></option></term>
+ * <listitem><para>
+ * execute all tests matching <replaceable>TESTPATH</replaceable>.
+ * </para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term><option>-m {perf|slow|thorough|quick|undefined|no-undefined}</option></term>
+ * <listitem><para>
+ * execute tests according to these test modes:
+ * <variablelist>
+ * <varlistentry>
+ * <term>perf</term>
+ * <listitem><para>
+ * performance tests, may take long and report results.
+ * </para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term>slow, thorough</term>
+ * <listitem><para>
+ * slow and thorough tests, may take quite long and
+ * maximize coverage.
+ * </para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term>quick</term>
+ * <listitem><para>
+ * quick tests, should run really quickly and give good coverage.
+ * </para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term>undefined</term>
+ * <listitem><para>
+ * tests for undefined behaviour, may provoke programming errors
+ * under g_test_trap_fork() to check that appropriate assertions
+ * or warnings are given
+ * </para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term>no-undefined</term>
+ * <listitem><para>
+ * avoid tests for undefined behaviour
+ * </para></listitem>
+ * </varlistentry>
+ * </variablelist>
+ * </para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term><option>--debug-log</option></term>
+ * <listitem><para>debug test logging output.</para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term><option>-k</option>, <option>--keep-going</option></term>
+ * <listitem><para>gtester-specific argument.</para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term><option>--GTestLogFD <replaceable>N</replaceable></option></term>
+ * <listitem><para>gtester-specific argument.</para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term><option>--GTestSkipCount <replaceable>N</replaceable></option></term>
+ * <listitem><para>gtester-specific argument.</para></listitem>
+ * </varlistentry>
+ * </variablelist>
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_log_buffer_free:
+ *
+ * Internal function for gtester to free test log messages, no ABI guarantees provided.
+ */
+
+
+/**
+ * g_test_log_buffer_new:
+ *
+ * Internal function for gtester to decode test log messages, no ABI guarantees provided.
+ */
+
+
+/**
+ * g_test_log_buffer_pop:
+ *
+ * Internal function for gtester to retrieve test log messages, no ABI guarantees provided.
+ */
+
+
+/**
+ * g_test_log_buffer_push:
+ *
+ * Internal function for gtester to decode test log messages, no ABI guarantees provided.
+ */
+
+
+/**
+ * g_test_log_msg_free:
+ *
+ * Internal function for gtester to free test log messages, no ABI guarantees provided.
+ */
+
+
+/**
+ * g_test_log_set_fatal_handler:
+ * @log_func: the log handler function.
+ * @user_data: data passed to the log handler.
+ *
+ * Installs a non-error fatal log handler which can be
+ * used to decide whether log messages which are counted
+ * as fatal abort the program.
+ *
+ * The use case here is that you are running a test case
+ * that depends on particular libraries or circumstances
+ * and cannot prevent certain known critical or warning
+ * messages. So you install a handler that compares the
+ * domain and message to precisely not abort in such a case.
+ *
+ * Note that the handler is reset at the beginning of
+ * any test case, so you have to set it inside each test
+ * function which needs the special behavior.
+ *
+ * This handler has no effect on g_error messages.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_test_maximized_result:
+ * @maximized_quantity: the reported value
+ * @format: the format string of the report message
+ * @...: arguments to pass to the printf() function
+ *
+ * Report the result of a performance or measurement test.
+ * The test should generally strive to maximize the reported
+ * quantities (larger values are better than smaller ones),
+ * this and @maximized_quantity can determine sorting
+ * order for test result reports.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_message:
+ * @format: the format string
+ * @...: printf-like arguments to @format
+ *
+ * Add a message to the test report.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_minimized_result:
+ * @minimized_quantity: the reported value
+ * @format: the format string of the report message
+ * @...: arguments to pass to the printf() function
+ *
+ * Report the result of a performance or measurement test.
+ * The test should generally strive to minimize the reported
+ * quantities (smaller values are better than larger ones),
+ * this and @minimized_quantity can determine sorting
+ * order for test result reports.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_perf:
+ *
+ * Returns %TRUE if tests are run in performance mode.
+ *
+ * Returns: %TRUE if in performance mode
+ */
+
+
+/**
+ * g_test_queue_destroy:
+ * @destroy_func: Destroy callback for teardown phase.
+ * @destroy_data: Destroy callback data.
+ *
+ * This function enqueus a callback @destroy_func to be executed
+ * during the next test case teardown phase. This is most useful
+ * to auto destruct allocted test resources at the end of a test run.
+ * Resources are released in reverse queue order, that means enqueueing
+ * callback A before callback B will cause B() to be called before
+ * A() during teardown.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_queue_free:
+ * @gfree_pointer: the pointer to be stored.
+ *
+ * Enqueue a pointer to be released with g_free() during the next
+ * teardown phase. This is equivalent to calling g_test_queue_destroy()
+ * with a destroy callback of g_free().
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_queue_unref:
+ * @gobject: the object to unref
+ *
+ * Enqueue an object to be released with g_object_unref() during
+ * the next teardown phase. This is equivalent to calling
+ * g_test_queue_destroy() with a destroy callback of g_object_unref().
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_quick:
+ *
+ * Returns %TRUE if tests are run in quick mode.
+ * Exactly one of g_test_quick() and g_test_slow() is active in any run;
+ * there is no "medium speed".
+ *
+ * Returns: %TRUE if in quick mode
+ */
+
+
+/**
+ * g_test_quiet:
+ *
+ * Returns %TRUE if tests are run in quiet mode.
+ * The default is neither g_test_verbose() nor g_test_quiet().
+ *
+ * Returns: %TRUE if in quiet mode
+ */
+
+
+/**
+ * g_test_rand_bit:
+ *
+ * Get a reproducible random bit (0 or 1), see g_test_rand_int()
+ * for details on test case random numbers.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_rand_double:
+ *
+ * Get a reproducible random floating point number,
+ * see g_test_rand_int() for details on test case random numbers.
+ *
+ * Returns: a random number from the seeded random number generator.
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_rand_double_range:
+ * @range_start: the minimum value returned by this function
+ * @range_end: the minimum value not returned by this function
+ *
+ * Get a reproducible random floating pointer number out of a specified range,
+ * see g_test_rand_int() for details on test case random numbers.
+ *
+ * Returns: a number with @range_start <= number < @range_end.
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_rand_int:
+ *
+ * Get a reproducible random integer number.
+ *
+ * The random numbers generated by the g_test_rand_*() family of functions
+ * change with every new test program start, unless the --seed option is
+ * given when starting test programs.
+ *
+ * For individual test cases however, the random number generator is
+ * reseeded, to avoid dependencies between tests and to make --seed
+ * effective for all test cases.
+ *
+ * Returns: a random number from the seeded random number generator.
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_rand_int_range:
+ * @begin: the minimum value returned by this function
+ * @end: the smallest value not to be returned by this function
+ *
+ * Get a reproducible random integer number out of a specified range,
+ * see g_test_rand_int() for details on test case random numbers.
+ *
+ * Returns: a number with @begin <= number < @end.
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_run:
+ *
+ * Runs all tests under the toplevel suite which can be retrieved
+ * with g_test_get_root(). Similar to g_test_run_suite(), the test
+ * cases to be run are filtered according to
+ * test path arguments (-p <replaceable>testpath</replaceable>) as
+ * parsed by g_test_init().
+ * g_test_run_suite() or g_test_run() may only be called once
+ * in a program.
+ *
+ * Returns: 0 on success
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_run_suite:
+ * @suite: a #GTestSuite
+ *
+ * Execute the tests within @suite and all nested #GTestSuites.
+ * The test suites to be executed are filtered according to
+ * test path arguments (-p <replaceable>testpath</replaceable>)
+ * as parsed by g_test_init().
+ * g_test_run_suite() or g_test_run() may only be called once
+ * in a program.
+ *
+ * Returns: 0 on success
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_slow:
+ *
+ * Returns %TRUE if tests are run in slow mode.
+ * Exactly one of g_test_quick() and g_test_slow() is active in any run;
+ * there is no "medium speed".
+ *
+ * Returns: the opposite of g_test_quick()
+ */
+
+
+/**
+ * g_test_suite_add:
+ * @suite: a #GTestSuite
+ * @test_case: a #GTestCase
+ *
+ * Adds @test_case to @suite.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_suite_add_suite:
+ * @suite: a #GTestSuite
+ * @nestedsuite: another #GTestSuite
+ *
+ * Adds @nestedsuite to @suite.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_thorough:
+ *
+ * Returns %TRUE if tests are run in thorough mode, equivalent to
+ * g_test_slow().
+ *
+ * Returns: the same thing as g_test_slow()
+ */
+
+
+/**
+ * g_test_timer_elapsed:
+ *
+ * Get the time since the last start of the timer with g_test_timer_start().
+ *
+ * Returns: the time since the last start of the timer, as a double
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_timer_last:
+ *
+ * Report the last result of g_test_timer_elapsed().
+ *
+ * Returns: the last result of g_test_timer_elapsed(), as a double
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_timer_start:
+ *
+ * Start a timing test. Call g_test_timer_elapsed() when the task is supposed
+ * to be done. Call this function again to restart the timer.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_trap_assert_failed:
+ *
+ * Assert that the last forked test failed.
+ * See g_test_trap_fork().
+ *
+ * This is sometimes used to test situations that are formally considered to
+ * be undefined behaviour, like inputs that fail a g_return_if_fail()
+ * check. In these situations you should skip the entire test, including the
+ * call to g_test_trap_fork(), unless g_test_undefined() returns %TRUE
+ * to indicate that undefined behaviour may be tested.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_trap_assert_passed:
+ *
+ * Assert that the last forked test passed.
+ * See g_test_trap_fork().
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_trap_assert_stderr:
+ * @serrpattern: a glob-style <link linkend="glib-Glob-style-pattern-matching">pattern</link>
+ *
+ * Assert that the stderr output of the last forked test
+ * matches @serrpattern. See  g_test_trap_fork().
+ *
+ * This is sometimes used to test situations that are formally considered to
+ * be undefined behaviour, like inputs that fail a g_return_if_fail()
+ * check. In these situations you should skip the entire test, including the
+ * call to g_test_trap_fork(), unless g_test_undefined() returns %TRUE
+ * to indicate that undefined behaviour may be tested.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_trap_assert_stderr_unmatched:
+ * @serrpattern: a glob-style <link linkend="glib-Glob-style-pattern-matching">pattern</link>
+ *
+ * Assert that the stderr output of the last forked test
+ * does not match @serrpattern. See g_test_trap_fork().
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_trap_assert_stdout:
+ * @soutpattern: a glob-style <link linkend="glib-Glob-style-pattern-matching">pattern</link>
+ *
+ * Assert that the stdout output of the last forked test matches
+ * @soutpattern. See g_test_trap_fork().
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_trap_assert_stdout_unmatched:
+ * @soutpattern: a glob-style <link linkend="glib-Glob-style-pattern-matching">pattern</link>
+ *
+ * Assert that the stdout output of the last forked test
+ * does not match @soutpattern. See g_test_trap_fork().
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_trap_fork:
+ * @usec_timeout: Timeout for the forked test in micro seconds.
+ * @test_trap_flags: Flags to modify forking behaviour.
+ *
+ * Fork the current test program to execute a test case that might
+ * not return or that might abort. The forked test case is aborted
+ * and considered failing if its run time exceeds @usec_timeout.
+ *
+ * The forking behavior can be configured with the #GTestTrapFlags flags.
+ *
+ * In the following example, the test code forks, the forked child
+ * process produces some sample output and exits successfully.
+ * The forking parent process then asserts successful child program
+ * termination and validates child program outputs.
+ *
+ * |[
+ * static void
+ * test_fork_patterns (void)
+ * {
+ * if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR))
+ * {
+ * g_print ("some stdout text: somagic17\n");
+ * g_printerr ("some stderr text: semagic43\n");
+ * exit (0); /&ast; successful test run &ast;/
+ * }
+ * g_test_trap_assert_passed();
+ * g_test_trap_assert_stdout ("*somagic17*");
+ * g_test_trap_assert_stderr ("*semagic43*");
+ * }
+ * ]|
+ *
+ * This function is implemented only on Unix platforms.
+ *
+ * Returns: %TRUE for the forked child and %FALSE for the executing parent process.
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_trap_has_passed:
+ *
+ * Check the result of the last g_test_trap_fork() call.
+ *
+ * Returns: %TRUE if the last forked child terminated successfully.
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_trap_reached_timeout:
+ *
+ * Check the result of the last g_test_trap_fork() call.
+ *
+ * Returns: %TRUE if the last forked child got killed due to a fork timeout.
+ * Since: 2.16
+ */
+
+
+/**
+ * g_test_undefined:
+ *
+ * Returns %TRUE if tests may provoke assertions and other formally-undefined
+ * behaviour under g_test_trap_fork(), to verify that appropriate warnings
+ * are given. It can be useful to turn this off if running tests under
+ * valgrind.
+ *
+ * Returns: %TRUE if tests may provoke programming errors
+ */
+
+
+/**
+ * g_test_verbose:
+ *
+ * Returns %TRUE if tests are run in verbose mode.
+ * The default is neither g_test_verbose() nor g_test_quiet().
+ *
+ * Returns: %TRUE if in verbose mode
+ */
+
+
+/**
+ * g_thread_exit:
+ * @retval: the return value of this thread
+ *
+ * Terminates the current thread.
+ *
+ * If another thread is waiting for us using g_thread_join() then the
+ * waiting thread will be woken up and get @retval as the return value
+ * of g_thread_join().
+ *
+ * Calling <literal>g_thread_exit (retval)</literal> is equivalent to
+ * returning @retval from the function @func, as given to g_thread_new().
+ *
+ * <note><para>
+ * You must only call g_thread_exit() from a thread that you created
+ * yourself with g_thread_new() or related APIs.  You must not call
+ * this function from a thread created with another threading library
+ * or or from within a #GThreadPool.
+ * </para></note>
+ */
+
+
+/**
+ * g_thread_join:
+ * @thread: a #GThread
+ *
+ * Waits until @thread finishes, i.e. the function @func, as
+ * given to g_thread_new(), returns or g_thread_exit() is called.
+ * If @thread has already terminated, then g_thread_join()
+ * returns immediately.
+ *
+ * Any thread can wait for any other thread by calling g_thread_join(),
+ * not just its 'creator'. Calling g_thread_join() from multiple threads
+ * for the same @thread leads to undefined behaviour.
+ *
+ * The value returned by @func or given to g_thread_exit() is
+ * returned by this function.
+ *
+ * g_thread_join() consumes the reference to the passed-in @thread.
+ * This will usually cause the #GThread struct and associated resources
+ * to be freed. Use g_thread_ref() to obtain an extra reference if you
+ * want to keep the GThread alive beyond the g_thread_join() call.
+ *
+ * Returns: the return value of the thread
+ */
+
+
+/**
+ * g_thread_new:
+ * @name: a name for the new thread
+ * @func: a function to execute in the new thread
+ * @data: an argument to supply to the new thread
+ *
+ * This function creates a new thread. The new thread starts by invoking
+ * @func with the argument data. The thread will run until @func returns
+ * or until g_thread_exit() is called from the new thread. The return value
+ * of @func becomes the return value of the thread, which can be obtained
+ * with g_thread_join().
+ *
+ * The @name can be useful for discriminating threads in a debugger.
+ * Some systems restrict the length of @name to 16 bytes.
+ *
+ * If the thread can not be created the program aborts. See
+ * g_thread_try_new() if you want to attempt to deal with failures.
+ *
+ * To free the struct returned by this function, use g_thread_unref().
+ * Note that g_thread_join() implicitly unrefs the #GThread as well.
+ *
+ * Returns: the new #GThread
+ * Since: 2.32
+ */
+
+
+/**
+ * g_thread_pool_free:
+ * @pool: a #GThreadPool
+ * @immediate: should @pool shut down immediately?
+ * @wait_: should the function wait for all tasks to be finished?
+ *
+ * Frees all resources allocated for @pool.
+ *
+ * If @immediate is %TRUE, no new task is processed for @pool.
+ * Otherwise @pool is not freed before the last task is processed.
+ * Note however, that no thread of this pool is interrupted while
+ * processing a task. Instead at least all still running threads
+ * can finish their tasks before the @pool is freed.
+ *
+ * If @wait_ is %TRUE, the functions does not return before all
+ * tasks to be processed (dependent on @immediate, whether all
+ * or only the currently running) are ready.
+ * Otherwise the function returns immediately.
+ *
+ * After calling this function @pool must not be used anymore.
+ */
+
+
+/**
+ * g_thread_pool_get_max_idle_time:
+ *
+ * This function will return the maximum @interval that a
+ * thread will wait in the thread pool for new tasks before
+ * being stopped.
+ *
+ * If this function returns 0, threads waiting in the thread
+ * pool for new work are not stopped.
+ *
+ * for new tasks in the thread pool before stopping the
+ * thread
+ *
+ * Returns: the maximum @interval (milliseconds) to wait
+ * Since: 2.10
+ */
+
+
+/**
+ * g_thread_pool_get_max_threads:
+ * @pool: a #GThreadPool
+ *
+ * Returns the maximal number of threads for @pool.
+ *
+ * Returns: the maximal number of threads
+ */
+
+
+/**
+ * g_thread_pool_get_max_unused_threads:
+ *
+ * Returns the maximal allowed number of unused threads.
+ *
+ * Returns: the maximal number of unused threads
+ */
+
+
+/**
+ * g_thread_pool_get_num_threads:
+ * @pool: a #GThreadPool
+ *
+ * Returns the number of threads currently running in @pool.
+ *
+ * Returns: the number of threads currently running
+ */
+
+
+/**
+ * g_thread_pool_get_num_unused_threads:
+ *
+ * Returns the number of currently unused threads.
+ *
+ * Returns: the number of currently unused threads
+ */
+
+
+/**
+ * g_thread_pool_new:
+ * @func: a function to execute in the threads of the new thread pool
+ * @user_data: user data that is handed over to @func every time it is called
+ * @max_threads: the maximal number of threads to execute concurrently in  the new thread pool, -1 means no limit
+ * @exclusive: should this thread pool be exclusive?
+ * @error: return location for error, or %NULL
+ *
+ * This function creates a new thread pool.
+ *
+ * Whenever you call g_thread_pool_push(), either a new thread is
+ * created or an unused one is reused. At most @max_threads threads
+ * are running concurrently for this thread pool. @max_threads = -1
+ * allows unlimited threads to be created for this thread pool. The
+ * newly created or reused thread now executes the function @func
+ * with the two arguments. The first one is the parameter to
+ * g_thread_pool_push() and the second one is @user_data.
+ *
+ * The parameter @exclusive determines whether the thread pool owns
+ * all threads exclusive or shares them with other thread pools.
+ * If @exclusive is %TRUE, @max_threads threads are started
+ * immediately and they will run exclusively for this thread pool
+ * until it is destroyed by g_thread_pool_free(). If @exclusive is
+ * %FALSE, threads are created when needed and shared between all
+ * non-exclusive thread pools. This implies that @max_threads may
+ * not be -1 for exclusive thread pools.
+ *
+ * @error can be %NULL to ignore errors, or non-%NULL to report
+ * errors. An error can only occur when @exclusive is set to %TRUE
+ * and not all @max_threads threads could be created.
+ *
+ * Returns: the new #GThreadPool
+ */
+
+
+/**
+ * g_thread_pool_push:
+ * @pool: a #GThreadPool
+ * @data: a new task for @pool
+ * @error: return location for error, or %NULL
+ *
+ * Inserts @data into the list of tasks to be executed by @pool.
+ *
+ * When the number of currently running threads is lower than the
+ * maximal allowed number of threads, a new thread is started (or
+ * reused) with the properties given to g_thread_pool_new().
+ * Otherwise, @data stays in the queue until a thread in this pool
+ * finishes its previous task and processes @data.
+ *
+ * @error can be %NULL to ignore errors, or non-%NULL to report
+ * errors. An error can only occur when a new thread couldn't be
+ * created. In that case @data is simply appended to the queue of
+ * work to do.
+ *
+ * Before version 2.32, this function did not return a success status.
+ *
+ * Returns: %TRUE on success, %FALSE if an error occurred
+ */
+
+
+/**
+ * g_thread_pool_set_max_idle_time:
+ * @interval: the maximum @interval (in milliseconds) a thread can be idle
+ *
+ * This function will set the maximum @interval that a thread
+ * waiting in the pool for new tasks can be idle for before
+ * being stopped. This function is similar to calling
+ * g_thread_pool_stop_unused_threads() on a regular timeout,
+ * except this is done on a per thread basis.
+ *
+ * By setting @interval to 0, idle threads will not be stopped.
+ *
+ * This function makes use of g_async_queue_timed_pop () using
+ * @interval.
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * g_thread_pool_set_max_threads:
+ * @pool: a #GThreadPool
+ * @max_threads: a new maximal number of threads for @pool, or -1 for unlimited
+ * @error: return location for error, or %NULL
+ *
+ * Sets the maximal allowed number of threads for @pool.
+ * A value of -1 means that the maximal number of threads
+ * is unlimited. If @pool is an exclusive thread pool, setting
+ * the maximal number of threads to -1 is not allowed.
+ *
+ * Setting @max_threads to 0 means stopping all work for @pool.
+ * It is effectively frozen until @max_threads is set to a non-zero
+ * value again.
+ *
+ * A thread is never terminated while calling @func, as supplied by
+ * g_thread_pool_new(). Instead the maximal number of threads only
+ * has effect for the allocation of new threads in g_thread_pool_push().
+ * A new thread is allocated, whenever the number of currently
+ * running threads in @pool is smaller than the maximal number.
+ *
+ * @error can be %NULL to ignore errors, or non-%NULL to report
+ * errors. An error can only occur when a new thread couldn't be
+ * created.
+ *
+ * Before version 2.32, this function did not return a success status.
+ *
+ * Returns: %TRUE on success, %FALSE if an error occurred
+ */
+
+
+/**
+ * g_thread_pool_set_max_unused_threads:
+ * @max_threads: maximal number of unused threads
+ *
+ * Sets the maximal number of unused threads to @max_threads.
+ * If @max_threads is -1, no limit is imposed on the number
+ * of unused threads.
+ */
+
+
+/**
+ * g_thread_pool_set_sort_function:
+ * @pool: a #GThreadPool
+ * @func: the #GCompareDataFunc used to sort the list of tasks. This function is passed two tasks. It should return 0 if the order in which they are handled does not matter, a negative value if the first task should be processed before the second or a positive value if the second task should be processed first.
+ * @user_data: user data passed to @func
+ *
+ * Sets the function used to sort the list of tasks. This allows the
+ * tasks to be processed by a priority determined by @func, and not
+ * just in the order in which they were added to the pool.
+ *
+ * Note, if the maximum number of threads is more than 1, the order
+ * that threads are executed cannot be guaranteed 100%. Threads are
+ * scheduled by the operating system and are executed at random. It
+ * cannot be assumed that threads are executed in the order they are
+ * created.
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * g_thread_pool_stop_unused_threads:
+ *
+ * Stops all currently unused threads. This does not change the
+ * maximal number of unused threads. This function can be used to
+ * regularly stop all unused threads e.g. from g_timeout_add().
+ */
+
+
+/**
+ * g_thread_pool_unprocessed:
+ * @pool: a #GThreadPool
+ *
+ * Returns the number of tasks still unprocessed in @pool.
+ *
+ * Returns: the number of unprocessed tasks
+ */
+
+
+/**
+ * g_thread_ref:
+ * @thread: a #GThread
+ *
+ * Increase the reference count on @thread.
+ *
+ * Returns: a new reference to @thread
+ * Since: 2.32
+ */
+
+
+/**
+ * g_thread_self:
+ *
+ * This functions returns the #GThread corresponding to the
+ * current thread. Note that this function does not increase
+ * the reference count of the returned struct.
+ *
+ * This function will return a #GThread even for threads that
+ * were not created by GLib (i.e. those created by other threading
+ * APIs). This may be useful for thread identification purposes
+ * (i.e. comparisons) but you must not use GLib functions (such
+ * as g_thread_join()) on these threads.
+ *
+ * Returns: the #GThread representing the current thread
+ */
+
+
+/**
+ * g_thread_supported:
+ *
+ * This macro returns %TRUE if the thread system is initialized,
+ * and %FALSE if it is not.
+ *
+ * For language bindings, g_thread_get_initialized() provides
+ * the same functionality as a function.
+ *
+ * Returns: %TRUE, if the thread system is initialized
+ */
+
+
+/**
+ * g_thread_try_new:
+ * @name: a name for the new thread
+ * @func: a function to execute in the new thread
+ * @data: an argument to supply to the new thread
+ * @error: return location for error, or %NULL
+ *
+ * This function is the same as g_thread_new() except that
+ * it allows for the possibility of failure.
+ *
+ * If a thread can not be created (due to resource limits),
+ * @error is set and %NULL is returned.
+ *
+ * Returns: the new #GThread, or %NULL if an error occurred
+ * Since: 2.32
+ */
+
+
+/**
+ * g_thread_unref:
+ * @thread: a #GThread
+ *
+ * Decrease the reference count on @thread, possibly freeing all
+ * resources associated with it.
+ *
+ * Note that each thread holds a reference to its #GThread while
+ * it is running, so it is safe to drop your own reference to it
+ * if you don't need it anymore.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_thread_yield:
+ *
+ * Causes the calling thread to voluntarily relinquish the CPU, so
+ * that other threads can run.
+ *
+ * This function is often used as a method to make busy wait less evil.
+ */
+
+
+/**
+ * g_time_val_add:
+ * @time_: a #GTimeVal
+ * @microseconds: number of microseconds to add to @time
+ *
+ * Adds the given number of microseconds to @time_. @microseconds can
+ * also be negative to decrease the value of @time_.
+ */
+
+
+/**
+ * g_time_val_from_iso8601:
+ * @iso_date: an ISO 8601 encoded date string
+ * @time_: (out): a #GTimeVal
+ *
+ * Converts a string containing an ISO 8601 encoded date and time
+ * to a #GTimeVal and puts it into @time_.
+ *
+ * @iso_date must include year, month, day, hours, minutes, and
+ * seconds. It can optionally include fractions of a second and a time
+ * zone indicator. (In the absence of any time zone indication, the
+ * timestamp is assumed to be in local time.)
+ *
+ * Returns: %TRUE if the conversion was successful.
+ * Since: 2.12
+ */
+
+
+/**
+ * g_time_val_to_iso8601:
+ * @time_: a #GTimeVal
+ *
+ * Converts @time_ into an RFC 3339 encoded string, relative to the
+ * Coordinated Universal Time (UTC). This is one of the many formats
+ * allowed by ISO 8601.
+ *
+ * ISO 8601 allows a large number of date/time formats, with or without
+ * punctuation and optional elements. The format returned by this function
+ * is a complete date and time, with optional punctuation included, the
+ * UTC time zone represented as "Z", and the @tv_usec part included if
+ * and only if it is nonzero, i.e. either
+ * "YYYY-MM-DDTHH:MM:SSZ" or "YYYY-MM-DDTHH:MM:SS.fffffZ".
+ *
+ * This corresponds to the Internet date/time format defined by
+ * <ulink url="https://www.ietf.org/rfc/rfc3339.txt">RFC 3339</ulink>, and
+ * to either of the two most-precise formats defined by
+ * <ulink url="http://www.w3.org/TR/NOTE-datetime-19980827">the W3C Note
+ * "Date and Time Formats"</ulink>. Both of these documents are profiles of
+ * ISO 8601.
+ *
+ * Use g_date_time_format() or g_strdup_printf() if a different
+ * variation of ISO 8601 format is required.
+ *
+ * Returns: a newly allocated string containing an ISO 8601 date
+ * Since: 2.12
+ */
+
+
+/**
+ * g_time_zone_adjust_time:
+ * @tz: a #GTimeZone
+ * @type: the #GTimeType of @time_
+ * @time_: a pointer to a number of seconds since January 1, 1970
+ *
+ * Finds an interval within @tz that corresponds to the given @time_,
+ * possibly adjusting @time_ if required to fit into an interval.
+ * The meaning of @time_ depends on @type.
+ *
+ * This function is similar to g_time_zone_find_interval(), with the
+ * difference that it always succeeds (by making the adjustments
+ * described below).
+ *
+ * In any of the cases where g_time_zone_find_interval() succeeds then
+ * this function returns the same value, without modifying @time_.
+ *
+ * This function may, however, modify @time_ in order to deal with
+ * non-existent times.  If the non-existent local @time_ of 02:30 were
+ * requested on March 13th 2010 in Toronto then this function would
+ * adjust @time_ to be 03:00 and return the interval containing the
+ * adjusted time.
+ *
+ * Returns: the interval containing @time_, never -1
+ * Since: 2.26
+ */
+
+
+/**
+ * g_time_zone_find_interval:
+ * @tz: a #GTimeZone
+ * @type: the #GTimeType of @time_
+ * @time_: a number of seconds since January 1, 1970
+ *
+ * Finds an the interval within @tz that corresponds to the given @time_.
+ * The meaning of @time_ depends on @type.
+ *
+ * If @type is %G_TIME_TYPE_UNIVERSAL then this function will always
+ * succeed (since universal time is monotonic and continuous).
+ *
+ * Otherwise @time_ is treated is local time.  The distinction between
+ * %G_TIME_TYPE_STANDARD and %G_TIME_TYPE_DAYLIGHT is ignored except in
+ * the case that the given @time_ is ambiguous.  In Toronto, for example,
+ * 01:30 on November 7th 2010 occurred twice (once inside of daylight
+ * savings time and the next, an hour later, outside of daylight savings
+ * time).  In this case, the different value of @type would result in a
+ * different interval being returned.
+ *
+ * It is still possible for this function to fail.  In Toronto, for
+ * example, 02:00 on March 14th 2010 does not exist (due to the leap
+ * forward to begin daylight savings time).  -1 is returned in that
+ * case.
+ *
+ * Returns: the interval containing @time_, or -1 in case of failure
+ * Since: 2.26
+ */
+
+
+/**
+ * g_time_zone_get_abbreviation:
+ * @tz: a #GTimeZone
+ * @interval: an interval within the timezone
+ *
+ * Determines the time zone abbreviation to be used during a particular
+ * @interval of time in the time zone @tz.
+ *
+ * For example, in Toronto this is currently "EST" during the winter
+ * months and "EDT" during the summer months when daylight savings time
+ * is in effect.
+ *
+ * Returns: the time zone abbreviation, which belongs to @tz
+ * Since: 2.26
+ */
+
+
+/**
+ * g_time_zone_get_offset:
+ * @tz: a #GTimeZone
+ * @interval: an interval within the timezone
+ *
+ * Determines the offset to UTC in effect during a particular @interval
+ * of time in the time zone @tz.
+ *
+ * The offset is the number of seconds that you add to UTC time to
+ * arrive at local time for @tz (ie: negative numbers for time zones
+ * west of GMT, positive numbers for east).
+ *
+ * local time in @tz
+ *
+ * Returns: the number of seconds that should be added to UTC to get the
+ * Since: 2.26
+ */
+
+
+/**
+ * g_time_zone_is_dst:
+ * @tz: a #GTimeZone
+ * @interval: an interval within the timezone
+ *
+ * Determines if daylight savings time is in effect during a particular
+ * @interval of time in the time zone @tz.
+ *
+ * Returns: %TRUE if daylight savings time is in effect
+ * Since: 2.26
+ */
+
+
+/**
+ * g_time_zone_new:
+ * @identifier: (allow-none): a timezone identifier
+ *
+ * Creates a #GTimeZone corresponding to @identifier.
+ *
+ * @identifier can either be an RFC3339/ISO 8601 time offset or
+ * something that would pass as a valid value for the
+ * <varname>TZ</varname> environment variable (including %NULL).
+ *
+ * Valid RFC3339 time offsets are <literal>"Z"</literal> (for UTC) or
+ * <literal>"±hh:mm"</literal>.  ISO 8601 additionally specifies
+ * <literal>"±hhmm"</literal> and <literal>"±hh"</literal>.
+ *
+ * The <varname>TZ</varname> environment variable typically corresponds
+ * to the name of a file in the zoneinfo database, but there are many
+ * other possibilities.  Note that those other possibilities are not
+ * currently implemented, but are planned.
+ *
+ * g_time_zone_new_local() calls this function with the value of the
+ * <varname>TZ</varname> environment variable.  This function itself is
+ * independent of the value of <varname>TZ</varname>, but if @identifier
+ * is %NULL then <filename>/etc/localtime</filename> will be consulted
+ * to discover the correct timezone.
+ *
+ * See <ulink
+ * url='http://tools.ietf.org/html/rfc3339#section-5.6'>RFC3339
+ * Â§5.6</ulink> for a precise definition of valid RFC3339 time offsets
+ * (the <varname>time-offset</varname> expansion) and ISO 8601 for the
+ * full list of valid time offsets.  See <ulink
+ * url='http://www.gnu.org/s/libc/manual/html_node/TZ-Variable.html'>The
+ * GNU C Library manual</ulink> for an explanation of the possible
+ * values of the <varname>TZ</varname> environment variable.
+ *
+ * You should release the return value by calling g_time_zone_unref()
+ * when you are done with it.
+ *
+ * Returns: the requested timezone
+ * Since: 2.26
+ */
+
+
+/**
+ * g_time_zone_new_local:
+ *
+ * Creates a #GTimeZone corresponding to local time.  The local time
+ * zone may change between invocations to this function; for example,
+ * if the system administrator changes it.
+ *
+ * This is equivalent to calling g_time_zone_new() with the value of the
+ * <varname>TZ</varname> environment variable (including the possibility
+ * of %NULL).
+ *
+ * You should release the return value by calling g_time_zone_unref()
+ * when you are done with it.
+ *
+ * Returns: the local timezone
+ * Since: 2.26
+ */
+
+
+/**
+ * g_time_zone_new_utc:
+ *
+ * Creates a #GTimeZone corresponding to UTC.
+ *
+ * This is equivalent to calling g_time_zone_new() with a value like
+ * "Z", "UTC", "+00", etc.
+ *
+ * You should release the return value by calling g_time_zone_unref()
+ * when you are done with it.
+ *
+ * Returns: the universal timezone
+ * Since: 2.26
+ */
+
+
+/**
+ * g_time_zone_ref:
+ * @tz: a #GTimeZone
+ *
+ * Increases the reference count on @tz.
+ *
+ * Returns: a new reference to @tz.
+ * Since: 2.26
+ */
+
+
+/**
+ * g_time_zone_unref:
+ * @tz: a #GTimeZone
+ *
+ * Decreases the reference count on @tz.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_timeout_add:
+ * @interval: the time between calls to the function, in milliseconds (1/1000ths of a second)
+ * @function: function to call
+ * @data: data to pass to @function
+ *
+ * Sets a function to be called at regular intervals, with the default
+ * priority, #G_PRIORITY_DEFAULT.  The function is called repeatedly
+ * until it returns %FALSE, 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).
+ *
+ * If you want to have a timer in the "seconds" range and do not care
+ * about the exact time of the first call of the timer, use the
+ * g_timeout_add_seconds() function; this function allows for more
+ * optimizations and more efficient system power usage.
+ *
+ * This internally creates a main loop source using g_timeout_source_new()
+ * and attaches it to the main loop context using g_source_attach(). You can
+ * do these steps manually if you need greater control.
+ *
+ * The interval given is in terms of monotonic time, not wall clock
+ * time.  See g_get_monotonic_time().
+ *
+ * Returns: the ID (greater than 0) of the event source.
+ */
+
+
+/**
+ * g_timeout_add_full:
+ * @priority: the priority of the timeout source. Typically this will be in the range between #G_PRIORITY_DEFAULT and #G_PRIORITY_HIGH.
+ * @interval: the time between calls to the function, in milliseconds (1/1000ths of a second)
+ * @function: function to call
+ * @data: data to pass to @function
+ * @notify: (allow-none): function to call when the timeout is removed, or %NULL
+ *
+ * Sets a function to be called at regular intervals, with the given
+ * priority.  The function is called repeatedly until it returns
+ * %FALSE, at which point the timeout is automatically destroyed and
+ * the function will not be called again.  The @notify function is
+ * called when the timeout is destroyed.  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).
+ *
+ * This internally creates a main loop source using g_timeout_source_new()
+ * and attaches it to the main loop context using g_source_attach(). You can
+ * do these steps manually if you need greater control.
+ *
+ * The interval given in terms of monotonic time, not wall clock time.
+ * See g_get_monotonic_time().
+ *
+ * Returns: the ID (greater than 0) of the event source.
+ * Rename to: g_timeout_add
+ */
+
+
+/**
+ * g_timeout_add_seconds:
+ * @interval: the time between calls to the function, in seconds
+ * @function: function to call
+ * @data: data to pass to @function
+ *
+ * Sets a function to be called at regular intervals with the default
+ * priority, #G_PRIORITY_DEFAULT. The function is called repeatedly until
+ * it returns %FALSE, at which point the timeout is automatically destroyed
+ * and the function will not be called again.
+ *
+ * This internally creates a main loop source using
+ * g_timeout_source_new_seconds() and attaches it to the main loop context
+ * using g_source_attach(). You can do these steps manually if you need
+ * greater control. Also see g_timeout_add_seconds_full().
+ *
+ * Note that the first call of the timer may not be precise for timeouts
+ * of one second. If you need finer precision and have such a timeout,
+ * you may want to use g_timeout_add() instead.
+ *
+ * The interval given is in terms of monotonic time, not wall clock
+ * time.  See g_get_monotonic_time().
+ *
+ * Returns: the ID (greater than 0) of the event source.
+ * Since: 2.14
+ */
+
+
+/**
+ * g_timeout_add_seconds_full:
+ * @priority: the priority of the timeout source. Typically this will be in the range between #G_PRIORITY_DEFAULT and #G_PRIORITY_HIGH.
+ * @interval: the time between calls to the function, in seconds
+ * @function: function to call
+ * @data: data to pass to @function
+ * @notify: (allow-none): function to call when the timeout is removed, or %NULL
+ *
+ * Sets a function to be called at regular intervals, with @priority.
+ * The function is called repeatedly until it returns %FALSE, at which
+ * point the timeout is automatically destroyed and the function will
+ * not be called again.
+ *
+ * Unlike g_timeout_add(), 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.
+ *
+ * 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
+ *
+ * If you want timing more precise than whole seconds, use g_timeout_add()
+ * instead.
+ *
+ * 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 g_timeout_add_seconds() is preferred over g_timeout_add().
+ *
+ * This internally creates a main loop source using
+ * g_timeout_source_new_seconds() and attaches it to the main loop context
+ * using g_source_attach(). You can do these steps manually if you need
+ * greater control.
+ *
+ * The interval given is in terms of monotonic time, not wall clock
+ * time.  See g_get_monotonic_time().
+ *
+ * Returns: the ID (greater than 0) of the event source.
+ * Rename to: g_timeout_add_seconds
+ * Since: 2.14
+ */
+
+
+/**
+ * g_timeout_source_new:
+ * @interval: the timeout interval in milliseconds.
+ *
+ * Creates a new timeout source.
+ *
+ * The source will not initially be associated with any #GMainContext
+ * and must be added to one with g_source_attach() before it will be
+ * executed.
+ *
+ * The interval given is in terms of monotonic time, not wall clock
+ * time.  See g_get_monotonic_time().
+ *
+ * Returns: the newly-created timeout source
+ */
+
+
+/**
+ * g_timeout_source_new_seconds:
+ * @interval: the timeout interval in seconds
+ *
+ * Creates a new timeout source.
+ *
+ * The source will not initially be associated with any #GMainContext
+ * and must be added to one with g_source_attach() before it will be
+ * executed.
+ *
+ * The scheduling granularity/accuracy of this timeout source will be
+ * in seconds.
+ *
+ * The interval given in terms of monotonic time, not wall clock time.
+ * See g_get_monotonic_time().
+ *
+ * Returns: the newly-created timeout source
+ * Since: 2.14
+ */
+
+
+/**
+ * g_timer_continue:
+ * @timer: a #GTimer.
+ *
+ * Resumes a timer that has previously been stopped with
+ * g_timer_stop(). g_timer_stop() must be called before using this
+ * function.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_timer_destroy:
+ * @timer: a #GTimer to destroy.
+ *
+ * Destroys a timer, freeing associated resources.
+ */
+
+
+/**
+ * g_timer_elapsed:
+ * @timer: a #GTimer.
+ * @microseconds: return location for the fractional part of seconds elapsed, in microseconds (that is, the total number of microseconds elapsed, modulo 1000000), or %NULL
+ * @Returns: seconds elapsed as a floating point value, including any fractional part.
+ *
+ * If @timer has been started but not stopped, obtains the time since
+ * the timer was started. If @timer has been stopped, obtains the
+ * elapsed time between the time it was started and the time it was
+ * stopped. The return value is the number of seconds elapsed,
+ * including any fractional part. The @microseconds out parameter is
+ * essentially useless.
+ */
+
+
+/**
+ * g_timer_new:
+ * @Returns: a new #GTimer.
+ *
+ * Creates a new timer, and starts timing (i.e. g_timer_start() is
+ * implicitly called for you).
+ */
+
+
+/**
+ * g_timer_reset:
+ * @timer: a #GTimer.
+ *
+ * This function is useless; it's fine to call g_timer_start() on an
+ * already-started timer to reset the start time, so g_timer_reset()
+ * serves no purpose.
+ */
+
+
+/**
+ * g_timer_start:
+ * @timer: a #GTimer.
+ *
+ * Marks a start time, so that future calls to g_timer_elapsed() will
+ * report the time since g_timer_start() was called. g_timer_new()
+ * automatically marks the start time, so no need to call
+ * g_timer_start() immediately after creating the timer.
+ */
+
+
+/**
+ * g_timer_stop:
+ * @timer: a #GTimer.
+ *
+ * Marks an end time, so calls to g_timer_elapsed() will return the
+ * difference between this end time and the start time.
+ */
+
+
+/**
+ * g_trash_stack_height:
+ * @stack_p: a #GTrashStack
+ *
+ * Returns the height of a #GTrashStack.
+ *
+ * Note that execution of this function is of O(N) complexity
+ * where N denotes the number of items on the stack.
+ *
+ * Returns: the height of the stack
+ */
+
+
+/**
+ * g_trash_stack_peek:
+ * @stack_p: a #GTrashStack
+ *
+ * Returns the element at the top of a #GTrashStack
+ * which may be %NULL.
+ *
+ * Returns: the element at the top of the stack
+ */
+
+
+/**
+ * g_trash_stack_pop:
+ * @stack_p: a #GTrashStack
+ *
+ * Pops a piece of memory off a #GTrashStack.
+ *
+ * Returns: the element at the top of the stack
+ */
+
+
+/**
+ * g_trash_stack_push:
+ * @stack_p: a #GTrashStack
+ * @data_p: the piece of memory to push on the stack
+ *
+ * Pushes a piece of memory onto a #GTrashStack.
+ */
+
+
+/**
+ * g_tree_destroy:
+ * @tree: a #GTree.
+ *
+ * Removes all keys and values from the #GTree and decreases its
+ * reference count by one. If keys and/or values are dynamically
+ * allocated, you should either free them first or create the #GTree
+ * using g_tree_new_full().  In the latter case the destroy functions
+ * you supplied will be called on all keys and values before destroying
+ * the #GTree.
+ */
+
+
+/**
+ * g_tree_foreach:
+ * @tree: a #GTree.
+ * @func: the function to call for each node visited. If this function returns %TRUE, the traversal is stopped.
+ * @user_data: user data to pass to the function.
+ *
+ * Calls the given function for each of the key/value pairs in the #GTree.
+ * The function is passed the key and value of each pair, and the given
+ * @data parameter. The tree is traversed in sorted order.
+ *
+ * The tree may not be modified while iterating over it (you can't
+ * add/remove items). To remove all items matching a predicate, you need
+ * to add each item to a list in your #GTraverseFunc as you walk over
+ * the tree, then walk the list and remove each item.
+ */
+
+
+/**
+ * g_tree_height:
+ * @tree: a #GTree.
+ *
+ * Gets the height of a #GTree.
+ *
+ * If the #GTree contains no nodes, the height is 0.
+ * If the #GTree contains only one root node the height is 1.
+ * If the root node has children the height is 2, etc.
+ *
+ * Returns: the height of the #GTree.
+ */
+
+
+/**
+ * g_tree_insert:
+ * @tree: a #GTree.
+ * @key: the key to insert.
+ * @value: the value corresponding to the key.
+ *
+ * Inserts a key/value pair into a #GTree. If the given key already exists
+ * in the #GTree its corresponding value is set to the new value. If you
+ * supplied a value_destroy_func when creating the #GTree, the old value is
+ * freed using that function. If you supplied a @key_destroy_func when
+ * creating the #GTree, the passed key is freed using that function.
+ *
+ * The tree is automatically 'balanced' as new key/value pairs are added,
+ * so that the distance from the root to every leaf is as small as possible.
+ */
+
+
+/**
+ * g_tree_lookup:
+ * @tree: a #GTree.
+ * @key: the key to look up.
+ *
+ * Gets the value corresponding to the given key. Since a #GTree is
+ * automatically balanced as key/value pairs are added, key lookup is very
+ * fast.
+ *
+ * not found.
+ *
+ * Returns: the value corresponding to the key, or %NULL if the key was
+ */
+
+
+/**
+ * g_tree_lookup_extended:
+ * @tree: a #GTree.
+ * @lookup_key: the key to look up.
+ * @orig_key: returns the original key.
+ * @value: returns the value associated with the key.
+ *
+ * Looks up a key in the #GTree, returning the original key and the
+ * associated value and a #gboolean which is %TRUE if the key was found. This
+ * is useful if you need to free the memory allocated for the original key,
+ * for example before calling g_tree_remove().
+ *
+ * Returns: %TRUE if the key was found in the #GTree.
+ */
+
+
+/**
+ * g_tree_new:
+ * @key_compare_func: the function used to order the nodes in the #GTree. It should return values similar to the standard strcmp() function - 0 if the two arguments are equal, a negative value if the first argument comes before the second, or a positive value if the first argument comes after the second.
+ *
+ * Creates a new #GTree.
+ *
+ * Returns: a new #GTree.
+ */
+
+
+/**
+ * g_tree_new_full:
+ * @key_compare_func: qsort()-style comparison function.
+ * @key_compare_data: data to pass to comparison function.
+ * @key_destroy_func: a function to free the memory allocated for the key used when removing the entry from the #GTree or %NULL if you don't want to supply such a function.
+ * @value_destroy_func: a function to free the memory allocated for the value used when removing the entry from the #GTree or %NULL if you don't want to supply such a function.
+ *
+ * Creates a new #GTree like g_tree_new() and allows to specify functions
+ * to free the memory allocated for the key and value that get called when
+ * removing the entry from the #GTree.
+ *
+ * Returns: a new #GTree.
+ */
+
+
+/**
+ * g_tree_new_with_data:
+ * @key_compare_func: qsort()-style comparison function.
+ * @key_compare_data: data to pass to comparison function.
+ *
+ * Creates a new #GTree with a comparison function that accepts user data.
+ * See g_tree_new() for more details.
+ *
+ * Returns: a new #GTree.
+ */
+
+
+/**
+ * g_tree_nnodes:
+ * @tree: a #GTree.
+ *
+ * Gets the number of nodes in a #GTree.
+ *
+ * Returns: the number of nodes in the #GTree.
+ */
+
+
+/**
+ * g_tree_ref:
+ * @tree: a #GTree.
+ *
+ * Increments the reference count of @tree by one.  It is safe to call
+ * this function from any thread.
+ *
+ * Returns: the passed in #GTree.
+ * Since: 2.22
+ */
+
+
+/**
+ * g_tree_remove:
+ * @tree: a #GTree.
+ * @key: the key to remove.
+ *
+ * Removes a key/value pair from a #GTree.
+ *
+ * If the #GTree was created using g_tree_new_full(), the key and value
+ * are freed using the supplied destroy functions, otherwise you have to
+ * make sure that any dynamically allocated values are freed yourself.
+ * If the key does not exist in the #GTree, the function does nothing.
+ *
+ * nothing)
+ *
+ * Returns: %TRUE if the key was found (prior to 2.8, this function returned
+ */
+
+
+/**
+ * g_tree_replace:
+ * @tree: a #GTree.
+ * @key: the key to insert.
+ * @value: the value corresponding to the key.
+ *
+ * Inserts a new key and value into a #GTree similar to g_tree_insert().
+ * The difference is that if the key already exists in the #GTree, it gets
+ * replaced by the new key. If you supplied a @value_destroy_func when
+ * creating the #GTree, the old value is freed using that function. If you
+ * supplied a @key_destroy_func when creating the #GTree, the old key is
+ * freed using that function.
+ *
+ * The tree is automatically 'balanced' as new key/value pairs are added,
+ * so that the distance from the root to every leaf is as small as possible.
+ */
+
+
+/**
+ * g_tree_search:
+ * @tree: a #GTree
+ * @search_func: a function used to search the #GTree
+ * @user_data: the data passed as the second argument to @search_func
+ *
+ * Searches a #GTree using @search_func.
+ *
+ * The @search_func is called with a pointer to the key of a key/value
+ * pair in the tree, and the passed in @user_data. If @search_func returns
+ * 0 for a key/value pair, then the corresponding value is returned as
+ * the result of g_tree_search(). If @search_func returns -1, searching
+ * will proceed among the key/value pairs that have a smaller key; if
+ * @search_func returns 1, searching will proceed among the key/value
+ * pairs that have a larger key.
+ *
+ * the key was not found.
+ *
+ * Returns: the value corresponding to the found key, or %NULL if
+ */
+
+
+/**
+ * g_tree_steal:
+ * @tree: a #GTree.
+ * @key: the key to remove.
+ *
+ * Removes a key and its associated value from a #GTree without calling
+ * the key and value destroy functions.
+ *
+ * If the key does not exist in the #GTree, the function does nothing.
+ *
+ * nothing)
+ *
+ * Returns: %TRUE if the key was found (prior to 2.8, this function returned
+ */
+
+
+/**
+ * g_tree_traverse:
+ * @tree: a #GTree.
+ * @traverse_func: the function to call for each node visited. If this function returns %TRUE, the traversal is stopped.
+ * @traverse_type: the order in which nodes are visited, one of %G_IN_ORDER, %G_PRE_ORDER and %G_POST_ORDER.
+ * @user_data: user data to pass to the function.
+ *
+ * Calls the given function for each node in the #GTree.
+ *
+ * Deprecated:2.2: The order of a balanced tree is somewhat arbitrary. If you
+ * just want to visit all nodes in sorted order, use g_tree_foreach()
+ * instead. If you really need to visit nodes in a different order, consider
+ * using an <link linkend="glib-N-ary-Trees">N-ary Tree</link>.
+ */
+
+
+/**
+ * g_tree_unref:
+ * @tree: a #GTree.
+ *
+ * Decrements the reference count of @tree by one.  If the reference count
+ * drops to 0, all keys and values will be destroyed (if destroy
+ * functions were specified) and all memory allocated by @tree will be
+ * released.
+ *
+ * It is safe to call this function from any thread.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * g_try_malloc:
+ * @n_bytes: number of bytes to allocate.
+ *
+ * Attempts to allocate @n_bytes, and returns %NULL on failure.
+ * Contrast with g_malloc(), which aborts the program on failure.
+ *
+ * Returns: the allocated memory, or %NULL.
+ */
+
+
+/**
+ * g_try_malloc0:
+ * @n_bytes: number of bytes to allocate
+ *
+ * Attempts to allocate @n_bytes, initialized to 0's, and returns %NULL on
+ * failure. Contrast with g_malloc0(), which aborts the program on failure.
+ *
+ * Since: 2.8
+ * Returns: the allocated memory, or %NULL
+ */
+
+
+/**
+ * g_try_malloc0_n:
+ * @n_blocks: the number of blocks to allocate
+ * @n_block_bytes: the size of each block in bytes
+ *
+ * This function is similar to g_try_malloc0(), allocating (@n_blocks * @n_block_bytes) bytes,
+ * but care is taken to detect possible overflow during multiplication.
+ *
+ * Since: 2.24
+ * Returns: the allocated memory, or %NULL
+ */
+
+
+/**
+ * g_try_malloc_n:
+ * @n_blocks: the number of blocks to allocate
+ * @n_block_bytes: the size of each block in bytes
+ *
+ * This function is similar to g_try_malloc(), allocating (@n_blocks * @n_block_bytes) bytes,
+ * but care is taken to detect possible overflow during multiplication.
+ *
+ * Since: 2.24
+ * Returns: the allocated memory, or %NULL.
+ */
+
+
+/**
+ * g_try_new:
+ * @struct_type: the type of the elements to allocate
+ * @n_structs: the number of elements to allocate
+ *
+ * Attempts to allocate @n_structs elements of type @struct_type, and returns
+ * %NULL on failure. Contrast with g_new(), which aborts the program on failure.
+ * The returned pointer is cast to a pointer to the given type.
+ * The function returns %NULL when @n_structs is 0 of if an overflow occurs.
+ *
+ * Since: 2.8
+ * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
+ */
+
+
+/**
+ * g_try_new0:
+ * @struct_type: the type of the elements to allocate
+ * @n_structs: the number of elements to allocate
+ *
+ * Attempts to allocate @n_structs elements of type @struct_type, initialized
+ * to 0's, and returns %NULL on failure. Contrast with g_new0(), which aborts
+ * the program on failure.
+ * The returned pointer is cast to a pointer to the given type.
+ * The function returns %NULL when @n_structs is 0 of if an overflow occurs.
+ *
+ * Since: 2.8
+ * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
+ */
+
+
+/**
+ * g_try_realloc:
+ * @mem: (allow-none): previously-allocated memory, or %NULL.
+ * @n_bytes: number of bytes to allocate.
+ *
+ * Attempts to realloc @mem to a new size, @n_bytes, and returns %NULL
+ * on failure. Contrast with g_realloc(), which aborts the program
+ * on failure. If @mem is %NULL, behaves the same as g_try_malloc().
+ *
+ * Returns: the allocated memory, or %NULL.
+ */
+
+
+/**
+ * g_try_realloc_n:
+ * @mem: (allow-none): previously-allocated memory, or %NULL.
+ * @n_blocks: the number of blocks to allocate
+ * @n_block_bytes: the size of each block in bytes
+ *
+ * This function is similar to g_try_realloc(), allocating (@n_blocks * @n_block_bytes) bytes,
+ * but care is taken to detect possible overflow during multiplication.
+ *
+ * Since: 2.24
+ * Returns: the allocated memory, or %NULL.
+ */
+
+
+/**
+ * g_try_renew:
+ * @struct_type: the type of the elements to allocate
+ * @mem: the currently allocated memory
+ * @n_structs: the number of elements to allocate
+ *
+ * Attempts to reallocate the memory pointed to by @mem, so that it now has
+ * space for @n_structs elements of type @struct_type, and returns %NULL on
+ * failure. Contrast with g_renew(), which aborts the program on failure.
+ * It returns the new address of the memory, which may have been moved.
+ * The function returns %NULL if an overflow occurs.
+ *
+ * Since: 2.8
+ * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
+ */
+
+
+/**
+ * g_ucs4_to_utf16:
+ * @str: a UCS-4 encoded string
+ * @len: the maximum length (number of characters) of @str to use. If @len < 0, then the string is nul-terminated.
+ * @items_read: (allow-none): location to store number of bytes read, or %NULL. If an error occurs then the index of the invalid input is stored here.
+ * @items_written: (allow-none): location to store number of <type>gunichar2</type> written, or %NULL. The value stored here does not include the trailing 0.
+ * @error: location to store the error occurring, or %NULL to ignore errors. Any of the errors in #GConvertError other than %G_CONVERT_ERROR_NO_CONVERSION may occur.
+ *
+ * Convert a string from UCS-4 to UTF-16. A 0 character will be
+ * added to the result after the converted text.
+ *
+ * This value must be freed with g_free(). If an
+ * error occurs, %NULL will be returned and
+ * @error set.
+ *
+ * Returns: a pointer to a newly allocated UTF-16 string.
+ */
+
+
+/**
+ * g_ucs4_to_utf8:
+ * @str: a UCS-4 encoded string
+ * @len: the maximum length (number of characters) of @str to use. If @len < 0, then the string is nul-terminated.
+ * @items_read: (allow-none): location to store number of characters read, or %NULL.
+ * @items_written: (allow-none): location to store number of bytes written or %NULL. The value here stored does not include the trailing 0 byte.
+ * @error: location to store the error occurring, or %NULL to ignore errors. Any of the errors in #GConvertError other than %G_CONVERT_ERROR_NO_CONVERSION may occur.
+ *
+ * Convert a string from a 32-bit fixed width representation as UCS-4.
+ * to UTF-8. The result will be terminated with a 0 byte.
+ *
+ * This value must be freed with g_free(). If an
+ * error occurs, %NULL will be returned and
+ * @error set. In that case, @items_read will be
+ * set to the position of the first invalid input
+ * character.
+ *
+ * Returns: a pointer to a newly allocated UTF-8 string.
+ */
+
+
+/**
+ * g_unichar_break_type:
+ * @c: a Unicode character
+ *
+ * Determines the break type of @c. @c should be a Unicode character
+ * (to derive a character from UTF-8 encoded text, use
+ * g_utf8_get_char()). The break type is used to find word and line
+ * breaks ("text boundaries"), Pango implements the Unicode boundary
+ * resolution algorithms and normally you would use a function such
+ * as pango_break() instead of caring about break types yourself.
+ *
+ * Returns: the break type of @c
+ */
+
+
+/**
+ * g_unichar_combining_class:
+ * @uc: a Unicode character
+ *
+ * Determines the canonical combining class of a Unicode character.
+ *
+ * Returns: the combining class of the character
+ * Since: 2.14
+ */
+
+
+/**
+ * g_unichar_compose:
+ * @a: a Unicode character
+ * @b: a Unicode character
+ * @ch: return location for the composed character
+ *
+ * Performs a single composition step of the
+ * Unicode canonical composition algorithm.
+ *
+ * This function includes algorithmic Hangul Jamo composition,
+ * but it is not exactly the inverse of g_unichar_decompose().
+ * No composition can have either of @a or @b equal to zero.
+ * To be precise, this function composes if and only if
+ * there exists a Primary Composite P which is canonically
+ * equivalent to the sequence <@a,@b>.  See the Unicode
+ * Standard for the definition of Primary Composite.
+ *
+ * If @a and @b do not compose a new character, @ch is set to zero.
+ *
+ * See <ulink url="http://unicode.org/reports/tr15/">UAX#15</ulink>
+ * for details.
+ *
+ * Returns: %TRUE if the characters could be composed
+ * Since: 2.30
+ */
+
+
+/**
+ * g_unichar_decompose:
+ * @ch: a Unicode character
+ * @a: return location for the first component of @ch
+ * @b: return location for the second component of @ch
+ *
+ * Performs a single decomposition step of the
+ * Unicode canonical decomposition algorithm.
+ *
+ * This function does not include compatibility
+ * decompositions. It does, however, include algorithmic
+ * Hangul Jamo decomposition, as well as 'singleton'
+ * decompositions which replace a character by a single
+ * other character. In the case of singletons *@b will
+ * be set to zero.
+ *
+ * If @ch is not decomposable, *@a is set to @ch and *@b
+ * is set to zero.
+ *
+ * Note that the way Unicode decomposition pairs are
+ * defined, it is guaranteed that @b would not decompose
+ * further, but @a may itself decompose.  To get the full
+ * canonical decomposition for @ch, one would need to
+ * recursively call this function on @a.  Or use
+ * g_unichar_fully_decompose().
+ *
+ * See <ulink url="http://unicode.org/reports/tr15/">UAX#15</ulink>
+ * for details.
+ *
+ * Returns: %TRUE if the character could be decomposed
+ * Since: 2.30
+ */
+
+
+/**
+ * g_unichar_digit_value:
+ * @c: a Unicode character
+ *
+ * Determines the numeric value of a character as a decimal
+ * digit.
+ *
+ * g_unichar_isdigit()), its numeric value. Otherwise, -1.
+ *
+ * Returns: If @c is a decimal digit (according to
+ */
+
+
+/**
+ * g_unichar_fully_decompose:
+ * @ch: a Unicode character.
+ * @compat: whether perform canonical or compatibility decomposition
+ * @result: (allow-none): location to store decomposed result, or %NULL
+ * @result_len: length of @result
+ *
+ * Computes the canonical or compatibility decomposition of a
+ * Unicode character.  For compatibility decomposition,
+ * pass %TRUE for @compat; for canonical decomposition
+ * pass %FALSE for @compat.
+ *
+ * The decomposed sequence is placed in @result.  Only up to
+ * @result_len characters are written into @result.  The length
+ * of the full decomposition (irrespective of @result_len) is
+ * returned by the function.  For canonical decomposition,
+ * currently all decompositions are of length at most 4, but
+ * this may change in the future (very unlikely though).
+ * At any rate, Unicode does guarantee that a buffer of length
+ * 18 is always enough for both compatibility and canonical
+ * decompositions, so that is the size recommended. This is provided
+ * as %G_UNICHAR_MAX_DECOMPOSITION_LENGTH.
+ *
+ * See <ulink url="http://unicode.org/reports/tr15/">UAX#15</ulink>
+ * for details.
+ *
+ * Returns: the length of the full decomposition.
+ * Since: 2.30
+ */
+
+
+/**
+ * g_unichar_get_mirror_char:
+ * @ch: a Unicode character
+ * @mirrored_ch: location to store the mirrored character
+ *
+ * In Unicode, some characters are <firstterm>mirrored</firstterm>. This
+ * means that their images are mirrored horizontally in text that is laid
+ * out from right to left. For instance, "(" would become its mirror image,
+ * ")", in right-to-left text.
+ *
+ * If @ch has the Unicode mirrored property and there is another unicode
+ * character that typically has a glyph that is the mirror image of @ch's
+ * glyph and @mirrored_ch is set, it puts that character in the address
+ * pointed to by @mirrored_ch.  Otherwise the original character is put.
+ *
+ * Returns: %TRUE if @ch has a mirrored character, %FALSE otherwise
+ * Since: 2.4
+ */
+
+
+/**
+ * g_unichar_get_script:
+ * @ch: a Unicode character
+ *
+ * Looks up the #GUnicodeScript for a particular character (as defined
+ * by Unicode Standard Annex \#24). No check is made for @ch being a
+ * valid Unicode character; if you pass in invalid character, the
+ * result is undefined.
+ *
+ * This function is equivalent to pango_script_for_unichar() and the
+ * two are interchangeable.
+ *
+ * Returns: the #GUnicodeScript for the character.
+ * Since: 2.14
+ */
+
+
+/**
+ * g_unichar_isalnum:
+ * @c: a Unicode character
+ *
+ * Determines whether a character is alphanumeric.
+ * Given some UTF-8 text, obtain a character value
+ * with g_utf8_get_char().
+ *
+ * Returns: %TRUE if @c is an alphanumeric character
+ */
+
+
+/**
+ * g_unichar_isalpha:
+ * @c: a Unicode character
+ *
+ * Determines whether a character is alphabetic (i.e. a letter).
+ * Given some UTF-8 text, obtain a character value with
+ * g_utf8_get_char().
+ *
+ * Returns: %TRUE if @c is an alphabetic character
+ */
+
+
+/**
+ * g_unichar_iscntrl:
+ * @c: a Unicode character
+ *
+ * Determines whether a character is a control character.
+ * Given some UTF-8 text, obtain a character value with
+ * g_utf8_get_char().
+ *
+ * Returns: %TRUE if @c is a control character
+ */
+
+
+/**
+ * g_unichar_isdefined:
+ * @c: a Unicode character
+ *
+ * Determines if a given character is assigned in the Unicode
+ * standard.
+ *
+ * Returns: %TRUE if the character has an assigned value
+ */
+
+
+/**
+ * g_unichar_isdigit:
+ * @c: a Unicode character
+ *
+ * Determines whether a character is numeric (i.e. a digit).  This
+ * covers ASCII 0-9 and also digits in other languages/scripts.  Given
+ * some UTF-8 text, obtain a character value with g_utf8_get_char().
+ *
+ * Returns: %TRUE if @c is a digit
+ */
+
+
+/**
+ * g_unichar_isgraph:
+ * @c: a Unicode character
+ *
+ * Determines whether a character is printable and not a space
+ * (returns %FALSE for control characters, format characters, and
+ * spaces). g_unichar_isprint() is similar, but returns %TRUE for
+ * spaces. Given some UTF-8 text, obtain a character value with
+ * g_utf8_get_char().
+ *
+ * Returns: %TRUE if @c is printable unless it's a space
+ */
+
+
+/**
+ * g_unichar_islower:
+ * @c: a Unicode character
+ *
+ * Determines whether a character is a lowercase letter.
+ * Given some UTF-8 text, obtain a character value with
+ * g_utf8_get_char().
+ *
+ * Returns: %TRUE if @c is a lowercase letter
+ */
+
+
+/**
+ * g_unichar_ismark:
+ * @c: a Unicode character
+ *
+ * Determines whether a character is a mark (non-spacing mark,
+ * combining mark, or enclosing mark in Unicode speak).
+ * Given some UTF-8 text, obtain a character value
+ * with g_utf8_get_char().
+ *
+ * Note: in most cases where isalpha characters are allowed,
+ * ismark characters should be allowed to as they are essential
+ * for writing most European languages as well as many non-Latin
+ * scripts.
+ *
+ * Returns: %TRUE if @c is a mark character
+ * Since: 2.14
+ */
+
+
+/**
+ * g_unichar_isprint:
+ * @c: a Unicode character
+ *
+ * Determines whether a character is printable.
+ * Unlike g_unichar_isgraph(), returns %TRUE for spaces.
+ * Given some UTF-8 text, obtain a character value with
+ * g_utf8_get_char().
+ *
+ * Returns: %TRUE if @c is printable
+ */
+
+
+/**
+ * g_unichar_ispunct:
+ * @c: a Unicode character
+ *
+ * Determines whether a character is punctuation or a symbol.
+ * Given some UTF-8 text, obtain a character value with
+ * g_utf8_get_char().
+ *
+ * Returns: %TRUE if @c is a punctuation or symbol character
+ */
+
+
+/**
+ * g_unichar_isspace:
+ * @c: a Unicode character
+ *
+ * Determines whether a character is a space, tab, or line separator
+ * (newline, carriage return, etc.).  Given some UTF-8 text, obtain a
+ * character value with g_utf8_get_char().
+ *
+ * (Note: don't use this to do word breaking; you have to use
+ * Pango or equivalent to get word breaking right, the algorithm
+ * is fairly complex.)
+ *
+ * Returns: %TRUE if @c is a space character
+ */
+
+
+/**
+ * g_unichar_istitle:
+ * @c: a Unicode character
+ *
+ * Determines if a character is titlecase. Some characters in
+ * Unicode which are composites, such as the DZ digraph
+ * have three case variants instead of just two. The titlecase
+ * form is used at the beginning of a word where only the
+ * first letter is capitalized. The titlecase form of the DZ
+ * digraph is U+01F2 LATIN CAPITAL LETTTER D WITH SMALL LETTER Z.
+ *
+ * Returns: %TRUE if the character is titlecase
+ */
+
+
+/**
+ * g_unichar_isupper:
+ * @c: a Unicode character
+ *
+ * Determines if a character is uppercase.
+ *
+ * Returns: %TRUE if @c is an uppercase character
+ */
+
+
+/**
+ * g_unichar_iswide:
+ * @c: a Unicode character
+ *
+ * Determines if a character is typically rendered in a double-width
+ * cell.
+ *
+ * Returns: %TRUE if the character is wide
+ */
+
+
+/**
+ * g_unichar_iswide_cjk:
+ * @c: a Unicode character
+ *
+ * Determines if a character is typically rendered in a double-width
+ * cell under legacy East Asian locales.  If a character is wide according to
+ * g_unichar_iswide(), then it is also reported wide with this function, but
+ * the converse is not necessarily true.  See the
+ * <ulink url="http://www.unicode.org/reports/tr11/">Unicode Standard
+ * Annex #11</ulink> for details.
+ *
+ * If a character passes the g_unichar_iswide() test then it will also pass
+ * this test, but not the other way around.  Note that some characters may
+ * pas both this test and g_unichar_iszerowidth().
+ *
+ * Returns: %TRUE if the character is wide in legacy East Asian locales
+ * Since: 2.12
+ */
+
+
+/**
+ * g_unichar_isxdigit:
+ * @c: a Unicode character.
+ *
+ * Determines if a character is a hexidecimal digit.
+ *
+ * Returns: %TRUE if the character is a hexadecimal digit
+ */
+
+
+/**
+ * g_unichar_iszerowidth:
+ * @c: a Unicode character
+ *
+ * Determines if a given character typically takes zero width when rendered.
+ * The return value is %TRUE for all non-spacing and enclosing marks
+ * (e.g., combining accents), format characters, zero-width
+ * space, but not U+00AD SOFT HYPHEN.
+ *
+ * A typical use of this function is with one of g_unichar_iswide() or
+ * g_unichar_iswide_cjk() to determine the number of cells a string occupies
+ * when displayed on a grid display (terminals).  However, note that not all
+ * terminals support zero-width rendering of zero-width marks.
+ *
+ * Returns: %TRUE if the character has zero width
+ * Since: 2.14
+ */
+
+
+/**
+ * g_unichar_to_utf8:
+ * @c: a Unicode character code
+ * @outbuf: output buffer, must have at least 6 bytes of space. If %NULL, the length will be computed and returned and nothing will be written to @outbuf.
+ *
+ * Converts a single character to UTF-8.
+ *
+ * Returns: number of bytes written
+ */
+
+
+/**
+ * g_unichar_tolower:
+ * @c: a Unicode character.
+ *
+ * Converts a character to lower case.
+ *
+ * If @c is not an upperlower or titlecase character,
+ * or has no lowercase equivalent @c is returned unchanged.
+ *
+ * Returns: the result of converting @c to lower case.
+ */
+
+
+/**
+ * g_unichar_totitle:
+ * @c: a Unicode character
+ *
+ * Converts a character to the titlecase.
+ *
+ * If @c is not an uppercase or lowercase character,
+ * @c is returned unchanged.
+ *
+ * Returns: the result of converting @c to titlecase.
+ */
+
+
+/**
+ * g_unichar_toupper:
+ * @c: a Unicode character
+ *
+ * Converts a character to uppercase.
+ *
+ * If @c is not an lowercase or titlecase character,
+ * or has no upper case equivalent @c is returned unchanged.
+ *
+ * Returns: the result of converting @c to uppercase.
+ */
+
+
+/**
+ * g_unichar_type:
+ * @c: a Unicode character
+ *
+ * Classifies a Unicode character by type.
+ *
+ * Returns: the type of the character.
+ */
+
+
+/**
+ * g_unichar_validate:
+ * @ch: a Unicode character
+ *
+ * Checks whether @ch is a valid Unicode character. Some possible
+ * integer values of @ch will not be valid. 0 is considered a valid
+ * character, though it's normally a string terminator.
+ *
+ * Returns: %TRUE if @ch is a valid Unicode character
+ */
+
+
+/**
+ * g_unichar_xdigit_value:
+ * @c: a Unicode character
+ *
+ * Determines the numeric value of a character as a hexidecimal
+ * digit.
+ *
+ * g_unichar_isxdigit()), its numeric value. Otherwise, -1.
+ *
+ * Returns: If @c is a hex digit (according to
+ */
+
+
+/**
+ * g_unicode_canonical_decomposition:
+ * @ch: a Unicode character.
+ * @result_len: location to store the length of the return value.
+ *
+ * Computes the canonical decomposition of a Unicode character.
+ *
+ * @result_len is set to the resulting length of the string.
+ *
+ * instead.
+ *
+ * Returns: a newly allocated string of Unicode characters.
+ * Deprecated: 2.30: Use the more flexible g_unichar_fully_decompose()
+ */
+
+
+/**
+ * g_unicode_canonical_ordering:
+ * @string: a UCS-4 encoded string.
+ * @len: the maximum length of @string to use.
+ *
+ * Computes the canonical ordering of a string in-place.
+ * This rearranges decomposed characters in the string
+ * according to their combining classes.  See the Unicode
+ * manual for more information.
+ */
+
+
+/**
+ * g_unicode_script_from_iso15924:
+ * @iso15924: a Unicode script
+ *
+ * Looks up the Unicode script for @iso15924.  ISO 15924 assigns four-letter
+ * codes to scripts.  For example, the code for Arabic is 'Arab'.
+ * This function accepts four letter codes encoded as a @guint32 in a
+ * big-endian fashion.  That is, the code expected for Arabic is
+ * 0x41726162 (0x41 is ASCII code for 'A', 0x72 is ASCII code for 'r', etc).
+ *
+ * See <ulink url="http://unicode.org/iso15924/codelists.html">Codes for the
+ * representation of names of scripts</ulink> for details.
+ *
+ * of %G_UNICODE_SCRIPT_INVALID_CODE if @iso15924 is zero and
+ * %G_UNICODE_SCRIPT_UNKNOWN if @iso15924 is unknown.
+ *
+ * Returns: the Unicode script for @iso15924, or
+ * Since: 2.30
+ */
+
+
+/**
+ * g_unicode_script_to_iso15924:
+ * @script: a Unicode script
+ *
+ * Looks up the ISO 15924 code for @script.  ISO 15924 assigns four-letter
+ * codes to scripts.  For example, the code for Arabic is 'Arab'.  The
+ * four letter codes are encoded as a @guint32 by this function in a
+ * big-endian fashion.  That is, the code returned for Arabic is
+ * 0x41726162 (0x41 is ASCII code for 'A', 0x72 is ASCII code for 'r', etc).
+ *
+ * See <ulink url="http://unicode.org/iso15924/codelists.html">Codes for the
+ * representation of names of scripts</ulink> for details.
+ *
+ * of zero if @script is %G_UNICODE_SCRIPT_INVALID_CODE or
+ * ISO 15924 code 'Zzzz' (script code for UNKNOWN) if @script is not understood.
+ *
+ * Returns: the ISO 15924 code for @script, encoded as an integer,
+ * Since: 2.30
+ */
+
+
+/**
+ * g_unix_open_pipe:
+ * @fds: Array of two integers
+ * @flags: Bitfield of file descriptor flags, see "man 2 fcntl"
+ * @error: a #GError
+ *
+ * Similar to the UNIX pipe() call, but on modern systems like Linux
+ * uses the pipe2() system call, which atomically creates a pipe with
+ * the configured flags.  The only supported flag currently is
+ * <literal>FD_CLOEXEC</literal>.  If for example you want to configure
+ * <literal>O_NONBLOCK</literal>, that must still be done separately with
+ * fcntl().
+ *
+ * <note>This function does *not* take <literal>O_CLOEXEC</literal>, it takes
+ * <literal>FD_CLOEXEC</literal> as if for fcntl(); these are
+ * different on Linux/glibc.</note>
+ *
+ * Returns: %TRUE on success, %FALSE if not (and errno will be set).
+ * Since: 2.30
+ */
+
+
+/**
+ * g_unix_set_fd_nonblocking:
+ * @fd: A file descriptor
+ * @nonblock: If %TRUE, set the descriptor to be non-blocking
+ * @error: a #GError
+ *
+ * Control the non-blocking state of the given file descriptor,
+ * according to @nonblock.  On most systems this uses <literal>O_NONBLOCK</literal>, but
+ * on some older ones may use <literal>O_NDELAY</literal>.
+ *
+ * Returns: %TRUE if successful
+ * Since: 2.30
+ */
+
+
+/**
+ * g_unix_signal_add:
+ * @signum: Signal number
+ * @handler: Callback
+ * @user_data: Data for @handler
+ *
+ * A convenience function for g_unix_signal_source_new(), which
+ * attaches to the default #GMainContext.  You can remove the watch
+ * using g_source_remove().
+ *
+ * Returns: An ID (greater than 0) for the event source
+ * Since: 2.30
+ */
+
+
+/**
+ * g_unix_signal_add_full:
+ * @priority: the priority of the signal source. Typically this will be in the range between #G_PRIORITY_DEFAULT and #G_PRIORITY_HIGH.
+ * @signum: Signal number
+ * @handler: Callback
+ * @user_data: Data for @handler
+ * @notify: #GDestroyNotify for @handler
+ *
+ * A convenience function for g_unix_signal_source_new(), which
+ * attaches to the default #GMainContext.  You can remove the watch
+ * using g_source_remove().
+ *
+ * Returns: An ID (greater than 0) for the event source
+ * Since: 2.30
+ */
+
+
+/**
+ * g_unix_signal_source_new:
+ * @signum: A signal number
+ *
+ * Create a #GSource that will be dispatched upon delivery of the UNIX
+ * signal @signum.  Currently only <literal>SIGHUP</literal>,
+ * <literal>SIGINT</literal>, and <literal>SIGTERM</literal> can
+ * be monitored.  Note that unlike the UNIX default, all sources which
+ * have created a watch will be dispatched, regardless of which
+ * underlying thread invoked g_unix_signal_source_new().
+ *
+ * For example, an effective use of this function is to handle <literal>SIGTERM</literal>
+ * cleanly; flushing any outstanding files, and then calling
+ * g_main_loop_quit ().  It is not safe to do any of this a regular
+ * UNIX signal handler; your handler may be invoked while malloc() or
+ * another library function is running, causing reentrancy if you
+ * attempt to use it from the handler.  None of the GLib/GObject API
+ * is safe against this kind of reentrancy.
+ *
+ * The interaction of this source when combined with native UNIX
+ * functions like sigprocmask() is not defined.
+ *
+ * The source will not initially be associated with any #GMainContext
+ * and must be added to one with g_source_attach() before it will be
+ * executed.
+ *
+ * Returns: A newly created #GSource
+ * Since: 2.30
+ */
+
+
+/**
+ * g_unlink:
+ * @filename: a pathname in the GLib file name encoding (UTF-8 on Windows)
+ *
+ * A wrapper for the POSIX unlink() function. The unlink() function
+ * deletes a name from the filesystem. If this was the last link to the
+ * file and no processes have it opened, the diskspace occupied by the
+ * file is freed.
+ *
+ * See your C library manual for more details about unlink(). Note
+ * that on Windows, it is in general not possible to delete files that
+ * are open to some process, or mapped into memory.
+ *
+ * occurred
+ *
+ * Returns: 0 if the name was successfully deleted, -1 if an error
+ * Since: 2.6
+ */
+
+
+/**
+ * g_unsetenv:
+ * @variable: the environment variable to remove, must not contain '='
+ *
+ * Removes an environment variable from the environment.
+ *
+ * Note that on some systems, when variables are overwritten, the
+ * memory used for the previous variables and its value isn't reclaimed.
+ *
+ * <warning><para>
+ * Environment variable handling in UNIX is not thread-safe, and your
+ * program may crash if one thread calls g_unsetenv() while another
+ * thread is calling getenv(). (And note that many functions, such as
+ * gettext(), call getenv() internally.) This function is only safe
+ * to use at the very start of your program, before creating any other
+ * threads (or creating objects that create worker threads of their
+ * own).
+ * </para><para>
+ * If you need to set up the environment for a child process, you can
+ * use g_get_environ() to get an environment array, modify that with
+ * g_environ_setenv() and g_environ_unsetenv(), and then pass that
+ * array directly to execvpe(), g_spawn_async(), or the like.
+ * </para></warning>
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_uri_escape_string:
+ * @unescaped: the unescaped input string.
+ * @reserved_chars_allowed: a string of reserved characters that are allowed to be used, or %NULL.
+ * @allow_utf8: %TRUE if the result can include UTF-8 characters.
+ *
+ * Escapes a string for use in a URI.
+ *
+ * Normally all characters that are not "unreserved" (i.e. ASCII alphanumerical
+ * characters plus dash, dot, underscore and tilde) are escaped.
+ * But if you specify characters in @reserved_chars_allowed they are not
+ * escaped. This is useful for the "reserved" characters in the URI
+ * specification, since those are allowed unescaped in some portions of
+ * a URI.
+ *
+ * freed when no longer needed.
+ *
+ * Returns: an escaped version of @unescaped. The returned string should be
+ * Since: 2.16
+ */
+
+
+/**
+ * g_uri_list_extract_uris:
+ * @uri_list: an URI list
+ *
+ * Splits an URI list conforming to the text/uri-list
+ * mime type defined in RFC 2483 into individual URIs,
+ * discarding any comments. The URIs are not validated.
+ *
+ * strings holding the individual URIs. The array should
+ * be freed with g_strfreev().
+ *
+ * Returns: a newly allocated %NULL-terminated list of
+ * Since: 2.6
+ */
+
+
+/**
+ * g_uri_parse_scheme:
+ * @uri: a valid URI.
+ *
+ * Gets the scheme portion of a URI string. RFC 3986 decodes the scheme as:
+ * <programlisting>
+ * URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
+ * </programlisting>
+ * Common schemes include "file", "http", "svn+ssh", etc.
+ *
+ * The returned string should be freed when no longer needed.
+ *
+ * Returns: The "Scheme" component of the URI, or %NULL on error.
+ * Since: 2.16
+ */
+
+
+/**
+ * g_uri_unescape_segment:
+ * @escaped_string: (allow-none): A string, may be %NULL
+ * @escaped_string_end: (allow-none): Pointer to end of @escaped_string, may be %NULL
+ * @illegal_characters: (allow-none): An optional string of illegal characters not to be allowed, may be %NULL
+ *
+ * Unescapes a segment of an escaped string.
+ *
+ * If any of the characters in @illegal_characters or the character zero appears
+ * as an escaped character in @escaped_string then that is an error and %NULL
+ * will be returned. This is useful it you want to avoid for instance having a
+ * slash being expanded in an escaped path element, which might confuse pathname
+ * handling.
+ *
+ * The returned string should be freed when no longer needed.  As a
+ * special case if %NULL is given for @escaped_string, this function
+ * will return %NULL.
+ *
+ * Returns: an unescaped version of @escaped_string or %NULL on error.
+ * Since: 2.16
+ */
+
+
+/**
+ * g_uri_unescape_string:
+ * @escaped_string: an escaped string to be unescaped.
+ * @illegal_characters: an optional string of illegal characters not to be allowed.
+ *
+ * Unescapes a whole escaped string.
+ *
+ * If any of the characters in @illegal_characters or the character zero appears
+ * as an escaped character in @escaped_string then that is an error and %NULL
+ * will be returned. This is useful it you want to avoid for instance having a
+ * slash being expanded in an escaped path element, which might confuse pathname
+ * handling.
+ *
+ * should be freed when no longer needed.
+ *
+ * Returns: an unescaped version of @escaped_string. The returned string
+ * Since: 2.16
+ */
+
+
+/**
+ * g_usleep:
+ * @microseconds: number of microseconds to pause
+ *
+ * Pauses the current thread for the given number of microseconds.
+ *
+ * There are 1 million microseconds per second (represented by the
+ * #G_USEC_PER_SEC macro). g_usleep() may have limited precision,
+ * depending on hardware and operating system; don't rely on the exact
+ * length of the sleep.
+ */
+
+
+/**
+ * g_utf16_to_ucs4:
+ * @str: a UTF-16 encoded string
+ * @len: the maximum length (number of <type>gunichar2</type>) of @str to use. If @len < 0, then the string is nul-terminated.
+ * @items_read: (allow-none): location to store number of words read, or %NULL. If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will be returned in case @str contains a trailing partial character. If an error occurs then the index of the invalid input is stored here.
+ * @items_written: (allow-none): location to store number of characters written, or %NULL. The value stored here does not include the trailing 0 character.
+ * @error: location to store the error occurring, or %NULL to ignore errors. Any of the errors in #GConvertError other than %G_CONVERT_ERROR_NO_CONVERSION may occur.
+ *
+ * Convert a string from UTF-16 to UCS-4. The result will be
+ * nul-terminated.
+ *
+ * This value must be freed with g_free(). If an
+ * error occurs, %NULL will be returned and
+ * @error set.
+ *
+ * Returns: a pointer to a newly allocated UCS-4 string.
+ */
+
+
+/**
+ * g_utf16_to_utf8:
+ * @str: a UTF-16 encoded string
+ * @len: the maximum length (number of <type>gunichar2</type>) of @str to use. If @len < 0, then the string is nul-terminated.
+ * @items_read: (allow-none): location to store number of words read, or %NULL. If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will be returned in case @str contains a trailing partial character. If an error occurs then the index of the invalid input is stored here.
+ * @items_written: (allow-none): location to store number of bytes written, or %NULL. The value stored here does not include the trailing 0 byte.
+ * @error: location to store the error occurring, or %NULL to ignore errors. Any of the errors in #GConvertError other than %G_CONVERT_ERROR_NO_CONVERSION may occur.
+ *
+ * Convert a string from UTF-16 to UTF-8. The result will be
+ * terminated with a 0 byte.
+ *
+ * Note that the input is expected to be already in native endianness,
+ * an initial byte-order-mark character is not handled specially.
+ * g_convert() can be used to convert a byte buffer of UTF-16 data of
+ * ambiguous endianess.
+ *
+ * Further note that this function does not validate the result
+ * string; it may e.g. include embedded NUL characters. The only
+ * validation done by this function is to ensure that the input can
+ * be correctly interpreted as UTF-16, i.e. it doesn't contain
+ * things unpaired surrogates.
+ *
+ * This value must be freed with g_free(). If an
+ * error occurs, %NULL will be returned and
+ * @error set.
+ *
+ * Returns: a pointer to a newly allocated UTF-8 string.
+ */
+
+
+/**
+ * g_utf8_casefold:
+ * @str: a UTF-8 encoded string
+ * @len: length of @str, in bytes, or -1 if @str is nul-terminated.
+ *
+ * Converts a string into a form that is independent of case. The
+ * result will not correspond to any particular case, but can be
+ * compared for equality or ordered with the results of calling
+ * g_utf8_casefold() on other strings.
+ *
+ * Note that calling g_utf8_casefold() followed by g_utf8_collate() is
+ * only an approximation to the correct linguistic case insensitive
+ * ordering, though it is a fairly good one. Getting this exactly
+ * right would require a more sophisticated collation function that
+ * takes case sensitivity into account. GLib does not currently
+ * provide such a function.
+ *
+ * case independent form of @str.
+ *
+ * Returns: a newly allocated string, that is a
+ */
+
+
+/**
+ * g_utf8_collate:
+ * @str1: a UTF-8 encoded string
+ * @str2: a UTF-8 encoded string
+ *
+ * Compares two strings for ordering using the linguistically
+ * correct rules for the <link linkend="setlocale">current locale</link>.
+ * When sorting a large number of strings, it will be significantly
+ * faster to obtain collation keys with g_utf8_collate_key() and
+ * compare the keys with strcmp() when sorting instead of sorting
+ * the original strings.
+ *
+ * 0 if they compare equal, &gt; 0 if @str1 compares after @str2.
+ *
+ * Returns: &lt; 0 if @str1 compares before @str2,
+ */
+
+
+/**
+ * g_utf8_collate_key:
+ * @str: a UTF-8 encoded string.
+ * @len: length of @str, in bytes, or -1 if @str is nul-terminated.
+ *
+ * Converts a string into a collation key that can be compared
+ * with other collation keys produced by the same function using
+ * strcmp().
+ *
+ * The results of comparing the collation keys of two strings
+ * with strcmp() will always be the same as comparing the two
+ * original keys with g_utf8_collate().
+ *
+ * Note that this function depends on the
+ * <link linkend="setlocale">current locale</link>.
+ *
+ * be freed with g_free() when you are done with it.
+ *
+ * Returns: a newly allocated string. This string should
+ */
+
+
+/**
+ * g_utf8_collate_key_for_filename:
+ * @str: a UTF-8 encoded string.
+ * @len: length of @str, in bytes, or -1 if @str is nul-terminated.
+ *
+ * Converts a string into a collation key that can be compared
+ * with other collation keys produced by the same function using strcmp().
+ *
+ * In order to sort filenames correctly, this function treats the dot '.'
+ * as a special case. Most dictionary orderings seem to consider it
+ * insignificant, thus producing the ordering "event.c" "eventgenerator.c"
+ * "event.h" instead of "event.c" "event.h" "eventgenerator.c". Also, we
+ * would like to treat numbers intelligently so that "file1" "file10" "file5"
+ * is sorted as "file1" "file5" "file10".
+ *
+ * Note that this function depends on the
+ * <link linkend="setlocale">current locale</link>.
+ *
+ * be freed with g_free() when you are done with it.
+ *
+ * Returns: a newly allocated string. This string should
+ * Since: 2.8
+ */
+
+
+/**
+ * g_utf8_find_next_char:
+ * @p: a pointer to a position within a UTF-8 encoded string
+ * @end: a pointer to the byte following the end of the string, or %NULL to indicate that the string is nul-terminated.
+ *
+ * Finds the start of the next UTF-8 character in the string after @p.
+ *
+ * @p does not have to be at the beginning of a UTF-8 character. No check
+ * is made to see if the character found is actually valid other than
+ * it starts with an appropriate byte.
+ *
+ * Returns: a pointer to the found character or %NULL
+ */
+
+
+/**
+ * g_utf8_find_prev_char:
+ * @str: pointer to the beginning of a UTF-8 encoded string
+ * @p: pointer to some position within @str
+ *
+ * Given a position @p with a UTF-8 encoded string @str, find the start
+ * of the previous UTF-8 character starting before @p. Returns %NULL if no
+ * UTF-8 characters are present in @str before @p.
+ *
+ * @p does not have to be at the beginning of a UTF-8 character. No check
+ * is made to see if the character found is actually valid other than
+ * it starts with an appropriate byte.
+ *
+ * Returns: a pointer to the found character or %NULL.
+ */
+
+
+/**
+ * g_utf8_get_char:
+ * @p: a pointer to Unicode character encoded as UTF-8
+ *
+ * Converts a sequence of bytes encoded as UTF-8 to a Unicode character.
+ * If @p does not point to a valid UTF-8 encoded character, results are
+ * undefined. If you are not sure that the bytes are complete
+ * valid Unicode characters, you should use g_utf8_get_char_validated()
+ * instead.
+ *
+ * Returns: the resulting character
+ */
+
+
+/**
+ * g_utf8_get_char_validated:
+ * @p: a pointer to Unicode character encoded as UTF-8
+ * @max_len: the maximum number of bytes to read, or -1, for no maximum or if @p is nul-terminated
+ *
+ * Convert a sequence of bytes encoded as UTF-8 to a Unicode character.
+ * This function checks for incomplete characters, for invalid characters
+ * such as characters that are out of the range of Unicode, and for
+ * overlong encodings of valid characters.
+ *
+ * sequence at the end of a string that could begin a valid
+ * character (or if @max_len is zero), returns (gunichar)-2;
+ * otherwise, if @p does not point to a valid UTF-8 encoded
+ * Unicode character, returns (gunichar)-1.
+ *
+ * Returns: the resulting character. If @p points to a partial
+ */
+
+
+/**
+ * g_utf8_next_char:
+ * @p: Pointer to the start of a valid UTF-8 character
+ *
+ * Skips to the next character in a UTF-8 string. The string must be
+ * valid; this macro is as fast as possible, and has no error-checking.
+ * You would use this macro to iterate over a string character by
+ * character. The macro returns the start of the next UTF-8 character.
+ * Before using this macro, use g_utf8_validate() to validate strings
+ * that may contain invalid UTF-8.
+ */
+
+
+/**
+ * g_utf8_normalize:
+ * @str: a UTF-8 encoded string.
+ * @len: length of @str, in bytes, or -1 if @str is nul-terminated.
+ * @mode: the type of normalization to perform.
+ *
+ * Converts a string into canonical form, standardizing
+ * such issues as whether a character with an accent
+ * is represented as a base character and combining
+ * accent or as a single precomposed character. The
+ * string has to be valid UTF-8, otherwise %NULL is
+ * returned. You should generally call g_utf8_normalize()
+ * before comparing two Unicode strings.
+ *
+ * The normalization mode %G_NORMALIZE_DEFAULT only
+ * standardizes differences that do not affect the
+ * text content, such as the above-mentioned accent
+ * representation. %G_NORMALIZE_ALL also standardizes
+ * the "compatibility" characters in Unicode, such
+ * as SUPERSCRIPT THREE to the standard forms
+ * (in this case DIGIT THREE). Formatting information
+ * may be lost but for most text operations such
+ * characters should be considered the same.
+ *
+ * %G_NORMALIZE_DEFAULT_COMPOSE and %G_NORMALIZE_ALL_COMPOSE
+ * are like %G_NORMALIZE_DEFAULT and %G_NORMALIZE_ALL,
+ * but returned a result with composed forms rather
+ * than a maximally decomposed form. This is often
+ * useful if you intend to convert the string to
+ * a legacy encoding or pass it to a system with
+ * less capable Unicode handling.
+ *
+ * normalized form of @str, or %NULL if @str is not
+ * valid UTF-8.
+ *
+ * Returns: a newly allocated string, that is the
+ */
+
+
+/**
+ * g_utf8_offset_to_pointer:
+ * @str: a UTF-8 encoded string
+ * @offset: a character offset within @str
+ *
+ * Converts from an integer character offset to a pointer to a position
+ * within the string.
+ *
+ * Since 2.10, this function allows to pass a negative @offset to
+ * step backwards. It is usually worth stepping backwards from the end
+ * instead of forwards if @offset is in the last fourth of the string,
+ * since moving forward is about 3 times faster than moving backward.
+ *
+ * <note><para>
+ * This function doesn't abort when reaching the end of @str. Therefore
+ * you should be sure that @offset is within string boundaries before
+ * calling that function. Call g_utf8_strlen() when unsure.
+ *
+ * This limitation exists as this function is called frequently during
+ * text rendering and therefore has to be as fast as possible.
+ * </para></note>
+ *
+ * Returns: the resulting pointer
+ */
+
+
+/**
+ * g_utf8_pointer_to_offset:
+ * @str: a UTF-8 encoded string
+ * @pos: a pointer to a position within @str
+ *
+ * Converts from a pointer to position within a string to a integer
+ * character offset.
+ *
+ * Since 2.10, this function allows @pos to be before @str, and returns
+ * a negative offset in this case.
+ *
+ * Returns: the resulting character offset
+ */
+
+
+/**
+ * g_utf8_prev_char:
+ * @p: a pointer to a position within a UTF-8 encoded string
+ *
+ * Finds the previous UTF-8 character in the string before @p.
+ *
+ * @p does not have to be at the beginning of a UTF-8 character. No check
+ * is made to see if the character found is actually valid other than
+ * it starts with an appropriate byte. If @p might be the first
+ * character of the string, you must use g_utf8_find_prev_char() instead.
+ *
+ * Returns: a pointer to the found character.
+ */
+
+
+/**
+ * g_utf8_strchr:
+ * @p: a nul-terminated UTF-8 encoded string
+ * @len: the maximum length of @p
+ * @c: a Unicode character
+ *
+ * Finds the leftmost occurrence of the given Unicode character
+ * in a UTF-8 encoded string, while limiting the search to @len bytes.
+ * If @len is -1, allow unbounded search.
+ *
+ * otherwise, a pointer to the start of the leftmost occurrence of
+ * the character in the string.
+ *
+ * Returns: %NULL if the string does not contain the character,
+ */
+
+
+/**
+ * g_utf8_strdown:
+ * @str: a UTF-8 encoded string
+ * @len: length of @str, in bytes, or -1 if @str is nul-terminated.
+ *
+ * Converts all Unicode characters in the string that have a case
+ * to lowercase. The exact manner that this is done depends
+ * on the current locale, and may result in the number of
+ * characters in the string changing.
+ *
+ * converted to lowercase.
+ *
+ * Returns: a newly allocated string, with all characters
+ */
+
+
+/**
+ * g_utf8_strlen:
+ * @p: pointer to the start of a UTF-8 encoded string
+ * @max: the maximum number of bytes to examine. If @max is less than 0, then the string is assumed to be nul-terminated. If @max is 0, @p will not be examined and may be %NULL. If @max is greater than 0, up to @max bytes are examined
+ *
+ * Computes the length of the string in characters, not including
+ * the terminating nul character. If the @max'th byte falls in the
+ * middle of a character, the last (partial) character is not counted.
+ *
+ * Returns: the length of the string in characters
+ */
+
+
+/**
+ * g_utf8_strncpy:
+ * @dest: buffer to fill with characters from @src
+ * @src: UTF-8 encoded string
+ * @n: character count
+ *
+ * Like the standard C strncpy() function, but
+ * copies a given number of characters instead of a given number of
+ * bytes. The @src string must be valid UTF-8 encoded text.
+ * (Use g_utf8_validate() on all text before trying to use UTF-8
+ * utility functions with it.)
+ *
+ * Returns: @dest
+ */
+
+
+/**
+ * g_utf8_strrchr:
+ * @p: a nul-terminated UTF-8 encoded string
+ * @len: the maximum length of @p
+ * @c: a Unicode character
+ *
+ * Find the rightmost occurrence of the given Unicode character
+ * in a UTF-8 encoded string, while limiting the search to @len bytes.
+ * If @len is -1, allow unbounded search.
+ *
+ * otherwise, a pointer to the start of the rightmost occurrence of the
+ * character in the string.
+ *
+ * Returns: %NULL if the string does not contain the character,
+ */
+
+
+/**
+ * g_utf8_strreverse:
+ * @str: a UTF-8 encoded string
+ * @len: the maximum length of @str to use, in bytes. If @len < 0, then the string is nul-terminated.
+ *
+ * Reverses a UTF-8 string. @str must be valid UTF-8 encoded text.
+ * (Use g_utf8_validate() on all text before trying to use UTF-8
+ * utility functions with it.)
+ *
+ * This function is intended for programmatic uses of reversed strings.
+ * It pays no attention to decomposed characters, combining marks, byte
+ * order marks, directional indicators (LRM, LRO, etc) and similar
+ * characters which might need special handling when reversing a string
+ * for display purposes.
+ *
+ * Note that unlike g_strreverse(), this function returns
+ * newly-allocated memory, which should be freed with g_free() when
+ * no longer needed.
+ *
+ * Returns: a newly-allocated string which is the reverse of @str.
+ * Since: 2.2
+ */
+
+
+/**
+ * g_utf8_strup:
+ * @str: a UTF-8 encoded string
+ * @len: length of @str, in bytes, or -1 if @str is nul-terminated.
+ *
+ * Converts all Unicode characters in the string that have a case
+ * to uppercase. The exact manner that this is done depends
+ * on the current locale, and may result in the number of
+ * characters in the string increasing. (For instance, the
+ * German ess-zet will be changed to SS.)
+ *
+ * converted to uppercase.
+ *
+ * Returns: a newly allocated string, with all characters
+ */
+
+
+/**
+ * g_utf8_substring:
+ * @str: a UTF-8 encoded string
+ * @start_pos: a character offset within @str
+ * @end_pos: another character offset within @str
+ *
+ * Copies a substring out of a UTF-8 encoded string.
+ * The substring will contain @end_pos - @start_pos
+ * characters.
+ *
+ * substring. Free with g_free() when no longer needed.
+ *
+ * Returns: a newly allocated copy of the requested
+ * Since: 2.30
+ */
+
+
+/**
+ * g_utf8_to_ucs4:
+ * @str: a UTF-8 encoded string
+ * @len: the maximum length of @str to use, in bytes. If @len < 0, then the string is nul-terminated.
+ * @items_read: (allow-none): location to store number of bytes read, or %NULL. If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will be returned in case @str contains a trailing partial character. If an error occurs then the index of the invalid input is stored here.
+ * @items_written: (allow-none): location to store number of characters written or %NULL. The value here stored does not include the trailing 0 character.
+ * @error: location to store the error occurring, or %NULL to ignore errors. Any of the errors in #GConvertError other than %G_CONVERT_ERROR_NO_CONVERSION may occur.
+ *
+ * Convert a string from UTF-8 to a 32-bit fixed width
+ * representation as UCS-4. A trailing 0 character will be added to the
+ * string after the converted text.
+ *
+ * This value must be freed with g_free(). If an
+ * error occurs, %NULL will be returned and
+ * @error set.
+ *
+ * Returns: a pointer to a newly allocated UCS-4 string.
+ */
+
+
+/**
+ * g_utf8_to_ucs4_fast:
+ * @str: a UTF-8 encoded string
+ * @len: the maximum length of @str to use, in bytes. If @len < 0, then the string is nul-terminated.
+ * @items_written: (allow-none): location to store the number of characters in the result, or %NULL.
+ *
+ * Convert a string from UTF-8 to a 32-bit fixed width
+ * representation as UCS-4, assuming valid UTF-8 input.
+ * This function is roughly twice as fast as g_utf8_to_ucs4()
+ * but does no error checking on the input. A trailing 0 character
+ * will be added to the string after the converted text.
+ *
+ * This value must be freed with g_free().
+ *
+ * Returns: a pointer to a newly allocated UCS-4 string.
+ */
+
+
+/**
+ * g_utf8_to_utf16:
+ * @str: a UTF-8 encoded string
+ * @len: the maximum length (number of bytes) of @str to use. If @len < 0, then the string is nul-terminated.
+ * @items_read: (allow-none): location to store number of bytes read, or %NULL. If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will be returned in case @str contains a trailing partial character. If an error occurs then the index of the invalid input is stored here.
+ * @items_written: (allow-none): location to store number of <type>gunichar2</type> written, or %NULL. The value stored here does not include the trailing 0.
+ * @error: location to store the error occurring, or %NULL to ignore errors. Any of the errors in #GConvertError other than %G_CONVERT_ERROR_NO_CONVERSION may occur.
+ *
+ * Convert a string from UTF-8 to UTF-16. A 0 character will be
+ * added to the result after the converted text.
+ *
+ * This value must be freed with g_free(). If an
+ * error occurs, %NULL will be returned and
+ * @error set.
+ *
+ * Returns: a pointer to a newly allocated UTF-16 string.
+ */
+
+
+/**
+ * g_utf8_validate:
+ * @str: a pointer to character data
+ * @max_len: max bytes to validate, or -1 to go until NUL
+ * @end: (allow-none) (out): return location for end of valid data
+ *
+ * Validates UTF-8 encoded text. @str is the text to validate;
+ * if @str is nul-terminated, then @max_len can be -1, otherwise
+ * @max_len should be the number of bytes to validate.
+ * If @end is non-%NULL, then the end of the valid range
+ * will be stored there (i.e. the start of the first invalid
+ * character if some bytes were invalid, or the end of the text
+ * being validated otherwise).
+ *
+ * Note that g_utf8_validate() returns %FALSE if @max_len is
+ * positive and any of the @max_len bytes are NUL.
+ *
+ * Returns %TRUE if all of @str was valid. Many GLib and GTK+
+ * routines <emphasis>require</emphasis> valid UTF-8 as input;
+ * so data read from a file or the network should be checked
+ * with g_utf8_validate() before doing anything else with it.
+ *
+ * Returns: %TRUE if the text was valid UTF-8
+ */
+
+
+/**
+ * g_utime:
+ * @filename: a pathname in the GLib file name encoding (UTF-8 on Windows)
+ * @utb: a pointer to a struct utimbuf.
+ *
+ * A wrapper for the POSIX utime() function. The utime() function
+ * sets the access and modification timestamps of a file.
+ *
+ * See your C library manual for more details about how utime() works
+ * on your system.
+ *
+ * occurred
+ *
+ * Returns: 0 if the operation was successful, -1 if an error
+ * Since: 2.18
+ */
+
+
+/**
+ * g_variant_builder_add: (skp)
+ * @builder: a #GVariantBuilder
+ * @format_string: a #GVariant varargs format string
+ * @...: arguments, as per @format_string
+ *
+ * Adds to a #GVariantBuilder.
+ *
+ * This call is a convenience wrapper that is exactly equivalent to
+ * calling g_variant_new() followed by g_variant_builder_add_value().
+ *
+ * This function might be used as follows:
+ *
+ * <programlisting>
+ * GVariant *
+ * make_pointless_dictionary (void)
+ * {
+ * GVariantBuilder *builder;
+ * int i;
+ *
+ * builder = g_variant_builder_new (G_VARIANT_TYPE_ARRAY);
+ * for (i = 0; i < 16; i++)
+ * {
+ * gchar buf[3];
+ *
+ * sprintf (buf, "%d", i);
+ * g_variant_builder_add (builder, "{is}", i, buf);
+ * }
+ *
+ * return g_variant_builder_end (builder);
+ * }
+ * </programlisting>
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_builder_add_parsed:
+ * @builder: a #GVariantBuilder
+ * @format: a text format #GVariant
+ * @...: arguments as per @format
+ *
+ * Adds to a #GVariantBuilder.
+ *
+ * This call is a convenience wrapper that is exactly equivalent to
+ * calling g_variant_new_parsed() followed by
+ * g_variant_builder_add_value().
+ *
+ * This function might be used as follows:
+ *
+ * <programlisting>
+ * GVariant *
+ * make_pointless_dictionary (void)
+ * {
+ * GVariantBuilder *builder;
+ * int i;
+ *
+ * builder = g_variant_builder_new (G_VARIANT_TYPE_ARRAY);
+ * g_variant_builder_add_parsed (builder, "{'width', <%i>}", 600);
+ * g_variant_builder_add_parsed (builder, "{'title', <%s>}", "foo");
+ * g_variant_builder_add_parsed (builder, "{'transparency', <0.5>}");
+ * return g_variant_builder_end (builder);
+ * }
+ * </programlisting>
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_variant_builder_add_value:
+ * @builder: a #GVariantBuilder
+ * @value: a #GVariant
+ *
+ * Adds @value to @builder.
+ *
+ * It is an error to call this function in any way that would create an
+ * inconsistent value to be constructed.  Some examples of this are
+ * putting different types of items into an array, putting the wrong
+ * types or number of items in a tuple, putting more than one value into
+ * a variant, etc.
+ *
+ * If @value is a floating reference (see g_variant_ref_sink()),
+ * the @builder instance takes ownership of @value.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_builder_clear: (skip)
+ * @builder: a #GVariantBuilder
+ *
+ * Releases all memory associated with a #GVariantBuilder without
+ * freeing the #GVariantBuilder structure itself.
+ *
+ * It typically only makes sense to do this on a stack-allocated
+ * #GVariantBuilder if you want to abort building the value part-way
+ * through.  This function need not be called if you call
+ * g_variant_builder_end() and it also doesn't need to be called on
+ * builders allocated with g_variant_builder_new (see
+ * g_variant_builder_unref() for that).
+ *
+ * This function leaves the #GVariantBuilder structure set to all-zeros.
+ * It is valid to call this function on either an initialised
+ * #GVariantBuilder or one that is set to all-zeros but it is not valid
+ * to call this function on uninitialised memory.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_builder_close:
+ * @builder: a #GVariantBuilder
+ *
+ * Closes the subcontainer inside the given @builder that was opened by
+ * the most recent call to g_variant_builder_open().
+ *
+ * It is an error to call this function in any way that would create an
+ * inconsistent value to be constructed (ie: too few values added to the
+ * subcontainer).
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_builder_end:
+ * @builder: a #GVariantBuilder
+ *
+ * Ends the builder process and returns the constructed value.
+ *
+ * It is not permissible to use @builder in any way after this call
+ * except for reference counting operations (in the case of a
+ * heap-allocated #GVariantBuilder) or by reinitialising it with
+ * g_variant_builder_init() (in the case of stack-allocated).
+ *
+ * It is an error to call this function in any way that would create an
+ * inconsistent value to be constructed (ie: insufficient number of
+ * items added to a container with a specific number of children
+ * required).  It is also an error to call this function if the builder
+ * was created with an indefinite array or maybe type and no children
+ * have been added; in this case it is impossible to infer the type of
+ * the empty array.
+ *
+ * Returns: (transfer none): a new, floating, #GVariant
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_builder_init: (skip)
+ * @builder: a #GVariantBuilder
+ * @type: a container type
+ *
+ * Initialises a #GVariantBuilder structure.
+ *
+ * @type must be non-%NULL.  It specifies the type of container to
+ * construct.  It can be an indefinite type such as
+ * %G_VARIANT_TYPE_ARRAY or a definite type such as "as" or "(ii)".
+ * Maybe, array, tuple, dictionary entry and variant-typed values may be
+ * constructed.
+ *
+ * After the builder is initialised, values are added using
+ * g_variant_builder_add_value() or g_variant_builder_add().
+ *
+ * After all the child values are added, g_variant_builder_end() frees
+ * the memory associated with the builder and returns the #GVariant that
+ * was created.
+ *
+ * This function completely ignores the previous contents of @builder.
+ * On one hand this means that it is valid to pass in completely
+ * uninitialised memory.  On the other hand, this means that if you are
+ * initialising over top of an existing #GVariantBuilder you need to
+ * first call g_variant_builder_clear() in order to avoid leaking
+ * memory.
+ *
+ * You must not call g_variant_builder_ref() or
+ * g_variant_builder_unref() on a #GVariantBuilder that was initialised
+ * with this function.  If you ever pass a reference to a
+ * #GVariantBuilder outside of the control of your own code then you
+ * should assume that the person receiving that reference may try to use
+ * reference counting; you should use g_variant_builder_new() instead of
+ * this function.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_builder_new:
+ * @type: a container type
+ *
+ * Allocates and initialises a new #GVariantBuilder.
+ *
+ * You should call g_variant_builder_unref() on the return value when it
+ * is no longer needed.  The memory will not be automatically freed by
+ * any other call.
+ *
+ * In most cases it is easier to place a #GVariantBuilder directly on
+ * the stack of the calling function and initialise it with
+ * g_variant_builder_init().
+ *
+ * Returns: (transfer full): a #GVariantBuilder
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_builder_open:
+ * @builder: a #GVariantBuilder
+ * @type: a #GVariantType
+ *
+ * Opens a subcontainer inside the given @builder.  When done adding
+ * items to the subcontainer, g_variant_builder_close() must be called.
+ *
+ * It is an error to call this function in any way that would cause an
+ * inconsistent value to be constructed (ie: adding too many values or
+ * a value of an incorrect type).
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_builder_ref:
+ * @builder: a #GVariantBuilder allocated by g_variant_builder_new()
+ *
+ * Increases the reference count on @builder.
+ *
+ * Don't call this on stack-allocated #GVariantBuilder instances or bad
+ * things will happen.
+ *
+ * Returns: (transfer full): a new reference to @builder
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_builder_unref:
+ * @builder: (transfer full): a #GVariantBuilder allocated by g_variant_builder_new()
+ *
+ * Decreases the reference count on @builder.
+ *
+ * In the event that there are no more references, releases all memory
+ * associated with the #GVariantBuilder.
+ *
+ * Don't call this on stack-allocated #GVariantBuilder instances or bad
+ * things will happen.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_byteswap:
+ * @value: a #GVariant
+ *
+ * Performs a byteswapping operation on the contents of @value.  The
+ * result is that all multi-byte numeric data contained in @value is
+ * byteswapped.  That includes 16, 32, and 64bit signed and unsigned
+ * integers as well as file handles and double precision floating point
+ * values.
+ *
+ * This function is an identity mapping on any value that does not
+ * contain multi-byte numeric data.  That include strings, booleans,
+ * bytes and containers containing only these things (recursively).
+ *
+ * The returned value is always in normal form and is marked as trusted.
+ *
+ * Returns: (transfer full): the byteswapped form of @value
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_classify:
+ * @value: a #GVariant
+ *
+ * Classifies @value according to its top-level type.
+ *
+ * Returns: the #GVariantClass of @value
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_compare:
+ * @one: (type GVariant): a basic-typed #GVariant instance
+ * @two: (type GVariant): a #GVariant instance of the same type
+ *
+ * Compares @one and @two.
+ *
+ * The types of @one and @two are #gconstpointer only to allow use of
+ * this function with #GTree, #GPtrArray, etc.  They must each be a
+ * #GVariant.
+ *
+ * Comparison is only defined for basic types (ie: booleans, numbers,
+ * strings).  For booleans, %FALSE is less than %TRUE.  Numbers are
+ * ordered in the usual way.  Strings are in ASCII lexographical order.
+ *
+ * It is a programmer error to attempt to compare container values or
+ * two values that have types that are not exactly equal.  For example,
+ * you cannot compare a 32-bit signed integer with a 32-bit unsigned
+ * integer.  Also note that this function is not particularly
+ * well-behaved when it comes to comparison of doubles; in particular,
+ * the handling of incomparable values (ie: NaN) is undefined.
+ *
+ * If you only require an equality comparison, g_variant_equal() is more
+ * general.
+ *
+ * zero if a = b;
+ * positive value if a &gt; b.
+ *
+ * Returns: negative value if a &lt; b;
+ * Since: 2.26
+ */
+
+
+/**
+ * g_variant_dup_bytestring:
+ * @value: an array-of-bytes #GVariant instance
+ * @length: (out) (allow-none) (default NULL): a pointer to a #gsize, to store the length (not including the nul terminator)
+ *
+ * Similar to g_variant_get_bytestring() except that instead of
+ * returning a constant string, the string is duplicated.
+ *
+ * The return value must be freed using g_free().
+ *
+ * (element-type guint8): a newly allocated string
+ *
+ * Returns: (transfer full) (array zero-terminated=1 length=length)
+ * Since: 2.26
+ */
+
+
+/**
+ * g_variant_dup_bytestring_array:
+ * @value: an array of array of bytes #GVariant ('aay')
+ * @length: (out) (allow-none): the length of the result, or %NULL
+ *
+ * Gets the contents of an array of array of bytes #GVariant.  This call
+ * makes a deep copy; the return result should be released with
+ * g_strfreev().
+ *
+ * If @length is non-%NULL then the number of elements in the result is
+ * stored there.  In any case, the resulting array will be
+ * %NULL-terminated.
+ *
+ * For an empty array, @length will be set to 0 and a pointer to a
+ * %NULL pointer will be returned.
+ *
+ * Returns: (array length=length) (transfer full): an array of strings
+ * Since: 2.26
+ */
+
+
+/**
+ * g_variant_dup_objv:
+ * @value: an array of object paths #GVariant
+ * @length: (out) (allow-none): the length of the result, or %NULL
+ *
+ * Gets the contents of an array of object paths #GVariant.  This call
+ * makes a deep copy; the return result should be released with
+ * g_strfreev().
+ *
+ * If @length is non-%NULL then the number of elements in the result
+ * is stored there.  In any case, the resulting array will be
+ * %NULL-terminated.
+ *
+ * For an empty array, @length will be set to 0 and a pointer to a
+ * %NULL pointer will be returned.
+ *
+ * Returns: (array length=length zero-terminated=1) (transfer full): an array of strings
+ * Since: 2.30
+ */
+
+
+/**
+ * g_variant_dup_string:
+ * @value: a string #GVariant instance
+ * @length: (out): a pointer to a #gsize, to store the length
+ *
+ * Similar to g_variant_get_string() except that instead of returning
+ * a constant string, the string is duplicated.
+ *
+ * The string will always be utf8 encoded.
+ *
+ * The return value must be freed using g_free().
+ *
+ * Returns: (transfer full): a newly allocated string, utf8 encoded
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_dup_strv:
+ * @value: an array of strings #GVariant
+ * @length: (out) (allow-none): the length of the result, or %NULL
+ *
+ * Gets the contents of an array of strings #GVariant.  This call
+ * makes a deep copy; the return result should be released with
+ * g_strfreev().
+ *
+ * If @length is non-%NULL then the number of elements in the result
+ * is stored there.  In any case, the resulting array will be
+ * %NULL-terminated.
+ *
+ * For an empty array, @length will be set to 0 and a pointer to a
+ * %NULL pointer will be returned.
+ *
+ * Returns: (array length=length zero-terminated=1) (transfer full): an array of strings
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_equal:
+ * @one: (type GVariant): a #GVariant instance
+ * @two: (type GVariant): a #GVariant instance
+ *
+ * Checks if @one and @two have the same type and value.
+ *
+ * The types of @one and @two are #gconstpointer only to allow use of
+ * this function with #GHashTable.  They must each be a #GVariant.
+ *
+ * Returns: %TRUE if @one and @two are equal
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_get: (skip)
+ * @value: a #GVariant instance
+ * @format_string: a #GVariant format string
+ * @...: arguments, as per @format_string
+ *
+ * Deconstructs a #GVariant instance.
+ *
+ * Think of this function as an analogue to scanf().
+ *
+ * The arguments that are expected by this function are entirely
+ * determined by @format_string.  @format_string also restricts the
+ * permissible types of @value.  It is an error to give a value with
+ * an incompatible type.  See the section on <link
+ * linkend='gvariant-format-strings'>GVariant Format Strings</link>.
+ * Please note that the syntax of the format string is very likely to be
+ * extended in the future.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_get_boolean:
+ * @value: a boolean #GVariant instance
+ *
+ * Returns the boolean value of @value.
+ *
+ * It is an error to call this function with a @value of any type
+ * other than %G_VARIANT_TYPE_BOOLEAN.
+ *
+ * Returns: %TRUE or %FALSE
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_get_byte:
+ * @value: a byte #GVariant instance
+ *
+ * Returns the byte value of @value.
+ *
+ * It is an error to call this function with a @value of any type
+ * other than %G_VARIANT_TYPE_BYTE.
+ *
+ * Returns: a #guchar
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_get_bytestring:
+ * @value: an array-of-bytes #GVariant instance
+ *
+ * Returns the string value of a #GVariant instance with an
+ * array-of-bytes type.  The string has no particular encoding.
+ *
+ * If the array does not end with a nul terminator character, the empty
+ * string is returned.  For this reason, you can always trust that a
+ * non-%NULL nul-terminated string will be returned by this function.
+ *
+ * If the array contains a nul terminator character somewhere other than
+ * the last byte then the returned string is the string, up to the first
+ * such nul character.
+ *
+ * It is an error to call this function with a @value that is not an
+ * array of bytes.
+ *
+ * The return value remains valid as long as @value exists.
+ *
+ * the constant string
+ *
+ * Returns: (transfer none) (array zero-terminated=1) (element-type guint8):
+ * Since: 2.26
+ */
+
+
+/**
+ * g_variant_get_bytestring_array:
+ * @value: an array of array of bytes #GVariant ('aay')
+ * @length: (out) (allow-none): the length of the result, or %NULL
+ *
+ * Gets the contents of an array of array of bytes #GVariant.  This call
+ * makes a shallow copy; the return result should be released with
+ * g_free(), but the individual strings must not be modified.
+ *
+ * If @length is non-%NULL then the number of elements in the result is
+ * stored there.  In any case, the resulting array will be
+ * %NULL-terminated.
+ *
+ * For an empty array, @length will be set to 0 and a pointer to a
+ * %NULL pointer will be returned.
+ *
+ * Returns: (array length=length) (transfer container): an array of constant strings
+ * Since: 2.26
+ */
+
+
+/**
+ * g_variant_get_child: (skip)
+ * @value: a container #GVariant
+ * @index_: the index of the child to deconstruct
+ * @format_string: a #GVariant format string
+ * @...: arguments, as per @format_string
+ *
+ * Reads a child item out of a container #GVariant instance and
+ * deconstructs it according to @format_string.  This call is
+ * essentially a combination of g_variant_get_child_value() and
+ * g_variant_get().
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_get_child_value:
+ * @value: a container #GVariant
+ * @index_: the index of the child to fetch
+ *
+ * Reads a child item out of a container #GVariant instance.  This
+ * includes variants, maybes, arrays, tuples and dictionary
+ * entries.  It is an error to call this function on any other type of
+ * #GVariant.
+ *
+ * It is an error if @index_ is greater than the number of child items
+ * in the container.  See g_variant_n_children().
+ *
+ * The returned value is never floating.  You should free it with
+ * g_variant_unref() when you're done with it.
+ *
+ * This function is O(1).
+ *
+ * Returns: (transfer full): the child at the specified index
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_get_data:
+ * @value: a #GVariant instance
+ *
+ * Returns a pointer to the serialised form of a #GVariant instance.
+ * The returned data may not be in fully-normalised form if read from an
+ * untrusted source.  The returned data must not be freed; it remains
+ * valid for as long as @value exists.
+ *
+ * If @value is a fixed-sized value that was deserialised from a
+ * corrupted serialised container then %NULL may be returned.  In this
+ * case, the proper thing to do is typically to use the appropriate
+ * number of nul bytes in place of @value.  If @value is not fixed-sized
+ * then %NULL is never returned.
+ *
+ * In the case that @value is already in serialised form, this function
+ * is O(1).  If the value is not already in serialised form,
+ * serialisation occurs implicitly and is approximately O(n) in the size
+ * of the result.
+ *
+ * To deserialise the data returned by this function, in addition to the
+ * serialised data, you must know the type of the #GVariant, and (if the
+ * machine might be different) the endianness of the machine that stored
+ * it. As a result, file formats or network messages that incorporate
+ * serialised #GVariant<!---->s must include this information either
+ * implicitly (for instance "the file always contains a
+ * %G_VARIANT_TYPE_VARIANT and it is always in little-endian order") or
+ * explicitly (by storing the type and/or endianness in addition to the
+ * serialised data).
+ *
+ * Returns: (transfer none): the serialised form of @value, or %NULL
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_get_double:
+ * @value: a double #GVariant instance
+ *
+ * Returns the double precision floating point value of @value.
+ *
+ * It is an error to call this function with a @value of any type
+ * other than %G_VARIANT_TYPE_DOUBLE.
+ *
+ * Returns: a #gdouble
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_get_fixed_array:
+ * @value: a #GVariant array with fixed-sized elements
+ * @n_elements: (out): a pointer to the location to store the number of items
+ * @element_size: the size of each element
+ *
+ * Provides access to the serialised data for an array of fixed-sized
+ * items.
+ *
+ * @value must be an array with fixed-sized elements.  Numeric types are
+ * fixed-size, as are tuples containing only other fixed-sized types.
+ *
+ * @element_size must be the size of a single element in the array,
+ * as given by the section on
+ * <link linkend='gvariant-serialised-data-memory'>Serialised Data
+ * Memory</link>.
+ *
+ * In particular, arrays of these fixed-sized types can be interpreted
+ * as an array of the given C type, with @element_size set to
+ * <code>sizeof</code> the appropriate type:
+ *
+ * <informaltable>
+ * <tgroup cols='2'>
+ * <thead><row><entry>element type</entry> <entry>C type</entry></row></thead>
+ * <tbody>
+ * <row><entry>%G_VARIANT_TYPE_INT16 (etc.)</entry>
+ * <entry>#gint16 (etc.)</entry></row>
+ * <row><entry>%G_VARIANT_TYPE_BOOLEAN</entry>
+ * <entry>#guchar (not #gboolean!)</entry></row>
+ * <row><entry>%G_VARIANT_TYPE_BYTE</entry> <entry>#guchar</entry></row>
+ * <row><entry>%G_VARIANT_TYPE_HANDLE</entry> <entry>#guint32</entry></row>
+ * <row><entry>%G_VARIANT_TYPE_DOUBLE</entry> <entry>#gdouble</entry></row>
+ * </tbody>
+ * </tgroup>
+ * </informaltable>
+ *
+ * For example, if calling this function for an array of 32 bit integers,
+ * you might say <code>sizeof (gint32)</code>.  This value isn't used
+ * except for the purpose of a double-check that the form of the
+ * serialised data matches the caller's expectation.
+ *
+ * @n_elements, which must be non-%NULL is set equal to the number of
+ * items in the array.
+ *
+ * the fixed array
+ *
+ * Returns: (array length=n_elements) (transfer none): a pointer to
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_get_handle:
+ * @value: a handle #GVariant instance
+ *
+ * Returns the 32-bit signed integer value of @value.
+ *
+ * It is an error to call this function with a @value of any type other
+ * than %G_VARIANT_TYPE_HANDLE.
+ *
+ * By convention, handles are indexes into an array of file descriptors
+ * that are sent alongside a D-Bus message.  If you're not interacting
+ * with D-Bus, you probably don't need them.
+ *
+ * Returns: a #gint32
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_get_int16:
+ * @value: a int16 #GVariant instance
+ *
+ * Returns the 16-bit signed integer value of @value.
+ *
+ * It is an error to call this function with a @value of any type
+ * other than %G_VARIANT_TYPE_INT16.
+ *
+ * Returns: a #gint16
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_get_int32:
+ * @value: a int32 #GVariant instance
+ *
+ * Returns the 32-bit signed integer value of @value.
+ *
+ * It is an error to call this function with a @value of any type
+ * other than %G_VARIANT_TYPE_INT32.
+ *
+ * Returns: a #gint32
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_get_int64:
+ * @value: a int64 #GVariant instance
+ *
+ * Returns the 64-bit signed integer value of @value.
+ *
+ * It is an error to call this function with a @value of any type
+ * other than %G_VARIANT_TYPE_INT64.
+ *
+ * Returns: a #gint64
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_get_maybe:
+ * @value: a maybe-typed value
+ *
+ * Given a maybe-typed #GVariant instance, extract its value.  If the
+ * value is Nothing, then this function returns %NULL.
+ *
+ * Returns: (allow-none) (transfer full): the contents of @value, or %NULL
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_get_normal_form:
+ * @value: a #GVariant
+ *
+ * Gets a #GVariant instance that has the same value as @value and is
+ * trusted to be in normal form.
+ *
+ * If @value is already trusted to be in normal form then a new
+ * reference to @value is returned.
+ *
+ * If @value is not already trusted, then it is scanned to check if it
+ * is in normal form.  If it is found to be in normal form then it is
+ * marked as trusted and a new reference to it is returned.
+ *
+ * If @value is found not to be in normal form then a new trusted
+ * #GVariant is created with the same value as @value.
+ *
+ * It makes sense to call this function if you've received #GVariant
+ * data from untrusted sources and you want to ensure your serialised
+ * output is definitely in normal form.
+ *
+ * Returns: (transfer full): a trusted #GVariant
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_get_objv:
+ * @value: an array of object paths #GVariant
+ * @length: (out) (allow-none): the length of the result, or %NULL
+ *
+ * Gets the contents of an array of object paths #GVariant.  This call
+ * makes a shallow copy; the return result should be released with
+ * g_free(), but the individual strings must not be modified.
+ *
+ * If @length is non-%NULL then the number of elements in the result
+ * is stored there.  In any case, the resulting array will be
+ * %NULL-terminated.
+ *
+ * For an empty array, @length will be set to 0 and a pointer to a
+ * %NULL pointer will be returned.
+ *
+ * Returns: (array length=length zero-terminated=1) (transfer container): an array of constant strings
+ * Since: 2.30
+ */
+
+
+/**
+ * g_variant_get_size:
+ * @value: a #GVariant instance
+ *
+ * Determines the number of bytes that would be required to store @value
+ * with g_variant_store().
+ *
+ * If @value has a fixed-sized type then this function always returned
+ * that fixed size.
+ *
+ * In the case that @value is already in serialised form or the size has
+ * already been calculated (ie: this function has been called before)
+ * then this function is O(1).  Otherwise, the size is calculated, an
+ * operation which is approximately O(n) in the number of values
+ * involved.
+ *
+ * Returns: the serialised size of @value
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_get_string:
+ * @value: a string #GVariant instance
+ * @length: (allow-none) (default 0) (out): a pointer to a #gsize, to store the length
+ *
+ * Returns the string value of a #GVariant instance with a string
+ * type.  This includes the types %G_VARIANT_TYPE_STRING,
+ * %G_VARIANT_TYPE_OBJECT_PATH and %G_VARIANT_TYPE_SIGNATURE.
+ *
+ * The string will always be utf8 encoded.
+ *
+ * If @length is non-%NULL then the length of the string (in bytes) is
+ * returned there.  For trusted values, this information is already
+ * known.  For untrusted values, a strlen() will be performed.
+ *
+ * It is an error to call this function with a @value of any type
+ * other than those three.
+ *
+ * The return value remains valid as long as @value exists.
+ *
+ * Returns: (transfer none): the constant string, utf8 encoded
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_get_strv:
+ * @value: an array of strings #GVariant
+ * @length: (out) (allow-none): the length of the result, or %NULL
+ *
+ * Gets the contents of an array of strings #GVariant.  This call
+ * makes a shallow copy; the return result should be released with
+ * g_free(), but the individual strings must not be modified.
+ *
+ * If @length is non-%NULL then the number of elements in the result
+ * is stored there.  In any case, the resulting array will be
+ * %NULL-terminated.
+ *
+ * For an empty array, @length will be set to 0 and a pointer to a
+ * %NULL pointer will be returned.
+ *
+ * Returns: (array length=length zero-terminated=1) (transfer container): an array of constant strings
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_get_type:
+ * @value: a #GVariant
+ *
+ * Determines the type of @value.
+ *
+ * The return value is valid for the lifetime of @value and must not
+ * be freed.
+ *
+ * Returns: a #GVariantType
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_get_type_string:
+ * @value: a #GVariant
+ *
+ * Returns the type string of @value.  Unlike the result of calling
+ * g_variant_type_peek_string(), this string is nul-terminated.  This
+ * string belongs to #GVariant and must not be freed.
+ *
+ * Returns: the type string for the type of @value
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_get_uint16:
+ * @value: a uint16 #GVariant instance
+ *
+ * Returns the 16-bit unsigned integer value of @value.
+ *
+ * It is an error to call this function with a @value of any type
+ * other than %G_VARIANT_TYPE_UINT16.
+ *
+ * Returns: a #guint16
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_get_uint32:
+ * @value: a uint32 #GVariant instance
+ *
+ * Returns the 32-bit unsigned integer value of @value.
+ *
+ * It is an error to call this function with a @value of any type
+ * other than %G_VARIANT_TYPE_UINT32.
+ *
+ * Returns: a #guint32
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_get_uint64:
+ * @value: a uint64 #GVariant instance
+ *
+ * Returns the 64-bit unsigned integer value of @value.
+ *
+ * It is an error to call this function with a @value of any type
+ * other than %G_VARIANT_TYPE_UINT64.
+ *
+ * Returns: a #guint64
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_get_va: (skip)
+ * @value: a #GVariant
+ * @format_string: a string that is prefixed with a format string
+ * @endptr: (allow-none) (default NULL): location to store the end pointer, or %NULL
+ * @app: a pointer to a #va_list
+ *
+ * This function is intended to be used by libraries based on #GVariant
+ * that want to provide g_variant_get()-like functionality to their
+ * users.
+ *
+ * The API is more general than g_variant_get() to allow a wider range
+ * of possible uses.
+ *
+ * @format_string must still point to a valid format string, but it only
+ * need to be nul-terminated if @endptr is %NULL.  If @endptr is
+ * non-%NULL then it is updated to point to the first character past the
+ * end of the format string.
+ *
+ * @app is a pointer to a #va_list.  The arguments, according to
+ * @format_string, are collected from this #va_list and the list is left
+ * pointing to the argument following the last.
+ *
+ * These two generalisations allow mixing of multiple calls to
+ * g_variant_new_va() and g_variant_get_va() within a single actual
+ * varargs call by the user.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_get_variant:
+ * @value: a variant #GVariant instance
+ *
+ * Unboxes @value.  The result is the #GVariant instance that was
+ * contained in @value.
+ *
+ * Returns: (transfer full): the item contained in the variant
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_hash:
+ * @value: (type GVariant): a basic #GVariant value as a #gconstpointer
+ *
+ * Generates a hash value for a #GVariant instance.
+ *
+ * The output of this function is guaranteed to be the same for a given
+ * value only per-process.  It may change between different processor
+ * architectures or even different versions of GLib.  Do not use this
+ * function as a basis for building protocols or file formats.
+ *
+ * The type of @value is #gconstpointer only to allow use of this
+ * function with #GHashTable.  @value must be a #GVariant.
+ *
+ * Returns: a hash value corresponding to @value
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_is_container:
+ * @value: a #GVariant instance
+ *
+ * Checks if @value is a container.
+ *
+ * Returns: %TRUE if @value is a container
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_is_floating:
+ * @value: a #GVariant
+ *
+ * Checks whether @value has a floating reference count.
+ *
+ * This function should only ever be used to assert that a given variant
+ * is or is not floating, or for debug purposes. To acquire a reference
+ * to a variant that might be floating, always use g_variant_ref_sink()
+ * or g_variant_take_ref().
+ *
+ * See g_variant_ref_sink() for more information about floating reference
+ * counts.
+ *
+ * Returns: whether @value is floating
+ * Since: 2.26
+ */
+
+
+/**
+ * g_variant_is_normal_form:
+ * @value: a #GVariant instance
+ *
+ * Checks if @value is in normal form.
+ *
+ * The main reason to do this is to detect if a given chunk of
+ * serialised data is in normal form: load the data into a #GVariant
+ * using g_variant_new_from_data() and then use this function to
+ * check.
+ *
+ * If @value is found to be in normal form then it will be marked as
+ * being trusted.  If the value was already marked as being trusted then
+ * this function will immediately return %TRUE.
+ *
+ * Returns: %TRUE if @value is in normal form
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_is_object_path:
+ * @string: a normal C nul-terminated string
+ *
+ * Determines if a given string is a valid D-Bus object path.  You
+ * should ensure that a string is a valid D-Bus object path before
+ * passing it to g_variant_new_object_path().
+ *
+ * A valid object path starts with '/' followed by zero or more
+ * sequences of characters separated by '/' characters.  Each sequence
+ * must contain only the characters "[A-Z][a-z][0-9]_".  No sequence
+ * (including the one following the final '/' character) may be empty.
+ *
+ * Returns: %TRUE if @string is a D-Bus object path
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_is_of_type:
+ * @value: a #GVariant instance
+ * @type: a #GVariantType
+ *
+ * Checks if a value has a type matching the provided type.
+ *
+ * Returns: %TRUE if the type of @value matches @type
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_is_signature:
+ * @string: a normal C nul-terminated string
+ *
+ * Determines if a given string is a valid D-Bus type signature.  You
+ * should ensure that a string is a valid D-Bus type signature before
+ * passing it to g_variant_new_signature().
+ *
+ * D-Bus type signatures consist of zero or more definite #GVariantType
+ * strings in sequence.
+ *
+ * Returns: %TRUE if @string is a D-Bus type signature
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_iter_copy:
+ * @iter: a #GVariantIter
+ *
+ * Creates a new heap-allocated #GVariantIter to iterate over the
+ * container that was being iterated over by @iter.  Iteration begins on
+ * the new iterator from the current position of the old iterator but
+ * the two copies are independent past that point.
+ *
+ * Use g_variant_iter_free() to free the return value when you no longer
+ * need it.
+ *
+ * A reference is taken to the container that @iter is iterating over
+ * and will be releated only when g_variant_iter_free() is called.
+ *
+ * Returns: (transfer full): a new heap-allocated #GVariantIter
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_iter_free:
+ * @iter: (transfer full): a heap-allocated #GVariantIter
+ *
+ * Frees a heap-allocated #GVariantIter.  Only call this function on
+ * iterators that were returned by g_variant_iter_new() or
+ * g_variant_iter_copy().
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_iter_init: (skip)
+ * @iter: a pointer to a #GVariantIter
+ * @value: a container #GVariant
+ *
+ * Initialises (without allocating) a #GVariantIter.  @iter may be
+ * completely uninitialised prior to this call; its old value is
+ * ignored.
+ *
+ * The iterator remains valid for as long as @value exists, and need not
+ * be freed in any way.
+ *
+ * Returns: the number of items in @value
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_iter_loop: (skip)
+ * @iter: a #GVariantIter
+ * @format_string: a GVariant format string
+ * @...: the arguments to unpack the value into
+ *
+ * Gets the next item in the container and unpacks it into the variable
+ * argument list according to @format_string, returning %TRUE.
+ *
+ * If no more items remain then %FALSE is returned.
+ *
+ * On the first call to this function, the pointers appearing on the
+ * variable argument list are assumed to point at uninitialised memory.
+ * On the second and later calls, it is assumed that the same pointers
+ * will be given and that they will point to the memory as set by the
+ * previous call to this function.  This allows the previous values to
+ * be freed, as appropriate.
+ *
+ * This function is intended to be used with a while loop as
+ * demonstrated in the following example.  This function can only be
+ * used when iterating over an array.  It is only valid to call this
+ * function with a string constant for the format string and the same
+ * string constant must be used each time.  Mixing calls to this
+ * function and g_variant_iter_next() or g_variant_iter_next_value() on
+ * the same iterator causes undefined behavior.
+ *
+ * If you break out of a such a while loop using g_variant_iter_loop() then
+ * you must free or unreference all the unpacked values as you would with
+ * g_variant_get(). Failure to do so will cause a memory leak.
+ *
+ * See the section on <link linkend='gvariant-format-strings'>GVariant
+ * Format Strings</link>.
+ *
+ * <example>
+ * <title>Memory management with g_variant_iter_loop()</title>
+ * <programlisting>
+ * /<!-- -->* Iterates a dictionary of type 'a{sv}' *<!-- -->/
+ * void
+ * iterate_dictionary (GVariant *dictionary)
+ * {
+ * GVariantIter iter;
+ * GVariant *value;
+ * gchar *key;
+ *
+ * g_variant_iter_init (&iter, dictionary);
+ * while (g_variant_iter_loop (&iter, "{sv}", &key, &value))
+ * {
+ * g_print ("Item '%s' has type '%s'\n", key,
+ * g_variant_get_type_string (value));
+ *
+ * /<!-- -->* no need to free 'key' and 'value' here *<!-- -->/
+ * /<!-- -->* unless breaking out of this loop *<!-- -->/
+ * }
+ * }
+ * </programlisting>
+ * </example>
+ *
+ * For most cases you should use g_variant_iter_next().
+ *
+ * This function is really only useful when unpacking into #GVariant or
+ * #GVariantIter in order to allow you to skip the call to
+ * g_variant_unref() or g_variant_iter_free().
+ *
+ * For example, if you are only looping over simple integer and string
+ * types, g_variant_iter_next() is definitely preferred.  For string
+ * types, use the '&' prefix to avoid allocating any memory at all (and
+ * thereby avoiding the need to free anything as well).
+ *
+ * value
+ *
+ * Returns: %TRUE if a value was unpacked, or %FALSE if there was no
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_iter_n_children:
+ * @iter: a #GVariantIter
+ *
+ * Queries the number of child items in the container that we are
+ * iterating over.  This is the total number of items -- not the number
+ * of items remaining.
+ *
+ * This function might be useful for preallocation of arrays.
+ *
+ * Returns: the number of children in the container
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_iter_new:
+ * @value: a container #GVariant
+ *
+ * Creates a heap-allocated #GVariantIter for iterating over the items
+ * in @value.
+ *
+ * Use g_variant_iter_free() to free the return value when you no longer
+ * need it.
+ *
+ * A reference is taken to @value and will be released only when
+ * g_variant_iter_free() is called.
+ *
+ * Returns: (transfer full): a new heap-allocated #GVariantIter
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_iter_next: (skip)
+ * @iter: a #GVariantIter
+ * @format_string: a GVariant format string
+ * @...: the arguments to unpack the value into
+ *
+ * Gets the next item in the container and unpacks it into the variable
+ * argument list according to @format_string, returning %TRUE.
+ *
+ * If no more items remain then %FALSE is returned.
+ *
+ * All of the pointers given on the variable arguments list of this
+ * function are assumed to point at uninitialised memory.  It is the
+ * responsibility of the caller to free all of the values returned by
+ * the unpacking process.
+ *
+ * See the section on <link linkend='gvariant-format-strings'>GVariant
+ * Format Strings</link>.
+ *
+ * <example>
+ * <title>Memory management with g_variant_iter_next()</title>
+ * <programlisting>
+ * /<!-- -->* Iterates a dictionary of type 'a{sv}' *<!-- -->/
+ * void
+ * iterate_dictionary (GVariant *dictionary)
+ * {
+ * GVariantIter iter;
+ * GVariant *value;
+ * gchar *key;
+ *
+ * g_variant_iter_init (&iter, dictionary);
+ * while (g_variant_iter_next (&iter, "{sv}", &key, &value))
+ * {
+ * g_print ("Item '%s' has type '%s'\n", key,
+ * g_variant_get_type_string (value));
+ *
+ * /<!-- -->* must free data for ourselves *<!-- -->/
+ * g_variant_unref (value);
+ * g_free (key);
+ * }
+ * }
+ * </programlisting>
+ * </example>
+ *
+ * For a solution that is likely to be more convenient to C programmers
+ * when dealing with loops, see g_variant_iter_loop().
+ *
+ * Returns: %TRUE if a value was unpacked, or %FALSE if there as no value
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_iter_next_value:
+ * @iter: a #GVariantIter
+ *
+ * Gets the next item in the container.  If no more items remain then
+ * %NULL is returned.
+ *
+ * Use g_variant_unref() to drop your reference on the return value when
+ * you no longer need it.
+ *
+ * <example>
+ * <title>Iterating with g_variant_iter_next_value()</title>
+ * <programlisting>
+ * /<!-- -->* recursively iterate a container *<!-- -->/
+ * void
+ * iterate_container_recursive (GVariant *container)
+ * {
+ * GVariantIter iter;
+ * GVariant *child;
+ *
+ * g_variant_iter_init (&iter, container);
+ * while ((child = g_variant_iter_next_value (&iter)))
+ * {
+ * g_print ("type '%s'\n", g_variant_get_type_string (child));
+ *
+ * if (g_variant_is_container (child))
+ * iterate_container_recursive (child);
+ *
+ * g_variant_unref (child);
+ * }
+ * }
+ * </programlisting>
+ * </example>
+ *
+ * Returns: (allow-none) (transfer full): a #GVariant, or %NULL
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_lookup: (skip)
+ * @dictionary: a dictionary #GVariant
+ * @key: the key to lookup in the dictionary
+ * @format_string: a GVariant format string
+ * @...: the arguments to unpack the value into
+ *
+ * Looks up a value in a dictionary #GVariant.
+ *
+ * This function is a wrapper around g_variant_lookup_value() and
+ * g_variant_get().  In the case that %NULL would have been returned,
+ * this function returns %FALSE.  Otherwise, it unpacks the returned
+ * value and returns %TRUE.
+ *
+ * See g_variant_get() for information about @format_string.
+ *
+ * Returns: %TRUE if a value was unpacked
+ * Since: 2.28
+ */
+
+
+/**
+ * g_variant_lookup_value:
+ * @dictionary: a dictionary #GVariant
+ * @key: the key to lookup in the dictionary
+ * @expected_type: (allow-none): a #GVariantType, or %NULL
+ *
+ * Looks up a value in a dictionary #GVariant.
+ *
+ * This function works with dictionaries of the type
+ * <literal>a{s*}</literal> (and equally well with type
+ * <literal>a{o*}</literal>, but we only further discuss the string case
+ * for sake of clarity).
+ *
+ * In the event that @dictionary has the type <literal>a{sv}</literal>,
+ * the @expected_type string specifies what type of value is expected to
+ * be inside of the variant.  If the value inside the variant has a
+ * different type then %NULL is returned.  In the event that @dictionary
+ * has a value type other than <literal>v</literal> then @expected_type
+ * must directly match the key type and it is used to unpack the value
+ * directly or an error occurs.
+ *
+ * In either case, if @key is not found in @dictionary, %NULL is
+ * returned.
+ *
+ * If the key is found and the value has the correct type, it is
+ * returned.  If @expected_type was specified then any non-%NULL return
+ * value will have this type.
+ *
+ * Returns: (transfer full): the value of the dictionary key, or %NULL
+ * Since: 2.28
+ */
+
+
+/**
+ * g_variant_n_children:
+ * @value: a container #GVariant
+ *
+ * Determines the number of children in a container #GVariant instance.
+ * This includes variants, maybes, arrays, tuples and dictionary
+ * entries.  It is an error to call this function on any other type of
+ * #GVariant.
+ *
+ * For variants, the return value is always 1.  For values with maybe
+ * types, it is always zero or one.  For arrays, it is the length of the
+ * array.  For tuples it is the number of tuple items (which depends
+ * only on the type).  For dictionary entries, it is always 2
+ *
+ * This function is O(1).
+ *
+ * Returns: the number of children in the container
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_new: (skip)
+ * @format_string: a #GVariant format string
+ * @...: arguments, as per @format_string
+ *
+ * Creates a new #GVariant instance.
+ *
+ * Think of this function as an analogue to g_strdup_printf().
+ *
+ * The type of the created instance and the arguments that are
+ * expected by this function are determined by @format_string.  See the
+ * section on <link linkend='gvariant-format-strings'>GVariant Format
+ * Strings</link>.  Please note that the syntax of the format string is
+ * very likely to be extended in the future.
+ *
+ * The first character of the format string must not be '*' '?' '@' or
+ * 'r'; in essence, a new #GVariant must always be constructed by this
+ * function (and not merely passed through it unmodified).
+ *
+ * Returns: a new floating #GVariant instance
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_new_array:
+ * @child_type: (allow-none): the element type of the new array
+ * @children: (allow-none) (array length=n_children): an array of #GVariant pointers, the children
+ * @n_children: the length of @children
+ *
+ * Creates a new #GVariant array from @children.
+ *
+ * @child_type must be non-%NULL if @n_children is zero.  Otherwise, the
+ * child type is determined by inspecting the first element of the
+ * @children array.  If @child_type is non-%NULL then it must be a
+ * definite type.
+ *
+ * The items of the array are taken from the @children array.  No entry
+ * in the @children array may be %NULL.
+ *
+ * All items in the array must have the same type, which must be the
+ * same as @child_type, if given.
+ *
+ * If the @children are floating references (see g_variant_ref_sink()), the
+ * new instance takes ownership of them as if via g_variant_ref_sink().
+ *
+ * Returns: (transfer none): a floating reference to a new #GVariant array
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_new_boolean:
+ * @value: a #gboolean value
+ *
+ * Creates a new boolean #GVariant instance -- either %TRUE or %FALSE.
+ *
+ * Returns: (transfer none): a floating reference to a new boolean #GVariant instance
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_new_byte:
+ * @value: a #guint8 value
+ *
+ * Creates a new byte #GVariant instance.
+ *
+ * Returns: (transfer none): a floating reference to a new byte #GVariant instance
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_new_bytestring:
+ * @string: (array zero-terminated=1) (element-type guint8): a normal nul-terminated string in no particular encoding
+ *
+ * Creates an array-of-bytes #GVariant with the contents of @string.
+ * This function is just like g_variant_new_string() except that the
+ * string need not be valid utf8.
+ *
+ * The nul terminator character at the end of the string is stored in
+ * the array.
+ *
+ * Returns: (transfer none): a floating reference to a new bytestring #GVariant instance
+ * Since: 2.26
+ */
+
+
+/**
+ * g_variant_new_bytestring_array:
+ * @strv: (array length=length): an array of strings
+ * @length: the length of @strv, or -1
+ *
+ * Constructs an array of bytestring #GVariant from the given array of
+ * strings.
+ *
+ * If @length is -1 then @strv is %NULL-terminated.
+ *
+ * Returns: (transfer none): a new floating #GVariant instance
+ * Since: 2.26
+ */
+
+
+/**
+ * g_variant_new_dict_entry: (constructor)
+ * @key: a basic #GVariant, the key
+ * @value: a #GVariant, the value
+ *
+ * Creates a new dictionary entry #GVariant. @key and @value must be
+ * non-%NULL. @key must be a value of a basic type (ie: not a container).
+ *
+ * If the @key or @value are floating references (see g_variant_ref_sink()),
+ * the new instance takes ownership of them as if via g_variant_ref_sink().
+ *
+ * Returns: (transfer none): a floating reference to a new dictionary entry #GVariant
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_new_double:
+ * @value: a #gdouble floating point value
+ *
+ * Creates a new double #GVariant instance.
+ *
+ * Returns: (transfer none): a floating reference to a new double #GVariant instance
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_new_fixed_array:
+ * @element_type: the #GVariantType of each element
+ * @elements: a pointer to the fixed array of contiguous elements
+ * @n_elements: the number of elements
+ * @element_size: the size of each element
+ *
+ * Provides access to the serialised data for an array of fixed-sized
+ * items.
+ *
+ * @value must be an array with fixed-sized elements.  Numeric types are
+ * fixed-size as are tuples containing only other fixed-sized types.
+ *
+ * @element_size must be the size of a single element in the array.  For
+ * example, if calling this function for an array of 32 bit integers,
+ * you might say <code>sizeof (gint32)</code>.  This value isn't used
+ * except for the purpose of a double-check that the form of the
+ * serialised data matches the caller's expectation.
+ *
+ * @n_elements, which must be non-%NULL is set equal to the number of
+ * items in the array.
+ *
+ * Returns: (transfer none): a floating reference to a new array #GVariant instance
+ * Since: 2.32
+ */
+
+
+/**
+ * g_variant_new_from_data:
+ * @type: a definite #GVariantType
+ * @data: (array length=size) (element-type guint8): the serialised data
+ * @size: the size of @data
+ * @trusted: %TRUE if @data is definitely in normal form
+ * @notify: (scope async): function to call when @data is no longer needed
+ * @user_data: data for @notify
+ *
+ * Creates a new #GVariant instance from serialised data.
+ *
+ * @type is the type of #GVariant instance that will be constructed.
+ * The interpretation of @data depends on knowing the type.
+ *
+ * @data is not modified by this function and must remain valid with an
+ * unchanging value until such a time as @notify is called with
+ * @user_data.  If the contents of @data change before that time then
+ * the result is undefined.
+ *
+ * If @data is trusted to be serialised data in normal form then
+ * @trusted should be %TRUE.  This applies to serialised data created
+ * within this process or read from a trusted location on the disk (such
+ * as a file installed in /usr/lib alongside your application).  You
+ * should set trusted to %FALSE if @data is read from the network, a
+ * file in the user's home directory, etc.
+ *
+ * If @data was not stored in this machine's native endianness, any multi-byte
+ * numeric values in the returned variant will also be in non-native
+ * endianness. g_variant_byteswap() can be used to recover the original values.
+ *
+ * @notify will be called with @user_data when @data is no longer
+ * needed.  The exact time of this call is unspecified and might even be
+ * before this function returns.
+ *
+ * Returns: (transfer none): a new floating #GVariant of type @type
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_new_handle:
+ * @value: a #gint32 value
+ *
+ * Creates a new handle #GVariant instance.
+ *
+ * By convention, handles are indexes into an array of file descriptors
+ * that are sent alongside a D-Bus message.  If you're not interacting
+ * with D-Bus, you probably don't need them.
+ *
+ * Returns: (transfer none): a floating reference to a new handle #GVariant instance
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_new_int16:
+ * @value: a #gint16 value
+ *
+ * Creates a new int16 #GVariant instance.
+ *
+ * Returns: (transfer none): a floating reference to a new int16 #GVariant instance
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_new_int32:
+ * @value: a #gint32 value
+ *
+ * Creates a new int32 #GVariant instance.
+ *
+ * Returns: (transfer none): a floating reference to a new int32 #GVariant instance
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_new_int64:
+ * @value: a #gint64 value
+ *
+ * Creates a new int64 #GVariant instance.
+ *
+ * Returns: (transfer none): a floating reference to a new int64 #GVariant instance
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_new_maybe:
+ * @child_type: (allow-none): the #GVariantType of the child, or %NULL
+ * @child: (allow-none): the child value, or %NULL
+ *
+ * Depending on if @child is %NULL, either wraps @child inside of a
+ * maybe container or creates a Nothing instance for the given @type.
+ *
+ * At least one of @child_type and @child must be non-%NULL.
+ * If @child_type is non-%NULL then it must be a definite type.
+ * If they are both non-%NULL then @child_type must be the type
+ * of @child.
+ *
+ * If @child is a floating reference (see g_variant_ref_sink()), the new
+ * instance takes ownership of @child.
+ *
+ * Returns: (transfer none): a floating reference to a new #GVariant maybe instance
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_new_object_path:
+ * @object_path: a normal C nul-terminated string
+ *
+ * Creates a D-Bus object path #GVariant with the contents of @string.
+ * @string must be a valid D-Bus object path.  Use
+ * g_variant_is_object_path() if you're not sure.
+ *
+ * Returns: (transfer none): a floating reference to a new object path #GVariant instance
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_new_objv:
+ * @strv: (array length=length) (element-type utf8): an array of strings
+ * @length: the length of @strv, or -1
+ *
+ * Constructs an array of object paths #GVariant from the given array of
+ * strings.
+ *
+ * Each string must be a valid #GVariant object path; see
+ * g_variant_is_object_path().
+ *
+ * If @length is -1 then @strv is %NULL-terminated.
+ *
+ * Returns: (transfer none): a new floating #GVariant instance
+ * Since: 2.30
+ */
+
+
+/**
+ * g_variant_new_parsed:
+ * @format: a text format #GVariant
+ * @...: arguments as per @format
+ * @format must be a text format #GVariant with one extension: at any
+ *
+ * Parses @format and returns the result.
+ *
+ * point that a value may appear in the text, a '%' character followed
+ * by a GVariant format string (as per g_variant_new()) may appear.  In
+ * that case, the same arguments are collected from the argument list as
+ * g_variant_new() would have collected.
+ *
+ * Consider this simple example:
+ *
+ * <informalexample><programlisting>
+ * g_variant_new_parsed ("[('one', 1), ('two', %i), (%s, 3)]", 2, "three");
+ * </programlisting></informalexample>
+ *
+ * In the example, the variable argument parameters are collected and
+ * filled in as if they were part of the original string to produce the
+ * result of <code>[('one', 1), ('two', 2), ('three', 3)]</code>.
+ *
+ * This function is intended only to be used with @format as a string
+ * literal.  Any parse error is fatal to the calling process.  If you
+ * want to parse data from untrusted sources, use g_variant_parse().
+ *
+ * You may not use this function to return, unmodified, a single
+ * #GVariant pointer from the argument list.  ie: @format may not solely
+ * be anything along the lines of "%*", "%?", "\%r", or anything starting
+ * with "%@".
+ *
+ * Returns: a new floating #GVariant instance
+ */
+
+
+/**
+ * g_variant_new_parsed_va:
+ * @format: a text format #GVariant
+ * @app: a pointer to a #va_list
+ *
+ * Parses @format and returns the result.
+ *
+ * This is the version of g_variant_new_parsed() intended to be used
+ * from libraries.
+ *
+ * The return value will be floating if it was a newly created GVariant
+ * instance.  In the case that @format simply specified the collection
+ * of a #GVariant pointer (eg: @format was "%*") then the collected
+ * #GVariant pointer will be returned unmodified, without adding any
+ * additional references.
+ *
+ * In order to behave correctly in all cases it is necessary for the
+ * calling function to g_variant_ref_sink() the return result before
+ * returning control to the user that originally provided the pointer.
+ * At this point, the caller will have their own full reference to the
+ * result.  This can also be done by adding the result to a container,
+ * or by passing it to another g_variant_new() call.
+ *
+ * Returns: a new, usually floating, #GVariant
+ */
+
+
+/**
+ * g_variant_new_signature:
+ * @signature: a normal C nul-terminated string
+ *
+ * Creates a D-Bus type signature #GVariant with the contents of
+ * @string.  @string must be a valid D-Bus type signature.  Use
+ * g_variant_is_signature() if you're not sure.
+ *
+ * Returns: (transfer none): a floating reference to a new signature #GVariant instance
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_new_string:
+ * @string: a normal utf8 nul-terminated string
+ *
+ * Creates a string #GVariant with the contents of @string.
+ *
+ * @string must be valid utf8.
+ *
+ * Returns: (transfer none): a floating reference to a new string #GVariant instance
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_new_strv:
+ * @strv: (array length=length) (element-type utf8): an array of strings
+ * @length: the length of @strv, or -1
+ *
+ * Constructs an array of strings #GVariant from the given array of
+ * strings.
+ *
+ * If @length is -1 then @strv is %NULL-terminated.
+ *
+ * Returns: (transfer none): a new floating #GVariant instance
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_new_tuple:
+ * @children: (array length=n_children): the items to make the tuple out of
+ * @n_children: the length of @children
+ *
+ * Creates a new tuple #GVariant out of the items in @children.  The
+ * type is determined from the types of @children.  No entry in the
+ * @children array may be %NULL.
+ *
+ * If @n_children is 0 then the unit tuple is constructed.
+ *
+ * If the @children are floating references (see g_variant_ref_sink()), the
+ * new instance takes ownership of them as if via g_variant_ref_sink().
+ *
+ * Returns: (transfer none): a floating reference to a new #GVariant tuple
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_new_uint16:
+ * @value: a #guint16 value
+ *
+ * Creates a new uint16 #GVariant instance.
+ *
+ * Returns: (transfer none): a floating reference to a new uint16 #GVariant instance
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_new_uint32:
+ * @value: a #guint32 value
+ *
+ * Creates a new uint32 #GVariant instance.
+ *
+ * Returns: (transfer none): a floating reference to a new uint32 #GVariant instance
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_new_uint64:
+ * @value: a #guint64 value
+ *
+ * Creates a new uint64 #GVariant instance.
+ *
+ * Returns: (transfer none): a floating reference to a new uint64 #GVariant instance
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_new_va: (skip)
+ * @format_string: a string that is prefixed with a format string
+ * @endptr: (allow-none) (default NULL): location to store the end pointer, or %NULL
+ * @app: a pointer to a #va_list
+ *
+ * This function is intended to be used by libraries based on
+ * #GVariant that want to provide g_variant_new()-like functionality
+ * to their users.
+ *
+ * The API is more general than g_variant_new() to allow a wider range
+ * of possible uses.
+ *
+ * @format_string must still point to a valid format string, but it only
+ * needs to be nul-terminated if @endptr is %NULL.  If @endptr is
+ * non-%NULL then it is updated to point to the first character past the
+ * end of the format string.
+ *
+ * @app is a pointer to a #va_list.  The arguments, according to
+ * @format_string, are collected from this #va_list and the list is left
+ * pointing to the argument following the last.
+ *
+ * These two generalisations allow mixing of multiple calls to
+ * g_variant_new_va() and g_variant_get_va() within a single actual
+ * varargs call by the user.
+ *
+ * The return value will be floating if it was a newly created GVariant
+ * instance (for example, if the format string was "(ii)").  In the case
+ * that the format_string was '*', '?', 'r', or a format starting with
+ * '@' then the collected #GVariant pointer will be returned unmodified,
+ * without adding any additional references.
+ *
+ * In order to behave correctly in all cases it is necessary for the
+ * calling function to g_variant_ref_sink() the return result before
+ * returning control to the user that originally provided the pointer.
+ * At this point, the caller will have their own full reference to the
+ * result.  This can also be done by adding the result to a container,
+ * or by passing it to another g_variant_new() call.
+ *
+ * Returns: a new, usually floating, #GVariant
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_new_variant: (constructor)
+ * @value: a #GVariant instance
+ *
+ * Boxes @value.  The result is a #GVariant instance representing a
+ * variant containing the original value.
+ *
+ * If @child is a floating reference (see g_variant_ref_sink()), the new
+ * instance takes ownership of @child.
+ *
+ * Returns: (transfer none): a floating reference to a new variant #GVariant instance
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_parse:
+ * @type: (allow-none): a #GVariantType, or %NULL
+ * @text: a string containing a GVariant in text form
+ * @limit: (allow-none): a pointer to the end of @text, or %NULL
+ * @endptr: (allow-none): a location to store the end pointer, or %NULL
+ * @error: (allow-none): a pointer to a %NULL #GError pointer, or %NULL
+ * @Returns: a reference to a #GVariant, or %NULL
+ *
+ * Parses a #GVariant from a text representation.
+ *
+ * A single #GVariant is parsed from the content of @text.
+ *
+ * The format is described <link linkend='gvariant-text'>here</link>.
+ *
+ * The memory at @limit will never be accessed and the parser behaves as
+ * if the character at @limit is the nul terminator.  This has the
+ * effect of bounding @text.
+ *
+ * If @endptr is non-%NULL then @text is permitted to contain data
+ * following the value that this function parses and @endptr will be
+ * updated to point to the first character past the end of the text
+ * parsed by this function.  If @endptr is %NULL and there is extra data
+ * then an error is returned.
+ *
+ * If @type is non-%NULL then the value will be parsed to have that
+ * type.  This may result in additional parse errors (in the case that
+ * the parsed value doesn't fit the type) but may also result in fewer
+ * errors (in the case that the type would have been ambiguous, such as
+ * with empty arrays).
+ *
+ * In the event that the parsing is successful, the resulting #GVariant
+ * is returned.
+ *
+ * In case of any error, %NULL will be returned.  If @error is non-%NULL
+ * then it will be set to reflect the error that occurred.
+ *
+ * Officially, the language understood by the parser is "any string
+ * produced by g_variant_print()".
+ */
+
+
+/**
+ * g_variant_print:
+ * @value: a #GVariant
+ * @type_annotate: %TRUE if type information should be included in the output
+ *
+ * Pretty-prints @value in the format understood by g_variant_parse().
+ *
+ * The format is described <link linkend='gvariant-text'>here</link>.
+ *
+ * If @type_annotate is %TRUE, then type information is included in
+ * the output.
+ *
+ * Returns: (transfer full): a newly-allocated string holding the result.
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_print_string: (skip)
+ * @value: a #GVariant
+ * @string: (allow-none) (default NULL): a #GString, or %NULL
+ * @type_annotate: %TRUE if type information should be included in the output
+ *
+ * Behaves as g_variant_print(), but operates on a #GString.
+ *
+ * If @string is non-%NULL then it is appended to and returned.  Else,
+ * a new empty #GString is allocated and it is returned.
+ *
+ * Returns: a #GString containing the string
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_ref:
+ * @value: a #GVariant
+ *
+ * Increases the reference count of @value.
+ *
+ * Returns: the same @value
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_ref_sink:
+ * @value: a #GVariant
+ *
+ * #GVariant uses a floating reference count system.  All functions with
+ * names starting with <literal>g_variant_new_</literal> return floating
+ * references.
+ *
+ * Calling g_variant_ref_sink() on a #GVariant with a floating reference
+ * will convert the floating reference into a full reference.  Calling
+ * g_variant_ref_sink() on a non-floating #GVariant results in an
+ * additional normal reference being added.
+ *
+ * In other words, if the @value is floating, then this call "assumes
+ * ownership" of the floating reference, converting it to a normal
+ * reference.  If the @value is not floating, then this call adds a
+ * new normal reference increasing the reference count by one.
+ *
+ * All calls that result in a #GVariant instance being inserted into a
+ * container will call g_variant_ref_sink() on the instance.  This means
+ * that if the value was just created (and has only its floating
+ * reference) then the container will assume sole ownership of the value
+ * at that point and the caller will not need to unreference it.  This
+ * makes certain common styles of programming much easier while still
+ * maintaining normal refcounting semantics in situations where values
+ * are not floating.
+ *
+ * Returns: the same @value
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_store:
+ * @value: the #GVariant to store
+ * @data: the location to store the serialised data at
+ *
+ * Stores the serialised form of @value at @data.  @data should be
+ * large enough.  See g_variant_get_size().
+ *
+ * The stored data is in machine native byte order but may not be in
+ * fully-normalised form if read from an untrusted source.  See
+ * g_variant_get_normal_form() for a solution.
+ *
+ * As with g_variant_get_data(), to be able to deserialise the
+ * serialised variant successfully, its type and (if the destination
+ * machine might be different) its endianness must also be available.
+ *
+ * This function is approximately O(n) in the size of @data.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_take_ref:
+ * @value: a #GVariant
+ *
+ * If @value is floating, sink it.  Otherwise, do nothing.
+ *
+ * Typically you want to use g_variant_ref_sink() in order to
+ * automatically do the correct thing with respect to floating or
+ * non-floating references, but there is one specific scenario where
+ * this function is helpful.
+ *
+ * The situation where this function is helpful is when creating an API
+ * that allows the user to provide a callback function that returns a
+ * #GVariant.  We certainly want to allow the user the flexibility to
+ * return a non-floating reference from this callback (for the case
+ * where the value that is being returned already exists).
+ *
+ * At the same time, the style of the #GVariant API makes it likely that
+ * for newly-created #GVariant instances, the user can be saved some
+ * typing if they are allowed to return a #GVariant with a floating
+ * reference.
+ *
+ * Using this function on the return value of the user's callback allows
+ * the user to do whichever is more convenient for them.  The caller
+ * will alway receives exactly one full reference to the value: either
+ * the one that was returned in the first place, or a floating reference
+ * that has been converted to a full reference.
+ *
+ * This function has an odd interaction when combined with
+ * g_variant_ref_sink() running at the same time in another thread on
+ * the same #GVariant instance.  If g_variant_ref_sink() runs first then
+ * the result will be that the floating reference is converted to a hard
+ * reference.  If g_variant_take_ref() runs first then the result will
+ * be that the floating reference is converted to a hard reference and
+ * an additional reference on top of that one is added.  It is best to
+ * avoid this situation.
+ *
+ * Returns: the same @value
+ */
+
+
+/**
+ * g_variant_type_copy:
+ * @type: a #GVariantType
+ *
+ * Makes a copy of a #GVariantType.  It is appropriate to call
+ * g_variant_type_free() on the return value.  @type may not be %NULL.
+ *
+ *
+ * Since 2.24
+ *
+ * Returns: (transfer full): a new #GVariantType
+ */
+
+
+/**
+ * g_variant_type_dup_string:
+ * @type: a #GVariantType
+ *
+ * Returns a newly-allocated copy of the type string corresponding to
+ * @type.  The returned string is nul-terminated.  It is appropriate to
+ * call g_free() on the return value.
+ *
+ *
+ * Since 2.24
+ *
+ * Returns: (transfer full): the corresponding type string
+ */
+
+
+/**
+ * g_variant_type_element:
+ * @type: an array or maybe #GVariantType
+ *
+ * Determines the element type of an array or maybe type.
+ *
+ * This function may only be used with array or maybe types.
+ *
+ *
+ * Since 2.24
+ *
+ * Returns: (transfer none): the element type of @type
+ */
+
+
+/**
+ * g_variant_type_equal:
+ * @type1: (type GVariantType): a #GVariantType
+ * @type2: (type GVariantType): a #GVariantType
+ *
+ * Compares @type1 and @type2 for equality.
+ *
+ * Only returns %TRUE if the types are exactly equal.  Even if one type
+ * is an indefinite type and the other is a subtype of it, %FALSE will
+ * be returned if they are not exactly equal.  If you want to check for
+ * subtypes, use g_variant_type_is_subtype_of().
+ *
+ * The argument types of @type1 and @type2 are only #gconstpointer to
+ * allow use with #GHashTable without function pointer casting.  For
+ * both arguments, a valid #GVariantType must be provided.
+ *
+ *
+ * Since 2.24
+ *
+ * Returns: %TRUE if @type1 and @type2 are exactly equal
+ */
+
+
+/**
+ * g_variant_type_first:
+ * @type: a tuple or dictionary entry #GVariantType
+ *
+ * Determines the first item type of a tuple or dictionary entry
+ * type.
+ *
+ * This function may only be used with tuple or dictionary entry types,
+ * but must not be used with the generic tuple type
+ * %G_VARIANT_TYPE_TUPLE.
+ *
+ * In the case of a dictionary entry type, this returns the type of
+ * the key.
+ *
+ * %NULL is returned in case of @type being %G_VARIANT_TYPE_UNIT.
+ *
+ * This call, together with g_variant_type_next() provides an iterator
+ * interface over tuple and dictionary entry types.
+ *
+ *
+ * Since 2.24
+ *
+ * Returns: (transfer none): the first item type of @type, or %NULL
+ */
+
+
+/**
+ * g_variant_type_free:
+ * @type: (allow-none): a #GVariantType, or %NULL
+ *
+ * Frees a #GVariantType that was allocated with
+ * g_variant_type_copy(), g_variant_type_new() or one of the container
+ * type constructor functions.
+ *
+ * In the case that @type is %NULL, this function does nothing.
+ *
+ * Since 2.24
+ */
+
+
+/**
+ * g_variant_type_get_string_length:
+ * @type: a #GVariantType
+ *
+ * Returns the length of the type string corresponding to the given
+ * @type.  This function must be used to determine the valid extent of
+ * the memory region returned by g_variant_type_peek_string().
+ *
+ *
+ * Since 2.24
+ *
+ * Returns: the length of the corresponding type string
+ */
+
+
+/**
+ * g_variant_type_hash:
+ * @type: (type GVariantType): a #GVariantType
+ *
+ * Hashes @type.
+ *
+ * The argument type of @type is only #gconstpointer to allow use with
+ * #GHashTable without function pointer casting.  A valid
+ * #GVariantType must be provided.
+ *
+ *
+ * Since 2.24
+ *
+ * Returns: the hash value
+ */
+
+
+/**
+ * g_variant_type_is_array:
+ * @type: a #GVariantType
+ *
+ * Determines if the given @type is an array type.  This is true if the
+ * type string for @type starts with an 'a'.
+ *
+ * This function returns %TRUE for any indefinite type for which every
+ * definite subtype is an array type -- %G_VARIANT_TYPE_ARRAY, for
+ * example.
+ *
+ *
+ * Since 2.24
+ *
+ * Returns: %TRUE if @type is an array type
+ */
+
+
+/**
+ * g_variant_type_is_basic:
+ * @type: a #GVariantType
+ *
+ * Determines if the given @type is a basic type.
+ *
+ * Basic types are booleans, bytes, integers, doubles, strings, object
+ * paths and signatures.
+ *
+ * Only a basic type may be used as the key of a dictionary entry.
+ *
+ * This function returns %FALSE for all indefinite types except
+ * %G_VARIANT_TYPE_BASIC.
+ *
+ *
+ * Since 2.24
+ *
+ * Returns: %TRUE if @type is a basic type
+ */
+
+
+/**
+ * g_variant_type_is_container:
+ * @type: a #GVariantType
+ *
+ * Determines if the given @type is a container type.
+ *
+ * Container types are any array, maybe, tuple, or dictionary
+ * entry types plus the variant type.
+ *
+ * This function returns %TRUE for any indefinite type for which every
+ * definite subtype is a container -- %G_VARIANT_TYPE_ARRAY, for
+ * example.
+ *
+ *
+ * Since 2.24
+ *
+ * Returns: %TRUE if @type is a container type
+ */
+
+
+/**
+ * g_variant_type_is_definite:
+ * @type: a #GVariantType
+ *
+ * Determines if the given @type is definite (ie: not indefinite).
+ *
+ * A type is definite if its type string does not contain any indefinite
+ * type characters ('*', '?', or 'r').
+ *
+ * A #GVariant instance may not have an indefinite type, so calling
+ * this function on the result of g_variant_get_type() will always
+ * result in %TRUE being returned.  Calling this function on an
+ * indefinite type like %G_VARIANT_TYPE_ARRAY, however, will result in
+ * %FALSE being returned.
+ *
+ *
+ * Since 2.24
+ *
+ * Returns: %TRUE if @type is definite
+ */
+
+
+/**
+ * g_variant_type_is_dict_entry:
+ * @type: a #GVariantType
+ *
+ * Determines if the given @type is a dictionary entry type.  This is
+ * true if the type string for @type starts with a '{'.
+ *
+ * This function returns %TRUE for any indefinite type for which every
+ * definite subtype is a dictionary entry type --
+ * %G_VARIANT_TYPE_DICT_ENTRY, for example.
+ *
+ *
+ * Since 2.24
+ *
+ * Returns: %TRUE if @type is a dictionary entry type
+ */
+
+
+/**
+ * g_variant_type_is_maybe:
+ * @type: a #GVariantType
+ *
+ * Determines if the given @type is a maybe type.  This is true if the
+ * type string for @type starts with an 'm'.
+ *
+ * This function returns %TRUE for any indefinite type for which every
+ * definite subtype is a maybe type -- %G_VARIANT_TYPE_MAYBE, for
+ * example.
+ *
+ *
+ * Since 2.24
+ *
+ * Returns: %TRUE if @type is a maybe type
+ */
+
+
+/**
+ * g_variant_type_is_subtype_of:
+ * @type: a #GVariantType
+ * @supertype: a #GVariantType
+ *
+ * Checks if @type is a subtype of @supertype.
+ *
+ * This function returns %TRUE if @type is a subtype of @supertype.  All
+ * types are considered to be subtypes of themselves.  Aside from that,
+ * only indefinite types can have subtypes.
+ *
+ *
+ * Since 2.24
+ *
+ * Returns: %TRUE if @type is a subtype of @supertype
+ */
+
+
+/**
+ * g_variant_type_is_tuple:
+ * @type: a #GVariantType
+ *
+ * Determines if the given @type is a tuple type.  This is true if the
+ * type string for @type starts with a '(' or if @type is
+ * %G_VARIANT_TYPE_TUPLE.
+ *
+ * This function returns %TRUE for any indefinite type for which every
+ * definite subtype is a tuple type -- %G_VARIANT_TYPE_TUPLE, for
+ * example.
+ *
+ *
+ * Since 2.24
+ *
+ * Returns: %TRUE if @type is a tuple type
+ */
+
+
+/**
+ * g_variant_type_is_variant:
+ * @type: a #GVariantType
+ *
+ * Determines if the given @type is the variant type.
+ *
+ *
+ * Since 2.24
+ *
+ * Returns: %TRUE if @type is the variant type
+ */
+
+
+/**
+ * g_variant_type_key:
+ * @type: a dictionary entry #GVariantType
+ *
+ * Determines the key type of a dictionary entry type.
+ *
+ * This function may only be used with a dictionary entry type.  Other
+ * than the additional restriction, this call is equivalent to
+ * g_variant_type_first().
+ *
+ *
+ * Since 2.24
+ *
+ * Returns: (transfer none): the key type of the dictionary entry
+ */
+
+
+/**
+ * g_variant_type_n_items:
+ * @type: a tuple or dictionary entry #GVariantType
+ *
+ * Determines the number of items contained in a tuple or
+ * dictionary entry type.
+ *
+ * This function may only be used with tuple or dictionary entry types,
+ * but must not be used with the generic tuple type
+ * %G_VARIANT_TYPE_TUPLE.
+ *
+ * In the case of a dictionary entry type, this function will always
+ * return 2.
+ *
+ *
+ * Since 2.24
+ *
+ * Returns: the number of items in @type
+ */
+
+
+/**
+ * g_variant_type_new:
+ * @type_string: a valid GVariant type string
+ *
+ * Creates a new #GVariantType corresponding to the type string given
+ * by @type_string.  It is appropriate to call g_variant_type_free() on
+ * the return value.
+ *
+ * It is a programmer error to call this function with an invalid type
+ * string.  Use g_variant_type_string_is_valid() if you are unsure.
+ *
+ * Returns: (transfer full): a new #GVariantType
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_type_new_array:
+ * @element: a #GVariantType
+ *
+ * Constructs the type corresponding to an array of elements of the
+ * type @type.
+ *
+ * It is appropriate to call g_variant_type_free() on the return value.
+ *
+ *
+ * Since 2.24
+ *
+ * Returns: (transfer full): a new array #GVariantType
+ */
+
+
+/**
+ * g_variant_type_new_dict_entry:
+ * @key: a basic #GVariantType
+ * @value: a #GVariantType
+ *
+ * Constructs the type corresponding to a dictionary entry with a key
+ * of type @key and a value of type @value.
+ *
+ * It is appropriate to call g_variant_type_free() on the return value.
+ *
+ *
+ * Since 2.24
+ *
+ * Returns: (transfer full): a new dictionary entry #GVariantType
+ */
+
+
+/**
+ * g_variant_type_new_maybe:
+ * @element: a #GVariantType
+ *
+ * Constructs the type corresponding to a maybe instance containing
+ * type @type or Nothing.
+ *
+ * It is appropriate to call g_variant_type_free() on the return value.
+ *
+ *
+ * Since 2.24
+ *
+ * Returns: (transfer full): a new maybe #GVariantType
+ */
+
+
+/**
+ * g_variant_type_new_tuple:
+ * @items: (array length=length): an array of #GVariantTypes, one for each item
+ * @length: the length of @items, or -1
+ *
+ * Constructs a new tuple type, from @items.
+ *
+ * @length is the number of items in @items, or -1 to indicate that
+ * @items is %NULL-terminated.
+ *
+ * It is appropriate to call g_variant_type_free() on the return value.
+ *
+ *
+ * Since 2.24
+ *
+ * Returns: (transfer full): a new tuple #GVariantType
+ */
+
+
+/**
+ * g_variant_type_next:
+ * @type: a #GVariantType from a previous call
+ *
+ * Determines the next item type of a tuple or dictionary entry
+ * type.
+ *
+ * @type must be the result of a previous call to
+ * g_variant_type_first() or g_variant_type_next().
+ *
+ * If called on the key type of a dictionary entry then this call
+ * returns the value type.  If called on the value type of a dictionary
+ * entry then this call returns %NULL.
+ *
+ * For tuples, %NULL is returned when @type is the last item in a tuple.
+ *
+ *
+ * Since 2.24
+ *
+ * Returns: (transfer none): the next #GVariantType after @type, or %NULL
+ */
+
+
+/**
+ * g_variant_type_peek_string: (skip)
+ * @type: a #GVariantType
+ *
+ * Returns the type string corresponding to the given @type.  The
+ * result is not nul-terminated; in order to determine its length you
+ * must call g_variant_type_get_string_length().
+ *
+ * To get a nul-terminated string, see g_variant_type_dup_string().
+ *
+ *
+ * Since 2.24
+ *
+ * Returns: the corresponding type string (not nul-terminated)
+ */
+
+
+/**
+ * g_variant_type_string_is_valid:
+ * @type_string: a pointer to any string
+ *
+ * Checks if @type_string is a valid GVariant type string.  This call is
+ * equivalent to calling g_variant_type_string_scan() and confirming
+ * that the following character is a nul terminator.
+ *
+ *
+ * Since 2.24
+ *
+ * Returns: %TRUE if @type_string is exactly one valid type string
+ */
+
+
+/**
+ * g_variant_type_string_scan:
+ * @string: a pointer to any string
+ * @limit: (allow-none): the end of @string, or %NULL
+ * @endptr: (out) (allow-none): location to store the end pointer, or %NULL
+ *
+ * Scan for a single complete and valid GVariant type string in @string.
+ * The memory pointed to by @limit (or bytes beyond it) is never
+ * accessed.
+ *
+ * If a valid type string is found, @endptr is updated to point to the
+ * first character past the end of the string that was found and %TRUE
+ * is returned.
+ *
+ * If there is no valid type string starting at @string, or if the type
+ * string does not end before @limit then %FALSE is returned.
+ *
+ * For the simple case of checking if a string is a valid type string,
+ * see g_variant_type_string_is_valid().
+ *
+ * Returns: %TRUE if a valid type string was found
+ * Since: 2.24
+ */
+
+
+/**
+ * g_variant_type_value:
+ * @type: a dictionary entry #GVariantType
+ *
+ * Determines the value type of a dictionary entry type.
+ *
+ * This function may only be used with a dictionary entry type.
+ *
+ *
+ * Since 2.24
+ *
+ * Returns: (transfer none): the value type of the dictionary entry
+ */
+
+
+/**
+ * g_variant_unref:
+ * @value: a #GVariant
+ *
+ * Decreases the reference count of @value.  When its reference count
+ * drops to 0, the memory used by the variant is freed.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * g_vasprintf:
+ * @string: the return location for the newly-allocated string.
+ * @format: a standard printf() format string, but notice <link linkend="string-precision">string precision pitfalls</link>.
+ * @args: the list of arguments to insert in the output.
+ *
+ * An implementation of the GNU vasprintf() function which supports
+ * positional parameters, as specified in the Single Unix Specification.
+ * This function is similar to g_vsprintf(), except that it allocates a
+ * string to hold the output, instead of putting the output in a buffer
+ * you allocate in advance.
+ *
+ * Returns: the number of bytes printed.
+ * Since: 2.4
+ */
+
+
+/**
+ * g_vfprintf:
+ * @file: the stream to write to.
+ * @format: a standard printf() format string, but notice <link linkend="string-precision">string precision pitfalls</link>.
+ * @args: the list of arguments to insert in the output.
+ *
+ * An implementation of the standard fprintf() function which supports
+ * positional parameters, as specified in the Single Unix Specification.
+ *
+ * Returns: the number of bytes printed.
+ * Since: 2.2
+ */
+
+
+/**
+ * g_vprintf:
+ * @format: a standard printf() format string, but notice <link linkend="string-precision">string precision pitfalls</link>.
+ * @args: the list of arguments to insert in the output.
+ *
+ * An implementation of the standard vprintf() function which supports
+ * positional parameters, as specified in the Single Unix Specification.
+ *
+ * Returns: the number of bytes printed.
+ * Since: 2.2
+ */
+
+
+/**
+ * g_vsnprintf:
+ * @string: the buffer to hold the output.
+ * @n: the maximum number of bytes to produce (including the terminating nul character).
+ * @format: a standard printf() format string, but notice <link linkend="string-precision">string precision pitfalls</link>.
+ * @args: the list of arguments to insert in the output.
+ *
+ * A safer form of the standard vsprintf() function. The output is guaranteed
+ * to not exceed @n characters (including the terminating nul character), so
+ * it is easy to ensure that a buffer overflow cannot occur.
+ *
+ * See also g_strdup_vprintf().
+ *
+ * In versions of GLib prior to 1.2.3, this function may return -1 if the
+ * output was truncated, and the truncated string may not be nul-terminated.
+ * In versions prior to 1.3.12, this function returns the length of the output
+ * string.
+ *
+ * The return value of g_vsnprintf() conforms to the vsnprintf() function
+ * as standardized in ISO C99. Note that this is different from traditional
+ * vsnprintf(), which returns the length of the output string.
+ *
+ * The format string may contain positional parameters, as specified in
+ * the Single Unix Specification.
+ *
+ * was large enough.
+ *
+ * Returns: the number of bytes which would be produced if the buffer
+ */
+
+
+/**
+ * g_vsprintf:
+ * @string: the buffer to hold the output.
+ * @format: a standard printf() format string, but notice <link linkend="string-precision">string precision pitfalls</link>.
+ * @args: the list of arguments to insert in the output.
+ *
+ * An implementation of the standard vsprintf() function which supports
+ * positional parameters, as specified in the Single Unix Specification.
+ *
+ * Returns: the number of bytes printed.
+ * Since: 2.2
+ */
+
+
+/**
+ * g_wakeup_acknowledge:
+ * @wakeup: a #GWakeup
+ *
+ * Acknowledges receipt of a wakeup signal on @wakeup.
+ *
+ * You must call this after @wakeup polls as ready.  If not, it will
+ * continue to poll as ready until you do so.
+ *
+ * If you call this function and @wakeup is not signaled, nothing
+ * happens.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_wakeup_free:
+ * @wakeup: a #GWakeup
+ *
+ * Frees @wakeup.
+ *
+ * You must not currently be polling on the #GPollFD returned by
+ * g_wakeup_get_pollfd(), or the result is undefined.
+ */
+
+
+/**
+ * g_wakeup_get_pollfd:
+ * @wakeup: a #GWakeup
+ * @poll_fd: a #GPollFD
+ *
+ * Prepares a @poll_fd such that polling on it will succeed when
+ * g_wakeup_signal() has been called on @wakeup.
+ *
+ * @poll_fd is valid until @wakeup is freed.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_wakeup_new:
+ *
+ * Creates a new #GWakeup.
+ *
+ * You should use g_wakeup_free() to free it when you are done.
+ *
+ * Returns: a new #GWakeup
+ * Since: 2.30
+ */
+
+
+/**
+ * g_wakeup_signal:
+ * @wakeup: a #GWakeup
+ *
+ * Signals @wakeup.
+ *
+ * Any future (or present) polling on the #GPollFD returned by
+ * g_wakeup_get_pollfd() will immediately succeed until such a time as
+ * g_wakeup_acknowledge() is called.
+ *
+ * This function is safe to call from a UNIX signal handler.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_warn_if_fail:
+ * @expr: the expression to check
+ *
+ * Logs a warning if the expression is not true.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_warn_if_reached:
+ *
+ * Logs a critical warning.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_warning:
+ * @...: format string, followed by parameters to insert into the format string (as with printf())
+ *
+ * A convenience function/macro to log a warning message.
+ *
+ * You can make warnings fatal at runtime by setting the
+ * <envar>G_DEBUG</envar> environment variable (see
+ * <ulink url="glib-running.html">Running GLib Applications</ulink>).
+ */
+
+
+/**
+ * g_win32_error_message:
+ * @error: error code.
+ *
+ * Translate a Win32 error code (as returned by GetLastError()) into
+ * the corresponding message. The message is either language neutral,
+ * or in the thread's language, or the user's language, the system's
+ * language, or US English (see docs for FormatMessage()). The
+ * returned string is in UTF-8. It should be deallocated with
+ * g_free().
+ *
+ * Returns: newly-allocated error message
+ */
+
+
+/**
+ * g_win32_get_package_installation_directory:
+ * @package: (allow-none): You should pass %NULL for this.
+ * @dll_name: (allow-none): The name of a DLL that a package provides in UTF-8, or %NULL.
+ *
+ * Try to determine the installation directory for a software package.
+ *
+ * This function is deprecated. Use
+ * g_win32_get_package_installation_directory_of_module() instead.
+ *
+ * The use of @package is deprecated. You should always pass %NULL. A
+ * warning is printed if non-NULL is passed as @package.
+ *
+ * The original intended use of @package was for a short identifier of
+ * the package, typically the same identifier as used for
+ * <literal>GETTEXT_PACKAGE</literal> in software configured using GNU
+ * autotools. The function first looks in the Windows Registry for the
+ * value <literal>&num;InstallationDirectory</literal> in the key
+ * <literal>&num;HKLM\Software\@package</literal>, and if that value
+ * exists and is a string, returns that.
+ *
+ * It is strongly recommended that packagers of GLib-using libraries
+ * for Windows do not store installation paths in the Registry to be
+ * used by this function as that interfers with having several
+ * parallel installations of the library. Enabling multiple
+ * installations of different versions of some GLib-using library, or
+ * GLib itself, is desirable for various reasons.
+ *
+ * For this reason it is recommeded to always pass %NULL as
+ * @package to this function, to avoid the temptation to use the
+ * Registry. In version 2.20 of GLib the @package parameter
+ * will be ignored and this function won't look in the Registry at all.
+ *
+ * If @package is %NULL, or the above value isn't found in the
+ * Registry, but @dll_name is non-%NULL, it should name a DLL loaded
+ * into the current process. Typically that would be the name of the
+ * DLL calling this function, looking for its installation
+ * directory. The function then asks Windows what directory that DLL
+ * was loaded from. If that directory's last component is "bin" or
+ * "lib", the parent directory is returned, otherwise the directory
+ * itself. If that DLL isn't loaded, the function proceeds as if
+ * @dll_name was %NULL.
+ *
+ * If both @package and @dll_name are %NULL, the directory from where
+ * the main executable of the process was loaded is used instead in
+ * the same way as above.
+ *
+ * @package. The string is in the GLib file name encoding,
+ * i.e. UTF-8. The return value should be freed with g_free() when not
+ * needed any longer. If the function fails %NULL is returned.
+ *
+ * g_win32_get_package_installation_directory_of_module() instead.
+ *
+ * Returns: a string containing the installation directory for
+ * Deprecated: 2.18: Pass the HMODULE of a DLL or EXE to
+ */
+
+
+/**
+ * g_win32_get_package_installation_directory_of_module:
+ * @hmodule: (allow-none): The Win32 handle for a DLL loaded into the current process, or %NULL
+ *
+ * This function tries to determine the installation directory of a
+ * software package based on the location of a DLL of the software
+ * package.
+ *
+ * @hmodule should be the handle of a loaded DLL or %NULL. The
+ * function looks up the directory that DLL was loaded from. If
+ * @hmodule is NULL, the directory the main executable of the current
+ * process is looked up. If that directory's last component is "bin"
+ * or "lib", its parent directory is returned, otherwise the directory
+ * itself.
+ *
+ * It thus makes sense to pass only the handle to a "public" DLL of a
+ * software package to this function, as such DLLs typically are known
+ * to be installed in a "bin" or occasionally "lib" subfolder of the
+ * installation folder. DLLs that are of the dynamically loaded module
+ * or plugin variety are often located in more private locations
+ * deeper down in the tree, from which it is impossible for GLib to
+ * deduce the root of the package installation.
+ *
+ * The typical use case for this function is to have a DllMain() that
+ * saves the handle for the DLL. Then when code in the DLL needs to
+ * construct names of files in the installation tree it calls this
+ * function passing the DLL handle.
+ *
+ * the software package @hmodule is from. The string is in the GLib
+ * file name encoding, i.e. UTF-8. The return value should be freed
+ * with g_free() when not needed any longer. If the function fails
+ * %NULL is returned.
+ *
+ * Returns: a string containing the guessed installation directory for
+ * Since: 2.16
+ */
+
+
+/**
+ * g_win32_get_package_installation_subdirectory:
+ * @package: (allow-none): You should pass %NULL for this.
+ * @dll_name: (allow-none): The name of a DLL that a package provides, in UTF-8, or %NULL.
+ * @subdir: A subdirectory of the package installation directory, also in UTF-8
+ *
+ * This function is deprecated. Use
+ * g_win32_get_package_installation_directory_of_module() and
+ * g_build_filename() instead.
+ *
+ * Returns a newly-allocated string containing the path of the
+ * subdirectory @subdir in the return value from calling
+ * g_win32_get_package_installation_directory() with the @package and
+ * @dll_name parameters. See the documentation for
+ * g_win32_get_package_installation_directory() for more details. In
+ * particular, note that it is deprecated to pass anything except NULL
+ * as @package.
+ *
+ * the installation directory of @package. The returned string is in
+ * the GLib file name encoding, i.e. UTF-8. The return value should be
+ * freed with g_free() when no longer needed. If something goes wrong,
+ * %NULL is returned.
+ *
+ * g_win32_get_package_installation_directory_of_module() instead, and
+ * then construct a subdirectory pathname with g_build_filename().
+ *
+ * Returns: a string containing the complete path to @subdir inside
+ * Deprecated: 2.18: Pass the HMODULE of a DLL or EXE to
+ */
+
+
+/**
+ * g_win32_get_windows_version:
+ *
+ * Returns version information for the Windows operating system the
+ * code is running on. See MSDN documentation for the GetVersion()
+ * function. To summarize, the most significant bit is one on Win9x,
+ * and zero on NT-based systems. Since version 2.14, GLib works only
+ * on NT-based systems, so checking whether your are running on Win9x
+ * in your own software is moot. The least significant byte is 4 on
+ * Windows NT 4, and 5 on Windows XP. Software that needs really
+ * detailed version and feature information should use Win32 API like
+ * GetVersionEx() and VerifyVersionInfo().
+ *
+ * Returns: The version information.
+ * Since: 2.6
+ */
+
+
+/**
+ * g_win32_getlocale:
+ *
+ * The setlocale() function in the Microsoft C library uses locale
+ * names of the form "English_United States.1252" etc. We want the
+ * UNIXish standard form "en_US", "zh_TW" etc. This function gets the
+ * current thread locale from Windows - without any encoding info -
+ * and returns it as a string of the above form for use in forming
+ * file names etc. The returned string should be deallocated with
+ * g_free().
+ *
+ * Returns: newly-allocated locale name.
+ */
+
+
+/**
+ * g_win32_locale_filename_from_utf8:
+ * @utf8filename: a UTF-8 encoded filename.
+ *
+ * Converts a filename from UTF-8 to the system codepage.
+ *
+ * On NT-based Windows, on NTFS file systems, file names are in
+ * Unicode. It is quite possible that Unicode file names contain
+ * characters not representable in the system codepage. (For instance,
+ * Greek or Cyrillic characters on Western European or US Windows
+ * installations, or various less common CJK characters on CJK Windows
+ * installations.)
+ *
+ * In such a case, and if the filename refers to an existing file, and
+ * the file system stores alternate short (8.3) names for directory
+ * entries, the short form of the filename is returned. Note that the
+ * "short" name might in fact be longer than the Unicode name if the
+ * Unicode name has very short pathname components containing
+ * non-ASCII characters. If no system codepage name for the file is
+ * possible, %NULL is returned.
+ *
+ * The return value is dynamically allocated and should be freed with
+ * g_free() when no longer needed.
+ *
+ * failure and lack of short names.
+ *
+ * Returns: The converted filename, or %NULL on conversion
+ * Since: 2.8
+ */
+
+
+/**
+ * gboolean:
+ *
+ * A standard boolean type.
+ * Variables of this type should only contain the value
+ * %TRUE or %FALSE.
+ */
+
+
+/**
+ * gchar:
+ *
+ * Corresponds to the standard C <type>char</type> type.
+ */
+
+
+/**
+ * gchararray:
+ *
+ * A C representable type name for #G_TYPE_STRING.
+ */
+
+
+/**
+ * gconstpointer:
+ *
+ * An untyped pointer to constant data.
+ * The data pointed to should not be changed.
+ *
+ * This is typically used in function prototypes to indicate
+ * that the data pointed to will not be altered by the function.
+ */
+
+
+/**
+ * gdouble:
+ *
+ * Corresponds to the standard C <type>double</type> type.
+ * Values of this type can range from -#G_MAXDOUBLE to #G_MAXDOUBLE.
+ */
+
+
+/**
+ * gfloat:
+ *
+ * Corresponds to the standard C <type>float</type> type.
+ * Values of this type can range from -#G_MAXFLOAT to #G_MAXFLOAT.
+ */
+
+
+/**
+ * gint:
+ *
+ * Corresponds to the standard C <type>int</type> type.
+ * Values of this type can range from #G_MININT to #G_MAXINT.
+ */
+
+
+/**
+ * gint16:
+ *
+ * A signed integer guaranteed to be 16 bits on all platforms.
+ * Values of this type can range from #G_MININT16 (= -32,768) to
+ * #G_MAXINT16 (= 32,767).
+ *
+ * To print or scan values of this type, use
+ * %G_GINT16_MODIFIER and/or %G_GINT16_FORMAT.
+ */
+
+
+/**
+ * gint32:
+ *
+ * A signed integer guaranteed to be 32 bits on all platforms.
+ * Values of this type can range from #G_MININT32 (= -2,147,483,648)
+ * to #G_MAXINT32 (= 2,147,483,647).
+ *
+ * To print or scan values of this type, use
+ * %G_GINT32_MODIFIER and/or %G_GINT32_FORMAT.
+ */
+
+
+/**
+ * gint64:
+ *
+ * A signed integer guaranteed to be 64 bits on all platforms.
+ * Values of this type can range from #G_MININT64
+ * (= -9,223,372,036,854,775,808) to #G_MAXINT64
+ * (= 9,223,372,036,854,775,807).
+ *
+ * To print or scan values of this type, use
+ * %G_GINT64_MODIFIER and/or %G_GINT64_FORMAT.
+ */
+
+
+/**
+ * gint8:
+ *
+ * A signed integer guaranteed to be 8 bits on all platforms.
+ * Values of this type can range from #G_MININT8 (= -128) to
+ * #G_MAXINT8 (= 127).
+ */
+
+
+/**
+ * gintptr:
+ *
+ * Corresponds to the C99 type <type>intptr_t</type>,
+ * a signed integer type that can hold any pointer.
+ *
+ * To print or scan values of this type, use
+ * %G_GINTPTR_MODIFIER and/or %G_GINTPTR_FORMAT.
+ *
+ * Since: 2.18
+ */
+
+
+/**
+ * glib__private__:
+ * @arg: Do not use this argument
+ *
+ * Do not call this function; it is used to share private
+ * API between glib, gobject, and gio.
+ */
+
+
+/**
+ * glib_check_version:
+ * @required_major: the required major version.
+ * @required_minor: the required minor version.
+ * @required_micro: the required micro version.
+ *
+ * Checks that the GLib library in use is compatible with the
+ * given version. Generally you would pass in the constants
+ * #GLIB_MAJOR_VERSION, #GLIB_MINOR_VERSION, #GLIB_MICRO_VERSION
+ * as the three arguments to this function; that produces
+ * a check that the library in use is compatible with
+ * the version of GLib the application or module was compiled
+ * against.
+ *
+ * Compatibility is defined by two things: first the version
+ * of the running library is newer than the version
+ * @required_major.required_minor.@required_micro. Second
+ * the running library must be binary compatible with the
+ * version @required_major.required_minor.@required_micro
+ * (same major version.)
+ *
+ * given version, or a string describing the version mismatch.
+ * The returned string is owned by GLib and must not be modified
+ * or freed.
+ *
+ * Returns: %NULL if the GLib library is compatible with the
+ * Since: 2.6
+ */
+
+
+/**
+ * glib_gettext:
+ * @str: The string to be translated
+ *
+ * Returns the translated string from the glib translations.
+ * This is an internal function and should only be used by
+ * the internals of glib (such as libgio).
+ *
+ * Returns: the transation of @str to the current locale
+ */
+
+
+/**
+ * glib_mem_profiler_table:
+ *
+ * A #GMemVTable containing profiling variants of the memory
+ * allocation functions. Use them together with g_mem_profile()
+ * in order to get information about the memory allocation pattern
+ * of your program.
+ */
+
+
+/**
+ * glib_pgettext:
+ * @msgctxtid: a combined message context and message id, separated by a \004 character
+ * @msgidoffset: the offset of the message id in @msgctxid
+ *
+ * This function is a variant of glib_gettext() which supports
+ * a disambiguating message context. See g_dpgettext() for full
+ * details.
+ *
+ * This is an internal function and should only be used by
+ * the internals of glib (such as libgio).
+ *
+ * Returns: the translation of @str to the current locale
+ */
+
+
+/**
+ * glong:
+ *
+ * Corresponds to the standard C <type>long</type> type.
+ * Values of this type can range from #G_MINLONG to #G_MAXLONG.
+ */
+
+
+/**
+ * goffset:
+ *
+ * A signed integer type that is used for file offsets,
+ * corresponding to the C99 type <type>off64_t</type>.
+ * Values of this type can range from #G_MINOFFSET to
+ * #G_MAXOFFSET.
+ *
+ * To print or scan values of this type, use
+ * %G_GOFFSET_MODIFIER and/or %G_GOFFSET_FORMAT.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * gpointer:
+ *
+ * An untyped pointer.
+ * #gpointer looks better and is easier to use
+ * than <type>void*</type>.
+ */
+
+
+/**
+ * gshort:
+ *
+ * Corresponds to the standard C <type>short</type> type.
+ * Values of this type can range from #G_MINSHORT to #G_MAXSHORT.
+ */
+
+
+/**
+ * gsize:
+ *
+ * An unsigned integer type of the result of the sizeof operator,
+ * corresponding to the <type>size_t</type> type defined in C99.
+ * This type is wide enough to hold the numeric value of a pointer,
+ * so it is usually 32bit wide on a 32bit platform and 64bit wide
+ * on a 64bit platform. Values of this type can range from 0 to
+ * #G_MAXSIZE.
+ *
+ * To print or scan values of this type, use
+ * %G_GSIZE_MODIFIER and/or %G_GSIZE_FORMAT.
+ */
+
+
+/**
+ * gssize:
+ *
+ * A signed variant of #gsize, corresponding to the
+ * <type>ssize_t</type> defined on most platforms.
+ * Values of this type can range from #G_MINSSIZE
+ * to #G_MAXSSIZE.
+ *
+ * To print or scan values of this type, use
+ * %G_GSIZE_MODIFIER and/or %G_GSSIZE_FORMAT.
+ */
+
+
+/**
+ * guchar:
+ *
+ * Corresponds to the standard C <type>unsigned char</type> type.
+ */
+
+
+/**
+ * guint:
+ *
+ * Corresponds to the standard C <type>unsigned int</type> type.
+ * Values of this type can range from 0 to #G_MAXUINT.
+ */
+
+
+/**
+ * guint16:
+ *
+ * An unsigned integer guaranteed to be 16 bits on all platforms.
+ * Values of this type can range from 0 to #G_MAXUINT16 (= 65,535).
+ *
+ * To print or scan values of this type, use
+ * %G_GINT16_MODIFIER and/or %G_GUINT16_FORMAT.
+ */
+
+
+/**
+ * guint32:
+ *
+ * An unsigned integer guaranteed to be 32 bits on all platforms.
+ * Values of this type can range from 0 to #G_MAXUINT32 (= 4,294,967,295).
+ *
+ * To print or scan values of this type, use
+ * %G_GINT32_MODIFIER and/or %G_GUINT32_FORMAT.
+ */
+
+
+/**
+ * guint64:
+ *
+ * An unsigned integer guaranteed to be 64 bits on all platforms.
+ * Values of this type can range from 0 to #G_MAXUINT64
+ * (= 18,446,744,073,709,551,615).
+ *
+ * To print or scan values of this type, use
+ * %G_GINT64_MODIFIER and/or %G_GUINT64_FORMAT.
+ */
+
+
+/**
+ * guint8:
+ *
+ * An unsigned integer guaranteed to be 8 bits on all platforms.
+ * Values of this type can range from 0 to #G_MAXUINT8 (= 255).
+ */
+
+
+/**
+ * guintptr:
+ *
+ * Corresponds to the C99 type <type>uintptr_t</type>,
+ * an unsigned integer type that can hold any pointer.
+ *
+ * To print or scan values of this type, use
+ * %G_GINTPTR_MODIFIER and/or %G_GUINTPTR_FORMAT.
+ *
+ * Since: 2.18
+ */
+
+
+/**
+ * gulong:
+ *
+ * Corresponds to the standard C <type>unsigned long</type> type.
+ * Values of this type can range from 0 to #G_MAXULONG.
+ */
+
+
+/**
+ * gunichar:
+ *
+ * A type which can hold any UTF-32 or UCS-4 character code,
+ * also known as a Unicode code point.
+ *
+ * If you want to produce the UTF-8 representation of a #gunichar,
+ * use g_ucs4_to_utf8(). See also g_utf8_to_ucs4() for the reverse
+ * process.
+ *
+ * To print/scan values of this type as integer, use
+ * %G_GINT32_MODIFIER and/or %G_GUINT32_FORMAT.
+ *
+ * The notation to express a Unicode code point in running text is
+ * as a hexadecimal number with four to six digits and uppercase
+ * letters, prefixed by the string "U+". Leading zeros are omitted,
+ * unless the code point would have fewer than four hexadecimal digits.
+ * For example, "U+0041 LATIN CAPITAL LETTER A". To print a code point
+ * in the U+-notation, use the format string "U+\%04"G_GINT32_FORMAT"X".
+ * To scan, use the format string "U+\%06"G_GINT32_FORMAT"X".
+ *
+ * |[
+ * gunichar c;
+ * sscanf ("U+0041", "U+%06"G_GINT32_FORMAT"X", &amp;c)
+ * g_print ("Read U+%04"G_GINT32_FORMAT"X", c);
+ * ]|
+ */
+
+
+/**
+ * gunichar2:
+ *
+ * A type which can hold any UTF-16 code
+ * point<footnote id="utf16_surrogate_pairs">UTF-16 also has so called
+ * <firstterm>surrogate pairs</firstterm> to encode characters beyond
+ * the BMP as pairs of 16bit numbers. Surrogate pairs cannot be stored
+ * in a single gunichar2 field, but all GLib functions accepting gunichar2
+ * arrays will correctly interpret surrogate pairs.</footnote>.
+ *
+ * To print/scan values of this type to/from text you need to convert
+ * to/from UTF-8, using g_utf16_to_utf8()/g_utf8_to_utf16().
+ *
+ * To print/scan values of this type as integer, use
+ * %G_GINT16_MODIFIER and/or %G_GUINT16_FORMAT.
+ */
+
+
+/**
+ * gushort:
+ *
+ * Corresponds to the standard C <type>unsigned short</type> type.
+ * Values of this type can range from 0 to #G_MAXUSHORT.
+ */
+
+
+
+/************************************************************/
+/* THIS FILE IS GENERATED DO NOT EDIT */
+/************************************************************/
diff --git a/gir/gobject-2.0.c b/gir/gobject-2.0.c
new file mode 100644 (file)
index 0000000..af3cdcb
--- /dev/null
@@ -0,0 +1,11914 @@
+/************************************************************/
+/* THIS FILE IS GENERATED DO NOT EDIT */
+/************************************************************/
+
+/**
+ * GBaseFinalizeFunc:
+ * @g_class: The #GTypeClass structure to finalize.
+ *
+ * A callback function used by the type system to finalize those portions
+ * of a derived types class structure that were setup from the corresponding
+ * GBaseInitFunc() function. Class finalization basically works the inverse
+ * way in which class intialization is performed.
+ * See GClassInitFunc() for a discussion of the class intialization process.
+ */
+
+
+/**
+ * GBaseInitFunc:
+ * @g_class: The #GTypeClass structure to initialize.
+ *
+ * A callback function used by the type system to do base initialization
+ * of the class structures of derived types. It is called as part of the
+ * initialization process of all derived classes and should reallocate
+ * or reset all dynamic class members copied over from the parent class.
+ * For example, class members (such as strings) that are not sufficiently
+ * handled by a plain memory copy of the parent class into the derived class
+ * have to be altered. See GClassInitFunc() for a discussion of the class
+ * intialization process.
+ */
+
+
+/**
+ * GBinding:
+ *
+ * <structname>GBinding</structname> is an opaque structure whose members
+ * cannot be accessed directly.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GBinding:flags:
+ *
+ * Flags to be used to control the #GBinding
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GBinding:source:
+ *
+ * The #GObject that should be used as the source of the binding
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GBinding:source-property:
+ *
+ * The name of the property of #GBinding:source that should be used
+ * as the source of the binding
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GBinding:target:
+ *
+ * The #GObject that should be used as the target of the binding
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GBinding:target-property:
+ *
+ * The name of the property of #GBinding:target that should be used
+ * as the target of the binding
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GBindingFlags:
+ * @G_BINDING_DEFAULT: The default binding; if the source property changes, the target property is updated with its value.
+ * @G_BINDING_BIDIRECTIONAL: Bidirectional binding; if either the property of the source or the property of the target changes, the other is updated.
+ * @G_BINDING_SYNC_CREATE: Synchronize the values of the source and target properties when creating the binding; the direction of the synchronization is always from the source to the target.
+ * @G_BINDING_INVERT_BOOLEAN: If the two properties being bound are booleans, setting one to %TRUE will result in the other being set to %FALSE and vice versa. This flag will only work for boolean properties, and cannot be used when passing custom transformation functions to g_object_bind_property_full().
+ *
+ * Flags to be passed to g_object_bind_property() or
+ * g_object_bind_property_full().
+ *
+ * This enumeration can be extended at later date.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GBindingTransformFunc:
+ * @binding: a #GBinding
+ * @source_value: the value of the source property
+ * @target_value: the value of the target property
+ * @user_data: data passed to the transform function
+ *
+ * A function to be called to transform the source property of @source
+ * from @source_value into the target property of @target
+ * using @target_value.
+ *
+ * otherwise
+ *
+ * Returns: %TRUE if the transformation was successful, and %FALSE
+ * Since: 2.26
+ */
+
+
+/**
+ * GBookmarkFile:
+ *
+ * The <structname>GBookmarkFile</structname> struct contains only
+ * private data and should not be directly accessed.
+ */
+
+
+/**
+ * GBookmarkFileError:
+ * @G_BOOKMARK_FILE_ERROR_INVALID_URI: URI was ill-formed
+ * @G_BOOKMARK_FILE_ERROR_INVALID_VALUE: a requested field was not found
+ * @G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED: a requested application did not register a bookmark
+ * @G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND: a requested URI was not found
+ * @G_BOOKMARK_FILE_ERROR_READ: document was ill formed
+ * @G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING: the text being parsed was in an unknown encoding
+ * @G_BOOKMARK_FILE_ERROR_WRITE: an error occurred while writing
+ * @G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND: requested file was not found
+ *
+ * Error codes returned by bookmark file parsing.
+ */
+
+
+/**
+ * GBoxedCopyFunc:
+ * @boxed: The boxed structure to be copied.
+ *
+ * This function is provided by the user and should produce a copy
+ * of the passed in boxed structure.
+ *
+ * Returns: The newly created copy of the boxed structure.
+ */
+
+
+/**
+ * GBoxedFreeFunc:
+ * @boxed: The boxed structure to be freed.
+ *
+ * This function is provided by the user and should free the boxed
+ * structure passed.
+ */
+
+
+/**
+ * GCClosure:
+ * @closure: the #GClosure
+ * @callback: the callback function
+ *
+ * A #GCClosure is a specialization of #GClosure for C function callbacks.
+ */
+
+
+/**
+ * GCallback:
+ *
+ * The type used for callback functions in structure definitions and function
+ * signatures. This doesn't mean that all callback functions must take no
+ * parameters and return void. The required signature of a callback function
+ * is determined by the context in which is used (e.g. the signal to which it
+ * is connected). Use G_CALLBACK() to cast the callback function to a #GCallback.
+ */
+
+
+/**
+ * GChecksum:
+ *
+ * An opaque structure representing a checksumming operation.
+ * To create a new GChecksum, use g_checksum_new(). To free
+ * a GChecksum, use g_checksum_free().
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * GChecksumType:
+ * @G_CHECKSUM_MD5: Use the MD5 hashing algorithm
+ * @G_CHECKSUM_SHA1: Use the SHA-1 hashing algorithm
+ * @G_CHECKSUM_SHA256: Use the SHA-256 hashing algorithm
+ *
+ * The hashing algorithm to be used by #GChecksum when performing the
+ * digest of some data.
+ *
+ * Note that the #GChecksumType enumeration may be extended at a later
+ * date to include new hashing algorithm types.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * GChildWatchFunc:
+ * @pid: the process id of the child process
+ * @status: Status information about the child process, see waitpid(2) for more information about this field
+ * @user_data: user data passed to g_child_watch_add()
+ *
+ * The type of functions to be called when a child exists.
+ */
+
+
+/**
+ * GClassFinalizeFunc:
+ * @g_class: The #GTypeClass structure to finalize.
+ * @class_data: The @class_data member supplied via the #GTypeInfo structure.
+ *
+ * A callback function used by the type system to finalize a class.
+ * This function is rarely needed, as dynamically allocated class resources
+ * should be handled by GBaseInitFunc() and GBaseFinalizeFunc().
+ * Also, specification of a GClassFinalizeFunc() in the #GTypeInfo
+ * structure of a static type is invalid, because classes of static types
+ * will never be finalized (they are artificially kept alive when their
+ * reference count drops to zero).
+ */
+
+
+/**
+ * GClassInitFunc:
+ * @g_class: The #GTypeClass structure to initialize.
+ * @class_data: The @class_data member supplied via the #GTypeInfo structure.
+ *
+ * A callback function used by the type system to initialize the class
+ * of a specific type. This function should initialize all static class
+ * members.
+ * The initialization process of a class involves:
+ * <itemizedlist>
+ * <listitem><para>
+ * 1 - Copying common members from the parent class over to the
+ * derived class structure.
+ * </para></listitem>
+ * <listitem><para>
+ * 2 -  Zero initialization of the remaining members not copied
+ * over from the parent class.
+ * </para></listitem>
+ * <listitem><para>
+ * 3 - Invocation of the GBaseInitFunc() initializers of all parent
+ * types and the class' type.
+ * </para></listitem>
+ * <listitem><para>
+ * 4 - Invocation of the class' GClassInitFunc() initializer.
+ * </para></listitem>
+ * </itemizedlist>
+ * Since derived classes are partially initialized through a memory copy
+ * of the parent class, the general rule is that GBaseInitFunc() and
+ * GBaseFinalizeFunc() should take care of necessary reinitialization
+ * and release of those class members that were introduced by the type
+ * that specified these GBaseInitFunc()/GBaseFinalizeFunc().
+ * GClassInitFunc() should only care about initializing static
+ * class members, while dynamic class members (such as allocated strings
+ * or reference counted resources) are better handled by a GBaseInitFunc()
+ * for this type, so proper initialization of the dynamic class members
+ * is performed for class initialization of derived types as well.
+ * An example may help to correspond the intend of the different class
+ * initializers:
+ *
+ * |[
+ * typedef struct {
+ * GObjectClass parent_class;
+ * gint         static_integer;
+ * gchar       *dynamic_string;
+ * } TypeAClass;
+ * static void
+ * type_a_base_class_init (TypeAClass *class)
+ * {
+ * class->dynamic_string = g_strdup ("some string");
+ * }
+ * static void
+ * type_a_base_class_finalize (TypeAClass *class)
+ * {
+ * g_free (class->dynamic_string);
+ * }
+ * static void
+ * type_a_class_init (TypeAClass *class)
+ * {
+ * class->static_integer = 42;
+ * }
+ *
+ * typedef struct {
+ * TypeAClass   parent_class;
+ * gfloat       static_float;
+ * GString     *dynamic_gstring;
+ * } TypeBClass;
+ * static void
+ * type_b_base_class_init (TypeBClass *class)
+ * {
+ * class->dynamic_gstring = g_string_new ("some other string");
+ * }
+ * static void
+ * type_b_base_class_finalize (TypeBClass *class)
+ * {
+ * g_string_free (class->dynamic_gstring);
+ * }
+ * static void
+ * type_b_class_init (TypeBClass *class)
+ * {
+ * class->static_float = 3.14159265358979323846;
+ * }
+ * ]|
+ * Initialization of TypeBClass will first cause initialization of
+ * TypeAClass (derived classes reference their parent classes, see
+ * g_type_class_ref() on this).
+ * Initialization of TypeAClass roughly involves zero-initializing its fields,
+ * then calling its GBaseInitFunc() type_a_base_class_init() to allocate
+ * its dynamic members (dynamic_string), and finally calling its GClassInitFunc()
+ * type_a_class_init() to initialize its static members (static_integer).
+ * The first step in the initialization process of TypeBClass is then
+ * a plain memory copy of the contents of TypeAClass into TypeBClass and
+ * zero-initialization of the remaining fields in TypeBClass.
+ * The dynamic members of TypeAClass within TypeBClass now need
+ * reinitialization which is performed by calling type_a_base_class_init()
+ * with an argument of TypeBClass.
+ * After that, the GBaseInitFunc() of TypeBClass, type_b_base_class_init()
+ * is called to allocate the dynamic members of TypeBClass (dynamic_gstring),
+ * and finally the GClassInitFunc() of TypeBClass, type_b_class_init(),
+ * is called to complete the initialization process with the static members
+ * (static_float).
+ * Corresponding finalization counter parts to the GBaseInitFunc() functions
+ * have to be provided to release allocated resources at class finalization
+ * time.
+ */
+
+
+/**
+ * GClosure:
+ * @in_marshal: Indicates whether the closure is currently being invoked with g_closure_invoke()
+ * @is_invalid: Indicates whether the closure has been invalidated by g_closure_invalidate()
+ *
+ * A #GClosure represents a callback supplied by the programmer.
+ */
+
+
+/**
+ * GClosureMarshal:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: (allow-none): a #GValue to store the return value. May be %NULL if the callback of @closure doesn't return a value.
+ * @n_param_values: the length of the @param_values array
+ * @param_values: (array length=n_param_values): an array of #GValue<!-- -->s holding the arguments on which to invoke the callback of @closure
+ * @invocation_hint: (allow-none): the invocation hint given as the last argument to g_closure_invoke()
+ * @marshal_data: (allow-none): additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
+ *
+ * The type used for marshaller functions.
+ */
+
+
+/**
+ * GClosureNotify:
+ * @data: data specified when registering the notification callback
+ * @closure: the #GClosure on which the notification is emitted
+ *
+ * The type used for the various notification callbacks which can be registered
+ * on closures.
+ */
+
+
+/**
+ * GConnectFlags:
+ * @G_CONNECT_AFTER: whether the handler should be called before or after the default handler of the signal.
+ * @G_CONNECT_SWAPPED: whether the instance and data should be swapped when calling the handler.
+ *
+ * The connection flags are used to specify the behaviour of a signal's
+ * connection.
+ */
+
+
+/**
+ * GConvertError:
+ * @G_CONVERT_ERROR_NO_CONVERSION: Conversion between the requested character sets is not supported.
+ * @G_CONVERT_ERROR_ILLEGAL_SEQUENCE: Invalid byte sequence in conversion input.
+ * @G_CONVERT_ERROR_FAILED: Conversion failed for some reason.
+ * @G_CONVERT_ERROR_PARTIAL_INPUT: Partial character sequence at end of input.
+ * @G_CONVERT_ERROR_BAD_URI: URI is invalid.
+ * @G_CONVERT_ERROR_NOT_ABSOLUTE_PATH: Pathname is not an absolute path.
+ *
+ * Error codes returned by character set conversion routines.
+ */
+
+
+/**
+ * GCopyFunc:
+ * @src: A pointer to the data which should be copied
+ * @data: Additional data
+ *
+ * A function of this signature is used to copy the node data
+ * when doing a deep-copy of a tree.
+ *
+ * Returns: A pointer to the copy
+ * Since: 2.4
+ */
+
+
+/**
+ * GDateTime:
+ *
+ * <structname>GDateTime</structname> is an opaque structure whose members
+ * cannot be accessed directly.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GDebugKey:
+ * @key: the string
+ * @value: the flag
+ *
+ * Associates a string with a bit flag.
+ * Used in g_parse_debug_string().
+ */
+
+
+/**
+ * GEnumClass:
+ * @g_type_class: the parent class
+ * @minimum: the smallest possible value.
+ * @maximum: the largest possible value.
+ * @n_values: the number of possible values.
+ * @values: an array of #GEnumValue structs describing the individual values.
+ *
+ * The class of an enumeration type holds information about its
+ * possible values.
+ */
+
+
+/**
+ * GEnumValue:
+ * @value: the enum value
+ * @value_name: the name of the value
+ * @value_nick: the nickname of the value
+ *
+ * A structure which contains a single enum value, its name, and its
+ * nickname.
+ */
+
+
+/**
+ * GError:
+ * @domain: error domain, e.g. #G_FILE_ERROR
+ * @code: error code, e.g. %G_FILE_ERROR_NOENT
+ * @message: human-readable informative error message
+ *
+ * The <structname>GError</structname> structure contains
+ * information about an error that has occurred.
+ */
+
+
+/**
+ * GFlagsClass:
+ * @g_type_class: the parent class
+ * @mask: a mask covering all possible values.
+ * @n_values: the number of possible values.
+ * @values: an array of #GFlagsValue structs describing the individual values.
+ *
+ * The class of a flags type holds information about its
+ * possible values.
+ */
+
+
+/**
+ * GFlagsValue:
+ * @value: the flags value
+ * @value_name: the name of the value
+ * @value_nick: the nickname of the value
+ *
+ * A structure which contains a single flags value, its name, and its
+ * nickname.
+ */
+
+
+/**
+ * GFreeFunc:
+ * @data: a data pointer
+ *
+ * Declares a type of function which takes an arbitrary
+ * data pointer argument and has no return value. It is
+ * not currently used in GLib or GTK+.
+ */
+
+
+/**
+ * GHmac:
+ *
+ * An opaque structure representing a HMAC operation.
+ * To create a new GHmac, use g_hmac_new(). To free
+ * a GHmac, use g_hmac_unref().
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * GIconv:
+ *
+ * The <structname>GIConv</structname> struct wraps an
+ * iconv() conversion descriptor. It contains private data
+ * and should only be accessed using the following functions.
+ */
+
+
+/**
+ * GInitiallyUnowned:
+ *
+ * All the fields in the <structname>GInitiallyUnowned</structname> structure
+ * are private to the #GInitiallyUnowned implementation and should never be
+ * accessed directly.
+ */
+
+
+/**
+ * GInitiallyUnownedClass:
+ *
+ * The class structure for the <structname>GInitiallyUnowned</structname> type.
+ */
+
+
+/**
+ * GInstanceInitFunc:
+ * @instance: The instance to initialize.
+ * @g_class: The class of the type the instance is created for.
+ *
+ * A callback function used by the type system to initialize a new
+ * instance of a type. This function initializes all instance members and
+ * allocates any resources required by it.
+ * Initialization of a derived instance involves calling all its parent
+ * types instance initializers, so the class member of the instance
+ * is altered during its initialization to always point to the class that
+ * belongs to the type the current initializer was introduced for.
+ */
+
+
+/**
+ * GInterfaceFinalizeFunc:
+ * @g_iface: The interface structure to finalize.
+ * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure.
+ *
+ * A callback function used by the type system to finalize an interface.
+ * This function should destroy any internal data and release any resources
+ * allocated by the corresponding GInterfaceInitFunc() function.
+ */
+
+
+/**
+ * GInterfaceInfo:
+ * @interface_init: location of the interface initialization function
+ * @interface_finalize: location of the interface finalization function
+ * @interface_data: user-supplied data passed to the interface init/finalize functions
+ *
+ * A structure that provides information to the type system which is
+ * used specifically for managing interface types.
+ */
+
+
+/**
+ * GInterfaceInitFunc:
+ * @g_iface: The interface structure to initialize.
+ * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure.
+ *
+ * A callback function used by the type system to initialize a new
+ * interface.  This function should initialize all internal data and
+ * allocate any resources required by the interface.
+ */
+
+
+/**
+ * GLIB_CHECK_VERSION:
+ * @major: the major version to check for
+ * @minor: the minor version to check for
+ * @micro: the micro version to check for
+ *
+ * Checks the version of the GLib library that is being compiled
+ * against.
+ *
+ * <example>
+ * <title>Checking the version of the GLib library</title>
+ * <programlisting>
+ * if (!GLIB_CHECK_VERSION (1, 2, 0))
+ * g_error ("GLib version 1.2.0 or above is needed");
+ * </programlisting>
+ * </example>
+ *
+ * See glib_check_version() for a runtime check.
+ *
+ * is the same as or newer than the passed-in version.
+ *
+ * Returns: %TRUE if the version of the GLib header files
+ */
+
+
+/**
+ * GLIB_VERSION_2_26:
+ *
+ * A macro that evaluates to the 2.26 version of GLib, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_2_28:
+ *
+ * A macro that evaluates to the 2.28 version of GLib, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_2_30:
+ *
+ * A macro that evaluates to the 2.30 version of GLib, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_2_32:
+ *
+ * A macro that evaluates to the 2.32 version of GLib, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_MAX_ALLOWED:
+ *
+ * A macro that should be defined by the user prior to including
+ * the glib.h header.
+ * The definition should be one of the predefined GLib version
+ * macros: %GLIB_VERSION_2_26, %GLIB_VERSION_2_28,...
+ *
+ * This macro defines the upper bound for the GLib API to use.
+ *
+ * If a function has been introduced in a newer version of GLib,
+ * it is possible to use this symbol to get compiler warnings when
+ * trying to use that function.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GLIB_VERSION_MIN_REQUIRED:
+ *
+ * A macro that should be defined by the user prior to including
+ * the glib.h header.
+ * The definition should be one of the predefined GLib version
+ * macros: %GLIB_VERSION_2_26, %GLIB_VERSION_2_28,...
+ *
+ * This macro defines the lower bound for the GLib API to use.
+ *
+ * If a function has been deprecated in a newer version of GLib,
+ * it is possible to use this symbol to avoid the compiler warnings
+ * without disabling warning for every deprecated function.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * GMainContext:
+ *
+ * The <structname>GMainContext</structname> struct is an opaque data
+ * type representing a set of sources to be handled in a main loop.
+ */
+
+
+/**
+ * GMainLoop:
+ *
+ * The <structname>GMainLoop</structname> struct is an opaque data type
+ * representing the main event loop of a GLib or GTK+ application.
+ */
+
+
+/**
+ * GMarkupError:
+ * @G_MARKUP_ERROR_BAD_UTF8: text being parsed was not valid UTF-8
+ * @G_MARKUP_ERROR_EMPTY: document contained nothing, or only whitespace
+ * @G_MARKUP_ERROR_PARSE: document was ill-formed
+ * @G_MARKUP_ERROR_UNKNOWN_ELEMENT: error should be set by #GMarkupParser functions; element wasn't known
+ * @G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE: error should be set by #GMarkupParser functions; attribute wasn't known
+ * @G_MARKUP_ERROR_INVALID_CONTENT: error should be set by #GMarkupParser functions; content was invalid
+ * @G_MARKUP_ERROR_MISSING_ATTRIBUTE: error should be set by #GMarkupParser functions; a required attribute was missing
+ *
+ * Error codes returned by markup parsing.
+ */
+
+
+/**
+ * GMarkupParseContext:
+ *
+ * A parse context is used to parse a stream of bytes that
+ * you expect to contain marked-up text.
+ *
+ * See g_markup_parse_context_new(), #GMarkupParser, and so
+ * on for more details.
+ */
+
+
+/**
+ * GMarkupParseFlags:
+ * @G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG: flag you should not use
+ * @G_MARKUP_TREAT_CDATA_AS_TEXT: When this flag is set, CDATA marked sections are not passed literally to the @passthrough function of the parser. Instead, the content of the section (without the <literal>&lt;![CDATA[</literal> and <literal>]]&gt;</literal>) is passed to the @text function. This flag was added in GLib 2.12
+ * @G_MARKUP_PREFIX_ERROR_POSITION: Normally errors caught by GMarkup itself have line/column information prefixed to them to let the caller know the location of the error. When this flag is set the location information is also prefixed to errors generated by the #GMarkupParser implementation functions
+ *
+ * Flags that affect the behaviour of the parser.
+ */
+
+
+/**
+ * GMarkupParser:
+ * @start_element: Callback to invoke when the opening tag of an element is seen.
+ * @end_element: Callback to invoke when the closing tag of an element is seen. Note that this is also called for empty tags like <literal>&lt;empty/&gt;</literal>.
+ * @text: Callback to invoke when some text is seen (text is always inside an element). Note that the text of an element may be spread over multiple calls of this function. If the %G_MARKUP_TREAT_CDATA_AS_TEXT flag is set, this function is also called for the content of CDATA marked sections.
+ * @passthrough: Callback to invoke for comments, processing instructions and doctype declarations; if you're re-writing the parsed document, write the passthrough text back out in the same position. If the %G_MARKUP_TREAT_CDATA_AS_TEXT flag is not set, this function is also called for CDATA marked sections.
+ * @error: Callback to invoke when an error occurs.
+ *
+ * Any of the fields in #GMarkupParser can be %NULL, in which case they
+ * will be ignored. Except for the @error function, any of these callbacks
+ * can set an error; in particular the %G_MARKUP_ERROR_UNKNOWN_ELEMENT,
+ * %G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, and %G_MARKUP_ERROR_INVALID_CONTENT
+ * errors are intended to be set from these callbacks. If you set an error
+ * from a callback, g_markup_parse_context_parse() will report that error
+ * back to its caller.
+ */
+
+
+/**
+ * GMemVTable:
+ * @malloc: function to use for allocating memory.
+ * @realloc: function to use for reallocating memory.
+ * @free: function to use to free memory.
+ * @calloc: function to use for allocating zero-filled memory.
+ * @try_malloc: function to use for allocating memory without a default error handler.
+ * @try_realloc: function to use for reallocating memory without a default error handler.
+ *
+ * A set of functions used to perform memory allocation. The same #GMemVTable must
+ * be used for all allocations in the same program; a call to g_mem_set_vtable(),
+ * if it exists, should be prior to any use of GLib.
+ */
+
+
+/**
+ * GNormalizeMode:
+ * @G_NORMALIZE_DEFAULT: standardize differences that do not affect the text content, such as the above-mentioned accent representation
+ * @G_NORMALIZE_NFD: another name for %G_NORMALIZE_DEFAULT
+ * @G_NORMALIZE_DEFAULT_COMPOSE: like %G_NORMALIZE_DEFAULT, but with composed forms rather than a maximally decomposed form
+ * @G_NORMALIZE_NFC: another name for %G_NORMALIZE_DEFAULT_COMPOSE
+ * @G_NORMALIZE_ALL: beyond %G_NORMALIZE_DEFAULT also standardize the "compatibility" characters in Unicode, such as SUPERSCRIPT THREE to the standard forms (in this case DIGIT THREE). Formatting information may be lost but for most text operations such characters should be considered the same
+ * @G_NORMALIZE_NFKD: another name for %G_NORMALIZE_ALL
+ * @G_NORMALIZE_ALL_COMPOSE: like %G_NORMALIZE_ALL, but with composed forms rather than a maximally decomposed form
+ * @G_NORMALIZE_NFKC: another name for %G_NORMALIZE_ALL_COMPOSE
+ *
+ * Defines how a Unicode string is transformed in a canonical
+ * form, standardizing such issues as whether a character with
+ * an accent is represented as a base character and combining
+ * accent or as a single precomposed character. Unicode strings
+ * should generally be normalized before comparing them.
+ */
+
+
+/**
+ * GObject:
+ *
+ * All the fields in the <structname>GObject</structname> structure are private
+ * to the #GObject implementation and should never be accessed directly.
+ */
+
+
+/**
+ * GObject::notify:
+ * @gobject: the object which received the signal.
+ * @pspec: the #GParamSpec of the property which changed.
+ *
+ * The notify signal is emitted on an object 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.
+ *
+ * This signal is typically used to obtain change notification for a
+ * single property, by specifying the property name as a detail in the
+ * g_signal_connect() call, like this:
+ * |[
+ * g_signal_connect (text_view->buffer, "notify::paste-target-list",
+ * G_CALLBACK (gtk_text_view_target_list_notify),
+ * text_view)
+ * ]|
+ * It is important to note that you must use
+ * <link linkend="canonical-parameter-name">canonical</link> parameter names as
+ * detail strings for the notify signal.
+ */
+
+
+/**
+ * GObjectClass:
+ * @g_type_class: the parent class
+ * @constructor: the @constructor function is called by g_object_new () to complete the object initialization after all the construction properties are set. The first thing a @constructor implementation must do is chain up to the @constructor of the parent class. Overriding @constructor should be rarely needed, e.g. to handle construct properties, or to implement singletons.
+ * @set_property: the generic setter for all properties of this type. Should be overridden for every type with properties. Implementations of @set_property don't need to emit property change notification explicitly, this is handled by the type system.
+ * @get_property: the generic getter for all properties of this type. Should be overridden for every type with properties.
+ * @dispose: the @dispose function is supposed to drop all references to other objects, but keep the instance otherwise intact, so that client method invocations still work. It may be run multiple times (due to reference loops). Before returning, @dispose should chain up to the @dispose method of the parent class.
+ * @finalize: instance finalization function, should finish the finalization of the instance begun in @dispose and chain up to the @finalize method of the parent class.
+ * @dispatch_properties_changed: emits property change notification for a bunch of properties. Overriding @dispatch_properties_changed should be rarely needed.
+ * @notify: the class closure for the notify signal
+ * @constructed: the @constructed function is called by g_object_new() as the final step of the object creation process.  At the point of the call, all construction properties have been set on the object.  The purpose of this call is to allow for object initialisation steps that can only be performed after construction properties have been set.  @constructed implementors should chain up to the @constructed call of their parent class to allow it to complete its initialisation.
+ *
+ * The class structure for the <structname>GObject</structname> type.
+ *
+ * <example>
+ * <title>Implementing singletons using a constructor</title>
+ * <programlisting>
+ * static MySingleton *the_singleton = NULL;
+ *
+ * static GObject*
+ * my_singleton_constructor (GType                  type,
+ * guint                  n_construct_params,
+ * GObjectConstructParam *construct_params)
+ * {
+ * GObject *object;
+ *
+ * if (!the_singleton)
+ * {
+ * object = G_OBJECT_CLASS (parent_class)->constructor (type,
+ * n_construct_params,
+ * construct_params);
+ * the_singleton = MY_SINGLETON (object);
+ * }
+ * else
+ * object = g_object_ref (G_OBJECT (the_singleton));
+ *
+ * return object;
+ * }
+ * </programlisting></example>
+ */
+
+
+/**
+ * GObjectConstructParam:
+ * @pspec: the #GParamSpec of the construct parameter
+ * @value: the value to set the parameter to
+ *
+ * The <structname>GObjectConstructParam</structname> struct is an auxiliary
+ * structure used to hand #GParamSpec/#GValue pairs to the @constructor of
+ * a #GObjectClass.
+ */
+
+
+/**
+ * GObjectFinalizeFunc:
+ * @object: the #GObject being finalized
+ *
+ * The type of the @finalize function of #GObjectClass.
+ */
+
+
+/**
+ * GObjectGetPropertyFunc:
+ * @object: a #GObject
+ * @property_id: the numeric id under which the property was registered with g_object_class_install_property().
+ * @value: a #GValue to return the property value in
+ * @pspec: the #GParamSpec describing the property
+ *
+ * The type of the @get_property function of #GObjectClass.
+ */
+
+
+/**
+ * GObjectSetPropertyFunc:
+ * @object: a #GObject
+ * @property_id: the numeric id under which the property was registered with g_object_class_install_property().
+ * @value: the new value for the property
+ * @pspec: the #GParamSpec describing the property
+ *
+ * The type of the @set_property function of #GObjectClass.
+ */
+
+
+/**
+ * GOptionArg:
+ * @G_OPTION_ARG_NONE: No extra argument. This is useful for simple flags.
+ * @G_OPTION_ARG_STRING: The option takes a string argument.
+ * @G_OPTION_ARG_INT: The option takes an integer argument.
+ * @G_OPTION_ARG_CALLBACK: The option provides a callback to parse the extra argument.
+ * @G_OPTION_ARG_FILENAME: The option takes a filename as argument.
+ * @G_OPTION_ARG_STRING_ARRAY: The option takes a string argument, multiple uses of the option are collected into an array of strings.
+ * @G_OPTION_ARG_FILENAME_ARRAY: The option takes a filename as argument, multiple uses of the option are collected into an array of strings.
+ * @G_OPTION_ARG_DOUBLE: The option takes a double argument. The argument can be formatted either for the user's locale or for the "C" locale. Since 2.12
+ * @G_OPTION_ARG_INT64: The option takes a 64-bit integer. Like %G_OPTION_ARG_INT but for larger numbers. The number can be in decimal base, or in hexadecimal (when prefixed with <literal>0x</literal>, for example, <literal>0xffffffff</literal>). Since 2.12
+ *
+ * The #GOptionArg enum values determine which type of extra argument the
+ * options expect to find. If an option expects an extra argument, it
+ * can be specified in several ways; with a short option:
+ * <option>-x arg</option>, with a long option: <option>--name arg</option>
+ * or combined in a single argument: <option>--name=arg</option>.
+ */
+
+
+/**
+ * GOptionArgFunc:
+ * @option_name: The name of the option being parsed. This will be either a single dash followed by a single letter (for a short name) or two dashes followed by a long option name.
+ * @value: The value to be parsed.
+ * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
+ * @error: A return location for errors. The error code %G_OPTION_ERROR_FAILED is intended to be used for errors in #GOptionArgFunc callbacks.
+ *
+ * The type of function to be passed as callback for %G_OPTION_ARG_CALLBACK
+ * options.
+ *
+ * occurred, in which case @error should be set with g_set_error()
+ *
+ * Returns: %TRUE if the option was successfully parsed, %FALSE if an error
+ */
+
+
+/**
+ * GOptionContext:
+ *
+ * A <structname>GOptionContext</structname> struct defines which options
+ * are accepted by the commandline option parser. The struct has only private
+ * fields and should not be directly accessed.
+ */
+
+
+/**
+ * GOptionEntry:
+ * @long_name: The long name of an option can be used to specify it in a commandline as --<replaceable>long_name</replaceable>. Every option must have a long name. To resolve conflicts if multiple option groups contain the same long name, it is also possible to specify the option as --<replaceable>groupname</replaceable>-<replaceable>long_name</replaceable>.
+ * @short_name: If an option has a short name, it can be specified -<replaceable>short_name</replaceable> in a commandline. @short_name must be a printable ASCII character different from '-', or zero if the option has no short name.
+ * @flags: Flags from #GOptionFlags.
+ * @arg: The type of the option, as a #GOptionArg.
+ * @arg_data: If the @arg type is %G_OPTION_ARG_CALLBACK, then @arg_data must point to a #GOptionArgFunc callback function, which will be called to handle the extra argument. Otherwise, @arg_data is a pointer to a location to store the value, the required type of the location depends on the @arg type: <variablelist> <varlistentry> <term>%G_OPTION_ARG_NONE</term> <listitem><para>%gboolean</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_STRING</term> <listitem><para>%gchar*</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_INT</term> <listitem><para>%gint</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_FILENAME</term> <listitem><para>%gchar*</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_STRING_ARRAY</term> <listitem><para>%gchar**</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_FILENAME_ARRAY</term> <listitem><para>%gchar**</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_DOUBLE</term> <listitem><para>%gdouble</para></listitem> </varlistentry> </variablelist> If @arg type is %G_OPTION_ARG_STRING or %G_OPTION_ARG_FILENAME the location will contain a newly allocated string if the option was given. That string needs to be freed by the callee using g_free(). Likewise if @arg type is %G_OPTION_ARG_STRING_ARRAY or %G_OPTION_ARG_FILENAME_ARRAY, the data should be freed using g_strfreev().
+ * @description: the description for the option in <option>--help</option> output. The @description is translated using the @translate_func of the group, see g_option_group_set_translation_domain().
+ * @arg_description: The placeholder to use for the extra argument parsed by the option in <option>--help</option> output. The @arg_description is translated using the @translate_func of the group, see g_option_group_set_translation_domain().
+ *
+ * A <structname>GOptionEntry</structname> defines a single option.
+ * To have an effect, they must be added to a #GOptionGroup with
+ * g_option_context_add_main_entries() or g_option_group_add_entries().
+ */
+
+
+/**
+ * GOptionError:
+ * @G_OPTION_ERROR_UNKNOWN_OPTION: An option was not known to the parser. This error will only be reported, if the parser hasn't been instructed to ignore unknown options, see g_option_context_set_ignore_unknown_options().
+ * @G_OPTION_ERROR_BAD_VALUE: A value couldn't be parsed.
+ * @G_OPTION_ERROR_FAILED: A #GOptionArgFunc callback failed.
+ *
+ * Error codes returned by option parsing.
+ */
+
+
+/**
+ * GOptionErrorFunc:
+ * @context: The active #GOptionContext
+ * @group: The group to which the function belongs
+ * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
+ * @error: The #GError containing details about the parse error
+ *
+ * The type of function to be used as callback when a parse error occurs.
+ */
+
+
+/**
+ * GOptionFlags:
+ * @G_OPTION_FLAG_HIDDEN: The option doesn't appear in <option>--help</option> output.
+ * @G_OPTION_FLAG_IN_MAIN: The option appears in the main section of the <option>--help</option> output, even if it is defined in a group.
+ * @G_OPTION_FLAG_REVERSE: For options of the %G_OPTION_ARG_NONE kind, this flag indicates that the sense of the option is reversed.
+ * @G_OPTION_FLAG_NO_ARG: For options of the %G_OPTION_ARG_CALLBACK kind, this flag indicates that the callback does not take any argument (like a %G_OPTION_ARG_NONE option). Since 2.8
+ * @G_OPTION_FLAG_FILENAME: For options of the %G_OPTION_ARG_CALLBACK kind, this flag indicates that the argument should be passed to the callback in the GLib filename encoding rather than UTF-8. Since 2.8
+ * @G_OPTION_FLAG_OPTIONAL_ARG: For options of the %G_OPTION_ARG_CALLBACK kind, this flag indicates that the argument supply is optional. If no argument is given then data of %GOptionParseFunc will be set to NULL. Since 2.8
+ * @G_OPTION_FLAG_NOALIAS: This flag turns off the automatic conflict resolution which prefixes long option names with <literal>groupname-</literal> if there is a conflict. This option should only be used in situations where aliasing is necessary to model some legacy commandline interface. It is not safe to use this option, unless all option groups are under your direct control. Since 2.8.
+ *
+ * Flags which modify individual options.
+ */
+
+
+/**
+ * GOptionGroup:
+ *
+ * A <structname>GOptionGroup</structname> struct defines the options in a single
+ * group. The struct has only private fields and should not be directly accessed.
+ *
+ * All options in a group share the same translation function. Libraries which
+ * need to parse commandline options are expected to provide a function for
+ * getting a <structname>GOptionGroup</structname> holding their options, which
+ * the application can then add to its #GOptionContext.
+ */
+
+
+/**
+ * GOptionParseFunc:
+ * @context: The active #GOptionContext
+ * @group: The group to which the function belongs
+ * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
+ * @error: A return location for error details
+ *
+ * The type of function that can be called before and after parsing.
+ *
+ * occurred, in which case @error should be set with g_set_error()
+ *
+ * Returns: %TRUE if the function completed successfully, %FALSE if an error
+ */
+
+
+/**
+ * GParamFlags:
+ * @G_PARAM_READABLE: the parameter is readable
+ * @G_PARAM_WRITABLE: the parameter is writable
+ * @G_PARAM_CONSTRUCT: the parameter will be set upon object construction
+ * @G_PARAM_CONSTRUCT_ONLY: the parameter will only be set upon object construction
+ * @G_PARAM_LAX_VALIDATION: upon parameter conversion (see g_param_value_convert()) strict validation is not required
+ * @G_PARAM_STATIC_NAME: the string used as name when constructing the parameter is guaranteed to remain valid and unmodified for the lifetime of the parameter. Since 2.8
+ * @G_PARAM_STATIC_NICK: the string used as nick when constructing the parameter is guaranteed to remain valid and unmmodified for the lifetime of the parameter. Since 2.8
+ * @G_PARAM_STATIC_BLURB: the string used as blurb when constructing the parameter is guaranteed to remain valid and unmodified for the lifetime of the parameter. Since 2.8
+ * @G_PARAM_PRIVATE: internal
+ * @G_PARAM_DEPRECATED: the parameter is deprecated and will be removed in a future version. A warning will be generated if it is used while running with G_ENABLE_DIAGNOSTIC=1. Since: 2.26
+ *
+ * Through the #GParamFlags flag values, certain aspects of parameters
+ * can be configured.
+ */
+
+
+/**
+ * GParamSpec:
+ * @g_type_instance: private #GTypeInstance portion
+ * @name: name of this parameter: always an interned string
+ * @flags: #GParamFlags flags for this parameter
+ * @value_type: the #GValue type for this parameter
+ * @owner_type: #GType type that uses (introduces) this parameter
+ *
+ * All other fields of the <structname>GParamSpec</structname> struct are private and
+ * should not be used directly.
+ */
+
+
+/**
+ * GParamSpecBoolean:
+ * @parent_instance: private #GParamSpec portion
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for boolean properties.
+ */
+
+
+/**
+ * GParamSpecBoxed:
+ * @parent_instance: private #GParamSpec portion
+ *
+ * A #GParamSpec derived structure that contains the meta data for boxed properties.
+ */
+
+
+/**
+ * GParamSpecChar:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for character properties.
+ */
+
+
+/**
+ * GParamSpecClass:
+ * @g_type_class: the parent class
+ * @value_type: the #GValue type for this parameter
+ * @finalize: The instance finalization function (optional), should chain up to the finalize method of the parent class.
+ * @value_set_default: Resets a @value to the default value for this type (recommended, the default is g_value_reset()), see g_param_value_set_default().
+ * @value_validate: Ensures that the contents of @value comply with the specifications set out by this type (optional), see g_param_value_validate().
+ * @values_cmp: Compares @value1 with @value2 according to this type (recommended, the default is memcmp()), see g_param_values_cmp().
+ *
+ * The class structure for the <structname>GParamSpec</structname> type.
+ * Normally, <structname>GParamSpec</structname> classes are filled by
+ * g_param_type_register_static().
+ */
+
+
+/**
+ * GParamSpecDouble:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * @epsilon: values closer than @epsilon will be considered identical by g_param_values_cmp(); the default value is 1e-90.
+ *
+ * A #GParamSpec derived structure that contains the meta data for double properties.
+ */
+
+
+/**
+ * GParamSpecEnum:
+ * @parent_instance: private #GParamSpec portion
+ * @enum_class: the #GEnumClass for the enum
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for enum
+ * properties.
+ */
+
+
+/**
+ * GParamSpecFlags:
+ * @parent_instance: private #GParamSpec portion
+ * @flags_class: the #GFlagsClass for the flags
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for flags
+ * properties.
+ */
+
+
+/**
+ * GParamSpecFloat:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * @epsilon: values closer than @epsilon will be considered identical by g_param_values_cmp(); the default value is 1e-30.
+ *
+ * A #GParamSpec derived structure that contains the meta data for float properties.
+ */
+
+
+/**
+ * GParamSpecGType:
+ * @parent_instance: private #GParamSpec portion
+ * @is_a_type: a #GType whose subtypes can occur as values
+ *
+ * A #GParamSpec derived structure that contains the meta data for #GType properties.
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * GParamSpecInt:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for integer properties.
+ */
+
+
+/**
+ * GParamSpecInt64:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for 64bit integer properties.
+ */
+
+
+/**
+ * GParamSpecLong:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for long integer properties.
+ */
+
+
+/**
+ * GParamSpecObject:
+ * @parent_instance: private #GParamSpec portion
+ *
+ * A #GParamSpec derived structure that contains the meta data for object properties.
+ */
+
+
+/**
+ * GParamSpecOverride:
+ *
+ * This is a type of #GParamSpec type that simply redirects operations to
+ * another paramspec.  All operations other than getting or
+ * setting the value are redirected, including accessing the nick and
+ * blurb, validating a value, and so forth. See
+ * g_param_spec_get_redirect_target() for retrieving the overidden
+ * property. #GParamSpecOverride is used in implementing
+ * g_object_class_override_property(), and will not be directly useful
+ * unless you are implementing a new base type similar to GObject.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * GParamSpecParam:
+ * @parent_instance: private #GParamSpec portion
+ *
+ * A #GParamSpec derived structure that contains the meta data for %G_TYPE_PARAM
+ * properties.
+ */
+
+
+/**
+ * GParamSpecPointer:
+ * @parent_instance: private #GParamSpec portion
+ *
+ * A #GParamSpec derived structure that contains the meta data for pointer properties.
+ */
+
+
+/**
+ * GParamSpecPool:
+ *
+ * A #GParamSpecPool maintains a collection of #GParamSpec<!-- -->s which can be
+ * quickly accessed by owner and name. The implementation of the #GObject property
+ * system uses such a pool to store the #GParamSpecs of the properties all object
+ * types.
+ */
+
+
+/**
+ * GParamSpecString:
+ * @parent_instance: private #GParamSpec portion
+ * @default_value: default value for the property specified
+ * @cset_first: a string containing the allowed values for the first byte
+ * @cset_nth: a string containing the allowed values for the subsequent bytes
+ * @substitutor: the replacement byte for bytes which don't match @cset_first or @cset_nth.
+ * @null_fold_if_empty: replace empty string by %NULL
+ * @ensure_non_null: replace %NULL strings by an empty string
+ *
+ * A #GParamSpec derived structure that contains the meta data for string
+ * properties.
+ */
+
+
+/**
+ * GParamSpecTypeInfo:
+ * @instance_size: Size of the instance (object) structure.
+ * @n_preallocs: Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the <link linkend="glib-Memory-Slices">slice allocator</link> now.
+ * @instance_init: Location of the instance initialization function (optional).
+ * @value_type: The #GType of values conforming to this #GParamSpec
+ * @finalize: The instance finalization function (optional).
+ * @value_set_default: Resets a @value to the default value for @pspec (recommended, the default is g_value_reset()), see g_param_value_set_default().
+ * @value_validate: Ensures that the contents of @value comply with the specifications set out by @pspec (optional), see g_param_value_validate().
+ * @values_cmp: Compares @value1 with @value2 according to @pspec (recommended, the default is memcmp()), see g_param_values_cmp().
+ *
+ * This structure is used to provide the type system with the information
+ * required to initialize and destruct (finalize) a parameter's class and
+ * instances thereof.
+ * The initialized structure is passed to the g_param_type_register_static()
+ * The type system will perform a deep copy of this structure, so its memory
+ * does not need to be persistent across invocation of
+ * g_param_type_register_static().
+ */
+
+
+/**
+ * GParamSpecUChar:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for unsigned character properties.
+ */
+
+
+/**
+ * GParamSpecUInt:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for unsigned integer properties.
+ */
+
+
+/**
+ * GParamSpecUInt64:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for unsigned 64bit integer properties.
+ */
+
+
+/**
+ * GParamSpecULong:
+ * @parent_instance: private #GParamSpec portion
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for unsigned long integer properties.
+ */
+
+
+/**
+ * GParamSpecUnichar:
+ * @parent_instance: private #GParamSpec portion
+ * @default_value: default value for the property specified
+ *
+ * A #GParamSpec derived structure that contains the meta data for unichar (unsigned integer) properties.
+ */
+
+
+/**
+ * GParamSpecValueArray:
+ * @parent_instance: private #GParamSpec portion
+ * @element_spec: a #GParamSpec describing the elements contained in arrays of this property, may be %NULL
+ * @fixed_n_elements: if greater than 0, arrays of this property will always have this many elements
+ *
+ * A #GParamSpec derived structure that contains the meta data for #GValueArray properties.
+ */
+
+
+/**
+ * GParamSpecVariant:
+ * @parent_instance: private #GParamSpec portion
+ * @type: a #GVariantType, or %NULL
+ * @default_value: a #GVariant, or %NULL
+ *
+ * A #GParamSpec derived structure that contains the meta data for #GVariant properties.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GParameter:
+ * @name: the parameter name
+ * @value: the parameter value
+ *
+ * The <structname>GParameter</structname> struct is an auxiliary structure used
+ * to hand parameter name/value pairs to g_object_newv().
+ */
+
+
+/**
+ * GPid:
+ *
+ * A type which is used to hold a process identification.
+ *
+ * On UNIX, processes are identified by a process id (an integer),
+ * while Windows uses process handles (which are pointers).
+ *
+ * GPid is used in GLib only for descendant processes spawned with
+ * the g_spawn functions.
+ */
+
+
+/**
+ * GPollFD:
+ * @fd: the file descriptor to poll (or a <type>HANDLE</type> on Win32)
+ * @events: a bitwise combination from #GIOCondition, specifying which events should be polled for. Typically for reading from a file descriptor you would use %G_IO_IN | %G_IO_HUP | %G_IO_ERR, and for writing you would use %G_IO_OUT | %G_IO_ERR.
+ * @revents: a bitwise combination of flags from #GIOCondition, returned from the poll() function to indicate which events occurred.
+ *
+ * Represents a file descriptor, which events to poll for, and which events
+ * occurred.
+ */
+
+
+/**
+ * GPollFunc:
+ * @ufds: an array of #GPollFD elements
+ * @nfsd: the number of elements in @ufds
+ * @timeout_: the maximum time to wait for an event of the file descriptors. A negative value indicates an infinite timeout.
+ *
+ * Specifies the type of function passed to g_main_context_set_poll_func().
+ * The semantics of the function should match those of the poll() system call.
+ *
+ * reported, or -1 if an error occurred.
+ *
+ * Returns: the number of #GPollFD elements which have events or errors
+ */
+
+
+/**
+ * GPrintFunc:
+ * @string: the message to output
+ *
+ * Specifies the type of the print handler functions.
+ * These are called with the complete formatted string to output.
+ */
+
+
+/**
+ * GQueue:
+ * @head: a pointer to the first element of the queue
+ * @tail: a pointer to the last element of the queue
+ * @length: the number of elements in the queue
+ *
+ * Contains the public fields of a
+ * <link linkend="glib-Double-ended-Queues">Queue</link>.
+ */
+
+
+/**
+ * GRegex:
+ *
+ * A GRegex is the "compiled" form of a regular expression pattern. This
+ * structure is opaque and its fields cannot be accessed directly.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * GRegexCompileFlags:
+ * @G_REGEX_CASELESS: Letters in the pattern match both upper- and lowercase letters. This option can be changed within a pattern by a "(?i)" option setting.
+ * @G_REGEX_MULTILINE: By default, GRegex treats the strings as consisting of a single line of characters (even if it actually contains newlines). The "start of line" metacharacter ("^") matches only at the start of the string, while the "end of line" metacharacter ("$") matches only at the end of the string, or before a terminating newline (unless #G_REGEX_DOLLAR_ENDONLY is set). When #G_REGEX_MULTILINE is set, the "start of line" and "end of line" constructs match immediately following or immediately before any newline in the string, respectively, as well as at the very start and end. This can be changed within a pattern by a "(?m)" option setting.
+ * @G_REGEX_DOTALL: A dot metacharater (".") in the pattern matches all characters, including newlines. Without it, newlines are excluded. This option can be changed within a pattern by a ("?s") option setting.
+ * @G_REGEX_EXTENDED: Whitespace data characters in the pattern are totally ignored except when escaped or inside a character class. Whitespace does not include the VT character (code 11). In addition, characters between an unescaped "#" outside a character class and the next newline character, inclusive, are also ignored. This can be changed within a pattern by a "(?x)" option setting.
+ * @G_REGEX_ANCHORED: The pattern is forced to be "anchored", that is, it is constrained to match only at the first matching point in the string that is being searched. This effect can also be achieved by appropriate constructs in the pattern itself such as the "^" metacharater.
+ * @G_REGEX_DOLLAR_ENDONLY: A dollar metacharacter ("$") in the pattern matches only at the end of the string. Without this option, a dollar also matches immediately before the final character if it is a newline (but not before any other newlines). This option is ignored if #G_REGEX_MULTILINE is set.
+ * @G_REGEX_UNGREEDY: Inverts the "greediness" of the quantifiers so that they are not greedy by default, but become greedy if followed by "?". It can also be set by a "(?U)" option setting within the pattern.
+ * @G_REGEX_RAW: Usually strings must be valid UTF-8 strings, using this flag they are considered as a raw sequence of bytes. @G_REGEX_NO_AUTO_CAPTURE: Disables the use of numbered capturing parentheses in the pattern. Any opening parenthesis that is not followed by "?" behaves as if it were followed by "?:" but named parentheses can still be used for capturing (and they acquire numbers in the usual way).
+ * @G_REGEX_OPTIMIZE: Optimize the regular expression. If the pattern will be used many times, then it may be worth the effort to optimize it to improve the speed of matches.
+ * @G_REGEX_DUPNAMES: Names used to identify capturing subpatterns need not be unique. This can be helpful for certain types of pattern when it is known that only one instance of the named subpattern can ever be matched.
+ * @G_REGEX_NEWLINE_CR: Usually any newline character is recognized, if this option is set, the only recognized newline character is '\r'.
+ * @G_REGEX_NEWLINE_LF: Usually any newline character is recognized, if this option is set, the only recognized newline character is '\n'.
+ * @G_REGEX_NEWLINE_CRLF: Usually any newline character is recognized, if this option is set, the only recognized newline character sequence is '\r\n'.
+ *
+ * Flags specifying compile-time options.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * GRegexError:
+ * @G_REGEX_ERROR_COMPILE: Compilation of the regular expression failed.
+ * @G_REGEX_ERROR_OPTIMIZE: Optimization of the regular expression failed.
+ * @G_REGEX_ERROR_REPLACE: Replacement failed due to an ill-formed replacement string.
+ * @G_REGEX_ERROR_MATCH: The match process failed.
+ * @G_REGEX_ERROR_INTERNAL: Internal error of the regular expression engine. Since 2.16
+ * @G_REGEX_ERROR_STRAY_BACKSLASH: "\\" at end of pattern. Since 2.16
+ * @G_REGEX_ERROR_MISSING_CONTROL_CHAR: "\\c" at end of pattern. Since 2.16
+ * @G_REGEX_ERROR_UNRECOGNIZED_ESCAPE: Unrecognized character follows "\\". Since 2.16
+ * @G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER: Numbers out of order in "{}" quantifier. Since 2.16
+ * @G_REGEX_ERROR_QUANTIFIER_TOO_BIG: Number too big in "{}" quantifier. Since 2.16
+ * @G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS: Missing terminating "]" for character class. Since 2.16
+ * @G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS: Invalid escape sequence in character class. Since 2.16
+ * @G_REGEX_ERROR_RANGE_OUT_OF_ORDER: Range out of order in character class. Since 2.16
+ * @G_REGEX_ERROR_NOTHING_TO_REPEAT: Nothing to repeat. Since 2.16
+ * @G_REGEX_ERROR_UNRECOGNIZED_CHARACTER: Unrecognized character after "(?", "(?&lt;" or "(?P". Since 2.16
+ * @G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS: POSIX named classes are supported only within a class. Since 2.16
+ * @G_REGEX_ERROR_UNMATCHED_PARENTHESIS: Missing terminating ")" or ")" without opening "(". Since 2.16
+ * @G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE: Reference to non-existent subpattern. Since 2.16
+ * @G_REGEX_ERROR_UNTERMINATED_COMMENT: Missing terminating ")" after comment. Since 2.16
+ * @G_REGEX_ERROR_EXPRESSION_TOO_LARGE: Regular expression too large. Since 2.16
+ * @G_REGEX_ERROR_MEMORY_ERROR: Failed to get memory. Since 2.16
+ * @G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND: Lookbehind assertion is not fixed length. Since 2.16
+ * @G_REGEX_ERROR_MALFORMED_CONDITION: Malformed number or name after "(?(". Since 2.16
+ * @G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES: Conditional group contains more than two branches. Since 2.16
+ * @G_REGEX_ERROR_ASSERTION_EXPECTED: Assertion expected after "(?(". Since 2.16
+ * @G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME: Unknown POSIX class name. Since 2.16
+ * @G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED: POSIX collating elements are not supported. Since 2.16
+ * @G_REGEX_ERROR_HEX_CODE_TOO_LARGE: Character value in "\\x{...}" sequence is too large. Since 2.16
+ * @G_REGEX_ERROR_INVALID_CONDITION: Invalid condition "(?(0)". Since 2.16
+ * @G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND: \\C not allowed in lookbehind assertion. Since 2.16
+ * @G_REGEX_ERROR_INFINITE_LOOP: Recursive call could loop indefinitely. Since 2.16
+ * @G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR: Missing terminator in subpattern name. Since 2.16
+ * @G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME: Two named subpatterns have the same name. Since 2.16
+ * @G_REGEX_ERROR_MALFORMED_PROPERTY: Malformed "\\P" or "\\p" sequence. Since 2.16
+ * @G_REGEX_ERROR_UNKNOWN_PROPERTY: Unknown property name after "\\P" or "\\p". Since 2.16
+ * @G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG: Subpattern name is too long (maximum 32 characters). Since 2.16
+ * @G_REGEX_ERROR_TOO_MANY_SUBPATTERNS: Too many named subpatterns (maximum 10,000). Since 2.16
+ * @G_REGEX_ERROR_INVALID_OCTAL_VALUE: Octal value is greater than "\\377". Since 2.16
+ * @G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE: "DEFINE" group contains more than one branch. Since 2.16
+ * @G_REGEX_ERROR_DEFINE_REPETION: Repeating a "DEFINE" group is not allowed. Since 2.16
+ * @G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS: Inconsistent newline options. Since 2.16
+ * @G_REGEX_ERROR_MISSING_BACK_REFERENCE: "\\g" is not followed by a braced name or an optionally braced non-zero number. Since 2.16
+ *
+ * Error codes returned by regular expressions functions.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * GRegexEvalCallback:
+ * @match_info: the #GMatchInfo generated by the match. Use g_match_info_get_regex() and g_match_info_get_string() if you need the #GRegex or the matched string.
+ * @result: a #GString containing the new string
+ * @user_data: user data passed to g_regex_replace_eval()
+ *
+ * Specifies the type of the function passed to g_regex_replace_eval().
+ * It is called for each occurrence of the pattern in the string passed
+ * to g_regex_replace_eval(), and it should append the replacement to
+ * @result.
+ *
+ * Returns: %FALSE to continue the replacement process, %TRUE to stop it
+ * Since: 2.14
+ */
+
+
+/**
+ * GRegexMatchFlags:
+ * @G_REGEX_MATCH_ANCHORED: The pattern is forced to be "anchored", that is, it is constrained to match only at the first matching point in the string that is being searched. This effect can also be achieved by appropriate constructs in the pattern itself such as the "^" metacharater.
+ * @G_REGEX_MATCH_NOTBOL: Specifies that first character of the string is not the beginning of a line, so the circumflex metacharacter should not match before it. Setting this without #G_REGEX_MULTILINE (at compile time) causes circumflex never to match. This option affects only the behaviour of the circumflex metacharacter, it does not affect "\A".
+ * @G_REGEX_MATCH_NOTEOL: Specifies that the end of the subject string is not the end of a line, so the dollar metacharacter should not match it nor (except in multiline mode) a newline immediately before it. Setting this without #G_REGEX_MULTILINE (at compile time) causes dollar never to match. This option affects only the behaviour of the dollar metacharacter, it does not affect "\Z" or "\z".
+ * @G_REGEX_MATCH_NOTEMPTY: An empty string is not considered to be a valid match if this option is set. If there are alternatives in the pattern, they are tried. If all the alternatives match the empty string, the entire match fails. For example, if the pattern "a?b?" is applied to a string not beginning with "a" or "b", it matches the empty string at the start of the string. With this flag set, this match is not valid, so GRegex searches further into the string for occurrences of "a" or "b".
+ * @G_REGEX_MATCH_PARTIAL: Turns on the partial matching feature, for more documentation on partial matching see g_match_info_is_partial_match().
+ * @G_REGEX_MATCH_NEWLINE_CR: Overrides the newline definition set when creating a new #GRegex, setting the '\r' character as line terminator.
+ * @G_REGEX_MATCH_NEWLINE_LF: Overrides the newline definition set when creating a new #GRegex, setting the '\n' character as line terminator.
+ * @G_REGEX_MATCH_NEWLINE_CRLF: Overrides the newline definition set when creating a new #GRegex, setting the '\r\n' characters as line terminator.
+ * @G_REGEX_MATCH_NEWLINE_ANY: Overrides the newline definition set when creating a new #GRegex, any newline character or character sequence is recognized.
+ *
+ * Flags specifying match-time options.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * GSignalAccumulator:
+ * @ihint: Signal invocation hint, see #GSignalInvocationHint.
+ * @return_accu: Accumulator to collect callback return values in, this is the return value of the current signal emission.
+ * @handler_return: A #GValue holding the return value of the signal handler.
+ * @data: Callback data that was specified when creating the signal.
+ *
+ * The signal accumulator is a special callback function that can be used
+ * to collect return values of the various callbacks that are called
+ * during a signal emission. The signal accumulator is specified at signal
+ * creation time, if it is left %NULL, no accumulation of callback return
+ * values is performed. The return value of signal emissions is then the
+ * value returned by the last callback.
+ *
+ * should be aborted. Returning %FALSE means to abort the
+ * current emission and %TRUE is returned for continuation.
+ *
+ * Returns: The accumulator function returns whether the signal emission
+ */
+
+
+/**
+ * GSignalCMarshaller:
+ *
+ * This is the signature of marshaller functions, required to marshall
+ * arrays of parameter values to signal emissions into C language callback
+ * invocations. It is merely an alias to #GClosureMarshal since the #GClosure
+ * mechanism takes over responsibility of actual function invocation for the
+ * signal system.
+ */
+
+
+/**
+ * GSignalCVaMarshaller:
+ *
+ * This is the signature of va_list marshaller functions, an optional
+ * marshaller that can be used in some situations to avoid
+ * marshalling the signal argument into GValues.
+ */
+
+
+/**
+ * GSignalEmissionHook:
+ * @ihint: Signal invocation hint, see #GSignalInvocationHint.
+ * @n_param_values: the number of parameters to the function, including the instance on which the signal was emitted.
+ * @param_values: (array length=n_param_values): the instance on which the signal was emitted, followed by the parameters of the emission.
+ * @data: user data associated with the hook.
+ *
+ * A simple function pointer to get invoked when the signal is emitted. This
+ * allows you to tie a hook to the signal type, so that it will trap all
+ * emissions of that signal, from any object.
+ *
+ * You may not attach these to signals created with the #G_SIGNAL_NO_HOOKS flag.
+ *
+ * hook is disconnected (and destroyed).
+ *
+ * Returns: whether it wants to stay connected. If it returns %FALSE, the signal
+ */
+
+
+/**
+ * GSignalFlags:
+ * @G_SIGNAL_RUN_FIRST: Invoke the object method handler in the first emission stage.
+ * @G_SIGNAL_RUN_LAST: Invoke the object method handler in the third emission stage.
+ * @G_SIGNAL_RUN_CLEANUP: Invoke the object method handler in the last emission stage.
+ * @G_SIGNAL_NO_RECURSE: 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.
+ * @G_SIGNAL_DETAILED: This signal supports "::detail" appendices to the signal name upon handler connections and emissions.
+ * @G_SIGNAL_ACTION: Action signals are signals that may freely be emitted on alive objects from user code via g_signal_emit() 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.
+ * @G_SIGNAL_NO_HOOKS: No emissions hooks are supported for this signal.
+ * @G_SIGNAL_MUST_COLLECT: Varargs signal emission will always collect the arguments, even if there are no signal handlers connected.  Since 2.30.
+ * @G_SIGNAL_DEPRECATED: The signal is deprecated and will be removed in a future version. A warning will be generated if it is connected while running with G_ENABLE_DIAGNOSTIC=1.  Since 2.32.
+ *
+ * The signal flags are used to specify a signal's behaviour, the overall
+ * signal description outlines how especially the RUN flags control the
+ * stages of a signal emission.
+ */
+
+
+/**
+ * GSignalInvocationHint:
+ * @signal_id: The signal id of the signal invoking the callback
+ * @detail: The detail passed on for this emission
+ * @run_type: The stage the signal emission is currently in, this field will contain one of %G_SIGNAL_RUN_FIRST, %G_SIGNAL_RUN_LAST or %G_SIGNAL_RUN_CLEANUP.
+ *
+ * The #GSignalInvocationHint structure is used to pass on additional information
+ * to callbacks during a signal emission.
+ */
+
+
+/**
+ * GSignalMatchType:
+ * @G_SIGNAL_MATCH_ID: The signal id must be equal.
+ * @G_SIGNAL_MATCH_DETAIL: The signal detail be equal.
+ * @G_SIGNAL_MATCH_CLOSURE: The closure must be the same.
+ * @G_SIGNAL_MATCH_FUNC: The C closure callback must be the same.
+ * @G_SIGNAL_MATCH_DATA: The closure data must be the same.
+ * @G_SIGNAL_MATCH_UNBLOCKED: Only unblocked signals may matched.
+ *
+ * The match types specify what g_signal_handlers_block_matched(),
+ * g_signal_handlers_unblock_matched() and g_signal_handlers_disconnect_matched()
+ * match signals by.
+ */
+
+
+/**
+ * GSignalQuery:
+ * @signal_id: The signal id of the signal being queried, or 0 if the signal to be queried was unknown.
+ * @signal_name: The signal name.
+ * @itype: The interface/instance type that this signal can be emitted for.
+ * @signal_flags: The signal flags as passed in to g_signal_new().
+ * @return_type: The return type for user callbacks.
+ * @n_params: The number of parameters that user callbacks take.
+ * @param_types: The individual parameter types for user callbacks, note that the effective callback signature is: <programlisting> @return_type callback (#gpointer     data1, [param_types param_names,] gpointer     data2); </programlisting>
+ *
+ * A structure holding in-depth information for a specific signal. It is
+ * filled in by the g_signal_query() function.
+ */
+
+
+/**
+ * GSource:
+ *
+ * The <structname>GSource</structname> struct is an opaque data type
+ * representing an event source.
+ */
+
+
+/**
+ * GSourceCallbackFuncs:
+ * @ref: Called when a reference is added to the callback object
+ * @unref: Called when a reference to the callback object is dropped
+ * @get: Called to extract the callback function and data from the callback object. The <structname>GSourceCallbackFuncs</structname> struct contains functions for managing callback objects.
+ *
+ *
+ */
+
+
+/**
+ * GSourceDummyMarshal:
+ *
+ * This is just a placeholder for #GClosureMarshal,
+ * which cannot be used here for dependency reasons.
+ */
+
+
+/**
+ * GSourceFunc:
+ * @user_data: data passed to the function, set when the source was created with one of the above functions
+ *
+ * Specifies the type of function passed to g_timeout_add(),
+ * g_timeout_add_full(), g_idle_add(), and g_idle_add_full().
+ *
+ * Returns: %FALSE if the source should be removed
+ */
+
+
+/**
+ * GSourceFuncs:
+ * @prepare: Called before all the file descriptors are polled. If the source can determine that it is ready here (without waiting for the results of the poll() call) it should return %TRUE. It can also return a @timeout_ value which should be the maximum timeout (in milliseconds) which should be passed to the poll() call. The actual timeout used will be -1 if all sources returned -1, or it will be the minimum of all the @timeout_ values returned which were >= 0.
+ * @check: Called after all the file descriptors are polled. The source should return %TRUE if it is ready to be dispatched. Note that some time may have passed since the previous prepare function was called, so the source should be checked again here.
+ * @dispatch: Called to dispatch the event source, after it has returned %TRUE in either its @prepare or its @check function. The @dispatch function is passed in a callback function and data. The callback function may be %NULL if the source was never connected to a callback using g_source_set_callback(). The @dispatch function should call the callback function with @user_data and whatever additional parameters are needed for this type of event source.
+ * @finalize: Called when the source is finalized.
+ *
+ * The <structname>GSourceFuncs</structname> struct contains a table of
+ * functions used to handle event sources in a generic manner.
+ *
+ * For idle sources, the prepare and check functions always return %TRUE
+ * to indicate that the source is always ready to be processed. The prepare
+ * function also returns a timeout value of 0 to ensure that the poll() call
+ * doesn't block (since that would be time wasted which could have been spent
+ * running the idle function).
+ *
+ * For timeout sources, the prepare and check functions both return %TRUE
+ * if the timeout interval has expired. The prepare function also returns
+ * a timeout value to ensure that the poll() call doesn't block too long
+ * and miss the next timeout.
+ *
+ * For file descriptor sources, the prepare function typically returns %FALSE,
+ * since it must wait until poll() has been called before it knows whether
+ * any events need to be processed. It sets the returned timeout to -1 to
+ * indicate that it doesn't mind how long the poll() call blocks. In the
+ * check function, it tests the results of the poll() call to see if the
+ * required condition has been met, and returns %TRUE if so.
+ */
+
+
+/**
+ * GSpawnChildSetupFunc:
+ * @user_data: user data to pass to the function.
+ *
+ * Specifies the type of the setup function passed to g_spawn_async(),
+ * g_spawn_sync() and g_spawn_async_with_pipes(), which can, in very
+ * limited ways, be used to affect the child's execution.
+ *
+ * On POSIX platforms, the function is called in the child after GLib
+ * has performed all the setup it plans to perform, but before calling
+ * exec(). Actions taken in this function will only affect the child,
+ * not the parent.
+ *
+ * On Windows, the function is called in the parent. Its usefulness on
+ * Windows is thus questionable. In many cases executing the child setup
+ * function in the parent can have ill effects, and you should be very
+ * careful when porting software to Windows that uses child setup
+ * functions.
+ *
+ * However, even on POSIX, you are extremely limited in what you can
+ * safely do from a #GSpawnChildSetupFunc, because any mutexes that
+ * were held by other threads in the parent process at the time of the
+ * fork() will still be locked in the child process, and they will
+ * never be unlocked (since the threads that held them don't exist in
+ * the child). POSIX allows only async-signal-safe functions (see
+ * <citerefentry><refentrytitle>signal</refentrytitle><manvolnum>7</manvolnum></citerefentry>)
+ * to be called in the child between fork() and exec(), which
+ * drastically limits the usefulness of child setup functions.
+ *
+ * In particular, it is not safe to call any function which may
+ * call malloc(), which includes POSIX functions such as setenv().
+ * If you need to set up the child environment differently from
+ * the parent, you should use g_get_environ(), g_environ_setenv(),
+ * and g_environ_unsetenv(), and then pass the complete environment
+ * list to the <literal>g_spawn...</literal> function.
+ */
+
+
+/**
+ * GSpawnError:
+ * @G_SPAWN_ERROR_FORK: Fork failed due to lack of memory.
+ * @G_SPAWN_ERROR_READ: Read or select on pipes failed.
+ * @G_SPAWN_ERROR_CHDIR: Changing to working directory failed.
+ * @G_SPAWN_ERROR_ACCES: execv() returned <literal>EACCES</literal>
+ * @G_SPAWN_ERROR_PERM: execv() returned <literal>EPERM</literal>
+ * @G_SPAWN_ERROR_TOO_BIG: execv() returned <literal>E2BIG</literal>
+ * @G_SPAWN_ERROR_2BIG: deprecated alias for %G_SPAWN_ERROR_TOO_BIG
+ * @G_SPAWN_ERROR_NOEXEC: execv() returned <literal>ENOEXEC</literal>
+ * @G_SPAWN_ERROR_NAMETOOLONG: execv() returned <literal>ENAMETOOLONG</literal>
+ * @G_SPAWN_ERROR_NOENT: execv() returned <literal>ENOENT</literal>
+ * @G_SPAWN_ERROR_NOMEM: execv() returned <literal>ENOMEM</literal>
+ * @G_SPAWN_ERROR_NOTDIR: execv() returned <literal>ENOTDIR</literal>
+ * @G_SPAWN_ERROR_LOOP: execv() returned <literal>ELOOP</literal>
+ * @G_SPAWN_ERROR_TXTBUSY: execv() returned <literal>ETXTBUSY</literal>
+ * @G_SPAWN_ERROR_IO: execv() returned <literal>EIO</literal>
+ * @G_SPAWN_ERROR_NFILE: execv() returned <literal>ENFILE</literal>
+ * @G_SPAWN_ERROR_MFILE: execv() returned <literal>EMFILE</literal>
+ * @G_SPAWN_ERROR_INVAL: execv() returned <literal>EINVAL</literal>
+ * @G_SPAWN_ERROR_ISDIR: execv() returned <literal>EISDIR</literal>
+ * @G_SPAWN_ERROR_LIBBAD: execv() returned <literal>ELIBBAD</literal>
+ * @G_SPAWN_ERROR_FAILED: Some other fatal failure, <literal>error-&gt;message</literal> should explain.
+ *
+ * Error codes returned by spawning processes.
+ */
+
+
+/**
+ * GSpawnFlags:
+ * @G_SPAWN_LEAVE_DESCRIPTORS_OPEN: the parent's open file descriptors will be inherited by the child; otherwise all descriptors except stdin/stdout/stderr will be closed before calling exec() in the child.
+ * @G_SPAWN_DO_NOT_REAP_CHILD: the child will not be automatically reaped; you must use g_child_watch_add() yourself (or call waitpid() or handle <literal>SIGCHLD</literal> yourself), or the child will become a zombie.
+ * @G_SPAWN_SEARCH_PATH: <literal>argv[0]</literal> need not be an absolute path, it will be looked for in the user's <envar>PATH</envar>.
+ * @G_SPAWN_STDOUT_TO_DEV_NULL: the child's standard output will be discarded, instead of going to the same location as the parent's standard output.
+ * @G_SPAWN_STDERR_TO_DEV_NULL: the child's standard error will be discarded.
+ * @G_SPAWN_CHILD_INHERITS_STDIN: the child will inherit the parent's standard input (by default, the child's standard input is attached to <filename>/dev/null</filename>).
+ * @G_SPAWN_FILE_AND_ARGV_ZERO: the first element of <literal>argv</literal> is the file to execute, while the remaining elements are the actual argument vector to pass to the file. Normally g_spawn_async_with_pipes() uses <literal>argv[0]</literal> as the file to execute, and passes all of <literal>argv</literal> to the child.
+ *
+ * Flags passed to g_spawn_sync(), g_spawn_async() and g_spawn_async_with_pipes().
+ */
+
+
+/**
+ * GStrv:
+ *
+ * A C representable type name for #G_TYPE_STRV.
+ */
+
+
+/**
+ * GTestLogFatalFunc:
+ * @log_domain: the log domain of the message
+ * @log_level: the log level of the message (including the fatal and recursion flags)
+ * @message: the message to process
+ * @user_data: user data, set in g_test_log_set_fatal_handler()
+ *
+ * Specifies the prototype of fatal log handler functions.
+ *
+ * Returns: %TRUE if the program should abort, %FALSE otherwise
+ * Since: 2.22
+ */
+
+
+/**
+ * GTimeSpan:
+ *
+ * A value representing an interval of time, in microseconds.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * GTimeType:
+ * @G_TIME_TYPE_STANDARD: the time is in local standard time
+ * @G_TIME_TYPE_DAYLIGHT: the time is in local daylight time
+ * @G_TIME_TYPE_UNIVERSAL: the time is in UTC
+ *
+ * Disambiguates a given time in two ways.
+ *
+ * First, specifies if the given time is in universal or local time.
+ *
+ * Second, if the time is in local time, specifies if it is local
+ * standard time or local daylight time.  This is important for the case
+ * where the same local time occurs twice (during daylight savings time
+ * transitions, for example).
+ */
+
+
+/**
+ * GToggleNotify:
+ * @data: Callback data passed to g_object_add_toggle_ref()
+ * @object: The object on which g_object_add_toggle_ref() was called.
+ * @is_last_ref: %TRUE if the toggle reference is now the last reference to the object. %FALSE if the toggle reference was the last reference and there are now other references.
+ *
+ * A callback function used for notification when the state
+ * of a toggle reference changes. See g_object_add_toggle_ref().
+ */
+
+
+/**
+ * GTranslateFunc:
+ * @str: the untranslated string
+ * @data: user data specified when installing the function, e.g. in g_option_group_set_translate_func()
+ *
+ * The type of functions which are used to translate user-visible
+ * strings, for <option>--help</option> output.
+ *
+ * The returned string is owned by GLib and must not be freed.
+ *
+ * Returns: a translation of the string for the current locale.
+ */
+
+
+/**
+ * GType:
+ *
+ * A numerical value which represents the unique identifier of a registered
+ * type.
+ */
+
+
+/**
+ * GTypeCValue:
+ * @v_int: the field for holding integer values
+ * @v_long: the field for holding long integer values
+ * @v_int64: the field for holding 64 bit integer values
+ * @v_double: the field for holding floating point values
+ * @v_pointer: the field for holding pointers
+ *
+ * A union holding one collected value.
+ */
+
+
+/**
+ * GTypeClass:
+ *
+ * An opaque structure used as the base of all classes.
+ */
+
+
+/**
+ * GTypeClassCacheFunc:
+ * @cache_data: data that was given to the g_type_add_class_cache_func() call
+ * @g_class: The #GTypeClass structure which is unreferenced
+ *
+ * A callback function which is called when the reference count of a class
+ * drops to zero. It may use g_type_class_ref() to prevent the class from
+ * being freed. You should not call g_type_class_unref() from a
+ * #GTypeClassCacheFunc function to prevent infinite recursion, use
+ * g_type_class_unref_uncached() instead.
+ *
+ * The functions have to check the class id passed in to figure
+ * whether they actually want to cache the class of this type, since all
+ * classes are routed through the same #GTypeClassCacheFunc chain.
+ *
+ * called, %FALSE to continue.
+ *
+ * Returns: %TRUE to stop further #GTypeClassCacheFunc<!-- -->s from being
+ */
+
+
+/**
+ * GTypeDebugFlags:
+ * @G_TYPE_DEBUG_NONE: Print no messages.
+ * @G_TYPE_DEBUG_OBJECTS: Print messages about object bookkeeping.
+ * @G_TYPE_DEBUG_SIGNALS: Print messages about signal emissions.
+ * @G_TYPE_DEBUG_MASK: Mask covering all debug flags.
+ *
+ * The <type>GTypeDebugFlags</type> enumeration values can be passed to
+ * g_type_init_with_debug_flags() to trigger debugging messages during runtime.
+ * Note that the messages can also be triggered by setting the
+ * <envar>GOBJECT_DEBUG</envar> environment variable to a ':'-separated list of
+ * "objects" and "signals".
+ */
+
+
+/**
+ * GTypeFlags:
+ * @G_TYPE_FLAG_ABSTRACT: Indicates an abstract type. No instances can be created for an abstract type.
+ * @G_TYPE_FLAG_VALUE_ABSTRACT: Indicates an abstract value type, i.e. a type that introduces a value table, but can't be used for g_value_init().
+ *
+ * Bit masks used to check or determine characteristics of a type.
+ */
+
+
+/**
+ * GTypeFundamentalFlags:
+ * @G_TYPE_FLAG_CLASSED: Indicates a classed type.
+ * @G_TYPE_FLAG_INSTANTIATABLE: Indicates an instantiable type (implies classed).
+ * @G_TYPE_FLAG_DERIVABLE: Indicates a flat derivable type.
+ * @G_TYPE_FLAG_DEEP_DERIVABLE: Indicates a deep derivable type (implies derivable).
+ *
+ * Bit masks used to check or determine specific characteristics of a
+ * fundamental type.
+ */
+
+
+/**
+ * GTypeFundamentalInfo:
+ * @type_flags: #GTypeFundamentalFlags describing the characteristics of the fundamental type
+ *
+ * A structure that provides information to the type system which is
+ * used specifically for managing fundamental types.
+ */
+
+
+/**
+ * GTypeInfo:
+ * @class_size: Size of the class structure (required for interface, classed and instantiatable types).
+ * @base_init: Location of the base initialization function (optional).
+ * @base_finalize: Location of the base finalization function (optional).
+ * @class_init: Location of the class initialization function for classed and instantiatable types. Location of the default vtable inititalization function for interface types. (optional) This function is used both to fill in virtual functions in the class or default vtable, and to do type-specific setup such as registering signals and object properties.
+ * @class_finalize: Location of the class finalization function for classed and instantiatable types. Location fo the default vtable finalization function for interface types. (optional)
+ * @class_data: User-supplied data passed to the class init/finalize functions.
+ * @instance_size: Size of the instance (object) structure (required for instantiatable types only).
+ * @n_preallocs: Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the <link linkend="glib-Memory-Slices">slice allocator</link> now.
+ * @instance_init: Location of the instance initialization function (optional, for instantiatable types only).
+ * @value_table: A #GTypeValueTable function table for generic handling of GValues of this type (usually only useful for fundamental types).
+ *
+ * This structure is used to provide the type system with the information
+ * required to initialize and destruct (finalize) a type's class and
+ * its instances.
+ * The initialized structure is passed to the g_type_register_static() function
+ * (or is copied into the provided #GTypeInfo structure in the
+ * g_type_plugin_complete_type_info()). The type system will perform a deep
+ * copy of this structure, so its memory does not need to be persistent
+ * across invocation of g_type_register_static().
+ */
+
+
+/**
+ * GTypeInstance:
+ *
+ * An opaque structure used as the base of all type instances.
+ */
+
+
+/**
+ * GTypeInterface:
+ *
+ * An opaque structure used as the base of all interface types.
+ */
+
+
+/**
+ * GTypeInterfaceCheckFunc:
+ * @check_data: data passed to g_type_add_interface_check().
+ * @g_iface: the interface that has been initialized
+ *
+ * A callback called after an interface vtable is initialized.
+ * See g_type_add_interface_check().
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * GTypeModule:
+ * @name: the name of the module
+ *
+ * The members of the <structname>GTypeModule</structname> structure should not
+ * be accessed directly, except for the @name field.
+ */
+
+
+/**
+ * GTypeModuleClass:
+ * @parent_class: the parent class
+ * @load: loads the module and registers one or more types using g_type_module_register_type().
+ * @unload: unloads the module
+ *
+ * In order to implement dynamic loading of types based on #GTypeModule,
+ * the @load and @unload functions in #GTypeModuleClass must be implemented.
+ */
+
+
+/**
+ * GTypePlugin:
+ *
+ * The <structname>GTypePlugin</structname> typedef is used as a placeholder
+ * for objects that implement the <structname>GTypePlugin</structname>
+ * interface.
+ */
+
+
+/**
+ * GTypePluginClass:
+ * @use_plugin: Increases the use count of the plugin.
+ * @unuse_plugin: Decreases the use count of the plugin.
+ * @complete_type_info: Fills in the #GTypeInfo and #GTypeValueTable structs for the type. The structs are initialized with <literal>memset(s, 0, sizeof (s))</literal> before calling this function.
+ * @complete_interface_info: Fills in missing parts of the #GInterfaceInfo for the interface. The structs is initialized with <literal>memset(s, 0, sizeof (s))</literal> before calling this function.
+ *
+ * The #GTypePlugin interface is used by the type system in order to handle
+ * the lifecycle of dynamically loaded types.
+ */
+
+
+/**
+ * GTypePluginCompleteInterfaceInfo:
+ * @plugin: the #GTypePlugin
+ * @instance_type: the #GType of an instantiable type to which the interface is added
+ * @interface_type: the #GType of the interface whose info is completed
+ * @info: the #GInterfaceInfo to fill in
+ *
+ * The type of the @complete_interface_info function of #GTypePluginClass.
+ */
+
+
+/**
+ * GTypePluginCompleteTypeInfo:
+ * @plugin: the #GTypePlugin
+ * @g_type: the #GType whose info is completed
+ * @info: the #GTypeInfo struct to fill in
+ * @value_table: the #GTypeValueTable to fill in
+ *
+ * The type of the @complete_type_info function of #GTypePluginClass.
+ */
+
+
+/**
+ * GTypePluginUnuse:
+ * @plugin: the #GTypePlugin whose use count should be decreased
+ *
+ * The type of the @unuse_plugin function of #GTypePluginClass.
+ */
+
+
+/**
+ * GTypePluginUse:
+ * @plugin: the #GTypePlugin whose use count should be increased
+ *
+ * The type of the @use_plugin function of #GTypePluginClass, which gets called
+ * to increase the use count of @plugin.
+ */
+
+
+/**
+ * GTypeQuery:
+ * @type: the #GType value of the type.
+ * @type_name: the name of the type.
+ * @class_size: the size of the class structure.
+ * @instance_size: the size of the instance structure.
+ *
+ * A structure holding information for a specific type. It is
+ * filled in by the g_type_query() function.
+ */
+
+
+/**
+ * GTypeValueTable:
+ * @value_init: Default initialize @values contents by poking values directly into the value->data array. The data array of the #GValue passed into this function was zero-filled with <function>memset()</function>, so no care has to be taken to free any old contents. E.g. for the implementation of a string value that may never be %NULL, the implementation might look like: |[ value->data[0].v_pointer = g_strdup (""); ]|
+ * @value_free: Free any old contents that might be left in the data array of the passed in @value. No resources may remain allocated through the #GValue contents after this function returns. E.g. for our above string type: |[ // only free strings without a specific flag for static storage if (!(value->data[1].v_uint & G_VALUE_NOCOPY_CONTENTS)) g_free (value->data[0].v_pointer); ]|
+ * @value_copy: @dest_value is a #GValue with zero-filled data section and @src_value is a properly setup #GValue of same or derived type. The purpose of this function is to copy the contents of @src_value into @dest_value in a way, that even after @src_value has been freed, the contents of @dest_value remain valid. String type example: |[ dest_value->data[0].v_pointer = g_strdup (src_value->data[0].v_pointer); ]|
+ * @value_peek_pointer: If the value contents fit into a pointer, such as objects or strings, return this pointer, so the caller can peek at the current contents. To extend on our above string example: |[ return value->data[0].v_pointer; ]|
+ * @collect_format: A string format describing how to collect the contents of this value bit-by-bit. Each character in the format represents an argument to be collected, and the characters themselves indicate the type of the argument. Currently supported arguments are: <variablelist> <varlistentry><term /><listitem><para> 'i' - Integers. passed as collect_values[].v_int. </para></listitem></varlistentry> <varlistentry><term /><listitem><para> 'l' - Longs. passed as collect_values[].v_long. </para></listitem></varlistentry> <varlistentry><term /><listitem><para> 'd' - Doubles. passed as collect_values[].v_double. </para></listitem></varlistentry> <varlistentry><term /><listitem><para> 'p' - Pointers. passed as collect_values[].v_pointer. </para></listitem></varlistentry> </variablelist> It should be noted that for variable argument list construction, ANSI C promotes every type smaller than an integer to an int, and floats to doubles. So for collection of short int or char, 'i' needs to be used, and for collection of floats 'd'.
+ * @collect_value: The collect_value() function is responsible for converting the values collected from a variable argument list into contents suitable for storage in a GValue. This function should setup @value similar to value_init(); e.g. for a string value that does not allow %NULL pointers, it needs to either spew an error, or do an implicit conversion by storing an empty string. The @value passed in to this function has a zero-filled data array, so just like for value_init() it is guaranteed to not contain any old contents that might need freeing. @n_collect_values is exactly the string length of @collect_format, and @collect_values is an array of unions #GTypeCValue with length @n_collect_values, containing the collected values according to @collect_format. @collect_flags is an argument provided as a hint by the caller. It may contain the flag %G_VALUE_NOCOPY_CONTENTS indicating, that the collected value contents may be considered "static" for the duration of the @value lifetime. Thus an extra copy of the contents stored in @collect_values is not required for assignment to @value. For our above string example, we continue with: |[ if (!collect_values[0].v_pointer) value->data[0].v_pointer = g_strdup (""); else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { value->data[0].v_pointer = collect_values[0].v_pointer; // keep a flag for the value_free() implementation to not free this string value->data[1].v_uint = G_VALUE_NOCOPY_CONTENTS; } else value->data[0].v_pointer = g_strdup (collect_values[0].v_pointer); return NULL; ]| It should be noted, that it is generally a bad idea to follow the #G_VALUE_NOCOPY_CONTENTS hint for reference counted types. Due to reentrancy requirements and reference count assertions performed by the signal emission code, reference counts should always be incremented for reference counted contents stored in the value->data array.  To deviate from our string example for a moment, and taking a look at an exemplary implementation for collect_value() of #GObject: |[ if (collect_values[0].v_pointer) { GObject *object = G_OBJECT (collect_values[0].v_pointer); // never honour G_VALUE_NOCOPY_CONTENTS for ref-counted types value->data[0].v_pointer = g_object_ref (object); return NULL; } else return g_strdup_printf ("Object passed as invalid NULL pointer"); } ]| The reference count for valid objects is always incremented, regardless of @collect_flags. For invalid objects, the example returns a newly allocated string without altering @value. Upon success, collect_value() needs to return %NULL. If, however, an error condition occurred, collect_value() may spew an error by returning a newly allocated non-%NULL string, giving a suitable description of the error condition. The calling code makes no assumptions about the @value contents being valid upon error returns, @value is simply thrown away without further freeing. As such, it is a good idea to not allocate #GValue contents, prior to returning an error, however, collect_values() is not obliged to return a correctly setup @value for error returns, simply because any non-%NULL return is considered a fatal condition so further program behaviour is undefined.
+ * @lcopy_format: Format description of the arguments to collect for @lcopy_value, analogous to @collect_format. Usually, @lcopy_format string consists only of 'p's to provide lcopy_value() with pointers to storage locations.
+ * @lcopy_value: This function is responsible for storing the @value contents into arguments passed through a variable argument list which got collected into @collect_values according to @lcopy_format. @n_collect_values equals the string length of @lcopy_format, and @collect_flags may contain %G_VALUE_NOCOPY_CONTENTS. In contrast to collect_value(), lcopy_value() is obliged to always properly support %G_VALUE_NOCOPY_CONTENTS. Similar to collect_value() the function may prematurely abort by returning a newly allocated string describing an error condition. To complete the string example: |[ gchar **string_p = collect_values[0].v_pointer; if (!string_p) return g_strdup_printf ("string location passed as NULL"); if (collect_flags & G_VALUE_NOCOPY_CONTENTS) *string_p = value->data[0].v_pointer; else *string_p = g_strdup (value->data[0].v_pointer); ]| And an illustrative version of lcopy_value() for reference-counted types: |[ GObject **object_p = collect_values[0].v_pointer; if (!object_p) return g_strdup_printf ("object location passed as NULL"); if (!value->data[0].v_pointer) *object_p = NULL; else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) /&ast; always honour &ast;/ *object_p = value->data[0].v_pointer; else *object_p = g_object_ref (value->data[0].v_pointer); return NULL; ]|
+ *
+ * The #GTypeValueTable provides the functions required by the #GValue implementation,
+ * to serve as a container for values of a type.
+ */
+
+
+/**
+ * GUnicodeBreakType:
+ * @G_UNICODE_BREAK_MANDATORY: Mandatory Break (BK)
+ * @G_UNICODE_BREAK_CARRIAGE_RETURN: Carriage Return (CR)
+ * @G_UNICODE_BREAK_LINE_FEED: Line Feed (LF)
+ * @G_UNICODE_BREAK_COMBINING_MARK: Attached Characters and Combining Marks (CM)
+ * @G_UNICODE_BREAK_SURROGATE: Surrogates (SG)
+ * @G_UNICODE_BREAK_ZERO_WIDTH_SPACE: Zero Width Space (ZW)
+ * @G_UNICODE_BREAK_INSEPARABLE: Inseparable (IN)
+ * @G_UNICODE_BREAK_NON_BREAKING_GLUE: Non-breaking ("Glue") (GL)
+ * @G_UNICODE_BREAK_CONTINGENT: Contingent Break Opportunity (CB)
+ * @G_UNICODE_BREAK_SPACE: Space (SP)
+ * @G_UNICODE_BREAK_AFTER: Break Opportunity After (BA)
+ * @G_UNICODE_BREAK_BEFORE: Break Opportunity Before (BB)
+ * @G_UNICODE_BREAK_BEFORE_AND_AFTER: Break Opportunity Before and After (B2)
+ * @G_UNICODE_BREAK_HYPHEN: Hyphen (HY)
+ * @G_UNICODE_BREAK_NON_STARTER: Nonstarter (NS)
+ * @G_UNICODE_BREAK_OPEN_PUNCTUATION: Opening Punctuation (OP)
+ * @G_UNICODE_BREAK_CLOSE_PUNCTUATION: Closing Punctuation (CL)
+ * @G_UNICODE_BREAK_QUOTATION: Ambiguous Quotation (QU)
+ * @G_UNICODE_BREAK_EXCLAMATION: Exclamation/Interrogation (EX)
+ * @G_UNICODE_BREAK_IDEOGRAPHIC: Ideographic (ID)
+ * @G_UNICODE_BREAK_NUMERIC: Numeric (NU)
+ * @G_UNICODE_BREAK_INFIX_SEPARATOR: Infix Separator (Numeric) (IS)
+ * @G_UNICODE_BREAK_SYMBOL: Symbols Allowing Break After (SY)
+ * @G_UNICODE_BREAK_ALPHABETIC: Ordinary Alphabetic and Symbol Characters (AL)
+ * @G_UNICODE_BREAK_PREFIX: Prefix (Numeric) (PR)
+ * @G_UNICODE_BREAK_POSTFIX: Postfix (Numeric) (PO)
+ * @G_UNICODE_BREAK_COMPLEX_CONTEXT: Complex Content Dependent (South East Asian) (SA)
+ * @G_UNICODE_BREAK_AMBIGUOUS: Ambiguous (Alphabetic or Ideographic) (AI)
+ * @G_UNICODE_BREAK_UNKNOWN: Unknown (XX)
+ * @G_UNICODE_BREAK_NEXT_LINE: Next Line (NL)
+ * @G_UNICODE_BREAK_WORD_JOINER: Word Joiner (WJ)
+ * @G_UNICODE_BREAK_HANGUL_L_JAMO: Hangul L Jamo (JL)
+ * @G_UNICODE_BREAK_HANGUL_V_JAMO: Hangul V Jamo (JV)
+ * @G_UNICODE_BREAK_HANGUL_T_JAMO: Hangul T Jamo (JT)
+ * @G_UNICODE_BREAK_HANGUL_LV_SYLLABLE: Hangul LV Syllable (H2)
+ * @G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE: Hangul LVT Syllable (H3)
+ * @G_UNICODE_BREAK_CLOSE_PARANTHESIS: Closing Parenthesis (CP). Since 2.28
+ * @G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER: Conditional Japanese Starter (CJ). Since: 2.32
+ * @G_UNICODE_BREAK_HEBREW_LETTER: Hebrew Letter (HL). Since: 2.32
+ *
+ * These are the possible line break classifications.
+ *
+ * The five Hangul types were added in Unicode 4.1, so, has been
+ * introduced in GLib 2.10. Note that new types may be added in the future.
+ * Applications should be ready to handle unknown values.
+ * They may be regarded as %G_UNICODE_BREAK_UNKNOWN.
+ *
+ * See <ulink url="http://www.unicode.org/unicode/reports/tr14/">http://www.unicode.org/unicode/reports/tr14/</ulink>.
+ */
+
+
+/**
+ * GUnicodeScript:
+ * @G_UNICODE_SCRIPT_COMMON: a character used by multiple different scripts
+ * @G_UNICODE_SCRIPT_INHERITED: a mark glyph that takes its script from the i                             base glyph to which it is attached
+ * @G_UNICODE_SCRIPT_ARABIC: Arabic
+ * @G_UNICODE_SCRIPT_ARMENIAN: Armenian
+ * @G_UNICODE_SCRIPT_BENGALI: Bengali
+ * @G_UNICODE_SCRIPT_BOPOMOFO: Bopomofo
+ * @G_UNICODE_SCRIPT_CHEROKEE: Cherokee
+ * @G_UNICODE_SCRIPT_COPTIC: Coptic
+ * @G_UNICODE_SCRIPT_CYRILLIC: Cyrillic
+ * @G_UNICODE_SCRIPT_DESERET: Deseret
+ * @G_UNICODE_SCRIPT_DEVANAGARI: Devanagari
+ * @G_UNICODE_SCRIPT_ETHIOPIC: Ethiopic
+ * @G_UNICODE_SCRIPT_GEORGIAN: Georgian
+ * @G_UNICODE_SCRIPT_GOTHIC: Gothic
+ * @G_UNICODE_SCRIPT_GREEK: Greek
+ * @G_UNICODE_SCRIPT_GUJARATI: Gujarati
+ * @G_UNICODE_SCRIPT_GURMUKHI: Gurmukhi
+ * @G_UNICODE_SCRIPT_HAN: Han
+ * @G_UNICODE_SCRIPT_HANGUL: Hangul
+ * @G_UNICODE_SCRIPT_HEBREW: Hebrew
+ * @G_UNICODE_SCRIPT_HIRAGANA: Hiragana
+ * @G_UNICODE_SCRIPT_KANNADA: Kannada
+ * @G_UNICODE_SCRIPT_KATAKANA: Katakana
+ * @G_UNICODE_SCRIPT_KHMER: Khmer
+ * @G_UNICODE_SCRIPT_LAO: Lao
+ * @G_UNICODE_SCRIPT_LATIN: Latin
+ * @G_UNICODE_SCRIPT_MALAYALAM: Malayalam
+ * @G_UNICODE_SCRIPT_MONGOLIAN: Mongolian
+ * @G_UNICODE_SCRIPT_MYANMAR: Myanmar
+ * @G_UNICODE_SCRIPT_OGHAM: Ogham
+ * @G_UNICODE_SCRIPT_OLD_ITALIC: Old Italic
+ * @G_UNICODE_SCRIPT_ORIYA: Oriya
+ * @G_UNICODE_SCRIPT_RUNIC: Runic
+ * @G_UNICODE_SCRIPT_SINHALA: Sinhala
+ * @G_UNICODE_SCRIPT_SYRIAC: Syriac
+ * @G_UNICODE_SCRIPT_TAMIL: Tamil
+ * @G_UNICODE_SCRIPT_TELUGU: Telugu
+ * @G_UNICODE_SCRIPT_THAANA: Thaana
+ * @G_UNICODE_SCRIPT_THAI: Thai
+ * @G_UNICODE_SCRIPT_TIBETAN: Tibetan Canadian Aboriginal
+ * @G_UNICODE_SCRIPT_YI: Yi
+ * @G_UNICODE_SCRIPT_TAGALOG: Tagalog
+ * @G_UNICODE_SCRIPT_HANUNOO: Hanunoo
+ * @G_UNICODE_SCRIPT_BUHID: Buhid
+ * @G_UNICODE_SCRIPT_TAGBANWA: Tagbanwa
+ * @G_UNICODE_SCRIPT_BRAILLE: Braille
+ * @G_UNICODE_SCRIPT_CYPRIOT: Cypriot
+ * @G_UNICODE_SCRIPT_LIMBU: Limbu
+ * @G_UNICODE_SCRIPT_OSMANYA: Osmanya
+ * @G_UNICODE_SCRIPT_SHAVIAN: Shavian
+ * @G_UNICODE_SCRIPT_LINEAR_B: Linear B
+ * @G_UNICODE_SCRIPT_TAI_LE: Tai Le
+ * @G_UNICODE_SCRIPT_UGARITIC: Ugaritic New Tai Lue
+ * @G_UNICODE_SCRIPT_BUGINESE: Buginese
+ * @G_UNICODE_SCRIPT_GLAGOLITIC: Glagolitic
+ * @G_UNICODE_SCRIPT_TIFINAGH: Tifinagh Syloti Nagri Old Persian
+ * @G_UNICODE_SCRIPT_KHAROSHTHI: Kharoshthi
+ * @G_UNICODE_SCRIPT_UNKNOWN: an unassigned code point
+ * @G_UNICODE_SCRIPT_BALINESE: Balinese
+ * @G_UNICODE_SCRIPT_CUNEIFORM: Cuneiform
+ * @G_UNICODE_SCRIPT_PHOENICIAN: Phoenician
+ * @G_UNICODE_SCRIPT_PHAGS_PA: Phags-pa
+ * @G_UNICODE_SCRIPT_NKO: N'Ko
+ * @G_UNICODE_SCRIPT_KAYAH_LI: Kayah Li. Since 2.16.3
+ * @G_UNICODE_SCRIPT_LEPCHA: Lepcha. Since 2.16.3
+ * @G_UNICODE_SCRIPT_REJANG: Rejang. Since 2.16.3
+ * @G_UNICODE_SCRIPT_SUNDANESE: Sundanese. Since 2.16.3
+ * @G_UNICODE_SCRIPT_SAURASHTRA: Saurashtra. Since 2.16.3
+ * @G_UNICODE_SCRIPT_CHAM: Cham. Since 2.16.3
+ * @G_UNICODE_SCRIPT_OL_CHIKI: Ol Chiki. Since 2.16.3
+ * @G_UNICODE_SCRIPT_VAI: Vai. Since 2.16.3
+ * @G_UNICODE_SCRIPT_CARIAN: Carian. Since 2.16.3
+ * @G_UNICODE_SCRIPT_LYCIAN: Lycian. Since 2.16.3
+ * @G_UNICODE_SCRIPT_LYDIAN: Lydian. Since 2.16.3
+ * @G_UNICODE_SCRIPT_AVESTAN: Avestan. Since 2.26
+ * @G_UNICODE_SCRIPT_BAMUM: Bamum. Since 2.26 Egyptian Hieroglpyhs. Since 2.26 Imperial Aramaic. Since 2.26 Inscriptional Pahlavi. Since 2.26 Inscriptional Parthian. Since 2.26
+ * @G_UNICODE_SCRIPT_JAVANESE: Javanese. Since 2.26
+ * @G_UNICODE_SCRIPT_KAITHI: Kaithi. Since 2.26
+ * @G_UNICODE_SCRIPT_LISU: Lisu. Since 2.26 Meetei Mayek. Since 2.26 Old South Arabian. Since 2.26
+ * @G_UNICODE_SCRIPT_OLD_TURKIC: Old Turkic. Since 2.28
+ * @G_UNICODE_SCRIPT_SAMARITAN: Samaritan. Since 2.26
+ * @G_UNICODE_SCRIPT_TAI_THAM: Tai Tham. Since 2.26
+ * @G_UNICODE_SCRIPT_TAI_VIET: Tai Viet. Since 2.26
+ * @G_UNICODE_SCRIPT_BATAK: Batak. Since 2.28
+ * @G_UNICODE_SCRIPT_BRAHMI: Brahmi. Since 2.28
+ * @G_UNICODE_SCRIPT_MANDAIC: Mandaic. Since 2.28
+ * @G_UNICODE_SCRIPT_CHAKMA: Chakma. Since: 2.32
+ * @G_UNICODE_SCRIPT_MEROITIC_CURSIVE: Meroitic Cursive. Since: 2.32
+ * @G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS, Meroitic Hieroglyphs. Since: 2.32
+ * @G_UNICODE_SCRIPT_MIAO: Miao. Since: 2.32
+ * @G_UNICODE_SCRIPT_SHARADA: Sharada. Since: 2.32
+ * @G_UNICODE_SCRIPT_SORA_SOMPENG: Sora Sompeng. Since: 2.32
+ * @G_UNICODE_SCRIPT_TAKRI: Takri. Since: 2.32
+ *
+ * The #GUnicodeScript enumeration identifies different writing
+ * systems. The values correspond to the names as defined in the
+ * Unicode standard. The enumeration has been added in GLib 2.14,
+ * and is interchangeable with #PangoScript.
+ *
+ * Note that new types may be added in the future. Applications
+ * should be ready to handle unknown values.
+ * See <ulink
+ * url="http://www.unicode.org/reports/tr24/">Unicode Standard Annex
+ * #24: Script names</ulink>.
+ */
+
+
+/**
+ * GUnicodeType:
+ * @G_UNICODE_CONTROL: General category "Other, Control" (Cc)
+ * @G_UNICODE_FORMAT: General category "Other, Format" (Cf)
+ * @G_UNICODE_UNASSIGNED: General category "Other, Not Assigned" (Cn)
+ * @G_UNICODE_PRIVATE_USE: General category "Other, Private Use" (Co)
+ * @G_UNICODE_SURROGATE: General category "Other, Surrogate" (Cs)
+ * @G_UNICODE_LOWERCASE_LETTER: General category "Letter, Lowercase" (Ll)
+ * @G_UNICODE_MODIFIER_LETTER: General category "Letter, Modifier" (Lm)
+ * @G_UNICODE_OTHER_LETTER: General category "Letter, Other" (Lo)
+ * @G_UNICODE_TITLECASE_LETTER: General category "Letter, Titlecase" (Lt)
+ * @G_UNICODE_UPPERCASE_LETTER: General category "Letter, Uppercase" (Lu)
+ * @G_UNICODE_SPACING_MARK: General category "Mark, Spacing" (Mc)
+ * @G_UNICODE_ENCLOSING_MARK: General category "Mark, Enclosing" (Me)
+ * @G_UNICODE_NON_SPACING_MARK: General category "Mark, Nonspacing" (Mn)
+ * @G_UNICODE_DECIMAL_NUMBER: General category "Number, Decimal Digit" (Nd)
+ * @G_UNICODE_LETTER_NUMBER: General category "Number, Letter" (Nl)
+ * @G_UNICODE_OTHER_NUMBER: General category "Number, Other" (No)
+ * @G_UNICODE_CONNECT_PUNCTUATION: General category "Punctuation, Connector" (Pc)
+ * @G_UNICODE_DASH_PUNCTUATION: General category "Punctuation, Dash" (Pd)
+ * @G_UNICODE_CLOSE_PUNCTUATION: General category "Punctuation, Close" (Pe)
+ * @G_UNICODE_FINAL_PUNCTUATION: General category "Punctuation, Final quote" (Pf)
+ * @G_UNICODE_INITIAL_PUNCTUATION: General category "Punctuation, Initial quote" (Pi)
+ * @G_UNICODE_OTHER_PUNCTUATION: General category "Punctuation, Other" (Po)
+ * @G_UNICODE_OPEN_PUNCTUATION: General category "Punctuation, Open" (Ps)
+ * @G_UNICODE_CURRENCY_SYMBOL: General category "Symbol, Currency" (Sc)
+ * @G_UNICODE_MODIFIER_SYMBOL: General category "Symbol, Modifier" (Sk)
+ * @G_UNICODE_MATH_SYMBOL: General category "Symbol, Math" (Sm)
+ * @G_UNICODE_OTHER_SYMBOL: General category "Symbol, Other" (So)
+ * @G_UNICODE_LINE_SEPARATOR: General category "Separator, Line" (Zl)
+ * @G_UNICODE_PARAGRAPH_SEPARATOR: General category "Separator, Paragraph" (Zp)
+ * @G_UNICODE_SPACE_SEPARATOR: General category "Separator, Space" (Zs)
+ *
+ * These are the possible character classifications from the
+ * Unicode specification.
+ * See <ulink url="http://www.unicode.org/Public/UNIDATA/UnicodeData.html">http://www.unicode.org/Public/UNIDATA/UnicodeData.html</ulink>.
+ */
+
+
+/**
+ * GUserDirectory:
+ * @G_USER_DIRECTORY_DESKTOP: the user's Desktop directory
+ * @G_USER_DIRECTORY_DOCUMENTS: the user's Documents directory
+ * @G_USER_DIRECTORY_DOWNLOAD: the user's Downloads directory
+ * @G_USER_DIRECTORY_MUSIC: the user's Music directory
+ * @G_USER_DIRECTORY_PICTURES: the user's Pictures directory
+ * @G_USER_DIRECTORY_PUBLIC_SHARE: the user's shared directory
+ * @G_USER_DIRECTORY_TEMPLATES: the user's Templates directory
+ * @G_USER_DIRECTORY_VIDEOS: the user's Movies directory
+ * @G_USER_N_DIRECTORIES: the number of enum values
+ *
+ * These are logical ids for special directories which are defined
+ * depending on the platform used. You should use g_get_user_special_dir()
+ * to retrieve the full path associated to the logical id.
+ *
+ * The #GUserDirectory enumeration can be extended at later date. Not
+ * every platform has a directory for every logical id in this
+ * enumeration.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * GValue:
+ *
+ * An opaque structure used to hold different types of values.
+ * The data within the structure has protected scope: it is accessible only
+ * to functions within a #GTypeValueTable structure, or implementations of
+ * the g_value_*() API. That is, code portions which implement new fundamental
+ * types.
+ * #GValue users cannot make any assumptions about how data is stored
+ * within the 2 element @data union, and the @g_type member should
+ * only be accessed through the G_VALUE_TYPE() macro.
+ */
+
+
+/**
+ * GValueArray:
+ * @n_values: number of values contained in the array
+ * @values: array of values
+ *
+ * A #GValueArray contains an array of #GValue elements.
+ */
+
+
+/**
+ * GValueTransform:
+ * @src_value: Source value.
+ * @dest_value: Target value.
+ *
+ * The type of value transformation functions which can be registered with
+ * g_value_register_transform_func().
+ */
+
+
+/**
+ * GVariantType:
+ *
+ * A type in the GVariant type system.
+ *
+ * Two types may not be compared by value; use g_variant_type_equal() or
+ * g_variant_type_is_subtype_of().  May be copied using
+ * g_variant_type_copy() and freed using g_variant_type_free().
+ */
+
+
+/**
+ * GVoidFunc:
+ *
+ * Declares a type of function which takes no arguments
+ * and has no return value. It is used to specify the type
+ * function passed to g_atexit().
+ */
+
+
+/**
+ * GWeakNotify:
+ * @data: data that was provided when the weak reference was established
+ * @where_the_object_was: the object being finalized
+ *
+ * A #GWeakNotify function can be added to an object as a callback that gets
+ * triggered when the object is finalized. Since the object is already being
+ * finalized when the #GWeakNotify is called, there's not much you could do
+ * with the object, apart from e.g. using its address as hash-index or the like.
+ */
+
+
+/**
+ * GWeakRef:
+ *
+ * A structure containing a weak reference to a #GObject.  It can either
+ * be empty (i.e. point to %NULL), or point to an object for as long as
+ * at least one "strong" reference to that object exists. Before the
+ * object's #GObjectClass.dispose method is called, every #GWeakRef
+ * associated with becomes empty (i.e. points to %NULL).
+ *
+ * Like #GValue, #GWeakRef can be statically allocated, stack- or
+ * heap-allocated, or embedded in larger structures.
+ *
+ * Unlike g_object_weak_ref() and g_object_add_weak_pointer(), this weak
+ * reference is thread-safe: converting a weak pointer to a reference is
+ * atomic with respect to invalidation of weak pointers to destroyed
+ * objects.
+ *
+ * If the object's #GObjectClass.dispose method results in additional
+ * references to the object being held, any #GWeakRef<!-- -->s taken
+ * before it was disposed will continue to point to %NULL.  If
+ * #GWeakRef<!-- -->s are taken after the object is disposed and
+ * re-referenced, they will continue to point to it until its refcount
+ * goes back to zero, at which point they too will be invalidated.
+ */
+
+
+/**
+ * G_BOOKMARK_FILE_ERROR:
+ *
+ * Error domain for bookmark file parsing.
+ * Errors in this domain will be from the #GBookmarkFileError
+ * enumeration. See #GError for information on error domains.
+ */
+
+
+/**
+ * G_BREAKPOINT:
+ *
+ * Inserts a breakpoint instruction into the code.
+ *
+ * On x86 and alpha systems this is implemented as a soft interrupt
+ * and on other architectures it raises a <literal>SIGTRAP</literal> signal.
+ */
+
+
+/**
+ * G_CALLBACK:
+ * @f: a function pointer.
+ *
+ * Cast a function pointer to a #GCallback.
+ */
+
+
+/**
+ * G_CCLOSURE_SWAP_DATA:
+ * @cclosure: a #GCClosure
+ *
+ * Checks whether the user data of the #GCClosure should be passed as the
+ * first parameter to the callback. See g_cclosure_new_swap().
+ *
+ * Returns: %TRUE if data has to be swapped.
+ */
+
+
+/**
+ * G_CLOSURE_NEEDS_MARSHAL:
+ * @closure: a #GClosure
+ *
+ * Check if the closure still needs a marshaller. See g_closure_set_marshal().
+ *
+ * @closure.
+ *
+ * Returns: %TRUE if a #GClosureMarshal marshaller has not yet been set on
+ */
+
+
+/**
+ * G_CLOSURE_N_NOTIFIERS:
+ * @cl: a #GClosure
+ *
+ * Get the total number of notifiers connected with the closure @cl.
+ * The count includes the meta marshaller, the finalize and invalidate notifiers
+ * and the marshal guards. Note that each guard counts as two notifiers.
+ * See g_closure_set_meta_marshal(), g_closure_add_finalize_notifier(),
+ * g_closure_add_invalidate_notifier() and g_closure_add_marshal_guards().
+ *
+ * Returns: number of notifiers
+ */
+
+
+/**
+ * G_CONVERT_ERROR:
+ *
+ * Error domain for character set conversions. Errors in this domain will
+ * be from the #GConvertError enumeration. See #GError for information on
+ * error domains.
+ */
+
+
+/**
+ * G_DATALIST_FLAGS_MASK:
+ *
+ * A bitmask that restricts the possible flags passed to
+ * g_datalist_set_flags(). Passing a flags value where
+ * flags & ~G_DATALIST_FLAGS_MASK != 0 is an error.
+ */
+
+
+/**
+ * G_DEFINE_ABSTRACT_TYPE:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type, in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the parent type.
+ *
+ * A convenience macro for type implementations.
+ * Similar to G_DEFINE_TYPE(), but defines an abstract type.
+ * See G_DEFINE_TYPE_EXTENDED() for an example.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_DEFINE_ABSTRACT_TYPE_WITH_CODE:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type, in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the parent type.
+ * @_C_: Custom code that gets inserted in the @type_name_get_type() function.
+ *
+ * A convenience macro for type implementations.
+ * Similar to G_DEFINE_TYPE_WITH_CODE(), but defines an abstract type and allows you to
+ * insert custom code into the *_get_type() function, e.g. interface implementations
+ * via G_IMPLEMENT_INTERFACE(). See G_DEFINE_TYPE_EXTENDED() for an example.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_DEFINE_BOXED_TYPE:
+ * @TypeName: The name of the new type, in Camel case.
+ * @type_name: The name of the new type, in lowercase, with words separated by '_'.
+ * @copy_func: the #GBoxedCopyFunc for the new type
+ * @free_func: the #GBoxedFreeFunc for the new type
+ *
+ * A convenience macro for boxed type implementations, which defines a
+ * type_name_get_type() function registering the boxed type.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_DEFINE_BOXED_TYPE_WITH_CODE:
+ * @TypeName: The name of the new type, in Camel case.
+ * @type_name: The name of the new type, in lowercase, with words separated by '_'.
+ * @copy_func: the #GBoxedCopyFunc for the new type
+ * @free_func: the #GBoxedFreeFunc for the new type
+ * @_C_: Custom code that gets inserted in the *_get_type() function.
+ *
+ * A convenience macro for boxed type implementations.
+ * Similar to G_DEFINE_BOXED_TYPE(), but allows to insert custom code into the
+ * type_name_get_type() function, e.g. to register value transformations with
+ * g_value_register_transform_func().
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_DEFINE_DYNAMIC_TYPE:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type, in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the parent type.
+ *
+ * A convenience macro for dynamic type implementations, which declares a
+ * class initialization function, an instance initialization function (see
+ * #GTypeInfo for information about these) and a static variable named
+ * @t_n<!-- -->_parent_class pointing to the parent class. Furthermore,
+ * it defines a <function>*_get_type()</function> and a static
+ * <function>*_register_type()</function> function for use in your
+ * <function>module_init()</function>.
+ * See G_DEFINE_DYNAMIC_TYPE_EXTENDED() for an example.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_DEFINE_DYNAMIC_TYPE_EXTENDED:
+ * @TypeName: The name of the new type, in Camel case.
+ * @type_name: The name of the new type, in lowercase, with words separated by '_'.
+ * @TYPE_PARENT: The #GType of the parent type.
+ * @flags: #GTypeFlags to pass to g_type_module_register_type()
+ * @CODE: Custom code that gets inserted in the *_get_type() function.
+ *
+ * A more general version of G_DEFINE_DYNAMIC_TYPE() which
+ * allows to specify #GTypeFlags and custom code.
+ *
+ * |[
+ * G_DEFINE_DYNAMIC_TYPE_EXTENDED (GtkGadget,
+ * gtk_gadget,
+ * GTK_TYPE_THING,
+ * 0,
+ * G_IMPLEMENT_INTERFACE_DYNAMIC (TYPE_GIZMO,
+ * gtk_gadget_gizmo_init));
+ * ]|
+ * expands to
+ * |[
+ * static void     gtk_gadget_init              (GtkGadget      *self);
+ * static void     gtk_gadget_class_init        (GtkGadgetClass *klass);
+ * static void     gtk_gadget_class_finalize    (GtkGadgetClass *klass);
+ *
+ * static gpointer gtk_gadget_parent_class = NULL;
+ * static GType    gtk_gadget_type_id = 0;
+ *
+ * static void     gtk_gadget_class_intern_init (gpointer klass)
+ * {
+ * gtk_gadget_parent_class = g_type_class_peek_parent (klass);
+ * gtk_gadget_class_init ((GtkGadgetClass*) klass);
+ * }
+ *
+ * GType
+ * gtk_gadget_get_type (void)
+ * {
+ * return gtk_gadget_type_id;
+ * }
+ *
+ * static void
+ * gtk_gadget_register_type (GTypeModule *type_module)
+ * {
+ * const GTypeInfo g_define_type_info = {
+ * sizeof (GtkGadgetClass),
+ * (GBaseInitFunc) NULL,
+ * (GBaseFinalizeFunc) NULL,
+ * (GClassInitFunc) gtk_gadget_class_intern_init,
+ * (GClassFinalizeFunc) gtk_gadget_class_finalize,
+ * NULL,   // class_data
+ * sizeof (GtkGadget),
+ * 0,      // n_preallocs
+ * (GInstanceInitFunc) gtk_gadget_init,
+ * NULL    // value_table
+ * };
+ * gtk_gadget_type_id = g_type_module_register_type (type_module,
+ * GTK_TYPE_THING,
+ * GtkGadget,
+ * &g_define_type_info,
+ * (GTypeFlags) flags);
+ * {
+ * const GInterfaceInfo g_implement_interface_info = {
+ * (GInterfaceInitFunc) gtk_gadget_gizmo_init
+ * };
+ * g_type_module_add_interface (type_module, g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
+ * }
+ * }
+ * ]|
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_DEFINE_INTERFACE:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type, in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the prerequisite type for the interface, or 0 (%G_TYPE_INVALID) for no prerequisite type.
+ *
+ * A convenience macro for #GTypeInterface definitions, which declares
+ * a default vtable initialization function and defines a *_get_type()
+ * function.
+ *
+ * The macro expects the interface initialization function to have the
+ * name <literal>t_n ## _default_init</literal>, and the interface
+ * structure to have the name <literal>TN ## Interface</literal>.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * G_DEFINE_INTERFACE_WITH_CODE:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type, in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the prerequisite type for the interface, or 0 (%G_TYPE_INVALID) for no prerequisite type.
+ * @_C_: Custom code that gets inserted in the *_get_type() function.
+ *
+ * A convenience macro for #GTypeInterface definitions. Similar to
+ * G_DEFINE_INTERFACE(), but allows you to insert custom code into the
+ * *_get_type() function, e.g. additional interface implementations
+ * via G_IMPLEMENT_INTERFACE(), or additional prerequisite types. See
+ * G_DEFINE_TYPE_EXTENDED() for a similar example using
+ * G_DEFINE_TYPE_WITH_CODE().
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * G_DEFINE_POINTER_TYPE:
+ * @TypeName: The name of the new type, in Camel case.
+ * @type_name: The name of the new type, in lowercase, with words separated by '_'.
+ *
+ * A convenience macro for pointer type implementations, which defines a
+ * type_name_get_type() function registering the pointer type.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_DEFINE_POINTER_TYPE_WITH_CODE:
+ * @TypeName: The name of the new type, in Camel case.
+ * @type_name: The name of the new type, in lowercase, with words separated by '_'.
+ * @_C_: Custom code that gets inserted in the *_get_type() function.
+ *
+ * A convenience macro for pointer type implementations.
+ * Similar to G_DEFINE_POINTER_TYPE(), but allows to insert custom code into the
+ * type_name_get_type() function.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_DEFINE_TYPE:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type, in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the parent type.
+ *
+ * A convenience macro for type implementations, which declares a
+ * class initialization function, an instance initialization function (see #GTypeInfo for information about
+ * these) and a static variable named @t_n<!-- -->_parent_class pointing to the parent class. Furthermore, it defines
+ * a *_get_type() function. See G_DEFINE_TYPE_EXTENDED() for an example.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_DEFINE_TYPE_EXTENDED:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type, in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the parent type.
+ * @_f_: #GTypeFlags to pass to g_type_register_static()
+ * @_C_: Custom code that gets inserted in the *_get_type() function.
+ *
+ * The most general convenience macro for type implementations, on which
+ * G_DEFINE_TYPE(), etc are based.
+ *
+ * |[
+ * G_DEFINE_TYPE_EXTENDED (GtkGadget,
+ * gtk_gadget,
+ * GTK_TYPE_WIDGET,
+ * 0,
+ * G_IMPLEMENT_INTERFACE (TYPE_GIZMO,
+ * gtk_gadget_gizmo_init));
+ * ]|
+ * expands to
+ * |[
+ * static void     gtk_gadget_init       (GtkGadget      *self);
+ * static void     gtk_gadget_class_init (GtkGadgetClass *klass);
+ * static gpointer gtk_gadget_parent_class = NULL;
+ * static void     gtk_gadget_class_intern_init (gpointer klass)
+ * {
+ * gtk_gadget_parent_class = g_type_class_peek_parent (klass);
+ * gtk_gadget_class_init ((GtkGadgetClass*) klass);
+ * }
+ *
+ * GType
+ * gtk_gadget_get_type (void)
+ * {
+ * static volatile gsize g_define_type_id__volatile = 0;
+ * if (g_once_init_enter (&g_define_type_id__volatile))
+ * {
+ * GType g_define_type_id =
+ * g_type_register_static_simple (GTK_TYPE_WIDGET,
+ * g_intern_static_string ("GtkGadget"),
+ * sizeof (GtkGadgetClass),
+ * (GClassInitFunc) gtk_gadget_class_intern_init,
+ * sizeof (GtkGadget),
+ * (GInstanceInitFunc) gtk_gadget_init,
+ * (GTypeFlags) flags);
+ * {
+ * const GInterfaceInfo g_implement_interface_info = {
+ * (GInterfaceInitFunc) gtk_gadget_gizmo_init
+ * };
+ * g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
+ * }
+ * g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ * }
+ * return g_define_type_id__volatile;
+ * }
+ * ]|
+ * The only pieces which have to be manually provided are the definitions of
+ * the instance and class structure and the definitions of the instance and
+ * class init functions.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_DEFINE_TYPE_WITH_CODE:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the parent type.
+ * @_C_: Custom code that gets inserted in the *_get_type() function.
+ *
+ * A convenience macro for type implementations.
+ * Similar to G_DEFINE_TYPE(), but allows you to insert custom code into the
+ * *_get_type() function, e.g. interface implementations via G_IMPLEMENT_INTERFACE().
+ * See G_DEFINE_TYPE_EXTENDED() for an example.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_ENUM_CLASS:
+ * @class: a valid #GEnumClass
+ *
+ * Casts a derived #GEnumClass structure into a #GEnumClass structure.
+ */
+
+
+/**
+ * G_ENUM_CLASS_TYPE:
+ * @class: a #GEnumClass
+ *
+ * Get the type identifier from a given #GEnumClass structure.
+ *
+ * Returns: the #GType
+ */
+
+
+/**
+ * G_ENUM_CLASS_TYPE_NAME:
+ * @class: a #GEnumClass
+ *
+ * Get the static type name from a given #GEnumClass structure.
+ *
+ * Returns: the type name.
+ */
+
+
+/**
+ * G_FLAGS_CLASS:
+ * @class: a valid #GFlagsClass
+ *
+ * Casts a derived #GFlagsClass structure into a #GFlagsClass structure.
+ */
+
+
+/**
+ * G_FLAGS_CLASS_TYPE:
+ * @class: a #GFlagsClass
+ *
+ * Get the type identifier from a given #GFlagsClass structure.
+ *
+ * Returns: the #GType
+ */
+
+
+/**
+ * G_FLAGS_CLASS_TYPE_NAME:
+ * @class: a #GFlagsClass
+ *
+ * Get the static type name from a given #GFlagsClass structure.
+ *
+ * Returns: the type name.
+ */
+
+
+/**
+ * G_IMPLEMENT_INTERFACE:
+ * @TYPE_IFACE: The #GType of the interface to add
+ * @iface_init: The interface init function
+ *
+ * A convenience macro to ease interface addition in the @_C_ section
+ * of G_DEFINE_TYPE_WITH_CODE() or G_DEFINE_ABSTRACT_TYPE_WITH_CODE().
+ * See G_DEFINE_TYPE_EXTENDED() for an example.
+ *
+ * Note that this macro can only be used together with the G_DEFINE_TYPE_*
+ * macros, since it depends on variable names from those macros.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_IMPLEMENT_INTERFACE_DYNAMIC:
+ * @TYPE_IFACE: The #GType of the interface to add
+ * @iface_init: The interface init function
+ *
+ * A convenience macro to ease interface addition in the @_C_ section
+ * of G_DEFINE_DYNAMIC_TYPE_EXTENDED(). See G_DEFINE_DYNAMIC_TYPE_EXTENDED()
+ * for an example.
+ *
+ * Note that this macro can only be used together with the
+ * G_DEFINE_DYNAMIC_TYPE_EXTENDED macros, since it depends on variable
+ * names from that macro.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * G_INITIALLY_UNOWNED:
+ * @object: Object which is subject to casting.
+ *
+ * Casts a #GInitiallyUnowned or derived pointer into a (GInitiallyUnowned*)
+ * pointer. Depending on the current debugging level, this function may invoke
+ * certain runtime checks to identify invalid casts.
+ */
+
+
+/**
+ * G_INITIALLY_UNOWNED_CLASS:
+ * @class: a valid #GInitiallyUnownedClass
+ *
+ * Casts a derived #GInitiallyUnownedClass structure into a
+ * #GInitiallyUnownedClass structure.
+ */
+
+
+/**
+ * G_INITIALLY_UNOWNED_GET_CLASS:
+ * @object: a #GInitiallyUnowned instance.
+ *
+ * Get the class structure associated to a #GInitiallyUnowned instance.
+ *
+ * Returns: pointer to object class structure.
+ */
+
+
+/**
+ * G_IS_ENUM_CLASS:
+ * @class: a #GEnumClass
+ *
+ * Checks whether @class "is a" valid #GEnumClass structure of type %G_TYPE_ENUM
+ * or derived.
+ */
+
+
+/**
+ * G_IS_FLAGS_CLASS:
+ * @class: a #GFlagsClass
+ *
+ * Checks whether @class "is a" valid #GFlagsClass structure of type %G_TYPE_FLAGS
+ * or derived.
+ */
+
+
+/**
+ * G_IS_INITIALLY_UNOWNED:
+ * @object: Instance to check for being a %G_TYPE_INITIALLY_UNOWNED.
+ *
+ * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_INITIALLY_UNOWNED.
+ */
+
+
+/**
+ * G_IS_INITIALLY_UNOWNED_CLASS:
+ * @class: a #GInitiallyUnownedClass
+ *
+ * Checks whether @class "is a" valid #GInitiallyUnownedClass structure of type
+ * %G_TYPE_INITIALLY_UNOWNED or derived.
+ */
+
+
+/**
+ * G_IS_OBJECT:
+ * @object: Instance to check for being a %G_TYPE_OBJECT.
+ *
+ * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_OBJECT.
+ */
+
+
+/**
+ * G_IS_OBJECT_CLASS:
+ * @class: a #GObjectClass
+ *
+ * Checks whether @class "is a" valid #GObjectClass structure of type
+ * %G_TYPE_OBJECT or derived.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC:
+ * @pspec: a #GParamSpec
+ *
+ * Checks whether @pspec "is a" valid #GParamSpec structure of type %G_TYPE_PARAM
+ * or derived.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_BOOLEAN:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOOLEAN.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_BOXED:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOXED.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_CHAR:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_CHAR.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_CLASS:
+ * @pclass: a #GParamSpecClass
+ *
+ * Checks whether @pclass "is a" valid #GParamSpecClass structure of type
+ * %G_TYPE_PARAM or derived.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_DOUBLE:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_DOUBLE.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_ENUM:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ENUM.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_FLAGS:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLAGS.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_FLOAT:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLOAT.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_GTYPE:
+ * @pspec: a #GParamSpec
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_GTYPE.
+ *
+ * Since: 2.10
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_INT:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_INT64:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT64.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_LONG:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_LONG.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_OBJECT:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OBJECT.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_OVERRIDE:
+ * @pspec: a #GParamSpec
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OVERRIDE.
+ *
+ * Since: 2.4
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_PARAM:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_PARAM.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_POINTER:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_POINTER.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_STRING:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_STRING.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_UCHAR:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UCHAR.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_UINT:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_UINT64:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT64.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_ULONG:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ULONG.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_UNICHAR:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UNICHAR.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_VALUE_ARRAY:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VALUE_ARRAY.
+ *
+ * Returns: %TRUE on success.
+ * Deprecated: 2.32: Use #GArray instead of #GValueArray
+ */
+
+
+/**
+ * G_IS_PARAM_SPEC_VARIANT:
+ * @pspec: a #GParamSpec
+ *
+ * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VARIANT.
+ *
+ * Returns: %TRUE on success
+ * Since: 2.26
+ */
+
+
+/**
+ * G_IS_VALUE:
+ * @value: A #GValue structure.
+ *
+ * Checks if @value is a valid and initialized #GValue structure.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_MARKUP_ERROR:
+ *
+ * Error domain for markup parsing.
+ * Errors in this domain will be from the #GMarkupError enumeration.
+ * See #GError for information on error domains.
+ */
+
+
+/**
+ * G_NODE_IS_LEAF:
+ * @node: a #GNode
+ *
+ * Returns %TRUE if a #GNode is a leaf node.
+ *
+ * (i.e. it has no children)
+ *
+ * Returns: %TRUE if the #GNode is a leaf node
+ */
+
+
+/**
+ * G_NODE_IS_ROOT:
+ * @node: a #GNode
+ *
+ * Returns %TRUE if a #GNode is the root of a tree.
+ *
+ * (i.e. it has no parent or siblings)
+ *
+ * Returns: %TRUE if the #GNode is the root of a tree
+ */
+
+
+/**
+ * G_OBJECT:
+ * @object: Object which is subject to casting.
+ *
+ * Casts a #GObject or derived pointer into a (GObject*) pointer.
+ * Depending on the current debugging level, this function may invoke
+ * certain runtime checks to identify invalid casts.
+ */
+
+
+/**
+ * G_OBJECT_CLASS:
+ * @class: a valid #GObjectClass
+ *
+ * Casts a derived #GObjectClass structure into a #GObjectClass structure.
+ */
+
+
+/**
+ * G_OBJECT_CLASS_NAME:
+ * @class: a valid #GObjectClass
+ *
+ * Return the name of a class structure's type.
+ *
+ * should not be freed.
+ *
+ * Returns: Type name of @class. The string is owned by the type system and
+ */
+
+
+/**
+ * G_OBJECT_CLASS_TYPE:
+ * @class: a valid #GObjectClass
+ *
+ * Get the type id of a class structure.
+ *
+ * Returns: Type id of @class.
+ */
+
+
+/**
+ * G_OBJECT_GET_CLASS:
+ * @object: a #GObject instance.
+ *
+ * Get the class structure associated to a #GObject instance.
+ *
+ * Returns: pointer to object class structure.
+ */
+
+
+/**
+ * G_OBJECT_TYPE:
+ * @object: Object to return the type id for.
+ *
+ * Get the type id of an object.
+ *
+ * Returns: Type id of @object.
+ */
+
+
+/**
+ * G_OBJECT_TYPE_NAME:
+ * @object: Object to return the type name for.
+ *
+ * Get the name of an object's type.
+ *
+ * should not be freed.
+ *
+ * Returns: Type name of @object. The string is owned by the type system and
+ */
+
+
+/**
+ * G_OBJECT_WARN_INVALID_PROPERTY_ID:
+ * @object: the #GObject on which set_property() or get_property() was called
+ * @property_id: the numeric id of the property
+ * @pspec: the #GParamSpec of the property
+ *
+ * This macro should be used to emit a standard warning about unexpected
+ * properties in set_property() and get_property() implementations.
+ */
+
+
+/**
+ * G_OPTION_ERROR:
+ *
+ * Error domain for option parsing. Errors in this domain will
+ * be from the #GOptionError enumeration. See #GError for information on
+ * error domains.
+ */
+
+
+/**
+ * G_OPTION_REMAINING:
+ *
+ * If a long option in the main group has this name, it is not treated as a
+ * regular option. Instead it collects all non-option arguments which would
+ * otherwise be left in <literal>argv</literal>. The option must be of type
+ * %G_OPTION_ARG_CALLBACK, %G_OPTION_ARG_STRING_ARRAY
+ * or %G_OPTION_ARG_FILENAME_ARRAY.
+ *
+ *
+ * Using #G_OPTION_REMAINING instead of simply scanning <literal>argv</literal>
+ * for leftover arguments has the advantage that GOption takes care of
+ * necessary encoding conversions for strings or filenames.
+ *
+ * Since: 2.6
+ */
+
+
+/**
+ * G_PARAM_MASK:
+ *
+ * Mask containing the bits of #GParamSpec.flags which are reserved for GLib.
+ */
+
+
+/**
+ * G_PARAM_READWRITE:
+ *
+ * #GParamFlags value alias for %G_PARAM_READABLE | %G_PARAM_WRITABLE.
+ */
+
+
+/**
+ * G_PARAM_SPEC:
+ * @pspec: a valid #GParamSpec
+ *
+ * Casts a derived #GParamSpec object (e.g. of type #GParamSpecInt) into
+ * a #GParamSpec object.
+ */
+
+
+/**
+ * G_PARAM_SPEC_BOOLEAN:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecBoolean.
+ */
+
+
+/**
+ * G_PARAM_SPEC_BOXED:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecBoxed.
+ */
+
+
+/**
+ * G_PARAM_SPEC_CHAR:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecChar.
+ */
+
+
+/**
+ * G_PARAM_SPEC_CLASS:
+ * @pclass: a valid #GParamSpecClass
+ *
+ * Casts a derived #GParamSpecClass structure into a #GParamSpecClass structure.
+ */
+
+
+/**
+ * G_PARAM_SPEC_DOUBLE:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecDouble.
+ */
+
+
+/**
+ * G_PARAM_SPEC_ENUM:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecEnum.
+ */
+
+
+/**
+ * G_PARAM_SPEC_FLAGS:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecFlags.
+ */
+
+
+/**
+ * G_PARAM_SPEC_FLOAT:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecFloat.
+ */
+
+
+/**
+ * G_PARAM_SPEC_GET_CLASS:
+ * @pspec: a valid #GParamSpec
+ *
+ * Retrieves the #GParamSpecClass of a #GParamSpec.
+ */
+
+
+/**
+ * G_PARAM_SPEC_GTYPE:
+ * @pspec: a #GParamSpec
+ *
+ * Casts a #GParamSpec into a #GParamSpecGType.
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * G_PARAM_SPEC_INT:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecInt.
+ */
+
+
+/**
+ * G_PARAM_SPEC_INT64:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecInt64.
+ */
+
+
+/**
+ * G_PARAM_SPEC_LONG:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecLong.
+ */
+
+
+/**
+ * G_PARAM_SPEC_OBJECT:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Casts a #GParamSpec instance into a #GParamSpecObject.
+ */
+
+
+/**
+ * G_PARAM_SPEC_OVERRIDE:
+ * @pspec: a #GParamSpec
+ *
+ * Casts a #GParamSpec into a #GParamSpecOverride.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_PARAM_SPEC_PARAM:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Casts a #GParamSpec instance into a #GParamSpecParam.
+ */
+
+
+/**
+ * G_PARAM_SPEC_POINTER:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Casts a #GParamSpec instance into a #GParamSpecPointer.
+ */
+
+
+/**
+ * G_PARAM_SPEC_STRING:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Casts a #GParamSpec instance into a #GParamSpecString.
+ */
+
+
+/**
+ * G_PARAM_SPEC_TYPE:
+ * @pspec: a valid #GParamSpec
+ *
+ * Retrieves the #GType of this @pspec.
+ */
+
+
+/**
+ * G_PARAM_SPEC_TYPE_NAME:
+ * @pspec: a valid #GParamSpec
+ *
+ * Retrieves the #GType name of this @pspec.
+ */
+
+
+/**
+ * G_PARAM_SPEC_UCHAR:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecUChar.
+ */
+
+
+/**
+ * G_PARAM_SPEC_UINT:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecUInt.
+ */
+
+
+/**
+ * G_PARAM_SPEC_UINT64:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecUInt64.
+ */
+
+
+/**
+ * G_PARAM_SPEC_ULONG:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecULong.
+ */
+
+
+/**
+ * G_PARAM_SPEC_UNICHAR:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecUnichar.
+ */
+
+
+/**
+ * G_PARAM_SPEC_VALUE_ARRAY:
+ * @pspec: a valid #GParamSpec instance
+ *
+ * Cast a #GParamSpec instance into a #GParamSpecValueArray.
+ *
+ * Deprecated: 2.32: Use #GArray instead of #GValueArray
+ */
+
+
+/**
+ * G_PARAM_SPEC_VALUE_TYPE:
+ * @pspec: a valid #GParamSpec
+ *
+ * Retrieves the #GType to initialize a #GValue for this parameter.
+ */
+
+
+/**
+ * G_PARAM_SPEC_VARIANT:
+ * @pspec: a #GParamSpec
+ *
+ * Casts a #GParamSpec into a #GParamSpecVariant.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_PARAM_STATIC_STRINGS:
+ *
+ * #GParamFlags value alias for %G_PARAM_STATIC_NAME | %G_PARAM_STATIC_NICK | %G_PARAM_STATIC_BLURB.
+ *
+ * Since 2.13.0
+ */
+
+
+/**
+ * G_PARAM_USER_SHIFT:
+ *
+ * Minimum shift count to be used for user defined flags, to be stored in
+ * #GParamSpec.flags. The maximum allowed is 30 + G_PARAM_USER_SHIFT.
+ */
+
+
+/**
+ * G_PRIORITY_DEFAULT:
+ *
+ * Use this for default priority event sources.
+ *
+ * In GLib this priority is used when adding timeout functions
+ * with g_timeout_add(). In GDK this priority is used for events
+ * from the X server.
+ */
+
+
+/**
+ * G_PRIORITY_DEFAULT_IDLE:
+ *
+ * Use this for default priority idle functions.
+ *
+ * In GLib this priority is used when adding idle functions with
+ * g_idle_add().
+ */
+
+
+/**
+ * G_PRIORITY_HIGH:
+ *
+ * Use this for high priority event sources.
+ *
+ * It is not used within GLib or GTK+.
+ */
+
+
+/**
+ * G_PRIORITY_HIGH_IDLE:
+ *
+ * Use this for high priority idle functions.
+ *
+ * GTK+ uses #G_PRIORITY_HIGH_IDLE + 10 for resizing operations,
+ * and #G_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.)
+ */
+
+
+/**
+ * G_PRIORITY_LOW:
+ *
+ * Use this for very low priority background tasks.
+ *
+ * It is not used within GLib or GTK+.
+ */
+
+
+/**
+ * G_QUEUE_INIT:
+ *
+ * A statically-allocated #GQueue must be initialized with this
+ * macro before it can be used. This macro can be used to initialize
+ * a variable, but it cannot be assigned to a variable. In that case
+ * you have to use g_queue_init().
+ *
+ * |[
+ * GQueue my_queue = G_QUEUE_INIT;
+ * ]|
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_REGEX_ERROR:
+ *
+ * Error domain for regular expressions. Errors in this domain will be
+ * from the #GRegexError enumeration. See #GError for information on
+ * error domains.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_SIGNAL_FLAGS_MASK:
+ *
+ * A mask for all #GSignalFlags bits.
+ */
+
+
+/**
+ * G_SIGNAL_MATCH_MASK:
+ *
+ * A mask for all #GSignalMatchType bits.
+ */
+
+
+/**
+ * G_SIGNAL_TYPE_STATIC_SCOPE:
+ *
+ * This macro flags signal argument types for which the signal system may
+ * assume that instances thereof remain persistent across all signal emissions
+ * they are used in. This is only useful for non ref-counted, value-copy types.
+ *
+ * To flag a signal argument in this way, add
+ * <literal>| G_SIGNAL_TYPE_STATIC_SCOPE</literal> to the corresponding argument
+ * of g_signal_new().
+ * |[
+ * g_signal_new ("size_request",
+ * G_TYPE_FROM_CLASS (gobject_class),
+ * G_SIGNAL_RUN_FIRST,
+ * G_STRUCT_OFFSET (GtkWidgetClass, size_request),
+ * NULL, NULL,
+ * _gtk_marshal_VOID__BOXED,
+ * G_TYPE_NONE, 1,
+ * GTK_TYPE_REQUISITION | G_SIGNAL_TYPE_STATIC_SCOPE);
+ * ]|
+ */
+
+
+/**
+ * G_SOURCE_CONTINUE:
+ *
+ * Use this macro as the return value of a #GSourceFunc to leave
+ * the #GSource in the main loop.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * G_SOURCE_REMOVE:
+ *
+ * Use this macro as the return value of a #GSourceFunc to remove
+ * the #GSource from the main loop.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * G_SPAWN_ERROR:
+ *
+ * Error domain for spawning processes. Errors in this domain will
+ * be from the #GSpawnError enumeration. See #GError for information on
+ * error domains.
+ */
+
+
+/**
+ * G_TIME_SPAN_DAY:
+ *
+ * Evaluates to a time span of one day.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TIME_SPAN_HOUR:
+ *
+ * Evaluates to a time span of one hour.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TIME_SPAN_MILLISECOND:
+ *
+ * Evaluates to a time span of one millisecond.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TIME_SPAN_MINUTE:
+ *
+ * Evaluates to a time span of one minute.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TIME_SPAN_SECOND:
+ *
+ * Evaluates to a time span of one second.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TYPE_ARRAY:
+ *
+ * The #GType for a boxed type holding a #GArray reference.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * G_TYPE_BOOLEAN:
+ *
+ * The fundamental type corresponding to #gboolean.
+ */
+
+
+/**
+ * G_TYPE_BOXED:
+ *
+ * The fundamental type from which all boxed types are derived.
+ */
+
+
+/**
+ * G_TYPE_BYTES:
+ *
+ * The #GType for #GBytes.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * G_TYPE_BYTE_ARRAY:
+ *
+ * The #GType for a boxed type holding a #GByteArray reference.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * G_TYPE_CHAR:
+ *
+ * The fundamental type corresponding to #gchar.
+ * The type designated by G_TYPE_CHAR is unconditionally an 8-bit signed integer.
+ * This may or may not be the same type a the C type "gchar".
+ */
+
+
+/**
+ * G_TYPE_CHECK_CLASS_CAST:
+ * @g_class: Location of a #GTypeClass structure.
+ * @g_type: The type to be returned.
+ * @c_type: The corresponding C type of class structure of @g_type.
+ *
+ * Checks that @g_class is a class structure of the type identified by @g_type
+ * and issues a warning if this is not the case. Returns @g_class casted
+ * to a pointer to @c_type.
+ *
+ * This macro should only be used in type implementations.
+ */
+
+
+/**
+ * G_TYPE_CHECK_CLASS_TYPE:
+ * @g_class: Location of a #GTypeClass structure.
+ * @g_type: The type to be checked.
+ *
+ * Checks if @g_class is a class structure of the type identified by
+ * @g_type.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_CHECK_INSTANCE:
+ * @instance: Location of a #GTypeInstance structure.
+ *
+ * Checks if @instance is a valid #GTypeInstance structure,
+ * otherwise issues a warning and returns %FALSE.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_CHECK_INSTANCE_CAST:
+ * @instance: Location of a #GTypeInstance structure.
+ * @g_type: The type to be returned.
+ * @c_type: The corresponding C type of @g_type.
+ *
+ * Checks that @instance is an instance of the type identified by @g_type
+ * and issues a warning if this is not the case. Returns @instance casted
+ * to a pointer to @c_type.
+ *
+ * This macro should only be used in type implementations.
+ */
+
+
+/**
+ * G_TYPE_CHECK_INSTANCE_TYPE:
+ * @instance: Location of a #GTypeInstance structure.
+ * @g_type: The type to be checked
+ *
+ * Checks if @instance is an instance of the type identified by @g_type.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_CHECK_VALUE:
+ * @value: a #GValue
+ *
+ * Checks if @value has been initialized to hold values
+ * of a value type.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_CHECK_VALUE_TYPE:
+ * @value: a #GValue
+ * @g_type: The type to be checked.
+ *
+ * Checks if @value has been initialized to hold values
+ * of type @g_type.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_CLASS_GET_PRIVATE:
+ * @klass: the class of a type deriving from @private_type.
+ * @g_type: the type identifying which private data to retrieve.
+ * @c_type: The C type for the private structure.
+ *
+ * Gets the private class structure for a particular type.
+ * The private structure must have been registered in the
+ * get_type() function with g_type_add_class_private().
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Since: 2.24
+ * Returns: a pointer to the private data structure.
+ */
+
+
+/**
+ * G_TYPE_CLOSURE:
+ *
+ * The #GType for #GClosure.
+ */
+
+
+/**
+ * G_TYPE_DATE:
+ *
+ * The #GType for #GDate.
+ */
+
+
+/**
+ * G_TYPE_DATE_TIME:
+ *
+ * The #GType for a boxed type holding a #GDateTime.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TYPE_DOUBLE:
+ *
+ * The fundamental type corresponding to #gdouble.
+ */
+
+
+/**
+ * G_TYPE_ENUM:
+ *
+ * The fundamental type from which all enumeration types are derived.
+ */
+
+
+/**
+ * G_TYPE_ERROR:
+ *
+ * The #GType for a boxed type holding a #GError.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TYPE_FLAGS:
+ *
+ * The fundamental type from which all flags types are derived.
+ */
+
+
+/**
+ * G_TYPE_FLAG_RESERVED_ID_BIT:
+ *
+ * A bit in the type number that's supposed to be left untouched.
+ */
+
+
+/**
+ * G_TYPE_FLOAT:
+ *
+ * The fundamental type corresponding to #gfloat.
+ */
+
+
+/**
+ * G_TYPE_FROM_CLASS:
+ * @g_class: Location of a valid #GTypeClass structure.
+ *
+ * Get the type identifier from a given @class structure.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: the #GType
+ */
+
+
+/**
+ * G_TYPE_FROM_INSTANCE:
+ * @instance: Location of a valid #GTypeInstance structure.
+ *
+ * Get the type identifier from a given @instance structure.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: the #GType
+ */
+
+
+/**
+ * G_TYPE_FROM_INTERFACE:
+ * @g_iface: Location of a valid #GTypeInterface structure.
+ *
+ * Get the type identifier from a given @interface structure.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: the #GType
+ */
+
+
+/**
+ * G_TYPE_FUNDAMENTAL:
+ * @type: A #GType value.
+ *
+ * The fundamental type which is the ancestor of @type.
+ * Fundamental types are types that serve as ultimate bases for the derived types,
+ * thus they are the roots of distinct inheritance hierarchies.
+ */
+
+
+/**
+ * G_TYPE_FUNDAMENTAL_MAX:
+ *
+ * An integer constant that represents the number of identifiers reserved
+ * for types that are assigned at compile-time.
+ */
+
+
+/**
+ * G_TYPE_FUNDAMENTAL_SHIFT:
+ *
+ * Shift value used in converting numbers to type IDs.
+ */
+
+
+/**
+ * G_TYPE_GSTRING:
+ *
+ * The #GType for #GString.
+ */
+
+
+/**
+ * G_TYPE_GTYPE:
+ *
+ * The type for #GType.
+ */
+
+
+/**
+ * G_TYPE_HASH_TABLE:
+ *
+ * The #GType for a boxed type holding a #GHashTable reference.
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * G_TYPE_HAS_VALUE_TABLE:
+ * @type: A #GType value.
+ *
+ * Checks if @type has a #GTypeValueTable.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_INITIALLY_UNOWNED:
+ *
+ * The type for #GInitiallyUnowned.
+ */
+
+
+/**
+ * G_TYPE_INSTANCE_GET_CLASS:
+ * @instance: Location of the #GTypeInstance structure.
+ * @g_type: The #GType of the class to be returned.
+ * @c_type: The C type of the class structure.
+ *
+ * Get the class structure of a given @instance, casted
+ * to a specified ancestor type @g_type of the instance.
+ *
+ * Note that while calling a GInstanceInitFunc(), the class pointer gets
+ * modified, so it might not always return the expected pointer.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: a pointer to the class structure
+ */
+
+
+/**
+ * G_TYPE_INSTANCE_GET_INTERFACE:
+ * @instance: Location of the #GTypeInstance structure.
+ * @g_type: The #GType of the interface to be returned.
+ * @c_type: The C type of the interface structure.
+ *
+ * Get the interface structure for interface @g_type of a given @instance.
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Returns: a pointer to the interface structure
+ */
+
+
+/**
+ * G_TYPE_INSTANCE_GET_PRIVATE:
+ * @instance: the instance of a type deriving from @private_type.
+ * @g_type: the type identifying which private data to retrieve.
+ * @c_type: The C type for the private structure.
+ *
+ * Gets the private structure for a particular type.
+ * The private structure must have been registered in the
+ * class_init function with g_type_class_add_private().
+ *
+ * This macro should only be used in type implementations.
+ *
+ * Since: 2.4
+ * Returns: a pointer to the private data structure.
+ */
+
+
+/**
+ * G_TYPE_INT:
+ *
+ * The fundamental type corresponding to #gint.
+ */
+
+
+/**
+ * G_TYPE_INT64:
+ *
+ * The fundamental type corresponding to #gint64.
+ */
+
+
+/**
+ * G_TYPE_INTERFACE:
+ *
+ * The fundamental type from which all interfaces are derived.
+ */
+
+
+/**
+ * G_TYPE_INVALID:
+ *
+ * An invalid #GType used as error return value in some functions which return
+ * a #GType.
+ */
+
+
+/**
+ * G_TYPE_IO_CHANNEL:
+ *
+ * The #GType for #GIOChannel.
+ */
+
+
+/**
+ * G_TYPE_IO_CONDITION:
+ *
+ * The #GType for #GIOCondition.
+ */
+
+
+/**
+ * G_TYPE_IS_ABSTRACT:
+ * @type: A #GType value.
+ *
+ * Checks if @type is an abstract type.  An abstract type cannot be
+ * instantiated and is normally used as an abstract base class for
+ * derived classes.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_IS_CLASSED:
+ * @type: A #GType value.
+ *
+ * Checks if @type is a classed type.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_IS_DEEP_DERIVABLE:
+ * @type: A #GType value.
+ *
+ * Checks if @type is a deep derivable type.  A deep derivable type
+ * can be used as the base class of a deep (multi-level) class hierarchy.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_IS_DERIVABLE:
+ * @type: A #GType value.
+ *
+ * Checks if @type is a derivable type.  A derivable type can
+ * be used as the base class of a flat (single-level) class hierarchy.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_IS_DERIVED:
+ * @type: A #GType value.
+ *
+ * Checks if @type is derived (or in object-oriented terminology:
+ * inherited) from another type (this holds true for all non-fundamental
+ * types).
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_IS_ENUM:
+ * @type: a #GType ID.
+ *
+ * Checks whether @type "is a" %G_TYPE_ENUM.
+ *
+ * Returns: %TRUE if @type "is a" %G_TYPE_ENUM.
+ */
+
+
+/**
+ * G_TYPE_IS_FLAGS:
+ * @type: a #GType ID.
+ *
+ * Checks whether @type "is a" %G_TYPE_FLAGS.
+ *
+ * Returns: %TRUE if @type "is a" %G_TYPE_FLAGS.
+ */
+
+
+/**
+ * G_TYPE_IS_FUNDAMENTAL:
+ * @type: A #GType value.
+ *
+ * Checks if @type is a fundamental type.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_IS_INSTANTIATABLE:
+ * @type: A #GType value.
+ *
+ * Checks if @type can be instantiated.  Instantiation is the
+ * process of creating an instance (object) of this type.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_IS_INTERFACE:
+ * @type: A #GType value.
+ *
+ * Checks if @type is an interface type.
+ * An interface type provides a pure API, the implementation
+ * of which is provided by another type (which is then said to conform
+ * to the interface).  GLib interfaces are somewhat analogous to Java
+ * interfaces and C++ classes containing only pure virtual functions,
+ * with the difference that GType interfaces are not derivable (but see
+ * g_type_interface_add_prerequisite() for an alternative).
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_IS_OBJECT:
+ * @type: Type id to check
+ *
+ * Check if the passed in type id is a %G_TYPE_OBJECT or derived from it.
+ *
+ * Returns: %FALSE or %TRUE, indicating whether @type is a %G_TYPE_OBJECT.
+ */
+
+
+/**
+ * G_TYPE_IS_PARAM:
+ * @type: a #GType ID
+ *
+ * Checks whether @type "is a" %G_TYPE_PARAM.
+ */
+
+
+/**
+ * G_TYPE_IS_VALUE:
+ * @type: A #GType value.
+ *
+ * Checks whether the passed in type ID can be used for g_value_init().
+ * That is, this macro checks whether this type provides an implementation
+ * of the #GTypeValueTable functions required for a type to create a #GValue of.
+ *
+ * Returns: Whether @type is suitable as a #GValue type.
+ */
+
+
+/**
+ * G_TYPE_IS_VALUE_ABSTRACT:
+ * @type: A #GType value.
+ *
+ * Checks if @type is an abstract value type.  An abstract value type introduces
+ * a value table, but can't be used for g_value_init() and is normally used as
+ * an abstract base type for derived value types.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_IS_VALUE_TYPE:
+ * @type: A #GType value.
+ *
+ * Checks if @type is a value type and can be used with g_value_init().
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_TYPE_KEY_FILE:
+ *
+ * The #GType for a boxed type holding a #GKeyFile.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * G_TYPE_LONG:
+ *
+ * The fundamental type corresponding to #glong.
+ */
+
+
+/**
+ * G_TYPE_MAIN_CONTEXT:
+ *
+ * The #GType for a boxed type holding a #GMainContext.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * G_TYPE_MAIN_LOOP:
+ *
+ * The #GType for a boxed type holding a #GMainLoop.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * G_TYPE_MAKE_FUNDAMENTAL:
+ * @x: the fundamental type number.
+ *
+ * Get the type ID for the fundamental type number @x.
+ * Use g_type_fundamental_next() instead of this macro to create new fundamental
+ * types.
+ *
+ * Returns: the GType
+ */
+
+
+/**
+ * G_TYPE_MATCH_INFO:
+ *
+ * The #GType for a boxed type holding a #GMatchInfo reference.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * G_TYPE_NONE:
+ *
+ * A fundamental type which is used as a replacement for the C
+ * <literal>void</literal> return type.
+ */
+
+
+/**
+ * G_TYPE_OBJECT:
+ *
+ * The fundamental type for #GObject.
+ */
+
+
+/**
+ * G_TYPE_PARAM:
+ *
+ * The fundamental type from which all #GParamSpec types are derived.
+ */
+
+
+/**
+ * G_TYPE_PARAM_BOOLEAN:
+ *
+ * The #GType of #GParamSpecBoolean.
+ */
+
+
+/**
+ * G_TYPE_PARAM_BOXED:
+ *
+ * The #GType of #GParamSpecBoxed.
+ */
+
+
+/**
+ * G_TYPE_PARAM_CHAR:
+ *
+ * The #GType of #GParamSpecChar.
+ */
+
+
+/**
+ * G_TYPE_PARAM_DOUBLE:
+ *
+ * The #GType of #GParamSpecDouble.
+ */
+
+
+/**
+ * G_TYPE_PARAM_ENUM:
+ *
+ * The #GType of #GParamSpecEnum.
+ */
+
+
+/**
+ * G_TYPE_PARAM_FLAGS:
+ *
+ * The #GType of #GParamSpecFlags.
+ */
+
+
+/**
+ * G_TYPE_PARAM_FLOAT:
+ *
+ * The #GType of #GParamSpecFloat.
+ */
+
+
+/**
+ * G_TYPE_PARAM_GTYPE:
+ *
+ * The #GType of #GParamSpecGType.
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * G_TYPE_PARAM_INT:
+ *
+ * The #GType of #GParamSpecInt.
+ */
+
+
+/**
+ * G_TYPE_PARAM_INT64:
+ *
+ * The #GType of #GParamSpecInt64.
+ */
+
+
+/**
+ * G_TYPE_PARAM_LONG:
+ *
+ * The #GType of #GParamSpecLong.
+ */
+
+
+/**
+ * G_TYPE_PARAM_OBJECT:
+ *
+ * The #GType of #GParamSpecObject.
+ */
+
+
+/**
+ * G_TYPE_PARAM_OVERRIDE:
+ *
+ * The #GType of #GParamSpecOverride.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_TYPE_PARAM_PARAM:
+ *
+ * The #GType of #GParamSpecParam.
+ */
+
+
+/**
+ * G_TYPE_PARAM_POINTER:
+ *
+ * The #GType of #GParamSpecPointer.
+ */
+
+
+/**
+ * G_TYPE_PARAM_STRING:
+ *
+ * The #GType of #GParamSpecString.
+ */
+
+
+/**
+ * G_TYPE_PARAM_UCHAR:
+ *
+ * The #GType of #GParamSpecUChar.
+ */
+
+
+/**
+ * G_TYPE_PARAM_UINT:
+ *
+ * The #GType of #GParamSpecUInt.
+ */
+
+
+/**
+ * G_TYPE_PARAM_UINT64:
+ *
+ * The #GType of #GParamSpecUInt64.
+ */
+
+
+/**
+ * G_TYPE_PARAM_ULONG:
+ *
+ * The #GType of #GParamSpecULong.
+ */
+
+
+/**
+ * G_TYPE_PARAM_UNICHAR:
+ *
+ * The #GType of #GParamSpecUnichar.
+ */
+
+
+/**
+ * G_TYPE_PARAM_VALUE_ARRAY:
+ *
+ * The #GType of #GParamSpecValueArray.
+ *
+ * Deprecated: 2.32: Use #GArray instead of #GValueArray
+ */
+
+
+/**
+ * G_TYPE_PARAM_VARIANT:
+ *
+ * The #GType of #GParamSpecVariant.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TYPE_POINTER:
+ *
+ * The fundamental type corresponding to #gpointer.
+ */
+
+
+/**
+ * G_TYPE_PTR_ARRAY:
+ *
+ * The #GType for a boxed type holding a #GPtrArray reference.
+ *
+ * Since: 2.22
+ */
+
+
+/**
+ * G_TYPE_REGEX:
+ *
+ * The #GType for a boxed type holding a #GRegex reference.
+ *
+ * Since: 2.14
+ */
+
+
+/**
+ * G_TYPE_RESERVED_BSE_FIRST:
+ *
+ * First fundamental type number to create a new fundamental type id with
+ * G_TYPE_MAKE_FUNDAMENTAL() reserved for BSE.
+ */
+
+
+/**
+ * G_TYPE_RESERVED_BSE_LAST:
+ *
+ * Last fundamental type number reserved for BSE.
+ */
+
+
+/**
+ * G_TYPE_RESERVED_GLIB_FIRST:
+ *
+ * First fundamental type number to create a new fundamental type id with
+ * G_TYPE_MAKE_FUNDAMENTAL() reserved for GLib.
+ */
+
+
+/**
+ * G_TYPE_RESERVED_GLIB_LAST:
+ *
+ * Last fundamental type number reserved for GLib.
+ */
+
+
+/**
+ * G_TYPE_RESERVED_USER_FIRST:
+ *
+ * First available fundamental type number to create new fundamental
+ * type id with G_TYPE_MAKE_FUNDAMENTAL().
+ */
+
+
+/**
+ * G_TYPE_SOURCE:
+ *
+ * The #GType for a boxed type holding a #GSource.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * G_TYPE_STRING:
+ *
+ * The fundamental type corresponding to nul-terminated C strings.
+ */
+
+
+/**
+ * G_TYPE_STRV:
+ *
+ * The #GType for a boxed type holding a %NULL-terminated array of strings.
+ *
+ * The code fragments in the following example show the use of a property of
+ * type #G_TYPE_STRV with g_object_class_install_property(), g_object_set()
+ * and g_object_get().
+ *
+ * |[
+ * g_object_class_install_property (object_class,
+ * PROP_AUTHORS,
+ * g_param_spec_boxed ("authors",
+ * _("Authors"),
+ * _("List of authors"),
+ * G_TYPE_STRV,
+ * G_PARAM_READWRITE));
+ *
+ * gchar *authors[] = { "Owen", "Tim", NULL };
+ * g_object_set (obj, "authors", authors, NULL);
+ *
+ * gchar *writers[];
+ * g_object_get (obj, "authors", &writers, NULL);
+ * /&ast; do something with writers &ast;/
+ * g_strfreev (writers);
+ * ]|
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * G_TYPE_UCHAR:
+ *
+ * The fundamental type corresponding to #guchar.
+ */
+
+
+/**
+ * G_TYPE_UINT:
+ *
+ * The fundamental type corresponding to #guint.
+ */
+
+
+/**
+ * G_TYPE_UINT64:
+ *
+ * The fundamental type corresponding to #guint64.
+ */
+
+
+/**
+ * G_TYPE_ULONG:
+ *
+ * The fundamental type corresponding to #gulong.
+ */
+
+
+/**
+ * G_TYPE_VALUE:
+ *
+ * The type ID of the "GValue" type which is a boxed type,
+ * used to pass around pointers to GValues.
+ */
+
+
+/**
+ * G_TYPE_VALUE_ARRAY:
+ *
+ * The type ID of the "GValueArray" type which is a boxed type,
+ * used to pass around pointers to GValueArrays.
+ *
+ * Deprecated: 2.32: Use #GArray instead of #GValueArray
+ */
+
+
+/**
+ * G_TYPE_VARIANT:
+ *
+ * The fundamental type corresponding to #GVariant.
+ *
+ * All floating #GVariant instances passed through the #GType system are
+ * consumed.
+ *
+ * Note that callbacks in closures, and signal handlers
+ * for signals of return type %G_TYPE_VARIANT, must never return floating
+ * variants.
+ *
+ * Note: GLib 2.24 did include a boxed type with this name. It was replaced
+ * with this fundamental type in 2.26.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * G_TYPE_VARIANT_BUILDER:
+ *
+ * The #GType for a boxed type holding a #GVariantBuilder.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * G_TYPE_VARIANT_TYPE:
+ *
+ * The #GType for a boxed type holding a #GVariantType.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * G_UNICHAR_MAX_DECOMPOSITION_LENGTH:
+ *
+ * The maximum length (in codepoints) of a compatibility or canonical
+ * decomposition of a single Unicode character.
+ *
+ * This is as defined by Unicode 6.1.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * G_UNICODE_COMBINING_MARK:
+ *
+ * Older name for %G_UNICODE_SPACING_MARK.
+ *
+ * Deprecated: 2.30: Use %G_UNICODE_SPACING_MARK.
+ */
+
+
+/**
+ * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH:
+ *
+ * Allowed characters in a path. Includes "!$&'()*+,;=:@/".
+ */
+
+
+/**
+ * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT:
+ *
+ * Allowed characters in path elements. Includes "!$&'()*+,;=:@".
+ */
+
+
+/**
+ * G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO:
+ *
+ * Allowed characters in userinfo as defined in RFC 3986. Includes "!$&'()*+,;=:".
+ */
+
+
+/**
+ * G_URI_RESERVED_CHARS_GENERIC_DELIMITERS:
+ *
+ * Generic delimiters characters as defined in RFC 3986. Includes ":/?#[]@".
+ */
+
+
+/**
+ * G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS:
+ *
+ * Subcomponent delimiter characters as defined in RFC 3986. Includes "!$&'()*+,;=".
+ */
+
+
+/**
+ * G_VALUE_COLLECT:
+ * @value: a #GValue return location. @value is supposed to be initialized according to the value type to be collected
+ * @var_args: the va_list variable; it may be evaluated multiple times
+ * @flags: flags which are passed on to the collect_value() function of the #GTypeValueTable of @value.
+ * @__error: a #gchar** variable that will be modified to hold a g_new() allocated error messages if something fails
+ *
+ * Collects a variable argument value from a va_list. We have to
+ * implement the varargs collection as a macro, because on some systems
+ * va_list variables cannot be passed by reference.
+ *
+ * Note: If you are creating the @value argument just before calling this macro,
+ * you should use the #G_VALUE_COLLECT_INIT variant and pass the unitialized
+ * #GValue. That variant is faster than #G_VALUE_COLLECT.
+ */
+
+
+/**
+ * G_VALUE_COLLECT_FORMAT_MAX_LENGTH:
+ *
+ * The maximal number of #GTypeCValue<!-- -->s which can be collected for a
+ * single #GValue.
+ */
+
+
+/**
+ * G_VALUE_COLLECT_INIT:
+ * @value: a #GValue return location. @value must contain only 0 bytes.
+ * @_value_type: the #GType to use for @value.
+ * @var_args: the va_list variable; it may be evaluated multiple times
+ * @flags: flags which are passed on to the collect_value() function of the #GTypeValueTable of @value.
+ * @__error: a #gchar** variable that will be modified to hold a g_new() allocated error messages if something fails
+ *
+ * Collects a variable argument value from a va_list. We have to
+ * implement the varargs collection as a macro, because on some systems
+ * va_list variables cannot be passed by reference.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * G_VALUE_HOLDS:
+ * @value: A #GValue structure.
+ * @type: A #GType value.
+ *
+ * Checks if @value holds (or contains) a value of @type.
+ * This macro will also check for @value != %NULL and issue a
+ * warning if the check fails.
+ *
+ * Returns: %TRUE if @value holds the @type.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_BOOLEAN:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_BOOLEAN.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_BOXED:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values derived
+ * from type %G_TYPE_BOXED.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_CHAR:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_CHAR.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_DOUBLE:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_DOUBLE.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_ENUM:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values derived from type %G_TYPE_ENUM.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_FLAGS:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values derived from type %G_TYPE_FLAGS.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_FLOAT:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_FLOAT.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_GTYPE:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_GTYPE.
+ *
+ * Since: 2.12
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_INT:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_INT.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_INT64:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_INT64.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_LONG:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_LONG.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_OBJECT:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values derived from type %G_TYPE_OBJECT.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_PARAM:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values derived from type %G_TYPE_PARAM.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_POINTER:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_POINTER.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_STRING:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_STRING.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_UCHAR:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_UCHAR.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_UINT:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_UINT.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_UINT64:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_UINT64.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_ULONG:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_ULONG.
+ *
+ * Returns: %TRUE on success.
+ */
+
+
+/**
+ * G_VALUE_HOLDS_VARIANT:
+ * @value: a valid #GValue structure
+ *
+ * Checks whether the given #GValue can hold values of type %G_TYPE_VARIANT.
+ *
+ * Returns: %TRUE on success.
+ * Since: 2.26
+ */
+
+
+/**
+ * G_VALUE_INIT:
+ *
+ * A #GValue must be initialized before it can be used.
+ * This macro can be used as initializer instead of an explicit
+ * <literal>{ 0 }</literal> when declaring a variable,
+ * but it cannot be assigned to a variable.
+ *
+ * |[
+ * GValue value = G_VALUE_INIT;
+ * ]|
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * G_VALUE_LCOPY:
+ * @value: a #GValue return location. @value is supposed to be initialized according to the value type to be collected
+ * @var_args: the va_list variable; it may be evaluated multiple times
+ * @flags: flags which are passed on to the lcopy_value() function of the #GTypeValueTable of @value.
+ * @__error: a #gchar** variable that will be modified to hold a g_new() allocated error messages if something fails
+ *
+ * Collects a value's variable argument locations from a va_list. Usage is
+ * analogous to G_VALUE_COLLECT().
+ */
+
+
+/**
+ * G_VALUE_NOCOPY_CONTENTS:
+ *
+ * If passed to G_VALUE_COLLECT(), allocated data won't be copied
+ * but used verbatim. This does not affect ref-counted types like
+ * objects.
+ */
+
+
+/**
+ * G_VALUE_TYPE:
+ * @value: A #GValue structure.
+ *
+ * Get the type identifier of @value.
+ *
+ * Returns: the #GType.
+ */
+
+
+/**
+ * G_VALUE_TYPE_NAME:
+ * @value: A #GValue structure.
+ *
+ * Gets the the type name of @value.
+ *
+ * Returns: the type name.
+ */
+
+
+/**
+ * G_VARIANT_TYPE:
+ * @type_string: a well-formed #GVariantType type string
+ *
+ * Converts a string to a const #GVariantType.  Depending on the
+ * current debugging level, this function may perform a runtime check
+ * to ensure that @string is a valid GVariant type string.
+ *
+ * It is always a programmer error to use this macro with an invalid
+ * type string. If in doubt, use g_variant_type_string_is_valid() to
+ * check if the string is valid.
+ *
+ * Since 2.24
+ */
+
+
+/**
+ * G_VARIANT_TYPE_ANY:
+ *
+ * An indefinite type that is a supertype of every type (including
+ * itself).
+ */
+
+
+/**
+ * G_VARIANT_TYPE_ARRAY:
+ *
+ * An indefinite type that is a supertype of every array type.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_BASIC:
+ *
+ * An indefinite type that is a supertype of every basic (ie:
+ * non-container) type.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_BOOLEAN:
+ *
+ * The type of a value that can be either %TRUE or %FALSE.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_BYTE:
+ *
+ * The type of an integer value that can range from 0 to 255.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_BYTESTRING:
+ *
+ * The type of an array of bytes.  This type is commonly used to pass
+ * around strings that may not be valid utf8.  In that case, the
+ * convention is that the nul terminator character should be included as
+ * the last character in the array.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_BYTESTRING_ARRAY:
+ *
+ * The type of an array of byte strings (an array of arrays of bytes).
+ */
+
+
+/**
+ * G_VARIANT_TYPE_DICTIONARY:
+ *
+ * An indefinite type that is a supertype of every dictionary type --
+ * that is, any array type that has an element type equal to any
+ * dictionary entry type.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_DICT_ENTRY:
+ *
+ * An indefinite type that is a supertype of every dictionary entry
+ * type.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_DOUBLE:
+ *
+ * The type of a double precision IEEE754 floating point number.
+ * These guys go up to about 1.80e308 (plus and minus) but miss out on
+ * some numbers in between.  In any case, that's far greater than the
+ * estimated number of fundamental particles in the observable
+ * universe.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_HANDLE:
+ *
+ * The type of a 32bit signed integer value, that by convention, is used
+ * as an index into an array of file descriptors that are sent alongside
+ * a D-Bus message.
+ *
+ * If you are not interacting with D-Bus, then there is no reason to make
+ * use of this type.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_INT16:
+ *
+ * The type of an integer value that can range from -32768 to 32767.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_INT32:
+ *
+ * The type of an integer value that can range from -2147483648 to
+ * 2147483647.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_INT64:
+ *
+ * The type of an integer value that can range from
+ * -9223372036854775808 to 9223372036854775807.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_MAYBE:
+ *
+ * An indefinite type that is a supertype of every maybe type.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_OBJECT_PATH:
+ *
+ * The type of a D-Bus object reference.  These are strings of a
+ * specific format used to identify objects at a given destination on
+ * the bus.
+ *
+ * If you are not interacting with D-Bus, then there is no reason to make
+ * use of this type.  If you are, then the D-Bus specification contains a
+ * precise description of valid object paths.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_OBJECT_PATH_ARRAY:
+ *
+ * The type of an array of object paths.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_SIGNATURE:
+ *
+ * The type of a D-Bus type signature.  These are strings of a specific
+ * format used as type signatures for D-Bus methods and messages.
+ *
+ * If you are not interacting with D-Bus, then there is no reason to make
+ * use of this type.  If you are, then the D-Bus specification contains a
+ * precise description of valid signature strings.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_STRING:
+ *
+ * The type of a string.  "" is a string.  %NULL is not a string.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_STRING_ARRAY:
+ *
+ * The type of an array of strings.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_TUPLE:
+ *
+ * An indefinite type that is a supertype of every tuple type,
+ * regardless of the number of items in the tuple.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_UINT16:
+ *
+ * The type of an integer value that can range from 0 to 65535.
+ * There were about this many people living in Toronto in the 1870s.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_UINT32:
+ *
+ * The type of an integer value that can range from 0 to 4294967295.
+ * That's one number for everyone who was around in the late 1970s.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_UINT64:
+ *
+ * The type of an integer value that can range from 0 to
+ * 18446744073709551616.  That's a really big number, but a Rubik's
+ * cube can have a bit more than twice as many possible positions.
+ */
+
+
+/**
+ * G_VARIANT_TYPE_UNIT:
+ *
+ * The empty tuple type.  Has only one instance.  Known also as "triv"
+ * or "void".
+ */
+
+
+/**
+ * G_VARIANT_TYPE_VARDICT:
+ *
+ * The type of a dictionary mapping strings to variants (the ubiquitous
+ * "a{sv}" type).
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * G_VARIANT_TYPE_VARIANT:
+ *
+ * The type of a box that contains any other value (including another
+ * variant).
+ */
+
+
+/**
+ * SECTION:enumerations_flags
+ * @short_description: Enumeration and flags types
+ * @title: Enumeration and Flag Types g_param_spec_flags()
+ *
+ * The GLib type system provides fundamental types for enumeration and
+ * flags types. (Flags types are like enumerations, but allow their
+ * values to be combined by bitwise or). A registered enumeration or
+ * flags type associates a name and a nickname with each allowed
+ * value, and the methods g_enum_get_value_by_name(),
+ * g_enum_get_value_by_nick(), g_flags_get_value_by_name() and
+ * g_flags_get_value_by_nick() can look up values by their name or
+ * nickname.  When an enumeration or flags type is registered with the
+ * GLib type system, it can be used as value type for object
+ * properties, using g_param_spec_enum() or g_param_spec_flags().
+ *
+ * GObject ships with a utility called <link
+ * linkend="glib-mkenums">glib-mkenums</link> that can construct
+ * suitable type registration functions from C enumeration
+ * definitions.
+ */
+
+
+/**
+ * SECTION:gbinding
+ * @Title: GBinding
+ * @Short_Description: Bind two object properties
+ *
+ * #GBinding is the representation of a binding between a property on a
+ * #GObject instance (or source) and another property on another #GObject
+ * instance (or target). Whenever the source property changes, the same
+ * value is applied to the target property; for instance, the following
+ * binding:
+ *
+ * |[
+ * g_object_bind_property (object1, "property-a",
+ * object2, "property-b",
+ * G_BINDING_DEFAULT);
+ * ]|
+ *
+ * will cause <emphasis>object2:property-b</emphasis> to be updated every
+ * time g_object_set() or the specific accessor changes the value of
+ * <emphasis>object1:property-a</emphasis>.
+ *
+ * It is possible to create a bidirectional binding between two properties
+ * of two #GObject instances, so that if either property changes, the
+ * other is updated as well, for instance:
+ *
+ * |[
+ * g_object_bind_property (object1, "property-a",
+ * object2, "property-b",
+ * G_BINDING_BIDIRECTIONAL);
+ * ]|
+ *
+ * will keep the two properties in sync.
+ *
+ * It is also possible to set a custom transformation function (in both
+ * directions, in case of a bidirectional binding) to apply a custom
+ * transformation from the source value to the target value before
+ * applying it; for instance, the following binding:
+ *
+ * |[
+ * g_object_bind_property_full (adjustment1, "value",
+ * adjustment2, "value",
+ * G_BINDING_BIDIRECTIONAL,
+ * celsius_to_fahrenheit,
+ * fahrenheit_to_celsius,
+ * NULL, NULL);
+ * ]|
+ *
+ * will keep the <emphasis>value</emphasis> property of the two adjustments
+ * in sync; the <function>celsius_to_fahrenheit</function> function will be
+ * called whenever the <emphasis>adjustment1:value</emphasis> property changes
+ * and will transform the current value of the property before applying it
+ * to the <emphasis>adjustment2:value</emphasis> property; vice versa, the
+ * <function>fahrenheit_to_celsius</function> function will be called whenever
+ * the <emphasis>adjustment2:value</emphasis> property changes, and will
+ * transform the current value of the property before applying it to the
+ * <emphasis>adjustment1:value</emphasis>.
+ *
+ * Note that #GBinding does not resolve cycles by itself; a cycle like
+ *
+ * |[
+ * object1:propertyA -> object2:propertyB
+ * object2:propertyB -> object3:propertyC
+ * object3:propertyC -> object1:propertyA
+ * ]|
+ *
+ * might lead to an infinite loop. The loop, in this particular case,
+ * can be avoided if the objects emit the #GObject::notify signal only
+ * if the value has effectively been changed. A binding is implemented
+ * using the #GObject::notify signal, so it is susceptible to all the
+ * various ways of blocking a signal emission, like g_signal_stop_emission()
+ * or g_signal_handler_block().
+ *
+ * A binding will be severed, and the resources it allocates freed, whenever
+ * either one of the #GObject instances it refers to are finalized, or when
+ * the #GBinding instance loses its last reference.
+ *
+ * #GBinding is available since GObject 2.26
+ */
+
+
+/**
+ * SECTION:gboxed
+ * @short_description: A mechanism to wrap opaque C structures registered by the type system
+ * @see_also: #GParamSpecBoxed, g_param_spec_boxed()
+ * @title: Boxed Types
+ *
+ * GBoxed is a generic wrapper mechanism for arbitrary C structures. The only
+ * thing the type system needs to know about the structures is how to copy and
+ * free them, beyond that they are treated as opaque chunks of memory.
+ *
+ * Boxed types are useful for simple value-holder structures like rectangles or
+ * points. They can also be used for wrapping structures defined in non-GObject
+ * based libraries.
+ */
+
+
+/**
+ * SECTION:gclosure
+ * @short_description: Functions as first-class objects
+ * @title: Closures
+ *
+ * A #GClosure represents a callback supplied by the programmer. It
+ * will generally comprise a function of some kind and a marshaller
+ * used to call it. It is the reponsibility of the marshaller to
+ * convert the arguments for the invocation from #GValue<!-- -->s into
+ * a suitable form, perform the callback on the converted arguments,
+ * and transform the return value back into a #GValue.
+ *
+ * In the case of C programs, a closure usually just holds a pointer
+ * to a function and maybe a data argument, and the marshaller
+ * converts between #GValue<!-- --> and native C types. The GObject
+ * library provides the #GCClosure type for this purpose. Bindings for
+ * other languages need marshallers which convert between #GValue<!--
+ * -->s and suitable representations in the runtime of the language in
+ * order to use functions written in that languages as callbacks.
+ *
+ * Within GObject, closures play an important role in the
+ * implementation of signals. When a signal is registered, the
+ * @c_marshaller argument to g_signal_new() specifies the default C
+ * marshaller for any closure which is connected to this
+ * signal. GObject provides a number of C marshallers for this
+ * purpose, see the g_cclosure_marshal_*() functions. Additional C
+ * marshallers can be generated with the <link
+ * linkend="glib-genmarshal">glib-genmarshal</link> utility.  Closures
+ * can be explicitly connected to signals with
+ * g_signal_connect_closure(), but it usually more convenient to let
+ * GObject create a closure automatically by using one of the
+ * g_signal_connect_*() functions which take a callback function/user
+ * data pair.
+ *
+ * Using closures has a number of important advantages over a simple
+ * callback function/data pointer combination:
+ * <itemizedlist>
+ * <listitem><para>
+ * Closures allow the callee to get the types of the callback parameters,
+ * which means that language bindings don't have to write individual glue
+ * for each callback type.
+ * </para></listitem>
+ * <listitem><para>
+ * The reference counting of #GClosure makes it easy to handle reentrancy
+ * right; if a callback is removed while it is being invoked, the closure
+ * and its parameters won't be freed until the invocation finishes.
+ * </para></listitem>
+ * <listitem><para>
+ * g_closure_invalidate() and invalidation notifiers allow callbacks to be
+ * automatically removed when the objects they point to go away.
+ * </para></listitem>
+ * </itemizedlist>
+ */
+
+
+/**
+ * SECTION:generic_values
+ * @short_description: A polymorphic type that can hold values of any other type
+ * @see_also: The fundamental types which all support #GValue operations and thus can be used as a type initializer for g_value_init() are defined by a separate interface.  See the <link linkend="gobject-Standard-Parameter-and-Value-Types">Standard Values API</link> for details.
+ * @title: Generic values
+ *
+ * The #GValue structure is basically a variable container that consists
+ * of a type identifier and a specific value of that type.
+ * The type identifier within a #GValue structure always determines the
+ * type of the associated value.
+ * To create a undefined #GValue structure, simply create a zero-filled
+ * #GValue structure. To initialize the #GValue, use the g_value_init()
+ * function. A #GValue cannot be used until it is initialized.
+ * The basic type operations (such as freeing and copying) are determined
+ * by the #GTypeValueTable associated with the type ID stored in the #GValue.
+ * Other #GValue operations (such as converting values between types) are
+ * provided by this interface.
+ *
+ * The code in the example program below demonstrates #GValue's
+ * features.
+ *
+ * |[
+ * #include &lt;glib-object.h&gt;
+ *
+ * static void
+ * int2string (const GValue *src_value,
+ * GValue       *dest_value)
+ * {
+ * if (g_value_get_int (src_value) == 42)
+ * g_value_set_static_string (dest_value, "An important number");
+ * else
+ * g_value_set_static_string (dest_value, "What's that?");
+ * }
+ *
+ * int
+ * main (int   argc,
+ * char *argv[])
+ * {
+ * /&ast; GValues must be initialized &ast;/
+ * GValue a = G_VALUE_INIT;
+ * GValue b = G_VALUE_INIT;
+ * const gchar *message;
+ *
+ * g_type_init ();
+ *
+ * /&ast; The GValue starts empty &ast;/
+ * g_assert (!G_VALUE_HOLDS_STRING (&amp;a));
+ *
+ * /&ast; Put a string in it &ast;/
+ * g_value_init (&amp;a, G_TYPE_STRING);
+ * g_assert (G_VALUE_HOLDS_STRING (&amp;a));
+ * g_value_set_static_string (&amp;a, "Hello, world!");
+ * g_printf ("%s\n", g_value_get_string (&amp;a));
+ *
+ * /&ast; Reset it to its pristine state &ast;/
+ * g_value_unset (&amp;a);
+ *
+ * /&ast; It can then be reused for another type &ast;/
+ * g_value_init (&amp;a, G_TYPE_INT);
+ * g_value_set_int (&amp;a, 42);
+ *
+ * /&ast; Attempt to transform it into a GValue of type STRING &ast;/
+ * g_value_init (&amp;b, G_TYPE_STRING);
+ *
+ * /&ast; An INT is transformable to a STRING &ast;/
+ * g_assert (g_value_type_transformable (G_TYPE_INT, G_TYPE_STRING));
+ *
+ * g_value_transform (&amp;a, &amp;b);
+ * g_printf ("%s\n", g_value_get_string (&amp;b));
+ *
+ * /&ast; Attempt to transform it again using a custom transform function &ast;/
+ * g_value_register_transform_func (G_TYPE_INT, G_TYPE_STRING, int2string);
+ * g_value_transform (&amp;a, &amp;b);
+ * g_printf ("%s\n", g_value_get_string (&amp;b));
+ * return 0;
+ * }
+ * ]|
+ */
+
+
+/**
+ * SECTION:gparamspec
+ * @short_description: Metadata for parameter specifications
+ * @see_also: g_object_class_install_property(), g_object_set(), g_object_get(), g_object_set_property(), g_object_get_property(), g_value_register_transform_func()
+ * @title: GParamSpec
+ *
+ * #GParamSpec is an object structure that encapsulates the metadata
+ * required to specify parameters, such as e.g. #GObject properties.
+ *
+ * <para id="canonical-parameter-name">
+ * Parameter names need to start with a letter (a-z or A-Z). Subsequent
+ * characters can be letters, numbers or a '-'.
+ * All other characters are replaced by a '-' during construction.
+ * The result of this replacement is called the canonical name of the
+ * parameter.
+ * </para>
+ */
+
+
+/**
+ * SECTION:gtype
+ * @short_description: The GLib Runtime type identification and management system
+ *
+ * The GType API is the foundation of the GObject system.  It provides the
+ * facilities for registering and managing all fundamental data types,
+ * user-defined object and interface types.  Before using any GType
+ * or GObject functions, g_type_init() must be called to initialize the
+ * type system.
+ *
+ * For type creation and registration purposes, all types fall into one of
+ * two categories: static or dynamic.  Static types are never loaded or
+ * unloaded at run-time as dynamic types may be.  Static types are created
+ * with g_type_register_static() that gets type specific information passed
+ * in via a #GTypeInfo structure.
+ * Dynamic types are created with g_type_register_dynamic() which takes a
+ * #GTypePlugin structure instead. The remaining type information (the
+ * #GTypeInfo structure) is retrieved during runtime through #GTypePlugin
+ * and the g_type_plugin_*() API.
+ * These registration functions are usually called only once from a
+ * function whose only purpose is to return the type identifier for a
+ * specific class.  Once the type (or class or interface) is registered,
+ * it may be instantiated, inherited, or implemented depending on exactly
+ * what sort of type it is.
+ * There is also a third registration function for registering fundamental
+ * types called g_type_register_fundamental() which requires both a #GTypeInfo
+ * structure and a #GTypeFundamentalInfo structure but it is seldom used
+ * since most fundamental types are predefined rather than user-defined.
+ *
+ * Type instance and class structs are limited to a total of 64 KiB,
+ * including all parent types. Similarly, type instances' private data
+ * (as created by g_type_class_add_private()) are limited to a total of
+ * 64 KiB. If a type instance needs a large static buffer, allocate it
+ * separately (typically by using #GArray or #GPtrArray) and put a pointer
+ * to the buffer in the structure.
+ *
+ * A final word about type names.
+ * Such an identifier needs to be at least three characters long. There is no
+ * upper length limit. The first character needs to be a letter (a-z or A-Z)
+ * or an underscore '_'. Subsequent characters can be letters, numbers or
+ * any of '-_+'.
+ */
+
+
+/**
+ * SECTION:gtypemodule
+ * @short_description: Type loading modules <varlistentry> <term>#GTypePlugin</term> <listitem><para>The abstract type loader interface.</para></listitem> </varlistentry> <varlistentry> <term>#GModule</term> <listitem><para>Portable mechanism for dynamically loaded modules.</para></listitem> </varlistentry> </variablelist>
+ * @title: GTypeModule
+ *
+ * #GTypeModule provides a simple implementation of the #GTypePlugin
+ * interface. The model of #GTypeModule is a dynamically loaded module
+ * which implements some number of types and interface
+ * implementations. When the module is loaded, it registers its types
+ * and interfaces using g_type_module_register_type() and
+ * g_type_module_add_interface().  As long as any instances of these
+ * types and interface implementations are in use, the module is kept
+ * loaded. When the types and interfaces are gone, the module may be
+ * unloaded. If the types and interfaces become used again, the module
+ * will be reloaded. Note that the last unref cannot happen in module
+ * code, since that would lead to the caller's code being unloaded before
+ * g_object_unref() returns to it.
+ *
+ * Keeping track of whether the module should be loaded or not is done by
+ * using a use count - it starts at zero, and whenever it is greater than
+ * zero, the module is loaded. The use count is maintained internally by
+ * the type system, but also can be explicitly controlled by
+ * g_type_module_use() and g_type_module_unuse(). Typically, when loading
+ * a module for the first type, g_type_module_use() will be used to load
+ * it so that it can initialize its types. At some later point, when the
+ * module no longer needs to be loaded except for the type
+ * implementations it contains, g_type_module_unuse() is called.
+ *
+ * #GTypeModule does not actually provide any implementation of module
+ * loading and unloading. To create a particular module type you must
+ * derive from #GTypeModule and implement the load and unload functions
+ * in #GTypeModuleClass.
+ */
+
+
+/**
+ * SECTION:gtypeplugin
+ * @short_description: An interface for dynamically loadable types
+ * @see_also: #GTypeModule and g_type_register_dynamic().
+ * @title: GTypePlugin
+ *
+ * The GObject type system supports dynamic loading of types. The
+ * #GTypePlugin interface is used to handle the lifecycle of
+ * dynamically loaded types.  It goes as follows:
+ *
+ * <orderedlist>
+ * <listitem><para>
+ * The type is initially introduced (usually upon loading the module
+ * the first time, or by your main application that knows what modules
+ * introduces what types), like this:
+ * |[
+ * new_type_id = g_type_register_dynamic (parent_type_id,
+ * "TypeName",
+ * new_type_plugin,
+ * type_flags);
+ * ]|
+ * where <literal>new_type_plugin</literal> is an implementation of the
+ * #GTypePlugin interface.
+ * </para></listitem>
+ * <listitem><para>
+ * The type's implementation is referenced, e.g. through
+ * g_type_class_ref() or through g_type_create_instance() (this is
+ * being called by g_object_new()) or through one of the above done on
+ * a type derived from <literal>new_type_id</literal>.
+ * </para></listitem>
+ * <listitem><para>
+ * This causes the type system to load the type's implementation by calling
+ * g_type_plugin_use() and g_type_plugin_complete_type_info() on
+ * <literal>new_type_plugin</literal>.
+ * </para></listitem>
+ * <listitem><para>
+ * At some point the type's implementation isn't required anymore, e.g. after
+ * g_type_class_unref() or g_type_free_instance() (called when the reference
+ * count of an instance drops to zero).
+ * </para></listitem>
+ * <listitem><para>
+ * This causes the type system to throw away the information retrieved from
+ * g_type_plugin_complete_type_info() and then it calls
+ * g_type_plugin_unuse() on <literal>new_type_plugin</literal>.
+ * </para></listitem>
+ * <listitem><para>
+ * Things may repeat from the second step.
+ * </para></listitem>
+ * </orderedlist>
+ *
+ * So basically, you need to implement a #GTypePlugin type that
+ * carries a use_count, once use_count goes from zero to one, you need
+ * to load the implementation to successfully handle the upcoming
+ * g_type_plugin_complete_type_info() call. Later, maybe after
+ * succeeding use/unuse calls, once use_count drops to zero, you can
+ * unload the implementation again. The type system makes sure to call
+ * g_type_plugin_use() and g_type_plugin_complete_type_info() again
+ * when the type is needed again.
+ *
+ * #GTypeModule is an implementation of #GTypePlugin that already
+ * implements most of this except for the actual module loading and
+ * unloading. It even handles multiple registered types per module.
+ */
+
+
+/**
+ * SECTION:objects
+ * @title: GObject
+ * @short_description: The base object type
+ * @see_also: #GParamSpecObject, g_param_spec_object()
+ *
+ * GObject is the fundamental type providing the common attributes and
+ * methods for all object types in GTK+, Pango and other libraries
+ * based on GObject.  The GObject class provides methods for object
+ * construction and destruction, property access methods, and signal
+ * support.  Signals are described in detail in <xref
+ * linkend="gobject-Signals"/>.
+ *
+ * <para id="floating-ref">
+ * GInitiallyUnowned is derived from GObject. The only difference between
+ * the two is that the initial reference of a GInitiallyUnowned is flagged
+ * as a <firstterm>floating</firstterm> reference.
+ * This means that it is not specifically claimed to be "owned" by
+ * any code portion. The main motivation for providing floating references is
+ * C convenience. In particular, it allows code to be written as:
+ * |[
+ * container = create_container ();
+ * container_add_child (container, create_child());
+ * ]|
+ * If <function>container_add_child()</function> will g_object_ref_sink() the
+ * passed in child, no reference of the newly created child is leaked.
+ * Without floating references, <function>container_add_child()</function>
+ * can only g_object_ref() the new child, so to implement this code without
+ * reference leaks, it would have to be written as:
+ * |[
+ * Child *child;
+ * container = create_container ();
+ * child = create_child ();
+ * container_add_child (container, child);
+ * g_object_unref (child);
+ * ]|
+ * The floating reference can be converted into
+ * an ordinary reference by calling g_object_ref_sink().
+ * For already sunken objects (objects that don't have a floating reference
+ * anymore), g_object_ref_sink() is equivalent to g_object_ref() and returns
+ * a new reference.
+ * Since floating references are useful almost exclusively for C convenience,
+ * language bindings that provide automated reference and memory ownership
+ * maintenance (such as smart pointers or garbage collection) should not
+ * expose floating references in their API.
+ * </para>
+ *
+ * Some object implementations may need to save an objects floating state
+ * across certain code portions (an example is #GtkMenu), to achieve this,
+ * the following sequence can be used:
+ *
+ * |[
+ * /&ast; save floating state &ast;/
+ * gboolean was_floating = g_object_is_floating (object);
+ * g_object_ref_sink (object);
+ * /&ast; protected code portion &ast;/
+ * ...;
+ * /&ast; restore floating state &ast;/
+ * if (was_floating)
+ * g_object_force_floating (object);
+ * g_object_unref (object); /&ast; release previously acquired reference &ast;/
+ * ]|
+ */
+
+
+/**
+ * SECTION:param_value_types
+ * @short_description: Standard Parameter and Value Types
+ * @see_also: #GParamSpec, #GValue, g_object_class_install_property().
+ * @title: Parameters and Values
+ *
+ * #GValue provides an abstract container structure which can be
+ * copied, transformed and compared while holding a value of any
+ * (derived) type, which is registered as a #GType with a
+ * #GTypeValueTable in its #GTypeInfo structure.  Parameter
+ * specifications for most value types can be created as #GParamSpec
+ * derived instances, to implement e.g. #GObject properties which
+ * operate on #GValue containers.
+ *
+ * Parameter names need to start with a letter (a-z or A-Z). Subsequent
+ * characters can be letters, numbers or a '-'.
+ * All other characters are replaced by a '-' during construction.
+ */
+
+
+/**
+ * SECTION:signals
+ * @short_description: A means for customization of object behaviour and a general purpose notification mechanism
+ * @title: Signals
+ *
+ * The basic concept of the signal system is that of the
+ * <emphasis>emission</emphasis> of a signal. Signals are introduced
+ * per-type and are identified through strings.  Signals introduced
+ * for a parent type are available in derived types as well, so
+ * basically they are a per-type facility that is inherited.  A signal
+ * emission mainly involves invocation of a certain set of callbacks
+ * in precisely defined manner. There are two main categories of such
+ * callbacks, per-object
+ * <footnote><para>Although signals can deal with any kind of instantiatable
+ * type, i'm referring to those types as "object types" in the following,
+ * simply because that is the context most users will encounter signals in.
+ * </para></footnote>
+ * ones and user provided ones.
+ * The per-object callbacks are most often referred to as "object method
+ * handler" or "default (signal) handler", while user provided callbacks are
+ * usually just called "signal handler".
+ * The object method handler is provided at signal creation time (this most
+ * frequently happens at the end of an object class' creation), while user
+ * provided handlers are frequently connected and disconnected to/from a certain
+ * signal on certain object instances.
+ *
+ * A signal emission consists of five stages, unless prematurely stopped:
+ * <variablelist>
+ * <varlistentry><term></term><listitem><para>
+ * 1 - Invocation of the object method handler for %G_SIGNAL_RUN_FIRST signals
+ * </para></listitem></varlistentry>
+ * <varlistentry><term></term><listitem><para>
+ * 2 - Invocation of normal user-provided signal handlers (<emphasis>after</emphasis> flag %FALSE)
+ * </para></listitem></varlistentry>
+ * <varlistentry><term></term><listitem><para>
+ * 3 - Invocation of the object method handler for %G_SIGNAL_RUN_LAST signals
+ * </para></listitem></varlistentry>
+ * <varlistentry><term></term><listitem><para>
+ * 4 - Invocation of user provided signal handlers, connected with an <emphasis>after</emphasis> flag of %TRUE
+ * </para></listitem></varlistentry>
+ * <varlistentry><term></term><listitem><para>
+ * 5 - Invocation of the object method handler for %G_SIGNAL_RUN_CLEANUP signals
+ * </para></listitem></varlistentry>
+ * </variablelist>
+ * The user-provided signal handlers are called in the order they were
+ * connected in.
+ * All handlers may prematurely stop a signal emission, and any number of
+ * handlers may be connected, disconnected, blocked or unblocked during
+ * a signal emission.
+ * There are certain criteria for skipping user handlers in stages 2 and 4
+ * of a signal emission.
+ * First, user handlers may be <emphasis>blocked</emphasis>, blocked handlers are omitted
+ * during callback invocation, to return from the "blocked" state, a
+ * handler has to get unblocked exactly the same amount of times
+ * it has been blocked before.
+ * Second, upon emission of a %G_SIGNAL_DETAILED signal, an additional
+ * "detail" argument passed in to g_signal_emit() has to match the detail
+ * argument of the signal handler currently subject to invocation.
+ * Specification of no detail argument for signal handlers (omission of the
+ * detail part of the signal specification upon connection) serves as a
+ * wildcard and matches any detail argument passed in to emission.
+ */
+
+
+/**
+ * SECTION:value_arrays
+ * @short_description: A container structure to maintain an array of generic values
+ * @see_also: #GValue, #GParamSpecValueArray, g_param_spec_value_array()
+ * @title: Value arrays
+ *
+ * The prime purpose of a #GValueArray is for it to be used as an
+ * object property that holds an array of values. A #GValueArray wraps
+ * an array of #GValue elements in order for it to be used as a boxed
+ * type through %G_TYPE_VALUE_ARRAY.
+ *
+ * #GValueArray is deprecated in favour of #GArray since GLib 2.32. It
+ * is possible to create a #GArray that behaves like a #GValueArray by
+ * using the size of #GValue as the element size, and by setting
+ * g_value_unset() as the clear function using g_array_set_clear_func(),
+ * for instance, the following code:
+ *
+ * |[
+ * GValueArray *array = g_value_array_new (10);
+ * ]|
+ *
+ * can be replaced by:
+ *
+ * |[
+ * GArray *array = g_array_sized_new (FALSE, TRUE, sizeof (GValue), 10);
+ * g_array_set_clear_func (array, (GDestroyNotify) g_value_unset);
+ * ]|
+ */
+
+
+/**
+ * SECTION:value_collection
+ * @Short_description: Converting varargs to generic values
+ * @Title: Varargs Value Collection
+ *
+ * The macros in this section provide the varargs parsing support needed
+ * in variadic GObject functions such as g_object_new() or g_object_set().
+ * They currently support the collection of integral types, floating point
+ * types and pointers.
+ */
+
+
+/**
+ * g_alloca:
+ * @size: number of bytes to allocate.
+ *
+ * Allocates @size bytes on the stack; these bytes will be freed when the current
+ * stack frame is cleaned up. This macro essentially just wraps the alloca()
+ * function present on most UNIX variants.
+ * Thus it provides the same advantages and pitfalls as alloca():
+ * <variablelist>
+ * <varlistentry><term></term><listitem><para>
+ * + alloca() is very fast, as on most systems it's implemented by just adjusting
+ * the stack pointer register.
+ * </para></listitem></varlistentry>
+ * <varlistentry><term></term><listitem><para>
+ * + It doesn't cause any memory fragmentation, within its scope, separate alloca()
+ * blocks just build up and are released together at function end.
+ * </para></listitem></varlistentry>
+ * <varlistentry><term></term><listitem><para>
+ * - Allocation sizes have to fit into the current stack frame. For instance in a
+ * threaded environment on Linux, the per-thread stack size is limited to 2 Megabytes,
+ * so be sparse with alloca() uses.
+ * </para></listitem></varlistentry>
+ * <varlistentry><term></term><listitem><para>
+ * - Allocation failure due to insufficient stack space is not indicated with a %NULL
+ * return like e.g. with malloc(). Instead, most systems probably handle it the same
+ * way as out of stack space situations from infinite function recursion, i.e.
+ * with a segmentation fault.
+ * </para></listitem></varlistentry>
+ * <varlistentry><term></term><listitem><para>
+ * - Special care has to be taken when mixing alloca() with GNU C variable sized arrays.
+ * Stack space allocated with alloca() in the same scope as a variable sized array
+ * will be freed together with the variable sized array upon exit of that scope, and
+ * not upon exit of the enclosing function scope.
+ * </para></listitem></varlistentry>
+ * </variablelist>
+ *
+ * Returns: space for @size bytes, allocated on the stack
+ */
+
+
+/**
+ * g_binding_get_flags:
+ * @binding: a #GBinding
+ *
+ * Retrieves the flags passed when constructing the #GBinding
+ *
+ * Returns: the #GBindingFlags used by the #GBinding
+ * Since: 2.26
+ */
+
+
+/**
+ * g_binding_get_source:
+ * @binding: a #GBinding
+ *
+ * Retrieves the #GObject instance used as the source of the binding
+ *
+ * Returns: (transfer none): the source #GObject
+ * Since: 2.26
+ */
+
+
+/**
+ * g_binding_get_source_property:
+ * @binding: a #GBinding
+ *
+ * Retrieves the name of the property of #GBinding:source used as the source
+ * of the binding
+ *
+ * Returns: the name of the source property
+ * Since: 2.26
+ */
+
+
+/**
+ * g_binding_get_target:
+ * @binding: a #GBinding
+ *
+ * Retrieves the #GObject instance used as the target of the binding
+ *
+ * Returns: (transfer none): the target #GObject
+ * Since: 2.26
+ */
+
+
+/**
+ * g_binding_get_target_property:
+ * @binding: a #GBinding
+ *
+ * Retrieves the name of the property of #GBinding:target used as the target
+ * of the binding
+ *
+ * Returns: the name of the target property
+ * Since: 2.26
+ */
+
+
+/**
+ * g_boxed_copy:
+ * @boxed_type: The type of @src_boxed.
+ * @src_boxed: The boxed structure to be copied.
+ *
+ * Provide a copy of a boxed structure @src_boxed which is of type @boxed_type.
+ *
+ * Returns: The newly created copy of the boxed structure.
+ */
+
+
+/**
+ * g_boxed_free:
+ * @boxed_type: The type of @boxed.
+ * @boxed: The boxed structure to be freed.
+ *
+ * Free the boxed structure @boxed which is of type @boxed_type.
+ */
+
+
+/**
+ * g_boxed_type_register_static:
+ * @name: Name of the new boxed type.
+ * @boxed_copy: Boxed structure copy function.
+ * @boxed_free: Boxed structure free function.
+ *
+ * This function creates a new %G_TYPE_BOXED derived type id for a new
+ * boxed type with name @name. Boxed type handling functions have to be
+ * provided to copy and free opaque boxed structures of this type.
+ *
+ * Returns: New %G_TYPE_BOXED derived type id for @name.
+ */
+
+
+/**
+ * g_cclosure_marshal_BOOLEAN__FLAGS:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: a #GValue which can store the returned #gboolean
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding instance and arg1
+ * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * <literal>gboolean (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal> where the #gint parameter
+ * denotes a flags type.
+ */
+
+
+/**
+ * g_cclosure_marshal_BOOLEAN__OBJECT_BOXED_BOXED:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: a #GValue, which can store the returned string
+ * @n_param_values: 3
+ * @param_values: a #GValue array holding instance, arg1 and arg2
+ * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * <literal>gboolean (*callback) (gpointer instance, GBoxed *arg1, GBoxed *arg2, gpointer user_data)</literal>.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_cclosure_marshal_BOOL__FLAGS:
+ *
+ * Another name for g_cclosure_marshal_BOOLEAN__FLAGS().
+ */
+
+
+/**
+ * g_cclosure_marshal_STRING__OBJECT_POINTER:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: a #GValue, which can store the returned string
+ * @n_param_values: 3
+ * @param_values: a #GValue array holding instance, arg1 and arg2
+ * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * <literal>gchar* (*callback) (gpointer instance, GObject *arg1, gpointer arg2, gpointer user_data)</literal>.
+ */
+
+
+/**
+ * g_cclosure_marshal_VOID__BOOLEAN:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #gboolean parameter
+ * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * <literal>void (*callback) (gpointer instance, gboolean arg1, gpointer user_data)</literal>.
+ */
+
+
+/**
+ * g_cclosure_marshal_VOID__BOXED:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #GBoxed* parameter
+ * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * <literal>void (*callback) (gpointer instance, GBoxed *arg1, gpointer user_data)</literal>.
+ */
+
+
+/**
+ * g_cclosure_marshal_VOID__CHAR:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #gchar parameter
+ * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * <literal>void (*callback) (gpointer instance, gchar arg1, gpointer user_data)</literal>.
+ */
+
+
+/**
+ * g_cclosure_marshal_VOID__DOUBLE:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #gdouble parameter
+ * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * <literal>void (*callback) (gpointer instance, gdouble arg1, gpointer user_data)</literal>.
+ */
+
+
+/**
+ * g_cclosure_marshal_VOID__ENUM:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the enumeration parameter
+ * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * <literal>void (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal> where the #gint parameter denotes an enumeration type..
+ */
+
+
+/**
+ * g_cclosure_marshal_VOID__FLAGS:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the flags parameter
+ * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * <literal>void (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal> where the #gint parameter denotes a flags type.
+ */
+
+
+/**
+ * g_cclosure_marshal_VOID__FLOAT:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #gfloat parameter
+ * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * <literal>void (*callback) (gpointer instance, gfloat arg1, gpointer user_data)</literal>.
+ */
+
+
+/**
+ * g_cclosure_marshal_VOID__INT:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #gint parameter
+ * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * <literal>void (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal>.
+ */
+
+
+/**
+ * g_cclosure_marshal_VOID__LONG:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #glong parameter
+ * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * <literal>void (*callback) (gpointer instance, glong arg1, gpointer user_data)</literal>.
+ */
+
+
+/**
+ * g_cclosure_marshal_VOID__OBJECT:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #GObject* parameter
+ * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * <literal>void (*callback) (gpointer instance, GObject *arg1, gpointer user_data)</literal>.
+ */
+
+
+/**
+ * g_cclosure_marshal_VOID__PARAM:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #GParamSpec* parameter
+ * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * <literal>void (*callback) (gpointer instance, GParamSpec *arg1, gpointer user_data)</literal>.
+ */
+
+
+/**
+ * g_cclosure_marshal_VOID__POINTER:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #gpointer parameter
+ * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * <literal>void (*callback) (gpointer instance, gpointer arg1, gpointer user_data)</literal>.
+ */
+
+
+/**
+ * g_cclosure_marshal_VOID__STRING:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #gchar* parameter
+ * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * <literal>void (*callback) (gpointer instance, const gchar *arg1, gpointer user_data)</literal>.
+ */
+
+
+/**
+ * g_cclosure_marshal_VOID__UCHAR:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #guchar parameter
+ * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * <literal>void (*callback) (gpointer instance, guchar arg1, gpointer user_data)</literal>.
+ */
+
+
+/**
+ * g_cclosure_marshal_VOID__UINT:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #guint parameter
+ * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * <literal>void (*callback) (gpointer instance, guint arg1, gpointer user_data)</literal>.
+ */
+
+
+/**
+ * g_cclosure_marshal_VOID__UINT_POINTER:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 3
+ * @param_values: a #GValue array holding instance, arg1 and arg2
+ * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * <literal>void (*callback) (gpointer instance, guint arg1, gpointer arg2, gpointer user_data)</literal>.
+ */
+
+
+/**
+ * g_cclosure_marshal_VOID__ULONG:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #gulong parameter
+ * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * <literal>void (*callback) (gpointer instance, gulong arg1, gpointer user_data)</literal>.
+ */
+
+
+/**
+ * g_cclosure_marshal_VOID__VARIANT:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #GVariant* parameter
+ * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * <literal>void (*callback) (gpointer instance, GVariant *arg1, gpointer user_data)</literal>.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_cclosure_marshal_VOID__VOID:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 1
+ * @param_values: a #GValue array holding only the instance
+ * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * <literal>void (*callback) (gpointer instance, gpointer user_data)</literal>.
+ */
+
+
+/**
+ * g_cclosure_marshal_generic:
+ * @closure: A #GClosure.
+ * @return_gvalue: A #GValue to store the return value. May be %NULL if the callback of closure doesn't return a value.
+ * @n_param_values: The length of the @param_values array.
+ * @param_values: An array of #GValue<!-- -->s holding the arguments on which to invoke the callback of closure.
+ * @invocation_hint: The invocation hint given as the last argument to g_closure_invoke().
+ * @marshal_data: Additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
+ *
+ * A generic marshaller function implemented via <ulink
+ * url="http://sourceware.org/libffi/">libffi</ulink>.
+ *
+ * Since: 2.30
+ */
+
+
+/**
+ * g_cclosure_new: (skip)
+ * @callback_func: the function to invoke
+ * @user_data: user data to pass to @callback_func
+ * @destroy_data: destroy notify to be called when @user_data is no longer used
+ *
+ * Creates a new closure which invokes @callback_func with @user_data as
+ * the last parameter.
+ *
+ * Returns: a new #GCClosure
+ */
+
+
+/**
+ * g_cclosure_new_object: (skip)
+ * @callback_func: the function to invoke
+ * @object: a #GObject pointer to pass to @callback_func
+ *
+ * A variant of g_cclosure_new() which uses @object as @user_data and
+ * calls g_object_watch_closure() on @object and the created
+ * closure. This function is useful when you have a callback closely
+ * associated with a #GObject, and want the callback to no longer run
+ * after the object is is freed.
+ *
+ * Returns: a new #GCClosure
+ */
+
+
+/**
+ * g_cclosure_new_object_swap: (skip)
+ * @callback_func: the function to invoke
+ * @object: a #GObject pointer to pass to @callback_func
+ *
+ * A variant of g_cclosure_new_swap() which uses @object as @user_data
+ * and calls g_object_watch_closure() on @object and the created
+ * closure. This function is useful when you have a callback closely
+ * associated with a #GObject, and want the callback to no longer run
+ * after the object is is freed.
+ *
+ * Returns: a new #GCClosure
+ */
+
+
+/**
+ * g_cclosure_new_swap: (skip)
+ * @callback_func: the function to invoke
+ * @user_data: user data to pass to @callback_func
+ * @destroy_data: destroy notify to be called when @user_data is no longer used
+ *
+ * Creates a new closure which invokes @callback_func with @user_data as
+ * the first parameter.
+ *
+ * Returns: (transfer full): a new #GCClosure
+ */
+
+
+/**
+ * g_clear_object: (skip)
+ * @object_ptr: a pointer to a #GObject reference
+ *
+ * Clears a reference to a #GObject.
+ *
+ * @object_ptr must not be %NULL.
+ *
+ * If the reference is %NULL then this function does nothing.
+ * Otherwise, the reference count of the object is decreased and the
+ * pointer is set to %NULL.
+ *
+ * This function is threadsafe and modifies the pointer atomically,
+ * using memory barriers where needed.
+ *
+ * A macro is also included that allows this function to be used without
+ * pointer casts.
+ *
+ * Since: 2.28
+ */
+
+
+/**
+ * g_closure_add_finalize_notifier: (skip)
+ * @closure: a #GClosure
+ * @notify_data: data to pass to @notify_func
+ * @notify_func: the callback function to register
+ *
+ * Registers a finalization notifier which will be called when the
+ * reference count of @closure goes down to 0. Multiple finalization
+ * notifiers on a single closure are invoked in unspecified order. If
+ * a single call to g_closure_unref() results in the closure being
+ * both invalidated and finalized, then the invalidate notifiers will
+ * be run before the finalize notifiers.
+ */
+
+
+/**
+ * g_closure_add_invalidate_notifier: (skip)
+ * @closure: a #GClosure
+ * @notify_data: data to pass to @notify_func
+ * @notify_func: the callback function to register
+ *
+ * Registers an invalidation notifier which will be called when the
+ * @closure is invalidated with g_closure_invalidate(). Invalidation
+ * notifiers are invoked before finalization notifiers, in an
+ * unspecified order.
+ */
+
+
+/**
+ * g_closure_add_marshal_guards: (skip)
+ * @closure: a #GClosure
+ * @pre_marshal_data: data to pass to @pre_marshal_notify
+ * @pre_marshal_notify: a function to call before the closure callback
+ * @post_marshal_data: data to pass to @post_marshal_notify
+ * @post_marshal_notify: a function to call after the closure callback
+ *
+ * Adds a pair of notifiers which get invoked before and after the
+ * closure callback, respectively. This is typically used to protect
+ * the extra arguments for the duration of the callback. See
+ * g_object_watch_closure() for an example of marshal guards.
+ */
+
+
+/**
+ * g_closure_invalidate:
+ * @closure: GClosure to invalidate
+ *
+ * Sets a flag on the closure to indicate that its calling
+ * environment has become invalid, and thus causes any future
+ * invocations of g_closure_invoke() on this @closure to be
+ * ignored. Also, invalidation notifiers installed on the closure will
+ * be called at this point. Note that unless you are holding a
+ * reference to the closure yourself, the invalidation notifiers may
+ * unref the closure and cause it to be destroyed, so if you need to
+ * access the closure after calling g_closure_invalidate(), make sure
+ * that you've previously called g_closure_ref().
+ *
+ * Note that g_closure_invalidate() will also be called when the
+ * reference count of a closure drops to zero (unless it has already
+ * been invalidated before).
+ */
+
+
+/**
+ * g_closure_invoke:
+ * @closure: a #GClosure
+ * @return_value: (allow-none): a #GValue to store the return value. May be %NULL if the callback of @closure doesn't return a value.
+ * @n_param_values: the length of the @param_values array
+ * @param_values: (array length=n_param_values): an array of #GValue<!-- -->s holding the arguments on which to invoke the callback of @closure
+ * @invocation_hint: (allow-none): a context-dependent invocation hint
+ *
+ * Invokes the closure, i.e. executes the callback represented by the @closure.
+ */
+
+
+/**
+ * g_closure_new_object:
+ * @sizeof_closure: the size of the structure to allocate, must be at least <literal>sizeof (GClosure)</literal>
+ * @object: a #GObject pointer to store in the @data field of the newly allocated #GClosure
+ *
+ * A variant of g_closure_new_simple() which stores @object in the
+ * @data field of the closure and calls g_object_watch_closure() on
+ * @object and the created closure. This function is mainly useful
+ * when implementing new types of closures.
+ *
+ * Returns: (transfer full): a newly allocated #GClosure
+ */
+
+
+/**
+ * g_closure_new_simple:
+ * @sizeof_closure: the size of the structure to allocate, must be at least <literal>sizeof (GClosure)</literal>
+ * @data: data to store in the @data field of the newly allocated #GClosure
+ *
+ * Allocates a struct of the given size and initializes the initial
+ * part as a #GClosure. This function is mainly useful when
+ * implementing new types of closures.
+ *
+ * |[
+ * typedef struct _MyClosure MyClosure;
+ * struct _MyClosure
+ * {
+ * GClosure closure;
+ * // extra data goes here
+ * };
+ *
+ * static void
+ * my_closure_finalize (gpointer  notify_data,
+ * GClosure *closure)
+ * {
+ * MyClosure *my_closure = (MyClosure *)closure;
+ *
+ * // free extra data here
+ * }
+ *
+ * MyClosure *my_closure_new (gpointer data)
+ * {
+ * GClosure *closure;
+ * MyClosure *my_closure;
+ *
+ * closure = g_closure_new_simple (sizeof (MyClosure), data);
+ * my_closure = (MyClosure *) closure;
+ *
+ * // initialize extra data here
+ *
+ * g_closure_add_finalize_notifier (closure, notify_data,
+ * my_closure_finalize);
+ * return my_closure;
+ * }
+ * ]|
+ *
+ * Returns: (transfer full): a newly allocated #GClosure
+ */
+
+
+/**
+ * g_closure_ref:
+ * @closure: #GClosure to increment the reference count on
+ *
+ * Increments the reference count on a closure to force it staying
+ * alive while the caller holds a pointer to it.
+ *
+ * Returns: (transfer none): The @closure passed in, for convenience
+ */
+
+
+/**
+ * g_closure_remove_finalize_notifier: (skip)
+ * @closure: a #GClosure
+ * @notify_data: data which was passed to g_closure_add_finalize_notifier() when registering @notify_func
+ * @notify_func: the callback function to remove
+ *
+ * Removes a finalization notifier.
+ *
+ * Notice that notifiers are automatically removed after they are run.
+ */
+
+
+/**
+ * g_closure_remove_invalidate_notifier: (skip)
+ * @closure: a #GClosure
+ * @notify_data: data which was passed to g_closure_add_invalidate_notifier() when registering @notify_func
+ * @notify_func: the callback function to remove
+ *
+ * Removes an invalidation notifier.
+ *
+ * Notice that notifiers are automatically removed after they are run.
+ */
+
+
+/**
+ * g_closure_set_marshal: (skip)
+ * @closure: a #GClosure
+ * @marshal: a #GClosureMarshal function
+ *
+ * Sets the marshaller of @closure. The <literal>marshal_data</literal>
+ * of @marshal provides a way for a meta marshaller to provide additional
+ * information to the marshaller. (See g_closure_set_meta_marshal().) For
+ * GObject's C predefined marshallers (the g_cclosure_marshal_*()
+ * functions), what it provides is a callback function to use instead of
+ * @closure->callback.
+ */
+
+
+/**
+ * g_closure_set_meta_marshal: (skip)
+ * @closure: a #GClosure
+ * @marshal_data: context-dependent data to pass to @meta_marshal
+ * @meta_marshal: a #GClosureMarshal function
+ *
+ * Sets the meta marshaller of @closure.  A meta marshaller wraps
+ * @closure->marshal and modifies the way it is called in some
+ * fashion. The most common use of this facility is for C callbacks.
+ * The same marshallers (generated by <link
+ * linkend="glib-genmarshal">glib-genmarshal</link>) are used
+ * everywhere, but the way that we get the callback function
+ * differs. In most cases we want to use @closure->callback, but in
+ * other cases we want to use some different technique to retrieve the
+ * callback function.
+ *
+ * For example, class closures for signals (see
+ * g_signal_type_cclosure_new()) retrieve the callback function from a
+ * fixed offset in the class structure.  The meta marshaller retrieves
+ * the right callback and passes it to the marshaller as the
+ * @marshal_data argument.
+ */
+
+
+/**
+ * g_closure_sink:
+ * @closure: #GClosure to decrement the initial reference count on, if it's still being held
+ *
+ * Takes over the initial ownership of a closure.  Each closure is
+ * initially created in a <firstterm>floating</firstterm> state, which
+ * means that the initial reference count is not owned by any caller.
+ * g_closure_sink() checks to see if the object is still floating, and
+ * if so, unsets the floating state and decreases the reference
+ * count. If the closure is not floating, g_closure_sink() does
+ * nothing. The reason for the existence of the floating state is to
+ * prevent cumbersome code sequences like:
+ * |[
+ * closure = g_cclosure_new (cb_func, cb_data);
+ * g_source_set_closure (source, closure);
+ * g_closure_unref (closure); // XXX GObject doesn't really need this
+ * ]|
+ * Because g_source_set_closure() (and similar functions) take ownership of the
+ * initial reference count, if it is unowned, we instead can write:
+ * |[
+ * g_source_set_closure (source, g_cclosure_new (cb_func, cb_data));
+ * ]|
+ *
+ * Generally, this function is used together with g_closure_ref(). Ane example
+ * of storing a closure for later notification looks like:
+ * |[
+ * static GClosure *notify_closure = NULL;
+ * void
+ * foo_notify_set_closure (GClosure *closure)
+ * {
+ * if (notify_closure)
+ * g_closure_unref (notify_closure);
+ * notify_closure = closure;
+ * if (notify_closure)
+ * {
+ * g_closure_ref (notify_closure);
+ * g_closure_sink (notify_closure);
+ * }
+ * }
+ * ]|
+ *
+ * Because g_closure_sink() may decrement the reference count of a closure
+ * (if it hasn't been called on @closure yet) just like g_closure_unref(),
+ * g_closure_ref() should be called prior to this function.
+ */
+
+
+/**
+ * g_closure_unref:
+ * @closure: #GClosure to decrement the reference count on
+ *
+ * Decrements the reference count of a closure after it was previously
+ * incremented by the same caller. If no other callers are using the
+ * closure, then the closure will be destroyed and freed.
+ */
+
+
+/**
+ * g_enum_complete_type_info:
+ * @g_enum_type: the type identifier of the type being completed
+ * @info: the #GTypeInfo struct to be filled in
+ * @const_values: An array of #GEnumValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0.
+ *
+ * This function is meant to be called from the <literal>complete_type_info</literal>
+ * function of a #GTypePlugin implementation, as in the following
+ * example:
+ *
+ * |[
+ * static void
+ * my_enum_complete_type_info (GTypePlugin     *plugin,
+ * GType            g_type,
+ * GTypeInfo       *info,
+ * GTypeValueTable *value_table)
+ * {
+ * static const GEnumValue values[] = {
+ * { MY_ENUM_FOO, "MY_ENUM_FOO", "foo" },
+ * { MY_ENUM_BAR, "MY_ENUM_BAR", "bar" },
+ * { 0, NULL, NULL }
+ * };
+ *
+ * g_enum_complete_type_info (type, info, values);
+ * }
+ * ]|
+ */
+
+
+/**
+ * g_enum_get_value:
+ * @enum_class: a #GEnumClass
+ * @value: the value to look up
+ *
+ * Returns the #GEnumValue for a value.
+ *
+ * member of the enumeration
+ *
+ * Returns: the #GEnumValue for @value, or %NULL if @value is not a
+ */
+
+
+/**
+ * g_enum_get_value_by_name:
+ * @enum_class: a #GEnumClass
+ * @name: the name to look up
+ *
+ * Looks up a #GEnumValue by name.
+ *
+ * enumeration doesn't have a member with that name
+ *
+ * Returns: the #GEnumValue with name @name, or %NULL if the
+ */
+
+
+/**
+ * g_enum_get_value_by_nick:
+ * @enum_class: a #GEnumClass
+ * @nick: the nickname to look up
+ *
+ * Looks up a #GEnumValue by nickname.
+ *
+ * enumeration doesn't have a member with that nickname
+ *
+ * Returns: the #GEnumValue with nickname @nick, or %NULL if the
+ */
+
+
+/**
+ * g_enum_register_static:
+ * @name: A nul-terminated string used as the name of the new type.
+ * @const_static_values: An array of #GEnumValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0. GObject keeps a reference to the data, so it cannot be stack-allocated.
+ *
+ * Registers a new static enumeration type with the name @name.
+ *
+ * It is normally more convenient to let <link
+ * linkend="glib-mkenums">glib-mkenums</link> generate a
+ * my_enum_get_type() function from a usual C enumeration definition
+ * than to write one yourself using g_enum_register_static().
+ *
+ * Returns: The new type identifier.
+ */
+
+
+/**
+ * g_flags_complete_type_info:
+ * @g_flags_type: the type identifier of the type being completed
+ * @info: the #GTypeInfo struct to be filled in
+ * @const_values: An array of #GFlagsValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0.
+ *
+ * This function is meant to be called from the complete_type_info()
+ * function of a #GTypePlugin implementation, see the example for
+ * g_enum_complete_type_info() above.
+ */
+
+
+/**
+ * g_flags_get_first_value:
+ * @flags_class: a #GFlagsClass
+ * @value: the value
+ *
+ * Returns the first #GFlagsValue which is set in @value.
+ *
+ * none is set
+ *
+ * Returns: the first #GFlagsValue which is set in @value, or %NULL if
+ */
+
+
+/**
+ * g_flags_get_value_by_name:
+ * @flags_class: a #GFlagsClass
+ * @name: the name to look up
+ *
+ * Looks up a #GFlagsValue by name.
+ *
+ * flag with that name
+ *
+ * Returns: the #GFlagsValue with name @name, or %NULL if there is no
+ */
+
+
+/**
+ * g_flags_get_value_by_nick:
+ * @flags_class: a #GFlagsClass
+ * @nick: the nickname to look up
+ *
+ * Looks up a #GFlagsValue by nickname.
+ *
+ * no flag with that nickname
+ *
+ * Returns: the #GFlagsValue with nickname @nick, or %NULL if there is
+ */
+
+
+/**
+ * g_flags_register_static:
+ * @name: A nul-terminated string used as the name of the new type.
+ * @const_static_values: An array of #GFlagsValue structs for the possible flags values. The array is terminated by a struct with all members being 0. GObject keeps a reference to the data, so it cannot be stack-allocated.
+ *
+ * Registers a new static flags type with the name @name.
+ *
+ * It is normally more convenient to let <link
+ * linkend="glib-mkenums">glib-mkenums</link> generate a
+ * my_flags_get_type() function from a usual C enumeration definition
+ * than to write one yourself using g_flags_register_static().
+ *
+ * Returns: The new type identifier.
+ */
+
+
+/**
+ * g_main_destroy:
+ * @loop: a #GMainLoop
+ *
+ * Frees the memory allocated for the #GMainLoop.
+ *
+ * Deprecated: 2.2: Use g_main_loop_unref() instead
+ */
+
+
+/**
+ * g_main_is_running:
+ * @loop: a #GMainLoop
+ *
+ * Checks if the main loop is running.
+ *
+ * Returns: %TRUE if the main loop is running
+ * Deprecated: 2.2: Use g_main_loop_is_running() instead
+ */
+
+
+/**
+ * g_main_iteration:
+ * @may_block: set to %TRUE if it should block (i.e. wait) until an event source becomes ready. It will return after an event source has been processed. If set to %FALSE it will return immediately if no event source is ready to be processed.
+ *
+ * Runs a single iteration for the default #GMainContext.
+ *
+ * Returns: %TRUE if more events are pending.
+ * Deprecated: 2.2: Use g_main_context_iteration() instead.
+ */
+
+
+/**
+ * g_main_new:
+ * @is_running: set to %TRUE to indicate that the loop is running. This is not very important since calling g_main_run() will set this to %TRUE anyway.
+ *
+ * Creates a new #GMainLoop for th default main context.
+ *
+ * Returns: a new #GMainLoop
+ * Deprecated: 2.2: Use g_main_loop_new() instead
+ */
+
+
+/**
+ * g_main_pending:
+ *
+ * Checks if any events are pending for the default #GMainContext
+ * (i.e. ready to be processed).
+ *
+ *
+ * Deprected: 2.2: Use g_main_context_pending() instead.
+ *
+ * Returns: %TRUE if any events are pending.
+ */
+
+
+/**
+ * g_main_quit:
+ * @loop: a #GMainLoop
+ *
+ * Stops the #GMainLoop.
+ * If g_main_run() was called to run the #GMainLoop, it will now return.
+ *
+ * Deprecated: 2.2: Use g_main_loop_quit() instead
+ */
+
+
+/**
+ * g_main_run:
+ * @loop: a #GMainLoop
+ *
+ * Runs a main loop until it stops running.
+ *
+ * Deprecated: 2.2: Use g_main_loop_run() instead
+ */
+
+
+/**
+ * g_main_set_poll_func:
+ * @func: the function to call to poll all file descriptors
+ *
+ * Sets the function to use for the handle polling of file descriptors
+ * for the default main context.
+ *
+ * Deprecated: 2.2: Use g_main_context_set_poll_func() again
+ */
+
+
+/**
+ * g_new:
+ * @struct_type: the type of the elements to allocate
+ * @n_structs: the number of elements to allocate
+ *
+ * Allocates @n_structs elements of type @struct_type.
+ * The returned pointer is cast to a pointer to the given type.
+ * If @n_structs is 0 it returns %NULL.
+ * Care is taken to avoid overflow when calculating the size of the allocated block.
+ *
+ * Since the returned pointer is already casted to the right type,
+ * it is normally unnecessary to cast it explicitly, and doing
+ * so might hide memory allocation errors.
+ *
+ * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
+ */
+
+
+/**
+ * g_new0:
+ * @struct_type: the type of the elements to allocate.
+ * @n_structs: the number of elements to allocate.
+ *
+ * Allocates @n_structs elements of type @struct_type, initialized to 0's.
+ * The returned pointer is cast to a pointer to the given type.
+ * If @n_structs is 0 it returns %NULL.
+ * Care is taken to avoid overflow when calculating the size of the allocated block.
+ *
+ * Since the returned pointer is already casted to the right type,
+ * it is normally unnecessary to cast it explicitly, and doing
+ * so might hide memory allocation errors.
+ *
+ * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type.
+ */
+
+
+/**
+ * g_newa:
+ * @struct_type: Type of memory chunks to be allocated
+ * @n_structs: Number of chunks to be allocated
+ *
+ * Wraps g_alloca() in a more typesafe manner.
+ *
+ * Returns: Pointer to stack space for @n_structs chunks of type @struct_type
+ */
+
+
+/**
+ * g_node_append:
+ * @parent: the #GNode to place the new #GNode under
+ * @node: the #GNode to insert
+ *
+ * Inserts a #GNode as the last child of the given parent.
+ *
+ * Returns: the inserted #GNode
+ */
+
+
+/**
+ * g_node_append_data:
+ * @parent: the #GNode to place the new #GNode under
+ * @data: the data for the new #GNode
+ *
+ * Inserts a new #GNode as the last child of the given parent.
+ *
+ * Returns: the new #GNode
+ */
+
+
+/**
+ * g_node_first_child:
+ * @node: a #GNode
+ *
+ * Gets the first child of a #GNode.
+ *
+ * or has no children
+ *
+ * Returns: the first child of @node, or %NULL if @node is %NULL
+ */
+
+
+/**
+ * g_node_insert_data:
+ * @parent: the #GNode to place the new #GNode under
+ * @position: the position to place the new #GNode at. If position is -1, the new #GNode is inserted as the last child of @parent
+ * @data: the data for the new #GNode
+ *
+ * Inserts a new #GNode at the given position.
+ *
+ * Returns: the new #GNode
+ */
+
+
+/**
+ * g_node_insert_data_after:
+ * @parent: the #GNode to place the new #GNode under
+ * @sibling: the sibling #GNode to place the new #GNode after
+ * @data: the data for the new #GNode
+ *
+ * Inserts a new #GNode after the given sibling.
+ *
+ * Returns: the new #GNode
+ */
+
+
+/**
+ * g_node_insert_data_before:
+ * @parent: the #GNode to place the new #GNode under
+ * @sibling: the sibling #GNode to place the new #GNode before
+ * @data: the data for the new #GNode
+ *
+ * Inserts a new #GNode before the given sibling.
+ *
+ * Returns: the new #GNode
+ */
+
+
+/**
+ * g_node_next_sibling:
+ * @node: a #GNode
+ *
+ * Gets the next sibling of a #GNode.
+ *
+ * or %NULL
+ *
+ * Returns: the next sibling of @node, or %NULL if @node is the last node
+ */
+
+
+/**
+ * g_node_prepend_data:
+ * @parent: the #GNode to place the new #GNode under
+ * @data: the data for the new #GNode
+ *
+ * Inserts a new #GNode as the first child of the given parent.
+ *
+ * Returns: the new #GNode
+ */
+
+
+/**
+ * g_node_prev_sibling:
+ * @node: a #GNode
+ *
+ * Gets the previous sibling of a #GNode.
+ *
+ * node or %NULL
+ *
+ * Returns: the previous sibling of @node, or %NULL if @node is the first
+ */
+
+
+/**
+ * g_object_add_toggle_ref: (skip)
+ * @object: a #GObject
+ * @notify: a function to call when this reference is the last reference to the object, or is no longer the last reference.
+ * @data: data to pass to @notify
+ *
+ * Increases the reference count of the object by one and sets a
+ * callback to be called when all other references to the object are
+ * dropped, or when this is already the last reference to the object
+ * and another reference is established.
+ *
+ * This functionality is intended for binding @object to a proxy
+ * object managed by another memory manager. This is done with two
+ * paired references: the strong reference added by
+ * g_object_add_toggle_ref() and a reverse reference to the proxy
+ * object which is either a strong reference or weak reference.
+ *
+ * The setup is that when there are no other references to @object,
+ * only a weak reference is held in the reverse direction from @object
+ * to the proxy object, but when there are other references held to
+ * @object, a strong reference is held. The @notify callback is called
+ * when the reference from @object to the proxy object should be
+ * <firstterm>toggled</firstterm> from strong to weak (@is_last_ref
+ * true) or weak to strong (@is_last_ref false).
+ *
+ * Since a (normal) reference must be held to the object before
+ * calling g_object_add_toggle_ref(), the initial state of the reverse
+ * link is always strong.
+ *
+ * Multiple toggle references may be added to the same gobject,
+ * however if there are multiple toggle references to an object, none
+ * of them will ever be notified until all but one are removed.  For
+ * this reason, you should only ever use a toggle reference if there
+ * is important state in the proxy object.
+ *
+ * Since: 2.8
+ */
+
+
+/**
+ * g_object_add_weak_pointer: (skip)
+ * @object: The object that should be weak referenced.
+ * @weak_pointer_location: (inout): The memory address of a pointer.
+ *
+ * Adds a weak reference from weak_pointer to @object to indicate that
+ * the pointer located at @weak_pointer_location is only valid during
+ * the lifetime of @object. When the @object is finalized,
+ * @weak_pointer will be set to %NULL.
+ *
+ * Note that as with g_object_weak_ref(), the weak references created by
+ * this method are not thread-safe: they cannot safely be used in one
+ * thread if the object's last g_object_unref() might happen in another
+ * thread. Use #GWeakRef if thread-safety is required.
+ */
+
+
+/**
+ * g_object_bind_property:
+ * @source: (type GObject.Object): the source #GObject
+ * @source_property: the property on @source to bind
+ * @target: (type GObject.Object): the target #GObject
+ * @target_property: the property on @target to bind
+ * @flags: flags to pass to #GBinding
+ *
+ * Creates a binding between @source_property on @source and @target_property
+ * on @target. Whenever the @source_property is changed the @target_property is
+ * updated using the same value. For instance:
+ *
+ * |[
+ * g_object_bind_property (action, "active", widget, "sensitive", 0);
+ * ]|
+ *
+ * Will result in the "sensitive" property of the widget #GObject instance to be
+ * updated with the same value of the "active" property of the action #GObject
+ * instance.
+ *
+ * If @flags contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
+ * if @target_property on @target changes then the @source_property on @source
+ * will be updated as well.
+ *
+ * The binding will automatically be removed when either the @source or the
+ * @target instances are finalized. To remove the binding without affecting the
+ * @source and the @target you can just call g_object_unref() on the returned
+ * #GBinding instance.
+ *
+ * A #GObject can have multiple bindings.
+ *
+ * binding between the two #GObject instances. The binding is released
+ * whenever the #GBinding reference count reaches zero.
+ *
+ * Returns: (transfer none): the #GBinding instance representing the
+ * Since: 2.26
+ */
+
+
+/**
+ * g_object_bind_property_full:
+ * @source: (type GObject.Object): the source #GObject
+ * @source_property: the property on @source to bind
+ * @target: (type GObject.Object): the target #GObject
+ * @target_property: the property on @target to bind
+ * @flags: flags to pass to #GBinding
+ * @transform_to: (scope notified) (allow-none): the transformation function from the @source to the @target, or %NULL to use the default
+ * @transform_from: (scope notified) (allow-none): the transformation function from the @target to the @source, or %NULL to use the default
+ * @user_data: custom data to be passed to the transformation functions, or %NULL
+ * @notify: function to be called when disposing the binding, to free the resources used by the transformation functions
+ *
+ * Complete version of g_object_bind_property().
+ *
+ * Creates a binding between @source_property on @source and @target_property
+ * on @target, allowing you to set the transformation functions to be used by
+ * the binding.
+ *
+ * If @flags contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
+ * if @target_property on @target changes then the @source_property on @source
+ * will be updated as well. The @transform_from function is only used in case
+ * of bidirectional bindings, otherwise it will be ignored
+ *
+ * The binding will automatically be removed when either the @source or the
+ * @target instances are finalized. To remove the binding without affecting the
+ * @source and the @target you can just call g_object_unref() on the returned
+ * #GBinding instance.
+ *
+ * A #GObject can have multiple bindings.
+ *
+ * <note>The same @user_data parameter will be used for both @transform_to
+ * and @transform_from transformation functions; the @notify function will
+ * be called once, when the binding is removed. If you need different data
+ * for each transformation function, please use
+ * g_object_bind_property_with_closures() instead.</note>
+ *
+ * binding between the two #GObject instances. The binding is released
+ * whenever the #GBinding reference count reaches zero.
+ *
+ * Returns: (transfer none): the #GBinding instance representing the
+ * Since: 2.26
+ */
+
+
+/**
+ * g_object_bind_property_with_closures:
+ * @source: (type GObject.Object): the source #GObject
+ * @source_property: the property on @source to bind
+ * @target: (type GObject.Object): the target #GObject
+ * @target_property: the property on @target to bind
+ * @flags: flags to pass to #GBinding
+ * @transform_to: a #GClosure wrapping the transformation function from the @source to the @target, or %NULL to use the default
+ * @transform_from: a #GClosure wrapping the transformation function from the @target to the @source, or %NULL to use the default
+ *
+ * Creates a binding between @source_property on @source and @target_property
+ * on @target, allowing you to set the transformation functions to be used by
+ * the binding.
+ *
+ * This function is the language bindings friendly version of
+ * g_object_bind_property_full(), using #GClosure<!-- -->s instead of
+ * function pointers.
+ *
+ *
+ * binding between the two #GObject instances. The binding is released
+ * whenever the #GBinding reference count reaches zero.
+ *
+ * Rename to: g_object_bind_property_full
+ * Returns: (transfer none): the #GBinding instance representing the
+ * Since: 2.26
+ */
+
+
+/**
+ * g_object_class_find_property:
+ * @oclass: a #GObjectClass
+ * @property_name: the name of the property to look up
+ *
+ * Looks up the #GParamSpec for a property of a class.
+ *
+ * %NULL if the class doesn't have a property of that name
+ *
+ * Returns: (transfer none): the #GParamSpec for the property, or
+ */
+
+
+/**
+ * g_object_class_install_properties:
+ * @oclass: a #GObjectClass
+ * @n_pspecs: the length of the #GParamSpec<!-- -->s array
+ * @pspecs: (array length=n_pspecs): the #GParamSpec<!-- -->s array defining the new properties
+ *
+ * Installs new properties from an array of #GParamSpec<!-- -->s. This is
+ * usually done in the class initializer.
+ *
+ * The property id of each property is the index of each #GParamSpec in
+ * the @pspecs array.
+ *
+ * The property id of 0 is treated specially by #GObject and it should not
+ * be used to store a #GParamSpec.
+ *
+ * This function should be used if you plan to use a static array of
+ * #GParamSpec<!-- -->s and g_object_notify_by_pspec(). For instance, this
+ * class initialization:
+ *
+ * |[
+ * enum {
+ * PROP_0, PROP_FOO, PROP_BAR, N_PROPERTIES
+ * };
+ *
+ * static GParamSpec *obj_properties[N_PROPERTIES] = { NULL, };
+ *
+ * static void
+ * my_object_class_init (MyObjectClass *klass)
+ * {
+ * GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ *
+ * obj_properties[PROP_FOO] =
+ * g_param_spec_int ("foo", "Foo", "Foo",
+ * -1, G_MAXINT,
+ * 0,
+ * G_PARAM_READWRITE);
+ *
+ * obj_properties[PROP_BAR] =
+ * g_param_spec_string ("bar", "Bar", "Bar",
+ * NULL,
+ * G_PARAM_READWRITE);
+ *
+ * gobject_class->set_property = my_object_set_property;
+ * gobject_class->get_property = my_object_get_property;
+ * g_object_class_install_properties (gobject_class,
+ * N_PROPERTIES,
+ * obj_properties);
+ * }
+ * ]|
+ *
+ * allows calling g_object_notify_by_pspec() to notify of property changes:
+ *
+ * |[
+ * void
+ * my_object_set_foo (MyObject *self, gint foo)
+ * {
+ * if (self->foo != foo)
+ * {
+ * self->foo = foo;
+ * g_object_notify_by_pspec (G_OBJECT (self), obj_properties[PROP_FOO]);
+ * }
+ * }
+ * ]|
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_object_class_install_property:
+ * @oclass: a #GObjectClass
+ * @property_id: the id for the new property
+ * @pspec: the #GParamSpec for the new property
+ *
+ * Installs a new property. This is usually done in the class initializer.
+ *
+ * Note that it is possible to redefine a property in a derived class,
+ * by installing a property with the same name. This can be useful at times,
+ * e.g. to change the range of allowed values or the default value.
+ */
+
+
+/**
+ * g_object_class_list_properties:
+ * @oclass: a #GObjectClass
+ * @n_properties: (out): return location for the length of the returned array
+ *
+ * Get an array of #GParamSpec* for all properties of a class.
+ *
+ * #GParamSpec* which should be freed after use
+ *
+ * Returns: (array length=n_properties) (transfer container): an array of
+ */
+
+
+/**
+ * g_object_class_override_property:
+ * @oclass: a #GObjectClass
+ * @property_id: the new property ID
+ * @name: the name of a property registered in a parent class or in an interface of this class.
+ *
+ * Registers @property_id as referring to a property with the
+ * name @name in a parent class or in an interface implemented
+ * by @oclass. This allows this class to <firstterm>override</firstterm>
+ * a property implementation in a parent class or to provide
+ * the implementation of a property from an interface.
+ *
+ * <note>
+ * Internally, overriding is implemented by creating a property of type
+ * #GParamSpecOverride; generally operations that query the properties of
+ * the object class, such as g_object_class_find_property() or
+ * g_object_class_list_properties() will return the overridden
+ * property. However, in one case, the @construct_properties argument of
+ * the @constructor virtual function, the #GParamSpecOverride is passed
+ * instead, so that the @param_id field of the #GParamSpec will be
+ * correct.  For virtually all uses, this makes no difference. If you
+ * need to get the overridden property, you can call
+ * g_param_spec_get_redirect_target().
+ * </note>
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_object_connect: (skip)
+ * @object: a #GObject
+ * @signal_spec: the spec for the first signal
+ * @...: #GCallback for the first signal, followed by data for the first signal, followed optionally by more signal spec/callback/data triples, followed by %NULL
+ *
+ * A convenience function to connect multiple signals at once.
+ *
+ * The signal specs expected by this function have the form
+ * "modifier::signal_name", where modifier can be one of the following:
+ * <variablelist>
+ * <varlistentry>
+ * <term>signal</term>
+ * <listitem><para>
+ * equivalent to <literal>g_signal_connect_data (..., NULL, 0)</literal>
+ * </para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term>object_signal</term>
+ * <term>object-signal</term>
+ * <listitem><para>
+ * equivalent to <literal>g_signal_connect_object (..., 0)</literal>
+ * </para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term>swapped_signal</term>
+ * <term>swapped-signal</term>
+ * <listitem><para>
+ * equivalent to <literal>g_signal_connect_data (..., NULL, G_CONNECT_SWAPPED)</literal>
+ * </para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term>swapped_object_signal</term>
+ * <term>swapped-object-signal</term>
+ * <listitem><para>
+ * equivalent to <literal>g_signal_connect_object (..., G_CONNECT_SWAPPED)</literal>
+ * </para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term>signal_after</term>
+ * <term>signal-after</term>
+ * <listitem><para>
+ * equivalent to <literal>g_signal_connect_data (..., NULL, G_CONNECT_AFTER)</literal>
+ * </para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term>object_signal_after</term>
+ * <term>object-signal-after</term>
+ * <listitem><para>
+ * equivalent to <literal>g_signal_connect_object (..., G_CONNECT_AFTER)</literal>
+ * </para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term>swapped_signal_after</term>
+ * <term>swapped-signal-after</term>
+ * <listitem><para>
+ * equivalent to <literal>g_signal_connect_data (..., NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER)</literal>
+ * </para></listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term>swapped_object_signal_after</term>
+ * <term>swapped-object-signal-after</term>
+ * <listitem><para>
+ * equivalent to <literal>g_signal_connect_object (..., G_CONNECT_SWAPPED | G_CONNECT_AFTER)</literal>
+ * </para></listitem>
+ * </varlistentry>
+ * </variablelist>
+ *
+ * |[
+ * menu->toplevel = g_object_connect (g_object_new (GTK_TYPE_WINDOW,
+ * "type", GTK_WINDOW_POPUP,
+ * "child", menu,
+ * NULL),
+ * "signal::event", gtk_menu_window_event, menu,
+ * "signal::size_request", gtk_menu_window_size_request, menu,
+ * "signal::destroy", gtk_widget_destroyed, &amp;menu-&gt;toplevel,
+ * NULL);
+ * ]|
+ *
+ * Returns: (transfer none): @object
+ */
+
+
+/**
+ * g_object_disconnect: (skip)
+ * @object: a #GObject
+ * @signal_spec: the spec for the first signal
+ * @...: #GCallback for the first signal, followed by data for the first signal, followed optionally by more signal spec/callback/data triples, followed by %NULL
+ *
+ * A convenience function to disconnect multiple signals at once.
+ *
+ * The signal specs expected by this function have the form
+ * "any_signal", which means to disconnect any signal with matching
+ * callback and data, or "any_signal::signal_name", which only
+ * disconnects the signal named "signal_name".
+ */
+
+
+/**
+ * g_object_force_floating:
+ * @object: a #GObject
+ *
+ * This function is intended for #GObject implementations to re-enforce a
+ * <link linkend="floating-ref">floating</link> object reference.
+ * Doing this is seldom required: all
+ * #GInitiallyUnowned<!-- -->s are created with a floating reference which
+ * usually just needs to be sunken by calling g_object_ref_sink().
+ *
+ * Since: 2.10
+ */
+
+
+/**
+ * g_object_freeze_notify:
+ * @object: a #GObject
+ *
+ * Increases the freeze count on @object. If the freeze count is
+ * non-zero, the emission of "notify" signals on @object is
+ * stopped. The signals are queued until the freeze count is decreased
+ * to zero.
+ *
+ * This is necessary for accessors that modify multiple properties to prevent
+ * premature notification while the object is still being modified.
+ */
+
+
+/**
+ * g_object_get: (skip)
+ * @object: a #GObject
+ * @first_property_name: name of the first property to get
+ * @...: return location for the first property, followed optionally by more name/return location pairs, followed by %NULL
+ *
+ * Gets properties of an object.
+ *
+ * In general, a copy is made of the property contents and the caller
+ * is responsible for freeing the memory in the appropriate manner for
+ * the type, for instance by calling g_free() or g_object_unref().
+ *
+ * <example>
+ * <title>Using g_object_get(<!-- -->)</title>
+ * An example of using g_object_get() to get the contents
+ * of three properties - one of type #G_TYPE_INT,
+ * one of type #G_TYPE_STRING, and one of type #G_TYPE_OBJECT:
+ * <programlisting>
+ * gint intval;
+ * gchar *strval;
+ * GObject *objval;
+ *
+ * g_object_get (my_object,
+ * "int-property", &intval,
+ * "str-property", &strval,
+ * "obj-property", &objval,
+ * NULL);
+ *
+ * // Do something with intval, strval, objval
+ *
+ * g_free (strval);
+ * g_object_unref (objval);
+ * </programlisting>
+ * </example>
+ */
+
+
+/**
+ * g_object_get_data:
+ * @object: #GObject containing the associations
+ * @key: name of the key for that association
+ *
+ * Gets a named field from the objects table of associations (see g_object_set_data()).
+ *
+ * Returns: (transfer none): the data if found, or %NULL if no such data exists.
+ */
+
+
+/**
+ * g_object_get_property:
+ * @object: a #GObject
+ * @property_name: the name of the property to get
+ * @value: return location for the property value
+ *
+ * Gets a property of an object. @value must have been initialized to the
+ * expected type of the property (or a type to which the expected type can be
+ * transformed) using g_value_init().
+ *
+ * In general, a copy is made of the property contents and the caller is
+ * responsible for freeing the memory by calling g_value_unset().
+ *
+ * Note that g_object_get_property() is really intended for language
+ * bindings, g_object_get() is much more convenient for C programming.
+ */
+
+
+/**
+ * g_object_get_qdata:
+ * @object: The GObject to get a stored user data pointer from
+ * @quark: A #GQuark, naming the user data pointer
+ *
+ * This function gets back user data pointers stored via
+ * g_object_set_qdata().
+ *
+ * Returns: (transfer none): The user data pointer set, or %NULL
+ */
+
+
+/**
+ * g_object_get_valist: (skip)
+ * @object: a #GObject
+ * @first_property_name: name of the first property to get
+ * @var_args: return location for the first property, followed optionally by more name/return location pairs, followed by %NULL
+ *
+ * Gets properties of an object.
+ *
+ * In general, a copy is made of the property contents and the caller
+ * is responsible for freeing the memory in the appropriate manner for
+ * the type, for instance by calling g_free() or g_object_unref().
+ *
+ * See g_object_get().
+ */
+
+
+/**
+ * g_object_interface_find_property:
+ * @g_iface: any interface vtable for the interface, or the default vtable for the interface
+ * @property_name: name of a property to lookup.
+ *
+ * Find the #GParamSpec with the given name for an
+ * interface. Generally, the interface vtable passed in as @g_iface
+ * will be the default vtable from g_type_default_interface_ref(), or,
+ * if you know the interface has already been loaded,
+ * g_type_default_interface_peek().
+ *
+ *
+ * interface with the name @property_name, or %NULL if no
+ * such property exists.
+ *
+ * Since: 2.4
+ * Returns: (transfer none): the #GParamSpec for the property of the
+ */
+
+
+/**
+ * g_object_interface_install_property:
+ * @g_iface: any interface vtable for the interface, or the default vtable for the interface.
+ * @pspec: the #GParamSpec for the new property
+ *
+ * Add a property to an interface; this is only useful for interfaces
+ * that are added to GObject-derived types. Adding a property to an
+ * interface forces all objects classes with that interface to have a
+ * compatible property. The compatible property could be a newly
+ * created #GParamSpec, but normally
+ * g_object_class_override_property() will be used so that the object
+ * class only needs to provide an implementation and inherits the
+ * property description, default value, bounds, and so forth from the
+ * interface property.
+ *
+ * This function is meant to be called from the interface's default
+ * vtable initialization function (the @class_init member of
+ * #GTypeInfo.) It must not be called after after @class_init has
+ * been called for any object types implementing this interface.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_object_interface_list_properties:
+ * @g_iface: any interface vtable for the interface, or the default vtable for the interface
+ * @n_properties_p: (out): location to store number of properties returned.
+ *
+ * Lists the properties of an interface.Generally, the interface
+ * vtable passed in as @g_iface will be the default vtable from
+ * g_type_default_interface_ref(), or, if you know the interface has
+ * already been loaded, g_type_default_interface_peek().
+ *
+ *
+ * pointer to an array of pointers to #GParamSpec
+ * structures. The paramspecs are owned by GLib, but the
+ * array should be freed with g_free() when you are done with
+ * it.
+ *
+ * Since: 2.4
+ * Returns: (array length=n_properties_p) (transfer container): a
+ */
+
+
+/**
+ * g_object_is_floating:
+ * @object: (type GObject.Object): a #GObject
+ *
+ * Checks whether @object has a <link linkend="floating-ref">floating</link>
+ * reference.
+ *
+ * Since: 2.10
+ * Returns: %TRUE if @object has a floating reference
+ */
+
+
+/**
+ * g_object_new: (skip)
+ * @object_type: the type id of the #GObject subtype to instantiate
+ * @first_property_name: the name of the first property
+ * @...: the value of the first property, followed optionally by more name/value pairs, followed by %NULL
+ *
+ * Creates a new instance of a #GObject subtype and sets its properties.
+ *
+ * Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY)
+ * which are not explicitly specified are set to their default values.
+ *
+ * Returns: (transfer full): a new instance of @object_type
+ */
+
+
+/**
+ * g_object_new_valist: (skip)
+ * @object_type: the type id of the #GObject subtype to instantiate
+ * @first_property_name: the name of the first property
+ * @var_args: the value of the first property, followed optionally by more name/value pairs, followed by %NULL
+ *
+ * Creates a new instance of a #GObject subtype and sets its properties.
+ *
+ * Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY)
+ * which are not explicitly specified are set to their default values.
+ *
+ * Returns: a new instance of @object_type
+ */
+
+
+/**
+ * g_object_newv:
+ * @object_type: the type id of the #GObject subtype to instantiate
+ * @n_parameters: the length of the @parameters array
+ * @parameters: (array length=n_parameters): an array of #GParameter
+ *
+ * Creates a new instance of a #GObject subtype and sets its properties.
+ *
+ * Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY)
+ * which are not explicitly specified are set to their default values.
+ *
+ * @object_type
+ *
+ * Rename to: g_object_new
+ * Returns: (type GObject.Object) (transfer full): a new instance of
+ */
+
+
+/**
+ * g_object_notify:
+ * @object: a #GObject
+ * @property_name: the name of a property installed on the class of @object.
+ *
+ * Emits a "notify" signal for the property @property_name on @object.
+ *
+ * When possible, eg. when signaling a property change from within the class
+ * that registered the property, you should use g_object_notify_by_pspec()
+ * instead.
+ */
+
+
+/**
+ * g_object_notify_by_pspec:
+ * @object: a #GObject
+ * @pspec: the #GParamSpec of a property installed on the class of @object.
+ *
+ * Emits a "notify" signal for the property specified by @pspec on @object.
+ *
+ * This function omits the property name lookup, hence it is faster than
+ * g_object_notify().
+ *
+ * One way to avoid using g_object_notify() from within the
+ * class that registered the properties, and using g_object_notify_by_pspec()
+ * instead, is to store the GParamSpec used with
+ * g_object_class_install_property() inside a static array, e.g.:
+ *
+ * |[
+ * enum
+ * {
+ * PROP_0,
+ * PROP_FOO,
+ * PROP_LAST
+ * };
+ *
+ * static GParamSpec *properties[PROP_LAST];
+ *
+ * static void
+ * my_object_class_init (MyObjectClass *klass)
+ * {
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
+ * 0, 100,
+ * 50,
+ * G_PARAM_READWRITE);
+ * g_object_class_install_property (gobject_class,
+ * PROP_FOO,
+ * properties[PROP_FOO]);
+ * }
+ * ]|
+ *
+ * and then notify a change on the "foo" property with:
+ *
+ * |[
+ * g_object_notify_by_pspec (self, properties[PROP_FOO]);
+ * ]|
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_object_ref:
+ * @object: (type GObject.Object): a #GObject
+ *
+ * Increases the reference count of @object.
+ *
+ * Returns: (type GObject.Object) (transfer none): the same @object
+ */
+
+
+/**
+ * g_object_ref_sink:
+ * @object: (type GObject.Object): a #GObject
+ *
+ * Increase the reference count of @object, and possibly remove the
+ * <link linkend="floating-ref">floating</link> reference, if @object
+ * has a floating reference.
+ *
+ * In other words, if the object is floating, then this call "assumes
+ * ownership" of the floating reference, converting it to a normal
+ * reference by clearing the floating flag while leaving the reference
+ * count unchanged.  If the object is not floating, then this call
+ * adds a new normal reference increasing the reference count by one.
+ *
+ * Since: 2.10
+ * Returns: (type GObject.Object) (transfer none): @object
+ */
+
+
+/**
+ * g_object_remove_toggle_ref: (skip)
+ * @object: a #GObject
+ * @notify: a function to call when this reference is the last reference to the object, or is no longer the last reference.
+ * @data: data to pass to @notify
+ *
+ * Removes a reference added with g_object_add_toggle_ref(). The
+ * reference count of the object is decreased by one.
+ *
+ * Since: 2.8
+ */
+
+
+/**
+ * g_object_remove_weak_pointer: (skip)
+ * @object: The object that is weak referenced.
+ * @weak_pointer_location: (inout): The memory address of a pointer.
+ *
+ * Removes a weak reference from @object that was previously added
+ * using g_object_add_weak_pointer(). The @weak_pointer_location has
+ * to match the one used with g_object_add_weak_pointer().
+ */
+
+
+/**
+ * g_object_run_dispose:
+ * @object: a #GObject
+ *
+ * Releases all references to other objects. This can be used to break
+ * reference cycles.
+ *
+ * This functions should only be called from object system implementations.
+ */
+
+
+/**
+ * g_object_set: (skip)
+ * @object: a #GObject
+ * @first_property_name: name of the first property to set
+ * @...: value for the first property, followed optionally by more name/value pairs, followed by %NULL
+ *
+ * Sets properties on an object.
+ */
+
+
+/**
+ * g_object_set_data:
+ * @object: #GObject containing the associations.
+ * @key: name of the key
+ * @data: data to associate with that key
+ *
+ * Each object carries around a table of associations from
+ * strings to pointers.  This function lets you set an association.
+ *
+ * If the object already had an association with that name,
+ * the old association will be destroyed.
+ */
+
+
+/**
+ * g_object_set_data_full: (skip)
+ * @object: #GObject containing the associations
+ * @key: name of the key
+ * @data: data to associate with that key
+ * @destroy: function to call when the association is destroyed
+ *
+ * Like g_object_set_data() except it adds notification
+ * for when the association is destroyed, either by setting it
+ * to a different value or when the object is destroyed.
+ *
+ * Note that the @destroy callback is not called if @data is %NULL.
+ */
+
+
+/**
+ * g_object_set_property:
+ * @object: a #GObject
+ * @property_name: the name of the property to set
+ * @value: the value
+ *
+ * Sets a property on an object.
+ */
+
+
+/**
+ * g_object_set_qdata: (skip)
+ * @object: The GObject to set store a user data pointer
+ * @quark: A #GQuark, naming the user data pointer
+ * @data: An opaque user data pointer
+ *
+ * This sets an opaque, named pointer on an object.
+ * The name is specified through a #GQuark (retrived e.g. via
+ * g_quark_from_static_string()), and the pointer
+ * can be gotten back from the @object with g_object_get_qdata()
+ * until the @object is finalized.
+ * Setting a previously set user data pointer, overrides (frees)
+ * the old pointer set, using #NULL as pointer essentially
+ * removes the data stored.
+ */
+
+
+/**
+ * g_object_set_qdata_full: (skip)
+ * @object: The GObject to set store a user data pointer
+ * @quark: A #GQuark, naming the user data pointer
+ * @data: An opaque user data pointer
+ * @destroy: Function to invoke with @data as argument, when @data needs to be freed
+ *
+ * This function works like g_object_set_qdata(), but in addition,
+ * a void (*destroy) (gpointer) function may be specified which is
+ * called with @data as argument when the @object is finalized, or
+ * the data is being overwritten by a call to g_object_set_qdata()
+ * with the same @quark.
+ */
+
+
+/**
+ * g_object_set_valist: (skip)
+ * @object: a #GObject
+ * @first_property_name: name of the first property to set
+ * @var_args: value for the first property, followed optionally by more name/value pairs, followed by %NULL
+ *
+ * Sets properties on an object.
+ */
+
+
+/**
+ * g_object_steal_data:
+ * @object: #GObject containing the associations
+ * @key: name of the key
+ *
+ * Remove a specified datum from the object's data associations,
+ * without invoking the association's destroy handler.
+ *
+ * Returns: (transfer full): the data if found, or %NULL if no such data exists.
+ */
+
+
+/**
+ * g_object_steal_qdata:
+ * @object: The GObject to get a stored user data pointer from
+ * @quark: A #GQuark, naming the user data pointer
+ *
+ * This function gets back user data pointers stored via
+ * g_object_set_qdata() and removes the @data from object
+ * without invoking its destroy() function (if any was
+ * set).
+ * Usually, calling this function is only required to update
+ * user data pointers with a destroy notifier, for example:
+ * |[
+ * void
+ * object_add_to_user_list (GObject     *object,
+ * const gchar *new_string)
+ * {
+ * // the quark, naming the object data
+ * GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
+ * // retrive the old string list
+ * GList *list = g_object_steal_qdata (object, quark_string_list);
+ *
+ * // prepend new string
+ * list = g_list_prepend (list, g_strdup (new_string));
+ * // this changed 'list', so we need to set it again
+ * g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
+ * }
+ * static void
+ * free_string_list (gpointer data)
+ * {
+ * GList *node, *list = data;
+ *
+ * for (node = list; node; node = node->next)
+ * g_free (node->data);
+ * g_list_free (list);
+ * }
+ * ]|
+ * Using g_object_get_qdata() in the above example, instead of
+ * g_object_steal_qdata() would have left the destroy function set,
+ * and thus the partial string list would have been freed upon
+ * g_object_set_qdata_full().
+ *
+ * Returns: (transfer full): The user data pointer set, or %NULL
+ */
+
+
+/**
+ * g_object_thaw_notify:
+ * @object: a #GObject
+ *
+ * Reverts the effect of a previous call to
+ * g_object_freeze_notify(). The freeze count is decreased on @object
+ * and when it reaches zero, all queued "notify" signals are emitted.
+ *
+ * It is an error to call this function when the freeze count is zero.
+ */
+
+
+/**
+ * g_object_unref:
+ * @object: (type GObject.Object): a #GObject
+ *
+ * Decreases the reference count of @object. When its reference count
+ * drops to 0, the object is finalized (i.e. its memory is freed).
+ */
+
+
+/**
+ * g_object_watch_closure:
+ * @object: GObject restricting lifetime of @closure
+ * @closure: GClosure to watch
+ *
+ * This function essentially limits the life time of the @closure to
+ * the life time of the object. That is, when the object is finalized,
+ * the @closure is invalidated by calling g_closure_invalidate() on
+ * it, in order to prevent invocations of the closure with a finalized
+ * (nonexisting) object. Also, g_object_ref() and g_object_unref() are
+ * added as marshal guards to the @closure, to ensure that an extra
+ * reference count is held on @object during invocation of the
+ * @closure.  Usually, this function will be called on closures that
+ * use this @object as closure data.
+ */
+
+
+/**
+ * g_object_weak_ref: (skip)
+ * @object: #GObject to reference weakly
+ * @notify: callback to invoke before the object is freed
+ * @data: extra data to pass to notify
+ *
+ * Adds a weak reference callback to an object. Weak references are
+ * used for notification when an object is finalized. They are called
+ * "weak references" because they allow you to safely hold a pointer
+ * to an object without calling g_object_ref() (g_object_ref() adds a
+ * strong reference, that is, forces the object to stay alive).
+ *
+ * Note that the weak references created by this method are not
+ * thread-safe: they cannot safely be used in one thread if the
+ * object's last g_object_unref() might happen in another thread.
+ * Use #GWeakRef if thread-safety is required.
+ */
+
+
+/**
+ * g_object_weak_unref: (skip)
+ * @object: #GObject to remove a weak reference from
+ * @notify: callback to search for
+ * @data: data to search for
+ *
+ * Removes a weak reference callback to an object.
+ */
+
+
+/**
+ * g_param_spec_boolean: (skip)
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecBoolean instance specifying a %G_TYPE_BOOLEAN
+ * property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: a newly created parameter specification
+ */
+
+
+/**
+ * g_param_spec_boxed: (skip)
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @boxed_type: %G_TYPE_BOXED derived type of this property
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecBoxed instance specifying a %G_TYPE_BOXED
+ * derived property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: a newly created parameter specification
+ */
+
+
+/**
+ * g_param_spec_char: (skip)
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecChar instance specifying a %G_TYPE_CHAR property.
+ *
+ * Returns: a newly created parameter specification
+ */
+
+
+/**
+ * g_param_spec_double: (skip)
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecDouble instance specifying a %G_TYPE_DOUBLE
+ * property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: a newly created parameter specification
+ */
+
+
+/**
+ * g_param_spec_enum: (skip)
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @enum_type: a #GType derived from %G_TYPE_ENUM
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecEnum instance specifying a %G_TYPE_ENUM
+ * property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: a newly created parameter specification
+ */
+
+
+/**
+ * g_param_spec_flags: (skip)
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @flags_type: a #GType derived from %G_TYPE_FLAGS
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecFlags instance specifying a %G_TYPE_FLAGS
+ * property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: a newly created parameter specification
+ */
+
+
+/**
+ * g_param_spec_float: (skip)
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecFloat instance specifying a %G_TYPE_FLOAT property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: a newly created parameter specification
+ */
+
+
+/**
+ * g_param_spec_get_blurb:
+ * @pspec: a valid #GParamSpec
+ *
+ * Get the short description of a #GParamSpec.
+ *
+ * Returns: the short description of @pspec.
+ */
+
+
+/**
+ * g_param_spec_get_name:
+ * @pspec: a valid #GParamSpec
+ *
+ * Get the name of a #GParamSpec.
+ *
+ * The name is always an "interned" string (as per g_intern_string()).
+ * This allows for pointer-value comparisons.
+ *
+ * Returns: the name of @pspec.
+ */
+
+
+/**
+ * g_param_spec_get_nick:
+ * @pspec: a valid #GParamSpec
+ *
+ * Get the nickname of a #GParamSpec.
+ *
+ * Returns: the nickname of @pspec.
+ */
+
+
+/**
+ * g_param_spec_get_qdata:
+ * @pspec: a valid #GParamSpec
+ * @quark: a #GQuark, naming the user data pointer
+ *
+ * Gets back user data pointers stored via g_param_spec_set_qdata().
+ *
+ * Returns: (transfer none): the user data pointer set, or %NULL
+ */
+
+
+/**
+ * g_param_spec_get_redirect_target:
+ * @pspec: a #GParamSpec
+ *
+ * If the paramspec redirects operations to another paramspec,
+ * returns that paramspec. Redirect is used typically for
+ * providing a new implementation of a property in a derived
+ * type while preserving all the properties from the parent
+ * type. Redirection is established by creating a property
+ * of type #GParamSpecOverride. See g_object_class_override_property()
+ * for an example of the use of this capability.
+ *
+ *
+ * paramspec should be redirected, or %NULL if none.
+ *
+ * Since: 2.4
+ * Returns: (transfer none): paramspec to which requests on this
+ */
+
+
+/**
+ * g_param_spec_gtype: (skip)
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @is_a_type: a #GType whose subtypes are allowed as values of the property (use %G_TYPE_NONE for any type)
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecGType instance specifying a
+ * %G_TYPE_GTYPE property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Since: 2.10
+ * Returns: a newly created parameter specification
+ */
+
+
+/**
+ * g_param_spec_int: (skip)
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecInt instance specifying a %G_TYPE_INT property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: a newly created parameter specification
+ */
+
+
+/**
+ * g_param_spec_int64: (skip)
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecInt64 instance specifying a %G_TYPE_INT64 property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: a newly created parameter specification
+ */
+
+
+/**
+ * g_param_spec_internal: (skip)
+ * @param_type: the #GType for the property; must be derived from #G_TYPE_PARAM
+ * @name: the canonical name of the property
+ * @nick: the nickname of the property
+ * @blurb: a short description of the property
+ * @flags: a combination of #GParamFlags
+ *
+ * Creates a new #GParamSpec instance.
+ *
+ * A property name consists of segments consisting of ASCII letters and
+ * digits, separated by either the '-' or '_' character. The first
+ * character of a property name must be a letter. Names which violate these
+ * rules lead to undefined behaviour.
+ *
+ * When creating and looking up a #GParamSpec, either separator can be
+ * used, but they cannot be mixed. Using '-' is considerably more
+ * efficient and in fact required when using property names as detail
+ * strings for signals.
+ *
+ * Beyond the name, #GParamSpec<!-- -->s have two more descriptive
+ * strings associated with them, the @nick, which should be suitable
+ * for use as a label for the property in a property editor, and the
+ * @blurb, which should be a somewhat longer description, suitable for
+ * e.g. a tooltip. The @nick and @blurb should ideally be localized.
+ *
+ * Returns: a newly allocated #GParamSpec instance
+ */
+
+
+/**
+ * g_param_spec_long: (skip)
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecLong instance specifying a %G_TYPE_LONG property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: a newly created parameter specification
+ */
+
+
+/**
+ * g_param_spec_object: (skip)
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @object_type: %G_TYPE_OBJECT derived type of this property
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecBoxed instance specifying a %G_TYPE_OBJECT
+ * derived property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: a newly created parameter specification
+ */
+
+
+/**
+ * g_param_spec_override: (skip)
+ * @name: the name of the property.
+ * @overridden: The property that is being overridden
+ *
+ * Creates a new property of type #GParamSpecOverride. This is used
+ * to direct operations to another paramspec, and will not be directly
+ * useful unless you are implementing a new base type similar to GObject.
+ *
+ * Since: 2.4
+ * Returns: the newly created #GParamSpec
+ */
+
+
+/**
+ * g_param_spec_param: (skip)
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @param_type: a #GType derived from %G_TYPE_PARAM
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecParam instance specifying a %G_TYPE_PARAM
+ * property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: a newly created parameter specification
+ */
+
+
+/**
+ * g_param_spec_pointer: (skip)
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecPointer instance specifying a pointer property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: a newly created parameter specification
+ */
+
+
+/**
+ * g_param_spec_pool_insert:
+ * @pool: a #GParamSpecPool.
+ * @pspec: the #GParamSpec to insert
+ * @owner_type: a #GType identifying the owner of @pspec
+ *
+ * Inserts a #GParamSpec in the pool.
+ */
+
+
+/**
+ * g_param_spec_pool_list:
+ * @pool: a #GParamSpecPool
+ * @owner_type: the owner to look for
+ * @n_pspecs_p: (out): return location for the length of the returned array
+ *
+ * Gets an array of all #GParamSpec<!-- -->s owned by @owner_type in
+ * the pool.
+ *
+ * allocated array containing pointers to all #GParamSpecs
+ * owned by @owner_type in the pool
+ *
+ * Returns: (array length=n_pspecs_p) (transfer container): a newly
+ */
+
+
+/**
+ * g_param_spec_pool_list_owned:
+ * @pool: a #GParamSpecPool
+ * @owner_type: the owner to look for
+ *
+ * Gets an #GList of all #GParamSpec<!-- -->s owned by @owner_type in
+ * the pool.
+ *
+ * #GList of all #GParamSpec<!-- -->s owned by @owner_type in
+ * the pool#GParamSpec<!-- -->s.
+ *
+ * Returns: (transfer container) (element-type GObject.ParamSpec): a
+ */
+
+
+/**
+ * g_param_spec_pool_lookup:
+ * @pool: a #GParamSpecPool
+ * @param_name: the name to look for
+ * @owner_type: the owner to look for
+ * @walk_ancestors: If %TRUE, also try to find a #GParamSpec with @param_name owned by an ancestor of @owner_type.
+ *
+ * Looks up a #GParamSpec in the pool.
+ *
+ * matching #GParamSpec was found.
+ *
+ * Returns: (transfer none): The found #GParamSpec, or %NULL if no
+ */
+
+
+/**
+ * g_param_spec_pool_new:
+ * @type_prefixing: Whether the pool will support type-prefixed property names.
+ *
+ * Creates a new #GParamSpecPool.
+ *
+ * If @type_prefixing is %TRUE, lookups in the newly created pool will
+ * allow to specify the owner as a colon-separated prefix of the
+ * property name, like "GtkContainer:border-width". This feature is
+ * deprecated, so you should always set @type_prefixing to %FALSE.
+ *
+ * Returns: (transfer none): a newly allocated #GParamSpecPool.
+ */
+
+
+/**
+ * g_param_spec_pool_remove:
+ * @pool: a #GParamSpecPool
+ * @pspec: the #GParamSpec to remove
+ *
+ * Removes a #GParamSpec from the pool.
+ */
+
+
+/**
+ * g_param_spec_ref: (skip)
+ * @pspec: a valid #GParamSpec
+ *
+ * Increments the reference count of @pspec.
+ *
+ * Returns: the #GParamSpec that was passed into this function
+ */
+
+
+/**
+ * g_param_spec_ref_sink: (skip)
+ * @pspec: a valid #GParamSpec
+ *
+ * Convenience function to ref and sink a #GParamSpec.
+ *
+ * Since: 2.10
+ * Returns: the #GParamSpec that was passed into this function
+ */
+
+
+/**
+ * g_param_spec_set_qdata:
+ * @pspec: the #GParamSpec to set store a user data pointer
+ * @quark: a #GQuark, naming the user data pointer
+ * @data: an opaque user data pointer
+ *
+ * Sets an opaque, named pointer on a #GParamSpec. The name is
+ * specified through a #GQuark (retrieved e.g. via
+ * g_quark_from_static_string()), and the pointer can be gotten back
+ * from the @pspec with g_param_spec_get_qdata().  Setting a
+ * previously set user data pointer, overrides (frees) the old pointer
+ * set, using %NULL as pointer essentially removes the data stored.
+ */
+
+
+/**
+ * g_param_spec_set_qdata_full: (skip)
+ * @pspec: the #GParamSpec to set store a user data pointer
+ * @quark: a #GQuark, naming the user data pointer
+ * @data: an opaque user data pointer
+ * @destroy: function to invoke with @data as argument, when @data needs to be freed
+ *
+ * This function works like g_param_spec_set_qdata(), but in addition,
+ * a <literal>void (*destroy) (gpointer)</literal> function may be
+ * specified which is called with @data as argument when the @pspec is
+ * finalized, or the data is being overwritten by a call to
+ * g_param_spec_set_qdata() with the same @quark.
+ */
+
+
+/**
+ * g_param_spec_sink:
+ * @pspec: a valid #GParamSpec
+ *
+ * The initial reference count of a newly created #GParamSpec is 1,
+ * even though no one has explicitly called g_param_spec_ref() on it
+ * yet. So the initial reference count is flagged as "floating", until
+ * someone calls <literal>g_param_spec_ref (pspec); g_param_spec_sink
+ * (pspec);</literal> in sequence on it, taking over the initial
+ * reference count (thus ending up with a @pspec that has a reference
+ * count of 1 still, but is not flagged "floating" anymore).
+ */
+
+
+/**
+ * g_param_spec_steal_qdata:
+ * @pspec: the #GParamSpec to get a stored user data pointer from
+ * @quark: a #GQuark, naming the user data pointer
+ *
+ * Gets back user data pointers stored via g_param_spec_set_qdata()
+ * and removes the @data from @pspec without invoking its destroy()
+ * function (if any was set).  Usually, calling this function is only
+ * required to update user data pointers with a destroy notifier.
+ *
+ * Returns: (transfer none): the user data pointer set, or %NULL
+ */
+
+
+/**
+ * g_param_spec_string: (skip)
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecString instance.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: a newly created parameter specification
+ */
+
+
+/**
+ * g_param_spec_uchar: (skip)
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecUChar instance specifying a %G_TYPE_UCHAR property.
+ *
+ * Returns: a newly created parameter specification
+ */
+
+
+/**
+ * g_param_spec_uint: (skip)
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecUInt instance specifying a %G_TYPE_UINT property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: a newly created parameter specification
+ */
+
+
+/**
+ * g_param_spec_uint64: (skip)
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecUInt64 instance specifying a %G_TYPE_UINT64
+ * property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: a newly created parameter specification
+ */
+
+
+/**
+ * g_param_spec_ulong: (skip)
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecULong instance specifying a %G_TYPE_ULONG
+ * property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: a newly created parameter specification
+ */
+
+
+/**
+ * g_param_spec_unichar: (skip)
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecUnichar instance specifying a %G_TYPE_UINT
+ * property. #GValue structures for this property can be accessed with
+ * g_value_set_uint() and g_value_get_uint().
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: a newly created parameter specification
+ */
+
+
+/**
+ * g_param_spec_unref: (skip)
+ * @pspec: a valid #GParamSpec
+ *
+ * Decrements the reference count of a @pspec.
+ */
+
+
+/**
+ * g_param_spec_value_array: (skip)
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @element_spec: a #GParamSpec describing the elements contained in arrays of this property, may be %NULL
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecValueArray instance specifying a
+ * %G_TYPE_VALUE_ARRAY property. %G_TYPE_VALUE_ARRAY is a
+ * %G_TYPE_BOXED type, as such, #GValue structures for this property
+ * can be accessed with g_value_set_boxed() and g_value_get_boxed().
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: a newly created parameter specification
+ */
+
+
+/**
+ * g_param_spec_variant: (skip)
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @type: a #GVariantType
+ * @default_value: (allow-none): a #GVariant of type @type to use as the default value, or %NULL
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecVariant instance specifying a #GVariant
+ * property.
+ *
+ * If @default_value is floating, it is consumed.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: the newly created #GParamSpec
+ * Since: 2.26
+ */
+
+
+/**
+ * g_param_type_register_static:
+ * @name: 0-terminated string used as the name of the new #GParamSpec type.
+ * @pspec_info: The #GParamSpecTypeInfo for this #GParamSpec type.
+ *
+ * Registers @name as the name of a new static type derived from
+ * #G_TYPE_PARAM. The type system uses the information contained in
+ * the #GParamSpecTypeInfo structure pointed to by @info to manage the
+ * #GParamSpec type and its instances.
+ *
+ * Returns: The new type identifier.
+ */
+
+
+/**
+ * g_param_value_convert:
+ * @pspec: a valid #GParamSpec
+ * @src_value: souce #GValue
+ * @dest_value: destination #GValue of correct type for @pspec
+ * @strict_validation: %TRUE requires @dest_value to conform to @pspec without modifications
+ *
+ * Transforms @src_value into @dest_value if possible, and then
+ * validates @dest_value, in order for it to conform to @pspec.  If
+ * @strict_validation is %TRUE this function will only succeed if the
+ * transformed @dest_value complied to @pspec without modifications.
+ *
+ * See also g_value_type_transformable(), g_value_transform() and
+ * g_param_value_validate().
+ *
+ * %FALSE otherwise and @dest_value is left untouched.
+ *
+ * Returns: %TRUE if transformation and validation were successful,
+ */
+
+
+/**
+ * g_param_value_defaults:
+ * @pspec: a valid #GParamSpec
+ * @value: a #GValue of correct type for @pspec
+ *
+ * Checks whether @value contains the default value as specified in @pspec.
+ *
+ * Returns: whether @value contains the canonical default for this @pspec
+ */
+
+
+/**
+ * g_param_value_set_default:
+ * @pspec: a valid #GParamSpec
+ * @value: a #GValue of correct type for @pspec
+ *
+ * Sets @value to its default value as specified in @pspec.
+ */
+
+
+/**
+ * g_param_value_validate:
+ * @pspec: a valid #GParamSpec
+ * @value: a #GValue of correct type for @pspec
+ *
+ * Ensures that the contents of @value comply with the specifications
+ * set out by @pspec. For example, a #GParamSpecInt might require
+ * that integers stored in @value may not be smaller than -42 and not be
+ * greater than +42. If @value contains an integer outside of this range,
+ * it is modified accordingly, so the resulting value will fit into the
+ * range -42 .. +42.
+ *
+ * Returns: whether modifying @value was necessary to ensure validity
+ */
+
+
+/**
+ * g_param_values_cmp:
+ * @pspec: a valid #GParamSpec
+ * @value1: a #GValue of correct type for @pspec
+ * @value2: a #GValue of correct type for @pspec
+ *
+ * Compares @value1 with @value2 according to @pspec, and return -1, 0 or +1,
+ * if @value1 is found to be less than, equal to or greater than @value2,
+ * respectively.
+ *
+ * Returns: -1, 0 or +1, for a less than, equal to or greater than result
+ */
+
+
+/**
+ * g_pointer_type_register_static:
+ * @name: the name of the new pointer type.
+ *
+ * Creates a new %G_TYPE_POINTER derived type id for a new
+ * pointer type with name @name.
+ *
+ * Returns: a new %G_TYPE_POINTER derived type id for @name.
+ */
+
+
+/**
+ * g_renew:
+ * @struct_type: the type of the elements to allocate
+ * @mem: the currently allocated memory
+ * @n_structs: the number of elements to allocate
+ *
+ * Reallocates the memory pointed to by @mem, so that it now has space for
+ * @n_structs elements of type @struct_type. It returns the new address of
+ * the memory, which may have been moved.
+ * Care is taken to avoid overflow when calculating the size of the allocated block.
+ *
+ * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
+ */
+
+
+/**
+ * g_signal_accumulator_first_wins:
+ * @ihint: standard #GSignalAccumulator parameter
+ * @return_accu: standard #GSignalAccumulator parameter
+ * @handler_return: standard #GSignalAccumulator parameter
+ * @dummy: standard #GSignalAccumulator parameter
+ *
+ * A predefined #GSignalAccumulator for signals intended to be used as a
+ * hook for application code to provide a particular value.  Usually
+ * only one such value is desired and multiple handlers for the same
+ * signal don't make much sense (except for the case of the default
+ * handler defined in the class structure, in which case you will
+ * usually want the signal connection to override the class handler).
+ *
+ * This accumulator will use the return value from the first signal
+ * handler that is run as the return value for the signal and not run
+ * any further handlers (ie: the first handler "wins").
+ *
+ * Returns: standard #GSignalAccumulator result
+ * Since: 2.28
+ */
+
+
+/**
+ * g_signal_accumulator_true_handled:
+ * @ihint: standard #GSignalAccumulator parameter
+ * @return_accu: standard #GSignalAccumulator parameter
+ * @handler_return: standard #GSignalAccumulator parameter
+ * @dummy: standard #GSignalAccumulator parameter
+ *
+ * A predefined #GSignalAccumulator for signals that return a
+ * boolean values. The behavior that this accumulator gives is
+ * that a return of %TRUE stops the signal emission: no further
+ * callbacks will be invoked, while a return of %FALSE allows
+ * the emission to continue. The idea here is that a %TRUE return
+ * indicates that the callback <emphasis>handled</emphasis> the signal,
+ * and no further handling is needed.
+ *
+ * Since: 2.4
+ * Returns: standard #GSignalAccumulator result
+ */
+
+
+/**
+ * g_signal_add_emission_hook:
+ * @signal_id: the signal identifier, as returned by g_signal_lookup().
+ * @detail: the detail on which to call the hook.
+ * @hook_func: a #GSignalEmissionHook function.
+ * @hook_data: user data for @hook_func.
+ * @data_destroy: a #GDestroyNotify for @hook_data.
+ *
+ * Adds an emission hook for a signal, which will get called for any emission
+ * of that signal, independent of the instance. This is possible only
+ * for signals which don't have #G_SIGNAL_NO_HOOKS flag set.
+ *
+ * Returns: the hook id, for later use with g_signal_remove_emission_hook().
+ */
+
+
+/**
+ * g_signal_chain_from_overridden:
+ * @instance_and_params: (array) the argument list of the signal emission. The first element in the array is a #GValue for the instance the signal is being emitted on. The rest are any arguments to be passed to the signal.
+ * @return_value: Location for the return value.
+ *
+ * Calls the original class closure of a signal. This function should only
+ * be called from an overridden class closure; see
+ * g_signal_override_class_closure() and
+ * g_signal_override_class_handler().
+ */
+
+
+/**
+ * g_signal_chain_from_overridden_handler:
+ * @instance: the instance the signal is being emitted on.
+ * @...: parameters to be passed to the parent class closure, followed by a location for the return value. If the return type of the signal is #G_TYPE_NONE, the return value location can be omitted.
+ *
+ * Calls the original class closure of a signal. This function should
+ * only be called from an overridden class closure; see
+ * g_signal_override_class_closure() and
+ * g_signal_override_class_handler().
+ *
+ * Since: 2.18
+ */
+
+
+/**
+ * g_signal_connect:
+ * @instance: the instance to connect to.
+ * @detailed_signal: a string of the form "signal-name::detail".
+ * @c_handler: the #GCallback to connect.
+ * @data: data to pass to @c_handler calls.
+ *
+ * Connects a #GCallback function to a signal for a particular object.
+ *
+ * The handler will be called before the default handler of the signal.
+ *
+ * Returns: the handler id
+ */
+
+
+/**
+ * g_signal_connect_after:
+ * @instance: the instance to connect to.
+ * @detailed_signal: a string of the form "signal-name::detail".
+ * @c_handler: the #GCallback to connect.
+ * @data: data to pass to @c_handler calls.
+ *
+ * Connects a #GCallback function to a signal for a particular object.
+ *
+ * The handler will be called after the default handler of the signal.
+ *
+ * Returns: the handler id
+ */
+
+
+/**
+ * g_signal_connect_closure:
+ * @instance: the instance to connect to.
+ * @detailed_signal: a string of the form "signal-name::detail".
+ * @closure: the closure to connect.
+ * @after: whether the handler should be called before or after the default handler of the signal.
+ *
+ * Connects a closure to a signal for a particular object.
+ *
+ * Returns: the handler id
+ */
+
+
+/**
+ * g_signal_connect_closure_by_id:
+ * @instance: the instance to connect to.
+ * @signal_id: the id of the signal.
+ * @detail: the detail.
+ * @closure: the closure to connect.
+ * @after: whether the handler should be called before or after the default handler of the signal.
+ *
+ * Connects a closure to a signal for a particular object.
+ *
+ * Returns: the handler id
+ */
+
+
+/**
+ * g_signal_connect_data:
+ * @instance: the instance to connect to.
+ * @detailed_signal: a string of the form "signal-name::detail".
+ * @c_handler: the #GCallback to connect.
+ * @data: data to pass to @c_handler calls.
+ * @destroy_data: a #GClosureNotify for @data.
+ * @connect_flags: a combination of #GConnectFlags.
+ *
+ * Connects a #GCallback function to a signal for a particular object. Similar
+ * to g_signal_connect(), but allows to provide a #GClosureNotify for the data
+ * which will be called when the signal handler is disconnected and no longer
+ * used. Specify @connect_flags if you need <literal>..._after()</literal> or
+ * <literal>..._swapped()</literal> variants of this function.
+ *
+ * Returns: the handler id
+ */
+
+
+/**
+ * g_signal_connect_object: (skip)
+ * @instance: the instance to connect to.
+ * @detailed_signal: a string of the form "signal-name::detail".
+ * @c_handler: the #GCallback to connect.
+ * @gobject: the object to pass as data to @c_handler.
+ * @connect_flags: a combination of #GConnectFlags.
+ *
+ * This is similar to g_signal_connect_data(), but uses a closure which
+ * ensures that the @gobject stays alive during the call to @c_handler
+ * by temporarily adding a reference count to @gobject.
+ *
+ * Note that there is a bug in GObject that makes this function
+ * much less useful than it might seem otherwise. Once @gobject is
+ * disposed, the callback will no longer be called, but, the signal
+ * handler is <emphasis>not</emphasis> currently disconnected. If the
+ * @instance is itself being freed at the same time than this doesn't
+ * matter, since the signal will automatically be removed, but
+ * if @instance persists, then the signal handler will leak. You
+ * should not remove the signal yourself because in a future versions of
+ * GObject, the handler <emphasis>will</emphasis> automatically
+ * be disconnected.
+ *
+ * It's possible to work around this problem in a way that will
+ * continue to work with future versions of GObject by checking
+ * that the signal handler is still connected before disconnected it:
+ * <informalexample><programlisting>
+ * if (g_signal_handler_is_connected (instance, id))
+ * g_signal_handler_disconnect (instance, id);
+ * </programlisting></informalexample>
+ *
+ * Returns: the handler id.
+ */
+
+
+/**
+ * g_signal_connect_swapped:
+ * @instance: the instance to connect to.
+ * @detailed_signal: a string of the form "signal-name::detail".
+ * @c_handler: the #GCallback to connect.
+ * @data: data to pass to @c_handler calls.
+ *
+ * Connects a #GCallback function to a signal for a particular object.
+ *
+ * The instance on which the signal is emitted and @data will be swapped when
+ * calling the handler.
+ *
+ * Returns: the handler id
+ */
+
+
+/**
+ * g_signal_emit:
+ * @instance: the instance the signal is being emitted on.
+ * @signal_id: the signal id
+ * @detail: the detail
+ * @...: parameters to be passed to the signal, followed by a location for the return value. If the return type of the signal is #G_TYPE_NONE, the return value location can be omitted.
+ *
+ * Emits a signal.
+ *
+ * Note that g_signal_emit() resets the return value to the default
+ * if no handlers are connected, in contrast to g_signal_emitv().
+ */
+
+
+/**
+ * g_signal_emit_by_name:
+ * @instance: the instance the signal is being emitted on.
+ * @detailed_signal: a string of the form "signal-name::detail".
+ * @...: parameters to be passed to the signal, followed by a location for the return value. If the return type of the signal is #G_TYPE_NONE, the return value location can be omitted.
+ *
+ * Emits a signal.
+ *
+ * Note that g_signal_emit_by_name() resets the return value to the default
+ * if no handlers are connected, in contrast to g_signal_emitv().
+ */
+
+
+/**
+ * g_signal_emit_valist:
+ * @instance: the instance the signal is being emitted on.
+ * @signal_id: the signal id
+ * @detail: the detail
+ * @var_args: a list of parameters to be passed to the signal, followed by a location for the return value. If the return type of the signal is #G_TYPE_NONE, the return value location can be omitted.
+ *
+ * Emits a signal.
+ *
+ * Note that g_signal_emit_valist() resets the return value to the default
+ * if no handlers are connected, in contrast to g_signal_emitv().
+ */
+
+
+/**
+ * g_signal_emitv:
+ * @instance_and_params: (array): argument list for the signal emission. The first element in the array is a #GValue for the instance the signal is being emitted on. The rest are any arguments to be passed to the signal.
+ * @signal_id: the signal id
+ * @detail: the detail
+ * @return_value: Location to store the return value of the signal emission.
+ *
+ * Emits a signal.
+ *
+ * Note that g_signal_emitv() doesn't change @return_value if no handlers are
+ * connected, in contrast to g_signal_emit() and g_signal_emit_valist().
+ */
+
+
+/**
+ * g_signal_get_invocation_hint:
+ * @instance: the instance to query
+ *
+ * Returns the invocation hint of the innermost signal emission of instance.
+ *
+ * Returns: (transfer none): the invocation hint of the innermost signal  emission.
+ */
+
+
+/**
+ * g_signal_handler_block:
+ * @instance: The instance to block the signal handler of.
+ * @handler_id: Handler id of the handler to be blocked.
+ *
+ * Blocks a handler of an instance so it will not be called during any
+ * signal emissions unless it is unblocked again. Thus "blocking" a
+ * signal handler means to temporarily deactive it, a signal handler
+ * has to be unblocked exactly the same amount of times it has been
+ * blocked before to become active again.
+ *
+ * The @handler_id has to be a valid signal handler id, connected to a
+ * signal of @instance.
+ */
+
+
+/**
+ * g_signal_handler_disconnect:
+ * @instance: The instance to remove the signal handler from.
+ * @handler_id: Handler id of the handler to be disconnected.
+ *
+ * Disconnects a handler from an instance so it will not be called during
+ * any future or currently ongoing emissions of the signal it has been
+ * connected to. The @handler_id becomes invalid and may be reused.
+ *
+ * The @handler_id has to be a valid signal handler id, connected to a
+ * signal of @instance.
+ */
+
+
+/**
+ * g_signal_handler_find:
+ * @instance: The instance owning the signal handler to be found.
+ * @mask: Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handler has to match.
+ * @signal_id: Signal the handler has to be connected to.
+ * @detail: Signal detail the handler has to be connected to.
+ * @closure: (allow-none): The closure the handler will invoke.
+ * @func: The C closure callback of the handler (useless for non-C closures).
+ * @data: The closure data of the handler's closure.
+ *
+ * Finds the first signal handler that matches certain selection criteria.
+ * The criteria mask is passed as an OR-ed combination of #GSignalMatchType
+ * flags, and the criteria values are passed as arguments.
+ * The match @mask has to be non-0 for successful matches.
+ * If no handler was found, 0 is returned.
+ *
+ * Returns: A valid non-0 signal handler id for a successful match.
+ */
+
+
+/**
+ * g_signal_handler_is_connected:
+ * @instance: The instance where a signal handler is sought.
+ * @handler_id: the handler id.
+ *
+ * Returns whether @handler_id is the id of a handler connected to @instance.
+ *
+ * Returns: whether @handler_id identifies a handler connected to @instance.
+ */
+
+
+/**
+ * g_signal_handler_unblock:
+ * @instance: The instance to unblock the signal handler of.
+ * @handler_id: Handler id of the handler to be unblocked.
+ *
+ * Undoes the effect of a previous g_signal_handler_block() call.  A
+ * blocked handler is skipped during signal emissions and will not be
+ * invoked, unblocking it (for exactly the amount of times it has been
+ * blocked before) reverts its "blocked" state, so the handler will be
+ * recognized by the signal system and is called upon future or
+ * currently ongoing signal emissions (since the order in which
+ * handlers are called during signal emissions is deterministic,
+ * whether the unblocked handler in question is called as part of a
+ * currently ongoing emission depends on how far that emission has
+ * proceeded yet).
+ *
+ * The @handler_id has to be a valid id of a signal handler that is
+ * connected to a signal of @instance and is currently blocked.
+ */
+
+
+/**
+ * g_signal_handlers_block_by_func:
+ * @instance: The instance to block handlers from.
+ * @func: The C closure callback of the handlers (useless for non-C closures).
+ * @data: The closure data of the handlers' closures.
+ *
+ * Blocks all handlers on an instance that match @func and @data.
+ *
+ * Returns: The number of handlers that matched.
+ */
+
+
+/**
+ * g_signal_handlers_block_matched:
+ * @instance: The instance to block handlers from.
+ * @mask: Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handlers have to match.
+ * @signal_id: Signal the handlers have to be connected to.
+ * @detail: Signal detail the handlers have to be connected to.
+ * @closure: (allow-none): The closure the handlers will invoke.
+ * @func: The C closure callback of the handlers (useless for non-C closures).
+ * @data: The closure data of the handlers' closures.
+ *
+ * Blocks all handlers on an instance that match a certain selection criteria.
+ * The criteria mask is passed as an OR-ed combination of #GSignalMatchType
+ * flags, and the criteria values are passed as arguments.
+ * Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC
+ * or %G_SIGNAL_MATCH_DATA match flags is required for successful matches.
+ * If no handlers were found, 0 is returned, the number of blocked handlers
+ * otherwise.
+ *
+ * Returns: The number of handlers that matched.
+ */
+
+
+/**
+ * g_signal_handlers_disconnect_by_data:
+ * @instance: The instance to remove handlers from
+ * @data: the closure data of the handlers' closures
+ *
+ * Disconnects all handlers on an instance that match @data.
+ *
+ * Returns: The number of handlers that matched.
+ * Since: 2.32
+ */
+
+
+/**
+ * g_signal_handlers_disconnect_by_func:
+ * @instance: The instance to remove handlers from.
+ * @func: The C closure callback of the handlers (useless for non-C closures).
+ * @data: The closure data of the handlers' closures.
+ *
+ * Disconnects all handlers on an instance that match @func and @data.
+ *
+ * Returns: The number of handlers that matched.
+ */
+
+
+/**
+ * g_signal_handlers_disconnect_matched:
+ * @instance: The instance to remove handlers from.
+ * @mask: Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handlers have to match.
+ * @signal_id: Signal the handlers have to be connected to.
+ * @detail: Signal detail the handlers have to be connected to.
+ * @closure: (allow-none): The closure the handlers will invoke.
+ * @func: The C closure callback of the handlers (useless for non-C closures).
+ * @data: The closure data of the handlers' closures.
+ *
+ * Disconnects all handlers on an instance that match a certain
+ * selection criteria. The criteria mask is passed as an OR-ed
+ * combination of #GSignalMatchType flags, and the criteria values are
+ * passed as arguments.  Passing at least one of the
+ * %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC or
+ * %G_SIGNAL_MATCH_DATA match flags is required for successful
+ * matches.  If no handlers were found, 0 is returned, the number of
+ * disconnected handlers otherwise.
+ *
+ * Returns: The number of handlers that matched.
+ */
+
+
+/**
+ * g_signal_handlers_unblock_by_func:
+ * @instance: The instance to unblock handlers from.
+ * @func: The C closure callback of the handlers (useless for non-C closures).
+ * @data: The closure data of the handlers' closures.
+ *
+ * Unblocks all handlers on an instance that match @func and @data.
+ *
+ * Returns: The number of handlers that matched.
+ */
+
+
+/**
+ * g_signal_handlers_unblock_matched:
+ * @instance: The instance to unblock handlers from.
+ * @mask: Mask indicating which of @signal_id, @detail, @closure, @func and/or @data the handlers have to match.
+ * @signal_id: Signal the handlers have to be connected to.
+ * @detail: Signal detail the handlers have to be connected to.
+ * @closure: (allow-none): The closure the handlers will invoke.
+ * @func: The C closure callback of the handlers (useless for non-C closures).
+ * @data: The closure data of the handlers' closures.
+ *
+ * Unblocks all handlers on an instance that match a certain selection
+ * criteria. The criteria mask is passed as an OR-ed combination of
+ * #GSignalMatchType flags, and the criteria values are passed as arguments.
+ * Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC
+ * or %G_SIGNAL_MATCH_DATA match flags is required for successful matches.
+ * If no handlers were found, 0 is returned, the number of unblocked handlers
+ * otherwise. The match criteria should not apply to any handlers that are
+ * not currently blocked.
+ *
+ * Returns: The number of handlers that matched.
+ */
+
+
+/**
+ * g_signal_has_handler_pending:
+ * @instance: the object whose signal handlers are sought.
+ * @signal_id: the signal id.
+ * @detail: the detail.
+ * @may_be_blocked: whether blocked handlers should count as match.
+ *
+ * Returns whether there are any handlers connected to @instance for the
+ * given signal id and detail.
+ *
+ * One example of when you might use this is when the arguments to the
+ * signal are difficult to compute. A class implementor may opt to not
+ * emit the signal if no one is attached anyway, thus saving the cost
+ * of building the arguments.
+ *
+ * otherwise.
+ *
+ * Returns: %TRUE if a handler is connected to the signal, %FALSE
+ */
+
+
+/**
+ * g_signal_list_ids:
+ * @itype: Instance or interface type.
+ * @n_ids: Location to store the number of signal ids for @itype.
+ *
+ * Lists the signals by id that a certain instance or interface type
+ * created. Further information about the signals can be acquired through
+ * g_signal_query().
+ *
+ * Returns: (array length=n_ids): Newly allocated array of signal IDs.
+ */
+
+
+/**
+ * g_signal_lookup:
+ * @name: the signal's name.
+ * @itype: the type that the signal operates on.
+ *
+ * Given the name of the signal and the type of object it connects to, gets
+ * the signal's identifying integer. Emitting the signal by number is
+ * somewhat faster than using the name each time.
+ *
+ * Also tries the ancestors of the given type.
+ *
+ * See g_signal_new() for details on allowed signal names.
+ *
+ * Returns: the signal's identifying number, or 0 if no signal was found.
+ */
+
+
+/**
+ * g_signal_name:
+ * @signal_id: the signal's identifying number.
+ *
+ * Given the signal's identifier, finds its name.
+ *
+ * Two different signals may have the same name, if they have differing types.
+ *
+ * Returns: the signal name, or %NULL if the signal number was invalid.
+ */
+
+
+/**
+ * g_signal_new:
+ * @signal_name: the name for the signal
+ * @itype: the type this signal pertains to. It will also pertain to types which are derived from this type.
+ * @signal_flags: a combination of #GSignalFlags specifying detail of when the default handler is to be invoked. You should at least specify %G_SIGNAL_RUN_FIRST or %G_SIGNAL_RUN_LAST.
+ * @class_offset: The offset of the function pointer in the class structure for this type. Used to invoke a class method generically. Pass 0 to not associate a class method slot with this signal.
+ * @accumulator: the accumulator for this signal; may be %NULL.
+ * @accu_data: user data for the @accumulator.
+ * @c_marshaller: (allow-none): the function to translate arrays of parameter values to signal emissions into C language callback invocations or %NULL.
+ * @return_type: the type of return value, or #G_TYPE_NONE for a signal without a return value.
+ * @n_params: the number of parameter types to follow.
+ * @...: a list of types, one for each parameter.
+ *
+ * Creates a new signal. (This is usually done in the class initializer.)
+ *
+ * A signal name consists of segments consisting of ASCII letters and
+ * digits, separated by either the '-' or '_' character. The first
+ * character of a signal name must be a letter. Names which violate these
+ * rules lead to undefined behaviour of the GSignal system.
+ *
+ * When registering a signal and looking up a signal, either separator can
+ * be used, but they cannot be mixed.
+ *
+ * If 0 is used for @class_offset subclasses cannot override the class handler
+ * in their <code>class_init</code> method by doing
+ * <code>super_class->signal_handler = my_signal_handler</code>. Instead they
+ * will have to use g_signal_override_class_handler().
+ *
+ * If c_marshaller is %NULL, g_cclosure_marshal_generic() will be used as
+ * the marshaller for this signal.
+ *
+ * Returns: the signal id
+ */
+
+
+/**
+ * g_signal_new_class_handler:
+ * @signal_name: the name for the signal
+ * @itype: the type this signal pertains to. It will also pertain to types which are derived from this type.
+ * @signal_flags: a combination of #GSignalFlags specifying detail of when the default handler is to be invoked. You should at least specify %G_SIGNAL_RUN_FIRST or %G_SIGNAL_RUN_LAST.
+ * @class_handler: a #GCallback which acts as class implementation of this signal. Used to invoke a class method generically. Pass %NULL to not associate a class method with this signal.
+ * @accumulator: the accumulator for this signal; may be %NULL.
+ * @accu_data: user data for the @accumulator.
+ * @c_marshaller: (allow-none): the function to translate arrays of parameter values to signal emissions into C language callback invocations or %NULL.
+ * @return_type: the type of return value, or #G_TYPE_NONE for a signal without a return value.
+ * @n_params: the number of parameter types to follow.
+ * @...: a list of types, one for each parameter.
+ *
+ * Creates a new signal. (This is usually done in the class initializer.)
+ *
+ * This is a variant of g_signal_new() that takes a C callback instead
+ * off a class offset for the signal's class handler. This function
+ * doesn't need a function pointer exposed in the class structure of
+ * an object definition, instead the function pointer is passed
+ * directly and can be overriden by derived classes with
+ * g_signal_override_class_closure() or
+ * g_signal_override_class_handler()and chained to with
+ * g_signal_chain_from_overridden() or
+ * g_signal_chain_from_overridden_handler().
+ *
+ * See g_signal_new() for information about signal names.
+ *
+ * If c_marshaller is %NULL @g_cclosure_marshal_generic will be used as
+ * the marshaller for this signal.
+ *
+ * Returns: the signal id
+ * Since: 2.18
+ */
+
+
+/**
+ * g_signal_new_valist:
+ * @signal_name: the name for the signal
+ * @itype: the type this signal pertains to. It will also pertain to types which are derived from this type.
+ * @signal_flags: a combination of #GSignalFlags specifying detail of when the default handler is to be invoked. You should at least specify %G_SIGNAL_RUN_FIRST or %G_SIGNAL_RUN_LAST.
+ * @class_closure: The closure to invoke on signal emission; may be %NULL.
+ * @accumulator: the accumulator for this signal; may be %NULL.
+ * @accu_data: user data for the @accumulator.
+ * @c_marshaller: (allow-none): the function to translate arrays of parameter values to signal emissions into C language callback invocations or %NULL.
+ * @return_type: the type of return value, or #G_TYPE_NONE for a signal without a return value.
+ * @n_params: the number of parameter types in @args.
+ * @args: va_list of #GType, one for each parameter.
+ *
+ * Creates a new signal. (This is usually done in the class initializer.)
+ *
+ * See g_signal_new() for details on allowed signal names.
+ *
+ * If c_marshaller is %NULL, g_cclosure_marshal_generic() will be used as
+ * the marshaller for this signal.
+ *
+ * Returns: the signal id
+ */
+
+
+/**
+ * g_signal_newv:
+ * @signal_name: the name for the signal
+ * @itype: the type this signal pertains to. It will also pertain to types which are derived from this type
+ * @signal_flags: a combination of #GSignalFlags specifying detail of when the default handler is to be invoked. You should at least specify %G_SIGNAL_RUN_FIRST or %G_SIGNAL_RUN_LAST
+ * @class_closure: (allow-none): The closure to invoke on signal emission; may be %NULL
+ * @accumulator: (allow-none): the accumulator for this signal; may be %NULL
+ * @accu_data: user data for the @accumulator
+ * @c_marshaller: (allow-none): the function to translate arrays of parameter values to signal emissions into C language callback invocations or %NULL
+ * @return_type: the type of return value, or #G_TYPE_NONE for a signal without a return value
+ * @n_params: the length of @param_types
+ * @param_types: (array length=n_params): an array of types, one for each parameter
+ *
+ * Creates a new signal. (This is usually done in the class initializer.)
+ *
+ * See g_signal_new() for details on allowed signal names.
+ *
+ * If c_marshaller is %NULL @g_cclosure_marshal_generic will be used as
+ * the marshaller for this signal.
+ *
+ * Returns: the signal id
+ */
+
+
+/**
+ * g_signal_override_class_closure:
+ * @signal_id: the signal id
+ * @instance_type: the instance type on which to override the class closure for the signal.
+ * @class_closure: the closure.
+ *
+ * Overrides the class closure (i.e. the default handler) for the given signal
+ * for emissions on instances of @instance_type. @instance_type must be derived
+ * from the type to which the signal belongs.
+ *
+ * See g_signal_chain_from_overridden() and
+ * g_signal_chain_from_overridden_handler() for how to chain up to the
+ * parent class closure from inside the overridden one.
+ */
+
+
+/**
+ * g_signal_override_class_handler:
+ * @signal_name: the name for the signal
+ * @instance_type: the instance type on which to override the class handler for the signal.
+ * @class_handler: the handler.
+ *
+ * Overrides the class closure (i.e. the default handler) for the
+ * given signal for emissions on instances of @instance_type with
+ * callabck @class_handler. @instance_type must be derived from the
+ * type to which the signal belongs.
+ *
+ * See g_signal_chain_from_overridden() and
+ * g_signal_chain_from_overridden_handler() for how to chain up to the
+ * parent class closure from inside the overridden one.
+ *
+ * Since: 2.18
+ */
+
+
+/**
+ * g_signal_parse_name:
+ * @detailed_signal: a string of the form "signal-name::detail".
+ * @itype: The interface/instance type that introduced "signal-name".
+ * @signal_id_p: (out): Location to store the signal id.
+ * @detail_p: (out): Location to store the detail quark.
+ * @force_detail_quark: %TRUE forces creation of a #GQuark for the detail.
+ *
+ * Internal function to parse a signal name into its @signal_id
+ * and @detail quark.
+ *
+ * Returns: Whether the signal name could successfully be parsed and @signal_id_p and @detail_p contain valid return values.
+ */
+
+
+/**
+ * g_signal_query:
+ * @signal_id: The signal id of the signal to query information for.
+ * @query: (out caller-allocates): A user provided structure that is filled in with constant values upon success.
+ *
+ * Queries the signal system for in-depth information about a
+ * specific signal. This function will fill in a user-provided
+ * structure to hold signal-specific information. If an invalid
+ * signal id is passed in, the @signal_id member of the #GSignalQuery
+ * is 0. All members filled into the #GSignalQuery structure should
+ * be considered constant and have to be left untouched.
+ */
+
+
+/**
+ * g_signal_remove_emission_hook:
+ * @signal_id: the id of the signal
+ * @hook_id: the id of the emission hook, as returned by g_signal_add_emission_hook()
+ *
+ * Deletes an emission hook.
+ */
+
+
+/**
+ * g_signal_stop_emission:
+ * @instance: the object whose signal handlers you wish to stop.
+ * @signal_id: the signal identifier, as returned by g_signal_lookup().
+ * @detail: the detail which the signal was emitted with.
+ *
+ * Stops a signal's current emission.
+ *
+ * This will prevent the default method from running, if the signal was
+ * %G_SIGNAL_RUN_LAST and you connected normally (i.e. without the "after"
+ * flag).
+ *
+ * Prints a warning if used on a signal which isn't being emitted.
+ */
+
+
+/**
+ * g_signal_stop_emission_by_name:
+ * @instance: the object whose signal handlers you wish to stop.
+ * @detailed_signal: a string of the form "signal-name::detail".
+ *
+ * Stops a signal's current emission.
+ *
+ * This is just like g_signal_stop_emission() except it will look up the
+ * signal id for you.
+ */
+
+
+/**
+ * g_signal_type_cclosure_new:
+ * @itype: the #GType identifier of an interface or classed type
+ * @struct_offset: the offset of the member function of @itype's class structure which is to be invoked by the new closure
+ *
+ * Creates a new closure which invokes the function found at the offset
+ * @struct_offset in the class structure of the interface or classed type
+ * identified by @itype.
+ *
+ * Returns: a new #GCClosure
+ */
+
+
+/**
+ * g_source_set_closure:
+ * @source: the source
+ * @closure: a #GClosure
+ *
+ * Set the callback for a source as a #GClosure.
+ *
+ * If the source is not one of the standard GLib types, the @closure_callback
+ * and @closure_marshal fields of the #GSourceFuncs structure must have been
+ * filled in with pointers to appropriate functions.
+ */
+
+
+/**
+ * g_source_set_dummy_callback:
+ * @source: the source
+ *
+ * Sets a dummy callback for @source. The callback will do nothing, and
+ * if the source expects a #gboolean return value, it will return %TRUE.
+ * (If the source expects any other type of return value, it will return
+ * a 0/%NULL value; whatever g_value_init() initializes a #GValue to for
+ * that type.)
+ *
+ * If the source is not one of the standard GLib types, the
+ * @closure_callback and @closure_marshal fields of the #GSourceFuncs
+ * structure must have been filled in with pointers to appropriate
+ * functions.
+ */
+
+
+/**
+ * g_strdup_value_contents:
+ * @value: #GValue which contents are to be described.
+ *
+ * Return a newly allocated string, which describes the contents of a
+ * #GValue.  The main purpose of this function is to describe #GValue
+ * contents for debugging output, the way in which the contents are
+ * described may change between different GLib versions.
+ *
+ * Returns: Newly allocated string.
+ */
+
+
+/**
+ * g_try_new:
+ * @struct_type: the type of the elements to allocate
+ * @n_structs: the number of elements to allocate
+ *
+ * Attempts to allocate @n_structs elements of type @struct_type, and returns
+ * %NULL on failure. Contrast with g_new(), which aborts the program on failure.
+ * The returned pointer is cast to a pointer to the given type.
+ * The function returns %NULL when @n_structs is 0 of if an overflow occurs.
+ *
+ * Since: 2.8
+ * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
+ */
+
+
+/**
+ * g_try_new0:
+ * @struct_type: the type of the elements to allocate
+ * @n_structs: the number of elements to allocate
+ *
+ * Attempts to allocate @n_structs elements of type @struct_type, initialized
+ * to 0's, and returns %NULL on failure. Contrast with g_new0(), which aborts
+ * the program on failure.
+ * The returned pointer is cast to a pointer to the given type.
+ * The function returns %NULL when @n_structs is 0 of if an overflow occurs.
+ *
+ * Since: 2.8
+ * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
+ */
+
+
+/**
+ * g_try_renew:
+ * @struct_type: the type of the elements to allocate
+ * @mem: the currently allocated memory
+ * @n_structs: the number of elements to allocate
+ *
+ * Attempts to reallocate the memory pointed to by @mem, so that it now has
+ * space for @n_structs elements of type @struct_type, and returns %NULL on
+ * failure. Contrast with g_renew(), which aborts the program on failure.
+ * It returns the new address of the memory, which may have been moved.
+ * The function returns %NULL if an overflow occurs.
+ *
+ * Since: 2.8
+ * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
+ */
+
+
+/**
+ * g_type_add_class_cache_func: (skip)
+ * @cache_data: data to be passed to @cache_func
+ * @cache_func: a #GTypeClassCacheFunc
+ *
+ * Adds a #GTypeClassCacheFunc to be called before the reference count of a
+ * class goes from one to zero. This can be used to prevent premature class
+ * destruction. All installed #GTypeClassCacheFunc functions will be chained
+ * until one of them returns %TRUE. The functions have to check the class id
+ * passed in to figure whether they actually want to cache the class of this
+ * type, since all classes are routed through the same #GTypeClassCacheFunc
+ * chain.
+ */
+
+
+/**
+ * g_type_add_class_private:
+ * @class_type: GType of an classed type.
+ * @private_size: size of private structure.
+ *
+ * Registers a private class structure for a classed type;
+ * when the class is allocated, the private structures for
+ * the class and all of its parent types are allocated
+ * sequentially in the same memory block as the public
+ * structures. This function should be called in the
+ * type's get_type() function after the type is registered.
+ * The private structure can be retrieved using the
+ * G_TYPE_CLASS_GET_PRIVATE() macro.
+ *
+ * Since: 2.24
+ */
+
+
+/**
+ * g_type_add_interface_check: (skip)
+ * @check_data: data to pass to @check_func
+ * @check_func: function to be called after each interface is initialized.
+ *
+ * Adds a function to be called after an interface vtable is
+ * initialized for any class (i.e. after the @interface_init member of
+ * #GInterfaceInfo has been called).
+ *
+ * This function is useful when you want to check an invariant that
+ * depends on the interfaces of a class. For instance, the
+ * implementation of #GObject uses this facility to check that an
+ * object implements all of the properties that are defined on its
+ * interfaces.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_type_add_interface_dynamic:
+ * @instance_type: the #GType value of an instantiable type.
+ * @interface_type: the #GType value of an interface type.
+ * @plugin: the #GTypePlugin structure to retrieve the #GInterfaceInfo from.
+ *
+ * Adds the dynamic @interface_type to @instantiable_type. The information
+ * contained in the #GTypePlugin structure pointed to by @plugin
+ * is used to manage the relationship.
+ */
+
+
+/**
+ * g_type_add_interface_static:
+ * @instance_type: #GType value of an instantiable type.
+ * @interface_type: #GType value of an interface type.
+ * @info: The #GInterfaceInfo structure for this (@instance_type, @interface_type) combination.
+ *
+ * Adds the static @interface_type to @instantiable_type.  The
+ * information contained in the #GInterfaceInfo structure pointed to by
+ * @info is used to manage the relationship.
+ */
+
+
+/**
+ * g_type_check_instance:
+ * @instance: A valid #GTypeInstance structure.
+ * @Returns: #TRUE if @instance is valid, #FALSE otherwise.
+ *
+ * Private helper function to aid implementation of the G_TYPE_CHECK_INSTANCE()
+ * macro.
+ */
+
+
+/**
+ * g_type_children:
+ * @type: The parent type.
+ * @n_children: (out) (allow-none): Optional #guint pointer to contain the number of child types.
+ *
+ * Return a newly allocated and 0-terminated array of type IDs, listing the
+ * child types of @type. The return value has to be g_free()ed after use.
+ *
+ * and 0-terminated array of child types.
+ *
+ * Returns: (array length=n_children) (transfer full): Newly allocated
+ */
+
+
+/**
+ * g_type_class_add_private:
+ * @g_class: class structure for an instantiatable type
+ * @private_size: size of private structure.
+ *
+ * Registers a private structure for an instantiatable type.
+ *
+ * When an object is allocated, the private structures for
+ * the type and all of its parent types are allocated
+ * sequentially in the same memory block as the public
+ * structures.
+ *
+ * Note that the accumulated size of the private structures of
+ * a type and all its parent types cannot excced 64 KiB.
+ *
+ * This function should be called in the type's class_init() function.
+ * The private structure can be retrieved using the
+ * G_TYPE_INSTANCE_GET_PRIVATE() macro.
+ *
+ * The following example shows attaching a private structure
+ * <structname>MyObjectPrivate</structname> to an object
+ * <structname>MyObject</structname> defined in the standard GObject
+ * fashion.
+ * type's class_init() function.
+ * Note the use of a structure member "priv" to avoid the overhead
+ * of repeatedly calling MY_OBJECT_GET_PRIVATE().
+ *
+ * |[
+ * typedef struct _MyObject        MyObject;
+ * typedef struct _MyObjectPrivate MyObjectPrivate;
+ *
+ * struct _MyObject {
+ * GObject parent;
+ *
+ * MyObjectPrivate *priv;
+ * };
+ *
+ * struct _MyObjectPrivate {
+ * int some_field;
+ * };
+ *
+ * static void
+ * my_object_class_init (MyObjectClass *klass)
+ * {
+ * g_type_class_add_private (klass, sizeof (MyObjectPrivate));
+ * }
+ *
+ * static void
+ * my_object_init (MyObject *my_object)
+ * {
+ * my_object->priv = G_TYPE_INSTANCE_GET_PRIVATE (my_object,
+ * MY_TYPE_OBJECT,
+ * MyObjectPrivate);
+ * }
+ *
+ * static int
+ * my_object_get_some_field (MyObject *my_object)
+ * {
+ * MyObjectPrivate *priv;
+ *
+ * g_return_val_if_fail (MY_IS_OBJECT (my_object), 0);
+ *
+ * priv = my_object->priv;
+ *
+ * return priv->some_field;
+ * }
+ * ]|
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_type_class_peek:
+ * @type: Type ID of a classed type.
+ *
+ * This function is essentially the same as g_type_class_ref(), except that
+ * the classes reference count isn't incremented. As a consequence, this function
+ * may return %NULL if the class of the type passed in does not currently
+ * exist (hasn't been referenced before).
+ *
+ * structure for the given type ID or %NULL if the class does not
+ * currently exist.
+ *
+ * Returns: (type GObject.TypeClass) (transfer none): The #GTypeClass
+ */
+
+
+/**
+ * g_type_class_peek_parent:
+ * @g_class: (type GObject.TypeClass): The #GTypeClass structure to retrieve the parent class for.
+ *
+ * This is a convenience function often needed in class initializers.
+ * It returns the class structure of the immediate parent type of the
+ * class passed in.  Since derived classes hold a reference count on
+ * their parent classes as long as they are instantiated, the returned
+ * class will always exist. This function is essentially equivalent
+ * to:
+ *
+ * <programlisting>
+ * g_type_class_peek (g_type_parent (G_TYPE_FROM_CLASS (g_class)));
+ * </programlisting>
+ *
+ * of @g_class.
+ *
+ * Returns: (type GObject.TypeClass) (transfer none): The parent class
+ */
+
+
+/**
+ * g_type_class_peek_static:
+ * @type: Type ID of a classed type.
+ *
+ * A more efficient version of g_type_class_peek() which works only for
+ * static types.
+ *
+ * structure for the given type ID or %NULL if the class does not
+ * currently exist or is dynamically loaded.
+ *
+ * Since: 2.4
+ * Returns: (type GObject.TypeClass) (transfer none): The #GTypeClass
+ */
+
+
+/**
+ * g_type_class_ref:
+ * @type: Type ID of a classed type.
+ *
+ * Increments the reference count of the class structure belonging to
+ * @type. This function will demand-create the class if it doesn't
+ * exist already.
+ *
+ * structure for the given type ID.
+ *
+ * Returns: (type GObject.TypeClass) (transfer none): The #GTypeClass
+ */
+
+
+/**
+ * g_type_class_unref:
+ * @g_class: (type GObject.TypeClass): The #GTypeClass structure to unreference.
+ *
+ * Decrements the reference count of the class structure being passed in.
+ * Once the last reference count of a class has been released, classes
+ * may be finalized by the type system, so further dereferencing of a
+ * class pointer after g_type_class_unref() are invalid.
+ */
+
+
+/**
+ * g_type_class_unref_uncached: (skip)
+ * @g_class: (type GObject.TypeClass): The #GTypeClass structure to unreference.
+ *
+ * A variant of g_type_class_unref() for use in #GTypeClassCacheFunc
+ * implementations. It unreferences a class without consulting the chain
+ * of #GTypeClassCacheFunc<!-- -->s, avoiding the recursion which would occur
+ * otherwise.
+ */
+
+
+/**
+ * g_type_create_instance: (skip)
+ * @type: An instantiatable type to create an instance for.
+ *
+ * Creates and initializes an instance of @type if @type is valid and
+ * can be instantiated. The type system only performs basic allocation
+ * and structure setups for instances: actual instance creation should
+ * happen through functions supplied by the type's fundamental type
+ * implementation.  So use of g_type_create_instance() is reserved for
+ * implementators of fundamental types only. E.g. instances of the
+ * #GObject hierarchy should be created via g_object_new() and
+ * <emphasis>never</emphasis> directly through
+ * g_type_create_instance() which doesn't handle things like singleton
+ * objects or object construction.  Note: Do <emphasis>not</emphasis>
+ * use this function, unless you're implementing a fundamental
+ * type. Also language bindings should <emphasis>not</emphasis> use
+ * this function but g_object_new() instead.
+ *
+ * treatment by the fundamental type implementation.
+ *
+ * Returns: An allocated and initialized instance, subject to further
+ */
+
+
+/**
+ * g_type_default_interface_peek:
+ * @g_type: an interface type
+ *
+ * If the interface type @g_type is currently in use, returns its
+ * default interface vtable.
+ *
+ *
+ * vtable for the interface, or %NULL if the type is not currently in
+ * use.
+ *
+ * Since: 2.4
+ * Returns: (type GObject.TypeInterface) (transfer none): the default
+ */
+
+
+/**
+ * g_type_default_interface_ref:
+ * @g_type: an interface type
+ *
+ * Increments the reference count for the interface type @g_type,
+ * and returns the default interface vtable for the type.
+ *
+ * If the type is not currently in use, then the default vtable
+ * for the type will be created and initalized by calling
+ * the base interface init and default vtable init functions for
+ * the type (the @<structfield>base_init</structfield>
+ * and <structfield>class_init</structfield> members of #GTypeInfo).
+ * Calling g_type_default_interface_ref() is useful when you
+ * want to make sure that signals and properties for an interface
+ * have been installed.
+ *
+ *
+ * vtable for the interface; call g_type_default_interface_unref()
+ * when you are done using the interface.
+ *
+ * Since: 2.4
+ * Returns: (type GObject.TypeInterface) (transfer none): the default
+ */
+
+
+/**
+ * g_type_default_interface_unref:
+ * @g_iface: (type GObject.TypeInterface): the default vtable structure for a interface, as returned by g_type_default_interface_ref()
+ *
+ * Decrements the reference count for the type corresponding to the
+ * interface default vtable @g_iface. If the type is dynamic, then
+ * when no one is using the interface and all references have
+ * been released, the finalize function for the interface's default
+ * vtable (the <structfield>class_finalize</structfield> member of
+ * #GTypeInfo) will be called.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_type_depth:
+ * @type: A #GType value.
+ *
+ * Returns the length of the ancestry of the passed in type. This
+ * includes the type itself, so that e.g. a fundamental type has depth 1.
+ *
+ * Returns: The depth of @type.
+ */
+
+
+/**
+ * g_type_free_instance:
+ * @instance: an instance of a type.
+ *
+ * Frees an instance of a type, returning it to the instance pool for
+ * the type, if there is one.
+ *
+ * Like g_type_create_instance(), this function is reserved for
+ * implementors of fundamental types.
+ */
+
+
+/**
+ * g_type_from_name:
+ * @name: Type name to lookup.
+ *
+ * Lookup the type ID from a given type name, returning 0 if no type
+ * has been registered under this name (this is the preferred method
+ * to find out by name whether a specific type has been registered
+ * yet).
+ *
+ * Returns: Corresponding type ID or 0.
+ */
+
+
+/**
+ * g_type_fundamental:
+ * @type_id: valid type ID
+ *
+ * Internal function, used to extract the fundamental type ID portion.
+ * use G_TYPE_FUNDAMENTAL() instead.
+ *
+ * Returns: fundamental type ID
+ */
+
+
+/**
+ * g_type_fundamental_next:
+ *
+ * Returns the next free fundamental type id which can be used to
+ * register a new fundamental type with g_type_register_fundamental().
+ * The returned type ID represents the highest currently registered
+ * fundamental type identifier.
+ *
+ * or 0 if the type system ran out of fundamental type IDs.
+ *
+ * Returns: The nextmost fundamental type ID to be registered,
+ */
+
+
+/**
+ * g_type_get_plugin:
+ * @type: The #GType to retrieve the plugin for.
+ *
+ * Returns the #GTypePlugin structure for @type or
+ * %NULL if @type does not have a #GTypePlugin structure.
+ *
+ * dynamic type, %NULL otherwise.
+ *
+ * Returns: (transfer none): The corresponding plugin if @type is a
+ */
+
+
+/**
+ * g_type_get_qdata:
+ * @type: a #GType
+ * @quark: a #GQuark id to identify the data
+ *
+ * Obtains data which has previously been attached to @type
+ * with g_type_set_qdata().
+ *
+ * Note that this does not take subtyping into account; data
+ * attached to one type with g_type_set_qdata() cannot
+ * be retrieved from a subtype using g_type_get_qdata().
+ *
+ * Returns: (transfer none): the data, or %NULL if no data was found
+ */
+
+
+/**
+ * g_type_init:
+ *
+ * Prior to any use of the type system, g_type_init() has to be called
+ * to initialize the type system and assorted other code portions
+ * (such as the various fundamental type implementations or the signal
+ * system).
+ *
+ * This function is idempotent.
+ *
+ * Since version 2.24 this also initializes the thread system
+ */
+
+
+/**
+ * g_type_init_with_debug_flags:
+ * @debug_flags: Bitwise combination of #GTypeDebugFlags values for debugging purposes.
+ *
+ * Similar to g_type_init(), but additionally sets debug flags.
+ *
+ * This function is idempotent.
+ */
+
+
+/**
+ * g_type_interface_add_prerequisite:
+ * @interface_type: #GType value of an interface type.
+ * @prerequisite_type: #GType value of an interface or instantiatable type.
+ *
+ * Adds @prerequisite_type to the list of prerequisites of @interface_type.
+ * This means that any type implementing @interface_type must also implement
+ * @prerequisite_type. Prerequisites can be thought of as an alternative to
+ * interface derivation (which GType doesn't support). An interface can have
+ * at most one instantiatable prerequisite type.
+ */
+
+
+/**
+ * g_type_interface_get_plugin:
+ * @instance_type: the #GType value of an instantiatable type.
+ * @interface_type: the #GType value of an interface type.
+ *
+ * Returns the #GTypePlugin structure for the dynamic interface
+ * @interface_type which has been added to @instance_type, or %NULL if
+ * @interface_type has not been added to @instance_type or does not
+ * have a #GTypePlugin structure. See g_type_add_interface_dynamic().
+ *
+ * interface @interface_type of @instance_type.
+ *
+ * Returns: (transfer none): the #GTypePlugin for the dynamic
+ */
+
+
+/**
+ * g_type_interface_peek:
+ * @instance_class: (type GObject.TypeClass): A #GTypeClass structure.
+ * @iface_type: An interface ID which this class conforms to.
+ *
+ * Returns the #GTypeInterface structure of an interface to which the
+ * passed in class conforms.
+ *
+ * structure of iface_type if implemented by @instance_class, %NULL
+ * otherwise
+ *
+ * Returns: (type GObject.TypeInterface) (transfer none): The GTypeInterface
+ */
+
+
+/**
+ * g_type_interface_peek_parent:
+ * @g_iface: (type GObject.TypeInterface): A #GTypeInterface structure.
+ *
+ * Returns the corresponding #GTypeInterface structure of the parent type
+ * of the instance type to which @g_iface belongs. This is useful when
+ * deriving the implementation of an interface from the parent type and
+ * then possibly overriding some methods.
+ *
+ * corresponding #GTypeInterface structure of the parent type of the
+ * instance type to which @g_iface belongs, or %NULL if the parent
+ * type doesn't conform to the interface.
+ *
+ * Returns: (transfer none) (type GObject.TypeInterface): The
+ */
+
+
+/**
+ * g_type_interface_prerequisites:
+ * @interface_type: an interface type
+ * @n_prerequisites: (out) (allow-none): location to return the number of prerequisites, or %NULL
+ *
+ * Returns the prerequisites of an interfaces type.
+ *
+ *
+ * newly-allocated zero-terminated array of #GType containing
+ * the prerequisites of @interface_type
+ *
+ * Since: 2.2
+ * Returns: (array length=n_prerequisites) (transfer full): a
+ */
+
+
+/**
+ * g_type_interfaces:
+ * @type: The type to list interface types for.
+ * @n_interfaces: (out) (allow-none): Optional #guint pointer to contain the number of interface types.
+ *
+ * Return a newly allocated and 0-terminated array of type IDs, listing the
+ * interface types that @type conforms to. The return value has to be
+ * g_free()ed after use.
+ *
+ * allocated and 0-terminated array of interface types.
+ *
+ * Returns: (array length=n_interfaces) (transfer full): Newly
+ */
+
+
+/**
+ * g_type_is_a:
+ * @type: Type to check anchestry for.
+ * @is_a_type: Possible anchestor of @type or interface @type could conform to.
+ *
+ * If @is_a_type is a derivable type, check whether @type is a
+ * descendant of @is_a_type.  If @is_a_type is an interface, check
+ * whether @type conforms to it.
+ *
+ * Returns: %TRUE if @type is_a @is_a_type holds true.
+ */
+
+
+/**
+ * g_type_module_add_interface:
+ * @module: a #GTypeModule
+ * @instance_type: type to which to add the interface.
+ * @interface_type: interface type to add
+ * @interface_info: type information structure
+ *
+ * Registers an additional interface for a type, whose interface lives
+ * in the given type plugin. If the interface was already registered
+ * for the type in this plugin, nothing will be done.
+ *
+ * As long as any instances of the type exist, the type plugin will
+ * not be unloaded.
+ */
+
+
+/**
+ * g_type_module_register_enum:
+ * @module: a #GTypeModule
+ * @name: name for the type
+ * @const_static_values: an array of #GEnumValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0.
+ *
+ * Looks up or registers an enumeration that is implemented with a particular
+ * type plugin. If a type with name @type_name was previously registered,
+ * the #GType identifier for the type is returned, otherwise the type
+ * is newly registered, and the resulting #GType identifier returned.
+ *
+ * As long as any instances of the type exist, the type plugin will
+ * not be unloaded.
+ *
+ * Since: 2.6
+ * Returns: the new or existing type ID
+ */
+
+
+/**
+ * g_type_module_register_flags:
+ * @module: a #GTypeModule
+ * @name: name for the type
+ * @const_static_values: an array of #GFlagsValue structs for the possible flags values. The array is terminated by a struct with all members being 0.
+ *
+ * Looks up or registers a flags type that is implemented with a particular
+ * type plugin. If a type with name @type_name was previously registered,
+ * the #GType identifier for the type is returned, otherwise the type
+ * is newly registered, and the resulting #GType identifier returned.
+ *
+ * As long as any instances of the type exist, the type plugin will
+ * not be unloaded.
+ *
+ * Since: 2.6
+ * Returns: the new or existing type ID
+ */
+
+
+/**
+ * g_type_module_register_type:
+ * @module: a #GTypeModule
+ * @parent_type: the type for the parent class
+ * @type_name: name for the type
+ * @type_info: type information structure
+ * @flags: flags field providing details about the type
+ *
+ * Looks up or registers a type that is implemented with a particular
+ * type plugin. If a type with name @type_name was previously registered,
+ * the #GType identifier for the type is returned, otherwise the type
+ * is newly registered, and the resulting #GType identifier returned.
+ *
+ * When reregistering a type (typically because a module is unloaded
+ * then reloaded, and reinitialized), @module and @parent_type must
+ * be the same as they were previously.
+ *
+ * As long as any instances of the type exist, the type plugin will
+ * not be unloaded.
+ *
+ * Returns: the new or existing type ID
+ */
+
+
+/**
+ * g_type_module_set_name:
+ * @module: a #GTypeModule.
+ * @name: a human-readable name to use in error messages.
+ *
+ * Sets the name for a #GTypeModule
+ */
+
+
+/**
+ * g_type_module_unuse:
+ * @module: a #GTypeModule
+ *
+ * Decreases the use count of a #GTypeModule by one. If the
+ * result is zero, the module will be unloaded. (However, the
+ * #GTypeModule will not be freed, and types associated with the
+ * #GTypeModule are not unregistered. Once a #GTypeModule is
+ * initialized, it must exist forever.)
+ */
+
+
+/**
+ * g_type_module_use:
+ * @module: a #GTypeModule
+ *
+ * Increases the use count of a #GTypeModule by one. If the
+ * use count was zero before, the plugin will be loaded.
+ * If loading the plugin fails, the use count is reset to
+ * its prior value.
+ *
+ * loading the plugin failed.
+ *
+ * Returns: %FALSE if the plugin needed to be loaded and
+ */
+
+
+/**
+ * g_type_name:
+ * @type: Type to return name for.
+ *
+ * Get the unique name that is assigned to a type ID.  Note that this
+ * function (like all other GType API) cannot cope with invalid type
+ * IDs. %G_TYPE_INVALID may be passed to this function, as may be any
+ * other validly registered type ID, but randomized type IDs should
+ * not be passed in and will most likely lead to a crash.
+ *
+ * Returns: Static type name or %NULL.
+ */
+
+
+/**
+ * g_type_next_base:
+ * @leaf_type: Descendant of @root_type and the type to be returned.
+ * @root_type: Immediate parent of the returned type.
+ *
+ * Given a @leaf_type and a @root_type which is contained in its
+ * anchestry, return the type that @root_type is the immediate parent
+ * of.  In other words, this function determines the type that is
+ * derived directly from @root_type which is also a base class of
+ * @leaf_type.  Given a root type and a leaf type, this function can
+ * be used to determine the types and order in which the leaf type is
+ * descended from the root type.
+ *
+ * Returns: Immediate child of @root_type and anchestor of @leaf_type.
+ */
+
+
+/**
+ * g_type_parent:
+ * @type: The derived type.
+ *
+ * Return the direct parent type of the passed in type.  If the passed
+ * in type has no parent, i.e. is a fundamental type, 0 is returned.
+ *
+ * Returns: The parent type.
+ */
+
+
+/**
+ * g_type_plugin_complete_interface_info:
+ * @plugin: the #GTypePlugin
+ * @instance_type: the #GType of an instantiable type to which the interface is added
+ * @interface_type: the #GType of the interface whose info is completed
+ * @info: the #GInterfaceInfo to fill in
+ *
+ * Calls the @complete_interface_info function from the
+ * #GTypePluginClass of @plugin. There should be no need to use this
+ * function outside of the GObject type system itself.
+ */
+
+
+/**
+ * g_type_plugin_complete_type_info:
+ * @plugin: a #GTypePlugin
+ * @g_type: the #GType whose info is completed
+ * @info: the #GTypeInfo struct to fill in
+ * @value_table: the #GTypeValueTable to fill in
+ *
+ * Calls the @complete_type_info function from the #GTypePluginClass of @plugin.
+ * There should be no need to use this function outside of the GObject
+ * type system itself.
+ */
+
+
+/**
+ * g_type_plugin_unuse:
+ * @plugin: a #GTypePlugin
+ *
+ * Calls the @unuse_plugin function from the #GTypePluginClass of
+ * @plugin.  There should be no need to use this function outside of
+ * the GObject type system itself.
+ */
+
+
+/**
+ * g_type_plugin_use:
+ * @plugin: a #GTypePlugin
+ *
+ * Calls the @use_plugin function from the #GTypePluginClass of
+ * @plugin.  There should be no need to use this function outside of
+ * the GObject type system itself.
+ */
+
+
+/**
+ * g_type_qname:
+ * @type: Type to return quark of type name for.
+ *
+ * Get the corresponding quark of the type IDs name.
+ *
+ * Returns: The type names quark or 0.
+ */
+
+
+/**
+ * g_type_query:
+ * @type: the #GType value of a static, classed type.
+ * @query: (out caller-allocates): A user provided structure that is filled in with constant values upon success.
+ *
+ * Queries the type system for information about a specific type.
+ * This function will fill in a user-provided structure to hold
+ * type-specific information. If an invalid #GType is passed in, the
+ * @type member of the #GTypeQuery is 0. All members filled into the
+ * #GTypeQuery structure should be considered constant and have to be
+ * left untouched.
+ */
+
+
+/**
+ * g_type_register_dynamic:
+ * @parent_type: Type from which this type will be derived.
+ * @type_name: 0-terminated string used as the name of the new type.
+ * @plugin: The #GTypePlugin structure to retrieve the #GTypeInfo from.
+ * @flags: Bitwise combination of #GTypeFlags values.
+ *
+ * Registers @type_name as the name of a new dynamic type derived from
+ * @parent_type.  The type system uses the information contained in the
+ * #GTypePlugin structure pointed to by @plugin to manage the type and its
+ * instances (if not abstract).  The value of @flags determines the nature
+ * (e.g. abstract or not) of the type.
+ *
+ * Returns: The new type identifier or #G_TYPE_INVALID if registration failed.
+ */
+
+
+/**
+ * g_type_register_fundamental:
+ * @type_id: A predefined type identifier.
+ * @type_name: 0-terminated string used as the name of the new type.
+ * @info: The #GTypeInfo structure for this type.
+ * @finfo: The #GTypeFundamentalInfo structure for this type.
+ * @flags: Bitwise combination of #GTypeFlags values.
+ *
+ * Registers @type_id as the predefined identifier and @type_name as the
+ * name of a fundamental type. If @type_id is already registered, or a type
+ * named @type_name is already registered, the behaviour is undefined. The type
+ * system uses the information contained in the #GTypeInfo structure pointed to
+ * by @info and the #GTypeFundamentalInfo structure pointed to by @finfo to
+ * manage the type and its instances. The value of @flags determines additional
+ * characteristics of the fundamental type.
+ *
+ * Returns: The predefined type identifier.
+ */
+
+
+/**
+ * g_type_register_static:
+ * @parent_type: Type from which this type will be derived.
+ * @type_name: 0-terminated string used as the name of the new type.
+ * @info: The #GTypeInfo structure for this type.
+ * @flags: Bitwise combination of #GTypeFlags values.
+ *
+ * Registers @type_name as the name of a new static type derived from
+ * @parent_type.  The type system uses the information contained in the
+ * #GTypeInfo structure pointed to by @info to manage the type and its
+ * instances (if not abstract).  The value of @flags determines the nature
+ * (e.g. abstract or not) of the type.
+ *
+ * Returns: The new type identifier.
+ */
+
+
+/**
+ * g_type_register_static_simple: (skip)
+ * @parent_type: Type from which this type will be derived.
+ * @type_name: 0-terminated string used as the name of the new type.
+ * @class_size: Size of the class structure (see #GTypeInfo)
+ * @class_init: Location of the class initialization function (see #GTypeInfo)
+ * @instance_size: Size of the instance structure (see #GTypeInfo)
+ * @instance_init: Location of the instance initialization function (see #GTypeInfo)
+ * @flags: Bitwise combination of #GTypeFlags values.
+ *
+ * Registers @type_name as the name of a new static type derived from
+ * @parent_type.  The value of @flags determines the nature (e.g.
+ * abstract or not) of the type. It works by filling a #GTypeInfo
+ * struct and calling g_type_register_static().
+ *
+ * Since: 2.12
+ * Returns: The new type identifier.
+ */
+
+
+/**
+ * g_type_remove_class_cache_func: (skip)
+ * @cache_data: data that was given when adding @cache_func
+ * @cache_func: a #GTypeClassCacheFunc
+ *
+ * Removes a previously installed #GTypeClassCacheFunc. The cache
+ * maintained by @cache_func has to be empty when calling
+ * g_type_remove_class_cache_func() to avoid leaks.
+ */
+
+
+/**
+ * g_type_remove_interface_check: (skip)
+ * @check_data: callback data passed to g_type_add_interface_check()
+ * @check_func: callback function passed to g_type_add_interface_check()
+ *
+ * Removes an interface check function added with
+ * g_type_add_interface_check().
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_type_set_qdata:
+ * @type: a #GType
+ * @quark: a #GQuark id to identify the data
+ * @data: the data
+ *
+ * Attaches arbitrary data to a type.
+ */
+
+
+/**
+ * g_type_value_table_peek: (skip)
+ * @type: A #GType value.
+ *
+ * Returns the location of the #GTypeValueTable associated with @type.
+ * <emphasis>Note that this function should only be used from source code
+ * that implements or has internal knowledge of the implementation of
+ * @type.</emphasis>
+ *
+ * %NULL if there is no #GTypeValueTable associated with @type.
+ *
+ * Returns: Location of the #GTypeValueTable associated with @type or
+ */
+
+
+/**
+ * g_utf8_next_char:
+ * @p: Pointer to the start of a valid UTF-8 character
+ *
+ * Skips to the next character in a UTF-8 string. The string must be
+ * valid; this macro is as fast as possible, and has no error-checking.
+ * You would use this macro to iterate over a string character by
+ * character. The macro returns the start of the next UTF-8 character.
+ * Before using this macro, use g_utf8_validate() to validate strings
+ * that may contain invalid UTF-8.
+ */
+
+
+/**
+ * g_value_array_append:
+ * @value_array: #GValueArray to add an element to
+ * @value: (allow-none): #GValue to copy into #GValueArray, or %NULL
+ *
+ * Insert a copy of @value as last element of @value_array. If @value is
+ * %NULL, an uninitialized value is appended.
+ *
+ * Returns: (transfer none): the #GValueArray passed in as @value_array
+ * Deprecated: 2.32: Use #GArray and g_array_append_val() instead.
+ */
+
+
+/**
+ * g_value_array_copy:
+ * @value_array: #GValueArray to copy
+ *
+ * Construct an exact copy of a #GValueArray by duplicating all its
+ * contents.
+ *
+ * Returns: (transfer full): Newly allocated copy of #GValueArray
+ * Deprecated: 2.32: Use #GArray and g_array_ref() instead.
+ */
+
+
+/**
+ * g_value_array_free:
+ * @value_array: #GValueArray to free
+ *
+ * Free a #GValueArray including its contents.
+ *
+ * Deprecated: 2.32: Use #GArray and g_array_unref() instead.
+ */
+
+
+/**
+ * g_value_array_get_nth:
+ * @value_array: #GValueArray to get a value from
+ * @index_: index of the value of interest
+ *
+ * Return a pointer to the value at @index_ containd in @value_array.
+ *
+ * Returns: (transfer none): pointer to a value at @index_ in @value_array
+ * Deprecated: 2.32: Use g_array_index() instead.
+ */
+
+
+/**
+ * g_value_array_insert:
+ * @value_array: #GValueArray to add an element to
+ * @index_: insertion position, must be &lt;= value_array-&gt;n_values
+ * @value: (allow-none): #GValue to copy into #GValueArray, or %NULL
+ *
+ * Insert a copy of @value at specified position into @value_array. If @value
+ * is %NULL, an uninitialized value is inserted.
+ *
+ * Returns: (transfer none): the #GValueArray passed in as @value_array
+ * Deprecated: 2.32: Use #GArray and g_array_insert_val() instead.
+ */
+
+
+/**
+ * g_value_array_new:
+ * @n_prealloced: number of values to preallocate space for
+ *
+ * Allocate and initialize a new #GValueArray, optionally preserve space
+ * for @n_prealloced elements. New arrays always contain 0 elements,
+ * regardless of the value of @n_prealloced.
+ *
+ * Returns: a newly allocated #GValueArray with 0 values
+ * Deprecated: 2.32: Use #GArray and g_array_sized_new() instead.
+ */
+
+
+/**
+ * g_value_array_prepend:
+ * @value_array: #GValueArray to add an element to
+ * @value: (allow-none): #GValue to copy into #GValueArray, or %NULL
+ *
+ * Insert a copy of @value as first element of @value_array. If @value is
+ * %NULL, an uninitialized value is prepended.
+ *
+ * Returns: (transfer none): the #GValueArray passed in as @value_array
+ * Deprecated: 2.32: Use #GArray and g_array_prepend_val() instead.
+ */
+
+
+/**
+ * g_value_array_remove:
+ * @value_array: #GValueArray to remove an element from
+ * @index_: position of value to remove, which must be less than <code>value_array-><link linkend="GValueArray.n-values">n_values</link></code>
+ *
+ * Remove the value at position @index_ from @value_array.
+ *
+ * Returns: (transfer none): the #GValueArray passed in as @value_array
+ * Deprecated: 2.32: Use #GArray and g_array_remove_index() instead.
+ */
+
+
+/**
+ * g_value_array_sort:
+ * @value_array: #GValueArray to sort
+ * @compare_func: (scope call): function to compare elements
+ *
+ * Sort @value_array using @compare_func to compare the elements according to
+ * the semantics of #GCompareFunc.
+ *
+ * The current implementation uses Quick-Sort as sorting algorithm.
+ *
+ * Returns: (transfer none): the #GValueArray passed in as @value_array
+ * Deprecated: 2.32: Use #GArray and g_array_sort().
+ */
+
+
+/**
+ * g_value_array_sort_with_data:
+ * @value_array: #GValueArray to sort
+ * @compare_func: (scope call): function to compare elements
+ * @user_data: (closure): extra data argument provided for @compare_func
+ *
+ * Sort @value_array using @compare_func to compare the elements according
+ * to the semantics of #GCompareDataFunc.
+ *
+ * The current implementation uses Quick-Sort as sorting algorithm.
+ *
+ * Rename to: g_value_array_sort
+ * Returns: (transfer none): the #GValueArray passed in as @value_array
+ * Deprecated: 2.32: Use #GArray and g_array_sort_with_data().
+ */
+
+
+/**
+ * g_value_copy:
+ * @src_value: An initialized #GValue structure.
+ * @dest_value: An initialized #GValue structure of the same type as @src_value.
+ *
+ * Copies the value of @src_value into @dest_value.
+ */
+
+
+/**
+ * g_value_dup_boxed: (skip)
+ * @value: a valid #GValue of %G_TYPE_BOXED derived type
+ *
+ * Get the contents of a %G_TYPE_BOXED derived #GValue.  Upon getting,
+ * the boxed value is duplicated and needs to be later freed with
+ * g_boxed_free(), e.g. like: g_boxed_free (G_VALUE_TYPE (@value),
+ * return_value);
+ *
+ * Returns: boxed contents of @value
+ */
+
+
+/**
+ * g_value_dup_object:
+ * @value: a valid #GValue whose type is derived from %G_TYPE_OBJECT
+ *
+ * Get the contents of a %G_TYPE_OBJECT derived #GValue, increasing
+ * its reference count. If the contents of the #GValue are %NULL, then
+ * %NULL will be returned.
+ *
+ * should be unreferenced when no longer needed.
+ *
+ * Returns: (type GObject.Object) (transfer full): object content of @value,
+ */
+
+
+/**
+ * g_value_dup_param: (skip)
+ * @value: a valid #GValue whose type is derived from %G_TYPE_PARAM
+ *
+ * Get the contents of a %G_TYPE_PARAM #GValue, increasing its
+ * reference count.
+ *
+ * no longer needed.
+ *
+ * Returns: #GParamSpec content of @value, should be unreferenced when
+ */
+
+
+/**
+ * g_value_dup_string:
+ * @value: a valid #GValue of type %G_TYPE_STRING
+ *
+ * Get a copy the contents of a %G_TYPE_STRING #GValue.
+ *
+ * Returns: a newly allocated copy of the string content of @value
+ */
+
+
+/**
+ * g_value_dup_variant:
+ * @value: a valid #GValue of type %G_TYPE_VARIANT
+ *
+ * Get the contents of a variant #GValue, increasing its refcount.
+ *
+ * g_variant_unref() when no longer needed
+ *
+ * Returns: variant contents of @value, should be unrefed using
+ * Since: 2.26
+ */
+
+
+/**
+ * g_value_fits_pointer:
+ * @value: An initialized #GValue structure.
+ *
+ * Determines if @value will fit inside the size of a pointer value.
+ * This is an internal function introduced mainly for C marshallers.
+ *
+ * Returns: %TRUE if @value will fit inside a pointer value.
+ */
+
+
+/**
+ * g_value_get_boolean:
+ * @value: a valid #GValue of type %G_TYPE_BOOLEAN
+ *
+ * Get the contents of a %G_TYPE_BOOLEAN #GValue.
+ *
+ * Returns: boolean contents of @value
+ */
+
+
+/**
+ * g_value_get_boxed:
+ * @value: a valid #GValue of %G_TYPE_BOXED derived type
+ *
+ * Get the contents of a %G_TYPE_BOXED derived #GValue.
+ *
+ * Returns: (transfer none): boxed contents of @value
+ */
+
+
+/**
+ * g_value_get_char:
+ * @value: a valid #GValue of type %G_TYPE_CHAR
+ *
+ * Do not use this function; it is broken on platforms where the %char
+ * type is unsigned, such as ARM and PowerPC.  See g_value_get_schar().
+ *
+ * Get the contents of a %G_TYPE_CHAR #GValue.
+ *
+ * Returns: character contents of @value
+ * Deprecated: 2.32: This function's return type is broken, see g_value_get_schar()
+ */
+
+
+/**
+ * g_value_get_double:
+ * @value: a valid #GValue of type %G_TYPE_DOUBLE
+ *
+ * Get the contents of a %G_TYPE_DOUBLE #GValue.
+ *
+ * Returns: double contents of @value
+ */
+
+
+/**
+ * g_value_get_enum:
+ * @value: a valid #GValue whose type is derived from %G_TYPE_ENUM
+ *
+ * Get the contents of a %G_TYPE_ENUM #GValue.
+ *
+ * Returns: enum contents of @value
+ */
+
+
+/**
+ * g_value_get_flags:
+ * @value: a valid #GValue whose type is derived from %G_TYPE_FLAGS
+ *
+ * Get the contents of a %G_TYPE_FLAGS #GValue.
+ *
+ * Returns: flags contents of @value
+ */
+
+
+/**
+ * g_value_get_float:
+ * @value: a valid #GValue of type %G_TYPE_FLOAT
+ *
+ * Get the contents of a %G_TYPE_FLOAT #GValue.
+ *
+ * Returns: float contents of @value
+ */
+
+
+/**
+ * g_value_get_gtype:
+ * @value: a valid #GValue of type %G_TYPE_GTYPE
+ *
+ * Get the contents of a %G_TYPE_GTYPE #GValue.
+ *
+ * Since: 2.12
+ * Returns: the #GType stored in @value
+ */
+
+
+/**
+ * g_value_get_int:
+ * @value: a valid #GValue of type %G_TYPE_INT
+ *
+ * Get the contents of a %G_TYPE_INT #GValue.
+ *
+ * Returns: integer contents of @value
+ */
+
+
+/**
+ * g_value_get_int64:
+ * @value: a valid #GValue of type %G_TYPE_INT64
+ *
+ * Get the contents of a %G_TYPE_INT64 #GValue.
+ *
+ * Returns: 64bit integer contents of @value
+ */
+
+
+/**
+ * g_value_get_long:
+ * @value: a valid #GValue of type %G_TYPE_LONG
+ *
+ * Get the contents of a %G_TYPE_LONG #GValue.
+ *
+ * Returns: long integer contents of @value
+ */
+
+
+/**
+ * g_value_get_object:
+ * @value: a valid #GValue of %G_TYPE_OBJECT derived type
+ *
+ * Get the contents of a %G_TYPE_OBJECT derived #GValue.
+ *
+ * Returns: (type GObject.Object) (transfer none): object contents of @value
+ */
+
+
+/**
+ * g_value_get_param:
+ * @value: a valid #GValue whose type is derived from %G_TYPE_PARAM
+ *
+ * Get the contents of a %G_TYPE_PARAM #GValue.
+ *
+ * Returns: (transfer none): #GParamSpec content of @value
+ */
+
+
+/**
+ * g_value_get_pointer:
+ * @value: a valid #GValue of %G_TYPE_POINTER
+ *
+ * Get the contents of a pointer #GValue.
+ *
+ * Returns: (transfer none): pointer contents of @value
+ */
+
+
+/**
+ * g_value_get_schar:
+ * @value: a valid #GValue of type %G_TYPE_CHAR
+ *
+ * Get the contents of a %G_TYPE_CHAR #GValue.
+ *
+ * Returns: signed 8 bit integer contents of @value
+ * Since: 2.32
+ */
+
+
+/**
+ * g_value_get_string:
+ * @value: a valid #GValue of type %G_TYPE_STRING
+ *
+ * Get the contents of a %G_TYPE_STRING #GValue.
+ *
+ * Returns: string content of @value
+ */
+
+
+/**
+ * g_value_get_uchar:
+ * @value: a valid #GValue of type %G_TYPE_UCHAR
+ *
+ * Get the contents of a %G_TYPE_UCHAR #GValue.
+ *
+ * Returns: unsigned character contents of @value
+ */
+
+
+/**
+ * g_value_get_uint:
+ * @value: a valid #GValue of type %G_TYPE_UINT
+ *
+ * Get the contents of a %G_TYPE_UINT #GValue.
+ *
+ * Returns: unsigned integer contents of @value
+ */
+
+
+/**
+ * g_value_get_uint64:
+ * @value: a valid #GValue of type %G_TYPE_UINT64
+ *
+ * Get the contents of a %G_TYPE_UINT64 #GValue.
+ *
+ * Returns: unsigned 64bit integer contents of @value
+ */
+
+
+/**
+ * g_value_get_ulong:
+ * @value: a valid #GValue of type %G_TYPE_ULONG
+ *
+ * Get the contents of a %G_TYPE_ULONG #GValue.
+ *
+ * Returns: unsigned long integer contents of @value
+ */
+
+
+/**
+ * g_value_get_variant:
+ * @value: a valid #GValue of type %G_TYPE_VARIANT
+ *
+ * Get the contents of a variant #GValue.
+ *
+ * Returns: variant contents of @value
+ * Since: 2.26
+ */
+
+
+/**
+ * g_value_init:
+ * @value: A zero-filled (uninitialized) #GValue structure.
+ * @g_type: Type the #GValue should hold values of.
+ *
+ * Initializes @value with the default value of @type.
+ *
+ * Returns: (transfer none): the #GValue structure that has been passed in
+ */
+
+
+/**
+ * g_value_peek_pointer:
+ * @value: An initialized #GValue structure.
+ *
+ * function asserts that g_value_fits_pointer() returned %TRUE for the
+ * passed in value.  This is an internal function introduced mainly
+ * for C marshallers.
+ *
+ * Returns: (transfer none): the value contents as pointer. This
+ */
+
+
+/**
+ * g_value_register_transform_func: (skip)
+ * @src_type: Source type.
+ * @dest_type: Target type.
+ * @transform_func: a function which transforms values of type @src_type into value of type @dest_type
+ *
+ * Registers a value transformation function for use in g_value_transform().
+ * A previously registered transformation function for @src_type and @dest_type
+ * will be replaced.
+ */
+
+
+/**
+ * g_value_reset:
+ * @value: An initialized #GValue structure.
+ *
+ * Clears the current value in @value and resets it to the default value
+ * (as if the value had just been initialized).
+ *
+ * Returns: the #GValue structure that has been passed in
+ */
+
+
+/**
+ * g_value_set_boolean:
+ * @value: a valid #GValue of type %G_TYPE_BOOLEAN
+ * @v_boolean: boolean value to be set
+ *
+ * Set the contents of a %G_TYPE_BOOLEAN #GValue to @v_boolean.
+ */
+
+
+/**
+ * g_value_set_boxed:
+ * @value: a valid #GValue of %G_TYPE_BOXED derived type
+ * @v_boxed: (allow-none): boxed value to be set
+ *
+ * Set the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed.
+ */
+
+
+/**
+ * g_value_set_boxed_take_ownership:
+ * @value: a valid #GValue of %G_TYPE_BOXED derived type
+ * @v_boxed: (allow-none): duplicated unowned boxed value to be set
+ *
+ * This is an internal function introduced mainly for C marshallers.
+ *
+ * Deprecated: 2.4: Use g_value_take_boxed() instead.
+ */
+
+
+/**
+ * g_value_set_char:
+ * @value: a valid #GValue of type %G_TYPE_CHAR
+ * @v_char: character value to be set
+ *
+ * Set the contents of a %G_TYPE_CHAR #GValue to @v_char.
+ *
+ * Deprecated: 2.32: This function's input type is broken, see g_value_set_schar()
+ */
+
+
+/**
+ * g_value_set_double:
+ * @value: a valid #GValue of type %G_TYPE_DOUBLE
+ * @v_double: double value to be set
+ *
+ * Set the contents of a %G_TYPE_DOUBLE #GValue to @v_double.
+ */
+
+
+/**
+ * g_value_set_enum:
+ * @value: a valid #GValue whose type is derived from %G_TYPE_ENUM
+ * @v_enum: enum value to be set
+ *
+ * Set the contents of a %G_TYPE_ENUM #GValue to @v_enum.
+ */
+
+
+/**
+ * g_value_set_flags:
+ * @value: a valid #GValue whose type is derived from %G_TYPE_FLAGS
+ * @v_flags: flags value to be set
+ *
+ * Set the contents of a %G_TYPE_FLAGS #GValue to @v_flags.
+ */
+
+
+/**
+ * g_value_set_float:
+ * @value: a valid #GValue of type %G_TYPE_FLOAT
+ * @v_float: float value to be set
+ *
+ * Set the contents of a %G_TYPE_FLOAT #GValue to @v_float.
+ */
+
+
+/**
+ * g_value_set_gtype:
+ * @value: a valid #GValue of type %G_TYPE_GTYPE
+ * @v_gtype: #GType to be set
+ *
+ * Set the contents of a %G_TYPE_GTYPE #GValue to @v_gtype.
+ *
+ * Since: 2.12
+ */
+
+
+/**
+ * g_value_set_instance:
+ * @value: An initialized #GValue structure.
+ * @instance: (allow-none): the instance
+ *
+ * Sets @value from an instantiatable type via the
+ * value_table's collect_value() function.
+ */
+
+
+/**
+ * g_value_set_int:
+ * @value: a valid #GValue of type %G_TYPE_INT
+ * @v_int: integer value to be set
+ *
+ * Set the contents of a %G_TYPE_INT #GValue to @v_int.
+ */
+
+
+/**
+ * g_value_set_int64:
+ * @value: a valid #GValue of type %G_TYPE_INT64
+ * @v_int64: 64bit integer value to be set
+ *
+ * Set the contents of a %G_TYPE_INT64 #GValue to @v_int64.
+ */
+
+
+/**
+ * g_value_set_long:
+ * @value: a valid #GValue of type %G_TYPE_LONG
+ * @v_long: long integer value to be set
+ *
+ * Set the contents of a %G_TYPE_LONG #GValue to @v_long.
+ */
+
+
+/**
+ * g_value_set_object:
+ * @value: a valid #GValue of %G_TYPE_OBJECT derived type
+ * @v_object: (type GObject.Object) (allow-none): object value to be set
+ *
+ * Set the contents of a %G_TYPE_OBJECT derived #GValue to @v_object.
+ *
+ * g_value_set_object() increases the reference count of @v_object
+ * (the #GValue holds a reference to @v_object).  If you do not wish
+ * to increase the reference count of the object (i.e. you wish to
+ * pass your current reference to the #GValue because you no longer
+ * need it), use g_value_take_object() instead.
+ *
+ * It is important that your #GValue holds a reference to @v_object (either its
+ * own, or one it has taken) to ensure that the object won't be destroyed while
+ * the #GValue still exists).
+ */
+
+
+/**
+ * g_value_set_object_take_ownership: (skip)
+ * @value: a valid #GValue of %G_TYPE_OBJECT derived type
+ * @v_object: (allow-none): object value to be set
+ *
+ * This is an internal function introduced mainly for C marshallers.
+ *
+ * Deprecated: 2.4: Use g_value_take_object() instead.
+ */
+
+
+/**
+ * g_value_set_param:
+ * @value: a valid #GValue of type %G_TYPE_PARAM
+ * @param: (allow-none): the #GParamSpec to be set
+ *
+ * Set the contents of a %G_TYPE_PARAM #GValue to @param.
+ */
+
+
+/**
+ * g_value_set_param_take_ownership: (skip)
+ * @value: a valid #GValue of type %G_TYPE_PARAM
+ * @param: (allow-none): the #GParamSpec to be set
+ *
+ * This is an internal function introduced mainly for C marshallers.
+ *
+ * Deprecated: 2.4: Use g_value_take_param() instead.
+ */
+
+
+/**
+ * g_value_set_pointer:
+ * @value: a valid #GValue of %G_TYPE_POINTER
+ * @v_pointer: pointer value to be set
+ *
+ * Set the contents of a pointer #GValue to @v_pointer.
+ */
+
+
+/**
+ * g_value_set_schar:
+ * @value: a valid #GValue of type %G_TYPE_CHAR
+ * @v_char: signed 8 bit integer to be set
+ *
+ * Set the contents of a %G_TYPE_CHAR #GValue to @v_char.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_value_set_static_boxed:
+ * @value: a valid #GValue of %G_TYPE_BOXED derived type
+ * @v_boxed: (allow-none): static boxed value to be set
+ *
+ * Set the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed.
+ * The boxed value is assumed to be static, and is thus not duplicated
+ * when setting the #GValue.
+ */
+
+
+/**
+ * g_value_set_static_string:
+ * @value: a valid #GValue of type %G_TYPE_STRING
+ * @v_string: (allow-none): static string to be set
+ *
+ * Set the contents of a %G_TYPE_STRING #GValue to @v_string.
+ * The string is assumed to be static, and is thus not duplicated
+ * when setting the #GValue.
+ */
+
+
+/**
+ * g_value_set_string:
+ * @value: a valid #GValue of type %G_TYPE_STRING
+ * @v_string: (allow-none): caller-owned string to be duplicated for the #GValue
+ *
+ * Set the contents of a %G_TYPE_STRING #GValue to @v_string.
+ */
+
+
+/**
+ * g_value_set_string_take_ownership:
+ * @value: a valid #GValue of type %G_TYPE_STRING
+ * @v_string: (allow-none): duplicated unowned string to be set
+ *
+ * This is an internal function introduced mainly for C marshallers.
+ *
+ * Deprecated: 2.4: Use g_value_take_string() instead.
+ */
+
+
+/**
+ * g_value_set_uchar:
+ * @value: a valid #GValue of type %G_TYPE_UCHAR
+ * @v_uchar: unsigned character value to be set
+ *
+ * Set the contents of a %G_TYPE_UCHAR #GValue to @v_uchar.
+ */
+
+
+/**
+ * g_value_set_uint:
+ * @value: a valid #GValue of type %G_TYPE_UINT
+ * @v_uint: unsigned integer value to be set
+ *
+ * Set the contents of a %G_TYPE_UINT #GValue to @v_uint.
+ */
+
+
+/**
+ * g_value_set_uint64:
+ * @value: a valid #GValue of type %G_TYPE_UINT64
+ * @v_uint64: unsigned 64bit integer value to be set
+ *
+ * Set the contents of a %G_TYPE_UINT64 #GValue to @v_uint64.
+ */
+
+
+/**
+ * g_value_set_ulong:
+ * @value: a valid #GValue of type %G_TYPE_ULONG
+ * @v_ulong: unsigned long integer value to be set
+ *
+ * Set the contents of a %G_TYPE_ULONG #GValue to @v_ulong.
+ */
+
+
+/**
+ * g_value_set_variant:
+ * @value: a valid #GValue of type %G_TYPE_VARIANT
+ * @variant: (allow-none): a #GVariant, or %NULL
+ *
+ * Set the contents of a variant #GValue to @variant.
+ * If the variant is floating, it is consumed.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_value_take_boxed:
+ * @value: a valid #GValue of %G_TYPE_BOXED derived type
+ * @v_boxed: (allow-none): duplicated unowned boxed value to be set
+ *
+ * Sets the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed
+ * and takes over the ownership of the callers reference to @v_boxed;
+ * the caller doesn't have to unref it any more.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_value_take_object: (skip)
+ * @value: a valid #GValue of %G_TYPE_OBJECT derived type
+ * @v_object: (allow-none): object value to be set
+ *
+ * Sets the contents of a %G_TYPE_OBJECT derived #GValue to @v_object
+ * and takes over the ownership of the callers reference to @v_object;
+ * the caller doesn't have to unref it any more (i.e. the reference
+ * count of the object is not increased).
+ *
+ * If you want the #GValue to hold its own reference to @v_object, use
+ * g_value_set_object() instead.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_value_take_param: (skip)
+ * @value: a valid #GValue of type %G_TYPE_PARAM
+ * @param: (allow-none): the #GParamSpec to be set
+ *
+ * Sets the contents of a %G_TYPE_PARAM #GValue to @param and takes
+ * over the ownership of the callers reference to @param; the caller
+ * doesn't have to unref it any more.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_value_take_string:
+ * @value: a valid #GValue of type %G_TYPE_STRING
+ * @v_string: (allow-none): string to take ownership of
+ *
+ * Sets the contents of a %G_TYPE_STRING #GValue to @v_string.
+ *
+ * Since: 2.4
+ */
+
+
+/**
+ * g_value_take_variant:
+ * @value: a valid #GValue of type %G_TYPE_VARIANT
+ * @variant: (allow-none): a #GVariant, or %NULL
+ *
+ * Set the contents of a variant #GValue to @variant, and takes over
+ * the ownership of the caller's reference to @variant;
+ * the caller doesn't have to unref it any more (i.e. the reference
+ * count of the variant is not increased).
+ *
+ * If @variant was floating then its floating reference is converted to
+ * a hard reference.
+ *
+ * If you want the #GValue to hold its own reference to @variant, use
+ * g_value_set_variant() instead.
+ *
+ * This is an internal function introduced mainly for C marshallers.
+ *
+ * Since: 2.26
+ */
+
+
+/**
+ * g_value_transform:
+ * @src_value: Source value.
+ * @dest_value: Target value.
+ *
+ * Tries to cast the contents of @src_value into a type appropriate
+ * to store in @dest_value, e.g. to transform a %G_TYPE_INT value
+ * into a %G_TYPE_FLOAT value. Performing transformations between
+ * value types might incur precision lossage. Especially
+ * transformations into strings might reveal seemingly arbitrary
+ * results and shouldn't be relied upon for production code (such
+ * as rcfile value or object property serialization).
+ *
+ * Upon failing transformations, @dest_value is left untouched.
+ *
+ * Returns: Whether a transformation rule was found and could be applied.
+ */
+
+
+/**
+ * g_value_type_compatible:
+ * @src_type: source type to be copied.
+ * @dest_type: destination type for copying.
+ *
+ * Returns whether a #GValue of type @src_type can be copied into
+ * a #GValue of type @dest_type.
+ *
+ * Returns: %TRUE if g_value_copy() is possible with @src_type and @dest_type.
+ */
+
+
+/**
+ * g_value_type_transformable:
+ * @src_type: Source type.
+ * @dest_type: Target type.
+ *
+ * Check whether g_value_transform() is able to transform values
+ * of type @src_type into values of type @dest_type.
+ *
+ * Returns: %TRUE if the transformation is possible, %FALSE otherwise.
+ */
+
+
+/**
+ * g_value_unset:
+ * @value: An initialized #GValue structure.
+ *
+ * Clears the current value in @value and "unsets" the type,
+ * this releases all resources associated with this GValue.
+ * An unset value is the same as an uninitialized (zero-filled)
+ * #GValue structure.
+ */
+
+
+/**
+ * g_variant_get_gtype:
+ *
+ *
+ *
+ * Since: 2.24
+ * Deprecated: 2.26
+ */
+
+
+/**
+ * g_warn_if_fail:
+ * @expr: the expression to check
+ *
+ * Logs a warning if the expression is not true.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_warn_if_reached:
+ *
+ * Logs a critical warning.
+ *
+ * Since: 2.16
+ */
+
+
+/**
+ * g_weak_ref_clear: (skip)
+ * @weak_ref: (inout): location of a weak reference, which may be empty
+ *
+ * Frees resources associated with a non-statically-allocated #GWeakRef.
+ * After this call, the #GWeakRef is left in an undefined state.
+ *
+ * You should only call this on a #GWeakRef that previously had
+ * g_weak_ref_init() called on it.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_weak_ref_get: (skip)
+ * @weak_ref: (inout): location of a weak reference to a #GObject
+ *
+ * If @weak_ref is not empty, atomically acquire a strong
+ * reference to the object it points to, and return that reference.
+ *
+ * This function is needed because of the potential race between taking
+ * the pointer value and g_object_ref() on it, if the object was losing
+ * its last reference at the same time in a different thread.
+ *
+ * The caller should release the resulting reference in the usual way,
+ * by using g_object_unref().
+ *
+ * by @weak_ref, or %NULL if it was empty
+ *
+ * Returns: (transfer full) (type GObject.Object): the object pointed to
+ * Since: 2.32
+ */
+
+
+/**
+ * g_weak_ref_init: (skip)
+ * @weak_ref: (inout): uninitialized or empty location for a weak reference
+ * @object: (allow-none): a #GObject or %NULL
+ *
+ * Initialise a non-statically-allocated #GWeakRef.
+ *
+ * This function also calls g_weak_ref_set() with @object on the
+ * freshly-initialised weak reference.
+ *
+ * This function should always be matched with a call to
+ * g_weak_ref_clear().  It is not necessary to use this function for a
+ * #GWeakRef in static storage because it will already be
+ * properly initialised.  Just use g_weak_ref_set() directly.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * g_weak_ref_set: (skip)
+ * @weak_ref: location for a weak reference
+ * @object: (allow-none): a #GObject or %NULL
+ *
+ * Change the object to which @weak_ref points, or set it to
+ * %NULL.
+ *
+ * You must own a strong reference on @object while calling this
+ * function.
+ *
+ * Since: 2.32
+ */
+
+
+/**
+ * gchararray:
+ *
+ * A C representable type name for #G_TYPE_STRING.
+ */
+
+
+/**
+ * gunichar:
+ *
+ * A type which can hold any UTF-32 or UCS-4 character code,
+ * also known as a Unicode code point.
+ *
+ * If you want to produce the UTF-8 representation of a #gunichar,
+ * use g_ucs4_to_utf8(). See also g_utf8_to_ucs4() for the reverse
+ * process.
+ *
+ * To print/scan values of this type as integer, use
+ * %G_GINT32_MODIFIER and/or %G_GUINT32_FORMAT.
+ *
+ * The notation to express a Unicode code point in running text is
+ * as a hexadecimal number with four to six digits and uppercase
+ * letters, prefixed by the string "U+". Leading zeros are omitted,
+ * unless the code point would have fewer than four hexadecimal digits.
+ * For example, "U+0041 LATIN CAPITAL LETTER A". To print a code point
+ * in the U+-notation, use the format string "U+\%04"G_GINT32_FORMAT"X".
+ * To scan, use the format string "U+\%06"G_GINT32_FORMAT"X".
+ *
+ * |[
+ * gunichar c;
+ * sscanf ("U+0041", "U+%06"G_GINT32_FORMAT"X", &amp;c)
+ * g_print ("Read U+%04"G_GINT32_FORMAT"X", c);
+ * ]|
+ */
+
+
+/**
+ * gunichar2:
+ *
+ * A type which can hold any UTF-16 code
+ * point<footnote id="utf16_surrogate_pairs">UTF-16 also has so called
+ * <firstterm>surrogate pairs</firstterm> to encode characters beyond
+ * the BMP as pairs of 16bit numbers. Surrogate pairs cannot be stored
+ * in a single gunichar2 field, but all GLib functions accepting gunichar2
+ * arrays will correctly interpret surrogate pairs.</footnote>.
+ *
+ * To print/scan values of this type to/from text you need to convert
+ * to/from UTF-8, using g_utf16_to_utf8()/g_utf8_to_utf16().
+ *
+ * To print/scan values of this type as integer, use
+ * %G_GINT16_MODIFIER and/or %G_GUINT16_FORMAT.
+ */
+
+
+
+/************************************************************/
+/* THIS FILE IS GENERATED DO NOT EDIT */
+/************************************************************/
diff --git a/gir/libxml2-2.0.gir b/gir/libxml2-2.0.gir
new file mode 100644 (file)
index 0000000..c0eb51f
--- /dev/null
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<repository version="1.2"
+            xmlns="http://www.gtk.org/introspection/core/1.0"
+            xmlns:c="http://www.gtk.org/introspection/c/1.0">
+  <package name="libxml-2.0"/>
+  <namespace name="libxml2" version="2.0"
+            c:identifier-prefixes="xml"
+            c:symbol-prefixes="xml">
+    <record name="Node" c:type="xmlNode"/>
+    <record name="NodePtr" c:type="xmlNodePtr"/>
+    <record name="Doc" c:type="xmlDoc"/>
+    <record name="DocPtr" c:type="xmlDocPtr"/>
+    <record name="NsPtr" c:type="xmlNsPtr"/>
+    <record name="Char" c:type="xmlChar"/>
+    <record name="TextWriter" c:type="xmlTextWriterPtr"/>
+    <record name="TextReader" c:type="xmlTextReaderPtr"/>
+    <function name="dummy" c:identifier="dummy">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+      </parameters>
+    </function>
+  </namespace>
+</repository>
diff --git a/gir/xfixes-4.0.gir b/gir/xfixes-4.0.gir
new file mode 100644 (file)
index 0000000..2ffe968
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<repository version="1.2"
+            xmlns="http://www.gtk.org/introspection/core/1.0"
+            xmlns:c="http://www.gtk.org/introspection/c/1.0">
+  <namespace name="xfixes" version="4.0"
+            c:identifier-prefixes="X"
+            c:symbol-prefixes="X">
+    <record name="XserverRegion" c:type="XserverRegion"/>
+  </namespace>
+</repository>
diff --git a/gir/xft-2.0.gir b/gir/xft-2.0.gir
new file mode 100644 (file)
index 0000000..83e1e84
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<repository version="1.2"
+            xmlns="http://www.gtk.org/introspection/core/1.0"
+            xmlns:c="http://www.gtk.org/introspection/c/1.0">
+  <include name="xlib" version="2.0"/>
+  <namespace name="xft" version="2.0"
+            c:identifier-prefixes="Xft"
+            c:symbol-prefixes="Xft">
+    <record name="Color" c:type="XftColor"/>
+    <record name="Draw" c:type="XftDraw"/>
+    <record name="Font" c:type="XftFont"/>
+    <record name="GlyphSpec" c:type="XftGlyphSpec"/>
+
+    <function name="init" c:identifier="XftInit">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+      </parameters>
+    </function>
+
+  </namespace>
+</repository>
diff --git a/gir/xlib-2.0.gir b/gir/xlib-2.0.gir
new file mode 100644 (file)
index 0000000..eaaba02
--- /dev/null
@@ -0,0 +1,67 @@
+<?xml version="1.0"?>
+<repository version="1.2"
+            xmlns="http://www.gtk.org/introspection/core/1.0"
+            xmlns:c="http://www.gtk.org/introspection/c/1.0">
+  <namespace name="xlib" version="2.0"
+            c:identifier-prefixes=""
+            c:symbol-prefixes="X">
+    <alias name="Atom" c:type="Atom">
+      <type name="gulong" c:type="gulong"/>
+    </alias>
+    <alias name="Colormap" c:type="Colormap">
+      <type name="gulong" c:type="gulong"/>
+    </alias>
+    <alias name="Cursor" c:type="Cursor">
+      <type name="gulong" c:type="gulong"/>
+    </alias>
+    <record name="Display" c:type="Display"/>
+    <alias name="Drawable" c:type="Drawable">
+      <type name="gulong" c:type="gulong"/>
+    </alias>
+    <alias name="GC" c:type="GC">
+      <type name="gpointer" c:type="gpointer"/>
+    </alias>
+    <alias name="KeyCode" c:type="KeyCode">
+      <type name="guint8" c:type="guint8"/>
+    </alias>
+    <alias name="KeySym" c:type="KeySym">
+      <type name="gulong" c:type="gulong"/>
+    </alias>
+    <alias name="Picture" c:type="Picture">
+      <type name="gulong" c:type="gulong"/>
+    </alias>
+    <record name="Screen" c:type="Screen"/>
+    <alias name="Time" c:type="Time">
+      <type name="gulong" c:type="gulong"/>
+    </alias>
+    <record name="Visual" c:type="Visual"/>
+    <alias name="VisualID" c:type="VisualID">
+      <type name="gulong" c:type="gulong"/>
+    </alias>
+    <alias name="Window" c:type="Window">
+      <type name="gulong" c:type="gulong"/>
+    </alias>
+    <union name="XEvent" c:type="XEvent"/>
+    <record name="XConfigureEvent" c:type="XConfigureEvent"/>
+    <alias name="XID" c:type="XID">
+      <type name="gulong" c:type="gulong"/>
+    </alias>
+    <alias name="Pixmap" c:type="Pixmap">
+      <type name="gulong" c:type="gulong"/>
+    </alias>
+    <record name="XImage" c:type="XImage"/>
+    <record name="XFontStruct" c:type="XFontStruct"/>
+    <record name="XTrapezoid" c:type="XTrapezoid"/>
+    <record name="XVisualInfo" c:type="XVisualInfo"/>
+    <record name="XWindowAttributes" c:type="XWindowAttributes"/>
+
+    <function name="open_display" c:identifier="XOpenDisplay">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+      </parameters>
+    </function>
+
+  </namespace>
+</repository>
diff --git a/gir/xrandr-1.3.gir b/gir/xrandr-1.3.gir
new file mode 100644 (file)
index 0000000..2e62e98
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<repository version="1.2"
+            xmlns="http://www.gtk.org/introspection/core/1.0"
+            xmlns:c="http://www.gtk.org/introspection/c/1.0">
+  <namespace name="xrandr" version="1.3"
+            c:identifier-prefixes="XRR"
+            c:symbol-prefixes="XRR">
+    <record name="ScreenSize" c:type="XRRScreenSize"/>
+    <record name="ScreenChangeNotifyEvent" c:type="XRRScreenChangeNotifyEvent"/>
+    <record name="NotifyEvent" c:type="XRRNotifyEvent"/>
+    <record name="ScreenResources" c:type="XRRScreenResources"/>
+    <record name="OutputChangeNotifyEvent" c:type="XRROutputChangeNotifyEvent"/>
+    <record name="CrtcChangeNotifyEvent" c:type="XRRCrtcChangeNotifyEvent"/>
+    <record name="OutputPropertyNotifyEvent" c:type="XRROutputPropertyNotifyEvent"/>
+  </namespace>
+</repository>
diff --git a/girepository/cmph-bdz-test.c b/girepository/cmph-bdz-test.c
new file mode 100644 (file)
index 0000000..fdff9d1
--- /dev/null
@@ -0,0 +1,141 @@
+/* GObject introspection: Test cmph hashing
+ *
+ * Copyright (C) 2010 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#include <glib-object.h>
+#include "cmph.h"
+
+static cmph_t *
+build (void)
+{
+  cmph_config_t *config;
+  cmph_io_adapter_t *io;
+  char **strings;
+  cmph_t *c;
+  guint32 size;
+
+  strings = g_strsplit ("foo,bar,baz", ",", -1);
+
+  io = cmph_io_vector_adapter (strings, g_strv_length (strings));
+  config = cmph_config_new (io);
+  cmph_config_set_algo (config, CMPH_BDZ);
+
+  c = cmph_new (config);
+  size = cmph_size (c);
+  g_assert (size == g_strv_length (strings));
+
+  return c;
+}
+
+static void
+assert_hashes_unique (guint    n_hashes,
+                     guint32* hashes)
+{
+  guint i;
+
+  for (i = 0; i < n_hashes; i++)
+    {
+      guint j = 0;
+      for (j = 0; j < n_hashes; j++)
+       {
+         if (j != i)
+           g_assert (hashes[i] != hashes[j]);
+       }
+    }
+}
+
+static void
+test_search (void)
+{
+  cmph_t *c = build();
+  guint i;
+  guint32 hash;
+  guint32 hashes[3];
+  guint32 size;
+
+  size = cmph_size (c);
+
+  i = 0;
+  hash = cmph_search (c, "foo", 3);
+  g_assert (hash >= 0 && hash < size);
+  hashes[i++] = hash;
+
+  hash = cmph_search (c, "bar", 3);
+  g_assert (hash >= 0 && hash < size);
+  hashes[i++] = hash;
+
+  hash = cmph_search (c, "baz", 3);
+  g_assert (hash >= 0 && hash < size);
+  hashes[i++] = hash;
+
+  assert_hashes_unique (G_N_ELEMENTS (hashes), &hashes[0]);
+}
+
+static void
+test_search_packed (void)
+{
+  cmph_t *c = build();
+  guint32 bufsize;
+  guint i;
+  guint32 hash;
+  guint32 hashes[3];
+  guint32 size;
+  guint8 *buf;
+
+  bufsize = cmph_packed_size (c);
+  buf = g_malloc (bufsize);
+  cmph_pack (c, buf);
+
+  size = cmph_size (c);
+
+  cmph_destroy (c);
+  c = NULL;
+
+  i = 0;
+  hash = cmph_search_packed (buf, "foo", 3);
+  g_assert (hash >= 0 && hash < size);
+  hashes[i++] = hash;
+
+  hash = cmph_search_packed (buf, "bar", 3);
+  g_assert (hash >= 0 && hash < size);
+  hashes[i++] = hash;
+
+  hash = cmph_search_packed (buf, "baz", 3);
+  g_assert (hash >= 0 && hash < size);
+  hashes[i++] = hash;
+
+  assert_hashes_unique (G_N_ELEMENTS (hashes), &hashes[0]);
+}
+
+int
+main(int argc, char **argv)
+{
+  gint ret;
+
+  g_type_init ();
+  g_test_init (&argc, &argv, NULL);
+
+  g_test_add_func ("/cmph-bdz/search", test_search);
+  g_test_add_func ("/cmph-bdz/search-packed", test_search_packed);
+
+  ret = g_test_run ();
+
+  return ret;
+}
+
diff --git a/girepository/cmph/bdz.c b/girepository/cmph/bdz.c
new file mode 100755 (executable)
index 0000000..a57f70f
--- /dev/null
@@ -0,0 +1,705 @@
+#include "bdz.h"
+#include "cmph_structs.h"
+#include "bdz_structs.h"
+#include "hash.h"
+#include "bitbool.h"
+
+#include <math.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <assert.h>
+#include <string.h>
+//#define DEBUG
+#include "debug.h"
+#define UNASSIGNED 3U
+#define NULL_EDGE 0xffffffff
+
+//cmph_uint32 ngrafos = 0;
+//cmph_uint32 ngrafos_aciclicos = 0;
+// table used for looking up the number of assigned vertices  a 8-bit integer
+const cmph_uint8 bdz_lookup_table[] =
+{
+4, 4, 4, 3, 4, 4, 4, 3, 4, 4, 4, 3, 3, 3, 3, 2,
+4, 4, 4, 3, 4, 4, 4, 3, 4, 4, 4, 3, 3, 3, 3, 2,
+4, 4, 4, 3, 4, 4, 4, 3, 4, 4, 4, 3, 3, 3, 3, 2,
+3, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 2, 2, 2, 2, 1,
+4, 4, 4, 3, 4, 4, 4, 3, 4, 4, 4, 3, 3, 3, 3, 2,
+4, 4, 4, 3, 4, 4, 4, 3, 4, 4, 4, 3, 3, 3, 3, 2,
+4, 4, 4, 3, 4, 4, 4, 3, 4, 4, 4, 3, 3, 3, 3, 2,
+3, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 2, 2, 2, 2, 1,
+4, 4, 4, 3, 4, 4, 4, 3, 4, 4, 4, 3, 3, 3, 3, 2,
+4, 4, 4, 3, 4, 4, 4, 3, 4, 4, 4, 3, 3, 3, 3, 2,
+4, 4, 4, 3, 4, 4, 4, 3, 4, 4, 4, 3, 3, 3, 3, 2,
+3, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 2, 2, 2, 2, 1,
+3, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 2, 2, 2, 2, 1,
+3, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 2, 2, 2, 2, 1,
+3, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 2, 2, 2, 2, 1,
+2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 1, 1, 1, 1, 0
+};     
+
+typedef struct 
+{
+       cmph_uint32 vertices[3];
+       cmph_uint32 next_edges[3];
+}bdz_edge_t;
+
+typedef cmph_uint32 * bdz_queue_t;
+
+static void bdz_alloc_queue(bdz_queue_t * queuep, cmph_uint32 nedges)
+{
+       (*queuep)=malloc(nedges*sizeof(cmph_uint32));
+};
+static void bdz_free_queue(bdz_queue_t * queue)
+{
+       free(*queue);
+};
+
+typedef struct 
+{
+       cmph_uint32 nedges;
+       bdz_edge_t * edges;
+       cmph_uint32 * first_edge;
+       cmph_uint8 * vert_degree;       
+}bdz_graph3_t;
+
+
+static void bdz_alloc_graph3(bdz_graph3_t * graph3, cmph_uint32 nedges, cmph_uint32 nvertices)
+{
+       graph3->edges=malloc(nedges*sizeof(bdz_edge_t));
+       graph3->first_edge=malloc(nvertices*sizeof(cmph_uint32));
+       graph3->vert_degree=malloc((size_t)nvertices);  
+};
+static void bdz_init_graph3(bdz_graph3_t * graph3, cmph_uint32 nedges, cmph_uint32 nvertices)
+{
+       memset(graph3->first_edge,0xff,nvertices*sizeof(cmph_uint32));
+       memset(graph3->vert_degree,0,(size_t)nvertices);
+       graph3->nedges=0;
+};
+static void bdz_free_graph3(bdz_graph3_t *graph3)
+{
+       free(graph3->edges);
+       free(graph3->first_edge);
+       free(graph3->vert_degree);
+};
+
+static void bdz_partial_free_graph3(bdz_graph3_t *graph3)
+{
+       free(graph3->first_edge);
+       free(graph3->vert_degree);
+       graph3->first_edge = NULL;
+       graph3->vert_degree = NULL;
+};
+
+static void bdz_add_edge(bdz_graph3_t * graph3, cmph_uint32 v0, cmph_uint32 v1, cmph_uint32 v2)
+{
+       graph3->edges[graph3->nedges].vertices[0]=v0;
+       graph3->edges[graph3->nedges].vertices[1]=v1;
+       graph3->edges[graph3->nedges].vertices[2]=v2;
+       graph3->edges[graph3->nedges].next_edges[0]=graph3->first_edge[v0];
+       graph3->edges[graph3->nedges].next_edges[1]=graph3->first_edge[v1];
+       graph3->edges[graph3->nedges].next_edges[2]=graph3->first_edge[v2];
+       graph3->first_edge[v0]=graph3->first_edge[v1]=graph3->first_edge[v2]=graph3->nedges;
+       graph3->vert_degree[v0]++;
+       graph3->vert_degree[v1]++;
+       graph3->vert_degree[v2]++;
+       graph3->nedges++;
+};
+
+static void bdz_dump_graph(bdz_graph3_t* graph3, cmph_uint32 nedges, cmph_uint32 nvertices)
+{
+       cmph_uint32 i;
+       for(i=0;i<nedges;i++){
+               printf("\nedge %d %d %d %d ",i,graph3->edges[i].vertices[0],
+                       graph3->edges[i].vertices[1],graph3->edges[i].vertices[2]);
+               printf(" nexts %d %d %d",graph3->edges[i].next_edges[0],
+                               graph3->edges[i].next_edges[1],graph3->edges[i].next_edges[2]);
+       };
+       
+       for(i=0;i<nvertices;i++){
+               printf("\nfirst for vertice %d %d ",i,graph3->first_edge[i]);
+       
+       };
+};
+
+static void bdz_remove_edge(bdz_graph3_t * graph3, cmph_uint32 curr_edge)
+{
+       cmph_uint32 i,j=0,vert,edge1,edge2;
+       for(i=0;i<3;i++){
+               vert=graph3->edges[curr_edge].vertices[i];
+               edge1=graph3->first_edge[vert];
+               edge2=NULL_EDGE;
+               while(edge1!=curr_edge&&edge1!=NULL_EDGE){
+                       edge2=edge1;
+                       if(graph3->edges[edge1].vertices[0]==vert){
+                               j=0;
+                       } else if(graph3->edges[edge1].vertices[1]==vert){
+                               j=1;
+                       } else 
+                               j=2;
+                       edge1=graph3->edges[edge1].next_edges[j];
+               };
+               if(edge1==NULL_EDGE){
+                       printf("\nerror remove edge %d dump graph",curr_edge);
+                       bdz_dump_graph(graph3,graph3->nedges,graph3->nedges+graph3->nedges/4);
+                       exit(-1);
+               };
+               
+               if(edge2!=NULL_EDGE){
+                       graph3->edges[edge2].next_edges[j] = 
+                               graph3->edges[edge1].next_edges[i];
+               } else 
+                       graph3->first_edge[vert]=
+                               graph3->edges[edge1].next_edges[i];
+               graph3->vert_degree[vert]--;
+       };
+       
+};
+
+static int bdz_generate_queue(cmph_uint32 nedges, cmph_uint32 nvertices, bdz_queue_t queue, bdz_graph3_t* graph3)
+{
+       cmph_uint32 i,v0,v1,v2;
+       cmph_uint32 queue_head=0,queue_tail=0;
+       cmph_uint32 curr_edge;
+       cmph_uint32 tmp_edge;
+       cmph_uint8 * marked_edge =malloc((size_t)(nedges >> 3) + 1);
+       memset(marked_edge, 0, (size_t)(nedges >> 3) + 1);
+
+       for(i=0;i<nedges;i++){
+               v0=graph3->edges[i].vertices[0];
+               v1=graph3->edges[i].vertices[1];
+               v2=graph3->edges[i].vertices[2];
+               if(graph3->vert_degree[v0]==1 || 
+                               graph3->vert_degree[v1]==1 ||
+                               graph3->vert_degree[v2]==1){
+                       if(!GETBIT(marked_edge,i)) {
+                               queue[queue_head++]=i;
+                               SETBIT(marked_edge,i);
+                       }
+               };
+       };
+       while(queue_tail!=queue_head){
+               curr_edge=queue[queue_tail++];
+               bdz_remove_edge(graph3,curr_edge);
+               v0=graph3->edges[curr_edge].vertices[0];
+               v1=graph3->edges[curr_edge].vertices[1];
+               v2=graph3->edges[curr_edge].vertices[2];
+               if(graph3->vert_degree[v0]==1 ) {
+                       tmp_edge=graph3->first_edge[v0];
+                       if(!GETBIT(marked_edge,tmp_edge)) {
+                               queue[queue_head++]=tmp_edge;
+                               SETBIT(marked_edge,tmp_edge);
+                       };
+                       
+               };
+               if(graph3->vert_degree[v1]==1) {
+                       tmp_edge=graph3->first_edge[v1];
+                       if(!GETBIT(marked_edge,tmp_edge)){
+                               queue[queue_head++]=tmp_edge;
+                               SETBIT(marked_edge,tmp_edge);
+                       };
+                       
+               };
+               if(graph3->vert_degree[v2]==1){
+                       tmp_edge=graph3->first_edge[v2];
+                       if(!GETBIT(marked_edge,tmp_edge)){
+                               queue[queue_head++]=tmp_edge;
+                               SETBIT(marked_edge,tmp_edge);
+                       };
+               };
+       };
+       free(marked_edge);
+       return (int)(queue_head-nedges);/* returns 0 if successful otherwies return negative number*/
+};
+
+static int bdz_mapping(cmph_config_t *mph, bdz_graph3_t* graph3, bdz_queue_t queue);
+static void assigning(bdz_config_data_t *bdz, bdz_graph3_t* graph3, bdz_queue_t queue);
+static void ranking(bdz_config_data_t *bdz);
+static cmph_uint32 rank(cmph_uint32 b, cmph_uint32 * ranktable, cmph_uint8 * g, cmph_uint32 vertex);
+
+bdz_config_data_t *bdz_config_new(void)
+{
+       bdz_config_data_t *bdz;
+       bdz = (bdz_config_data_t *)malloc(sizeof(bdz_config_data_t));
+       assert(bdz);
+       memset(bdz, 0, sizeof(bdz_config_data_t));
+       bdz->hashfunc = CMPH_HASH_JENKINS;
+       bdz->g = NULL;
+       bdz->hl = NULL;
+       bdz->k = 0; //kth index in ranktable, $k = log_2(n=3r)/\varepsilon$
+       bdz->b = 7; // number of bits of k
+       bdz->ranktablesize = 0; //number of entries in ranktable, $n/k +1$
+       bdz->ranktable = NULL; // rank table
+       return bdz;
+}
+
+void bdz_config_destroy(cmph_config_t *mph)
+{
+       bdz_config_data_t *data = (bdz_config_data_t *)mph->data;
+       DEBUGP("Destroying algorithm dependent data\n");
+       free(data);
+}
+
+void bdz_config_set_b(cmph_config_t *mph, cmph_uint32 b)
+{
+       bdz_config_data_t *bdz = (bdz_config_data_t *)mph->data;
+       if (b <= 2 || b > 10) b = 7; // validating restrictions over parameter b.
+       bdz->b = (cmph_uint8)b;
+       DEBUGP("b: %u\n", b);
+
+}
+
+void bdz_config_set_hashfuncs(cmph_config_t *mph, CMPH_HASH *hashfuncs)
+{
+       bdz_config_data_t *bdz = (bdz_config_data_t *)mph->data;
+       CMPH_HASH *hashptr = hashfuncs;
+       cmph_uint32 i = 0;
+       while(*hashptr != CMPH_HASH_COUNT)
+       {
+               if (i >= 1) break; //bdz only uses one linear hash function
+               bdz->hashfunc = *hashptr;       
+               ++i, ++hashptr;
+       }
+}
+
+cmph_t *bdz_new(cmph_config_t *mph, double c)
+{
+       cmph_t *mphf = NULL;
+       bdz_data_t *bdzf = NULL;
+       cmph_uint32 iterations;
+       bdz_queue_t edges;
+       bdz_graph3_t graph3;
+       bdz_config_data_t *bdz = (bdz_config_data_t *)mph->data;
+       #ifdef CMPH_TIMING
+       double construction_time_begin = 0.0;
+       double construction_time = 0.0;
+       ELAPSED_TIME_IN_SECONDS(&construction_time_begin);
+       #endif
+
+
+       if (c == 0) c = 1.23; // validating restrictions over parameter c.
+       DEBUGP("c: %f\n", c);
+       bdz->m = mph->key_source->nkeys;        
+       bdz->r = (cmph_uint32)ceil((c * mph->key_source->nkeys)/3);
+       if ((bdz->r % 2) == 0) bdz->r+=1;
+       bdz->n = 3*bdz->r;
+
+       bdz->k = (1U << bdz->b);
+       DEBUGP("b: %u -- k: %u\n", bdz->b, bdz->k);
+       
+       bdz->ranktablesize = (cmph_uint32)ceil(bdz->n/(double)bdz->k);
+       DEBUGP("ranktablesize: %u\n", bdz->ranktablesize);
+
+       
+       bdz_alloc_graph3(&graph3, bdz->m, bdz->n);
+       bdz_alloc_queue(&edges,bdz->m);
+       DEBUGP("Created hypergraph\n");
+       
+       DEBUGP("m (edges): %u n (vertices): %u  r: %u c: %f \n", bdz->m, bdz->n, bdz->r, c);
+
+       // Mapping step
+       iterations = 1000;
+       if (mph->verbosity)
+       {
+               fprintf(stderr, "Entering mapping step for mph creation of %u keys with graph sized %u\n", bdz->m, bdz->n);
+       }
+       while(1)
+       {
+               int ok;
+               DEBUGP("linear hash function \n");
+               bdz->hl = hash_state_new(bdz->hashfunc, 15);
+
+               ok = bdz_mapping(mph, &graph3, edges);
+                //ok = 0;
+               if (!ok)
+               {
+                       --iterations;
+                       hash_state_destroy(bdz->hl);
+                       bdz->hl = NULL;
+                       DEBUGP("%u iterations remaining\n", iterations);
+                       if (mph->verbosity)
+                       {
+                               fprintf(stderr, "acyclic graph creation failure - %u iterations remaining\n", iterations);
+                       }
+                       if (iterations == 0) break;
+               } 
+               else break;
+       }
+       
+       if (iterations == 0)
+       {
+               bdz_free_queue(&edges);
+               bdz_free_graph3(&graph3);
+               return NULL;
+       }
+       bdz_partial_free_graph3(&graph3);
+       // Assigning step
+       if (mph->verbosity)
+       {
+               fprintf(stderr, "Entering assigning step for mph creation of %u keys with graph sized %u\n", bdz->m, bdz->n);
+       }
+       assigning(bdz, &graph3, edges);
+
+       bdz_free_queue(&edges);
+       bdz_free_graph3(&graph3);
+       if (mph->verbosity)
+       {
+               fprintf(stderr, "Entering ranking step for mph creation of %u keys with graph sized %u\n", bdz->m, bdz->n);
+       }
+       ranking(bdz);
+       #ifdef CMPH_TIMING      
+       ELAPSED_TIME_IN_SECONDS(&construction_time);
+       #endif
+       mphf = (cmph_t *)malloc(sizeof(cmph_t));
+       mphf->algo = mph->algo;
+       bdzf = (bdz_data_t *)malloc(sizeof(bdz_data_t));
+       bdzf->g = bdz->g;
+       bdz->g = NULL; //transfer memory ownership
+       bdzf->hl = bdz->hl;
+       bdz->hl = NULL; //transfer memory ownership
+       bdzf->ranktable = bdz->ranktable;
+       bdz->ranktable = NULL; //transfer memory ownership
+       bdzf->ranktablesize = bdz->ranktablesize;
+       bdzf->k = bdz->k;
+       bdzf->b = bdz->b;
+       bdzf->n = bdz->n;
+       bdzf->m = bdz->m;
+       bdzf->r = bdz->r;
+       mphf->data = bdzf;
+       mphf->size = bdz->m;
+
+       DEBUGP("Successfully generated minimal perfect hash\n");
+       if (mph->verbosity)
+       {
+               fprintf(stderr, "Successfully generated minimal perfect hash function\n");
+       }
+
+
+       #ifdef CMPH_TIMING      
+       register cmph_uint32 space_usage = bdz_packed_size(mphf)*8;
+       register cmph_uint32 keys_per_bucket = 1;
+       construction_time = construction_time - construction_time_begin;
+       fprintf(stdout, "%u\t%.2f\t%u\t%.4f\t%.4f\n", bdz->m, bdz->m/(double)bdz->n, keys_per_bucket, construction_time, space_usage/(double)bdz->m);
+       #endif  
+
+       return mphf;
+}
+
+               
+static int bdz_mapping(cmph_config_t *mph, bdz_graph3_t* graph3, bdz_queue_t queue)
+{
+       cmph_uint32 e;
+       int cycles = 0;
+       cmph_uint32 hl[3];
+       bdz_config_data_t *bdz = (bdz_config_data_t *)mph->data;
+       bdz_init_graph3(graph3, bdz->m, bdz->n);
+       mph->key_source->rewind(mph->key_source->data);
+       for (e = 0; e < mph->key_source->nkeys; ++e)
+       {
+               cmph_uint32 h0, h1, h2;
+               cmph_uint32 keylen;
+               char *key = NULL;
+               mph->key_source->read(mph->key_source->data, &key, &keylen);            
+               hash_vector(bdz->hl, key, keylen,hl);
+               h0 = hl[0] % bdz->r;
+               h1 = hl[1] % bdz->r + bdz->r;
+               h2 = hl[2] % bdz->r + (bdz->r << 1);
+               mph->key_source->dispose(mph->key_source->data, key, keylen);
+               bdz_add_edge(graph3,h0,h1,h2);
+       }
+       cycles = bdz_generate_queue(bdz->m, bdz->n, queue, graph3);     
+       return (cycles == 0);
+}
+
+static void assigning(bdz_config_data_t *bdz, bdz_graph3_t* graph3, bdz_queue_t queue)
+{
+       cmph_uint32 i;
+       cmph_uint32 nedges=graph3->nedges;
+       cmph_uint32 curr_edge;
+       cmph_uint32 v0,v1,v2;
+       cmph_uint8 * marked_vertices =malloc((size_t)(bdz->n >> 3) + 1);
+        cmph_uint32 sizeg = (cmph_uint32)ceil(bdz->n/4.0);
+       bdz->g = (cmph_uint8 *)calloc((size_t)(sizeg), sizeof(cmph_uint8));     
+       memset(marked_vertices, 0, (size_t)(bdz->n >> 3) + 1);
+       memset(bdz->g, 0xff, (size_t)(sizeg));
+
+       for(i=nedges-1;i+1>=1;i--){
+               curr_edge=queue[i];
+               v0=graph3->edges[curr_edge].vertices[0];
+               v1=graph3->edges[curr_edge].vertices[1];
+               v2=graph3->edges[curr_edge].vertices[2];
+               DEBUGP("B:%u %u %u -- %u %u %u\n", v0, v1, v2, GETVALUE(bdz->g, v0), GETVALUE(bdz->g, v1), GETVALUE(bdz->g, v2));
+               if(!GETBIT(marked_vertices, v0)){
+                       if(!GETBIT(marked_vertices,v1))
+                       {
+                               SETVALUE1(bdz->g, v1, UNASSIGNED); 
+                               SETBIT(marked_vertices, v1);
+                       }
+                       if(!GETBIT(marked_vertices,v2))
+                       {
+                               SETVALUE1(bdz->g, v2, UNASSIGNED);              
+                               SETBIT(marked_vertices, v2);
+                       }
+                       SETVALUE1(bdz->g, v0, (6-(GETVALUE(bdz->g, v1) + GETVALUE(bdz->g,v2)))%3);
+                       SETBIT(marked_vertices, v0);
+               } else if(!GETBIT(marked_vertices, v1)) {
+                       if(!GETBIT(marked_vertices, v2))
+                       {
+                               SETVALUE1(bdz->g, v2, UNASSIGNED);
+                               SETBIT(marked_vertices, v2);
+                       }
+                       SETVALUE1(bdz->g, v1, (7-(GETVALUE(bdz->g, v0)+GETVALUE(bdz->g, v2)))%3);
+                       SETBIT(marked_vertices, v1);
+               }else {
+                       SETVALUE1(bdz->g, v2, (8-(GETVALUE(bdz->g,v0)+GETVALUE(bdz->g, v1)))%3);
+                       SETBIT(marked_vertices, v2);
+               }               
+               DEBUGP("A:%u %u %u -- %u %u %u\n", v0, v1, v2, GETVALUE(bdz->g, v0), GETVALUE(bdz->g, v1), GETVALUE(bdz->g, v2));
+       };
+       free(marked_vertices);
+}
+
+
+static void ranking(bdz_config_data_t *bdz)
+{
+       cmph_uint32 i, j, offset = 0U, count = 0U, size = (bdz->k >> 2U), nbytes_total = (cmph_uint32)ceil(bdz->n/4.0), nbytes;
+       bdz->ranktable = (cmph_uint32 *)calloc((size_t)bdz->ranktablesize, sizeof(cmph_uint32));
+       // ranktable computation
+       bdz->ranktable[0] = 0;  
+       i = 1;
+       while(1)
+       {
+               if(i == bdz->ranktablesize) break;
+               nbytes = size < nbytes_total? size : nbytes_total;
+               for(j = 0; j < nbytes; j++)
+               {
+                       count += bdz_lookup_table[*(bdz->g + offset + j)];
+               }
+               bdz->ranktable[i] = count;
+               offset += nbytes;
+               nbytes_total -= size;
+               i++;
+       }
+}
+
+
+int bdz_dump(cmph_t *mphf, FILE *fd)
+{
+       char *buf = NULL;
+       cmph_uint32 buflen;
+       register size_t nbytes;
+       bdz_data_t *data = (bdz_data_t *)mphf->data;
+       __cmph_dump(mphf, fd);
+
+       hash_state_dump(data->hl, &buf, &buflen);
+       DEBUGP("Dumping hash state with %u bytes to disk\n", buflen);
+       nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd);
+       nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd);
+       free(buf);
+
+       nbytes = fwrite(&(data->n), sizeof(cmph_uint32), (size_t)1, fd);
+       nbytes = fwrite(&(data->m), sizeof(cmph_uint32), (size_t)1, fd);
+       nbytes = fwrite(&(data->r), sizeof(cmph_uint32), (size_t)1, fd);
+       
+       cmph_uint32 sizeg = (cmph_uint32)ceil(data->n/4.0);
+       nbytes = fwrite(data->g, sizeof(cmph_uint8)*sizeg, (size_t)1, fd);
+
+       nbytes = fwrite(&(data->k), sizeof(cmph_uint32), (size_t)1, fd);
+       nbytes = fwrite(&(data->b), sizeof(cmph_uint8), (size_t)1, fd);
+       nbytes = fwrite(&(data->ranktablesize), sizeof(cmph_uint32), (size_t)1, fd);
+
+       nbytes = fwrite(data->ranktable, sizeof(cmph_uint32)*(data->ranktablesize), (size_t)1, fd);
+       #ifdef DEBUG
+       cmph_uint32 i;
+       fprintf(stderr, "G: ");
+       for (i = 0; i < data->n; ++i) fprintf(stderr, "%u ", GETVALUE(data->g, i));
+       fprintf(stderr, "\n");
+       #endif
+       return 1;
+}
+
+void bdz_load(FILE *f, cmph_t *mphf)
+{
+       char *buf = NULL;
+       cmph_uint32 buflen, sizeg;
+       register size_t nbytes;
+       bdz_data_t *bdz = (bdz_data_t *)malloc(sizeof(bdz_data_t));
+
+       DEBUGP("Loading bdz mphf\n");
+       mphf->data = bdz;
+
+       nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f);
+       DEBUGP("Hash state has %u bytes\n", buflen);
+       buf = (char *)malloc((size_t)buflen);
+       nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
+       bdz->hl = hash_state_load(buf, buflen);
+       free(buf);
+       
+
+       DEBUGP("Reading m and n\n");
+       nbytes = fread(&(bdz->n), sizeof(cmph_uint32), (size_t)1, f);   
+       nbytes = fread(&(bdz->m), sizeof(cmph_uint32), (size_t)1, f);   
+       nbytes = fread(&(bdz->r), sizeof(cmph_uint32), (size_t)1, f);   
+       sizeg = (cmph_uint32)ceil(bdz->n/4.0);
+       bdz->g = (cmph_uint8 *)calloc((size_t)(sizeg), sizeof(cmph_uint8));
+       nbytes = fread(bdz->g, sizeg*sizeof(cmph_uint8), (size_t)1, f);
+
+       nbytes = fread(&(bdz->k), sizeof(cmph_uint32), (size_t)1, f);
+       nbytes = fread(&(bdz->b), sizeof(cmph_uint8), (size_t)1, f);
+       nbytes = fread(&(bdz->ranktablesize), sizeof(cmph_uint32), (size_t)1, f);
+
+       bdz->ranktable = (cmph_uint32 *)calloc((size_t)bdz->ranktablesize, sizeof(cmph_uint32));
+       nbytes = fread(bdz->ranktable, sizeof(cmph_uint32)*(bdz->ranktablesize), (size_t)1, f);
+
+       #ifdef DEBUG
+       cmph_uint32  i = 0;
+       fprintf(stderr, "G: ");
+       for (i = 0; i < bdz->n; ++i) fprintf(stderr, "%u ", GETVALUE(bdz->g,i));
+       fprintf(stderr, "\n");
+       #endif
+       return;
+}
+               
+
+/*
+static cmph_uint32 bdz_search_ph(cmph_t *mphf, const char *key, cmph_uint32 keylen)
+{
+       bdz_data_t *bdz = mphf->data;
+       cmph_uint32 hl[3];
+       hash_vector(bdz->hl, key, keylen, hl);
+       cmph_uint32 vertex;
+       hl[0] = hl[0] % bdz->r;
+       hl[1] = hl[1] % bdz->r + bdz->r;
+       hl[2] = hl[2] % bdz->r + (bdz->r << 1);
+       vertex = hl[(GETVALUE(bdz->g, hl[0]) + GETVALUE(bdz->g, hl[1]) + GETVALUE(bdz->g, hl[2])) % 3];
+       return vertex;
+}
+*/
+
+static inline cmph_uint32 rank(cmph_uint32 b, cmph_uint32 * ranktable, cmph_uint8 * g, cmph_uint32 vertex)
+{
+       register cmph_uint32 index = vertex >> b;
+       register cmph_uint32 base_rank = ranktable[index];
+       register cmph_uint32 beg_idx_v = index << b;
+       register cmph_uint32 beg_idx_b = beg_idx_v >> 2;
+       register cmph_uint32 end_idx_b = vertex >> 2;
+       while(beg_idx_b < end_idx_b)
+       {
+               base_rank += bdz_lookup_table[*(g + beg_idx_b++)];
+               
+       }
+       beg_idx_v = beg_idx_b << 2;
+       while(beg_idx_v < vertex) 
+       {
+               if(GETVALUE(g, beg_idx_v) != UNASSIGNED) base_rank++;
+               beg_idx_v++;
+       }
+       
+       return base_rank;
+}
+
+cmph_uint32 bdz_search(cmph_t *mphf, const char *key, cmph_uint32 keylen)
+{
+       register cmph_uint32 vertex;
+       register bdz_data_t *bdz = mphf->data;
+       cmph_uint32 hl[3];
+       hash_vector(bdz->hl, key, keylen, hl);
+       hl[0] = hl[0] % bdz->r;
+       hl[1] = hl[1] % bdz->r + bdz->r;
+       hl[2] = hl[2] % bdz->r + (bdz->r << 1);
+       vertex = hl[(GETVALUE(bdz->g, hl[0]) + GETVALUE(bdz->g, hl[1]) + GETVALUE(bdz->g, hl[2])) % 3];
+       return rank(bdz->b, bdz->ranktable, bdz->g, vertex);
+}
+
+
+void bdz_destroy(cmph_t *mphf)
+{
+       bdz_data_t *data = (bdz_data_t *)mphf->data;
+       free(data->g);  
+       hash_state_destroy(data->hl);
+       free(data->ranktable);
+       free(data);
+       free(mphf);
+}
+
+/** \fn void bdz_pack(cmph_t *mphf, void *packed_mphf);
+ *  \brief Support the ability to pack a perfect hash function into a preallocated contiguous memory space pointed by packed_mphf.
+ *  \param mphf pointer to the resulting mphf
+ *  \param packed_mphf pointer to the contiguous memory area used to store the resulting mphf. The size of packed_mphf must be at least cmph_packed_size() 
+ */
+void bdz_pack(cmph_t *mphf, void *packed_mphf)
+{
+       bdz_data_t *data = (bdz_data_t *)mphf->data;
+       cmph_uint8 * ptr = packed_mphf;
+
+       // packing hl type
+       CMPH_HASH hl_type = hash_get_type(data->hl);
+       *((cmph_uint32 *) ptr) = hl_type;
+       ptr += sizeof(cmph_uint32);
+
+       // packing hl
+       hash_state_pack(data->hl, ptr);
+       ptr += hash_state_packed_size(hl_type);
+
+       // packing r
+       *((cmph_uint32 *) ptr) = data->r;
+       ptr += sizeof(data->r);
+
+       // packing ranktablesize
+       *((cmph_uint32 *) ptr) = data->ranktablesize;
+       ptr += sizeof(data->ranktablesize);
+
+       // packing ranktable
+       memcpy(ptr, data->ranktable, sizeof(cmph_uint32)*(data->ranktablesize));
+       ptr += sizeof(cmph_uint32)*(data->ranktablesize);
+
+       // packing b
+       *ptr++ = data->b;
+
+       // packing g
+       cmph_uint32 sizeg = (cmph_uint32)ceil(data->n/4.0);
+       memcpy(ptr, data->g,  sizeof(cmph_uint8)*sizeg);
+}
+
+/** \fn cmph_uint32 bdz_packed_size(cmph_t *mphf);
+ *  \brief Return the amount of space needed to pack mphf.
+ *  \param mphf pointer to a mphf
+ *  \return the size of the packed function or zero for failures
+ */ 
+cmph_uint32 bdz_packed_size(cmph_t *mphf)
+{
+       bdz_data_t *data = (bdz_data_t *)mphf->data;
+
+       CMPH_HASH hl_type = hash_get_type(data->hl); 
+
+       return (cmph_uint32)(sizeof(CMPH_ALGO) + hash_state_packed_size(hl_type) + 3*sizeof(cmph_uint32) + sizeof(cmph_uint32)*(data->ranktablesize) + sizeof(cmph_uint8) + sizeof(cmph_uint8)* (cmph_uint32)(ceil(data->n/4.0)));
+}
+
+/** cmph_uint32 bdz_search(void *packed_mphf, const char *key, cmph_uint32 keylen);
+ *  \brief Use the packed mphf to do a search. 
+ *  \param  packed_mphf pointer to the packed mphf
+ *  \param key key to be hashed
+ *  \param keylen key legth in bytes
+ *  \return The mphf value
+ */
+cmph_uint32 bdz_search_packed(void *packed_mphf, const char *key, cmph_uint32 keylen)
+{
+       
+       register cmph_uint32 vertex;
+       register CMPH_HASH hl_type  = *(cmph_uint32 *)packed_mphf;
+       register cmph_uint8 *hl_ptr = (cmph_uint8 *)(packed_mphf) + 4;
+
+       register cmph_uint32 *ranktable = (cmph_uint32*)(hl_ptr + hash_state_packed_size(hl_type));
+       
+       register cmph_uint32 r = *ranktable++;
+       register cmph_uint32 ranktablesize = *ranktable++;
+       register cmph_uint8 * g = (cmph_uint8 *)(ranktable + ranktablesize);
+       register cmph_uint8 b = *g++;
+
+       cmph_uint32 hl[3];
+       hash_vector_packed(hl_ptr, hl_type, key, keylen, hl);
+       hl[0] = hl[0] % r;
+       hl[1] = hl[1] % r + r;
+       hl[2] = hl[2] % r + (r << 1);
+       vertex = hl[(GETVALUE(g, hl[0]) + GETVALUE(g, hl[1]) + GETVALUE(g, hl[2])) % 3];
+       return rank(b, ranktable, g, vertex);
+}
diff --git a/girepository/cmph/bdz.h b/girepository/cmph/bdz.h
new file mode 100755 (executable)
index 0000000..7116933
--- /dev/null
@@ -0,0 +1,43 @@
+#ifndef __CMPH_BDZ_H__
+#define __CMPH_BDZ_H__
+
+#include "cmph.h"
+
+typedef struct __bdz_data_t bdz_data_t;
+typedef struct __bdz_config_data_t bdz_config_data_t;
+
+bdz_config_data_t *bdz_config_new(void);
+void bdz_config_set_hashfuncs(cmph_config_t *mph, CMPH_HASH *hashfuncs);
+void bdz_config_destroy(cmph_config_t *mph);
+void bdz_config_set_b(cmph_config_t *mph, cmph_uint32 b);
+cmph_t *bdz_new(cmph_config_t *mph, double c);
+
+void bdz_load(FILE *f, cmph_t *mphf);
+int bdz_dump(cmph_t *mphf, FILE *f);
+void bdz_destroy(cmph_t *mphf);
+cmph_uint32 bdz_search(cmph_t *mphf, const char *key, cmph_uint32 keylen);
+
+/** \fn void bdz_pack(cmph_t *mphf, void *packed_mphf);
+ *  \brief Support the ability to pack a perfect hash function into a preallocated contiguous memory space pointed by packed_mphf.
+ *  \param mphf pointer to the resulting mphf
+ *  \param packed_mphf pointer to the contiguous memory area used to store the resulting mphf. The size of packed_mphf must be at least cmph_packed_size() 
+ */
+void bdz_pack(cmph_t *mphf, void *packed_mphf);
+
+/** \fn cmph_uint32 bdz_packed_size(cmph_t *mphf);
+ *  \brief Return the amount of space needed to pack mphf.
+ *  \param mphf pointer to a mphf
+ *  \return the size of the packed function or zero for failures
+ */ 
+cmph_uint32 bdz_packed_size(cmph_t *mphf);
+
+/** cmph_uint32 bdz_search(void *packed_mphf, const char *key, cmph_uint32 keylen);
+ *  \brief Use the packed mphf to do a search. 
+ *  \param  packed_mphf pointer to the packed mphf
+ *  \param key key to be hashed
+ *  \param keylen key legth in bytes
+ *  \return The mphf value
+ */
+cmph_uint32 bdz_search_packed(void *packed_mphf, const char *key, cmph_uint32 keylen);
+
+#endif
diff --git a/girepository/cmph/bdz_ph.c b/girepository/cmph/bdz_ph.c
new file mode 100755 (executable)
index 0000000..16257c0
--- /dev/null
@@ -0,0 +1,621 @@
+#include "bdz_ph.h"
+#include "cmph_structs.h"
+#include "bdz_structs_ph.h"
+#include "hash.h"
+#include "bitbool.h"
+
+#include <math.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <assert.h>
+#include <string.h>
+//#define DEBUG
+#include "debug.h"
+#define UNASSIGNED 3
+#define NULL_EDGE 0xffffffff
+
+
+static cmph_uint8 pow3_table[5] = {1,3,9,27,81};
+static cmph_uint8 lookup_table[5][256] = {
+ {0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0},
+ {0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1},
+ {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1},
+ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+};
+
+typedef struct 
+{
+       cmph_uint32 vertices[3];
+       cmph_uint32 next_edges[3];
+}bdz_ph_edge_t;
+
+typedef cmph_uint32 * bdz_ph_queue_t;
+
+static void bdz_ph_alloc_queue(bdz_ph_queue_t * queuep, cmph_uint32 nedges)
+{
+       (*queuep)=malloc(nedges*sizeof(cmph_uint32));
+};
+static void bdz_ph_free_queue(bdz_ph_queue_t * queue)
+{
+       free(*queue);
+};
+
+typedef struct 
+{
+       cmph_uint32 nedges;
+       bdz_ph_edge_t * edges;
+       cmph_uint32 * first_edge;
+       cmph_uint8 * vert_degree;       
+}bdz_ph_graph3_t;
+
+
+static void bdz_ph_alloc_graph3(bdz_ph_graph3_t * graph3, cmph_uint32 nedges, cmph_uint32 nvertices)
+{
+       graph3->edges=malloc(nedges*sizeof(bdz_ph_edge_t));
+       graph3->first_edge=malloc(nvertices*sizeof(cmph_uint32));
+       graph3->vert_degree=malloc((size_t)nvertices);  
+};
+static void bdz_ph_init_graph3(bdz_ph_graph3_t * graph3, cmph_uint32 nedges, cmph_uint32 nvertices)
+{
+       memset(graph3->first_edge,0xff,nvertices*sizeof(cmph_uint32));
+       memset(graph3->vert_degree,0,(size_t)nvertices);
+       graph3->nedges=0;
+};
+static void bdz_ph_free_graph3(bdz_ph_graph3_t *graph3)
+{
+       free(graph3->edges);
+       free(graph3->first_edge);
+       free(graph3->vert_degree);
+};
+
+static void bdz_ph_partial_free_graph3(bdz_ph_graph3_t *graph3)
+{
+       free(graph3->first_edge);
+       free(graph3->vert_degree);
+       graph3->first_edge = NULL;
+       graph3->vert_degree = NULL;
+};
+
+static void bdz_ph_add_edge(bdz_ph_graph3_t * graph3, cmph_uint32 v0, cmph_uint32 v1, cmph_uint32 v2)
+{
+       graph3->edges[graph3->nedges].vertices[0]=v0;
+       graph3->edges[graph3->nedges].vertices[1]=v1;
+       graph3->edges[graph3->nedges].vertices[2]=v2;
+       graph3->edges[graph3->nedges].next_edges[0]=graph3->first_edge[v0];
+       graph3->edges[graph3->nedges].next_edges[1]=graph3->first_edge[v1];
+       graph3->edges[graph3->nedges].next_edges[2]=graph3->first_edge[v2];
+       graph3->first_edge[v0]=graph3->first_edge[v1]=graph3->first_edge[v2]=graph3->nedges;
+       graph3->vert_degree[v0]++;
+       graph3->vert_degree[v1]++;
+       graph3->vert_degree[v2]++;
+       graph3->nedges++;
+};
+
+static void bdz_ph_dump_graph(bdz_ph_graph3_t* graph3, cmph_uint32 nedges, cmph_uint32 nvertices)
+{
+       cmph_uint32 i;
+       for(i=0;i<nedges;i++){
+               printf("\nedge %d %d %d %d ",i,graph3->edges[i].vertices[0],
+                       graph3->edges[i].vertices[1],graph3->edges[i].vertices[2]);
+               printf(" nexts %d %d %d",graph3->edges[i].next_edges[0],
+                               graph3->edges[i].next_edges[1],graph3->edges[i].next_edges[2]);
+       };
+       
+       for(i=0;i<nvertices;i++){
+               printf("\nfirst for vertice %d %d ",i,graph3->first_edge[i]);
+       
+       };
+};
+
+static void bdz_ph_remove_edge(bdz_ph_graph3_t * graph3, cmph_uint32 curr_edge)
+{
+       cmph_uint32 i,j=0,vert,edge1,edge2;
+       for(i=0;i<3;i++){
+               vert=graph3->edges[curr_edge].vertices[i];
+               edge1=graph3->first_edge[vert];
+               edge2=NULL_EDGE;
+               while(edge1!=curr_edge&&edge1!=NULL_EDGE){
+                       edge2=edge1;
+                       if(graph3->edges[edge1].vertices[0]==vert){
+                               j=0;
+                       } else if(graph3->edges[edge1].vertices[1]==vert){
+                               j=1;
+                       } else 
+                               j=2;
+                       edge1=graph3->edges[edge1].next_edges[j];
+               };
+               if(edge1==NULL_EDGE){
+                       printf("\nerror remove edge %d dump graph",curr_edge);
+                       bdz_ph_dump_graph(graph3,graph3->nedges,graph3->nedges+graph3->nedges/4);
+                       exit(-1);
+               };
+               
+               if(edge2!=NULL_EDGE){
+                       graph3->edges[edge2].next_edges[j] = 
+                               graph3->edges[edge1].next_edges[i];
+               } else 
+                       graph3->first_edge[vert]=
+                               graph3->edges[edge1].next_edges[i];
+               graph3->vert_degree[vert]--;
+       };
+       
+};
+
+static int bdz_ph_generate_queue(cmph_uint32 nedges, cmph_uint32 nvertices, bdz_ph_queue_t queue, bdz_ph_graph3_t* graph3)
+{
+       cmph_uint32 i,v0,v1,v2;
+       cmph_uint32 queue_head=0,queue_tail=0;
+       cmph_uint32 curr_edge;
+       cmph_uint32 tmp_edge;
+       cmph_uint8 * marked_edge =malloc((size_t)(nedges >> 3) + 1);
+       memset(marked_edge, 0, (size_t)(nedges >> 3) + 1);
+
+       for(i=0;i<nedges;i++){
+               v0=graph3->edges[i].vertices[0];
+               v1=graph3->edges[i].vertices[1];
+               v2=graph3->edges[i].vertices[2];
+               if(graph3->vert_degree[v0]==1 || 
+                               graph3->vert_degree[v1]==1 ||
+                               graph3->vert_degree[v2]==1){
+                       if(!GETBIT(marked_edge,i)) {
+                               queue[queue_head++]=i;
+                               SETBIT(marked_edge,i);
+                       }
+               };
+       };
+       while(queue_tail!=queue_head){
+               curr_edge=queue[queue_tail++];
+               bdz_ph_remove_edge(graph3,curr_edge);
+               v0=graph3->edges[curr_edge].vertices[0];
+               v1=graph3->edges[curr_edge].vertices[1];
+               v2=graph3->edges[curr_edge].vertices[2];
+               if(graph3->vert_degree[v0]==1 ) {
+                       tmp_edge=graph3->first_edge[v0];
+                       if(!GETBIT(marked_edge,tmp_edge)) {
+                               queue[queue_head++]=tmp_edge;
+                               SETBIT(marked_edge,tmp_edge);
+                       };
+                       
+               };
+               if(graph3->vert_degree[v1]==1) {
+                       tmp_edge=graph3->first_edge[v1];
+                       if(!GETBIT(marked_edge,tmp_edge)){
+                               queue[queue_head++]=tmp_edge;
+                               SETBIT(marked_edge,tmp_edge);
+                       };
+                       
+               };
+               if(graph3->vert_degree[v2]==1){
+                       tmp_edge=graph3->first_edge[v2];
+                       if(!GETBIT(marked_edge,tmp_edge)){
+                               queue[queue_head++]=tmp_edge;
+                               SETBIT(marked_edge,tmp_edge);
+                       };
+               };
+       };
+       free(marked_edge);
+       return (int)queue_head - (int)nedges;/* returns 0 if successful otherwies return negative number*/
+};
+
+static int bdz_ph_mapping(cmph_config_t *mph, bdz_ph_graph3_t* graph3, bdz_ph_queue_t queue);
+static void assigning(bdz_ph_config_data_t *bdz_ph, bdz_ph_graph3_t* graph3, bdz_ph_queue_t queue);
+static void bdz_ph_optimization(bdz_ph_config_data_t *bdz_ph);
+
+bdz_ph_config_data_t *bdz_ph_config_new(void)
+{
+       bdz_ph_config_data_t *bdz_ph;
+       bdz_ph = (bdz_ph_config_data_t *)malloc(sizeof(bdz_ph_config_data_t));
+       assert(bdz_ph);
+       memset(bdz_ph, 0, sizeof(bdz_ph_config_data_t));
+       bdz_ph->hashfunc = CMPH_HASH_JENKINS;
+       bdz_ph->g = NULL;
+       bdz_ph->hl = NULL;
+       return bdz_ph;
+}
+
+void bdz_ph_config_destroy(cmph_config_t *mph)
+{
+       bdz_ph_config_data_t *data = (bdz_ph_config_data_t *)mph->data;
+       DEBUGP("Destroying algorithm dependent data\n");
+       free(data);
+}
+
+void bdz_ph_config_set_hashfuncs(cmph_config_t *mph, CMPH_HASH *hashfuncs)
+{
+       bdz_ph_config_data_t *bdz_ph = (bdz_ph_config_data_t *)mph->data;
+       CMPH_HASH *hashptr = hashfuncs;
+       cmph_uint32 i = 0;
+       while(*hashptr != CMPH_HASH_COUNT)
+       {
+               if (i >= 1) break; //bdz_ph only uses one linear hash function
+               bdz_ph->hashfunc = *hashptr;    
+               ++i, ++hashptr;
+       }
+}
+
+cmph_t *bdz_ph_new(cmph_config_t *mph, double c)
+{
+       cmph_t *mphf = NULL;
+       bdz_ph_data_t *bdz_phf = NULL;
+       cmph_uint32 iterations;
+       bdz_ph_queue_t edges;
+       bdz_ph_graph3_t graph3;
+       bdz_ph_config_data_t *bdz_ph = (bdz_ph_config_data_t *)mph->data;
+       #ifdef CMPH_TIMING
+       double construction_time_begin = 0.0;
+       double construction_time = 0.0;
+       ELAPSED_TIME_IN_SECONDS(&construction_time_begin);
+       #endif
+
+
+       if (c == 0) c = 1.23; // validating restrictions over parameter c.
+       DEBUGP("c: %f\n", c);
+       bdz_ph->m = mph->key_source->nkeys;     
+       bdz_ph->r = (cmph_uint32)ceil((c * mph->key_source->nkeys)/3);  
+       if ((bdz_ph->r % 2) == 0) bdz_ph->r += 1;
+       bdz_ph->n = 3*bdz_ph->r;
+
+       
+       bdz_ph_alloc_graph3(&graph3, bdz_ph->m, bdz_ph->n);
+       bdz_ph_alloc_queue(&edges,bdz_ph->m);
+       DEBUGP("Created hypergraph\n");
+       
+       DEBUGP("m (edges): %u n (vertices): %u  r: %u c: %f \n", bdz_ph->m, bdz_ph->n, bdz_ph->r, c);
+
+       // Mapping step
+       iterations = 100;
+       if (mph->verbosity)
+       {
+               fprintf(stderr, "Entering mapping step for mph creation of %u keys with graph sized %u\n", bdz_ph->m, bdz_ph->n);
+       }
+       while(1)
+       {
+               int ok;
+               DEBUGP("linear hash function \n");
+               bdz_ph->hl = hash_state_new(bdz_ph->hashfunc, 15);
+
+               ok = bdz_ph_mapping(mph, &graph3, edges);
+               if (!ok)
+               {
+                       --iterations;
+                       hash_state_destroy(bdz_ph->hl);
+                       bdz_ph->hl = NULL;
+                       DEBUGP("%u iterations remaining\n", iterations);
+                       if (mph->verbosity)
+                       {
+                               fprintf(stderr, "acyclic graph creation failure - %u iterations remaining\n", iterations);
+                       }
+                       if (iterations == 0) break;
+               } 
+               else break;
+       }
+       
+       if (iterations == 0)
+       {
+//             free(bdz_ph->g);
+               bdz_ph_free_queue(&edges);
+               bdz_ph_free_graph3(&graph3);
+               return NULL;
+       }
+       bdz_ph_partial_free_graph3(&graph3);
+       // Assigning step
+       if (mph->verbosity)
+       {
+               fprintf(stderr, "Entering assigning step for mph creation of %u keys with graph sized %u\n", bdz_ph->m, bdz_ph->n);
+       }
+       assigning(bdz_ph, &graph3, edges);
+
+       bdz_ph_free_queue(&edges);
+       bdz_ph_free_graph3(&graph3);
+       
+       if (mph->verbosity)
+       {
+               fprintf(stderr, "Starting optimization step\n");
+       }
+
+       bdz_ph_optimization(bdz_ph);
+
+       #ifdef CMPH_TIMING
+       ELAPSED_TIME_IN_SECONDS(&construction_time);
+       #endif
+       mphf = (cmph_t *)malloc(sizeof(cmph_t));
+       mphf->algo = mph->algo;
+       bdz_phf = (bdz_ph_data_t *)malloc(sizeof(bdz_ph_data_t));
+       bdz_phf->g = bdz_ph->g;
+       bdz_ph->g = NULL; //transfer memory ownership
+       bdz_phf->hl = bdz_ph->hl;
+       bdz_ph->hl = NULL; //transfer memory ownership
+       bdz_phf->n = bdz_ph->n;
+       bdz_phf->m = bdz_ph->m;
+       bdz_phf->r = bdz_ph->r;
+       mphf->data = bdz_phf;
+       mphf->size = bdz_ph->n;
+
+       DEBUGP("Successfully generated minimal perfect hash\n");
+       if (mph->verbosity)
+       {
+               fprintf(stderr, "Successfully generated minimal perfect hash function\n");
+       }
+
+       #ifdef CMPH_TIMING      
+       register cmph_uint32 space_usage = bdz_ph_packed_size(mphf)*8;
+       register cmph_uint32 keys_per_bucket = 1;
+       construction_time = construction_time - construction_time_begin;
+       fprintf(stdout, "%u\t%.2f\t%u\t%.4f\t%.4f\n", bdz_ph->m, bdz_ph->m/(double)bdz_ph->n, keys_per_bucket, construction_time, space_usage/(double)bdz_ph->m);
+       #endif  
+
+       return mphf;
+}
+
+               
+static int bdz_ph_mapping(cmph_config_t *mph, bdz_ph_graph3_t* graph3, bdz_ph_queue_t queue)
+{
+       cmph_uint32 e;
+       int cycles = 0;
+       cmph_uint32 hl[3];
+       
+       bdz_ph_config_data_t *bdz_ph = (bdz_ph_config_data_t *)mph->data;
+       bdz_ph_init_graph3(graph3, bdz_ph->m, bdz_ph->n);
+       mph->key_source->rewind(mph->key_source->data);
+       for (e = 0; e < mph->key_source->nkeys; ++e)
+       {
+               cmph_uint32 h0, h1, h2;
+               cmph_uint32 keylen;
+               char *key = NULL;
+               mph->key_source->read(mph->key_source->data, &key, &keylen);            
+               hash_vector(bdz_ph->hl, key, keylen, hl);
+               h0 = hl[0] % bdz_ph->r;
+               h1 = hl[1] % bdz_ph->r + bdz_ph->r;
+               h2 = hl[2] % bdz_ph->r + (bdz_ph->r << 1);
+               mph->key_source->dispose(mph->key_source->data, key, keylen);
+               bdz_ph_add_edge(graph3,h0,h1,h2);
+       }
+       cycles = bdz_ph_generate_queue(bdz_ph->m, bdz_ph->n, queue, graph3);    
+       return (cycles == 0);
+}
+
+static void assigning(bdz_ph_config_data_t *bdz_ph, bdz_ph_graph3_t* graph3, bdz_ph_queue_t queue)
+{
+       cmph_uint32 i;
+       cmph_uint32 nedges=graph3->nedges;
+       cmph_uint32 curr_edge;
+       cmph_uint32 v0,v1,v2;
+       cmph_uint8 * marked_vertices =malloc((size_t)(bdz_ph->n >> 3) + 1);
+       cmph_uint32 sizeg = (cmph_uint32)ceil(bdz_ph->n/4.0);
+       bdz_ph->g = (cmph_uint8 *)calloc((size_t)sizeg, sizeof(cmph_uint8));    
+       memset(marked_vertices, 0, (size_t)(bdz_ph->n >> 3) + 1);
+       //memset(bdz_ph->g, 0xff, sizeg);
+
+       for(i=nedges-1;i+1>=1;i--){
+               curr_edge=queue[i];
+               v0=graph3->edges[curr_edge].vertices[0];
+               v1=graph3->edges[curr_edge].vertices[1];
+               v2=graph3->edges[curr_edge].vertices[2];
+               DEBUGP("B:%u %u %u -- %u %u %u\n", v0, v1, v2, GETVALUE(bdz_ph->g, v0), GETVALUE(bdz_ph->g, v1), GETVALUE(bdz_ph->g, v2));
+               if(!GETBIT(marked_vertices, v0)){
+                       if(!GETBIT(marked_vertices,v1))
+                       {
+                               //SETVALUE(bdz_ph->g, v1, UNASSIGNED); 
+                               SETBIT(marked_vertices, v1);
+                       }
+                       if(!GETBIT(marked_vertices,v2))
+                       {
+                               //SETVALUE(bdz_ph->g, v2, UNASSIGNED);          
+                               SETBIT(marked_vertices, v2);
+                       }                       
+                       SETVALUE0(bdz_ph->g, v0, (6-(GETVALUE(bdz_ph->g, v1) + GETVALUE(bdz_ph->g,v2)))%3);
+                       SETBIT(marked_vertices, v0);
+               } else if(!GETBIT(marked_vertices, v1)) {
+                       if(!GETBIT(marked_vertices, v2))
+                       {
+                               //SETVALUE(bdz_ph->g, v2, UNASSIGNED);
+                               SETBIT(marked_vertices, v2);
+                       }
+                       SETVALUE0(bdz_ph->g, v1, (7 - (GETVALUE(bdz_ph->g, v0)+GETVALUE(bdz_ph->g, v2)))%3);
+                       SETBIT(marked_vertices, v1);
+               }else {
+                       SETVALUE0(bdz_ph->g, v2, (8-(GETVALUE(bdz_ph->g,v0)+GETVALUE(bdz_ph->g, v1)))%3);
+                       SETBIT(marked_vertices, v2);
+               }               
+               DEBUGP("A:%u %u %u -- %u %u %u\n", v0, v1, v2, GETVALUE(bdz_ph->g, v0), GETVALUE(bdz_ph->g, v1), GETVALUE(bdz_ph->g, v2));
+       };
+       free(marked_vertices);
+}
+
+static void bdz_ph_optimization(bdz_ph_config_data_t *bdz_ph)
+{
+       cmph_uint32 i;
+       cmph_uint8 byte = 0;
+       cmph_uint32 sizeg = (cmph_uint32)ceil(bdz_ph->n/5.0);
+       cmph_uint8 * new_g = (cmph_uint8 *)calloc((size_t)sizeg, sizeof(cmph_uint8));   
+       cmph_uint8 value;
+       cmph_uint32 idx;
+       for(i = 0; i < bdz_ph->n; i++) 
+       {       
+            idx = i/5;
+            byte = new_g[idx];
+            value = GETVALUE(bdz_ph->g, i);
+            byte = (cmph_uint8) (byte + value*pow3_table[i%5U]);
+            new_g[idx] = byte;
+        }
+       free(bdz_ph->g);
+       bdz_ph->g = new_g;
+}
+
+
+int bdz_ph_dump(cmph_t *mphf, FILE *fd)
+{
+       char *buf = NULL;
+       cmph_uint32 buflen;
+       cmph_uint32 sizeg = 0;
+       register size_t nbytes;
+       bdz_ph_data_t *data = (bdz_ph_data_t *)mphf->data;
+       __cmph_dump(mphf, fd);
+
+       hash_state_dump(data->hl, &buf, &buflen);
+       DEBUGP("Dumping hash state with %u bytes to disk\n", buflen);
+       nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd);
+       nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd);
+       free(buf);
+
+       nbytes = fwrite(&(data->n), sizeof(cmph_uint32), (size_t)1, fd);
+       nbytes = fwrite(&(data->m), sizeof(cmph_uint32), (size_t)1, fd);
+       nbytes = fwrite(&(data->r), sizeof(cmph_uint32), (size_t)1, fd);
+       sizeg = (cmph_uint32)ceil(data->n/5.0); 
+       nbytes = fwrite(data->g, sizeof(cmph_uint8)*sizeg, (size_t)1, fd);
+
+       #ifdef DEBUG
+       cmph_uint32 i;
+       fprintf(stderr, "G: ");
+       for (i = 0; i < data->n; ++i) fprintf(stderr, "%u ", GETVALUE(data->g, i));
+       fprintf(stderr, "\n");
+       #endif
+       return 1;
+}
+
+void bdz_ph_load(FILE *f, cmph_t *mphf)
+{
+       char *buf = NULL;
+       cmph_uint32 buflen;
+       cmph_uint32 sizeg = 0;
+       register size_t nbytes;
+       bdz_ph_data_t *bdz_ph = (bdz_ph_data_t *)malloc(sizeof(bdz_ph_data_t));
+
+       DEBUGP("Loading bdz_ph mphf\n");
+       mphf->data = bdz_ph;
+
+       nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f);
+       DEBUGP("Hash state has %u bytes\n", buflen);
+       buf = (char *)malloc((size_t)buflen);
+       nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
+       bdz_ph->hl = hash_state_load(buf, buflen);
+       free(buf);
+       
+
+       DEBUGP("Reading m and n\n");
+       nbytes = fread(&(bdz_ph->n), sizeof(cmph_uint32), (size_t)1, f);        
+       nbytes = fread(&(bdz_ph->m), sizeof(cmph_uint32), (size_t)1, f);        
+       nbytes = fread(&(bdz_ph->r), sizeof(cmph_uint32), (size_t)1, f);        
+       sizeg = (cmph_uint32)ceil(bdz_ph->n/5.0);
+       bdz_ph->g = (cmph_uint8 *)calloc((size_t)sizeg, sizeof(cmph_uint8));
+       nbytes = fread(bdz_ph->g, sizeg*sizeof(cmph_uint8), (size_t)1, f);
+
+       return;
+}
+               
+
+cmph_uint32 bdz_ph_search(cmph_t *mphf, const char *key, cmph_uint32 keylen)
+{
+       register bdz_ph_data_t *bdz_ph = mphf->data;
+       cmph_uint32 hl[3];
+       register cmph_uint8 byte0, byte1, byte2;
+       register cmph_uint32 vertex;
+
+       hash_vector(bdz_ph->hl, key, keylen,hl);
+       hl[0] = hl[0] % bdz_ph->r;
+       hl[1] = hl[1] % bdz_ph->r + bdz_ph->r;
+       hl[2] = hl[2] % bdz_ph->r + (bdz_ph->r << 1);
+
+       byte0 = bdz_ph->g[hl[0]/5];
+       byte1 = bdz_ph->g[hl[1]/5];
+       byte2 = bdz_ph->g[hl[2]/5];
+       
+       byte0 = lookup_table[hl[0]%5U][byte0];
+       byte1 = lookup_table[hl[1]%5U][byte1];
+       byte2 = lookup_table[hl[2]%5U][byte2];
+       vertex = hl[(byte0 + byte1 + byte2)%3];
+               
+       return vertex;
+}
+
+
+void bdz_ph_destroy(cmph_t *mphf)
+{
+       bdz_ph_data_t *data = (bdz_ph_data_t *)mphf->data;
+       free(data->g);  
+       hash_state_destroy(data->hl);
+       free(data);
+       free(mphf);
+}
+
+/** \fn void bdz_ph_pack(cmph_t *mphf, void *packed_mphf);
+ *  \brief Support the ability to pack a perfect hash function into a preallocated contiguous memory space pointed by packed_mphf.
+ *  \param mphf pointer to the resulting mphf
+ *  \param packed_mphf pointer to the contiguous memory area used to store the resulting mphf. The size of packed_mphf must be at least cmph_packed_size() 
+ */
+void bdz_ph_pack(cmph_t *mphf, void *packed_mphf)
+{
+       bdz_ph_data_t *data = (bdz_ph_data_t *)mphf->data;
+       cmph_uint8 * ptr = packed_mphf;
+
+       // packing hl type
+       CMPH_HASH hl_type = hash_get_type(data->hl);
+       *((cmph_uint32 *) ptr) = hl_type;
+       ptr += sizeof(cmph_uint32);
+
+       // packing hl
+       hash_state_pack(data->hl, ptr);
+       ptr += hash_state_packed_size(hl_type);
+
+       // packing r
+       *((cmph_uint32 *) ptr) = data->r;
+       ptr += sizeof(data->r);
+
+       // packing g
+       cmph_uint32 sizeg = (cmph_uint32)ceil(data->n/5.0);
+       memcpy(ptr, data->g,  sizeof(cmph_uint8)*sizeg);
+}
+
+/** \fn cmph_uint32 bdz_ph_packed_size(cmph_t *mphf);
+ *  \brief Return the amount of space needed to pack mphf.
+ *  \param mphf pointer to a mphf
+ *  \return the size of the packed function or zero for failures
+ */ 
+cmph_uint32 bdz_ph_packed_size(cmph_t *mphf)
+{
+       bdz_ph_data_t *data = (bdz_ph_data_t *)mphf->data;
+       CMPH_HASH hl_type = hash_get_type(data->hl); 
+       cmph_uint32 sizeg = (cmph_uint32)ceil(data->n/5.0);
+       return (cmph_uint32) (sizeof(CMPH_ALGO) + hash_state_packed_size(hl_type) + 2*sizeof(cmph_uint32) + sizeof(cmph_uint8)*sizeg);
+}
+
+/** cmph_uint32 bdz_ph_search(void *packed_mphf, const char *key, cmph_uint32 keylen);
+ *  \brief Use the packed mphf to do a search. 
+ *  \param  packed_mphf pointer to the packed mphf
+ *  \param key key to be hashed
+ *  \param keylen key legth in bytes
+ *  \return The mphf value
+ */
+cmph_uint32 bdz_ph_search_packed(void *packed_mphf, const char *key, cmph_uint32 keylen)
+{
+       
+       register CMPH_HASH hl_type  = *(cmph_uint32 *)packed_mphf;
+       register cmph_uint8 *hl_ptr = (cmph_uint8 *)(packed_mphf) + 4;
+       
+       register cmph_uint8 * ptr = hl_ptr + hash_state_packed_size(hl_type);
+
+       register cmph_uint32 r = *((cmph_uint32*) ptr);
+       register cmph_uint8 * g = ptr + 4;
+       
+       cmph_uint32 hl[3];
+       register cmph_uint8 byte0, byte1, byte2;
+       register cmph_uint32 vertex;
+
+       hash_vector_packed(hl_ptr, hl_type, key, keylen, hl);
+       
+       hl[0] = hl[0] % r;
+       hl[1] = hl[1] % r + r;
+       hl[2] = hl[2] % r + (r << 1);
+
+       byte0 = g[hl[0]/5];
+       byte1 = g[hl[1]/5];
+       byte2 = g[hl[2]/5];
+       
+       byte0 = lookup_table[hl[0]%5][byte0];
+       byte1 = lookup_table[hl[1]%5][byte1];
+       byte2 = lookup_table[hl[2]%5][byte2];
+       vertex = hl[(byte0 + byte1 + byte2)%3];
+               
+       return vertex;
+}
diff --git a/girepository/cmph/bdz_ph.h b/girepository/cmph/bdz_ph.h
new file mode 100755 (executable)
index 0000000..67b1fac
--- /dev/null
@@ -0,0 +1,42 @@
+#ifndef __CMPH_BDZ_PH_H__
+#define __CMPH_BDZ_PH_H__
+
+#include "cmph.h"
+
+typedef struct __bdz_ph_data_t bdz_ph_data_t;
+typedef struct __bdz_ph_config_data_t bdz_ph_config_data_t;
+
+bdz_ph_config_data_t *bdz_ph_config_new(void);
+void bdz_ph_config_set_hashfuncs(cmph_config_t *mph, CMPH_HASH *hashfuncs);
+void bdz_ph_config_destroy(cmph_config_t *mph);
+cmph_t *bdz_ph_new(cmph_config_t *mph, double c);
+
+void bdz_ph_load(FILE *f, cmph_t *mphf);
+int bdz_ph_dump(cmph_t *mphf, FILE *f);
+void bdz_ph_destroy(cmph_t *mphf);
+cmph_uint32 bdz_ph_search(cmph_t *mphf, const char *key, cmph_uint32 keylen);
+
+/** \fn void bdz_ph_pack(cmph_t *mphf, void *packed_mphf);
+ *  \brief Support the ability to pack a perfect hash function into a preallocated contiguous memory space pointed by packed_mphf.
+ *  \param mphf pointer to the resulting mphf
+ *  \param packed_mphf pointer to the contiguous memory area used to store the resulting mphf. The size of packed_mphf must be at least cmph_packed_size() 
+ */
+void bdz_ph_pack(cmph_t *mphf, void *packed_mphf);
+
+/** \fn cmph_uint32 bdz_ph_packed_size(cmph_t *mphf);
+ *  \brief Return the amount of space needed to pack mphf.
+ *  \param mphf pointer to a mphf
+ *  \return the size of the packed function or zero for failures
+ */ 
+cmph_uint32 bdz_ph_packed_size(cmph_t *mphf);
+
+/** cmph_uint32 bdz_ph_search(void *packed_mphf, const char *key, cmph_uint32 keylen);
+ *  \brief Use the packed mphf to do a search. 
+ *  \param  packed_mphf pointer to the packed mphf
+ *  \param key key to be hashed
+ *  \param keylen key legth in bytes
+ *  \return The mphf value
+ */
+cmph_uint32 bdz_ph_search_packed(void *packed_mphf, const char *key, cmph_uint32 keylen);
+
+#endif
diff --git a/girepository/cmph/bdz_structs.h b/girepository/cmph/bdz_structs.h
new file mode 100755 (executable)
index 0000000..ba7dc3c
--- /dev/null
@@ -0,0 +1,36 @@
+#ifndef __CMPH_BDZ_STRUCTS_H__
+#define __CMPH_BDZ_STRUCTS_H__
+
+#include "hash_state.h"
+
+struct __bdz_data_t
+{
+       cmph_uint32 m; //edges (words) count
+       cmph_uint32 n; //vertex count
+       cmph_uint32 r; //partition vertex count
+       cmph_uint8 *g;
+       hash_state_t *hl; // linear hashing
+
+       cmph_uint32 k; //kth index in ranktable, $k = log_2(n=3r)/\varepsilon$
+       cmph_uint8 b; // number of bits of k
+       cmph_uint32 ranktablesize; //number of entries in ranktable, $n/k +1$
+       cmph_uint32 *ranktable; // rank table
+};
+
+
+struct __bdz_config_data_t
+{
+       cmph_uint32 m; //edges (words) count
+       cmph_uint32 n; //vertex count
+       cmph_uint32 r; //partition vertex count
+       cmph_uint8 *g;
+       hash_state_t *hl; // linear hashing
+
+       cmph_uint32 k; //kth index in ranktable, $k = log_2(n=3r)/\varepsilon$
+       cmph_uint8 b; // number of bits of k
+       cmph_uint32 ranktablesize; //number of entries in ranktable, $n/k +1$
+       cmph_uint32 *ranktable; // rank table
+       CMPH_HASH hashfunc;
+};
+
+#endif
diff --git a/girepository/cmph/bdz_structs_ph.h b/girepository/cmph/bdz_structs_ph.h
new file mode 100755 (executable)
index 0000000..5874a26
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef __CMPH_BDZ_STRUCTS_PH_H__
+#define __CMPH_BDZ_STRUCTS_PH_H__
+
+#include "hash_state.h"
+
+struct __bdz_ph_data_t
+{
+       cmph_uint32 m; //edges (words) count
+       cmph_uint32 n; //vertex count
+       cmph_uint32 r; //partition vertex count
+       cmph_uint8 *g;
+       hash_state_t *hl; // linear hashing
+};
+
+
+struct __bdz_ph_config_data_t
+{
+       CMPH_HASH hashfunc;
+       cmph_uint32 m; //edges (words) count
+       cmph_uint32 n; //vertex count
+       cmph_uint32 r; //partition vertex count
+       cmph_uint8 *g;
+       hash_state_t *hl; // linear hashing
+};
+
+#endif
diff --git a/girepository/cmph/bitbool.h b/girepository/cmph/bitbool.h
new file mode 100644 (file)
index 0000000..a3286c3
--- /dev/null
@@ -0,0 +1,179 @@
+#ifndef _CMPH_BITBOOL_H__
+#define _CMPH_BITBOOL_H__
+#include "cmph_types.h" 
+
+static const cmph_uint8 bitmask[] = { 1, 1 << 1,  1 << 2,  1 << 3, 1 << 4, 1 << 5, 1 << 6, 1 << 7 };
+
+static const cmph_uint32 bitmask32[] = { 1,       1 << 1,  1 << 2,  1 << 3,  1 << 4,  1 << 5,  1 << 6, 1 << 7,
+                                         1 << 8,  1 << 9,  1 << 10, 1 << 11, 1 << 12, 1 << 13, 1 << 14, 1 << 15,
+                                         1 << 16, 1 << 17, 1 << 18, 1 << 19, 1 << 20, 1 << 21, 1 << 22, 1 << 23,
+                                         1 << 24, 1 << 25, 1 << 26, 1 << 27, 1 << 28, 1 << 29, 1 << 30, 1U << 31
+                                      };
+
+static const cmph_uint8 valuemask[] = { 0xfc, 0xf3, 0xcf, 0x3f};
+
+
+/** \def GETBIT(array, i)
+ *  \brief get the value of an 1-bit integer stored in an array. 
+ *  \param array to get 1-bit integer values from
+ *  \param i is the index in array to get the 1-bit integer value from
+ * 
+ * GETBIT(array, i) is a macro that gets the value of an 1-bit integer stored in array.
+ */
+#define GETBIT(array, i) ((array[i >> 3] & bitmask[i & 0x00000007]) >> (i & 0x00000007))
+
+/** \def SETBIT(array, i)
+ *  \brief set 1 to an 1-bit integer stored in an array. 
+ *  \param array to store 1-bit integer values
+ *  \param i is the index in array to set the the bit to 1
+ * 
+ * SETBIT(array, i) is a macro that sets 1 to an 1-bit integer stored in an array.
+ */
+#define SETBIT(array, i) (array[i >> 3] |= bitmask[i & 0x00000007])
+
+/** \def UNSETBIT(array, i)
+ *  \brief set 0 to an 1-bit integer stored in an array. 
+ *  \param array to store 1-bit integer values
+ *  \param i is the index in array to set the the bit to 0
+ * 
+ * UNSETBIT(array, i) is a macro that sets 0 to an 1-bit integer stored in an array.
+ */
+#define UNSETBIT(array, i) (array[i >> 3] ^= ((bitmask[i & 0x00000007])))
+
+//#define GETBIT(array, i) (array[(i) / 8] & bitmask[(i) % 8])
+//#define SETBIT(array, i) (array[(i) / 8] |= bitmask[(i) % 8])
+//#define UNSETBIT(array, i) (array[(i) / 8] ^= ((bitmask[(i) % 8])))
+
+
+/** \def SETVALUE1(array, i, v)
+ *  \brief set a value for a 2-bit integer stored in an array initialized with 1s. 
+ *  \param array to store 2-bit integer values
+ *  \param i is the index in array to set the value v
+ *  \param v is the value to be set
+ * 
+ * SETVALUE1(array, i, v) is a macro that set a value for a 2-bit integer stored in an array.
+ * The array should be initialized with all bits set to 1. For example:
+ * memset(array, 0xff, arraySize);
+ */
+#define SETVALUE1(array, i, v) (array[i >> 2] &= (cmph_uint8)((v << ((i & 0x00000003) << 1)) | valuemask[i & 0x00000003]))
+
+/** \def SETVALUE0(array, i, v)
+ *  \brief set a value for a 2-bit integer stored in an array initialized with 0s. 
+ *  \param array to store 2-bit integer values
+ *  \param i is the index in array to set the value v
+ *  \param v is the value to be set
+ * 
+ * SETVALUE0(array, i, v) is a macro that set a value for a 2-bit integer stored in an array.
+ * The array should be initialized with all bits set to 0. For example:
+ * memset(array, 0, arraySize);
+ */
+#define SETVALUE0(array, i, v) (array[i >> 2] |= (cmph_uint8)(v << ((i & 0x00000003) << 1)))
+
+
+/** \def GETVALUE(array, i)
+ *  \brief get a value for a 2-bit integer stored in an array. 
+ *  \param array to get 2-bit integer values from
+ *  \param i is the index in array to get the value from
+ * 
+ * GETVALUE(array, i) is a macro that get a value for a 2-bit integer stored in an array.
+ */
+#define GETVALUE(array, i) ((cmph_uint8)((array[i >> 2] >> ((i & 0x00000003U) << 1U)) & 0x00000003U))
+
+
+
+/** \def SETBIT32(array, i)
+ *  \brief set 1 to an 1-bit integer stored in an array of 32-bit words. 
+ *  \param array to store 1-bit integer values. The entries are 32-bit words.
+ *  \param i is the index in array to set the the bit to 1
+ * 
+ * SETBIT32(array, i) is a macro that sets 1 to an 1-bit integer stored in an array of 32-bit words.
+ */
+#define SETBIT32(array, i) (array[i >> 5] |= bitmask32[i & 0x0000001f])
+
+/** \def GETBIT32(array, i)
+ *  \brief get the value of an 1-bit integer stored in an array of 32-bit words. 
+ *  \param array to get 1-bit integer values from. The entries are 32-bit words.
+ *  \param i is the index in array to get the 1-bit integer value from
+ * 
+ * GETBIT32(array, i) is a macro that gets the value of an 1-bit integer stored in an array of 32-bit words.
+ */
+#define GETBIT32(array, i) (array[i >> 5] & bitmask32[i & 0x0000001f])
+
+/** \def UNSETBIT32(array, i)
+ *  \brief set 0 to an 1-bit integer stored in an array of 32-bit words. 
+ *  \param array to store 1-bit integer values. The entries ar 32-bit words
+ *  \param i is the index in array to set the the bit to 0
+ * 
+ * UNSETBIT32(array, i) is a macro that sets 0 to an 1-bit integer stored in an array of 32-bit words.
+ */
+#define UNSETBIT32(array, i) (array[i >> 5] ^= ((bitmask32[i & 0x0000001f])))
+
+#define BITS_TABLE_SIZE(n, bits_length) ((n * bits_length + 31) >> 5)
+
+static inline void set_bits_value(cmph_uint32 * bits_table, cmph_uint32 index, cmph_uint32 bits_string, 
+                                  cmph_uint32 string_length, cmph_uint32 string_mask)
+{
+       register cmph_uint32 bit_idx = index * string_length;
+       register cmph_uint32 word_idx = bit_idx >> 5;
+       register cmph_uint32 shift1 = bit_idx & 0x0000001f;
+       register cmph_uint32 shift2 = 32 - shift1;
+       
+       bits_table[word_idx] &= ~((string_mask) << shift1);
+       bits_table[word_idx] |= bits_string << shift1;
+       
+       if(shift2 < string_length)
+       {
+               bits_table[word_idx+1] &= ~((string_mask) >> shift2);
+               bits_table[word_idx+1] |= bits_string >> shift2;
+       };
+};
+
+static inline cmph_uint32 get_bits_value(cmph_uint32 * bits_table,cmph_uint32 index, cmph_uint32 string_length, cmph_uint32 string_mask)
+{
+       register cmph_uint32 bit_idx = index * string_length;
+       register cmph_uint32 word_idx = bit_idx >> 5;
+       register cmph_uint32 shift1 = bit_idx & 0x0000001f;
+       register cmph_uint32 shift2 = 32-shift1;
+       register cmph_uint32 bits_string;
+       
+       bits_string = (bits_table[word_idx] >> shift1) & string_mask;
+       
+       if(shift2 < string_length)
+               bits_string |= (bits_table[word_idx+1] << shift2) & string_mask;
+
+       return bits_string;
+};
+
+static inline void set_bits_at_pos(cmph_uint32 * bits_table, cmph_uint32 pos, cmph_uint32 bits_string, cmph_uint32 string_length)
+{
+       register cmph_uint32 word_idx = pos >> 5;
+       register cmph_uint32 shift1 = pos & 0x0000001f;
+       register cmph_uint32 shift2 = 32-shift1;
+       register cmph_uint32 string_mask = (1U << string_length) - 1;
+       
+       bits_table[word_idx] &= ~((string_mask) << shift1);
+       bits_table[word_idx] |= bits_string << shift1;
+       if(shift2 < string_length)
+       {
+               bits_table[word_idx+1] &= ~((string_mask) >> shift2);
+               bits_table[word_idx+1] |= bits_string >> shift2;
+       }
+};
+
+static inline cmph_uint32 get_bits_at_pos(cmph_uint32 * bits_table,cmph_uint32 pos,cmph_uint32 string_length)
+{
+       register cmph_uint32 word_idx = pos >> 5;
+       register cmph_uint32 shift1 = pos & 0x0000001f;
+       register cmph_uint32 shift2 = 32 - shift1;
+       register cmph_uint32 string_mask = (1U << string_length) - 1;
+       register cmph_uint32 bits_string;
+       
+       bits_string = (bits_table[word_idx] >> shift1) & string_mask;
+
+       if(shift2 < string_length)
+               bits_string |= (bits_table[word_idx+1] << shift2) & string_mask;
+       return bits_string;
+}
+
+
+#endif
diff --git a/girepository/cmph/bmz.c b/girepository/cmph/bmz.c
new file mode 100644 (file)
index 0000000..3eabfb7
--- /dev/null
@@ -0,0 +1,620 @@
+#include "graph.h"
+#include "bmz.h"
+#include "cmph_structs.h"
+#include "bmz_structs.h"
+#include "hash.h"
+#include "vqueue.h"
+#include "bitbool.h"
+
+#include <math.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <assert.h>
+#include <string.h>
+
+//#define DEBUG
+#include "debug.h"
+
+static int bmz_gen_edges(cmph_config_t *mph);
+static cmph_uint8 bmz_traverse_critical_nodes(bmz_config_data_t *bmz, cmph_uint32 v, cmph_uint32 * biggest_g_value, cmph_uint32 * biggest_edge_value, cmph_uint8 * used_edges, cmph_uint8 * visited);
+static cmph_uint8 bmz_traverse_critical_nodes_heuristic(bmz_config_data_t *bmz, cmph_uint32 v, cmph_uint32 * biggest_g_value, cmph_uint32 * biggest_edge_value, cmph_uint8 * used_edges, cmph_uint8 * visited);
+static void bmz_traverse_non_critical_nodes(bmz_config_data_t *bmz, cmph_uint8 * used_edges, cmph_uint8 * visited);
+
+bmz_config_data_t *bmz_config_new(void)
+{
+       bmz_config_data_t *bmz = NULL;
+       bmz = (bmz_config_data_t *)malloc(sizeof(bmz_config_data_t));
+       assert(bmz);
+       memset(bmz, 0, sizeof(bmz_config_data_t));
+       bmz->hashfuncs[0] = CMPH_HASH_JENKINS;
+       bmz->hashfuncs[1] = CMPH_HASH_JENKINS;
+       bmz->g = NULL;
+       bmz->graph = NULL;
+       bmz->hashes = NULL;
+       return bmz;
+}
+
+void bmz_config_destroy(cmph_config_t *mph)
+{
+       bmz_config_data_t *data = (bmz_config_data_t *)mph->data;
+       DEBUGP("Destroying algorithm dependent data\n");
+       free(data);
+}
+
+void bmz_config_set_hashfuncs(cmph_config_t *mph, CMPH_HASH *hashfuncs)
+{
+       bmz_config_data_t *bmz = (bmz_config_data_t *)mph->data;
+       CMPH_HASH *hashptr = hashfuncs;
+       cmph_uint32 i = 0;
+       while(*hashptr != CMPH_HASH_COUNT)
+       {
+               if (i >= 2) break; //bmz only uses two hash functions
+               bmz->hashfuncs[i] = *hashptr;   
+               ++i, ++hashptr;
+       }
+}
+
+cmph_t *bmz_new(cmph_config_t *mph, double c)
+{
+       cmph_t *mphf = NULL;
+       bmz_data_t *bmzf = NULL;
+       cmph_uint32 i;
+       cmph_uint32 iterations;
+       cmph_uint32 iterations_map = 20;
+       cmph_uint8 *used_edges = NULL;
+       cmph_uint8 restart_mapping = 0;
+       cmph_uint8 * visited = NULL;
+
+       bmz_config_data_t *bmz = (bmz_config_data_t *)mph->data;
+       if (c == 0) c = 1.15; // validating restrictions over parameter c.
+       DEBUGP("c: %f\n", c);
+       bmz->m = mph->key_source->nkeys;        
+       bmz->n = (cmph_uint32)ceil(c * mph->key_source->nkeys); 
+       DEBUGP("m (edges): %u n (vertices): %u c: %f\n", bmz->m, bmz->n, c);
+       bmz->graph = graph_new(bmz->n, bmz->m);
+       DEBUGP("Created graph\n");
+
+       bmz->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*3);
+       for(i = 0; i < 3; ++i) bmz->hashes[i] = NULL;
+
+       do
+       {
+         // Mapping step
+         cmph_uint32 biggest_g_value = 0;
+         cmph_uint32 biggest_edge_value = 1;   
+         iterations = 100;
+         if (mph->verbosity)
+         {
+               fprintf(stderr, "Entering mapping step for mph creation of %u keys with graph sized %u\n", bmz->m, bmz->n);
+         }
+         while(1)
+         {
+               int ok;
+               DEBUGP("hash function 1\n");
+               bmz->hashes[0] = hash_state_new(bmz->hashfuncs[0], bmz->n);
+               DEBUGP("hash function 2\n");
+               bmz->hashes[1] = hash_state_new(bmz->hashfuncs[1], bmz->n);
+               DEBUGP("Generating edges\n");
+               ok = bmz_gen_edges(mph);
+               if (!ok)
+               {
+                       --iterations;
+                       hash_state_destroy(bmz->hashes[0]);
+                       bmz->hashes[0] = NULL;
+                       hash_state_destroy(bmz->hashes[1]);
+                       bmz->hashes[1] = NULL;
+                       DEBUGP("%u iterations remaining\n", iterations);
+                       if (mph->verbosity)
+                       {
+                               fprintf(stderr, "simple graph creation failure - %u iterations remaining\n", iterations);
+                       }
+                       if (iterations == 0) break;
+               } 
+               else break;
+         }
+         if (iterations == 0)
+         {
+               graph_destroy(bmz->graph);      
+               return NULL;
+         }
+         // Ordering step
+         if (mph->verbosity)
+         {
+               fprintf(stderr, "Starting ordering step\n");
+         }
+         graph_obtain_critical_nodes(bmz->graph);
+
+         // Searching step
+         if (mph->verbosity)
+         {
+               fprintf(stderr, "Starting Searching step.\n");
+               fprintf(stderr, "\tTraversing critical vertices.\n");
+         }
+         DEBUGP("Searching step\n");
+         visited = (cmph_uint8 *)malloc((size_t)bmz->n/8 + 1);
+         memset(visited, 0, (size_t)bmz->n/8 + 1);
+         used_edges = (cmph_uint8 *)malloc((size_t)bmz->m/8 + 1);
+         memset(used_edges, 0, (size_t)bmz->m/8 + 1);
+         free(bmz->g);
+         bmz->g = (cmph_uint32 *)calloc((size_t)bmz->n, sizeof(cmph_uint32));
+         assert(bmz->g);
+         for (i = 0; i < bmz->n; ++i) // critical nodes
+         {
+                if (graph_node_is_critical(bmz->graph, i) && (!GETBIT(visited,i)))
+               {
+                 if(c > 1.14) restart_mapping = bmz_traverse_critical_nodes(bmz, i, &biggest_g_value, &biggest_edge_value, used_edges, visited);
+                 else restart_mapping = bmz_traverse_critical_nodes_heuristic(bmz, i, &biggest_g_value, &biggest_edge_value, used_edges, visited);
+                 if(restart_mapping) break;
+               }
+         }
+         if(!restart_mapping)
+         {
+               if (mph->verbosity)
+               {
+                 fprintf(stderr, "\tTraversing non critical vertices.\n");
+               }
+               bmz_traverse_non_critical_nodes(bmz, used_edges, visited); // non_critical_nodes
+         }
+         else 
+         {
+               iterations_map--;
+               if (mph->verbosity) fprintf(stderr, "Restarting mapping step. %u iterations remaining.\n", iterations_map);
+         }    
+         free(used_edges);
+         free(visited);
+        }while(restart_mapping && iterations_map > 0);
+       graph_destroy(bmz->graph);
+       bmz->graph = NULL;
+       if (iterations_map == 0) 
+       {
+               return NULL;
+       }
+       mphf = (cmph_t *)malloc(sizeof(cmph_t));
+       mphf->algo = mph->algo;
+       bmzf = (bmz_data_t *)malloc(sizeof(bmz_data_t));
+       bmzf->g = bmz->g;
+       bmz->g = NULL; //transfer memory ownership
+       bmzf->hashes = bmz->hashes;
+       bmz->hashes = NULL; //transfer memory ownership
+       bmzf->n = bmz->n;
+       bmzf->m = bmz->m;
+       mphf->data = bmzf;
+       mphf->size = bmz->m;
+
+       DEBUGP("Successfully generated minimal perfect hash\n");
+       if (mph->verbosity)
+       {
+               fprintf(stderr, "Successfully generated minimal perfect hash function\n");
+       }
+       return mphf;
+}
+
+static cmph_uint8 bmz_traverse_critical_nodes(bmz_config_data_t *bmz, cmph_uint32 v, cmph_uint32 * biggest_g_value, cmph_uint32 * biggest_edge_value, cmph_uint8 * used_edges, cmph_uint8 * visited)
+{
+        cmph_uint32 next_g;
+       cmph_uint32 u;   /* Auxiliary vertex */
+       cmph_uint32 lav; /* lookahead vertex */
+       cmph_uint8 collision;
+       vqueue_t * q = vqueue_new((cmph_uint32)(graph_ncritical_nodes(bmz->graph)) + 1);
+       graph_iterator_t it, it1;
+
+       DEBUGP("Labelling critical vertices\n");
+       bmz->g[v] = (cmph_uint32)ceil ((double)(*biggest_edge_value)/2) - 1;
+       SETBIT(visited, v);
+       next_g    = (cmph_uint32)floor((double)(*biggest_edge_value/2)); /* next_g is incremented in the do..while statement*/
+       vqueue_insert(q, v);
+       while(!vqueue_is_empty(q))
+       {
+               v = vqueue_remove(q);
+               it = graph_neighbors_it(bmz->graph, v);         
+               while ((u = graph_next_neighbor(bmz->graph, &it)) != GRAPH_NO_NEIGHBOR)
+               {                       
+                               if (graph_node_is_critical(bmz->graph, u) && (!GETBIT(visited,u)))
+                       {
+                               collision = 1;
+                               while(collision) // lookahead to resolve collisions
+                               {
+                                       next_g = *biggest_g_value + 1; 
+                                       it1 = graph_neighbors_it(bmz->graph, u);
+                                       collision = 0;
+                                       while((lav = graph_next_neighbor(bmz->graph, &it1)) != GRAPH_NO_NEIGHBOR)
+                                       {
+                                               if (graph_node_is_critical(bmz->graph, lav) && GETBIT(visited,lav))
+                                               {
+                                                       if(next_g + bmz->g[lav] >= bmz->m)
+                                                       {
+                                                               vqueue_destroy(q);
+                                                               return 1; // restart mapping step.
+                                                       }
+                                                       if (GETBIT(used_edges, (next_g + bmz->g[lav]))) 
+                                                       {
+                                                               collision = 1;
+                                                               break;
+                                                       }
+                                               }
+                                       }
+                                       if (next_g > *biggest_g_value) *biggest_g_value = next_g;
+                               }               
+                               // Marking used edges...
+                               it1 = graph_neighbors_it(bmz->graph, u);
+                               while((lav = graph_next_neighbor(bmz->graph, &it1)) != GRAPH_NO_NEIGHBOR)
+                               {
+                                       if (graph_node_is_critical(bmz->graph, lav) && GETBIT(visited, lav))
+                                       {
+                                               SETBIT(used_edges,(next_g + bmz->g[lav]));
+                                               if(next_g + bmz->g[lav] > *biggest_edge_value) *biggest_edge_value = next_g + bmz->g[lav];
+                                       }
+                               }
+                               bmz->g[u] = next_g; // Labelling vertex u.
+                               SETBIT(visited,u);
+                               vqueue_insert(q, u);
+                       }                       
+               }
+                
+       }
+       vqueue_destroy(q);
+       return 0;
+}
+
+static cmph_uint8 bmz_traverse_critical_nodes_heuristic(bmz_config_data_t *bmz, cmph_uint32 v, cmph_uint32 * biggest_g_value, cmph_uint32 * biggest_edge_value, cmph_uint8 * used_edges, cmph_uint8 * visited)
+{
+        cmph_uint32 next_g;
+       cmph_uint32 u;   /* Auxiliary vertex */
+       cmph_uint32 lav; /* lookahead vertex */
+       cmph_uint8 collision;
+       cmph_uint32 * unused_g_values = NULL;
+       cmph_uint32 unused_g_values_capacity = 0;
+       cmph_uint32 nunused_g_values = 0;
+       vqueue_t * q = vqueue_new((cmph_uint32)(0.5*graph_ncritical_nodes(bmz->graph))+1);
+       graph_iterator_t it, it1;
+
+       DEBUGP("Labelling critical vertices\n");
+       bmz->g[v] = (cmph_uint32)ceil ((double)(*biggest_edge_value)/2) - 1;
+       SETBIT(visited, v);
+       next_g    = (cmph_uint32)floor((double)(*biggest_edge_value/2)); /* next_g is incremented in the do..while statement*/
+       vqueue_insert(q, v);
+       while(!vqueue_is_empty(q))
+       {
+               v = vqueue_remove(q);
+               it = graph_neighbors_it(bmz->graph, v);         
+               while ((u = graph_next_neighbor(bmz->graph, &it)) != GRAPH_NO_NEIGHBOR)
+               {                       
+                               if (graph_node_is_critical(bmz->graph, u) && (!GETBIT(visited,u)))
+                       {
+                               cmph_uint32 next_g_index = 0;
+                               collision = 1;
+                               while(collision) // lookahead to resolve collisions
+                               {
+                                       if (next_g_index < nunused_g_values) 
+                                       {
+                                               next_g = unused_g_values[next_g_index++];                                               
+                                       }
+                                       else    
+                                       {
+                                               next_g = *biggest_g_value + 1; 
+                                               next_g_index = UINT_MAX;
+                                       }
+                                       it1 = graph_neighbors_it(bmz->graph, u);
+                                       collision = 0;
+                                       while((lav = graph_next_neighbor(bmz->graph, &it1)) != GRAPH_NO_NEIGHBOR)
+                                       {
+                                               if (graph_node_is_critical(bmz->graph, lav) && GETBIT(visited,lav))
+                                               {
+                                                       if(next_g + bmz->g[lav] >= bmz->m)
+                                                       {
+                                                               vqueue_destroy(q);
+                                                               free(unused_g_values);
+                                                               return 1; // restart mapping step.
+                                                       }
+                                                       if (GETBIT(used_edges, (next_g + bmz->g[lav]))) 
+                                                       {
+                                                               collision = 1;
+                                                               break;
+                                                       }
+                                               }
+                                       }
+                                       if(collision && (next_g > *biggest_g_value)) // saving the current g value stored in next_g.
+                                       {
+                                               if(nunused_g_values == unused_g_values_capacity)
+                                               {
+                                                       unused_g_values = (cmph_uint32 *)realloc(unused_g_values, (unused_g_values_capacity + BUFSIZ)*sizeof(cmph_uint32));
+                                                       unused_g_values_capacity += BUFSIZ;                                                     
+                                               } 
+                                               unused_g_values[nunused_g_values++] = next_g;                                                   
+
+                                       }
+                                       if (next_g > *biggest_g_value) *biggest_g_value = next_g;
+                               }       
+                               next_g_index--;
+                               if (next_g_index < nunused_g_values) unused_g_values[next_g_index] = unused_g_values[--nunused_g_values];
+
+                               // Marking used edges...
+                               it1 = graph_neighbors_it(bmz->graph, u);
+                               while((lav = graph_next_neighbor(bmz->graph, &it1)) != GRAPH_NO_NEIGHBOR)
+                               {
+                                       if (graph_node_is_critical(bmz->graph, lav) && GETBIT(visited, lav))
+                                       {
+                                               SETBIT(used_edges,(next_g + bmz->g[lav]));
+                                               if(next_g + bmz->g[lav] > *biggest_edge_value) *biggest_edge_value = next_g + bmz->g[lav];
+                                       }
+                               }
+                               bmz->g[u] = next_g; // Labelling vertex u.
+                               SETBIT(visited, u);
+                               vqueue_insert(q, u);
+                       }                       
+               }
+                
+       }
+       vqueue_destroy(q);
+       free(unused_g_values);
+       return 0;  
+}
+
+static cmph_uint32 next_unused_edge(bmz_config_data_t *bmz, cmph_uint8 * used_edges, cmph_uint32 unused_edge_index)
+{
+       while(1)
+       {
+               assert(unused_edge_index < bmz->m);
+               if(GETBIT(used_edges, unused_edge_index)) unused_edge_index ++;
+               else break;
+       }
+       return unused_edge_index;
+}
+
+static void bmz_traverse(bmz_config_data_t *bmz, cmph_uint8 * used_edges, cmph_uint32 v, cmph_uint32 * unused_edge_index, cmph_uint8 * visited)
+{
+       graph_iterator_t it = graph_neighbors_it(bmz->graph, v);
+       cmph_uint32 neighbor = 0;
+       while((neighbor = graph_next_neighbor(bmz->graph, &it)) != GRAPH_NO_NEIGHBOR)
+       {
+               if(GETBIT(visited,neighbor)) continue;
+               //DEBUGP("Visiting neighbor %u\n", neighbor);
+               *unused_edge_index = next_unused_edge(bmz, used_edges, *unused_edge_index);
+               bmz->g[neighbor] = *unused_edge_index - bmz->g[v];
+               //if (bmz->g[neighbor] >= bmz->m) bmz->g[neighbor] += bmz->m;
+               SETBIT(visited, neighbor);
+               (*unused_edge_index)++;
+               bmz_traverse(bmz, used_edges, neighbor, unused_edge_index, visited);
+               
+       }  
+}
+
+static void bmz_traverse_non_critical_nodes(bmz_config_data_t *bmz, cmph_uint8 * used_edges, cmph_uint8 * visited)
+{
+
+       cmph_uint32 i, v1, v2, unused_edge_index = 0;
+       DEBUGP("Labelling non critical vertices\n");
+       for(i = 0; i < bmz->m; i++)
+       {
+               v1 = graph_vertex_id(bmz->graph, i, 0);
+               v2 = graph_vertex_id(bmz->graph, i, 1);
+               if((GETBIT(visited,v1) && GETBIT(visited,v2)) || (!GETBIT(visited,v1) && !GETBIT(visited,v2))) continue;                                        
+               if(GETBIT(visited,v1)) bmz_traverse(bmz, used_edges, v1, &unused_edge_index, visited);
+               else bmz_traverse(bmz, used_edges, v2, &unused_edge_index, visited);
+
+       }
+
+       for(i = 0; i < bmz->n; i++)
+       {
+               if(!GETBIT(visited,i))
+               {                               
+                       bmz->g[i] = 0;
+                       SETBIT(visited, i);
+                       bmz_traverse(bmz, used_edges, i, &unused_edge_index, visited);
+               }
+       }
+
+}
+               
+static int bmz_gen_edges(cmph_config_t *mph)
+{
+       cmph_uint32 e;
+       bmz_config_data_t *bmz = (bmz_config_data_t *)mph->data;
+       cmph_uint8 multiple_edges = 0;
+       DEBUGP("Generating edges for %u vertices\n", bmz->n);
+       graph_clear_edges(bmz->graph);  
+       mph->key_source->rewind(mph->key_source->data);
+       for (e = 0; e < mph->key_source->nkeys; ++e)
+       {
+               cmph_uint32 h1, h2;
+               cmph_uint32 keylen;
+               char *key = NULL;
+               mph->key_source->read(mph->key_source->data, &key, &keylen);
+               
+//             if (key == NULL)fprintf(stderr, "key = %s -- read BMZ\n", key);
+               h1 = hash(bmz->hashes[0], key, keylen) % bmz->n;
+               h2 = hash(bmz->hashes[1], key, keylen) % bmz->n;
+               if (h1 == h2) if (++h2 >= bmz->n) h2 = 0;
+               if (h1 == h2) 
+               {
+                       if (mph->verbosity) fprintf(stderr, "Self loop for key %u\n", e);
+                       mph->key_source->dispose(mph->key_source->data, key, keylen);
+                       return 0;
+               }
+               //DEBUGP("Adding edge: %u -> %u for key %s\n", h1, h2, key);
+               mph->key_source->dispose(mph->key_source->data, key, keylen);
+//             fprintf(stderr, "key = %s -- dispose BMZ\n", key);
+               multiple_edges = graph_contains_edge(bmz->graph, h1, h2);
+               if (mph->verbosity && multiple_edges) fprintf(stderr, "A non simple graph was generated\n");
+               if (multiple_edges) return 0; // checking multiple edge restriction.
+               graph_add_edge(bmz->graph, h1, h2);
+       }
+       return !multiple_edges;
+}
+
+int bmz_dump(cmph_t *mphf, FILE *fd)
+{
+       char *buf = NULL;
+       cmph_uint32 buflen;
+       cmph_uint32 two = 2; //number of hash functions
+       bmz_data_t *data = (bmz_data_t *)mphf->data;
+       register size_t nbytes;
+       __cmph_dump(mphf, fd);
+
+       nbytes = fwrite(&two, sizeof(cmph_uint32), (size_t)1, fd);
+
+       hash_state_dump(data->hashes[0], &buf, &buflen);
+       DEBUGP("Dumping hash state with %u bytes to disk\n", buflen);
+       nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd);
+       nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd);
+       free(buf);
+
+       hash_state_dump(data->hashes[1], &buf, &buflen);
+       DEBUGP("Dumping hash state with %u bytes to disk\n", buflen);
+       nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd);
+       nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd);
+       free(buf);
+
+       nbytes = fwrite(&(data->n), sizeof(cmph_uint32), (size_t)1, fd);
+       nbytes = fwrite(&(data->m), sizeof(cmph_uint32), (size_t)1, fd);
+       
+       nbytes = fwrite(data->g, sizeof(cmph_uint32)*(data->n), (size_t)1, fd);
+       #ifdef DEBUG
+       cmph_uint32 i;
+       fprintf(stderr, "G: ");
+       for (i = 0; i < data->n; ++i) fprintf(stderr, "%u ", data->g[i]);
+       fprintf(stderr, "\n");
+       #endif
+       return 1;
+}
+
+void bmz_load(FILE *f, cmph_t *mphf)
+{
+       cmph_uint32 nhashes;
+       char *buf = NULL;
+       cmph_uint32 buflen;
+       cmph_uint32 i;
+       bmz_data_t *bmz = (bmz_data_t *)malloc(sizeof(bmz_data_t));
+       register size_t nbytes;
+       DEBUGP("Loading bmz mphf\n");
+       mphf->data = bmz;
+       nbytes = fread(&nhashes, sizeof(cmph_uint32), (size_t)1, f);
+       bmz->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(nhashes + 1));
+       bmz->hashes[nhashes] = NULL;
+       DEBUGP("Reading %u hashes\n", nhashes);
+       for (i = 0; i < nhashes; ++i)
+       {
+               hash_state_t *state = NULL;
+               nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f);
+               DEBUGP("Hash state has %u bytes\n", buflen);
+               buf = (char *)malloc((size_t)buflen);
+               nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
+               state = hash_state_load(buf, buflen);
+               bmz->hashes[i] = state;
+               free(buf);
+       }
+
+       DEBUGP("Reading m and n\n");
+       nbytes = fread(&(bmz->n), sizeof(cmph_uint32), (size_t)1, f);   
+       nbytes = fread(&(bmz->m), sizeof(cmph_uint32), (size_t)1, f);   
+
+       bmz->g = (cmph_uint32 *)malloc(sizeof(cmph_uint32)*bmz->n);
+       nbytes = fread(bmz->g, bmz->n*sizeof(cmph_uint32), (size_t)1, f);
+       #ifdef DEBUG
+       fprintf(stderr, "G: ");
+       for (i = 0; i < bmz->n; ++i) fprintf(stderr, "%u ", bmz->g[i]);
+       fprintf(stderr, "\n");
+       #endif
+       return;
+}
+               
+
+cmph_uint32 bmz_search(cmph_t *mphf, const char *key, cmph_uint32 keylen)
+{
+       bmz_data_t *bmz = mphf->data;
+       cmph_uint32 h1 = hash(bmz->hashes[0], key, keylen) % bmz->n;
+       cmph_uint32 h2 = hash(bmz->hashes[1], key, keylen) % bmz->n;
+       DEBUGP("key: %s h1: %u h2: %u\n", key, h1, h2);
+       if (h1 == h2 && ++h2 > bmz->n) h2 = 0;
+       DEBUGP("key: %s g[h1]: %u g[h2]: %u edges: %u\n", key, bmz->g[h1], bmz->g[h2], bmz->m);
+       return bmz->g[h1] + bmz->g[h2];
+}
+void bmz_destroy(cmph_t *mphf)
+{
+       bmz_data_t *data = (bmz_data_t *)mphf->data;
+       free(data->g);  
+       hash_state_destroy(data->hashes[0]);
+       hash_state_destroy(data->hashes[1]);
+       free(data->hashes);
+       free(data);
+       free(mphf);
+}
+
+/** \fn void bmz_pack(cmph_t *mphf, void *packed_mphf);
+ *  \brief Support the ability to pack a perfect hash function into a preallocated contiguous memory space pointed by packed_mphf.
+ *  \param mphf pointer to the resulting mphf
+ *  \param packed_mphf pointer to the contiguous memory area used to store the resulting mphf. The size of packed_mphf must be at least cmph_packed_size() 
+ */
+void bmz_pack(cmph_t *mphf, void *packed_mphf)
+{
+
+       bmz_data_t *data = (bmz_data_t *)mphf->data;
+       cmph_uint8 * ptr = packed_mphf;
+
+       // packing h1 type
+       CMPH_HASH h1_type = hash_get_type(data->hashes[0]);
+       *((cmph_uint32 *) ptr) = h1_type;
+       ptr += sizeof(cmph_uint32);
+
+       // packing h1
+       hash_state_pack(data->hashes[0], ptr);
+       ptr += hash_state_packed_size(h1_type);
+
+       // packing h2 type
+       CMPH_HASH h2_type = hash_get_type(data->hashes[1]);
+       *((cmph_uint32 *) ptr) = h2_type;
+       ptr += sizeof(cmph_uint32);
+
+       // packing h2
+       hash_state_pack(data->hashes[1], ptr);
+       ptr += hash_state_packed_size(h2_type);
+
+       // packing n
+       *((cmph_uint32 *) ptr) = data->n;
+       ptr += sizeof(data->n);
+
+       // packing g
+       memcpy(ptr, data->g, sizeof(cmph_uint32)*data->n);      
+}
+
+/** \fn cmph_uint32 bmz_packed_size(cmph_t *mphf);
+ *  \brief Return the amount of space needed to pack mphf.
+ *  \param mphf pointer to a mphf
+ *  \return the size of the packed function or zero for failures
+ */ 
+cmph_uint32 bmz_packed_size(cmph_t *mphf)
+{
+       bmz_data_t *data = (bmz_data_t *)mphf->data;
+       CMPH_HASH h1_type = hash_get_type(data->hashes[0]); 
+       CMPH_HASH h2_type = hash_get_type(data->hashes[1]); 
+
+       return (cmph_uint32)(sizeof(CMPH_ALGO) + hash_state_packed_size(h1_type) + hash_state_packed_size(h2_type) + 
+                       3*sizeof(cmph_uint32) + sizeof(cmph_uint32)*data->n);
+}
+
+/** cmph_uint32 bmz_search(void *packed_mphf, const char *key, cmph_uint32 keylen);
+ *  \brief Use the packed mphf to do a search. 
+ *  \param  packed_mphf pointer to the packed mphf
+ *  \param key key to be hashed
+ *  \param keylen key legth in bytes
+ *  \return The mphf value
+ */
+cmph_uint32 bmz_search_packed(void *packed_mphf, const char *key, cmph_uint32 keylen)
+{
+       register cmph_uint8 *h1_ptr = packed_mphf;
+       register CMPH_HASH h1_type  = *((cmph_uint32 *)h1_ptr);
+       h1_ptr += 4;
+
+       register cmph_uint8 *h2_ptr = h1_ptr + hash_state_packed_size(h1_type);
+       register CMPH_HASH h2_type  = *((cmph_uint32 *)h2_ptr);
+       h2_ptr += 4;
+       
+       register cmph_uint32 *g_ptr = (cmph_uint32 *)(h2_ptr + hash_state_packed_size(h2_type));
+       
+       register cmph_uint32 n = *g_ptr++;  
+       
+       register cmph_uint32 h1 = hash_packed(h1_ptr, h1_type, key, keylen) % n; 
+       register cmph_uint32 h2 = hash_packed(h2_ptr, h2_type, key, keylen) % n; 
+       if (h1 == h2 && ++h2 > n) h2 = 0;
+       return (g_ptr[h1] + g_ptr[h2]); 
+}
diff --git a/girepository/cmph/bmz.h b/girepository/cmph/bmz.h
new file mode 100644 (file)
index 0000000..9821aa8
--- /dev/null
@@ -0,0 +1,42 @@
+#ifndef __CMPH_BMZ_H__
+#define __CMPH_BMZ_H__
+
+#include "cmph.h"
+
+typedef struct __bmz_data_t bmz_data_t;
+typedef struct __bmz_config_data_t bmz_config_data_t;
+
+bmz_config_data_t *bmz_config_new(void);
+void bmz_config_set_hashfuncs(cmph_config_t *mph, CMPH_HASH *hashfuncs);
+void bmz_config_destroy(cmph_config_t *mph);
+cmph_t *bmz_new(cmph_config_t *mph, double c);
+
+void bmz_load(FILE *f, cmph_t *mphf);
+int bmz_dump(cmph_t *mphf, FILE *f);
+void bmz_destroy(cmph_t *mphf);
+cmph_uint32 bmz_search(cmph_t *mphf, const char *key, cmph_uint32 keylen);
+
+/** \fn void bmz_pack(cmph_t *mphf, void *packed_mphf);
+ *  \brief Support the ability to pack a perfect hash function into a preallocated contiguous memory space pointed by packed_mphf.
+ *  \param mphf pointer to the resulting mphf
+ *  \param packed_mphf pointer to the contiguous memory area used to store the resulting mphf. The size of packed_mphf must be at least cmph_packed_size() 
+ */
+void bmz_pack(cmph_t *mphf, void *packed_mphf);
+
+/** \fn cmph_uint32 bmz_packed_size(cmph_t *mphf);
+ *  \brief Return the amount of space needed to pack mphf.
+ *  \param mphf pointer to a mphf
+ *  \return the size of the packed function or zero for failures
+ */ 
+cmph_uint32 bmz_packed_size(cmph_t *mphf);
+
+/** cmph_uint32 bmz_search(void *packed_mphf, const char *key, cmph_uint32 keylen);
+ *  \brief Use the packed mphf to do a search. 
+ *  \param  packed_mphf pointer to the packed mphf
+ *  \param key key to be hashed
+ *  \param keylen key legth in bytes
+ *  \return The mphf value
+ */
+cmph_uint32 bmz_search_packed(void *packed_mphf, const char *key, cmph_uint32 keylen);
+
+#endif
diff --git a/girepository/cmph/bmz8.c b/girepository/cmph/bmz8.c
new file mode 100644 (file)
index 0000000..4db4dfc
--- /dev/null
@@ -0,0 +1,632 @@
+#include "graph.h"
+#include "bmz8.h"
+#include "cmph_structs.h"
+#include "bmz8_structs.h"
+#include "hash.h"
+#include "vqueue.h"
+#include "bitbool.h"
+#include <math.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <assert.h>
+#include <string.h>
+
+//#define DEBUG
+#include "debug.h"
+
+static int bmz8_gen_edges(cmph_config_t *mph);
+static cmph_uint8 bmz8_traverse_critical_nodes(bmz8_config_data_t *bmz8, cmph_uint32 v, cmph_uint8 * biggest_g_value, cmph_uint8 * biggest_edge_value, cmph_uint8 * used_edges, cmph_uint8 * visited);
+static cmph_uint8 bmz8_traverse_critical_nodes_heuristic(bmz8_config_data_t *bmz8, cmph_uint32 v, cmph_uint8 * biggest_g_value, cmph_uint8 * biggest_edge_value, cmph_uint8 * used_edges, cmph_uint8 * visited);
+static void bmz8_traverse_non_critical_nodes(bmz8_config_data_t *bmz8, cmph_uint8 * used_edges, cmph_uint8 * visited);
+
+bmz8_config_data_t *bmz8_config_new(void)
+{
+       bmz8_config_data_t *bmz8;
+       bmz8 = (bmz8_config_data_t *)malloc(sizeof(bmz8_config_data_t));
+       assert(bmz8);
+       memset(bmz8, 0, sizeof(bmz8_config_data_t));
+       bmz8->hashfuncs[0] = CMPH_HASH_JENKINS;
+       bmz8->hashfuncs[1] = CMPH_HASH_JENKINS;
+       bmz8->g = NULL;
+       bmz8->graph = NULL;
+       bmz8->hashes = NULL;
+       return bmz8;
+}
+
+void bmz8_config_destroy(cmph_config_t *mph)
+{
+       bmz8_config_data_t *data = (bmz8_config_data_t *)mph->data;
+       DEBUGP("Destroying algorithm dependent data\n");
+       free(data);
+}
+
+void bmz8_config_set_hashfuncs(cmph_config_t *mph, CMPH_HASH *hashfuncs)
+{
+       bmz8_config_data_t *bmz8 = (bmz8_config_data_t *)mph->data;
+       CMPH_HASH *hashptr = hashfuncs;
+       cmph_uint8 i = 0;
+       while(*hashptr != CMPH_HASH_COUNT)
+       {
+               if (i >= 2) break; //bmz8 only uses two hash functions
+               bmz8->hashfuncs[i] = *hashptr;  
+               ++i, ++hashptr;
+       }
+}
+
+cmph_t *bmz8_new(cmph_config_t *mph, double c)
+{
+       cmph_t *mphf = NULL;
+       bmz8_data_t *bmz8f = NULL;
+       cmph_uint8 i;
+       cmph_uint8 iterations;
+       cmph_uint8 iterations_map = 20;
+       cmph_uint8 *used_edges = NULL;
+       cmph_uint8 restart_mapping = 0;
+       cmph_uint8 * visited = NULL;
+       bmz8_config_data_t *bmz8 = (bmz8_config_data_t *)mph->data;
+       
+       if (mph->key_source->nkeys >= 256)
+       {
+               if (mph->verbosity) fprintf(stderr, "The number of keys in BMZ8 must be lower than 256.\n");
+               return NULL;
+       }
+       if (c == 0) c = 1.15; // validating restrictions over parameter c.
+       DEBUGP("c: %f\n", c);
+       bmz8->m = (cmph_uint8) mph->key_source->nkeys;  
+       bmz8->n = (cmph_uint8) ceil(c * mph->key_source->nkeys);        
+       DEBUGP("m (edges): %u n (vertices): %u c: %f\n", bmz8->m, bmz8->n, c);
+       bmz8->graph = graph_new(bmz8->n, bmz8->m);
+       DEBUGP("Created graph\n");
+
+       bmz8->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*3);
+       for(i = 0; i < 3; ++i) bmz8->hashes[i] = NULL;
+
+       do
+       {
+         // Mapping step
+         cmph_uint8 biggest_g_value = 0;
+         cmph_uint8 biggest_edge_value = 1;
+         iterations = 100;
+         if (mph->verbosity)
+         {
+               fprintf(stderr, "Entering mapping step for mph creation of %u keys with graph sized %u\n", bmz8->m, bmz8->n);
+         }
+         while(1)
+         {
+               int ok;
+               DEBUGP("hash function 1\n");
+               bmz8->hashes[0] = hash_state_new(bmz8->hashfuncs[0], bmz8->n);
+               DEBUGP("hash function 2\n");
+               bmz8->hashes[1] = hash_state_new(bmz8->hashfuncs[1], bmz8->n);
+               DEBUGP("Generating edges\n");
+               ok = bmz8_gen_edges(mph);
+               if (!ok)
+               {
+                       --iterations;
+                       hash_state_destroy(bmz8->hashes[0]);
+                       bmz8->hashes[0] = NULL;
+                       hash_state_destroy(bmz8->hashes[1]);
+                       bmz8->hashes[1] = NULL;
+                       DEBUGP("%u iterations remaining\n", iterations);
+                       if (mph->verbosity)
+                       {
+                               fprintf(stderr, "simple graph creation failure - %u iterations remaining\n", iterations);
+                       }
+                       if (iterations == 0) break;
+               } 
+               else break;     
+         }
+         if (iterations == 0)
+         {
+               graph_destroy(bmz8->graph);
+               return NULL;
+         }
+
+         // Ordering step
+         if (mph->verbosity)
+         {
+               fprintf(stderr, "Starting ordering step\n");
+         }
+
+         graph_obtain_critical_nodes(bmz8->graph);
+
+         // Searching step
+         if (mph->verbosity)
+         {
+               fprintf(stderr, "Starting Searching step.\n");
+               fprintf(stderr, "\tTraversing critical vertices.\n");
+         }
+         DEBUGP("Searching step\n");
+         visited = (cmph_uint8 *)malloc((size_t)bmz8->n/8 + 1);
+         memset(visited, 0, (size_t)bmz8->n/8 + 1);
+         used_edges = (cmph_uint8 *)malloc((size_t)bmz8->m/8 + 1);
+         memset(used_edges, 0, (size_t)bmz8->m/8 + 1);
+         free(bmz8->g);
+         bmz8->g = (cmph_uint8 *)calloc((size_t)bmz8->n, sizeof(cmph_uint8));
+         assert(bmz8->g);
+         for (i = 0; i < bmz8->n; ++i) // critical nodes
+         {
+                if (graph_node_is_critical(bmz8->graph, i) && (!GETBIT(visited,i)))
+               {
+                 if(c > 1.14) restart_mapping = bmz8_traverse_critical_nodes(bmz8, i, &biggest_g_value, &biggest_edge_value, used_edges, visited);
+                 else restart_mapping = bmz8_traverse_critical_nodes_heuristic(bmz8, i, &biggest_g_value, &biggest_edge_value, used_edges, visited);
+                 if(restart_mapping) break;
+               }
+         }
+         if(!restart_mapping)
+         {
+               if (mph->verbosity)
+               {
+                 fprintf(stderr, "\tTraversing non critical vertices.\n");
+               }
+               bmz8_traverse_non_critical_nodes(bmz8, used_edges, visited); // non_critical_nodes
+         }
+         else 
+         {
+               iterations_map--;
+               if (mph->verbosity) fprintf(stderr, "Restarting mapping step. %u iterations remaining.\n", iterations_map);
+         }    
+
+         free(used_edges);
+         free(visited);
+
+       }while(restart_mapping && iterations_map > 0);
+       graph_destroy(bmz8->graph);     
+       bmz8->graph = NULL;
+       if (iterations_map == 0) 
+       {
+               return NULL;
+       }
+       mphf = (cmph_t *)malloc(sizeof(cmph_t));
+       mphf->algo = mph->algo;
+       bmz8f = (bmz8_data_t *)malloc(sizeof(bmz8_data_t));
+       bmz8f->g = bmz8->g;
+       bmz8->g = NULL; //transfer memory ownership
+       bmz8f->hashes = bmz8->hashes;
+       bmz8->hashes = NULL; //transfer memory ownership
+       bmz8f->n = bmz8->n;
+       bmz8f->m = bmz8->m;
+       mphf->data = bmz8f;
+       mphf->size = bmz8->m;
+       DEBUGP("Successfully generated minimal perfect hash\n");
+       if (mph->verbosity)
+       {
+               fprintf(stderr, "Successfully generated minimal perfect hash function\n");
+       }
+       return mphf;
+}
+
+static cmph_uint8 bmz8_traverse_critical_nodes(bmz8_config_data_t *bmz8, cmph_uint32 v, cmph_uint8 * biggest_g_value, cmph_uint8 * biggest_edge_value, cmph_uint8 * used_edges, cmph_uint8 * visited)
+{
+        cmph_uint8 next_g;
+       cmph_uint32 u;   /* Auxiliary vertex */
+       cmph_uint32 lav; /* lookahead vertex */
+       cmph_uint8 collision;
+       vqueue_t * q = vqueue_new((cmph_uint32)(graph_ncritical_nodes(bmz8->graph)));
+       graph_iterator_t it, it1;
+
+       DEBUGP("Labelling critical vertices\n");
+       bmz8->g[v] = (cmph_uint8)(ceil ((double)(*biggest_edge_value)/2) - 1);
+       SETBIT(visited, v);
+       next_g    = (cmph_uint8)floor((double)(*biggest_edge_value/2)); /* next_g is incremented in the do..while statement*/
+       vqueue_insert(q, v);
+       while(!vqueue_is_empty(q))
+       {
+               v = vqueue_remove(q);
+               it = graph_neighbors_it(bmz8->graph, v);                
+               while ((u = graph_next_neighbor(bmz8->graph, &it)) != GRAPH_NO_NEIGHBOR)
+               {                       
+                               if (graph_node_is_critical(bmz8->graph, u) && (!GETBIT(visited,u)))
+                       {
+                               collision = 1;
+                               while(collision) // lookahead to resolve collisions
+                               {
+                                       next_g = (cmph_uint8)(*biggest_g_value + 1); 
+                                       it1 = graph_neighbors_it(bmz8->graph, u);
+                                       collision = 0;
+                                       while((lav = graph_next_neighbor(bmz8->graph, &it1)) != GRAPH_NO_NEIGHBOR)
+                                       {
+                                               if (graph_node_is_critical(bmz8->graph, lav) && GETBIT(visited,lav))
+                                               {
+                                                       if(next_g + bmz8->g[lav] >= bmz8->m)
+                                                       {
+                                                               vqueue_destroy(q);
+                                                               return 1; // restart mapping step.
+                                                       }
+                                                       if (GETBIT(used_edges, (next_g + bmz8->g[lav]))) 
+                                                       {
+                                                               collision = 1;
+                                                               break;
+                                                       }
+                                               }
+                                       }
+                                       if (next_g > *biggest_g_value) *biggest_g_value = next_g;
+                               }               
+                               // Marking used edges...
+                               it1 = graph_neighbors_it(bmz8->graph, u);
+                               while((lav = graph_next_neighbor(bmz8->graph, &it1)) != GRAPH_NO_NEIGHBOR)
+                               {
+                                       if (graph_node_is_critical(bmz8->graph, lav) && GETBIT(visited, lav))
+                                       {
+                                               SETBIT(used_edges,(next_g + bmz8->g[lav]));
+
+                                               if(next_g + bmz8->g[lav] > *biggest_edge_value) 
+                                                    *biggest_edge_value = (cmph_uint8)(next_g + bmz8->g[lav]);
+                                       }
+                               }
+                               bmz8->g[u] = next_g; // Labelling vertex u.
+                               SETBIT(visited,u);
+                               vqueue_insert(q, u);
+                       }                       
+               }
+                
+       }
+       vqueue_destroy(q);
+       return 0;
+}
+
+static cmph_uint8 bmz8_traverse_critical_nodes_heuristic(bmz8_config_data_t *bmz8, cmph_uint32 v, cmph_uint8 * biggest_g_value, cmph_uint8 * biggest_edge_value, cmph_uint8 * used_edges, cmph_uint8 * visited)
+{
+        cmph_uint8 next_g;
+       cmph_uint32 u;   
+       cmph_uint32 lav; 
+       cmph_uint8 collision;
+       cmph_uint8 * unused_g_values = NULL;
+       cmph_uint8 unused_g_values_capacity = 0;
+       cmph_uint8 nunused_g_values = 0;
+       vqueue_t * q = vqueue_new((cmph_uint32)(graph_ncritical_nodes(bmz8->graph)));
+       graph_iterator_t it, it1;
+
+       DEBUGP("Labelling critical vertices\n");
+       bmz8->g[v] = (cmph_uint8)(ceil ((double)(*biggest_edge_value)/2) - 1);
+       SETBIT(visited, v);
+       next_g    = (cmph_uint8)floor((double)(*biggest_edge_value/2)); 
+       vqueue_insert(q, v);
+       while(!vqueue_is_empty(q))
+       {
+               v = vqueue_remove(q);
+               it = graph_neighbors_it(bmz8->graph, v);                
+               while ((u = graph_next_neighbor(bmz8->graph, &it)) != GRAPH_NO_NEIGHBOR)
+               {                       
+                               if (graph_node_is_critical(bmz8->graph, u) && (!GETBIT(visited,u)))
+                       {
+                               cmph_uint8 next_g_index = 0;
+                               collision = 1;
+                               while(collision) // lookahead to resolve collisions
+                               {
+                                       if (next_g_index < nunused_g_values) 
+                                       {
+                                               next_g = unused_g_values[next_g_index++];
+                                       }
+                                       else    
+                                       {
+                                               next_g = (cmph_uint8)(*biggest_g_value + 1); 
+                                               next_g_index = 255;//UINT_MAX;
+                                       }
+                                       it1 = graph_neighbors_it(bmz8->graph, u);
+                                       collision = 0;
+                                       while((lav = graph_next_neighbor(bmz8->graph, &it1)) != GRAPH_NO_NEIGHBOR)
+                                       {
+                                               if (graph_node_is_critical(bmz8->graph, lav) && GETBIT(visited,lav))
+                                               {
+                                                       if(next_g + bmz8->g[lav] >= bmz8->m)
+                                                       {
+                                                               vqueue_destroy(q);
+                                                               free(unused_g_values);
+                                                               return 1; // restart mapping step.
+                                                       }
+                                                       if (GETBIT(used_edges, (next_g + bmz8->g[lav]))) 
+                                                       {
+                                                               collision = 1;
+                                                               break;
+                                                       }
+                                               }
+                                       }
+                                       if(collision && (next_g > *biggest_g_value)) // saving the current g value stored in next_g.
+                                       {
+                                               if(nunused_g_values == unused_g_values_capacity)
+                                               {
+                                                       unused_g_values = (cmph_uint8*)realloc(unused_g_values, ((size_t)(unused_g_values_capacity + BUFSIZ))*sizeof(cmph_uint8));
+                                                       unused_g_values_capacity += (cmph_uint8)BUFSIZ;                                                         
+                                               } 
+                                               unused_g_values[nunused_g_values++] = next_g;                                                   
+
+                                       }
+                                       if (next_g > *biggest_g_value) *biggest_g_value = next_g;
+                               }
+                               
+                               next_g_index--;
+                               if (next_g_index < nunused_g_values) unused_g_values[next_g_index] = unused_g_values[--nunused_g_values];
+
+                               // Marking used edges...
+                               it1 = graph_neighbors_it(bmz8->graph, u);
+                               while((lav = graph_next_neighbor(bmz8->graph, &it1)) != GRAPH_NO_NEIGHBOR)
+                               {
+                                       if (graph_node_is_critical(bmz8->graph, lav) && GETBIT(visited, lav))
+                                       {
+                                               SETBIT(used_edges,(next_g + bmz8->g[lav]));
+                                               if(next_g + bmz8->g[lav] > *biggest_edge_value) 
+                                                    *biggest_edge_value = (cmph_uint8)(next_g + bmz8->g[lav]);
+                                       }
+                               }
+                               
+                               bmz8->g[u] = next_g; // Labelling vertex u.
+                               SETBIT(visited, u);
+                               vqueue_insert(q, u);
+                               
+                       }                       
+               }
+                
+       }
+       vqueue_destroy(q);
+       free(unused_g_values);
+       return 0;  
+}
+
+static cmph_uint8 next_unused_edge(bmz8_config_data_t *bmz8, cmph_uint8 * used_edges, cmph_uint32 unused_edge_index)
+{
+       while(1)
+       {
+               assert(unused_edge_index < bmz8->m);
+               if(GETBIT(used_edges, unused_edge_index)) unused_edge_index ++;
+               else break;
+       }
+       return (cmph_uint8)unused_edge_index;
+}
+
+static void bmz8_traverse(bmz8_config_data_t *bmz8, cmph_uint8 * used_edges, cmph_uint32 v, cmph_uint8 * unused_edge_index, cmph_uint8 * visited)
+{
+       graph_iterator_t it = graph_neighbors_it(bmz8->graph, v);
+       cmph_uint32 neighbor = 0;
+       while((neighbor = graph_next_neighbor(bmz8->graph, &it)) != GRAPH_NO_NEIGHBOR)
+       {
+               if(GETBIT(visited,neighbor)) continue;
+               //DEBUGP("Visiting neighbor %u\n", neighbor);
+               *unused_edge_index = next_unused_edge(bmz8, used_edges, *unused_edge_index);
+               bmz8->g[neighbor] = (cmph_uint8)(*unused_edge_index - bmz8->g[v]);
+               //if (bmz8->g[neighbor] >= bmz8->m) bmz8->g[neighbor] += bmz8->m;
+               SETBIT(visited, neighbor);
+               (*unused_edge_index)++;
+               bmz8_traverse(bmz8, used_edges, neighbor, unused_edge_index, visited);
+               
+       }  
+}
+
+static void bmz8_traverse_non_critical_nodes(bmz8_config_data_t *bmz8, cmph_uint8 * used_edges, cmph_uint8 * visited)
+{
+
+       cmph_uint8 i, v1, v2, unused_edge_index = 0;
+       DEBUGP("Labelling non critical vertices\n");
+       for(i = 0; i < bmz8->m; i++)
+       {
+               v1 = (cmph_uint8)graph_vertex_id(bmz8->graph, i, 0);
+               v2 = (cmph_uint8)graph_vertex_id(bmz8->graph, i, 1);
+               if((GETBIT(visited,v1) && GETBIT(visited,v2)) || (!GETBIT(visited,v1) && !GETBIT(visited,v2))) continue;                                        
+               if(GETBIT(visited,v1)) bmz8_traverse(bmz8, used_edges, v1, &unused_edge_index, visited);
+               else bmz8_traverse(bmz8, used_edges, v2, &unused_edge_index, visited);
+
+       }
+
+       for(i = 0; i < bmz8->n; i++)
+       {
+               if(!GETBIT(visited,i))
+               {                               
+                       bmz8->g[i] = 0;
+                       SETBIT(visited, i);
+                       bmz8_traverse(bmz8, used_edges, i, &unused_edge_index, visited);
+               }
+       }
+
+}
+               
+static int bmz8_gen_edges(cmph_config_t *mph)
+{
+       cmph_uint8 e;
+       bmz8_config_data_t *bmz8 = (bmz8_config_data_t *)mph->data;
+       cmph_uint8 multiple_edges = 0;
+       DEBUGP("Generating edges for %u vertices\n", bmz8->n);
+       graph_clear_edges(bmz8->graph); 
+       mph->key_source->rewind(mph->key_source->data);
+       for (e = 0; e < mph->key_source->nkeys; ++e)
+       {
+               cmph_uint8 h1, h2;
+               cmph_uint32 keylen;
+               char *key = NULL;
+               mph->key_source->read(mph->key_source->data, &key, &keylen);
+               
+//             if (key == NULL)fprintf(stderr, "key = %s -- read BMZ\n", key);
+               h1 = (cmph_uint8)(hash(bmz8->hashes[0], key, keylen) % bmz8->n);
+               h2 = (cmph_uint8)(hash(bmz8->hashes[1], key, keylen) % bmz8->n);
+               if (h1 == h2) if (++h2 >= bmz8->n) h2 = 0;
+               if (h1 == h2) 
+               {
+                       if (mph->verbosity) fprintf(stderr, "Self loop for key %u\n", e);
+                       mph->key_source->dispose(mph->key_source->data, key, keylen);
+                       return 0;
+               }
+               //DEBUGP("Adding edge: %u -> %u for key %s\n", h1, h2, key);
+               mph->key_source->dispose(mph->key_source->data, key, keylen);
+//             fprintf(stderr, "key = %s -- dispose BMZ\n", key);
+               multiple_edges = graph_contains_edge(bmz8->graph, h1, h2);
+               if (mph->verbosity && multiple_edges) fprintf(stderr, "A non simple graph was generated\n");
+               if (multiple_edges) return 0; // checking multiple edge restriction.
+               graph_add_edge(bmz8->graph, h1, h2);
+       }
+       return !multiple_edges;
+}
+
+int bmz8_dump(cmph_t *mphf, FILE *fd)
+{
+       char *buf = NULL;
+       cmph_uint32 buflen;
+       cmph_uint8 two = 2; //number of hash functions
+       bmz8_data_t *data = (bmz8_data_t *)mphf->data;
+       register size_t nbytes;
+       __cmph_dump(mphf, fd);
+
+       nbytes = fwrite(&two, sizeof(cmph_uint8), (size_t)1, fd);
+
+       hash_state_dump(data->hashes[0], &buf, &buflen);
+       DEBUGP("Dumping hash state with %u bytes to disk\n", buflen);
+       nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd);
+       nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd);
+       free(buf);
+
+       hash_state_dump(data->hashes[1], &buf, &buflen);
+       DEBUGP("Dumping hash state with %u bytes to disk\n", buflen);
+       nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd);
+       nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd);
+       free(buf);
+
+       nbytes = fwrite(&(data->n), sizeof(cmph_uint8), (size_t)1, fd);
+       nbytes = fwrite(&(data->m), sizeof(cmph_uint8), (size_t)1, fd);
+       
+       nbytes = fwrite(data->g, sizeof(cmph_uint8)*(data->n), (size_t)1, fd);
+/*     #ifdef DEBUG
+       fprintf(stderr, "G: ");
+       for (i = 0; i < data->n; ++i) fprintf(stderr, "%u ", data->g[i]);
+       fprintf(stderr, "\n");
+       #endif*/
+       return 1;
+}
+
+void bmz8_load(FILE *f, cmph_t *mphf)
+{
+       cmph_uint8 nhashes;
+       char *buf = NULL;
+       cmph_uint32 buflen;
+       cmph_uint8 i;
+       register size_t nbytes;
+       bmz8_data_t *bmz8 = (bmz8_data_t *)malloc(sizeof(bmz8_data_t));
+
+       DEBUGP("Loading bmz8 mphf\n");
+       mphf->data = bmz8;
+       nbytes = fread(&nhashes, sizeof(cmph_uint8), (size_t)1, f);
+       bmz8->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(size_t)(nhashes + 1));
+       bmz8->hashes[nhashes] = NULL;
+       DEBUGP("Reading %u hashes\n", nhashes);
+       for (i = 0; i < nhashes; ++i)
+       {
+               hash_state_t *state = NULL;
+               nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f);
+               DEBUGP("Hash state has %u bytes\n", buflen);
+               buf = (char *)malloc((size_t)buflen);
+               nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
+               state = hash_state_load(buf, buflen);
+               bmz8->hashes[i] = state;
+               free(buf);
+       }
+
+       DEBUGP("Reading m and n\n");
+       nbytes = fread(&(bmz8->n), sizeof(cmph_uint8), (size_t)1, f);   
+       nbytes = fread(&(bmz8->m), sizeof(cmph_uint8), (size_t)1, f);   
+
+       bmz8->g = (cmph_uint8 *)malloc(sizeof(cmph_uint8)*bmz8->n);
+       nbytes = fread(bmz8->g, bmz8->n*sizeof(cmph_uint8), (size_t)1, f);
+       #ifdef DEBUG
+       fprintf(stderr, "G: ");
+       for (i = 0; i < bmz8->n; ++i) fprintf(stderr, "%u ", bmz8->g[i]);
+       fprintf(stderr, "\n");
+       #endif
+       return;
+}
+               
+
+cmph_uint8 bmz8_search(cmph_t *mphf, const char *key, cmph_uint32 keylen)
+{
+       bmz8_data_t *bmz8 = mphf->data;
+       cmph_uint8 h1 = (cmph_uint8)(hash(bmz8->hashes[0], key, keylen) % bmz8->n);
+       cmph_uint8 h2 = (cmph_uint8)(hash(bmz8->hashes[1], key, keylen) % bmz8->n);
+       DEBUGP("key: %s h1: %u h2: %u\n", key, h1, h2);
+       if (h1 == h2 && ++h2 > bmz8->n) h2 = 0;
+       DEBUGP("key: %s g[h1]: %u g[h2]: %u edges: %u\n", key, bmz8->g[h1], bmz8->g[h2], bmz8->m);
+       return (cmph_uint8)(bmz8->g[h1] + bmz8->g[h2]);
+}
+void bmz8_destroy(cmph_t *mphf)
+{
+       bmz8_data_t *data = (bmz8_data_t *)mphf->data;
+       free(data->g);
+       hash_state_destroy(data->hashes[0]);
+       hash_state_destroy(data->hashes[1]);
+       free(data->hashes);
+       free(data);
+       free(mphf);
+}
+
+/** \fn void bmz8_pack(cmph_t *mphf, void *packed_mphf);
+ *  \brief Support the ability to pack a perfect hash function into a preallocated contiguous memory space pointed by packed_mphf.
+ *  \param mphf pointer to the resulting mphf
+ *  \param packed_mphf pointer to the contiguous memory area used to store the resulting mphf. The size of packed_mphf must be at least cmph_packed_size() 
+ */
+void bmz8_pack(cmph_t *mphf, void *packed_mphf)
+{
+       bmz8_data_t *data = (bmz8_data_t *)mphf->data;
+       cmph_uint8 * ptr = packed_mphf;
+
+       // packing h1 type
+       CMPH_HASH h1_type = hash_get_type(data->hashes[0]);
+       *((cmph_uint32 *) ptr) = h1_type;
+       ptr += sizeof(cmph_uint32);
+
+       // packing h1
+       hash_state_pack(data->hashes[0], ptr);
+       ptr += hash_state_packed_size(h1_type);
+
+       // packing h2 type
+       CMPH_HASH h2_type = hash_get_type(data->hashes[1]);
+       *((cmph_uint32 *) ptr) = h2_type;
+       ptr += sizeof(cmph_uint32);
+
+       // packing h2
+       hash_state_pack(data->hashes[1], ptr);
+       ptr += hash_state_packed_size(h2_type);
+
+       // packing n
+       *ptr++ = data->n;
+
+       // packing g
+       memcpy(ptr, data->g, sizeof(cmph_uint8)*data->n);       
+}
+
+/** \fn cmph_uint32 bmz8_packed_size(cmph_t *mphf);
+ *  \brief Return the amount of space needed to pack mphf.
+ *  \param mphf pointer to a mphf
+ *  \return the size of the packed function or zero for failures
+ */ 
+cmph_uint32 bmz8_packed_size(cmph_t *mphf)
+{
+       bmz8_data_t *data = (bmz8_data_t *)mphf->data;
+       CMPH_HASH h1_type = hash_get_type(data->hashes[0]); 
+       CMPH_HASH h2_type = hash_get_type(data->hashes[1]); 
+
+       return (cmph_uint32)(sizeof(CMPH_ALGO) + hash_state_packed_size(h1_type) + hash_state_packed_size(h2_type) + 
+                       2*sizeof(cmph_uint32) + sizeof(cmph_uint8) + sizeof(cmph_uint8)*data->n);
+}
+
+/** cmph_uint8 bmz8_search(void *packed_mphf, const char *key, cmph_uint32 keylen);
+ *  \brief Use the packed mphf to do a search. 
+ *  \param  packed_mphf pointer to the packed mphf
+ *  \param key key to be hashed
+ *  \param keylen key legth in bytes
+ *  \return The mphf value
+ */
+cmph_uint8 bmz8_search_packed(void *packed_mphf, const char *key, cmph_uint32 keylen)
+{
+       register cmph_uint8 *h1_ptr = packed_mphf;
+       register CMPH_HASH h1_type  = *((cmph_uint32 *)h1_ptr);
+       h1_ptr += 4;
+
+       register cmph_uint8 *h2_ptr = h1_ptr + hash_state_packed_size(h1_type);
+       register CMPH_HASH h2_type  = *((cmph_uint32 *)h2_ptr);
+       h2_ptr += 4;
+       
+       register cmph_uint8 *g_ptr = h2_ptr + hash_state_packed_size(h2_type);
+       
+       register cmph_uint8 n = *g_ptr++;  
+       
+       register cmph_uint8 h1 = (cmph_uint8)(hash_packed(h1_ptr, h1_type, key, keylen) % n); 
+       register cmph_uint8 h2 = (cmph_uint8)(hash_packed(h2_ptr, h2_type, key, keylen) % n); 
+       DEBUGP("key: %s h1: %u h2: %u\n", key, h1, h2);
+       if (h1 == h2 && ++h2 > n) h2 = 0;
+       return (cmph_uint8)(g_ptr[h1] + g_ptr[h2]);     
+}
diff --git a/girepository/cmph/bmz8.h b/girepository/cmph/bmz8.h
new file mode 100644 (file)
index 0000000..99f7e30
--- /dev/null
@@ -0,0 +1,42 @@
+#ifndef __CMPH_BMZ8_H__
+#define __CMPH_BMZ8_H__
+
+#include "cmph.h"
+
+typedef struct __bmz8_data_t bmz8_data_t;
+typedef struct __bmz8_config_data_t bmz8_config_data_t;
+
+bmz8_config_data_t *bmz8_config_new(void);
+void bmz8_config_set_hashfuncs(cmph_config_t *mph, CMPH_HASH *hashfuncs);
+void bmz8_config_destroy(cmph_config_t *mph);
+cmph_t *bmz8_new(cmph_config_t *mph, double c);
+
+void bmz8_load(FILE *f, cmph_t *mphf);
+int bmz8_dump(cmph_t *mphf, FILE *f);
+void bmz8_destroy(cmph_t *mphf);
+cmph_uint8 bmz8_search(cmph_t *mphf, const char *key, cmph_uint32 keylen);
+
+/** \fn void bmz8_pack(cmph_t *mphf, void *packed_mphf);
+ *  \brief Support the ability to pack a perfect hash function into a preallocated contiguous memory space pointed by packed_mphf.
+ *  \param mphf pointer to the resulting mphf
+ *  \param packed_mphf pointer to the contiguous memory area used to store the resulting mphf. The size of packed_mphf must be at least cmph_packed_size() 
+ */
+void bmz8_pack(cmph_t *mphf, void *packed_mphf);
+
+/** \fn cmph_uint32 bmz8_packed_size(cmph_t *mphf);
+ *  \brief Return the amount of space needed to pack mphf.
+ *  \param mphf pointer to a mphf
+ *  \return the size of the packed function or zero for failures
+ */ 
+cmph_uint32 bmz8_packed_size(cmph_t *mphf);
+
+/** cmph_uint8 bmz8_search(void *packed_mphf, const char *key, cmph_uint32 keylen);
+ *  \brief Use the packed mphf to do a search. 
+ *  \param  packed_mphf pointer to the packed mphf
+ *  \param key key to be hashed
+ *  \param keylen key legth in bytes
+ *  \return The mphf value
+ */
+cmph_uint8 bmz8_search_packed(void *packed_mphf, const char *key, cmph_uint32 keylen);
+
+#endif
diff --git a/girepository/cmph/bmz8_structs.h b/girepository/cmph/bmz8_structs.h
new file mode 100644 (file)
index 0000000..408b529
--- /dev/null
@@ -0,0 +1,25 @@
+#ifndef __CMPH_BMZ8_STRUCTS_H__
+#define __CMPH_BMZ8_STRUCTS_H__
+
+#include "hash_state.h"
+
+struct __bmz8_data_t
+{
+       cmph_uint8 m; //edges (words) count
+       cmph_uint8 n; //vertex count
+       cmph_uint8 *g;
+       hash_state_t **hashes;
+};
+
+
+struct __bmz8_config_data_t
+{
+       CMPH_HASH hashfuncs[2];
+       cmph_uint8 m; //edges (words) count
+       cmph_uint8 n; //vertex count
+       graph_t *graph;
+       cmph_uint8 *g;
+       hash_state_t **hashes;
+};
+
+#endif
diff --git a/girepository/cmph/bmz_structs.h b/girepository/cmph/bmz_structs.h
new file mode 100644 (file)
index 0000000..67065a0
--- /dev/null
@@ -0,0 +1,25 @@
+#ifndef __CMPH_BMZ_STRUCTS_H__
+#define __CMPH_BMZ_STRUCTS_H__
+
+#include "hash_state.h"
+
+struct __bmz_data_t
+{
+       cmph_uint32 m; //edges (words) count
+       cmph_uint32 n; //vertex count
+       cmph_uint32 *g;
+       hash_state_t **hashes;
+};
+
+
+struct __bmz_config_data_t
+{
+       CMPH_HASH hashfuncs[2];
+       cmph_uint32 m; //edges (words) count
+       cmph_uint32 n; //vertex count
+       graph_t *graph;
+       cmph_uint32 *g;
+       hash_state_t **hashes;
+};
+
+#endif
diff --git a/girepository/cmph/brz.c b/girepository/cmph/brz.c
new file mode 100755 (executable)
index 0000000..f9c48ef
--- /dev/null
@@ -0,0 +1,985 @@
+#include "graph.h"
+#include "fch.h"
+#include "fch_structs.h"
+#include "bmz8.h"
+#include "bmz8_structs.h"
+#include "brz.h"
+#include "cmph_structs.h"
+#include "brz_structs.h"
+#include "buffer_manager.h"
+#include "cmph.h"
+#include "hash.h"
+#include "bitbool.h"
+#include <math.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <assert.h>
+#include <string.h>
+#define MAX_BUCKET_SIZE 255
+//#define DEBUG
+#include "debug.h"
+
+static int brz_gen_mphf(cmph_config_t *mph);
+static cmph_uint32 brz_min_index(cmph_uint32 * vector, cmph_uint32 n);
+static void brz_destroy_keys_vd(cmph_uint8 ** keys_vd, cmph_uint32 nkeys);
+static char * brz_copy_partial_fch_mphf(brz_config_data_t *brz, fch_data_t * fchf, cmph_uint32 index,  cmph_uint32 *buflen);
+static char * brz_copy_partial_bmz8_mphf(brz_config_data_t *brz, bmz8_data_t * bmzf, cmph_uint32 index,  cmph_uint32 *buflen);
+brz_config_data_t *brz_config_new(void)
+{
+       brz_config_data_t *brz = NULL;  
+       brz = (brz_config_data_t *)malloc(sizeof(brz_config_data_t));
+       brz->algo = CMPH_FCH;
+       brz->b = 128;
+       brz->hashfuncs[0] = CMPH_HASH_JENKINS;
+       brz->hashfuncs[1] = CMPH_HASH_JENKINS;
+       brz->hashfuncs[2] = CMPH_HASH_JENKINS;
+       brz->size   = NULL;
+       brz->offset = NULL;
+       brz->g      = NULL;
+       brz->h1 = NULL;
+       brz->h2 = NULL;
+       brz->h0 = NULL;
+       brz->memory_availability = 1024*1024;
+       brz->tmp_dir = (cmph_uint8 *)calloc((size_t)10, sizeof(cmph_uint8));
+       brz->mphf_fd = NULL;
+       strcpy((char *)(brz->tmp_dir), "/var/tmp/"); 
+       assert(brz);
+       return brz;
+}
+
+void brz_config_destroy(cmph_config_t *mph)
+{
+       brz_config_data_t *data = (brz_config_data_t *)mph->data;
+       free(data->tmp_dir);
+       DEBUGP("Destroying algorithm dependent data\n");
+       free(data);
+}
+
+void brz_config_set_hashfuncs(cmph_config_t *mph, CMPH_HASH *hashfuncs)
+{
+       brz_config_data_t *brz = (brz_config_data_t *)mph->data;
+       CMPH_HASH *hashptr = hashfuncs;
+       cmph_uint32 i = 0;
+       while(*hashptr != CMPH_HASH_COUNT)
+       {
+               if (i >= 3) break; //brz only uses three hash functions
+               brz->hashfuncs[i] = *hashptr;   
+               ++i, ++hashptr;
+       }
+}
+
+void brz_config_set_memory_availability(cmph_config_t *mph, cmph_uint32 memory_availability)
+{
+       brz_config_data_t *brz = (brz_config_data_t *)mph->data;
+       if(memory_availability > 0) brz->memory_availability = memory_availability*1024*1024;
+}
+
+void brz_config_set_tmp_dir(cmph_config_t *mph, cmph_uint8 *tmp_dir)
+{
+       brz_config_data_t *brz = (brz_config_data_t *)mph->data;
+       if(tmp_dir)
+       {
+               size_t len = strlen((char *)tmp_dir);
+               free(brz->tmp_dir);
+               if(tmp_dir[len-1] != '/')
+               {
+                       brz->tmp_dir = (cmph_uint8 *)calloc((size_t)len+2, sizeof(cmph_uint8));
+                       sprintf((char *)(brz->tmp_dir), "%s/", (char *)tmp_dir); 
+               }
+               else
+               {
+                       brz->tmp_dir = (cmph_uint8 *)calloc((size_t)len+1, sizeof(cmph_uint8));
+                       sprintf((char *)(brz->tmp_dir), "%s", (char *)tmp_dir); 
+               }
+               
+       }
+}
+
+void brz_config_set_mphf_fd(cmph_config_t *mph, FILE *mphf_fd)
+{
+       brz_config_data_t *brz = (brz_config_data_t *)mph->data;
+       brz->mphf_fd = mphf_fd;
+       assert(brz->mphf_fd);
+}
+
+void brz_config_set_b(cmph_config_t *mph, cmph_uint32 b)
+{
+       brz_config_data_t *brz = (brz_config_data_t *)mph->data;
+       if(b <= 64 || b >= 175) 
+       {
+               b =  128;
+       }
+       brz->b = (cmph_uint8)b;
+}
+
+void brz_config_set_algo(cmph_config_t *mph, CMPH_ALGO algo) 
+{
+       if (algo == CMPH_BMZ8 || algo == CMPH_FCH) // supported algorithms
+       {
+               brz_config_data_t *brz = (brz_config_data_t *)mph->data;
+               brz->algo = algo;
+       }
+}
+
+cmph_t *brz_new(cmph_config_t *mph, double c)
+{
+       cmph_t *mphf = NULL;
+       brz_data_t *brzf = NULL;
+       cmph_uint32 i;
+       cmph_uint32 iterations = 20;
+
+       DEBUGP("c: %f\n", c);
+       brz_config_data_t *brz = (brz_config_data_t *)mph->data;
+       switch(brz->algo) // validating restrictions over parameter c.
+       {
+               case CMPH_BMZ8:
+                       if (c == 0 || c >= 2.0) c = 1;
+                       break;
+               case CMPH_FCH:
+                       if (c <= 2.0) c = 2.6;
+                       break;
+               default:
+                       assert(0);
+       }
+       brz->c = c;
+       brz->m = mph->key_source->nkeys;
+       DEBUGP("m: %u\n", brz->m);
+        brz->k = (cmph_uint32)ceil(brz->m/((double)brz->b));
+       DEBUGP("k: %u\n", brz->k);
+       brz->size   = (cmph_uint8 *) calloc((size_t)brz->k, sizeof(cmph_uint8));
+       
+       // Clustering the keys by graph id.
+       if (mph->verbosity)
+       {
+               fprintf(stderr, "Partioning the set of keys.\n");       
+       }
+               
+       while(1)
+       {
+               int ok;
+               DEBUGP("hash function 3\n");
+               brz->h0 = hash_state_new(brz->hashfuncs[2], brz->k);
+               DEBUGP("Generating graphs\n");
+               ok = brz_gen_mphf(mph);
+               if (!ok)
+               {
+                       --iterations;
+                       hash_state_destroy(brz->h0);
+                       brz->h0 = NULL;
+                       DEBUGP("%u iterations remaining to create the graphs in a external file\n", iterations);
+                       if (mph->verbosity)
+                       {
+                               fprintf(stderr, "Failure: A graph with more than 255 keys was created - %u iterations remaining\n", iterations);
+                       }
+                       if (iterations == 0) break;
+               } 
+               else break;     
+       }
+       if (iterations == 0) 
+       {
+               DEBUGP("Graphs with more than 255 keys were created in all 20 iterations\n");
+               free(brz->size);
+               return NULL;
+       }
+       DEBUGP("Graphs generated\n");
+       
+       brz->offset = (cmph_uint32 *)calloc((size_t)brz->k, sizeof(cmph_uint32));
+       for (i = 1; i < brz->k; ++i)
+       {
+               brz->offset[i] = brz->size[i-1] + brz->offset[i-1];
+       }
+       // Generating a mphf
+       mphf = (cmph_t *)malloc(sizeof(cmph_t));
+       mphf->algo = mph->algo;
+       brzf = (brz_data_t *)malloc(sizeof(brz_data_t));
+       brzf->g = brz->g;
+       brz->g = NULL; //transfer memory ownership
+       brzf->h1 = brz->h1;
+       brz->h1 = NULL; //transfer memory ownership
+       brzf->h2 = brz->h2;
+       brz->h2 = NULL; //transfer memory ownership
+       brzf->h0 = brz->h0;
+       brz->h0 = NULL; //transfer memory ownership
+       brzf->size = brz->size;
+       brz->size = NULL; //transfer memory ownership
+       brzf->offset = brz->offset;
+       brz->offset = NULL; //transfer memory ownership
+       brzf->k = brz->k;
+       brzf->c = brz->c;
+       brzf->m = brz->m;
+       brzf->algo = brz->algo;
+       mphf->data = brzf;
+       mphf->size = brz->m;    
+       DEBUGP("Successfully generated minimal perfect hash\n");
+       if (mph->verbosity)
+       {
+               fprintf(stderr, "Successfully generated minimal perfect hash function\n");
+       }
+       return mphf;
+}
+
+static int brz_gen_mphf(cmph_config_t *mph)
+{
+       cmph_uint32 i, e, error;
+       brz_config_data_t *brz = (brz_config_data_t *)mph->data;
+       cmph_uint32 memory_usage = 0;
+       cmph_uint32 nkeys_in_buffer = 0;
+       cmph_uint8 *buffer = (cmph_uint8 *)malloc((size_t)brz->memory_availability);
+       cmph_uint32 *buckets_size = (cmph_uint32 *)calloc((size_t)brz->k, sizeof(cmph_uint32));
+       cmph_uint32 *keys_index = NULL;
+       cmph_uint8 **buffer_merge = NULL;
+       cmph_uint32 *buffer_h0 = NULL;
+       cmph_uint32 nflushes = 0;
+       cmph_uint32 h0;
+       register size_t nbytes;
+       FILE *  tmp_fd = NULL;
+       buffer_manager_t * buff_manager = NULL;
+       char *filename = NULL;
+       char *key = NULL;
+       cmph_uint32 keylen;
+       cmph_uint32 cur_bucket = 0;
+       cmph_uint8 nkeys_vd = 0;
+       cmph_uint8 ** keys_vd = NULL;
+       
+       mph->key_source->rewind(mph->key_source->data);
+       DEBUGP("Generating graphs from %u keys\n", brz->m);
+       // Partitioning
+       for (e = 0; e < brz->m; ++e)
+       {
+               mph->key_source->read(mph->key_source->data, &key, &keylen);
+
+               /* Buffers management */
+               if (memory_usage + keylen + sizeof(keylen) > brz->memory_availability) // flush buffers 
+               {
+                       if(mph->verbosity)
+                       {
+                               fprintf(stderr, "Flushing  %u\n", nkeys_in_buffer);
+                       }
+                       cmph_uint32 value = buckets_size[0];
+                       cmph_uint32 sum = 0;
+                       cmph_uint32 keylen1 = 0;
+                       buckets_size[0]   = 0;
+                       for(i = 1; i < brz->k; i++)
+                       {
+                               if(buckets_size[i] == 0) continue;
+                               sum += value;
+                               value = buckets_size[i];
+                               buckets_size[i] = sum;
+                               
+                       }       
+                       memory_usage = 0;
+                       keys_index = (cmph_uint32 *)calloc((size_t)nkeys_in_buffer, sizeof(cmph_uint32));
+                       for(i = 0; i < nkeys_in_buffer; i++)
+                       {
+                               memcpy(&keylen1, buffer + memory_usage, sizeof(keylen1));
+                               h0 = hash(brz->h0, (char *)(buffer + memory_usage + sizeof(keylen1)), keylen1) % brz->k;
+                               keys_index[buckets_size[h0]] = memory_usage;
+                               buckets_size[h0]++;
+                               memory_usage +=  keylen1 + (cmph_uint32)sizeof(keylen1);
+                       }
+                       filename = (char *)calloc(strlen((char *)(brz->tmp_dir)) + 11, sizeof(char));
+                       sprintf(filename, "%s%u.cmph",brz->tmp_dir, nflushes);
+                       tmp_fd = fopen(filename, "wb");
+                       free(filename);
+                       filename = NULL;
+                       for(i = 0; i < nkeys_in_buffer; i++)
+                       {
+                               memcpy(&keylen1, buffer + keys_index[i], sizeof(keylen1));
+                               nbytes = fwrite(buffer + keys_index[i], (size_t)1, keylen1 + sizeof(keylen1), tmp_fd);
+                       }
+                       nkeys_in_buffer = 0;
+                       memory_usage = 0;
+                       memset((void *)buckets_size, 0, brz->k*sizeof(cmph_uint32));
+                       nflushes++;
+                       free(keys_index);
+                       fclose(tmp_fd);
+               }
+               memcpy(buffer + memory_usage, &keylen, sizeof(keylen));
+               memcpy(buffer + memory_usage + sizeof(keylen), key, (size_t)keylen);
+               memory_usage += keylen + (cmph_uint32)sizeof(keylen);
+               h0 = hash(brz->h0, key, keylen) % brz->k;
+               
+               if ((brz->size[h0] == MAX_BUCKET_SIZE) || (brz->algo == CMPH_BMZ8 && ((brz->c >= 1.0) && (cmph_uint8)(brz->c * brz->size[h0]) < brz->size[h0]))) 
+               {
+                       free(buffer);
+                       free(buckets_size);
+                       return 0;
+               }
+               brz->size[h0] = (cmph_uint8)(brz->size[h0] + 1U);
+               buckets_size[h0] ++;
+               nkeys_in_buffer++;
+               mph->key_source->dispose(mph->key_source->data, key, keylen);
+       }
+       if (memory_usage != 0) // flush buffers 
+       { 
+               if(mph->verbosity)
+               {
+                       fprintf(stderr, "Flushing  %u\n", nkeys_in_buffer);
+               }
+               cmph_uint32 value = buckets_size[0];
+               cmph_uint32 sum = 0;
+               cmph_uint32 keylen1 = 0;
+               buckets_size[0]   = 0;
+               for(i = 1; i < brz->k; i++)
+               {
+                       if(buckets_size[i] == 0) continue;
+                       sum += value;
+                       value = buckets_size[i];
+                       buckets_size[i] = sum;
+               }
+               memory_usage = 0;
+               keys_index = (cmph_uint32 *)calloc((size_t)nkeys_in_buffer, sizeof(cmph_uint32));
+               for(i = 0; i < nkeys_in_buffer; i++)
+               {
+                       memcpy(&keylen1, buffer + memory_usage, sizeof(keylen1));
+                       h0 = hash(brz->h0, (char *)(buffer + memory_usage + sizeof(keylen1)), keylen1) % brz->k;
+                       keys_index[buckets_size[h0]] = memory_usage;
+                       buckets_size[h0]++;
+                       memory_usage +=  keylen1 + (cmph_uint32)sizeof(keylen1);
+               }
+               filename = (char *)calloc(strlen((char *)(brz->tmp_dir)) + 11, sizeof(char));
+               sprintf(filename, "%s%u.cmph",brz->tmp_dir, nflushes);
+               tmp_fd = fopen(filename, "wb");
+               free(filename);
+               filename = NULL;
+               for(i = 0; i < nkeys_in_buffer; i++)
+               {
+                       memcpy(&keylen1, buffer + keys_index[i], sizeof(keylen1));
+                       nbytes = fwrite(buffer + keys_index[i], (size_t)1, keylen1 + sizeof(keylen1), tmp_fd);
+               }
+               nkeys_in_buffer = 0;
+               memory_usage = 0;
+               memset((void *)buckets_size, 0, brz->k*sizeof(cmph_uint32));
+               nflushes++;
+               free(keys_index);
+               fclose(tmp_fd);
+       }
+
+       free(buffer);
+       free(buckets_size);
+       if(nflushes > 1024) return 0; // Too many files generated.
+       // mphf generation
+       if(mph->verbosity)
+       {
+               fprintf(stderr, "\nMPHF generation \n");
+       }
+       /* Starting to dump to disk the resultant MPHF: __cmph_dump function */
+       nbytes = fwrite(cmph_names[CMPH_BRZ], (size_t)(strlen(cmph_names[CMPH_BRZ]) + 1), (size_t)1, brz->mphf_fd);
+       nbytes = fwrite(&(brz->m), sizeof(brz->m), (size_t)1, brz->mphf_fd);
+       nbytes = fwrite(&(brz->c), sizeof(double), (size_t)1, brz->mphf_fd);
+       nbytes = fwrite(&(brz->algo), sizeof(brz->algo), (size_t)1, brz->mphf_fd);
+       nbytes = fwrite(&(brz->k), sizeof(cmph_uint32), (size_t)1, brz->mphf_fd); // number of MPHFs
+       nbytes = fwrite(brz->size, sizeof(cmph_uint8)*(brz->k), (size_t)1, brz->mphf_fd);
+       
+       //tmp_fds = (FILE **)calloc(nflushes, sizeof(FILE *));
+       buff_manager = buffer_manager_new(brz->memory_availability, nflushes);
+       buffer_merge = (cmph_uint8 **)calloc((size_t)nflushes, sizeof(cmph_uint8 *));
+       buffer_h0    = (cmph_uint32 *)calloc((size_t)nflushes, sizeof(cmph_uint32));
+       
+       memory_usage = 0;
+       for(i = 0; i < nflushes; i++)
+       {
+               filename = (char *)calloc(strlen((char *)(brz->tmp_dir)) + 11, sizeof(char));
+               sprintf(filename, "%s%u.cmph",brz->tmp_dir, i);
+               buffer_manager_open(buff_manager, i, filename);
+               free(filename);
+               filename = NULL;
+               key = (char *)buffer_manager_read_key(buff_manager, i, &keylen);
+               h0 = hash(brz->h0, key+sizeof(keylen), keylen) % brz->k;
+               buffer_h0[i] = h0;
+                buffer_merge[i] = (cmph_uint8 *)key;
+                key = NULL; //transfer memory ownership                 
+       }
+       e = 0;
+       keys_vd = (cmph_uint8 **)calloc((size_t)MAX_BUCKET_SIZE, sizeof(cmph_uint8 *));
+       nkeys_vd = 0;
+       error = 0;
+       while(e < brz->m)
+       {
+               i = brz_min_index(buffer_h0, nflushes);
+               cur_bucket = buffer_h0[i];
+               key = (char *)buffer_manager_read_key(buff_manager, i, &keylen);
+               if(key)
+               {
+                       while(key)
+                       {
+                               //keylen = strlen(key);
+                               h0 = hash(brz->h0, key+sizeof(keylen), keylen) % brz->k;
+                               if (h0 != buffer_h0[i]) break;
+                               keys_vd[nkeys_vd++] = (cmph_uint8 *)key;
+                               key = NULL; //transfer memory ownership
+                               e++;
+                               key = (char *)buffer_manager_read_key(buff_manager, i, &keylen);
+                       }
+                       if (key)
+                       {
+                               assert(nkeys_vd < brz->size[cur_bucket]);
+                               keys_vd[nkeys_vd++] = buffer_merge[i];
+                               buffer_merge[i] = NULL; //transfer memory ownership
+                               e++;
+                               buffer_h0[i] = h0;
+                               buffer_merge[i] = (cmph_uint8 *)key;
+                       }
+               }
+               if(!key)
+               {
+                       assert(nkeys_vd < brz->size[cur_bucket]);
+                       keys_vd[nkeys_vd++] = buffer_merge[i];
+                       buffer_merge[i] = NULL; //transfer memory ownership
+                       e++;
+                       buffer_h0[i] = UINT_MAX;
+               }
+               
+               if(nkeys_vd == brz->size[cur_bucket]) // Generating mphf for each bucket.
+               {
+                       cmph_io_adapter_t *source = NULL;
+                       cmph_config_t *config = NULL;
+                       cmph_t *mphf_tmp = NULL;
+                       char *bufmphf = NULL;
+                       cmph_uint32 buflenmphf = 0;
+                       // Source of keys
+                       source = cmph_io_byte_vector_adapter(keys_vd, (cmph_uint32)nkeys_vd);
+                       config = cmph_config_new(source);
+                       cmph_config_set_algo(config, brz->algo);
+                       //cmph_config_set_algo(config, CMPH_BMZ8);
+                       cmph_config_set_graphsize(config, brz->c);
+                       mphf_tmp = cmph_new(config);
+                       if (mphf_tmp == NULL) 
+                       {
+                               if(mph->verbosity) fprintf(stderr, "ERROR: Can't generate MPHF for bucket %u out of %u\n", cur_bucket + 1, brz->k);
+                               error = 1;
+                               cmph_config_destroy(config);
+                               brz_destroy_keys_vd(keys_vd, nkeys_vd);
+                               cmph_io_byte_vector_adapter_destroy(source);
+                               break;
+                       }
+                       if(mph->verbosity) 
+                       {
+                         if (cur_bucket % 1000 == 0) 
+                         {
+                               fprintf(stderr, "MPHF for bucket %u out of %u was generated.\n", cur_bucket + 1, brz->k);
+                         }
+                       }
+                       switch(brz->algo)
+                       {
+                               case CMPH_FCH:
+                               {
+                                       fch_data_t * fchf = NULL;
+                                       fchf = (fch_data_t *)mphf_tmp->data;                    
+                                       bufmphf = brz_copy_partial_fch_mphf(brz, fchf, cur_bucket, &buflenmphf);
+                               }
+                                       break;
+                               case CMPH_BMZ8:
+                               {
+                                       bmz8_data_t * bmzf = NULL;
+                                       bmzf = (bmz8_data_t *)mphf_tmp->data;
+                                       bufmphf = brz_copy_partial_bmz8_mphf(brz, bmzf, cur_bucket,  &buflenmphf);
+                               }
+                                       break;
+                               default: assert(0);
+                       }
+                       nbytes = fwrite(bufmphf, (size_t)buflenmphf, (size_t)1, brz->mphf_fd);
+                       free(bufmphf);
+                       bufmphf = NULL;
+                       cmph_config_destroy(config);
+                       brz_destroy_keys_vd(keys_vd, nkeys_vd);
+                       cmph_destroy(mphf_tmp);
+                       cmph_io_byte_vector_adapter_destroy(source);
+                       nkeys_vd = 0;
+               }
+       }
+       buffer_manager_destroy(buff_manager);
+       free(keys_vd);
+       free(buffer_merge);
+       free(buffer_h0);
+       if (error) return 0;
+       return 1;
+}
+
+static cmph_uint32 brz_min_index(cmph_uint32 * vector, cmph_uint32 n)
+{
+       cmph_uint32 i, min_index = 0;
+       for(i = 1; i < n; i++)
+       {
+               if(vector[i] < vector[min_index]) min_index = i;
+       }
+       return min_index;
+}
+
+static void brz_destroy_keys_vd(cmph_uint8 ** keys_vd, cmph_uint32 nkeys)
+{
+       cmph_uint8 i;
+       for(i = 0; i < nkeys; i++) { free(keys_vd[i]); keys_vd[i] = NULL;}
+}
+
+static char * brz_copy_partial_fch_mphf(brz_config_data_t *brz, fch_data_t * fchf, cmph_uint32 index,  cmph_uint32 *buflen)
+{
+       cmph_uint32 i = 0;
+       cmph_uint32 buflenh1 = 0;
+       cmph_uint32 buflenh2 = 0; 
+       char * bufh1 = NULL;
+       char * bufh2 = NULL;
+       char * buf   = NULL;
+       cmph_uint32 n  = fchf->b;//brz->size[index];
+       hash_state_dump(fchf->h1, &bufh1, &buflenh1);
+       hash_state_dump(fchf->h2, &bufh2, &buflenh2);
+       *buflen = buflenh1 + buflenh2 + n + 2U * (cmph_uint32)sizeof(cmph_uint32);
+       buf = (char *)malloc((size_t)(*buflen));
+       memcpy(buf, &buflenh1, sizeof(cmph_uint32));
+       memcpy(buf+sizeof(cmph_uint32), bufh1, (size_t)buflenh1);
+       memcpy(buf+sizeof(cmph_uint32)+buflenh1, &buflenh2, sizeof(cmph_uint32));
+       memcpy(buf+2*sizeof(cmph_uint32)+buflenh1, bufh2, (size_t)buflenh2);    
+       for (i = 0; i < n; i++) memcpy(buf+2*sizeof(cmph_uint32)+buflenh1+buflenh2+i,(fchf->g + i), (size_t)1);
+       free(bufh1);
+       free(bufh2);
+       return buf;
+}
+static char * brz_copy_partial_bmz8_mphf(brz_config_data_t *brz, bmz8_data_t * bmzf, cmph_uint32 index,  cmph_uint32 *buflen)
+{
+       cmph_uint32 buflenh1 = 0;
+       cmph_uint32 buflenh2 = 0; 
+       char * bufh1 = NULL;
+       char * bufh2 = NULL;
+       char * buf   = NULL;
+       cmph_uint32 n = (cmph_uint32)ceil(brz->c * brz->size[index]);
+       hash_state_dump(bmzf->hashes[0], &bufh1, &buflenh1);
+       hash_state_dump(bmzf->hashes[1], &bufh2, &buflenh2);
+       *buflen = buflenh1 + buflenh2 + n + 2U * (cmph_uint32)sizeof(cmph_uint32);
+       buf = (char *)malloc((size_t)(*buflen));
+       memcpy(buf, &buflenh1, sizeof(cmph_uint32));
+       memcpy(buf+sizeof(cmph_uint32), bufh1, (size_t)buflenh1);
+       memcpy(buf+sizeof(cmph_uint32)+buflenh1, &buflenh2, sizeof(cmph_uint32));
+       memcpy(buf+2*sizeof(cmph_uint32)+buflenh1, bufh2, (size_t)buflenh2);
+       memcpy(buf+2*sizeof(cmph_uint32)+buflenh1+buflenh2,bmzf->g, (size_t)n);
+       free(bufh1);
+       free(bufh2);
+       return buf;
+}
+
+
+int brz_dump(cmph_t *mphf, FILE *fd)
+{
+       brz_data_t *data = (brz_data_t *)mphf->data;
+       char *buf = NULL;
+       cmph_uint32 buflen;
+       register size_t nbytes;
+       DEBUGP("Dumping brzf\n");
+       // The initial part of the MPHF have already been dumped to disk during construction
+       // Dumping h0
+        hash_state_dump(data->h0, &buf, &buflen);
+        DEBUGP("Dumping hash state with %u bytes to disk\n", buflen);
+        nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd);
+        nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd);
+        free(buf);
+       // Dumping m and the vector offset.
+       nbytes = fwrite(&(data->m), sizeof(cmph_uint32), (size_t)1, fd);        
+       nbytes = fwrite(data->offset, sizeof(cmph_uint32)*(data->k), (size_t)1, fd);
+       return 1;
+}
+
+void brz_load(FILE *f, cmph_t *mphf)
+{
+       char *buf = NULL;
+       cmph_uint32 buflen;
+       register size_t nbytes;
+       cmph_uint32 i, n;
+       brz_data_t *brz = (brz_data_t *)malloc(sizeof(brz_data_t));
+
+       DEBUGP("Loading brz mphf\n");
+       mphf->data = brz;
+       nbytes = fread(&(brz->c), sizeof(double), (size_t)1, f);
+       nbytes = fread(&(brz->algo), sizeof(brz->algo), (size_t)1, f); // Reading algo.
+       nbytes = fread(&(brz->k), sizeof(cmph_uint32), (size_t)1, f);
+       brz->size   = (cmph_uint8 *) malloc(sizeof(cmph_uint8)*brz->k);
+       nbytes = fread(brz->size, sizeof(cmph_uint8)*(brz->k), (size_t)1, f);   
+       brz->h1 = (hash_state_t **)malloc(sizeof(hash_state_t *)*brz->k);
+       brz->h2 = (hash_state_t **)malloc(sizeof(hash_state_t *)*brz->k);
+       brz->g  = (cmph_uint8 **)  calloc((size_t)brz->k, sizeof(cmph_uint8 *));
+       DEBUGP("Reading c = %f   k = %u   algo = %u \n", brz->c, brz->k, brz->algo);
+       //loading h_i1, h_i2 and g_i.
+       for(i = 0; i < brz->k; i++)
+       {
+               // h1
+               nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f);
+               DEBUGP("Hash state 1 has %u bytes\n", buflen);
+               buf = (char *)malloc((size_t)buflen);
+               nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
+               brz->h1[i] = hash_state_load(buf, buflen);
+               free(buf);
+               //h2
+               nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f);
+               DEBUGP("Hash state 2 has %u bytes\n", buflen);
+               buf = (char *)malloc((size_t)buflen);
+               nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
+               brz->h2[i] = hash_state_load(buf, buflen);
+               free(buf);
+               switch(brz->algo)
+               {
+                       case CMPH_FCH:
+                               n = fch_calc_b(brz->c, brz->size[i]);
+                               break;
+                       case CMPH_BMZ8:
+                               n = (cmph_uint32)ceil(brz->c * brz->size[i]);
+                               break;
+                       default: assert(0);
+               }
+               DEBUGP("g_i has %u bytes\n", n);
+               brz->g[i] = (cmph_uint8 *)calloc((size_t)n, sizeof(cmph_uint8));
+               nbytes = fread(brz->g[i], sizeof(cmph_uint8)*n, (size_t)1, f);
+       }
+       //loading h0
+       nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f);
+       DEBUGP("Hash state has %u bytes\n", buflen);
+       buf = (char *)malloc((size_t)buflen);
+       nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
+       brz->h0 = hash_state_load(buf, buflen);
+       free(buf);
+
+       //loading c, m, and the vector offset.  
+       nbytes = fread(&(brz->m), sizeof(cmph_uint32), (size_t)1, f);
+       brz->offset = (cmph_uint32 *)malloc(sizeof(cmph_uint32)*brz->k);
+       nbytes = fread(brz->offset, sizeof(cmph_uint32)*(brz->k), (size_t)1, f);
+       return;
+}
+
+static cmph_uint32 brz_bmz8_search(brz_data_t *brz, const char *key, cmph_uint32 keylen, cmph_uint32 * fingerprint)
+{
+       register cmph_uint32 h0;
+
+       hash_vector(brz->h0, key, keylen, fingerprint);
+       h0 = fingerprint[2] % brz->k;
+
+       register cmph_uint32 m = brz->size[h0];
+       register cmph_uint32 n = (cmph_uint32)ceil(brz->c * m);
+       register cmph_uint32 h1 = hash(brz->h1[h0], key, keylen) % n;
+       register cmph_uint32 h2 = hash(brz->h2[h0], key, keylen) % n;
+       register cmph_uint8 mphf_bucket;
+       
+       if (h1 == h2 && ++h2 >= n) h2 = 0;
+       mphf_bucket = (cmph_uint8)(brz->g[h0][h1] + brz->g[h0][h2]); 
+       DEBUGP("key: %s h1: %u h2: %u h0: %u\n", key, h1, h2, h0);
+       DEBUGP("key: %s g[h1]: %u g[h2]: %u offset[h0]: %u edges: %u\n", key, brz->g[h0][h1], brz->g[h0][h2], brz->offset[h0], brz->m);
+       DEBUGP("Address: %u\n", mphf_bucket + brz->offset[h0]);
+       return (mphf_bucket + brz->offset[h0]);
+}
+
+static cmph_uint32 brz_fch_search(brz_data_t *brz, const char *key, cmph_uint32 keylen, cmph_uint32 * fingerprint)
+{
+       register cmph_uint32 h0;
+
+       hash_vector(brz->h0, key, keylen, fingerprint);
+       h0 = fingerprint[2] % brz->k;
+
+       register cmph_uint32 m = brz->size[h0];
+       register cmph_uint32 b = fch_calc_b(brz->c, m);
+       register double p1 = fch_calc_p1(m);
+       register double p2 = fch_calc_p2(b);
+       register cmph_uint32 h1 = hash(brz->h1[h0], key, keylen) % m;
+       register cmph_uint32 h2 = hash(brz->h2[h0], key, keylen) % m;
+       register cmph_uint8 mphf_bucket = 0;
+       h1 = mixh10h11h12(b, p1, p2, h1);
+       mphf_bucket = (cmph_uint8)((h2 + brz->g[h0][h1]) % m);
+       return (mphf_bucket + brz->offset[h0]);
+}
+
+cmph_uint32 brz_search(cmph_t *mphf, const char *key, cmph_uint32 keylen)
+{
+       brz_data_t *brz = mphf->data;
+       cmph_uint32 fingerprint[3];
+       switch(brz->algo)
+       {
+               case CMPH_FCH:
+                       return brz_fch_search(brz, key, keylen, fingerprint);
+               case CMPH_BMZ8:
+                       return brz_bmz8_search(brz, key, keylen, fingerprint);
+               default: assert(0);
+       }
+       return 0;
+}
+void brz_destroy(cmph_t *mphf)
+{
+       cmph_uint32 i;
+       brz_data_t *data = (brz_data_t *)mphf->data;
+       if(data->g)
+       {
+               for(i = 0; i < data->k; i++)
+               {
+                       free(data->g[i]);
+                       hash_state_destroy(data->h1[i]);
+                       hash_state_destroy(data->h2[i]);
+               }
+               free(data->g);
+               free(data->h1);
+               free(data->h2);
+       }
+       hash_state_destroy(data->h0);
+       free(data->size);
+       free(data->offset);
+       free(data);
+       free(mphf);
+}
+
+/** \fn void brz_pack(cmph_t *mphf, void *packed_mphf);
+ *  \brief Support the ability to pack a perfect hash function into a preallocated contiguous memory space pointed by packed_mphf.
+ *  \param mphf pointer to the resulting mphf
+ *  \param packed_mphf pointer to the contiguous memory area used to store the resulting mphf. The size of packed_mphf must be at least cmph_packed_size() 
+ */
+void brz_pack(cmph_t *mphf, void *packed_mphf)
+{
+       brz_data_t *data = (brz_data_t *)mphf->data;
+       cmph_uint8 * ptr = packed_mphf;
+       cmph_uint32 i,n;
+       
+       // packing internal algo type
+       memcpy(ptr, &(data->algo), sizeof(data->algo));
+       ptr += sizeof(data->algo);
+
+       // packing h0 type
+       CMPH_HASH h0_type = hash_get_type(data->h0); 
+       memcpy(ptr, &h0_type, sizeof(h0_type));
+       ptr += sizeof(h0_type);
+
+       // packing h0
+       hash_state_pack(data->h0, ptr);
+       ptr += hash_state_packed_size(h0_type);
+       
+       // packing k
+       memcpy(ptr, &(data->k), sizeof(data->k));
+       ptr += sizeof(data->k);
+
+       // packing c
+       *((cmph_uint64 *)ptr) = (cmph_uint64)data->c; 
+       ptr += sizeof(data->c);
+
+       // packing h1 type
+       CMPH_HASH h1_type = hash_get_type(data->h1[0]); 
+       memcpy(ptr, &h1_type, sizeof(h1_type));
+       ptr += sizeof(h1_type);
+
+       // packing h2 type
+       CMPH_HASH h2_type = hash_get_type(data->h2[0]); 
+       memcpy(ptr, &h2_type, sizeof(h2_type));
+       ptr += sizeof(h2_type);
+
+       // packing size
+       memcpy(ptr, data->size, sizeof(cmph_uint8)*data->k);    
+       ptr += data->k;
+       
+       // packing offset
+       memcpy(ptr, data->offset, sizeof(cmph_uint32)*data->k); 
+       ptr += sizeof(cmph_uint32)*data->k;
+       
+       #if defined (__ia64) || defined (__x86_64__)
+               cmph_uint64 * g_is_ptr = (cmph_uint64 *)ptr;
+       #else
+               cmph_uint32 * g_is_ptr = (cmph_uint32 *)ptr;
+       #endif
+       
+       cmph_uint8 * g_i = (cmph_uint8 *) (g_is_ptr + data->k);
+       
+       for(i = 0; i < data->k; i++)
+       {
+               #if defined (__ia64) || defined (__x86_64__)
+                       *g_is_ptr++ = (cmph_uint64)g_i;
+               #else
+                       *g_is_ptr++ = (cmph_uint32)g_i;
+               #endif
+               // packing h1[i]
+               hash_state_pack(data->h1[i], g_i);
+               g_i += hash_state_packed_size(h1_type);
+               
+               // packing h2[i]
+               hash_state_pack(data->h2[i], g_i);
+               g_i += hash_state_packed_size(h2_type);
+
+               // packing g_i
+               switch(data->algo)
+               {
+                       case CMPH_FCH:
+                               n = fch_calc_b(data->c, data->size[i]);
+                               break;
+                       case CMPH_BMZ8:
+                               n = (cmph_uint32)ceil(data->c * data->size[i]);
+                               break;
+                       default: assert(0);
+               }
+               memcpy(g_i, data->g[i], sizeof(cmph_uint8)*n);  
+               g_i += n;
+               
+       }
+
+}
+
+/** \fn cmph_uint32 brz_packed_size(cmph_t *mphf);
+ *  \brief Return the amount of space needed to pack mphf.
+ *  \param mphf pointer to a mphf
+ *  \return the size of the packed function or zero for failures
+ */ 
+cmph_uint32 brz_packed_size(cmph_t *mphf)
+{
+       cmph_uint32 i;
+       cmph_uint32 size = 0;
+       brz_data_t *data = (brz_data_t *)mphf->data;
+       CMPH_HASH h0_type = hash_get_type(data->h0); 
+       CMPH_HASH h1_type = hash_get_type(data->h1[0]); 
+       CMPH_HASH h2_type = hash_get_type(data->h2[0]);
+       size = (cmph_uint32)(2*sizeof(CMPH_ALGO) + 3*sizeof(CMPH_HASH) + hash_state_packed_size(h0_type) + sizeof(cmph_uint32) + 
+                       sizeof(double) + sizeof(cmph_uint8)*data->k + sizeof(cmph_uint32)*data->k);
+       // pointers to g_is
+       #if defined (__ia64) || defined (__x86_64__)
+               size +=  (cmph_uint32) sizeof(cmph_uint64)*data->k;
+       #else
+               size +=  (cmph_uint32) sizeof(cmph_uint32)*data->k;
+       #endif
+       
+       size += hash_state_packed_size(h1_type) * data->k;
+       size += hash_state_packed_size(h2_type) * data->k;
+       
+       cmph_uint32 n = 0;
+       for(i = 0; i < data->k; i++)
+       {
+               switch(data->algo)
+               {
+                       case CMPH_FCH:
+                               n = fch_calc_b(data->c, data->size[i]);
+                               break;
+                       case CMPH_BMZ8:
+                               n = (cmph_uint32)ceil(data->c * data->size[i]);
+                               break;
+                       default: assert(0);
+               }
+               size += n;      
+       }
+       return size;
+}
+
+
+
+static cmph_uint32 brz_bmz8_search_packed(cmph_uint32 *packed_mphf, const char *key, cmph_uint32 keylen, cmph_uint32 * fingerprint)
+{
+       register CMPH_HASH h0_type = *packed_mphf++;
+       register cmph_uint32 *h0_ptr = packed_mphf;
+       packed_mphf = (cmph_uint32 *)(((cmph_uint8 *)packed_mphf) + hash_state_packed_size(h0_type)); 
+       
+       register cmph_uint32 k = *packed_mphf++;
+
+       register double c = (double)(*((cmph_uint64*)packed_mphf));
+       packed_mphf += 2;
+
+       register CMPH_HASH h1_type = *packed_mphf++; 
+       
+       register CMPH_HASH h2_type = *packed_mphf++; 
+
+       register cmph_uint8 * size = (cmph_uint8 *) packed_mphf;
+       packed_mphf = (cmph_uint32 *)(size + k);  
+       
+       register cmph_uint32 * offset = packed_mphf;
+       packed_mphf += k;
+
+       register cmph_uint32 h0;
+       
+       hash_vector_packed(h0_ptr, h0_type, key, keylen, fingerprint);
+       h0 = fingerprint[2] % k;
+       
+       register cmph_uint32 m = size[h0];
+       register cmph_uint32 n = (cmph_uint32)ceil(c * m);
+
+       #if defined (__ia64) || defined (__x86_64__)
+               register cmph_uint64 * g_is_ptr = (cmph_uint64 *)packed_mphf;
+       #else
+               register cmph_uint32 * g_is_ptr = packed_mphf;
+       #endif
+       
+       register cmph_uint8 * h1_ptr = (cmph_uint8 *) g_is_ptr[h0];
+       
+       register cmph_uint8 * h2_ptr = h1_ptr + hash_state_packed_size(h1_type);
+
+       register cmph_uint8 * g = h2_ptr + hash_state_packed_size(h2_type);
+       
+       register cmph_uint32 h1 = hash_packed(h1_ptr, h1_type, key, keylen) % n;
+       register cmph_uint32 h2 = hash_packed(h2_ptr, h2_type, key, keylen) % n;
+
+       register cmph_uint8 mphf_bucket;
+               
+       if (h1 == h2 && ++h2 >= n) h2 = 0;
+       mphf_bucket = (cmph_uint8)(g[h1] + g[h2]); 
+       DEBUGP("key: %s h1: %u h2: %u h0: %u\n", key, h1, h2, h0);
+       DEBUGP("Address: %u\n", mphf_bucket + offset[h0]);
+       return (mphf_bucket + offset[h0]);      
+}
+
+static cmph_uint32 brz_fch_search_packed(cmph_uint32 *packed_mphf, const char *key, cmph_uint32 keylen, cmph_uint32 * fingerprint)
+{
+       register CMPH_HASH h0_type = *packed_mphf++;
+       
+       register cmph_uint32 *h0_ptr = packed_mphf;
+       packed_mphf = (cmph_uint32 *)(((cmph_uint8 *)packed_mphf) + hash_state_packed_size(h0_type)); 
+       
+       register cmph_uint32 k = *packed_mphf++;
+
+       register double c = (double)(*((cmph_uint64*)packed_mphf));
+       packed_mphf += 2;
+
+       register CMPH_HASH h1_type = *packed_mphf++; 
+
+       register CMPH_HASH h2_type = *packed_mphf++; 
+
+       register cmph_uint8 * size = (cmph_uint8 *) packed_mphf;
+       packed_mphf = (cmph_uint32 *)(size + k);  
+       
+       register cmph_uint32 * offset = packed_mphf;
+       packed_mphf += k;
+       
+       register cmph_uint32 h0;
+       
+       hash_vector_packed(h0_ptr, h0_type, key, keylen, fingerprint);
+       h0 = fingerprint[2] % k;
+       
+       register cmph_uint32 m = size[h0];
+       register cmph_uint32 b = fch_calc_b(c, m);
+       register double p1 = fch_calc_p1(m);
+       register double p2 = fch_calc_p2(b);
+       
+       #if defined (__ia64) || defined (__x86_64__)
+               register cmph_uint64 * g_is_ptr = (cmph_uint64 *)packed_mphf;
+       #else
+               register cmph_uint32 * g_is_ptr = packed_mphf;
+       #endif
+       
+       register cmph_uint8 * h1_ptr = (cmph_uint8 *) g_is_ptr[h0];
+       
+       register cmph_uint8 * h2_ptr = h1_ptr + hash_state_packed_size(h1_type);
+
+       register cmph_uint8 * g = h2_ptr + hash_state_packed_size(h2_type);
+       
+       register cmph_uint32 h1 = hash_packed(h1_ptr, h1_type, key, keylen) % m;
+       register cmph_uint32 h2 = hash_packed(h2_ptr, h2_type, key, keylen) % m;
+
+       register cmph_uint8 mphf_bucket = 0;
+       h1 = mixh10h11h12(b, p1, p2, h1);
+       mphf_bucket = (cmph_uint8)((h2 + g[h1]) % m);
+       return (mphf_bucket + offset[h0]);
+}
+
+/** cmph_uint32 brz_search(void *packed_mphf, const char *key, cmph_uint32 keylen);
+ *  \brief Use the packed mphf to do a search. 
+ *  \param  packed_mphf pointer to the packed mphf
+ *  \param key key to be hashed
+ *  \param keylen key legth in bytes
+ *  \return The mphf value
+ */
+cmph_uint32 brz_search_packed(void *packed_mphf, const char *key, cmph_uint32 keylen)
+{
+       register cmph_uint32 *ptr = (cmph_uint32 *)packed_mphf; 
+       register CMPH_ALGO algo = *ptr++;
+       cmph_uint32 fingerprint[3];
+       switch(algo)
+       {
+               case CMPH_FCH:
+                       return brz_fch_search_packed(ptr, key, keylen, fingerprint);
+               case CMPH_BMZ8:
+                       return brz_bmz8_search_packed(ptr, key, keylen, fingerprint);
+               default: assert(0);
+       }
+}
+
diff --git a/girepository/cmph/brz.h b/girepository/cmph/brz.h
new file mode 100644 (file)
index 0000000..648f174
--- /dev/null
@@ -0,0 +1,47 @@
+#ifndef __CMPH_BRZ_H__
+#define __CMPH_BRZ_H__
+
+#include "cmph.h"
+
+typedef struct __brz_data_t brz_data_t;
+typedef struct __brz_config_data_t brz_config_data_t;
+
+brz_config_data_t *brz_config_new(void);
+void brz_config_set_hashfuncs(cmph_config_t *mph, CMPH_HASH *hashfuncs);
+void brz_config_set_tmp_dir(cmph_config_t *mph, cmph_uint8 *tmp_dir);
+void brz_config_set_mphf_fd(cmph_config_t *mph, FILE *mphf_fd);
+void brz_config_set_b(cmph_config_t *mph, cmph_uint32 b);
+void brz_config_set_algo(cmph_config_t *mph, CMPH_ALGO algo);
+void brz_config_set_memory_availability(cmph_config_t *mph, cmph_uint32 memory_availability);
+void brz_config_destroy(cmph_config_t *mph);
+cmph_t *brz_new(cmph_config_t *mph, double c);
+
+void brz_load(FILE *f, cmph_t *mphf);
+int brz_dump(cmph_t *mphf, FILE *f);
+void brz_destroy(cmph_t *mphf);
+cmph_uint32 brz_search(cmph_t *mphf, const char *key, cmph_uint32 keylen);
+
+/** \fn void brz_pack(cmph_t *mphf, void *packed_mphf);
+ *  \brief Support the ability to pack a perfect hash function into a preallocated contiguous memory space pointed by packed_mphf.
+ *  \param mphf pointer to the resulting mphf
+ *  \param packed_mphf pointer to the contiguous memory area used to store the resulting mphf. The size of packed_mphf must be at least cmph_packed_size() 
+ */
+void brz_pack(cmph_t *mphf, void *packed_mphf);
+
+/** \fn cmph_uint32 brz_packed_size(cmph_t *mphf);
+ *  \brief Return the amount of space needed to pack mphf.
+ *  \param mphf pointer to a mphf
+ *  \return the size of the packed function or zero for failures
+ */ 
+cmph_uint32 brz_packed_size(cmph_t *mphf);
+
+/** cmph_uint32 brz_search(void *packed_mphf, const char *key, cmph_uint32 keylen);
+ *  \brief Use the packed mphf to do a search. 
+ *  \param  packed_mphf pointer to the packed mphf
+ *  \param key key to be hashed
+ *  \param keylen key legth in bytes
+ *  \return The mphf value
+ */
+cmph_uint32 brz_search_packed(void *packed_mphf, const char *key, cmph_uint32 keylen);
+
+#endif
diff --git a/girepository/cmph/brz_structs.h b/girepository/cmph/brz_structs.h
new file mode 100755 (executable)
index 0000000..b781107
--- /dev/null
@@ -0,0 +1,39 @@
+#ifndef __CMPH_BRZ_STRUCTS_H__
+#define __CMPH_BRZ_STRUCTS_H__
+
+#include "hash_state.h"
+
+struct __brz_data_t
+{
+       CMPH_ALGO algo;      // CMPH algo for generating the MPHFs for the buckets (Just CMPH_FCH and CMPH_BMZ8)
+       cmph_uint32 m;       // edges (words) count
+       double c;      // constant c
+       cmph_uint8  *size;   // size[i] stores the number of edges represented by g[i][...]. 
+       cmph_uint32 *offset; // offset[i] stores the sum: size[0] + size[1] + ... size[i-1].
+       cmph_uint8 **g;      // g function. 
+       cmph_uint32 k;       // number of components
+       hash_state_t **h1;
+       hash_state_t **h2;
+       hash_state_t * h0;
+};
+
+struct __brz_config_data_t
+{
+       CMPH_HASH hashfuncs[3];
+       CMPH_ALGO algo;      // CMPH algo for generating the MPHFs for the buckets (Just CMPH_FCH and CMPH_BMZ8)
+       double c;      // constant c
+       cmph_uint32 m;       // edges (words) count
+       cmph_uint8  *size;   // size[i] stores the number of edges represented by g[i][...]. 
+       cmph_uint32 *offset; // offset[i] stores the sum: size[0] + size[1] + ... size[i-1].
+       cmph_uint8 **g;      // g function. 
+       cmph_uint8  b;       // parameter b. 
+       cmph_uint32 k;       // number of components
+       hash_state_t **h1;
+       hash_state_t **h2;
+       hash_state_t * h0;    
+       cmph_uint32 memory_availability; 
+       cmph_uint8 * tmp_dir; // temporary directory 
+       FILE * mphf_fd; // mphf file
+};
+
+#endif
diff --git a/girepository/cmph/buffer_entry.c b/girepository/cmph/buffer_entry.c
new file mode 100644 (file)
index 0000000..5dcc4d5
--- /dev/null
@@ -0,0 +1,103 @@
+#include "buffer_entry.h"
+#include <stdio.h>
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+
+struct __buffer_entry_t
+{
+       FILE *fd;
+       cmph_uint8 * buff;
+       cmph_uint32 capacity, // buffer entry capacity
+                   nbytes,   // buffer entry used bytes
+                   pos;      // current read position in buffer entry
+       cmph_uint8  eof;      // flag to indicate end of file
+};
+
+buffer_entry_t * buffer_entry_new(cmph_uint32 capacity)
+{
+       buffer_entry_t *buff_entry = (buffer_entry_t *)malloc(sizeof(buffer_entry_t));
+       assert(buff_entry);
+       buff_entry->fd = NULL;
+       buff_entry->buff = NULL;
+       buff_entry->capacity = capacity;
+       buff_entry->nbytes = capacity;
+       buff_entry->pos = capacity;
+        buff_entry->eof = 0;
+       return buff_entry;
+}
+
+void buffer_entry_open(buffer_entry_t * buffer_entry, char * filename)
+{
+       buffer_entry->fd = fopen(filename, "rb");
+}
+
+void buffer_entry_set_capacity(buffer_entry_t * buffer_entry, cmph_uint32 capacity)
+{
+       buffer_entry->capacity = capacity;
+}
+
+
+cmph_uint32 buffer_entry_get_capacity(buffer_entry_t * buffer_entry)
+{
+       return buffer_entry->capacity;
+}
+
+static void buffer_entry_load(buffer_entry_t * buffer_entry)
+{
+       free(buffer_entry->buff);
+       buffer_entry->buff = (cmph_uint8 *)calloc((size_t)buffer_entry->capacity, sizeof(cmph_uint8));
+       buffer_entry->nbytes = (cmph_uint32)fread(buffer_entry->buff, (size_t)1, (size_t)buffer_entry->capacity, buffer_entry->fd);
+       if (buffer_entry->nbytes != buffer_entry->capacity) buffer_entry->eof = 1;
+       buffer_entry->pos = 0;
+}
+
+cmph_uint8 * buffer_entry_read_key(buffer_entry_t * buffer_entry, cmph_uint32 * keylen)
+{
+       cmph_uint8 * buf = NULL;
+       cmph_uint32 lacked_bytes = sizeof(*keylen);
+       cmph_uint32 copied_bytes = 0;
+       if(buffer_entry->eof && (buffer_entry->pos == buffer_entry->nbytes)) // end
+       {
+               free(buf);
+               return NULL;
+       }
+       if((buffer_entry->pos + lacked_bytes) > buffer_entry->nbytes) 
+       {
+               copied_bytes = buffer_entry->nbytes - buffer_entry->pos;
+               lacked_bytes = (buffer_entry->pos + lacked_bytes) - buffer_entry->nbytes;
+               if (copied_bytes != 0) memcpy(keylen, buffer_entry->buff + buffer_entry->pos, (size_t)copied_bytes);
+               buffer_entry_load(buffer_entry);
+       }
+       memcpy(keylen + copied_bytes, buffer_entry->buff + buffer_entry->pos, (size_t)lacked_bytes);
+       buffer_entry->pos += lacked_bytes;
+       
+       lacked_bytes = *keylen;
+       copied_bytes = 0;
+       buf = (cmph_uint8 *)malloc(*keylen + sizeof(*keylen));
+        memcpy(buf, keylen, sizeof(*keylen));
+       if((buffer_entry->pos + lacked_bytes) > buffer_entry->nbytes) {
+               copied_bytes = buffer_entry->nbytes - buffer_entry->pos;
+               lacked_bytes = (buffer_entry->pos + lacked_bytes) - buffer_entry->nbytes;
+               if (copied_bytes != 0) {
+                       memcpy(buf + sizeof(*keylen), buffer_entry->buff + buffer_entry->pos, (size_t)copied_bytes);
+                }
+               buffer_entry_load(buffer_entry);
+       }        
+       memcpy(buf+sizeof(*keylen)+copied_bytes, buffer_entry->buff + buffer_entry->pos, (size_t)lacked_bytes);
+       buffer_entry->pos += lacked_bytes;
+       return buf;
+}
+
+void buffer_entry_destroy(buffer_entry_t * buffer_entry)
+{
+  fclose(buffer_entry->fd);
+  buffer_entry->fd = NULL;
+  free(buffer_entry->buff);
+  buffer_entry->buff = NULL;
+  buffer_entry->capacity = 0;
+  buffer_entry->nbytes = 0;
+  buffer_entry->pos = 0;  
+  buffer_entry->eof = 0;
+  free(buffer_entry);
+}
diff --git a/girepository/cmph/buffer_entry.h b/girepository/cmph/buffer_entry.h
new file mode 100644 (file)
index 0000000..62102ba
--- /dev/null
@@ -0,0 +1,14 @@
+#ifndef __CMPH_BUFFER_ENTRY_H__
+#define __CMPH_BUFFER_ENTRY_H__
+
+#include "cmph_types.h"
+#include <stdio.h>
+typedef struct __buffer_entry_t buffer_entry_t;
+
+buffer_entry_t * buffer_entry_new(cmph_uint32 capacity);
+void buffer_entry_set_capacity(buffer_entry_t * buffer_entry, cmph_uint32 capacity);
+cmph_uint32 buffer_entry_get_capacity(buffer_entry_t * buffer_entry);
+void buffer_entry_open(buffer_entry_t * buffer_entry, char * filename);
+cmph_uint8 * buffer_entry_read_key(buffer_entry_t * buffer_entry, cmph_uint32 * keylen);
+void buffer_entry_destroy(buffer_entry_t * buffer_entry);
+#endif
diff --git a/girepository/cmph/buffer_manager.c b/girepository/cmph/buffer_manager.c
new file mode 100644 (file)
index 0000000..5a051e2
--- /dev/null
@@ -0,0 +1,64 @@
+#include "buffer_manager.h"
+#include "buffer_entry.h"
+#include <stdio.h>
+#include <assert.h>
+#include <stdlib.h>
+struct __buffer_manager_t
+{
+       cmph_uint32 memory_avail;         // memory available
+       buffer_entry_t ** buffer_entries; // buffer entries to be managed
+       cmph_uint32 nentries;             // number of entries to be managed
+       cmph_uint32 *memory_avail_list;   // memory available list
+       int pos_avail_list;               // current position in memory available list
+};
+
+buffer_manager_t * buffer_manager_new(cmph_uint32 memory_avail, cmph_uint32 nentries)
+{
+       cmph_uint32 memory_avail_entry, i;
+       buffer_manager_t *buff_manager = (buffer_manager_t *)malloc(sizeof(buffer_manager_t));
+       assert(buff_manager);
+       buff_manager->memory_avail = memory_avail;
+       buff_manager->buffer_entries = (buffer_entry_t **)calloc((size_t)nentries, sizeof(buffer_entry_t *));
+       buff_manager->memory_avail_list = (cmph_uint32 *)calloc((size_t)nentries, sizeof(cmph_uint32));
+       buff_manager->pos_avail_list = -1;
+       buff_manager->nentries = nentries;
+       memory_avail_entry = buff_manager->memory_avail/buff_manager->nentries + 1;
+       for(i = 0; i < buff_manager->nentries; i++)
+       {
+               buff_manager->buffer_entries[i] = buffer_entry_new(memory_avail_entry);
+       }       
+       return buff_manager;
+}
+
+void buffer_manager_open(buffer_manager_t * buffer_manager, cmph_uint32 index, char * filename)
+{
+       buffer_entry_open(buffer_manager->buffer_entries[index], filename);
+}
+
+cmph_uint8 * buffer_manager_read_key(buffer_manager_t * buffer_manager, cmph_uint32 index, cmph_uint32 * keylen)
+{
+       cmph_uint8 * key = NULL;
+       if (buffer_manager->pos_avail_list >= 0 ) // recovering memory
+       {
+               cmph_uint32 new_capacity = buffer_entry_get_capacity(buffer_manager->buffer_entries[index]) + buffer_manager->memory_avail_list[(buffer_manager->pos_avail_list)--];
+               buffer_entry_set_capacity(buffer_manager->buffer_entries[index], new_capacity);
+       }
+       key = buffer_entry_read_key(buffer_manager->buffer_entries[index], keylen);
+       if (key == NULL) // storing memory to be recovered
+       {
+               buffer_manager->memory_avail_list[++(buffer_manager->pos_avail_list)] = buffer_entry_get_capacity(buffer_manager->buffer_entries[index]);
+       }
+       return key;
+}
+
+void buffer_manager_destroy(buffer_manager_t * buffer_manager)
+{ 
+       cmph_uint32 i;
+       for(i = 0; i < buffer_manager->nentries; i++)
+       {
+               buffer_entry_destroy(buffer_manager->buffer_entries[i]);
+       }
+       free(buffer_manager->memory_avail_list);
+       free(buffer_manager->buffer_entries);
+       free(buffer_manager);
+}
diff --git a/girepository/cmph/buffer_manager.h b/girepository/cmph/buffer_manager.h
new file mode 100644 (file)
index 0000000..af99c20
--- /dev/null
@@ -0,0 +1,12 @@
+#ifndef __CMPH_BUFFER_MANAGE_H__
+#define __CMPH_BUFFER_MANAGE_H__
+
+#include "cmph_types.h"
+#include <stdio.h>
+typedef struct __buffer_manager_t buffer_manager_t;
+
+buffer_manager_t * buffer_manager_new(cmph_uint32 memory_avail, cmph_uint32 nentries);
+void buffer_manager_open(buffer_manager_t * buffer_manager, cmph_uint32 index, char * filename);
+cmph_uint8 * buffer_manager_read_key(buffer_manager_t * buffer_manager, cmph_uint32 index, cmph_uint32 * keylen);
+void buffer_manager_destroy(buffer_manager_t * buffer_manager);
+#endif
diff --git a/girepository/cmph/chd.c b/girepository/cmph/chd.c
new file mode 100644 (file)
index 0000000..7fb3b8b
--- /dev/null
@@ -0,0 +1,271 @@
+#include<stdio.h>
+#include<stdlib.h>
+#include<string.h>
+#include<math.h>
+#include<time.h>
+#include<assert.h>
+#include<limits.h>
+
+#include "cmph_structs.h"
+#include "chd_structs.h"
+#include "chd.h"
+#include "bitbool.h"
+//#define DEBUG
+#include "debug.h"
+
+chd_config_data_t *chd_config_new(cmph_config_t *mph)
+{
+       cmph_io_adapter_t *key_source = mph->key_source;
+       chd_config_data_t *chd;
+       chd = (chd_config_data_t *)malloc(sizeof(chd_config_data_t));
+       assert(chd);
+       memset(chd, 0, sizeof(chd_config_data_t));
+
+       chd->chd_ph = cmph_config_new(key_source);
+       cmph_config_set_algo(chd->chd_ph, CMPH_CHD_PH);
+
+       return chd;
+}
+
+void chd_config_destroy(cmph_config_t *mph)
+{
+       chd_config_data_t *data = (chd_config_data_t *) mph->data;
+       DEBUGP("Destroying algorithm dependent data\n");
+       if(data->chd_ph)
+       {
+               cmph_config_destroy(data->chd_ph);
+               data->chd_ph = NULL;
+       }
+       free(data);
+}
+
+
+void chd_config_set_hashfuncs(cmph_config_t *mph, CMPH_HASH *hashfuncs)
+{
+       chd_config_data_t *data = (chd_config_data_t *) mph->data;
+       cmph_config_set_hashfuncs(data->chd_ph, hashfuncs);
+}
+
+
+void chd_config_set_b(cmph_config_t *mph, cmph_uint32 keys_per_bucket)
+{
+       chd_config_data_t *data = (chd_config_data_t *) mph->data;
+       cmph_config_set_b(data->chd_ph, keys_per_bucket);
+}
+
+
+void chd_config_set_keys_per_bin(cmph_config_t *mph, cmph_uint32 keys_per_bin)
+{
+       chd_config_data_t *data = (chd_config_data_t *) mph->data;
+       cmph_config_set_keys_per_bin(data->chd_ph, keys_per_bin);
+}
+
+
+cmph_t *chd_new(cmph_config_t *mph, double c)
+{
+       cmph_t *mphf = NULL;
+       chd_data_t *chdf = NULL;
+       chd_config_data_t *chd = (chd_config_data_t *)mph->data;
+       chd_ph_config_data_t * chd_ph = (chd_ph_config_data_t *)chd->chd_ph->data;
+       compressed_rank_t cr;
+       
+       register cmph_t * chd_phf = NULL;
+       register cmph_uint32 packed_chd_phf_size = 0; 
+       cmph_uint8 * packed_chd_phf = NULL;
+       
+       register cmph_uint32 packed_cr_size = 0; 
+       cmph_uint8 * packed_cr = NULL;
+
+       register cmph_uint32 i, idx, nkeys, nvals, nbins;
+       cmph_uint32 * vals_table = NULL;
+       register cmph_uint32 * occup_table = NULL;
+       #ifdef CMPH_TIMING
+       double construction_time_begin = 0.0;
+       double construction_time = 0.0;
+       ELAPSED_TIME_IN_SECONDS(&construction_time_begin);
+       #endif
+
+       cmph_config_set_verbosity(chd->chd_ph, mph->verbosity); 
+       cmph_config_set_graphsize(chd->chd_ph, c);
+       
+       if (mph->verbosity)
+       {
+               fprintf(stderr, "Generating a CHD_PH perfect hash function with a load factor equal to %.3f\n", c);
+       }
+       
+       chd_phf = cmph_new(chd->chd_ph);
+       
+       if(chd_phf == NULL) 
+       {
+               return NULL;
+       }
+       
+       packed_chd_phf_size = cmph_packed_size(chd_phf); 
+       DEBUGP("packed_chd_phf_size = %u\n", packed_chd_phf_size);
+       
+       /* Make sure that we have enough space to pack the mphf. */
+       packed_chd_phf = calloc((size_t)packed_chd_phf_size,(size_t)1);
+
+       /* Pack the mphf. */
+       cmph_pack(chd_phf, packed_chd_phf);
+
+       cmph_destroy(chd_phf);
+       
+       
+       if (mph->verbosity)
+       {
+               fprintf(stderr, "Compressing the range of the resulting CHD_PH perfect hash function\n");
+       }
+
+       compressed_rank_init(&cr);
+       nbins = chd_ph->n;
+       nkeys = chd_ph->m;
+       nvals =  nbins - nkeys; 
+       
+       vals_table = (cmph_uint32 *)calloc(nvals, sizeof(cmph_uint32));
+       occup_table = (cmph_uint32 *)chd_ph->occup_table;
+       
+       for(i = 0, idx = 0; i < nbins; i++)
+       {
+               if(!GETBIT32(occup_table, i))
+               {
+                       vals_table[idx++] = i;
+               }
+       }
+       
+       compressed_rank_generate(&cr, vals_table, nvals);
+       free(vals_table);
+       
+       packed_cr_size = compressed_rank_packed_size(&cr);
+       packed_cr = (cmph_uint8 *) calloc(packed_cr_size, sizeof(cmph_uint8));
+       compressed_rank_pack(&cr, packed_cr);
+       compressed_rank_destroy(&cr);
+
+       mphf = (cmph_t *)malloc(sizeof(cmph_t));
+       mphf->algo = mph->algo;
+       chdf = (chd_data_t *)malloc(sizeof(chd_data_t));
+       
+       chdf->packed_cr = packed_cr;
+       packed_cr = NULL; //transfer memory ownership
+
+       chdf->packed_chd_phf = packed_chd_phf;
+       packed_chd_phf = NULL; //transfer memory ownership
+       
+       chdf->packed_chd_phf_size = packed_chd_phf_size;
+       chdf->packed_cr_size = packed_cr_size;
+       
+       mphf->data = chdf;
+       mphf->size = nkeys;
+
+       DEBUGP("Successfully generated minimal perfect hash\n");
+       if (mph->verbosity)
+       {
+               fprintf(stderr, "Successfully generated minimal perfect hash function\n");
+       }
+       #ifdef CMPH_TIMING      
+       ELAPSED_TIME_IN_SECONDS(&construction_time);
+       register cmph_uint32 space_usage =  chd_packed_size(mphf)*8;
+       construction_time = construction_time - construction_time_begin;
+       fprintf(stdout, "%u\t%.2f\t%u\t%.4f\t%.4f\n", nkeys, c, chd_ph->keys_per_bucket, construction_time, space_usage/(double)nkeys);
+       #endif  
+
+       return mphf;
+}
+
+void chd_load(FILE *fd, cmph_t *mphf)
+{
+       register size_t nbytes;
+       chd_data_t *chd = (chd_data_t *)malloc(sizeof(chd_data_t));
+
+       DEBUGP("Loading chd mphf\n");
+       mphf->data = chd;
+
+       nbytes = fread(&chd->packed_chd_phf_size, sizeof(cmph_uint32), (size_t)1, fd);
+       DEBUGP("Loading CHD_PH perfect hash function with %u bytes to disk\n", chd->packed_chd_phf_size);
+       chd->packed_chd_phf = (cmph_uint8 *) calloc((size_t)chd->packed_chd_phf_size,(size_t)1);
+       nbytes = fread(chd->packed_chd_phf, chd->packed_chd_phf_size, (size_t)1, fd);
+
+       nbytes = fread(&chd->packed_cr_size, sizeof(cmph_uint32), (size_t)1, fd);
+       DEBUGP("Loading Compressed rank structure, which has %u bytes\n", chd->packed_cr_size);
+       chd->packed_cr = (cmph_uint8 *) calloc((size_t)chd->packed_cr_size, (size_t)1);
+       nbytes = fread(chd->packed_cr, chd->packed_cr_size, (size_t)1, fd);
+}
+
+int chd_dump(cmph_t *mphf, FILE *fd)
+{
+       register size_t nbytes;
+       chd_data_t *data = (chd_data_t *)mphf->data;
+       
+       __cmph_dump(mphf, fd);
+       // Dumping CHD_PH perfect hash function
+
+       DEBUGP("Dumping CHD_PH perfect hash function with %u bytes to disk\n", data->packed_chd_phf_size);
+       nbytes = fwrite(&data->packed_chd_phf_size, sizeof(cmph_uint32), (size_t)1, fd);
+       nbytes = fwrite(data->packed_chd_phf, data->packed_chd_phf_size, (size_t)1, fd);
+
+       DEBUGP("Dumping compressed rank structure with %u bytes to disk\n", buflen);
+       nbytes = fwrite(&data->packed_cr_size, sizeof(cmph_uint32), (size_t)1, fd);
+       nbytes = fwrite(data->packed_cr, data->packed_cr_size, (size_t)1, fd);
+       
+       return 1;
+}
+
+void chd_destroy(cmph_t *mphf)
+{
+       chd_data_t *data = (chd_data_t *)mphf->data;
+       free(data->packed_chd_phf);
+       free(data->packed_cr);
+       free(data);
+       free(mphf);
+}
+
+static inline cmph_uint32 _chd_search(void * packed_chd_phf, void * packed_cr, const char *key, cmph_uint32 keylen)
+{
+       register cmph_uint32 bin_idx = cmph_search_packed(packed_chd_phf, key, keylen);
+       register cmph_uint32 rank = compressed_rank_query_packed(packed_cr, bin_idx);
+       return bin_idx - rank;
+}
+
+cmph_uint32 chd_search(cmph_t *mphf, const char *key, cmph_uint32 keylen)
+{
+       register chd_data_t * chd = mphf->data;
+       return _chd_search(chd->packed_chd_phf, chd->packed_cr, key, keylen);
+}
+
+void chd_pack(cmph_t *mphf, void *packed_mphf)
+{
+       chd_data_t *data = (chd_data_t *)mphf->data;
+       cmph_uint32 * ptr = packed_mphf;
+       cmph_uint8 * ptr8;
+
+       // packing packed_cr_size and packed_cr
+       *ptr = data->packed_cr_size;
+       ptr8 =  (cmph_uint8 *) (ptr + 1);
+       
+       memcpy(ptr8, data->packed_cr, data->packed_cr_size);
+       ptr8 += data->packed_cr_size;
+       
+       ptr = (cmph_uint32 *) ptr8;
+       *ptr = data->packed_chd_phf_size;
+
+       ptr8 =  (cmph_uint8 *) (ptr + 1);
+       memcpy(ptr8, data->packed_chd_phf, data->packed_chd_phf_size);
+}
+
+cmph_uint32 chd_packed_size(cmph_t *mphf)
+{
+       register chd_data_t *data = (chd_data_t *)mphf->data;
+       return (cmph_uint32)(sizeof(CMPH_ALGO) + 2*sizeof(cmph_uint32) + data->packed_cr_size + data->packed_chd_phf_size);
+
+}
+
+cmph_uint32 chd_search_packed(void *packed_mphf, const char *key, cmph_uint32 keylen)
+{
+
+       register cmph_uint32 * ptr = packed_mphf;
+       register cmph_uint32 packed_cr_size = *ptr++;
+       register cmph_uint8 * packed_chd_phf = ((cmph_uint8 *) ptr) + packed_cr_size + sizeof(cmph_uint32);
+       return _chd_search(packed_chd_phf, ptr, key, keylen);
+}
+
+
diff --git a/girepository/cmph/chd.h b/girepository/cmph/chd.h
new file mode 100644 (file)
index 0000000..e829df8
--- /dev/null
@@ -0,0 +1,59 @@
+#ifndef _CMPH_CHD_H__
+#define _CMPH_CHD_H__
+
+#include "cmph.h"
+
+typedef struct __chd_data_t chd_data_t;
+typedef struct __chd_config_data_t chd_config_data_t;
+
+/* Config API */
+chd_config_data_t *chd_config_new(cmph_config_t * mph);
+void chd_config_set_hashfuncs(cmph_config_t *mph, CMPH_HASH *hashfuncs);
+
+/** \fn void chd_config_set_keys_per_bin(cmph_config_t *mph, cmph_uint32 keys_per_bin);
+ *  \brief Allows to set the number of keys per bin.
+ *  \param mph pointer to the configuration structure
+ *  \param keys_per_bin value for the number of keys per bin 
+ */
+void chd_config_set_keys_per_bin(cmph_config_t *mph, cmph_uint32 keys_per_bin);
+
+/** \fn void chd_config_set_b(cmph_config_t *mph, cmph_uint32 keys_per_bucket);
+ *  \brief Allows to set the number of keys per bucket.
+ *  \param mph pointer to the configuration structure
+ *  \param keys_per_bucket value for the number of keys per bucket 
+ */
+void chd_config_set_b(cmph_config_t *mph, cmph_uint32 keys_per_bucket);
+void chd_config_destroy(cmph_config_t *mph);
+
+
+/* Chd algorithm API */
+cmph_t *chd_new(cmph_config_t *mph, double c);
+void chd_load(FILE *fd, cmph_t *mphf);
+int chd_dump(cmph_t *mphf, FILE *fd);
+void chd_destroy(cmph_t *mphf);
+cmph_uint32 chd_search(cmph_t *mphf, const char *key, cmph_uint32 keylen);
+
+/** \fn void chd_pack(cmph_t *mphf, void *packed_mphf);
+ *  \brief Support the ability to pack a perfect hash function into a preallocated contiguous memory space pointed by packed_mphf.
+ *  \param mphf pointer to the resulting mphf
+ *  \param packed_mphf pointer to the contiguous memory area used to store the resulting mphf. The size of packed_mphf must be at least cmph_packed_size() 
+ */
+void chd_pack(cmph_t *mphf, void *packed_mphf);
+
+/** \fn cmph_uint32 chd_packed_size(cmph_t *mphf);
+ *  \brief Return the amount of space needed to pack mphf.
+ *  \param mphf pointer to a mphf
+ *  \return the size of the packed function or zero for failures
+ */ 
+cmph_uint32 chd_packed_size(cmph_t *mphf);
+
+/** cmph_uint32 chd_search(void *packed_mphf, const char *key, cmph_uint32 keylen);
+ *  \brief Use the packed mphf to do a search. 
+ *  \param  packed_mphf pointer to the packed mphf
+ *  \param key key to be hashed
+ *  \param keylen key legth in bytes
+ *  \return The mphf value
+ */
+cmph_uint32 chd_search_packed(void *packed_mphf, const char *key, cmph_uint32 keylen);
+
+#endif
diff --git a/girepository/cmph/chd_ph.c b/girepository/cmph/chd_ph.c
new file mode 100644 (file)
index 0000000..71f83fb
--- /dev/null
@@ -0,0 +1,988 @@
+#include<stdio.h>
+#include<stdlib.h>
+#include<string.h>
+#include<math.h>
+#include<time.h>
+#include<assert.h>
+#include<limits.h>
+
+#include "cmph_structs.h"
+#include "chd_structs_ph.h"
+#include "chd_ph.h"
+#include"miller_rabin.h"
+#include"bitbool.h"
+
+
+//#define DEBUG
+#include "debug.h"
+
+// NO_ELEMENT is equivalent to null pointer
+#ifndef NO_ELEMENT
+#define NO_ELEMENT UINT_MAX
+#endif
+
+// struct used to represent items at mapping, ordering and searching phases
+struct _chd_ph_item_t
+{
+       cmph_uint32 f;
+       cmph_uint32 h;
+};
+typedef struct _chd_ph_item_t chd_ph_item_t;
+
+// struct to represent the items at mapping phase only. 
+struct _chd_ph_map_item_t
+{
+       cmph_uint32 f;
+       cmph_uint32 h;
+       cmph_uint32 bucket_num;
+};
+typedef struct _chd_ph_map_item_t chd_ph_map_item_t;
+
+// struct to represent a bucket
+struct _chd_ph_bucket_t
+{
+       cmph_uint32 items_list; // offset
+       union
+       {
+               cmph_uint32 size;
+               cmph_uint32 bucket_id;
+       };
+};
+
+typedef struct _chd_ph_bucket_t chd_ph_bucket_t;
+
+struct _chd_ph_sorted_list_t
+{
+       cmph_uint32 buckets_list;
+       cmph_uint32 size;
+};
+
+typedef struct _chd_ph_sorted_list_t chd_ph_sorted_list_t;
+
+
+static inline chd_ph_bucket_t * chd_ph_bucket_new(cmph_uint32 nbuckets);
+static inline void chd_ph_bucket_clean(chd_ph_bucket_t * buckets, cmph_uint32 nbuckets);
+static inline void chd_ph_bucket_destroy(chd_ph_bucket_t * buckets);
+
+chd_ph_bucket_t * chd_ph_bucket_new(cmph_uint32 nbuckets)
+{
+    chd_ph_bucket_t * buckets = (chd_ph_bucket_t *) calloc(nbuckets, sizeof(chd_ph_bucket_t));
+    return buckets;
+}
+
+void chd_ph_bucket_clean(chd_ph_bucket_t * buckets, cmph_uint32 nbuckets)
+{
+       register cmph_uint32 i = 0;
+       assert(buckets);
+       for(i = 0; i < nbuckets; i++)
+               buckets[i].size = 0;
+}
+static cmph_uint8 chd_ph_bucket_insert(chd_ph_bucket_t * buckets,chd_ph_map_item_t * map_items, chd_ph_item_t * items,
+                               cmph_uint32 nbuckets,cmph_uint32 item_idx)
+{
+       register cmph_uint32 i = 0;
+       register chd_ph_item_t * tmp_item;
+       register chd_ph_map_item_t * tmp_map_item = map_items + item_idx;
+       register chd_ph_bucket_t * bucket = buckets + tmp_map_item->bucket_num;
+       tmp_item = items + bucket->items_list;
+       
+       for(i = 0; i < bucket->size; i++)
+       {
+               if(tmp_item->f == tmp_map_item->f && tmp_item->h == tmp_map_item->h)
+               {
+                       DEBUGP("Item not added\n");
+                       return 0;
+               };
+               tmp_item++;
+       };
+       tmp_item->f = tmp_map_item->f;
+       tmp_item->h = tmp_map_item->h;
+       bucket->size++;
+       return 1;
+};
+void chd_ph_bucket_destroy(chd_ph_bucket_t * buckets)
+{
+    free(buckets);
+}
+
+static inline cmph_uint8 chd_ph_mapping(cmph_config_t *mph, chd_ph_bucket_t * buckets, chd_ph_item_t * items, 
+                                       cmph_uint32 *max_bucket_size);
+
+static chd_ph_sorted_list_t * chd_ph_ordering(chd_ph_bucket_t ** _buckets,chd_ph_item_t ** items,
+                               cmph_uint32 nbuckets,cmph_uint32 nitems, cmph_uint32 max_bucket_size);
+
+static cmph_uint8 chd_ph_searching(chd_ph_config_data_t *chd_ph, chd_ph_bucket_t *buckets, chd_ph_item_t *items ,
+       cmph_uint32 max_bucket_size, chd_ph_sorted_list_t *sorted_lists, cmph_uint32 max_probes, cmph_uint32 * disp_table);
+
+static inline double chd_ph_space_lower_bound(cmph_uint32 _n, cmph_uint32 _r)
+{
+       double r = _r, n = _n;
+       return (1 + (r/n - 1.0 + 1.0/(2.0*n))*log(1 - n/r))/log(2);
+};
+
+/* computes the entropy of non empty buckets.*/
+static inline double chd_ph_get_entropy(cmph_uint32 * disp_table, cmph_uint32 n, cmph_uint32 max_probes)
+{
+       register cmph_uint32 * probe_counts = (cmph_uint32 *) calloc(max_probes, sizeof(cmph_uint32));
+       register cmph_uint32 i;
+       register double entropy = 0;
+
+       for(i = 0; i < n; i++)
+       {
+               probe_counts[disp_table[i]]++;
+       };
+       
+       for(i = 0; i < max_probes; i++)
+       {
+               if(probe_counts[i] > 0)
+                       entropy -= probe_counts[i]*log((double)probe_counts[i]/(double)n)/log(2);
+       };
+       free(probe_counts);
+       return entropy;
+};
+
+chd_ph_config_data_t *chd_ph_config_new(void)
+{
+       chd_ph_config_data_t *chd_ph;
+       chd_ph = (chd_ph_config_data_t *)malloc(sizeof(chd_ph_config_data_t));
+       assert(chd_ph);
+       memset(chd_ph, 0, sizeof(chd_ph_config_data_t));
+       
+       chd_ph->hashfunc = CMPH_HASH_JENKINS;
+       chd_ph->cs = NULL;
+       chd_ph->nbuckets = 0;
+       chd_ph->n = 0;
+       chd_ph->hl = NULL;
+
+       chd_ph->m = 0;
+       chd_ph->use_h = 1;
+       chd_ph->keys_per_bin = 1;
+       chd_ph->keys_per_bucket = 4;
+       chd_ph->occup_table = 0;
+       
+       return chd_ph;
+}
+
+void chd_ph_config_destroy(cmph_config_t *mph)
+{
+       chd_ph_config_data_t *data = (chd_ph_config_data_t *) mph->data;
+       DEBUGP("Destroying algorithm dependent data\n");
+       if(data->occup_table)
+       {
+               free(data->occup_table);
+               data->occup_table = NULL;
+       }
+       free(data);
+}
+
+
+void chd_ph_config_set_hashfuncs(cmph_config_t *mph, CMPH_HASH *hashfuncs)
+{
+       chd_ph_config_data_t *chd_ph = (chd_ph_config_data_t *)mph->data;
+       CMPH_HASH *hashptr = hashfuncs;
+       cmph_uint32 i = 0;
+       while(*hashptr != CMPH_HASH_COUNT)
+       {
+               if (i >= 1) break; //chd_ph only uses one linear hash function
+               chd_ph->hashfunc = *hashptr;    
+               ++i, ++hashptr;
+       }
+}
+
+
+void chd_ph_config_set_b(cmph_config_t *mph, cmph_uint32 keys_per_bucket)
+{
+       assert(mph);
+       chd_ph_config_data_t *chd_ph = (chd_ph_config_data_t *)mph->data;
+       if(keys_per_bucket < 1 || keys_per_bucket >= 15)
+       {
+           keys_per_bucket = 4;
+       }
+       chd_ph->keys_per_bucket = keys_per_bucket;
+}
+
+
+void chd_ph_config_set_keys_per_bin(cmph_config_t *mph, cmph_uint32 keys_per_bin)
+{
+       assert(mph);
+       chd_ph_config_data_t *chd_ph = (chd_ph_config_data_t *)mph->data;
+       if(keys_per_bin <= 1 || keys_per_bin >= 128)
+       {
+           keys_per_bin = 1;
+       }
+       chd_ph->keys_per_bin = keys_per_bin;
+}
+
+cmph_uint8 chd_ph_mapping(cmph_config_t *mph, chd_ph_bucket_t * buckets, chd_ph_item_t * items, cmph_uint32 *max_bucket_size)
+{
+       register cmph_uint32 i = 0, g = 0;
+       cmph_uint32 hl[3];
+       chd_ph_config_data_t *chd_ph = (chd_ph_config_data_t *)mph->data;
+       char * key = NULL;
+       cmph_uint32 keylen = 0;
+       chd_ph_map_item_t * map_item;
+       chd_ph_map_item_t * map_items = malloc(chd_ph->m*sizeof(chd_ph_map_item_t));
+       register cmph_uint32 mapping_iterations = 1000;
+       *max_bucket_size = 0;
+       while(1)
+       {
+               mapping_iterations--;
+               if (chd_ph->hl) hash_state_destroy(chd_ph->hl);
+               chd_ph->hl = hash_state_new(chd_ph->hashfunc, chd_ph->m); 
+
+               chd_ph_bucket_clean(buckets, chd_ph->nbuckets);
+
+               mph->key_source->rewind(mph->key_source->data);  
+
+               for(i = 0; i < chd_ph->m; i++)
+               {
+                       mph->key_source->read(mph->key_source->data, &key, &keylen);            
+                       hash_vector(chd_ph->hl, key, keylen, hl);
+                       
+                       map_item = (map_items + i);
+
+                       g = hl[0] % chd_ph->nbuckets;
+                       map_item->f = hl[1] % chd_ph->n;
+                       map_item->h = hl[2] % (chd_ph->n - 1) + 1;
+                       map_item->bucket_num=g;
+                       mph->key_source->dispose(mph->key_source->data, key, keylen);           
+//                     if(buckets[g].size == (chd_ph->keys_per_bucket << 2))
+//                     {
+//                             DEBUGP("BUCKET = %u -- SIZE = %u -- MAXIMUM SIZE = %u\n", g, buckets[g].size, (chd_ph->keys_per_bucket << 2));
+//                             goto error;
+//                     }
+                       buckets[g].size++;
+                       if(buckets[g].size > *max_bucket_size)
+                       {
+                                 *max_bucket_size = buckets[g].size;
+                       }
+               }
+               buckets[0].items_list = 0;
+               for(i = 1; i < chd_ph->nbuckets; i++)
+               {
+                       buckets[i].items_list = buckets[i-1].items_list + buckets[i - 1].size;
+                       buckets[i - 1].size = 0;
+               };
+               buckets[i - 1].size = 0;
+               for(i = 0; i < chd_ph->m; i++)
+               {
+                       map_item = (map_items + i);
+                       if(!chd_ph_bucket_insert(buckets, map_items, items, chd_ph->nbuckets, i))
+                               break;
+               }
+               if(i == chd_ph->m)
+               {
+                       free(map_items);
+                       return 1; // SUCCESS
+               }
+               
+               if(mapping_iterations == 0)
+               {
+                     goto error;
+               }
+       }
+error:
+       free(map_items);
+       hash_state_destroy(chd_ph->hl);
+       chd_ph->hl = NULL;
+       return 0; // FAILURE
+}
+
+chd_ph_sorted_list_t * chd_ph_ordering(chd_ph_bucket_t ** _buckets, chd_ph_item_t ** _items,
+       cmph_uint32 nbuckets, cmph_uint32 nitems, cmph_uint32 max_bucket_size)
+{
+       chd_ph_sorted_list_t * sorted_lists = (chd_ph_sorted_list_t *) calloc(max_bucket_size + 1, sizeof(chd_ph_sorted_list_t));
+       
+       chd_ph_bucket_t * input_buckets = (*_buckets);
+       chd_ph_bucket_t * output_buckets;
+       chd_ph_item_t * input_items = (*_items);
+       chd_ph_item_t * output_items;
+       register cmph_uint32 i, j, bucket_size, position, position2;
+//     cmph_uint32 non_empty_buckets;
+       DEBUGP("MAX BUCKET SIZE = %u\n", max_bucket_size);
+       // Determine size of each list of buckets
+       for(i = 0; i < nbuckets; i++)
+       {
+               bucket_size = input_buckets[i].size;
+               if(bucket_size == 0)
+                       continue;
+               sorted_lists[bucket_size].size++;
+       };
+       sorted_lists[1].buckets_list = 0;
+       // Determine final position of list of buckets into the contiguous array that will store all the buckets
+       for(i = 2; i <= max_bucket_size; i++)
+       {
+               sorted_lists[i].buckets_list = sorted_lists[i-1].buckets_list + sorted_lists[i-1].size;
+               sorted_lists[i-1].size = 0;
+       };
+       sorted_lists[i-1].size = 0;
+       // Store the buckets in a new array which is sorted by bucket sizes
+       output_buckets = calloc(nbuckets, sizeof(chd_ph_bucket_t)); // everything is initialized with zero
+//     non_empty_buckets = nbuckets;
+       
+       for(i = 0; i < nbuckets; i++)
+       {
+               bucket_size = input_buckets[i].size;
+               if(bucket_size == 0)
+               {
+//                     non_empty_buckets--;
+                       continue;
+               };
+               position = sorted_lists[bucket_size].buckets_list + sorted_lists[bucket_size].size;
+               output_buckets[position].bucket_id = i;
+               output_buckets[position].items_list = input_buckets[i].items_list;
+               sorted_lists[bucket_size].size++;
+       };
+/*     for(i = non_empty_buckets; i < nbuckets; i++)
+               output_buckets[i].size=0;*/
+       // Return the buckets sorted in new order and free the old buckets sorted in old order
+       free(input_buckets);
+       (*_buckets) = output_buckets;
+       
+       
+       // Store the items according to the new order of buckets.
+       output_items = (chd_ph_item_t*)calloc(nitems, sizeof(chd_ph_item_t));
+       position = 0;
+       i = 0;
+       for(bucket_size = 1; bucket_size <= max_bucket_size; bucket_size++)
+       {
+               for(i = sorted_lists[bucket_size].buckets_list; i < sorted_lists[bucket_size].size + sorted_lists[bucket_size].buckets_list; i++)
+               {
+                       position2 = output_buckets[i].items_list;
+                       output_buckets[i].items_list = position;
+                       for(j = 0; j < bucket_size; j++)
+                       {
+                               output_items[position].f = input_items[position2].f;
+                               output_items[position].h = input_items[position2].h;
+                               position++;
+                               position2++;
+                       };
+               };
+       };
+       //Return the items sorted in new order and free the old items sorted in old order
+       free(input_items);
+       (*_items) = output_items;
+       return sorted_lists;
+};
+
+static inline cmph_uint8 place_bucket_probe(chd_ph_config_data_t *chd_ph, chd_ph_bucket_t *buckets,
+                                           chd_ph_item_t *items, cmph_uint32 probe0_num, cmph_uint32 probe1_num,
+                                           cmph_uint32 bucket_num, cmph_uint32 size)
+{
+       register cmph_uint32 i;
+       register chd_ph_item_t * item;
+       register cmph_uint32 position;
+
+       item = items + buckets[bucket_num].items_list;
+       // try place bucket with probe_num
+       if(chd_ph->keys_per_bin > 1)
+       {
+               for(i = 0; i < size; i++) // placement
+               {
+                       position = (cmph_uint32)((item->f + ((cmph_uint64)item->h)*probe0_num + probe1_num) % chd_ph->n);
+                       if(chd_ph->occup_table[position] >= chd_ph->keys_per_bin)
+                       {
+                               break;
+                       }
+                       (chd_ph->occup_table[position])++;
+                       item++;
+               };
+       } else
+       {
+               for(i = 0; i < size; i++) // placement
+               {
+                       position = (cmph_uint32)((item->f + ((cmph_uint64)item->h)*probe0_num + probe1_num) % chd_ph->n);
+                       if(GETBIT32(((cmph_uint32 *)chd_ph->occup_table), position))
+                       {
+                               break;
+                       }
+                       SETBIT32(((cmph_uint32*)chd_ph->occup_table), position);
+                       item++;
+               };
+       };
+       if(i != size) // Undo the placement
+       {
+               item = items + buckets[bucket_num].items_list;
+               if(chd_ph->keys_per_bin > 1)
+               {
+                       while(1)
+                       {
+                               if(i == 0)
+                               {
+                                       break;
+                               }
+                               position = (cmph_uint32)((item->f + ((cmph_uint64 )item->h) * probe0_num + probe1_num) % chd_ph->n);
+                               (chd_ph->occup_table[position])--;
+                               item++;
+                               i--;
+                       };
+               } else
+               {
+                       while(1)
+                       {
+                               if(i == 0)
+                               {
+                                       break;
+                               }
+                               position = (cmph_uint32)((item->f + ((cmph_uint64 )item->h) * probe0_num + probe1_num) % chd_ph->n);
+                               UNSETBIT32(((cmph_uint32*)chd_ph->occup_table), position);
+                               
+//                             ([position/32]^=(1<<(position%32));
+                               item++;
+                               i--;
+                       };
+               };
+               return 0;
+       }       
+       return 1;
+};
+
+static inline cmph_uint8 place_bucket(chd_ph_config_data_t *chd_ph, chd_ph_bucket_t *buckets, chd_ph_item_t * items, cmph_uint32 max_probes, 
+                                      cmph_uint32 * disp_table, cmph_uint32 bucket_num, cmph_uint32 size)
+                                     
+{
+       register cmph_uint32 probe0_num, probe1_num, probe_num;
+       probe0_num = 0;
+       probe1_num = 0;
+       probe_num = 0;
+       
+       while(1)
+       {
+               if(place_bucket_probe(chd_ph, buckets, items, probe0_num, probe1_num, bucket_num,size))
+               {
+                       disp_table[buckets[bucket_num].bucket_id] = probe0_num + probe1_num * chd_ph->n;
+                       return 1;
+               }
+               probe0_num++;
+               if(probe0_num >= chd_ph->n)
+               {
+                       probe0_num -= chd_ph->n;
+                       probe1_num++;
+               };
+               probe_num++;
+               if(probe_num >= max_probes || probe1_num >= chd_ph->n)
+               {
+                       return 0;
+               };
+       };
+       return 0;
+};
+
+static inline cmph_uint8 place_buckets1(chd_ph_config_data_t *chd_ph, chd_ph_bucket_t * buckets, chd_ph_item_t *items,
+                                       cmph_uint32 max_bucket_size, chd_ph_sorted_list_t *sorted_lists, cmph_uint32 max_probes, 
+                                       cmph_uint32 * disp_table)
+{
+       register cmph_uint32 i = 0;
+       register cmph_uint32 curr_bucket = 0;
+
+       for(i = max_bucket_size; i > 0; i--)
+       {
+               curr_bucket = sorted_lists[i].buckets_list;
+               while(curr_bucket < sorted_lists[i].size + sorted_lists[i].buckets_list)
+               {
+                       if(!place_bucket(chd_ph, buckets, items, max_probes, disp_table, curr_bucket, i))
+                       {
+                               return 0;
+                       }
+                       curr_bucket++;
+               };
+       };
+       return 1;
+};
+
+static inline cmph_uint8 place_buckets2(chd_ph_config_data_t *chd_ph, chd_ph_bucket_t *buckets, chd_ph_item_t * items, 
+                                       cmph_uint32 max_bucket_size, chd_ph_sorted_list_t *sorted_lists, cmph_uint32 max_probes, 
+                                       cmph_uint32 * disp_table)
+{
+       register cmph_uint32 i,j, non_placed_bucket;
+       register cmph_uint32 curr_bucket;
+       register cmph_uint32 probe_num, probe0_num, probe1_num;
+       cmph_uint32 sorted_list_size;
+#ifdef DEBUG
+       cmph_uint32 items_list;
+       cmph_uint32 bucket_id;
+#endif
+       DEBUGP("USING HEURISTIC TO PLACE BUCKETS\n");
+       for(i = max_bucket_size; i > 0; i--)
+       {
+               probe_num = 0;
+               probe0_num = 0;
+               probe1_num = 0;
+               sorted_list_size = sorted_lists[i].size;
+               while(sorted_lists[i].size != 0)
+               {
+                       curr_bucket = sorted_lists[i].buckets_list;
+                       for(j = 0, non_placed_bucket = 0; j < sorted_lists[i].size; j++)
+                       {
+                               // if bucket is successfully placed remove it from list
+                               if(place_bucket_probe(chd_ph, buckets, items, probe0_num, probe1_num, curr_bucket, i))
+                               {       
+                                       disp_table[buckets[curr_bucket].bucket_id] = probe0_num + probe1_num * chd_ph->n;
+//                                     DEBUGP("BUCKET %u PLACED --- DISPLACEMENT = %u\n", curr_bucket, disp_table[curr_bucket]);
+                               } 
+                               else
+                               {
+//                                     DEBUGP("BUCKET %u NOT PLACED\n", curr_bucket);
+#ifdef DEBUG
+                                       items_list = buckets[non_placed_bucket + sorted_lists[i].buckets_list].items_list;
+                                       bucket_id = buckets[non_placed_bucket + sorted_lists[i].buckets_list].bucket_id;
+#endif
+                                       buckets[non_placed_bucket + sorted_lists[i].buckets_list].items_list = buckets[curr_bucket].items_list;
+                                       buckets[non_placed_bucket + sorted_lists[i].buckets_list].bucket_id = buckets[curr_bucket].bucket_id;
+#ifdef DEBUG           
+                                       buckets[curr_bucket].items_list=items_list;
+                                       buckets[curr_bucket].bucket_id=bucket_id;
+#endif
+                                       non_placed_bucket++;
+                               }
+                               curr_bucket++;
+                       };
+                       sorted_lists[i].size = non_placed_bucket;
+                       probe0_num++;
+                       if(probe0_num >= chd_ph->n)
+                       {
+                               probe0_num -= chd_ph->n;
+                               probe1_num++;
+                       };
+                       probe_num++;
+                       if(probe_num >= max_probes || probe1_num >= chd_ph->n)
+                       {
+                               sorted_lists[i].size = sorted_list_size;
+                               return 0;
+                       };
+               };
+               sorted_lists[i].size = sorted_list_size;
+       };
+       return 1;
+};
+
+cmph_uint8 chd_ph_searching(chd_ph_config_data_t *chd_ph, chd_ph_bucket_t *buckets, chd_ph_item_t *items ,
+                           cmph_uint32 max_bucket_size, chd_ph_sorted_list_t *sorted_lists, cmph_uint32 max_probes, 
+                           cmph_uint32 * disp_table)
+{
+       if(chd_ph->use_h)
+       {
+               return place_buckets2(chd_ph, buckets, items, max_bucket_size, sorted_lists, max_probes, disp_table);
+       }
+       else
+       {
+               return place_buckets1(chd_ph, buckets, items, max_bucket_size, sorted_lists, max_probes, disp_table);
+       }
+
+}
+
+static inline cmph_uint8 chd_ph_check_bin_hashing(chd_ph_config_data_t *chd_ph, chd_ph_bucket_t *buckets, chd_ph_item_t *items,
+                                                  cmph_uint32 * disp_table, chd_ph_sorted_list_t * sorted_lists,cmph_uint32 max_bucket_size)
+{
+       register cmph_uint32 bucket_size, i, j;
+       register cmph_uint32 position, probe0_num, probe1_num;
+       register cmph_uint32 m = 0;
+       register chd_ph_item_t * item;
+       if(chd_ph->keys_per_bin > 1)
+               memset(chd_ph->occup_table, 0, chd_ph->n);
+       else
+               memset(chd_ph->occup_table, 0, ((chd_ph->n + 31)/32) * sizeof(cmph_uint32));
+               
+       for(bucket_size = 1; bucket_size <= max_bucket_size; bucket_size++)
+               for(i = sorted_lists[bucket_size].buckets_list; i < sorted_lists[bucket_size].size +
+                               sorted_lists[bucket_size].buckets_list; i++)
+               {
+                       j = bucket_size;
+                       item = items + buckets[i].items_list;
+                       probe0_num = disp_table[buckets[i].bucket_id] % chd_ph->n;
+                       probe1_num = disp_table[buckets[i].bucket_id] / chd_ph->n;
+                       for(; j > 0; j--)
+                       {
+                               m++;
+                               position = (cmph_uint32)((item->f + ((cmph_uint64 )item->h) * probe0_num + probe1_num) % chd_ph->n);
+                               if(chd_ph->keys_per_bin > 1)
+                               {
+                                       if(chd_ph->occup_table[position] >= chd_ph->keys_per_bin)
+                                       {
+                                               return 0;
+                                       }
+                                       (chd_ph->occup_table[position])++;
+                               } 
+                               else
+                               {
+                                       if(GETBIT32(((cmph_uint32*)chd_ph->occup_table), position))
+                                       {
+                                               return 0;
+                                       }
+                                       SETBIT32(((cmph_uint32*)chd_ph->occup_table), position);
+                               };
+                               item++;
+                       };
+               };
+       DEBUGP("We were able to place m = %u keys\n", m);
+       return 1;
+};
+
+
+cmph_t *chd_ph_new(cmph_config_t *mph, double c)
+{
+       cmph_t *mphf = NULL;
+       chd_ph_data_t *chd_phf = NULL;
+       chd_ph_config_data_t *chd_ph = (chd_ph_config_data_t *)mph->data;
+       
+       register double load_factor = c;
+       register cmph_uint8 searching_success = 0;
+       register cmph_uint32 max_probes = 1 << 20; // default value for max_probes
+       register cmph_uint32 iterations = 100;
+       chd_ph_bucket_t * buckets = NULL;
+       chd_ph_item_t * items = NULL;
+       register cmph_uint8 failure = 0;
+       cmph_uint32 max_bucket_size = 0;
+       chd_ph_sorted_list_t * sorted_lists = NULL;
+       cmph_uint32 * disp_table = NULL;
+       register double space_lower_bound = 0;
+       #ifdef CMPH_TIMING
+       double construction_time_begin = 0.0;
+       double construction_time = 0.0;
+       ELAPSED_TIME_IN_SECONDS(&construction_time_begin);
+       #endif
+
+
+       chd_ph->m = mph->key_source->nkeys;
+       DEBUGP("m = %u\n", chd_ph->m);
+       
+       chd_ph->nbuckets = (cmph_uint32)(chd_ph->m/chd_ph->keys_per_bucket) + 1;
+       DEBUGP("nbuckets = %u\n", chd_ph->nbuckets);
+       
+       if(load_factor < 0.5 )
+       {
+               load_factor = 0.5;
+       }
+       
+       if(load_factor >= 0.99)
+       {
+               load_factor = 0.99;
+       }
+       
+       DEBUGP("load_factor = %.3f\n", load_factor);
+       
+       chd_ph->n = (cmph_uint32)(chd_ph->m/(chd_ph->keys_per_bin * load_factor)) + 1;
+       
+       //Round the number of bins to the prime immediately above
+       if(chd_ph->n % 2 == 0) chd_ph->n++;
+       for(;;)
+       {
+               if(check_primality(chd_ph->n) == 1)
+                       break;
+               chd_ph->n += 2; // just odd numbers can be primes for n > 2
+               
+       };
+       
+       DEBUGP("n = %u \n", chd_ph->n);
+       if(chd_ph->keys_per_bin == 1)
+       {
+               space_lower_bound = chd_ph_space_lower_bound(chd_ph->m, chd_ph->n);
+       }
+       
+       if(mph->verbosity)
+       {
+               fprintf(stderr, "space lower bound is %.3f bits per key\n", space_lower_bound);
+       }
+
+               // We allocate the working tables
+       buckets = chd_ph_bucket_new(chd_ph->nbuckets); 
+       items   = (chd_ph_item_t *) calloc(chd_ph->m, sizeof(chd_ph_item_t));
+
+       max_probes = (cmph_uint32)(((log(chd_ph->m)/log(2))/20) * max_probes);
+       
+       if(chd_ph->keys_per_bin == 1)
+               chd_ph->occup_table = (cmph_uint8 *) calloc(((chd_ph->n + 31)/32), sizeof(cmph_uint32));
+       else
+               chd_ph->occup_table = (cmph_uint8 *) calloc(chd_ph->n, sizeof(cmph_uint8));
+               
+       disp_table = (cmph_uint32 *) calloc(chd_ph->nbuckets, sizeof(cmph_uint32));
+//     
+//     init_genrand(time(0));
+       
+       while(1)
+       {
+               iterations --;
+               if (mph->verbosity)
+               {
+                       fprintf(stderr, "Starting mapping step for mph creation of %u keys with %u bins\n", chd_ph->m, chd_ph->n);
+               }
+               
+               if(!chd_ph_mapping(mph, buckets, items, &max_bucket_size))
+               {
+                       if (mph->verbosity)
+                       {
+                               fprintf(stderr, "Failure in mapping step\n");           
+                       }
+                       failure = 1;
+                       goto cleanup;
+               }
+
+               if (mph->verbosity)
+               {
+                       fprintf(stderr, "Starting ordering step\n");
+               }
+               if(sorted_lists)
+               {
+                       free(sorted_lists);
+               }
+
+               sorted_lists = chd_ph_ordering(&buckets, &items, chd_ph->nbuckets, chd_ph->m, max_bucket_size);
+               
+               if (mph->verbosity)
+               {
+                       fprintf(stderr, "Starting searching step\n");
+               }
+               
+               searching_success = chd_ph_searching(chd_ph, buckets, items, max_bucket_size, sorted_lists, max_probes, disp_table);
+               if(searching_success) break;
+               
+               // reset occup_table
+               if(chd_ph->keys_per_bin > 1)
+                       memset(chd_ph->occup_table, 0, chd_ph->n);
+               else
+                       memset(chd_ph->occup_table, 0, ((chd_ph->n + 31)/32) * sizeof(cmph_uint32));
+               if(iterations == 0)
+               {
+                       // Cleanup memory
+                       if (mph->verbosity)
+                       {
+                               fprintf(stderr, "Failure because the max trials was exceeded\n");
+                       }
+                       failure = 1;
+                       goto cleanup;
+               };
+       }
+
+       #ifdef DEBUG
+       {
+               if(!chd_ph_check_bin_hashing(chd_ph, buckets, items, disp_table,sorted_lists,max_bucket_size))
+               {
+               
+                       DEBUGP("Error for bin packing generation");
+                       failure = 1;
+                       goto cleanup;
+               }
+       }
+       #endif
+       
+       if (mph->verbosity)
+       {
+               fprintf(stderr, "Starting compressing step\n");
+       }
+       
+       if(chd_ph->cs)
+       {
+               free(chd_ph->cs);
+       }
+       chd_ph->cs = (compressed_seq_t *) calloc(1, sizeof(compressed_seq_t));
+       compressed_seq_init(chd_ph->cs);
+       compressed_seq_generate(chd_ph->cs, disp_table, chd_ph->nbuckets);
+       
+       #ifdef CMPH_TIMING
+       ELAPSED_TIME_IN_SECONDS(&construction_time);
+       register double entropy = chd_ph_get_entropy(disp_table, chd_ph->nbuckets, max_probes);
+       DEBUGP("Entropy = %.4f\n", entropy/chd_ph->m);
+       #endif
+
+cleanup:
+       chd_ph_bucket_destroy(buckets); 
+       free(items);
+       free(sorted_lists);
+       free(disp_table);
+       if(failure) 
+       {
+               if(chd_ph->hl)
+               {
+                       hash_state_destroy(chd_ph->hl);
+               }
+               chd_ph->hl = NULL;
+               return NULL;
+       }
+
+       mphf = (cmph_t *)malloc(sizeof(cmph_t));
+       mphf->algo = mph->algo;
+       chd_phf = (chd_ph_data_t *)malloc(sizeof(chd_ph_data_t));
+       
+       chd_phf->cs = chd_ph->cs;
+       chd_ph->cs = NULL; //transfer memory ownership
+       chd_phf->hl = chd_ph->hl;
+       chd_ph->hl = NULL; //transfer memory ownership
+       chd_phf->n = chd_ph->n;
+       chd_phf->nbuckets = chd_ph->nbuckets;
+       
+       mphf->data = chd_phf;
+       mphf->size = chd_ph->n;
+
+       DEBUGP("Successfully generated minimal perfect hash\n");
+       if (mph->verbosity)
+       {
+               fprintf(stderr, "Successfully generated minimal perfect hash function\n");
+       }
+       
+       #ifdef CMPH_TIMING      
+       register cmph_uint32 space_usage = chd_ph_packed_size(mphf)*8;
+       construction_time = construction_time - construction_time_begin;
+       fprintf(stdout, "%u\t%.2f\t%u\t%.4f\t%.4f\t%.4f\t%.4f\n", chd_ph->m, load_factor, chd_ph->keys_per_bucket, construction_time, space_usage/(double)chd_ph->m, space_lower_bound, entropy/chd_ph->m);
+       #endif  
+
+       return mphf;
+}
+
+
+
+void chd_ph_load(FILE *fd, cmph_t *mphf)
+{
+       char *buf = NULL;
+       cmph_uint32 buflen;
+       register size_t nbytes;
+       chd_ph_data_t *chd_ph = (chd_ph_data_t *)malloc(sizeof(chd_ph_data_t));
+
+       DEBUGP("Loading chd_ph mphf\n");
+       mphf->data = chd_ph;
+
+       nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, fd);
+       DEBUGP("Hash state has %u bytes\n", buflen);
+       buf = (char *)malloc((size_t)buflen);
+       nbytes = fread(buf, (size_t)buflen, (size_t)1, fd);
+       chd_ph->hl = hash_state_load(buf, buflen);
+       free(buf);
+       
+       nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, fd);
+       DEBUGP("Compressed sequence structure has %u bytes\n", buflen);
+       buf = (char *)malloc((size_t)buflen);
+       nbytes = fread(buf, (size_t)buflen, (size_t)1, fd);
+       chd_ph->cs = (compressed_seq_t *) calloc(1, sizeof(compressed_seq_t)); 
+       compressed_seq_load(chd_ph->cs, buf, buflen);
+       free(buf);
+       
+       // loading n and nbuckets
+       DEBUGP("Reading n and nbuckets\n");
+       nbytes = fread(&(chd_ph->n), sizeof(cmph_uint32), (size_t)1, fd);       
+       nbytes = fread(&(chd_ph->nbuckets), sizeof(cmph_uint32), (size_t)1, fd);        
+}
+
+int chd_ph_dump(cmph_t *mphf, FILE *fd)
+{
+       char *buf = NULL;
+       cmph_uint32 buflen;
+       register size_t nbytes;
+       chd_ph_data_t *data = (chd_ph_data_t *)mphf->data;
+       
+       __cmph_dump(mphf, fd);
+
+       hash_state_dump(data->hl, &buf, &buflen);
+       DEBUGP("Dumping hash state with %u bytes to disk\n", buflen);
+       nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd);
+       nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd);
+       free(buf);
+
+       compressed_seq_dump(data->cs, &buf, &buflen);
+       DEBUGP("Dumping compressed sequence structure with %u bytes to disk\n", buflen);
+       nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd);
+       nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd);
+       free(buf);
+
+       // dumping n and nbuckets
+       nbytes = fwrite(&(data->n), sizeof(cmph_uint32), (size_t)1, fd);
+       nbytes = fwrite(&(data->nbuckets), sizeof(cmph_uint32), (size_t)1, fd);
+       return 1;
+}
+
+void chd_ph_destroy(cmph_t *mphf)
+{
+       chd_ph_data_t *data = (chd_ph_data_t *)mphf->data;
+       compressed_seq_destroy(data->cs);
+       free(data->cs);
+       hash_state_destroy(data->hl);
+       free(data);
+       free(mphf);
+
+}
+
+cmph_uint32 chd_ph_search(cmph_t *mphf, const char *key, cmph_uint32 keylen)
+{
+       register chd_ph_data_t * chd_ph = mphf->data;
+       cmph_uint32 hl[3];
+       register cmph_uint32 disp,position;
+       register cmph_uint32 probe0_num,probe1_num;
+       register cmph_uint32 f,g,h;
+       hash_vector(chd_ph->hl, key, keylen, hl);       
+       g = hl[0] % chd_ph->nbuckets;
+       f = hl[1] % chd_ph->n;
+       h = hl[2] % (chd_ph->n-1) + 1;
+       
+       disp = compressed_seq_query(chd_ph->cs, g);
+       probe0_num = disp % chd_ph->n;
+       probe1_num = disp/chd_ph->n;
+       position = (cmph_uint32)((f + ((cmph_uint64 )h)*probe0_num + probe1_num) % chd_ph->n);
+       return position;
+}
+
+void chd_ph_pack(cmph_t *mphf, void *packed_mphf)
+{
+       chd_ph_data_t *data = (chd_ph_data_t *)mphf->data;
+       cmph_uint8 * ptr = packed_mphf;
+
+       // packing hl type
+       CMPH_HASH hl_type = hash_get_type(data->hl);
+       *((cmph_uint32 *) ptr) = hl_type;
+       ptr += sizeof(cmph_uint32);
+
+       // packing hl
+       hash_state_pack(data->hl, ptr);
+       ptr += hash_state_packed_size(hl_type);
+
+       // packing n
+       *((cmph_uint32 *) ptr) = data->n;
+       ptr += sizeof(data->n);
+
+       // packing nbuckets
+       *((cmph_uint32 *) ptr) = data->nbuckets;
+       ptr += sizeof(data->nbuckets);
+
+       // packing cs
+       compressed_seq_pack(data->cs, ptr);
+       //ptr += compressed_seq_packed_size(data->cs);
+
+}
+
+cmph_uint32 chd_ph_packed_size(cmph_t *mphf)
+{
+       register chd_ph_data_t *data = (chd_ph_data_t *)mphf->data;
+       register CMPH_HASH hl_type = hash_get_type(data->hl); 
+       register cmph_uint32 hash_state_pack_size =  hash_state_packed_size(hl_type);
+       register cmph_uint32 cs_pack_size = compressed_seq_packed_size(data->cs);
+       
+       return (cmph_uint32)(sizeof(CMPH_ALGO) + hash_state_pack_size + cs_pack_size + 3*sizeof(cmph_uint32));
+
+}
+
+cmph_uint32 chd_ph_search_packed(void *packed_mphf, const char *key, cmph_uint32 keylen)
+{
+       register CMPH_HASH hl_type  = *(cmph_uint32 *)packed_mphf;
+       register cmph_uint8 *hl_ptr = (cmph_uint8 *)(packed_mphf) + 4;
+       
+       register cmph_uint32 * ptr = (cmph_uint32 *)(hl_ptr + hash_state_packed_size(hl_type));
+       register cmph_uint32 n = *ptr++;
+       register cmph_uint32 nbuckets = *ptr++;
+       cmph_uint32 hl[3];
+               
+       register cmph_uint32 disp,position;
+       register cmph_uint32 probe0_num,probe1_num;
+       register cmph_uint32 f,g,h;
+       
+       hash_vector_packed(hl_ptr, hl_type, key, keylen, hl);
+
+       g = hl[0] % nbuckets;
+       f = hl[1] % n;
+       h = hl[2] % (n-1) + 1;
+       
+       disp = compressed_seq_query_packed(ptr, g);
+       probe0_num = disp % n;
+       probe1_num = disp/n;
+       position = (cmph_uint32)((f + ((cmph_uint64 )h)*probe0_num + probe1_num) % n);
+       return position;
+}
+
+
+
diff --git a/girepository/cmph/chd_ph.h b/girepository/cmph/chd_ph.h
new file mode 100644 (file)
index 0000000..03e4087
--- /dev/null
@@ -0,0 +1,59 @@
+#ifndef _CMPH_CHD_PH_H__
+#define _CMPH_CHD_PH_H__
+
+#include "cmph.h"
+
+typedef struct __chd_ph_data_t chd_ph_data_t;
+typedef struct __chd_ph_config_data_t chd_ph_config_data_t;
+
+/* Config API */
+chd_ph_config_data_t *chd_ph_config_new(void);
+void chd_ph_config_set_hashfuncs(cmph_config_t *mph, CMPH_HASH *hashfuncs);
+
+/** \fn void chd_ph_config_set_keys_per_bin(cmph_config_t *mph, cmph_uint32 keys_per_bin);
+ *  \brief Allows to set the number of keys per bin.
+ *  \param mph pointer to the configuration structure
+ *  \param keys_per_bin value for the number of keys per bin 
+ */
+void chd_ph_config_set_keys_per_bin(cmph_config_t *mph, cmph_uint32 keys_per_bin);
+
+/** \fn void chd_ph_config_set_b(cmph_config_t *mph, cmph_uint32 keys_per_bucket);
+ *  \brief Allows to set the number of keys per bucket.
+ *  \param mph pointer to the configuration structure
+ *  \param keys_per_bucket value for the number of keys per bucket 
+ */
+void chd_ph_config_set_b(cmph_config_t *mph, cmph_uint32 keys_per_bucket);
+void chd_ph_config_destroy(cmph_config_t *mph);
+
+
+/* Chd algorithm API */
+cmph_t *chd_ph_new(cmph_config_t *mph, double c);
+void chd_ph_load(FILE *fd, cmph_t *mphf);
+int chd_ph_dump(cmph_t *mphf, FILE *fd);
+void chd_ph_destroy(cmph_t *mphf);
+cmph_uint32 chd_ph_search(cmph_t *mphf, const char *key, cmph_uint32 keylen);
+
+/** \fn void chd_ph_pack(cmph_t *mphf, void *packed_mphf);
+ *  \brief Support the ability to pack a perfect hash function into a preallocated contiguous memory space pointed by packed_mphf.
+ *  \param mphf pointer to the resulting mphf
+ *  \param packed_mphf pointer to the contiguous memory area used to store the resulting mphf. The size of packed_mphf must be at least cmph_packed_size() 
+ */
+void chd_ph_pack(cmph_t *mphf, void *packed_mphf);
+
+/** \fn cmph_uint32 chd_ph_packed_size(cmph_t *mphf);
+ *  \brief Return the amount of space needed to pack mphf.
+ *  \param mphf pointer to a mphf
+ *  \return the size of the packed function or zero for failures
+ */ 
+cmph_uint32 chd_ph_packed_size(cmph_t *mphf);
+
+/** cmph_uint32 chd_ph_search(void *packed_mphf, const char *key, cmph_uint32 keylen);
+ *  \brief Use the packed mphf to do a search. 
+ *  \param  packed_mphf pointer to the packed mphf
+ *  \param key key to be hashed
+ *  \param keylen key legth in bytes
+ *  \return The mphf value
+ */
+cmph_uint32 chd_ph_search_packed(void *packed_mphf, const char *key, cmph_uint32 keylen);
+
+#endif
diff --git a/girepository/cmph/chd_structs.h b/girepository/cmph/chd_structs.h
new file mode 100644 (file)
index 0000000..d62f682
--- /dev/null
@@ -0,0 +1,21 @@
+#ifndef __CMPH_CHD_STRUCTS_H__
+#define __CMPH_CHD_STRUCTS_H__
+
+#include "chd_structs_ph.h"
+#include "chd_ph.h"
+#include "compressed_rank.h"
+
+struct __chd_data_t
+{
+       cmph_uint32 packed_cr_size;
+       cmph_uint8 * packed_cr; // packed compressed rank structure to control the number of zeros in a bit vector
+       
+       cmph_uint32 packed_chd_phf_size;
+       cmph_uint8 * packed_chd_phf;
+};
+
+struct __chd_config_data_t
+{      
+       cmph_config_t *chd_ph;     // chd_ph algorithm must be used here
+};
+#endif
diff --git a/girepository/cmph/chd_structs_ph.h b/girepository/cmph/chd_structs_ph.h
new file mode 100644 (file)
index 0000000..d869218
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef __CMPH_CHD_PH_STRUCTS_H__
+#define __CMPH_CHD_PH_STRUCTS_H__
+
+#include "hash_state.h"
+#include "compressed_seq.h"
+
+struct __chd_ph_data_t
+{
+       compressed_seq_t * cs;  // compressed displacement values
+       cmph_uint32 nbuckets;   // number of buckets
+       cmph_uint32 n;          // number of bins
+       hash_state_t *hl;       // linear hash function
+};
+
+struct __chd_ph_config_data_t
+{
+       CMPH_HASH hashfunc;     // linear hash function to be used
+       compressed_seq_t * cs;  // compressed displacement values
+       cmph_uint32 nbuckets;   // number of buckets
+       cmph_uint32 n;          // number of bins
+       hash_state_t *hl;       // linear hash function
+       
+       cmph_uint32 m;          // number of keys
+       cmph_uint8 use_h;       // flag to indicate the of use of a heuristic (use_h = 1)
+       cmph_uint32 keys_per_bin;//maximum number of keys per bin 
+       cmph_uint32 keys_per_bucket; // average number of keys per bucket
+       cmph_uint8 *occup_table;     // table that indicates occupied positions 
+};
+#endif
diff --git a/girepository/cmph/chm.c b/girepository/cmph/chm.c
new file mode 100644 (file)
index 0000000..9cdbf41
--- /dev/null
@@ -0,0 +1,381 @@
+#include "graph.h"
+#include "chm.h"
+#include "cmph_structs.h"
+#include "chm_structs.h"
+#include "hash.h"
+#include "bitbool.h"
+
+#include <math.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <assert.h>
+#include <string.h>
+
+//#define DEBUG
+#include "debug.h"
+
+static int chm_gen_edges(cmph_config_t *mph);
+static void chm_traverse(chm_config_data_t *chm, cmph_uint8 *visited, cmph_uint32 v);
+
+chm_config_data_t *chm_config_new(void)
+{
+       chm_config_data_t *chm = NULL;
+       chm = (chm_config_data_t *)malloc(sizeof(chm_config_data_t));
+       assert(chm);
+       memset(chm, 0, sizeof(chm_config_data_t));
+       chm->hashfuncs[0] = CMPH_HASH_JENKINS;
+       chm->hashfuncs[1] = CMPH_HASH_JENKINS;
+       chm->g = NULL;
+       chm->graph = NULL;
+       chm->hashes = NULL;
+       return chm;
+}
+void chm_config_destroy(cmph_config_t *mph)
+{
+       chm_config_data_t *data = (chm_config_data_t *)mph->data;
+       DEBUGP("Destroying algorithm dependent data\n");
+       free(data);
+}
+
+void chm_config_set_hashfuncs(cmph_config_t *mph, CMPH_HASH *hashfuncs)
+{
+       chm_config_data_t *chm = (chm_config_data_t *)mph->data;
+       CMPH_HASH *hashptr = hashfuncs;
+       cmph_uint32 i = 0;
+       while(*hashptr != CMPH_HASH_COUNT)
+       {
+               if (i >= 2) break; //chm only uses two hash functions
+               chm->hashfuncs[i] = *hashptr;   
+               ++i, ++hashptr;
+       }
+}
+
+cmph_t *chm_new(cmph_config_t *mph, double c)
+{
+       cmph_t *mphf = NULL;
+       chm_data_t *chmf = NULL;
+
+       cmph_uint32 i;
+       cmph_uint32 iterations = 20;
+       cmph_uint8 *visited = NULL;
+       chm_config_data_t *chm = (chm_config_data_t *)mph->data;
+       chm->m = mph->key_source->nkeys;
+       if (c == 0) c = 2.09;
+       chm->n = (cmph_uint32)ceil(c * mph->key_source->nkeys); 
+       DEBUGP("m (edges): %u n (vertices): %u c: %f\n", chm->m, chm->n, c);
+       chm->graph = graph_new(chm->n, chm->m);
+       DEBUGP("Created graph\n");
+
+       chm->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*3);
+       for(i = 0; i < 3; ++i) chm->hashes[i] = NULL;
+       //Mapping step
+       if (mph->verbosity)
+       {
+               fprintf(stderr, "Entering mapping step for mph creation of %u keys with graph sized %u\n", chm->m, chm->n);
+       }
+       while(1)
+       {
+               int ok;
+               chm->hashes[0] = hash_state_new(chm->hashfuncs[0], chm->n);
+               chm->hashes[1] = hash_state_new(chm->hashfuncs[1], chm->n);
+               ok = chm_gen_edges(mph);
+               if (!ok)
+               {
+                       --iterations;
+                       hash_state_destroy(chm->hashes[0]);
+                       chm->hashes[0] = NULL;
+                       hash_state_destroy(chm->hashes[1]);
+                       chm->hashes[1] = NULL;
+                       DEBUGP("%u iterations remaining\n", iterations);
+                       if (mph->verbosity)
+                       {
+                               fprintf(stderr, "Acyclic graph creation failure - %u iterations remaining\n", iterations);
+                       }
+                       if (iterations == 0) break;
+               } 
+               else break;     
+       }
+       if (iterations == 0)
+       {
+               graph_destroy(chm->graph);      
+               return NULL;
+       }
+
+       //Assignment step
+       if (mph->verbosity)
+       {
+               fprintf(stderr, "Starting assignment step\n");
+       }
+       DEBUGP("Assignment step\n");
+       visited = (cmph_uint8 *)malloc((size_t)(chm->n/8 + 1));
+       memset(visited, 0, (size_t)(chm->n/8 + 1));
+       free(chm->g);
+       chm->g = (cmph_uint32 *)malloc(chm->n * sizeof(cmph_uint32));
+       assert(chm->g);
+       for (i = 0; i < chm->n; ++i)
+       {
+               if (!GETBIT(visited,i))
+               {
+                       chm->g[i] = 0;
+                       chm_traverse(chm, visited, i);
+               }
+       }
+       graph_destroy(chm->graph);      
+       free(visited);
+       chm->graph = NULL;
+
+       mphf = (cmph_t *)malloc(sizeof(cmph_t));
+       mphf->algo = mph->algo;
+       chmf = (chm_data_t *)malloc(sizeof(chm_data_t));
+       chmf->g = chm->g;
+       chm->g = NULL; //transfer memory ownership
+       chmf->hashes = chm->hashes;
+       chm->hashes = NULL; //transfer memory ownership
+       chmf->n = chm->n;
+       chmf->m = chm->m;
+       mphf->data = chmf;
+       mphf->size = chm->m;
+       DEBUGP("Successfully generated minimal perfect hash\n");
+       if (mph->verbosity)
+       {
+               fprintf(stderr, "Successfully generated minimal perfect hash function\n");
+       }
+       return mphf;
+}
+
+static void chm_traverse(chm_config_data_t *chm, cmph_uint8 *visited, cmph_uint32 v)
+{
+
+       graph_iterator_t it = graph_neighbors_it(chm->graph, v);
+       cmph_uint32 neighbor = 0;
+       SETBIT(visited,v);
+       
+       DEBUGP("Visiting vertex %u\n", v);
+       while((neighbor = graph_next_neighbor(chm->graph, &it)) != GRAPH_NO_NEIGHBOR)
+       {
+               DEBUGP("Visiting neighbor %u\n", neighbor);
+               if(GETBIT(visited,neighbor)) continue;
+               DEBUGP("Visiting neighbor %u\n", neighbor);
+               DEBUGP("Visiting edge %u->%u with id %u\n", v, neighbor, graph_edge_id(chm->graph, v, neighbor));
+               chm->g[neighbor] = graph_edge_id(chm->graph, v, neighbor) - chm->g[v];
+               DEBUGP("g is %u (%u - %u mod %u)\n", chm->g[neighbor], graph_edge_id(chm->graph, v, neighbor), chm->g[v], chm->m);
+               chm_traverse(chm, visited, neighbor);
+       }
+}
+               
+static int chm_gen_edges(cmph_config_t *mph)
+{
+       cmph_uint32 e;
+       chm_config_data_t *chm = (chm_config_data_t *)mph->data;
+       int cycles = 0;
+
+       DEBUGP("Generating edges for %u vertices with hash functions %s and %s\n", chm->n, cmph_hash_names[chm->hashfuncs[0]], cmph_hash_names[chm->hashfuncs[1]]);
+       graph_clear_edges(chm->graph);  
+       mph->key_source->rewind(mph->key_source->data);
+       for (e = 0; e < mph->key_source->nkeys; ++e)
+       {
+               cmph_uint32 h1, h2;
+               cmph_uint32 keylen;
+               char *key;
+               mph->key_source->read(mph->key_source->data, &key, &keylen);
+               h1 = hash(chm->hashes[0], key, keylen) % chm->n;
+               h2 = hash(chm->hashes[1], key, keylen) % chm->n;
+               if (h1 == h2) if (++h2 >= chm->n) h2 = 0;
+               if (h1 == h2) 
+               {
+                       if (mph->verbosity) fprintf(stderr, "Self loop for key %u\n", e);
+                       mph->key_source->dispose(mph->key_source->data, key, keylen);
+                       return 0;
+               }
+               DEBUGP("Adding edge: %u -> %u for key %s\n", h1, h2, key);
+               mph->key_source->dispose(mph->key_source->data, key, keylen);
+               graph_add_edge(chm->graph, h1, h2);
+       }
+       cycles = graph_is_cyclic(chm->graph);
+       if (mph->verbosity && cycles) fprintf(stderr, "Cyclic graph generated\n");
+       DEBUGP("Looking for cycles: %u\n", cycles);
+
+       return ! cycles;
+}
+
+int chm_dump(cmph_t *mphf, FILE *fd)
+{
+       char *buf = NULL;
+       cmph_uint32 buflen;
+       cmph_uint32 two = 2; //number of hash functions
+       chm_data_t *data = (chm_data_t *)mphf->data;
+       register size_t nbytes;
+       
+       __cmph_dump(mphf, fd);
+
+       nbytes = fwrite(&two, sizeof(cmph_uint32), (size_t)1, fd);
+       hash_state_dump(data->hashes[0], &buf, &buflen);
+       DEBUGP("Dumping hash state with %u bytes to disk\n", buflen);
+       nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd);
+       nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd);
+       free(buf);
+
+       hash_state_dump(data->hashes[1], &buf, &buflen);
+       DEBUGP("Dumping hash state with %u bytes to disk\n", buflen);
+       nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd);
+       nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd);
+       free(buf);
+
+       nbytes = fwrite(&(data->n), sizeof(cmph_uint32), (size_t)1, fd);
+       nbytes = fwrite(&(data->m), sizeof(cmph_uint32), (size_t)1, fd);
+       
+       nbytes = fwrite(data->g, sizeof(cmph_uint32)*data->n, (size_t)1, fd);
+/*     #ifdef DEBUG
+       fprintf(stderr, "G: ");
+       for (i = 0; i < data->n; ++i) fprintf(stderr, "%u ", data->g[i]);
+       fprintf(stderr, "\n");
+       #endif*/
+       return 1;
+}
+
+void chm_load(FILE *f, cmph_t *mphf)
+{
+       cmph_uint32 nhashes;
+       char *buf = NULL;
+       cmph_uint32 buflen;
+       cmph_uint32 i;
+       chm_data_t *chm = (chm_data_t *)malloc(sizeof(chm_data_t));
+       register size_t nbytes;
+       DEBUGP("Loading chm mphf\n");
+       mphf->data = chm;
+       nbytes = fread(&nhashes, sizeof(cmph_uint32), (size_t)1, f);
+       chm->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(nhashes + 1));
+       chm->hashes[nhashes] = NULL;
+       DEBUGP("Reading %u hashes\n", nhashes);
+       for (i = 0; i < nhashes; ++i)
+       {
+               hash_state_t *state = NULL;
+               nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f);
+               DEBUGP("Hash state has %u bytes\n", buflen);
+               buf = (char *)malloc((size_t)buflen);
+               nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
+               state = hash_state_load(buf, buflen);
+               chm->hashes[i] = state;
+               free(buf);
+       }
+
+       DEBUGP("Reading m and n\n");
+       nbytes = fread(&(chm->n), sizeof(cmph_uint32), (size_t)1, f);   
+       nbytes = fread(&(chm->m), sizeof(cmph_uint32), (size_t)1, f);   
+
+       chm->g = (cmph_uint32 *)malloc(sizeof(cmph_uint32)*chm->n);
+       nbytes = fread(chm->g, chm->n*sizeof(cmph_uint32), (size_t)1, f);
+       #ifdef DEBUG
+       fprintf(stderr, "G: ");
+       for (i = 0; i < chm->n; ++i) fprintf(stderr, "%u ", chm->g[i]);
+       fprintf(stderr, "\n");
+       #endif
+       return;
+}
+               
+
+cmph_uint32 chm_search(cmph_t *mphf, const char *key, cmph_uint32 keylen)
+{
+       chm_data_t *chm = mphf->data;
+       cmph_uint32 h1 = hash(chm->hashes[0], key, keylen) % chm->n;
+       cmph_uint32 h2 = hash(chm->hashes[1], key, keylen) % chm->n;
+       DEBUGP("key: %s h1: %u h2: %u\n", key, h1, h2);
+       if (h1 == h2 && ++h2 >= chm->n) h2 = 0;
+       DEBUGP("key: %s g[h1]: %u g[h2]: %u edges: %u\n", key, chm->g[h1], chm->g[h2], chm->m);
+       return (chm->g[h1] + chm->g[h2]) % chm->m;
+}
+void chm_destroy(cmph_t *mphf)
+{
+       chm_data_t *data = (chm_data_t *)mphf->data;
+       free(data->g);  
+       hash_state_destroy(data->hashes[0]);
+       hash_state_destroy(data->hashes[1]);
+       free(data->hashes);
+       free(data);
+       free(mphf);
+}
+
+/** \fn void chm_pack(cmph_t *mphf, void *packed_mphf);
+ *  \brief Support the ability to pack a perfect hash function into a preallocated contiguous memory space pointed by packed_mphf.
+ *  \param mphf pointer to the resulting mphf
+ *  \param packed_mphf pointer to the contiguous memory area used to store the resulting mphf. The size of packed_mphf must be at least cmph_packed_size() 
+ */
+void chm_pack(cmph_t *mphf, void *packed_mphf)
+{
+       chm_data_t *data = (chm_data_t *)mphf->data;
+       cmph_uint8 * ptr = packed_mphf;
+
+       // packing h1 type
+       CMPH_HASH h1_type = hash_get_type(data->hashes[0]);
+       *((cmph_uint32 *) ptr) = h1_type;
+       ptr += sizeof(cmph_uint32);
+
+       // packing h1
+       hash_state_pack(data->hashes[0], ptr);
+       ptr += hash_state_packed_size(h1_type);
+
+       // packing h2 type
+       CMPH_HASH h2_type = hash_get_type(data->hashes[1]);
+       *((cmph_uint32 *) ptr) = h2_type;
+       ptr += sizeof(cmph_uint32);
+
+       // packing h2
+       hash_state_pack(data->hashes[1], ptr);
+       ptr += hash_state_packed_size(h2_type);
+
+       // packing n
+       *((cmph_uint32 *) ptr) = data->n;
+       ptr += sizeof(data->n);
+
+       // packing m
+       *((cmph_uint32 *) ptr) = data->m;
+       ptr += sizeof(data->m);
+
+       // packing g
+       memcpy(ptr, data->g, sizeof(cmph_uint32)*data->n);      
+}
+
+/** \fn cmph_uint32 chm_packed_size(cmph_t *mphf);
+ *  \brief Return the amount of space needed to pack mphf.
+ *  \param mphf pointer to a mphf
+ *  \return the size of the packed function or zero for failures
+ */ 
+cmph_uint32 chm_packed_size(cmph_t *mphf)
+{
+       chm_data_t *data = (chm_data_t *)mphf->data;
+       CMPH_HASH h1_type = hash_get_type(data->hashes[0]); 
+       CMPH_HASH h2_type = hash_get_type(data->hashes[1]); 
+
+       return (cmph_uint32)(sizeof(CMPH_ALGO) + hash_state_packed_size(h1_type) + hash_state_packed_size(h2_type) + 
+                       4*sizeof(cmph_uint32) + sizeof(cmph_uint32)*data->n);
+}
+
+/** cmph_uint32 chm_search(void *packed_mphf, const char *key, cmph_uint32 keylen);
+ *  \brief Use the packed mphf to do a search. 
+ *  \param  packed_mphf pointer to the packed mphf
+ *  \param key key to be hashed
+ *  \param keylen key legth in bytes
+ *  \return The mphf value
+ */
+cmph_uint32 chm_search_packed(void *packed_mphf, const char *key, cmph_uint32 keylen)
+{
+       register cmph_uint8 *h1_ptr = packed_mphf;
+       register CMPH_HASH h1_type  = *((cmph_uint32 *)h1_ptr);
+       h1_ptr += 4;
+
+       register cmph_uint8 *h2_ptr = h1_ptr + hash_state_packed_size(h1_type);
+       register CMPH_HASH h2_type  = *((cmph_uint32 *)h2_ptr);
+       h2_ptr += 4;
+       
+       register cmph_uint32 *g_ptr = (cmph_uint32 *)(h2_ptr + hash_state_packed_size(h2_type));
+       
+       register cmph_uint32 n = *g_ptr++;  
+       register cmph_uint32 m = *g_ptr++;  
+       
+       register cmph_uint32 h1 = hash_packed(h1_ptr, h1_type, key, keylen) % n; 
+       register cmph_uint32 h2 = hash_packed(h2_ptr, h2_type, key, keylen) % n; 
+       DEBUGP("key: %s h1: %u h2: %u\n", key, h1, h2);
+       if (h1 == h2 && ++h2 >= n) h2 = 0;
+       DEBUGP("key: %s g[h1]: %u g[h2]: %u edges: %u\n", key, g_ptr[h1], g_ptr[h2], m);
+       return (g_ptr[h1] + g_ptr[h2]) % m;     
+}
diff --git a/girepository/cmph/chm.h b/girepository/cmph/chm.h
new file mode 100644 (file)
index 0000000..392d23a
--- /dev/null
@@ -0,0 +1,42 @@
+#ifndef __CMPH_CHM_H__
+#define __CMPH_CHM_H__
+
+#include "cmph.h"
+
+typedef struct __chm_data_t chm_data_t;
+typedef struct __chm_config_data_t chm_config_data_t;
+
+chm_config_data_t *chm_config_new(void);
+void chm_config_set_hashfuncs(cmph_config_t *mph, CMPH_HASH *hashfuncs);
+void chm_config_destroy(cmph_config_t *mph);
+cmph_t *chm_new(cmph_config_t *mph, double c);
+
+void chm_load(FILE *f, cmph_t *mphf);
+int chm_dump(cmph_t *mphf, FILE *f);
+void chm_destroy(cmph_t *mphf);
+cmph_uint32 chm_search(cmph_t *mphf, const char *key, cmph_uint32 keylen);
+
+/** \fn void chm_pack(cmph_t *mphf, void *packed_mphf);
+ *  \brief Support the ability to pack a perfect hash function into a preallocated contiguous memory space pointed by packed_mphf.
+ *  \param mphf pointer to the resulting mphf
+ *  \param packed_mphf pointer to the contiguous memory area used to store the resulting mphf. The size of packed_mphf must be at least cmph_packed_size() 
+ */
+void chm_pack(cmph_t *mphf, void *packed_mphf);
+
+/** \fn cmph_uint32 chm_packed_size(cmph_t *mphf);
+ *  \brief Return the amount of space needed to pack mphf.
+ *  \param mphf pointer to a mphf
+ *  \return the size of the packed function or zero for failures
+ */ 
+cmph_uint32 chm_packed_size(cmph_t *mphf);
+
+/** cmph_uint32 chm_search(void *packed_mphf, const char *key, cmph_uint32 keylen);
+ *  \brief Use the packed mphf to do a search. 
+ *  \param  packed_mphf pointer to the packed mphf
+ *  \param key key to be hashed
+ *  \param keylen key legth in bytes
+ *  \return The mphf value
+ */
+cmph_uint32 chm_search_packed(void *packed_mphf, const char *key, cmph_uint32 keylen);
+
+#endif
diff --git a/girepository/cmph/chm_structs.h b/girepository/cmph/chm_structs.h
new file mode 100644 (file)
index 0000000..fcad1bc
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef __CMPH_CHM_STRUCTS_H__
+#define __CMPH_CHM_STRUCTS_H__
+
+#include "hash_state.h"
+
+struct __chm_data_t
+{
+       cmph_uint32 m; //edges (words) count
+       cmph_uint32 n; //vertex count
+       cmph_uint32 *g;
+       hash_state_t **hashes;
+};
+
+struct __chm_config_data_t
+{
+       CMPH_HASH hashfuncs[2];
+       cmph_uint32 m; //edges (words) count
+       cmph_uint32 n; //vertex count
+       graph_t *graph;
+       cmph_uint32 *g;
+       hash_state_t **hashes;
+};
+
+#endif
diff --git a/girepository/cmph/cmph.c b/girepository/cmph/cmph.c
new file mode 100644 (file)
index 0000000..cba735f
--- /dev/null
@@ -0,0 +1,845 @@
+#include "cmph.h"
+#include "cmph_structs.h"
+#include "chm.h"
+#include "bmz.h" 
+#include "bmz8.h" 
+#include "brz.h" 
+#include "fch.h" 
+#include "bdz.h"
+#include "bdz_ph.h"
+#include "chd_ph.h"
+#include "chd.h"
+
+#include <stdlib.h>
+#include <assert.h>
+#include <string.h>
+//#define DEBUG
+#include "debug.h"
+
+const char *cmph_names[] = {"bmz", "bmz8", "chm", "brz", "fch", "bdz", "bdz_ph", "chd_ph", "chd", NULL };
+
+typedef struct 
+{
+       void *vector;
+       cmph_uint32 position; // access position when data is a vector  
+} cmph_vector_t;
+
+
+
+/** 
+ * Support a vector of struct as the source of keys.
+ *
+ * E.g. The keys could be the fieldB's in a vector of struct rec where 
+ * struct rec is defined as:
+ * struct rec {
+ *    fieldA;
+ *    fieldB;
+ *    fieldC;
+ * }
+ */
+typedef struct 
+{
+       void *vector;                                   /* Pointer to the vector of struct */
+       cmph_uint32 position;                   /* current position */
+       cmph_uint32 struct_size;        /* The size of the struct */
+       cmph_uint32 key_offset;         /* The byte offset of the key in the struct */
+       cmph_uint32 key_len;            /* The length of the key */
+} cmph_struct_vector_t;
+
+
+static cmph_io_adapter_t *cmph_io_vector_new(void * vector, cmph_uint32 nkeys);
+static void cmph_io_vector_destroy(cmph_io_adapter_t * key_source);
+
+static cmph_io_adapter_t *cmph_io_struct_vector_new(void * vector, cmph_uint32 struct_size, cmph_uint32 key_offset, cmph_uint32 key_len, cmph_uint32 nkeys);
+static void cmph_io_struct_vector_destroy(cmph_io_adapter_t * key_source);
+
+static int key_nlfile_read(void *data, char **key, cmph_uint32 *keylen)
+{
+       FILE *fd = (FILE *)data;
+       *key = NULL;
+       *keylen = 0;
+       while(1)
+       {
+               char buf[BUFSIZ];
+               char *c = fgets(buf, BUFSIZ, fd); 
+               if (c == NULL) return -1;
+               if (feof(fd)) return -1;
+               *key = (char *)realloc(*key, *keylen + strlen(buf) + 1);
+               memcpy(*key + *keylen, buf, strlen(buf));
+               *keylen += (cmph_uint32)strlen(buf);
+               if (buf[strlen(buf) - 1] != '\n') continue;
+               break;
+       }
+       if ((*keylen) && (*key)[*keylen - 1] == '\n')
+       {
+               (*key)[(*keylen) - 1] = 0;
+               --(*keylen);
+       }
+       return (int)(*keylen);
+}
+
+static int key_byte_vector_read(void *data, char **key, cmph_uint32 *keylen)
+{
+       cmph_vector_t *cmph_vector = (cmph_vector_t *)data;
+       cmph_uint8 **keys_vd = (cmph_uint8 **)cmph_vector->vector;
+       size_t size;
+       memcpy(keylen, keys_vd[cmph_vector->position], sizeof(*keylen));
+       size = *keylen;
+       *key = (char *)malloc(size);
+       memcpy(*key, keys_vd[cmph_vector->position] + sizeof(*keylen), size);
+       cmph_vector->position = cmph_vector->position + 1;
+       return (int)(*keylen);
+
+}
+
+static int key_struct_vector_read(void *data, char **key, cmph_uint32 *keylen)
+{
+    cmph_struct_vector_t *cmph_struct_vector = (cmph_struct_vector_t *)data;
+    char *keys_vd = (char *)cmph_struct_vector->vector;
+    size_t size;
+    *keylen = cmph_struct_vector->key_len;
+    size = *keylen;
+    *key = (char *)malloc(size);
+    memcpy(*key, (keys_vd + (cmph_struct_vector->position * cmph_struct_vector->struct_size) + cmph_struct_vector->key_offset), size);
+    cmph_struct_vector->position = cmph_struct_vector->position + 1;
+    return (int)(*keylen);
+}
+
+static int key_vector_read(void *data, char **key, cmph_uint32 *keylen)
+{
+        cmph_vector_t *cmph_vector = (cmph_vector_t *)data;
+        char **keys_vd = (char **)cmph_vector->vector;
+       size_t size;
+        *keylen = (cmph_uint32)strlen(keys_vd[cmph_vector->position]);
+       size = *keylen;
+        *key = (char *)malloc(size + 1);
+        strcpy(*key, keys_vd[cmph_vector->position]);
+        cmph_vector->position = cmph_vector->position + 1;
+       return (int)(*keylen);
+
+}
+
+
+static void key_nlfile_dispose(void *data, char *key, cmph_uint32 keylen)
+{
+       free(key);
+}
+
+static void key_vector_dispose(void *data, char *key, cmph_uint32 keylen)
+{
+       free(key);
+}
+
+static void key_nlfile_rewind(void *data)
+{
+       FILE *fd = (FILE *)data;
+       rewind(fd);
+}
+
+static void key_struct_vector_rewind(void *data)
+{
+       cmph_struct_vector_t *cmph_struct_vector = (cmph_struct_vector_t *)data;
+       cmph_struct_vector->position = 0;
+}
+
+static void key_vector_rewind(void *data)
+{
+       cmph_vector_t *cmph_vector = (cmph_vector_t *)data;
+       cmph_vector->position = 0;
+}
+
+static cmph_uint32 count_nlfile_keys(FILE *fd)
+{
+       cmph_uint32 count = 0;
+       register char * ptr;
+       rewind(fd);
+       while(1)
+       {
+               char buf[BUFSIZ];
+               ptr = fgets(buf, BUFSIZ, fd); 
+               if (feof(fd)) break;
+               if (buf[strlen(buf) - 1] != '\n') continue;
+               ++count;
+       }
+       rewind(fd);
+       return count;
+}
+
+cmph_io_adapter_t *cmph_io_nlfile_adapter(FILE * keys_fd)
+{
+  cmph_io_adapter_t * key_source = (cmph_io_adapter_t *)malloc(sizeof(cmph_io_adapter_t));
+  assert(key_source);
+  key_source->data = (void *)keys_fd;
+  key_source->nkeys = count_nlfile_keys(keys_fd);
+  key_source->read = key_nlfile_read;
+  key_source->dispose = key_nlfile_dispose;
+  key_source->rewind = key_nlfile_rewind;
+  return key_source;
+}
+
+void cmph_io_nlfile_adapter_destroy(cmph_io_adapter_t * key_source)
+{
+       free(key_source);
+}
+
+cmph_io_adapter_t *cmph_io_nlnkfile_adapter(FILE * keys_fd, cmph_uint32 nkeys)
+{
+  cmph_io_adapter_t * key_source = (cmph_io_adapter_t *)malloc(sizeof(cmph_io_adapter_t));
+  assert(key_source);
+  key_source->data = (void *)keys_fd;
+  key_source->nkeys = nkeys;
+  key_source->read = key_nlfile_read;
+  key_source->dispose = key_nlfile_dispose;
+  key_source->rewind = key_nlfile_rewind;
+  return key_source;
+}
+
+void cmph_io_nlnkfile_adapter_destroy(cmph_io_adapter_t * key_source)
+{
+       free(key_source);
+}
+
+
+static cmph_io_adapter_t *cmph_io_struct_vector_new(void * vector, cmph_uint32 struct_size, cmph_uint32 key_offset, cmph_uint32 key_len, cmph_uint32 nkeys)
+{
+       cmph_io_adapter_t * key_source = (cmph_io_adapter_t *)malloc(sizeof(cmph_io_adapter_t));
+       cmph_struct_vector_t * cmph_struct_vector = (cmph_struct_vector_t *)malloc(sizeof(cmph_struct_vector_t));
+       assert(key_source);
+       assert(cmph_struct_vector);
+       cmph_struct_vector->vector = vector;
+       cmph_struct_vector->position = 0;
+       cmph_struct_vector->struct_size = struct_size;
+       cmph_struct_vector->key_offset = key_offset;
+       cmph_struct_vector->key_len = key_len;
+       key_source->data = (void *)cmph_struct_vector;
+       key_source->nkeys = nkeys;
+       return key_source;
+}
+
+static void cmph_io_struct_vector_destroy(cmph_io_adapter_t * key_source)
+{
+       cmph_struct_vector_t *cmph_struct_vector = (cmph_struct_vector_t *)key_source->data;
+       cmph_struct_vector->vector = NULL;
+       free(cmph_struct_vector);
+       free(key_source);
+}
+
+static cmph_io_adapter_t *cmph_io_vector_new(void * vector, cmph_uint32 nkeys)
+{
+       cmph_io_adapter_t * key_source = (cmph_io_adapter_t *)malloc(sizeof(cmph_io_adapter_t));
+       cmph_vector_t * cmph_vector = (cmph_vector_t *)malloc(sizeof(cmph_vector_t));
+       assert(key_source);
+       assert(cmph_vector);
+       cmph_vector->vector = vector;
+       cmph_vector->position = 0;
+       key_source->data = (void *)cmph_vector;
+       key_source->nkeys = nkeys;
+       return key_source;
+}
+
+static void cmph_io_vector_destroy(cmph_io_adapter_t * key_source)
+{
+       cmph_vector_t *cmph_vector = (cmph_vector_t *)key_source->data;
+       cmph_vector->vector = NULL;
+       free(cmph_vector);
+       free(key_source);
+}
+
+cmph_io_adapter_t *cmph_io_byte_vector_adapter(cmph_uint8 ** vector, cmph_uint32 nkeys)
+{
+       cmph_io_adapter_t * key_source = cmph_io_vector_new(vector, nkeys);
+       key_source->read = key_byte_vector_read;
+       key_source->dispose = key_vector_dispose;
+       key_source->rewind = key_vector_rewind;
+       return key_source;
+}
+void cmph_io_byte_vector_adapter_destroy(cmph_io_adapter_t * key_source)
+{
+       cmph_io_vector_destroy(key_source);
+}
+
+cmph_io_adapter_t *cmph_io_struct_vector_adapter(void * vector, cmph_uint32 struct_size, cmph_uint32 key_offset, cmph_uint32 key_len, cmph_uint32 nkeys)
+{
+       cmph_io_adapter_t * key_source = cmph_io_struct_vector_new(vector, struct_size, key_offset, key_len, nkeys);
+       key_source->read = key_struct_vector_read;
+       key_source->dispose = key_vector_dispose;
+       key_source->rewind = key_struct_vector_rewind;
+       return key_source;      
+}
+
+void cmph_io_struct_vector_adapter_destroy(cmph_io_adapter_t * key_source)
+{
+       cmph_io_struct_vector_destroy(key_source);      
+}
+
+cmph_io_adapter_t *cmph_io_vector_adapter(char ** vector, cmph_uint32 nkeys)
+{
+       cmph_io_adapter_t * key_source = cmph_io_vector_new(vector, nkeys);
+       key_source->read = key_vector_read;
+       key_source->dispose = key_vector_dispose;
+       key_source->rewind = key_vector_rewind;
+       return key_source;
+}
+
+void cmph_io_vector_adapter_destroy(cmph_io_adapter_t * key_source)
+{
+       cmph_io_vector_destroy(key_source);
+}
+
+cmph_config_t *cmph_config_new(cmph_io_adapter_t *key_source)
+{
+       cmph_config_t *mph = NULL;
+       mph = __config_new(key_source);
+       assert(mph);
+       mph->algo = CMPH_CHM; // default value
+       mph->data = chm_config_new();
+       return mph;
+}
+
+void cmph_config_set_algo(cmph_config_t *mph, CMPH_ALGO algo)
+{
+       if (algo != mph->algo)
+       {
+               switch (mph->algo)
+               {
+                       case CMPH_CHM:
+                               chm_config_destroy(mph);
+                               break;
+                       case CMPH_BMZ:
+                               bmz_config_destroy(mph);
+                               break;
+                       case CMPH_BMZ8:
+                               bmz8_config_destroy(mph);
+                               break;
+                       case CMPH_BRZ:
+                               brz_config_destroy(mph);
+                               break;
+                       case CMPH_FCH:
+                               fch_config_destroy(mph);
+                               break;
+                       case CMPH_BDZ:
+                               bdz_config_destroy(mph);
+                               break;
+                       case CMPH_BDZ_PH:
+                               bdz_ph_config_destroy(mph);
+                               break;
+                       case CMPH_CHD_PH:
+                               chd_ph_config_destroy(mph);
+                               break;
+                       case CMPH_CHD:
+                               chd_config_destroy(mph);
+                               break;
+                       default:
+                               assert(0);
+               }
+               switch(algo)
+               {
+                       case CMPH_CHM:
+                               mph->data = chm_config_new();
+                               break;
+                       case CMPH_BMZ:
+                               mph->data = bmz_config_new();
+                               break;
+                       case CMPH_BMZ8:
+                               mph->data = bmz8_config_new();
+                               break;
+                       case CMPH_BRZ:
+                               mph->data = brz_config_new();
+                               break;
+                       case CMPH_FCH:
+                               mph->data = fch_config_new();
+                               break;
+                       case CMPH_BDZ:
+                               mph->data = bdz_config_new();
+                               break;
+                       case CMPH_BDZ_PH:
+                               mph->data = bdz_ph_config_new();
+                               break;
+                       case CMPH_CHD_PH:
+                               mph->data = chd_ph_config_new();
+                               break;
+                       case CMPH_CHD:
+                               mph->data = chd_config_new(mph);
+                               break;
+                       default:
+                               assert(0);
+               }
+       }
+       mph->algo = algo;
+}
+
+void cmph_config_set_tmp_dir(cmph_config_t *mph, cmph_uint8 *tmp_dir)
+{
+       if (mph->algo == CMPH_BRZ) 
+       {
+               brz_config_set_tmp_dir(mph, tmp_dir);
+       }
+}
+
+
+void cmph_config_set_mphf_fd(cmph_config_t *mph, FILE *mphf_fd)
+{
+       if (mph->algo == CMPH_BRZ) 
+       {
+               brz_config_set_mphf_fd(mph, mphf_fd);
+       }
+}
+
+void cmph_config_set_b(cmph_config_t *mph, cmph_uint32 b)
+{
+       if (mph->algo == CMPH_BRZ) 
+       {
+               brz_config_set_b(mph, b);
+       }
+       else if (mph->algo == CMPH_BDZ) 
+       {
+               bdz_config_set_b(mph, b);
+       }
+       else if (mph->algo == CMPH_CHD_PH) 
+       {
+               chd_ph_config_set_b(mph, b);
+       }
+       else if (mph->algo == CMPH_CHD) 
+       {
+               chd_config_set_b(mph, b);
+       }
+}
+
+void cmph_config_set_keys_per_bin(cmph_config_t *mph, cmph_uint32 keys_per_bin)
+{
+       if (mph->algo == CMPH_CHD_PH) 
+       {
+               chd_ph_config_set_keys_per_bin(mph, keys_per_bin);
+       }
+       else if (mph->algo == CMPH_CHD) 
+       {
+               chd_config_set_keys_per_bin(mph, keys_per_bin);
+       }
+}
+
+void cmph_config_set_memory_availability(cmph_config_t *mph, cmph_uint32 memory_availability)
+{
+       if (mph->algo == CMPH_BRZ) 
+       {
+               brz_config_set_memory_availability(mph, memory_availability);
+       }
+}
+
+void cmph_config_destroy(cmph_config_t *mph)
+{
+       if(mph)
+       {
+               DEBUGP("Destroying mph with algo %s\n", cmph_names[mph->algo]);
+               switch (mph->algo)
+               {
+                       case CMPH_CHM:
+                               chm_config_destroy(mph);
+                               break;
+                       case CMPH_BMZ: /* included -- Fabiano */
+                               bmz_config_destroy(mph);
+                               break;
+                       case CMPH_BMZ8: /* included -- Fabiano */
+                               bmz8_config_destroy(mph);
+                               break;
+                       case CMPH_BRZ: /* included -- Fabiano */
+                               brz_config_destroy(mph);
+                               break;
+                       case CMPH_FCH: /* included -- Fabiano */
+                               fch_config_destroy(mph);
+                               break;
+                       case CMPH_BDZ: /* included -- Fabiano */
+                               bdz_config_destroy(mph);
+                               break;
+                       case CMPH_BDZ_PH: /* included -- Fabiano */
+                               bdz_ph_config_destroy(mph);
+                               break;
+                       case CMPH_CHD_PH: /* included -- Fabiano */
+                               chd_ph_config_destroy(mph);
+                               break;
+                       case CMPH_CHD: /* included -- Fabiano */
+                               chd_config_destroy(mph);
+                               break;
+                       default:
+                               assert(0);
+               }
+               __config_destroy(mph);
+       }
+}
+
+void cmph_config_set_verbosity(cmph_config_t *mph, cmph_uint32 verbosity)
+{
+       mph->verbosity = verbosity;
+}
+
+void cmph_config_set_hashfuncs(cmph_config_t *mph, CMPH_HASH *hashfuncs)
+{
+       switch (mph->algo)
+       {
+               case CMPH_CHM:
+                       chm_config_set_hashfuncs(mph, hashfuncs);
+                       break;
+               case CMPH_BMZ: /* included -- Fabiano */
+                       bmz_config_set_hashfuncs(mph, hashfuncs);
+                       break;
+               case CMPH_BMZ8: /* included -- Fabiano */
+                       bmz8_config_set_hashfuncs(mph, hashfuncs);
+                       break;
+               case CMPH_BRZ: /* included -- Fabiano */
+                       brz_config_set_hashfuncs(mph, hashfuncs);
+                       break;
+               case CMPH_FCH: /* included -- Fabiano */
+                       fch_config_set_hashfuncs(mph, hashfuncs);
+                       break;
+               case CMPH_BDZ: /* included -- Fabiano */
+                       bdz_config_set_hashfuncs(mph, hashfuncs);
+                       break;
+               case CMPH_BDZ_PH: /* included -- Fabiano */
+                       bdz_ph_config_set_hashfuncs(mph, hashfuncs);
+                       break;
+               case CMPH_CHD_PH: /* included -- Fabiano */
+                       chd_ph_config_set_hashfuncs(mph, hashfuncs);
+                       break;
+               case CMPH_CHD: /* included -- Fabiano */
+                       chd_config_set_hashfuncs(mph, hashfuncs);
+                       break;
+               default:
+                       break;
+       }
+       return;
+}
+void cmph_config_set_graphsize(cmph_config_t *mph, double c)
+{
+       mph->c = c;
+       return;
+}
+
+cmph_t *cmph_new(cmph_config_t *mph)
+{
+       cmph_t *mphf = NULL;
+       double c = mph->c;
+
+       DEBUGP("Creating mph with algorithm %s\n", cmph_names[mph->algo]);
+       switch (mph->algo)      
+       {
+               case CMPH_CHM:
+                       DEBUGP("Creating chm hash\n");
+                       mphf = chm_new(mph, c);
+                       break;
+               case CMPH_BMZ: /* included -- Fabiano */
+                       DEBUGP("Creating bmz hash\n");
+                       mphf = bmz_new(mph, c);
+                       break;
+               case CMPH_BMZ8: /* included -- Fabiano */
+                       DEBUGP("Creating bmz8 hash\n");
+                       mphf = bmz8_new(mph, c);
+                       break;
+               case CMPH_BRZ: /* included -- Fabiano */
+                       DEBUGP("Creating brz hash\n");
+                       if (c >= 2.0) brz_config_set_algo(mph, CMPH_FCH);
+                       else brz_config_set_algo(mph, CMPH_BMZ8);
+                       mphf = brz_new(mph, c);
+                       break;
+               case CMPH_FCH: /* included -- Fabiano */
+                       DEBUGP("Creating fch hash\n");
+                       mphf = fch_new(mph, c);
+                       break;
+               case CMPH_BDZ: /* included -- Fabiano */
+                       DEBUGP("Creating bdz hash\n");
+                       mphf = bdz_new(mph, c);
+                       break;
+               case CMPH_BDZ_PH: /* included -- Fabiano */
+                       DEBUGP("Creating bdz_ph hash\n");
+                       mphf = bdz_ph_new(mph, c);
+                       break;
+               case CMPH_CHD_PH: /* included -- Fabiano */
+                       DEBUGP("Creating chd_ph hash\n");
+                       mphf = chd_ph_new(mph, c);
+                       break;
+               case CMPH_CHD: /* included -- Fabiano */
+                       DEBUGP("Creating chd hash\n");
+                       mphf = chd_new(mph, c);
+                       break;
+               default:
+                       assert(0);
+       }
+       return mphf;
+}
+
+int cmph_dump(cmph_t *mphf, FILE *f)
+{
+       switch (mphf->algo)
+       {
+               case CMPH_CHM:
+                       return chm_dump(mphf, f);
+               case CMPH_BMZ: /* included -- Fabiano */
+                       return bmz_dump(mphf, f);
+               case CMPH_BMZ8: /* included -- Fabiano */
+                       return bmz8_dump(mphf, f);
+               case CMPH_BRZ: /* included -- Fabiano */
+                       return brz_dump(mphf, f);
+               case CMPH_FCH: /* included -- Fabiano */
+                       return fch_dump(mphf, f);
+               case CMPH_BDZ: /* included -- Fabiano */
+                       return bdz_dump(mphf, f);
+               case CMPH_BDZ_PH: /* included -- Fabiano */
+                       return bdz_ph_dump(mphf, f);
+               case CMPH_CHD_PH: /* included -- Fabiano */
+                       return chd_ph_dump(mphf, f);
+               case CMPH_CHD: /* included -- Fabiano */
+                       return chd_dump(mphf, f);
+               default:
+                       assert(0);
+       }
+       assert(0);
+       return 0;
+}
+cmph_t *cmph_load(FILE *f)
+{
+       cmph_t *mphf = NULL;
+       DEBUGP("Loading mphf generic parts\n");
+       mphf =  __cmph_load(f);
+       if (mphf == NULL) return NULL;
+       DEBUGP("Loading mphf algorithm dependent parts\n");
+
+       switch (mphf->algo)
+       {
+               case CMPH_CHM:
+                       chm_load(f, mphf);
+                       break;
+               case CMPH_BMZ: /* included -- Fabiano */
+                       DEBUGP("Loading bmz algorithm dependent parts\n");
+                       bmz_load(f, mphf);
+                       break;
+               case CMPH_BMZ8: /* included -- Fabiano */
+                       DEBUGP("Loading bmz8 algorithm dependent parts\n");
+                       bmz8_load(f, mphf);
+                       break;
+               case CMPH_BRZ: /* included -- Fabiano */
+                       DEBUGP("Loading brz algorithm dependent parts\n");
+                       brz_load(f, mphf);
+                       break;
+               case CMPH_FCH: /* included -- Fabiano */
+                       DEBUGP("Loading fch algorithm dependent parts\n");
+                       fch_load(f, mphf);
+                       break;
+               case CMPH_BDZ: /* included -- Fabiano */
+                       DEBUGP("Loading bdz algorithm dependent parts\n");
+                       bdz_load(f, mphf);
+                       break;
+               case CMPH_BDZ_PH: /* included -- Fabiano */
+                       DEBUGP("Loading bdz_ph algorithm dependent parts\n");
+                       bdz_ph_load(f, mphf);
+                       break;
+               case CMPH_CHD_PH: /* included -- Fabiano */
+                       DEBUGP("Loading chd_ph algorithm dependent parts\n");
+                       chd_ph_load(f, mphf);
+                       break;
+               case CMPH_CHD: /* included -- Fabiano */
+                       DEBUGP("Loading chd algorithm dependent parts\n");
+                       chd_load(f, mphf);
+                       break;
+               default:
+                       assert(0);
+       }
+       DEBUGP("Loaded mphf\n");
+       return mphf;
+}
+
+
+cmph_uint32 cmph_search(cmph_t *mphf, const char *key, cmph_uint32 keylen)
+{
+       DEBUGP("mphf algorithm: %u \n", mphf->algo);
+       switch(mphf->algo)
+       {
+               case CMPH_CHM:
+                       return chm_search(mphf, key, keylen);
+               case CMPH_BMZ: /* included -- Fabiano */
+                       DEBUGP("bmz algorithm search\n");                        
+                       return bmz_search(mphf, key, keylen);
+               case CMPH_BMZ8: /* included -- Fabiano */
+                       DEBUGP("bmz8 algorithm search\n");                       
+                       return bmz8_search(mphf, key, keylen);
+               case CMPH_BRZ: /* included -- Fabiano */
+                       DEBUGP("brz algorithm search\n");                        
+                       return brz_search(mphf, key, keylen);
+               case CMPH_FCH: /* included -- Fabiano */
+                       DEBUGP("fch algorithm search\n");                        
+                       return fch_search(mphf, key, keylen);
+               case CMPH_BDZ: /* included -- Fabiano */
+                       DEBUGP("bdz algorithm search\n");                        
+                       return bdz_search(mphf, key, keylen);
+               case CMPH_BDZ_PH: /* included -- Fabiano */
+                       DEBUGP("bdz_ph algorithm search\n");                     
+                       return bdz_ph_search(mphf, key, keylen);
+               case CMPH_CHD_PH: /* included -- Fabiano */
+                       DEBUGP("chd_ph algorithm search\n");                     
+                       return chd_ph_search(mphf, key, keylen);
+               case CMPH_CHD: /* included -- Fabiano */
+                       DEBUGP("chd algorithm search\n");                        
+                       return chd_search(mphf, key, keylen);
+               default:
+                       assert(0);
+       }
+       assert(0);
+       return 0;
+}
+
+cmph_uint32 cmph_size(cmph_t *mphf)
+{
+       return mphf->size;
+}
+       
+void cmph_destroy(cmph_t *mphf)
+{
+       switch(mphf->algo)
+       {
+               case CMPH_CHM:
+                       chm_destroy(mphf);
+                       return;
+               case CMPH_BMZ: /* included -- Fabiano */
+                       bmz_destroy(mphf);
+                       return;
+               case CMPH_BMZ8: /* included -- Fabiano */
+                       bmz8_destroy(mphf);
+                       return;
+               case CMPH_BRZ: /* included -- Fabiano */
+                       brz_destroy(mphf);
+                       return;
+               case CMPH_FCH: /* included -- Fabiano */
+                       fch_destroy(mphf);
+                       return;
+               case CMPH_BDZ: /* included -- Fabiano */
+                       bdz_destroy(mphf);
+                       return;
+               case CMPH_BDZ_PH: /* included -- Fabiano */
+                       bdz_ph_destroy(mphf);
+                       return;
+               case CMPH_CHD_PH: /* included -- Fabiano */
+                       chd_ph_destroy(mphf);
+                       return;
+               case CMPH_CHD: /* included -- Fabiano */
+                       chd_destroy(mphf);
+                       return;
+               default: 
+                       assert(0);
+       }
+       assert(0);
+       return;
+}
+
+
+/** \fn void cmph_pack(cmph_t *mphf, void *packed_mphf);
+ *  \brief Support the ability to pack a perfect hash function into a preallocated contiguous memory space pointed by packed_mphf.
+ *  \param mphf pointer to the resulting mphf
+ *  \param packed_mphf pointer to the contiguous memory area used to store the resulting mphf. The size of packed_mphf must be at least cmph_packed_size() 
+ */
+void cmph_pack(cmph_t *mphf, void *packed_mphf)
+{
+       // packing algorithm type to be used in cmph.c
+       cmph_uint32 * ptr = (cmph_uint32 *) packed_mphf; 
+       *ptr++ = mphf->algo;
+       DEBUGP("mphf->algo = %u\n", mphf->algo);
+       switch(mphf->algo)
+       {
+               case CMPH_CHM:
+                       chm_pack(mphf, ptr);
+                       break;
+               case CMPH_BMZ: /* included -- Fabiano */
+                       bmz_pack(mphf, ptr);
+                       break;
+               case CMPH_BMZ8: /* included -- Fabiano */
+                       bmz8_pack(mphf, ptr);
+                       break;
+               case CMPH_BRZ: /* included -- Fabiano */
+                       brz_pack(mphf, ptr);
+                       break;
+               case CMPH_FCH: /* included -- Fabiano */
+                       fch_pack(mphf, ptr);
+                       break;
+               case CMPH_BDZ: /* included -- Fabiano */
+                       bdz_pack(mphf, ptr);
+                       break;
+               case CMPH_BDZ_PH: /* included -- Fabiano */
+                       bdz_ph_pack(mphf, ptr);
+                       break;
+               case CMPH_CHD_PH: /* included -- Fabiano */
+                       chd_ph_pack(mphf, ptr);
+                       break;
+               case CMPH_CHD: /* included -- Fabiano */
+                       chd_pack(mphf, ptr);
+                       break;
+               default: 
+                       assert(0);
+       }
+       return;
+}
+
+/** \fn cmph_uint32 cmph_packed_size(cmph_t *mphf);
+ *  \brief Return the amount of space needed to pack mphf.
+ *  \param mphf pointer to a mphf
+ *  \return the size of the packed function or zero for failures
+ */ 
+cmph_uint32 cmph_packed_size(cmph_t *mphf)
+{
+       switch(mphf->algo)
+       {
+               case CMPH_CHM:
+                       return chm_packed_size(mphf);
+               case CMPH_BMZ: /* included -- Fabiano */
+                       return bmz_packed_size(mphf);
+               case CMPH_BMZ8: /* included -- Fabiano */
+                       return bmz8_packed_size(mphf);
+               case CMPH_BRZ: /* included -- Fabiano */
+                       return brz_packed_size(mphf);
+               case CMPH_FCH: /* included -- Fabiano */
+                       return fch_packed_size(mphf);
+               case CMPH_BDZ: /* included -- Fabiano */
+                       return bdz_packed_size(mphf);
+               case CMPH_BDZ_PH: /* included -- Fabiano */
+                       return bdz_ph_packed_size(mphf);
+               case CMPH_CHD_PH: /* included -- Fabiano */
+                       return chd_ph_packed_size(mphf);
+               case CMPH_CHD: /* included -- Fabiano */
+                       return chd_packed_size(mphf);
+               default: 
+                       assert(0);
+       }
+       return 0; // FAILURE
+}
+
+/** cmph_uint32 cmph_search(void *packed_mphf, const char *key, cmph_uint32 keylen);
+ *  \brief Use the packed mphf to do a search. 
+ *  \param  packed_mphf pointer to the packed mphf
+ *  \param key key to be hashed
+ *  \param keylen key legth in bytes
+ *  \return The mphf value
+ */
+cmph_uint32 cmph_search_packed(void *packed_mphf, const char *key, cmph_uint32 keylen)
+{
+       cmph_uint32 *ptr = (cmph_uint32 *)packed_mphf;
+//     fprintf(stderr, "algo:%u\n", *ptr);
+       switch(*ptr)
+       {
+               case CMPH_CHM:
+                       return chm_search_packed(++ptr, key, keylen);
+               case CMPH_BMZ: /* included -- Fabiano */
+                       return bmz_search_packed(++ptr, key, keylen);
+               case CMPH_BMZ8: /* included -- Fabiano */
+                       return bmz8_search_packed(++ptr, key, keylen);
+               case CMPH_BRZ: /* included -- Fabiano */
+                       return brz_search_packed(++ptr, key, keylen);
+               case CMPH_FCH: /* included -- Fabiano */
+                       return fch_search_packed(++ptr, key, keylen);
+               case CMPH_BDZ: /* included -- Fabiano */
+                       return bdz_search_packed(++ptr, key, keylen);
+               case CMPH_BDZ_PH: /* included -- Fabiano */
+                       return bdz_ph_search_packed(++ptr, key, keylen);
+               case CMPH_CHD_PH: /* included -- Fabiano */
+                       return chd_ph_search_packed(++ptr, key, keylen);
+               case CMPH_CHD: /* included -- Fabiano */
+                       return chd_search_packed(++ptr, key, keylen);
+               default: 
+                       assert(0);
+       }
+       return 0; // FAILURE
+}
diff --git a/girepository/cmph/cmph.h b/girepository/cmph/cmph.h
new file mode 100644 (file)
index 0000000..1bc009e
--- /dev/null
@@ -0,0 +1,112 @@
+#ifndef __CMPH_H__
+#define __CMPH_H__
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include "cmph_types.h"
+
+typedef struct __config_t cmph_config_t;
+typedef struct __cmph_t cmph_t;
+
+typedef struct 
+{
+        void *data;
+        cmph_uint32 nkeys;
+        int (*read)(void *, char **, cmph_uint32 *);
+        void (*dispose)(void *, char *, cmph_uint32);
+        void (*rewind)(void *);
+} cmph_io_adapter_t;
+
+/** Adapter pattern API **/
+/* please call free() in the created adapters */
+cmph_io_adapter_t *cmph_io_nlfile_adapter(FILE * keys_fd);
+void cmph_io_nlfile_adapter_destroy(cmph_io_adapter_t * key_source);
+
+cmph_io_adapter_t *cmph_io_nlnkfile_adapter(FILE * keys_fd, cmph_uint32 nkeys);
+void cmph_io_nlnkfile_adapter_destroy(cmph_io_adapter_t * key_source);
+
+cmph_io_adapter_t *cmph_io_vector_adapter(char ** vector, cmph_uint32 nkeys);
+void cmph_io_vector_adapter_destroy(cmph_io_adapter_t * key_source);
+
+cmph_io_adapter_t *cmph_io_byte_vector_adapter(cmph_uint8 ** vector, cmph_uint32 nkeys);
+void cmph_io_byte_vector_adapter_destroy(cmph_io_adapter_t * key_source);
+
+cmph_io_adapter_t *cmph_io_struct_vector_adapter(void * vector, 
+                                                 cmph_uint32 struct_size, 
+                                                 cmph_uint32 key_offset, 
+                                                 cmph_uint32 key_len, 
+                                                 cmph_uint32 nkeys);
+
+void cmph_io_struct_vector_adapter_destroy(cmph_io_adapter_t * key_source);
+
+/** Hash configuration API **/
+cmph_config_t *cmph_config_new(cmph_io_adapter_t *key_source);
+void cmph_config_set_hashfuncs(cmph_config_t *mph, CMPH_HASH *hashfuncs);
+void cmph_config_set_verbosity(cmph_config_t *mph, cmph_uint32 verbosity);
+void cmph_config_set_graphsize(cmph_config_t *mph, double c);
+void cmph_config_set_algo(cmph_config_t *mph, CMPH_ALGO algo);
+void cmph_config_set_tmp_dir(cmph_config_t *mph, cmph_uint8 *tmp_dir);
+void cmph_config_set_mphf_fd(cmph_config_t *mph, FILE *mphf_fd);
+void cmph_config_set_b(cmph_config_t *mph, cmph_uint32 b);
+void cmph_config_set_keys_per_bin(cmph_config_t *mph, cmph_uint32 keys_per_bin);
+void cmph_config_set_memory_availability(cmph_config_t *mph, cmph_uint32 memory_availability);
+void cmph_config_destroy(cmph_config_t *mph);
+
+/** Hash API **/
+cmph_t *cmph_new(cmph_config_t *mph);
+
+/** cmph_uint32 cmph_search(cmph_t *mphf, const char *key, cmph_uint32 keylen);
+ *  \brief Computes the mphf value. 
+ *  \param mphf pointer to the resulting function
+ *  \param key is the key to be hashed
+ *  \param keylen is the key legth in bytes
+ *  \return The mphf value
+ */
+cmph_uint32 cmph_search(cmph_t *mphf, const char *key, cmph_uint32 keylen);
+
+cmph_uint32 cmph_size(cmph_t *mphf);
+void cmph_destroy(cmph_t *mphf);
+
+/** Hash serialization/deserialization */
+int cmph_dump(cmph_t *mphf, FILE *f);
+cmph_t *cmph_load(FILE *f);
+
+/** \fn void cmph_pack(cmph_t *mphf, void *packed_mphf);
+ *  \brief Support the ability to pack a perfect hash function into a preallocated contiguous memory space pointed by packed_mphf.
+ *  \param mphf pointer to the resulting mphf
+ *  \param packed_mphf pointer to the contiguous memory area used to store the 
+ *  \param resulting mphf. The size of packed_mphf must be at least cmph_packed_size() 
+ */
+void cmph_pack(cmph_t *mphf, void *packed_mphf);
+
+/** \fn cmph_uint32 cmph_packed_size(cmph_t *mphf);
+ *  \brief Return the amount of space needed to pack mphf.
+ *  \param mphf pointer to a mphf
+ *  \return the size of the packed function or zero for failures
+ */
+cmph_uint32 cmph_packed_size(cmph_t *mphf);
+
+/** cmph_uint32 cmph_search(void *packed_mphf, const char *key, cmph_uint32 keylen);
+ *  \brief Use the packed mphf to do a search. 
+ *  \param  packed_mphf pointer to the packed mphf
+ *  \param key key to be hashed
+ *  \param keylen key legth in bytes
+ *  \return The mphf value
+ */
+cmph_uint32 cmph_search_packed(void *packed_mphf, const char *key, cmph_uint32 keylen);
+
+// TIMING functions. To use the macro CMPH_TIMING must be defined
+#include "cmph_time.h"
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/girepository/cmph/cmph_structs.c b/girepository/cmph/cmph_structs.c
new file mode 100644 (file)
index 0000000..b563424
--- /dev/null
@@ -0,0 +1,69 @@
+#include "cmph_structs.h"
+
+#include <string.h>
+
+//#define DEBUG
+#include "debug.h"
+
+cmph_config_t *__config_new(cmph_io_adapter_t *key_source)
+{
+       cmph_config_t *mph = (cmph_config_t *)malloc(sizeof(cmph_config_t));
+       memset(mph, 0, sizeof(cmph_config_t));
+       if (mph == NULL) return NULL;
+       mph->key_source = key_source;
+       mph->verbosity = 0;
+       mph->data = NULL;
+       mph->c = 0;
+       return mph;
+}
+
+void __config_destroy(cmph_config_t *mph)
+{
+       free(mph);
+}
+
+void __cmph_dump(cmph_t *mphf, FILE *fd)
+{
+       register size_t nbytes;
+       nbytes = fwrite(cmph_names[mphf->algo], (size_t)(strlen(cmph_names[mphf->algo]) + 1), (size_t)1, fd);
+       nbytes = fwrite(&(mphf->size), sizeof(mphf->size), (size_t)1, fd);
+}
+cmph_t *__cmph_load(FILE *f) 
+{
+       cmph_t *mphf = NULL;
+       cmph_uint32 i;
+       char algo_name[BUFSIZ];
+       char *ptr = algo_name;
+       CMPH_ALGO algo = CMPH_COUNT;
+       register size_t nbytes;
+       
+       DEBUGP("Loading mphf\n");
+       while(1)
+       {
+               size_t c = fread(ptr, (size_t)1, (size_t)1, f);
+               if (c != 1) return NULL;
+               if (*ptr == 0) break;
+               ++ptr;
+       }
+       for(i = 0; i < CMPH_COUNT; ++i)
+       {
+               if (strcmp(algo_name, cmph_names[i]) == 0)
+               {
+                       algo = i;
+               }
+       }
+       if (algo == CMPH_COUNT) 
+       {
+               DEBUGP("Algorithm %s not found\n", algo_name);
+               return NULL;
+       }
+       mphf = (cmph_t *)malloc(sizeof(cmph_t));
+       mphf->algo = algo;
+       nbytes = fread(&(mphf->size), sizeof(mphf->size), (size_t)1, f);
+       mphf->data = NULL;
+       DEBUGP("Algorithm is %s and mphf is sized %u\n", cmph_names[algo],  mphf->size);
+
+       return mphf;
+}
+
+
diff --git a/girepository/cmph/cmph_structs.h b/girepository/cmph/cmph_structs.h
new file mode 100644 (file)
index 0000000..88fafb6
--- /dev/null
@@ -0,0 +1,33 @@
+#ifndef __CMPH_STRUCTS_H__
+#define __CMPH_STRUCTS_H__
+
+#include "cmph.h"
+
+/** Hash generation algorithm data
+  */
+struct __config_t
+{
+        CMPH_ALGO algo;
+        cmph_io_adapter_t *key_source;
+        cmph_uint32 verbosity;
+        double c;
+        void *data; // algorithm dependent data
+};
+
+/** Hash querying algorithm data
+  */
+struct __cmph_t
+{
+        CMPH_ALGO algo;
+        cmph_uint32 size;
+        cmph_io_adapter_t *key_source;
+        void *data; // algorithm dependent data
+};
+
+cmph_config_t *__config_new(cmph_io_adapter_t *key_source);
+void __config_destroy(cmph_config_t*);
+void __cmph_dump(cmph_t *mphf, FILE *);
+cmph_t *__cmph_load(FILE *f);
+
+
+#endif
diff --git a/girepository/cmph/cmph_time.h b/girepository/cmph/cmph_time.h
new file mode 100644 (file)
index 0000000..c03558f
--- /dev/null
@@ -0,0 +1,60 @@
+#ifdef ELAPSED_TIME_IN_SECONDS
+#undef ELAPSED_TIME_IN_SECONDS
+#endif
+
+#ifdef ELAPSED_TIME_IN_uSECONDS
+#undef ELAPSED_TIME_IN_uSECONDS
+#endif
+
+#ifdef __GNUC__
+       #include <sys/time.h>
+       #ifndef WIN32
+               #include <sys/resource.h>
+       #endif
+#endif
+
+#ifdef __GNUC__
+       #ifndef __CMPH_TIME_H__
+               #define __CMPH_TIME_H__
+               static inline void elapsed_time_in_seconds(double * elapsed_time)
+               {
+                       struct timeval e_time;
+                       if (gettimeofday(&e_time, NULL) < 0) {
+                               return;
+                       }
+                       *elapsed_time =  (double)e_time.tv_sec + ((double)e_time.tv_usec/1000000.0);
+               }
+               static inline void dummy_elapsed_time_in_seconds()
+               {
+               }
+               static inline void elapsed_time_in_useconds(cmph_uint64 * elapsed_time)
+               {
+                       struct timeval e_time;
+                       if (gettimeofday(&e_time, NULL) < 0) {
+                               return;
+                       }
+                       *elapsed_time =  (cmph_uint64)(e_time.tv_sec*1000000 + e_time.tv_usec);
+               }
+               static inline void dummy_elapsed_time_in_useconds()
+               {
+               }       
+       #endif
+#endif
+
+#ifdef CMPH_TIMING
+         #ifdef __GNUC__
+                 #define ELAPSED_TIME_IN_SECONDS elapsed_time_in_seconds
+                 #define ELAPSED_TIME_IN_uSECONDS elapsed_time_in_useconds
+         #else
+                 #define ELAPSED_TIME_IN_SECONDS dummy_elapsed_time_in_seconds
+                 #define ELAPSED_TIME_IN_uSECONDS dummy_elapsed_time_in_useconds
+         #endif
+#else
+         #ifdef __GNUC__
+                 #define ELAPSED_TIME_IN_SECONDS
+                 #define ELAPSED_TIME_IN_uSECONDS
+         #else
+                 #define ELAPSED_TIME_IN_SECONDS dummy_elapsed_time_in_seconds
+                 #define ELAPSED_TIME_IN_uSECONDS dummy_elapsed_time_in_useconds
+         #endif
+#endif
diff --git a/girepository/cmph/cmph_types.h b/girepository/cmph/cmph_types.h
new file mode 100644 (file)
index 0000000..2883235
--- /dev/null
@@ -0,0 +1,25 @@
+#include <glib.h>
+
+#ifndef __CMPH_TYPES_H__
+#define __CMPH_TYPES_H__
+
+typedef gint8 cmph_int8;
+typedef guint8 cmph_uint8;
+
+typedef gint16 cmph_int16;
+typedef guint16 cmph_uint16;
+
+typedef gint32 cmph_int32;
+typedef guint32 cmph_uint32;
+
+typedef gint64 cmph_int64;
+typedef guint64 cmph_uint64;
+
+typedef enum { CMPH_HASH_JENKINS, CMPH_HASH_COUNT } CMPH_HASH;
+extern const char *cmph_hash_names[];
+typedef enum { CMPH_BMZ, CMPH_BMZ8, CMPH_CHM, CMPH_BRZ, CMPH_FCH,
+               CMPH_BDZ, CMPH_BDZ_PH,
+               CMPH_CHD_PH, CMPH_CHD, CMPH_COUNT } CMPH_ALGO;
+extern const char *cmph_names[];
+
+#endif
diff --git a/girepository/cmph/compressed_rank.c b/girepository/cmph/compressed_rank.c
new file mode 100644 (file)
index 0000000..822b2e1
--- /dev/null
@@ -0,0 +1,321 @@
+#include<stdlib.h>
+#include<stdio.h>
+#include<limits.h>
+#include<string.h>
+#include"compressed_rank.h"
+#include"bitbool.h"
+// #define DEBUG
+#include"debug.h"
+static inline cmph_uint32 compressed_rank_i_log2(cmph_uint32 x)
+{
+       register cmph_uint32 res = 0;
+       
+       while(x > 1)
+       {
+               x >>= 1;
+               res++;
+       }
+       return res;
+};
+
+void compressed_rank_init(compressed_rank_t * cr)
+{
+       cr->max_val = 0;
+       cr->n = 0;
+       cr->rem_r = 0;
+       select_init(&cr->sel);
+       cr->vals_rems = 0;
+}
+
+void compressed_rank_destroy(compressed_rank_t * cr)
+{
+       free(cr->vals_rems);
+       cr->vals_rems = 0;
+       select_destroy(&cr->sel);
+}
+
+void compressed_rank_generate(compressed_rank_t * cr, cmph_uint32 * vals_table, cmph_uint32 n)
+{
+       register cmph_uint32 i,j;
+       register cmph_uint32 rems_mask;
+       register cmph_uint32 * select_vec = 0;
+       cr->n = n;
+       cr->max_val = vals_table[cr->n - 1];
+       cr->rem_r = compressed_rank_i_log2(cr->max_val/cr->n);
+       if(cr->rem_r == 0)
+       {
+               cr->rem_r = 1;
+       }
+       select_vec = (cmph_uint32 *) calloc(cr->max_val >> cr->rem_r, sizeof(cmph_uint32));
+       cr->vals_rems = (cmph_uint32 *) calloc(BITS_TABLE_SIZE(cr->n, cr->rem_r), sizeof(cmph_uint32));
+       rems_mask = (1U << cr->rem_r) - 1U;
+       
+       for(i = 0; i < cr->n; i++)
+       {
+               set_bits_value(cr->vals_rems, i, vals_table[i] & rems_mask, cr->rem_r, rems_mask);
+       }
+
+       for(i = 1, j = 0; i <= cr->max_val >> cr->rem_r; i++)
+       {
+               while(i > (vals_table[j] >> cr->rem_r))
+               {
+                       j++;
+               }
+               select_vec[i - 1] = j;
+       };
+
+
+       // FABIANO: before it was (cr->total_length >> cr->rem_r) + 1. But I wiped out the + 1 because
+       // I changed the select structure to work up to m, instead of up to m - 1.
+       select_generate(&cr->sel, select_vec, cr->max_val >> cr->rem_r, cr->n);
+
+       free(select_vec);
+}
+
+cmph_uint32 compressed_rank_query(compressed_rank_t * cr, cmph_uint32 idx)
+{
+       register cmph_uint32 rems_mask;
+       register cmph_uint32 val_quot, val_rem;
+       register cmph_uint32 sel_res, rank;
+       
+       if(idx > cr->max_val)
+       {
+               return cr->n;
+       }
+       
+       val_quot = idx >> cr->rem_r;    
+       rems_mask = (1U << cr->rem_r) - 1U; 
+       val_rem = idx & rems_mask; 
+       if(val_quot == 0)
+       {
+               rank = sel_res = 0;
+       }
+       else
+       {
+               sel_res = select_query(&cr->sel, val_quot - 1) + 1;
+               rank = sel_res - val_quot;
+       }
+       
+       do
+       {
+               if(GETBIT32(cr->sel.bits_vec, sel_res))
+               {
+                       break;
+               }
+               if(get_bits_value(cr->vals_rems, rank, cr->rem_r, rems_mask) >= val_rem)
+               {
+                       break;
+               }
+               sel_res++;
+               rank++;
+       } while(1);     
+       
+       return rank;
+}
+
+cmph_uint32 compressed_rank_get_space_usage(compressed_rank_t * cr)
+{
+       register cmph_uint32 space_usage = select_get_space_usage(&cr->sel);
+       space_usage += BITS_TABLE_SIZE(cr->n, cr->rem_r)*(cmph_uint32)sizeof(cmph_uint32)*8;
+       space_usage += 3*(cmph_uint32)sizeof(cmph_uint32)*8;
+       return space_usage;
+}
+
+void compressed_rank_dump(compressed_rank_t * cr, char **buf, cmph_uint32 *buflen)
+{
+       register cmph_uint32 sel_size = select_packed_size(&(cr->sel));
+       register cmph_uint32 vals_rems_size = BITS_TABLE_SIZE(cr->n, cr->rem_r) * (cmph_uint32)sizeof(cmph_uint32);
+       register cmph_uint32 pos = 0;
+       char * buf_sel = 0;
+       cmph_uint32 buflen_sel = 0;
+       
+       *buflen = 4*(cmph_uint32)sizeof(cmph_uint32) + sel_size +  vals_rems_size;
+       
+       DEBUGP("sel_size = %u\n", sel_size);
+       DEBUGP("vals_rems_size = %u\n", vals_rems_size);
+       
+       *buf = (char *)calloc(*buflen, sizeof(char));
+       
+       if (!*buf) 
+       {
+               *buflen = UINT_MAX;
+               return;
+       }
+       
+       // dumping max_val, n and rem_r
+       memcpy(*buf, &(cr->max_val), sizeof(cmph_uint32));
+       pos += (cmph_uint32)sizeof(cmph_uint32);
+       DEBUGP("max_val = %u\n", cr->max_val);
+
+       memcpy(*buf + pos, &(cr->n), sizeof(cmph_uint32));
+       pos += (cmph_uint32)sizeof(cmph_uint32);
+       DEBUGP("n = %u\n", cr->n);
+       
+       memcpy(*buf + pos, &(cr->rem_r), sizeof(cmph_uint32));
+       pos += (cmph_uint32)sizeof(cmph_uint32);
+       DEBUGP("rem_r = %u\n", cr->rem_r);
+
+       // dumping sel
+       select_dump(&cr->sel, &buf_sel, &buflen_sel);
+       memcpy(*buf + pos, &buflen_sel, sizeof(cmph_uint32));
+       pos += (cmph_uint32)sizeof(cmph_uint32);
+       DEBUGP("buflen_sel = %u\n", buflen_sel);
+
+       memcpy(*buf + pos, buf_sel, buflen_sel);
+       
+       #ifdef DEBUG    
+       cmph_uint32 i = 0; 
+       for(i = 0; i < buflen_sel; i++)
+       {
+           DEBUGP("pos = %u  -- buf_sel[%u] = %u\n", pos, i, *(*buf + pos + i));
+       }
+       #endif
+       pos += buflen_sel;
+       
+       free(buf_sel);
+       
+       // dumping vals_rems
+       memcpy(*buf + pos, cr->vals_rems, vals_rems_size);
+       #ifdef DEBUG    
+       for(i = 0; i < vals_rems_size; i++)
+       {
+           DEBUGP("pos = %u -- vals_rems_size = %u  -- vals_rems[%u] = %u\n", pos, vals_rems_size, i, *(*buf + pos + i));
+       }
+       #endif
+       pos += vals_rems_size;
+
+       DEBUGP("Dumped compressed rank structure with size %u bytes\n", *buflen);
+}
+
+void compressed_rank_load(compressed_rank_t * cr, const char *buf, cmph_uint32 buflen)
+{
+       register cmph_uint32 pos = 0;
+       cmph_uint32 buflen_sel = 0;
+       register cmph_uint32 vals_rems_size = 0;
+       
+       // loading max_val, n, and rem_r
+       memcpy(&(cr->max_val), buf, sizeof(cmph_uint32));
+       pos += (cmph_uint32)sizeof(cmph_uint32);
+       DEBUGP("max_val = %u\n", cr->max_val);
+
+       memcpy(&(cr->n), buf + pos, sizeof(cmph_uint32));
+       pos += (cmph_uint32)sizeof(cmph_uint32);
+       DEBUGP("n = %u\n", cr->n);
+
+       memcpy(&(cr->rem_r), buf + pos, sizeof(cmph_uint32));
+       pos += (cmph_uint32)sizeof(cmph_uint32);
+       DEBUGP("rem_r = %u\n", cr->rem_r);
+       
+       // loading sel
+       memcpy(&buflen_sel, buf + pos, sizeof(cmph_uint32));
+       pos += (cmph_uint32)sizeof(cmph_uint32);
+       DEBUGP("buflen_sel = %u\n", buflen_sel);
+
+       select_load(&cr->sel, buf + pos, buflen_sel);
+       #ifdef DEBUG    
+       cmph_uint32 i = 0;  
+       for(i = 0; i < buflen_sel; i++)
+       {
+           DEBUGP("pos = %u  -- buf_sel[%u] = %u\n", pos, i, *(buf + pos + i));
+       }
+       #endif
+       pos += buflen_sel;
+       
+       // loading vals_rems
+       if(cr->vals_rems)
+       {
+               free(cr->vals_rems);
+       }
+       vals_rems_size = BITS_TABLE_SIZE(cr->n, cr->rem_r);
+       cr->vals_rems = (cmph_uint32 *) calloc(vals_rems_size, sizeof(cmph_uint32));
+       vals_rems_size *= 4;
+       memcpy(cr->vals_rems, buf + pos, vals_rems_size);
+       
+       #ifdef DEBUG    
+       for(i = 0; i < vals_rems_size; i++)
+       {
+           DEBUGP("pos = %u -- vals_rems_size = %u  -- vals_rems[%u] = %u\n", pos, vals_rems_size, i, *(buf + pos + i));
+       }
+       #endif
+       pos += vals_rems_size;
+       
+       DEBUGP("Loaded compressed rank structure with size %u bytes\n", buflen);
+}
+
+
+
+void compressed_rank_pack(compressed_rank_t *cr, void *cr_packed)
+{
+       if (cr && cr_packed)
+       {
+               char *buf = NULL;
+               cmph_uint32 buflen = 0;
+               compressed_rank_dump(cr, &buf, &buflen);
+               memcpy(cr_packed, buf, buflen);
+               free(buf);
+       }
+}
+
+cmph_uint32 compressed_rank_packed_size(compressed_rank_t *cr)
+{
+       register cmph_uint32 sel_size = select_packed_size(&cr->sel);
+       register cmph_uint32 vals_rems_size = BITS_TABLE_SIZE(cr->n, cr->rem_r) * (cmph_uint32)sizeof(cmph_uint32);     
+       return 4 * (cmph_uint32)sizeof(cmph_uint32)  + sel_size +  vals_rems_size;
+}
+
+cmph_uint32 compressed_rank_query_packed(void * cr_packed, cmph_uint32 idx)
+{
+       // unpacking cr_packed
+       register cmph_uint32 *ptr = (cmph_uint32 *)cr_packed;
+       register cmph_uint32 max_val = *ptr++;
+       register cmph_uint32 n = *ptr++;
+       register cmph_uint32 rem_r = *ptr++;
+       register cmph_uint32 buflen_sel = *ptr++;
+       register cmph_uint32 * sel_packed = ptr;
+       
+       register cmph_uint32 * bits_vec = sel_packed + 2; // skipping n and m
+
+       register cmph_uint32 * vals_rems = (ptr += (buflen_sel >> 2)); 
+
+       // compressed sequence query computation
+       register cmph_uint32 rems_mask;
+       register cmph_uint32 val_quot, val_rem;
+       register cmph_uint32 sel_res, rank;
+       
+       if(idx > max_val)
+       {
+               return n;
+       }
+       
+       val_quot = idx >> rem_r;        
+       rems_mask = (1U << rem_r) - 1U; 
+       val_rem = idx & rems_mask; 
+       if(val_quot == 0)
+       {
+               rank = sel_res = 0;
+       }
+       else
+       {
+               sel_res = select_query_packed(sel_packed, val_quot - 1) + 1;
+               rank = sel_res - val_quot;
+       }
+       
+       do
+       {
+               if(GETBIT32(bits_vec, sel_res))
+               {
+                       break;
+               }
+               if(get_bits_value(vals_rems, rank, rem_r, rems_mask) >= val_rem)
+               {
+                       break;
+               }
+               sel_res++;
+               rank++;
+       } while(1);     
+       
+       return rank;
+}
+
+
+
diff --git a/girepository/cmph/compressed_rank.h b/girepository/cmph/compressed_rank.h
new file mode 100644 (file)
index 0000000..bfe930d
--- /dev/null
@@ -0,0 +1,55 @@
+#ifndef __CMPH_COMPRESSED_RANK_H__
+#define __CMPH_COMPRESSED_RANK_H__
+
+#include "select.h"
+
+struct _compressed_rank_t
+{
+       cmph_uint32 max_val;
+       cmph_uint32 n; // number of values stored in vals_rems
+       // The length in bits of each value is decomposed into two compnents: the lg(n) MSBs are stored in rank_select data structure
+       // the remaining LSBs are stored in a table of n cells, each one of rem_r bits.
+       cmph_uint32 rem_r;
+       select_t sel;
+       cmph_uint32 * vals_rems;
+};
+
+typedef struct _compressed_rank_t compressed_rank_t;
+
+void compressed_rank_init(compressed_rank_t * cr);
+
+void compressed_rank_destroy(compressed_rank_t * cr);
+void compressed_rank_generate(compressed_rank_t * cr, cmph_uint32 * vals_table, cmph_uint32 n);
+
+cmph_uint32 compressed_rank_query(compressed_rank_t * cr, cmph_uint32 idx);
+
+cmph_uint32 compressed_rank_get_space_usage(compressed_rank_t * cr);
+
+void compressed_rank_dump(compressed_rank_t * cr, char **buf, cmph_uint32 *buflen);
+
+void compressed_rank_load(compressed_rank_t * cr, const char *buf, cmph_uint32 buflen);
+
+
+/** \fn void compressed_rank_pack(compressed_rank_t *cr, void *cr_packed);
+ *  \brief Support the ability to pack a compressed_rank structure into a preallocated contiguous memory space pointed by cr_packed.
+ *  \param cr points to the compressed_rank structure
+ *  \param cr_packed pointer to the contiguous memory area used to store the compressed_rank structure. The size of cr_packed must be at least @see compressed_rank_packed_size 
+ */
+void compressed_rank_pack(compressed_rank_t *cr, void *cr_packed);
+
+/** \fn cmph_uint32 compressed_rank_packed_size(compressed_rank_t *cr);
+ *  \brief Return the amount of space needed to pack a compressed_rank structure.
+ *  \return the size of the packed compressed_rank structure or zero for failures
+ */ 
+cmph_uint32 compressed_rank_packed_size(compressed_rank_t *cr);
+
+
+/** \fn cmph_uint32 compressed_rank_query_packed(void * cr_packed, cmph_uint32 idx);
+ *  \param cr_packed is a pointer to a contiguous memory area
+ *  \param idx is an index to compute the rank
+ *  \return an integer that represents the compressed_rank value.
+ */
+cmph_uint32 compressed_rank_query_packed(void * cr_packed, cmph_uint32 idx);
+
+#endif
diff --git a/girepository/cmph/compressed_seq.c b/girepository/cmph/compressed_seq.c
new file mode 100644 (file)
index 0000000..e558196
--- /dev/null
@@ -0,0 +1,378 @@
+#include "compressed_seq.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <assert.h>
+#include <limits.h>
+#include <string.h>
+
+#include "bitbool.h"
+
+// #define DEBUG
+#include "debug.h"
+
+static inline cmph_uint32 compressed_seq_i_log2(cmph_uint32 x)
+{
+       register cmph_uint32 res = 0;
+       
+       while(x > 1)
+       {
+               x >>= 1;
+               res++;
+       }
+       return res;
+};
+
+void compressed_seq_init(compressed_seq_t * cs)
+{
+       select_init(&cs->sel);
+       cs->n = 0;
+       cs->rem_r = 0;
+       cs->length_rems = 0;
+       cs->total_length = 0;
+       cs->store_table = 0;
+}
+
+void compressed_seq_destroy(compressed_seq_t * cs)
+{
+       free(cs->store_table);
+       cs->store_table = 0;
+       free(cs->length_rems);
+       cs->length_rems = 0;
+       select_destroy(&cs->sel);
+};
+
+
+void compressed_seq_generate(compressed_seq_t * cs, cmph_uint32 * vals_table, cmph_uint32 n)
+{
+       register cmph_uint32 i;
+       // lengths: represents lengths of encoded values        
+       register cmph_uint32 * lengths = (cmph_uint32 *)calloc(n, sizeof(cmph_uint32));
+       register cmph_uint32 rems_mask;
+       register cmph_uint32 stored_value;
+       
+       cs->n = n;
+       cs->total_length = 0;
+       
+       for(i = 0; i < cs->n; i++)
+       {
+               if(vals_table[i] == 0)
+               {
+                       lengths[i] = 0;
+               }
+               else
+               {
+                       lengths[i] = compressed_seq_i_log2(vals_table[i] + 1);
+                       cs->total_length += lengths[i];
+               };
+       };
+       
+       if(cs->store_table)
+       {
+               free(cs->store_table);
+       }
+       cs->store_table = (cmph_uint32 *) calloc(((cs->total_length + 31) >> 5), sizeof(cmph_uint32));
+       cs->total_length = 0;
+       
+       for(i = 0; i < cs->n; i++)
+       {
+               if(vals_table[i] == 0)
+                       continue;
+               stored_value = vals_table[i] - ((1U << lengths[i]) - 1U);
+               set_bits_at_pos(cs->store_table, cs->total_length, stored_value, lengths[i]);
+               cs->total_length += lengths[i];
+       };
+       
+       cs->rem_r = compressed_seq_i_log2(cs->total_length/cs->n);
+       
+       if(cs->rem_r == 0)
+       {
+               cs->rem_r = 1;
+       }
+       
+       if(cs->length_rems)
+       {
+               free(cs->length_rems);
+       }
+       
+       cs->length_rems = (cmph_uint32 *) calloc(BITS_TABLE_SIZE(cs->n, cs->rem_r), sizeof(cmph_uint32));
+       
+       rems_mask = (1U << cs->rem_r) - 1U;
+       cs->total_length = 0;
+       
+       for(i = 0; i < cs->n; i++)
+       {
+               cs->total_length += lengths[i];
+               set_bits_value(cs->length_rems, i, cs->total_length & rems_mask, cs->rem_r, rems_mask);
+               lengths[i] = cs->total_length >> cs->rem_r;
+       };
+       
+       select_init(&cs->sel);
+        
+       // FABIANO: before it was (cs->total_length >> cs->rem_r) + 1. But I wiped out the + 1 because
+       // I changed the select structure to work up to m, instead of up to m - 1.
+       select_generate(&cs->sel, lengths, cs->n, (cs->total_length >> cs->rem_r));
+       
+       free(lengths);
+};
+
+cmph_uint32 compressed_seq_get_space_usage(compressed_seq_t * cs)
+{
+       register cmph_uint32 space_usage = select_get_space_usage(&cs->sel);
+       space_usage += ((cs->total_length + 31) >> 5) * (cmph_uint32)sizeof(cmph_uint32) * 8;
+       space_usage += BITS_TABLE_SIZE(cs->n, cs->rem_r) * (cmph_uint32)sizeof(cmph_uint32) * 8;
+       return  4 * (cmph_uint32)sizeof(cmph_uint32) * 8 + space_usage;
+}
+
+cmph_uint32 compressed_seq_query(compressed_seq_t * cs, cmph_uint32 idx)
+{
+       register cmph_uint32 enc_idx, enc_length;
+       register cmph_uint32 rems_mask;
+       register cmph_uint32 stored_value;
+       register cmph_uint32 sel_res;
+
+       assert(idx < cs->n); // FABIANO ADDED
+
+       rems_mask = (1U << cs->rem_r) - 1U;
+       
+       if(idx == 0)
+       {
+               enc_idx = 0;
+               sel_res = select_query(&cs->sel, idx);
+       }
+       else
+       {
+               sel_res = select_query(&cs->sel, idx - 1);
+               
+               enc_idx = (sel_res - (idx - 1)) << cs->rem_r;
+               enc_idx += get_bits_value(cs->length_rems, idx-1, cs->rem_r, rems_mask);
+               
+               sel_res = select_next_query(&cs->sel, sel_res);
+       };
+
+       enc_length = (sel_res - idx) << cs->rem_r;
+       enc_length += get_bits_value(cs->length_rems, idx, cs->rem_r, rems_mask);
+       enc_length -= enc_idx;
+       if(enc_length == 0)
+               return 0;
+               
+       stored_value = get_bits_at_pos(cs->store_table, enc_idx, enc_length);
+       return stored_value + ((1U << enc_length) - 1U);
+};
+
+void compressed_seq_dump(compressed_seq_t * cs, char ** buf, cmph_uint32 * buflen)
+{
+       register cmph_uint32 sel_size = select_packed_size(&(cs->sel));
+       register cmph_uint32 length_rems_size = BITS_TABLE_SIZE(cs->n, cs->rem_r) * 4;
+       register cmph_uint32 store_table_size = ((cs->total_length + 31) >> 5) * 4;
+       register cmph_uint32 pos = 0;
+       char * buf_sel = 0;
+       cmph_uint32 buflen_sel = 0;
+       
+       *buflen = 4*(cmph_uint32)sizeof(cmph_uint32) + sel_size +  length_rems_size + store_table_size;
+       
+       DEBUGP("sel_size = %u\n", sel_size);
+       DEBUGP("length_rems_size = %u\n", length_rems_size);
+       DEBUGP("store_table_size = %u\n", store_table_size);
+       *buf = (char *)calloc(*buflen, sizeof(char));
+       
+       if (!*buf) 
+       {
+               *buflen = UINT_MAX;
+               return;
+       }
+       
+       // dumping n, rem_r and total_length
+       memcpy(*buf, &(cs->n), sizeof(cmph_uint32));
+       pos += (cmph_uint32)sizeof(cmph_uint32);
+       DEBUGP("n = %u\n", cs->n);
+       
+       memcpy(*buf + pos, &(cs->rem_r), sizeof(cmph_uint32));
+       pos += (cmph_uint32)sizeof(cmph_uint32);
+       DEBUGP("rem_r = %u\n", cs->rem_r);
+
+       memcpy(*buf + pos, &(cs->total_length), sizeof(cmph_uint32));
+       pos += (cmph_uint32)sizeof(cmph_uint32);
+       DEBUGP("total_length = %u\n", cs->total_length);
+
+       
+       // dumping sel
+       select_dump(&cs->sel, &buf_sel, &buflen_sel);
+       memcpy(*buf + pos, &buflen_sel, sizeof(cmph_uint32));
+       pos += (cmph_uint32)sizeof(cmph_uint32);
+       DEBUGP("buflen_sel = %u\n", buflen_sel);
+
+       memcpy(*buf + pos, buf_sel, buflen_sel);
+       #ifdef DEBUG    
+       cmph_uint32 i = 0; 
+       for(i = 0; i < buflen_sel; i++)
+       {
+           DEBUGP("pos = %u  -- buf_sel[%u] = %u\n", pos, i, *(*buf + pos + i));
+       }
+       #endif
+       pos += buflen_sel;
+       
+       free(buf_sel);
+       
+       // dumping length_rems
+       memcpy(*buf + pos, cs->length_rems, length_rems_size);
+       #ifdef DEBUG    
+       for(i = 0; i < length_rems_size; i++)
+       {
+           DEBUGP("pos = %u -- length_rems_size = %u  -- length_rems[%u] = %u\n", pos, length_rems_size, i, *(*buf + pos + i));
+       }
+       #endif
+       pos += length_rems_size;
+
+       // dumping store_table
+       memcpy(*buf + pos, cs->store_table, store_table_size);
+
+       #ifdef DEBUG    
+       for(i = 0; i < store_table_size; i++)
+       {
+           DEBUGP("pos = %u -- store_table_size = %u  -- store_table[%u] = %u\n", pos, store_table_size, i, *(*buf + pos + i));
+       }
+       #endif
+       DEBUGP("Dumped compressed sequence structure with size %u bytes\n", *buflen);
+}
+
+void compressed_seq_load(compressed_seq_t * cs, const char * buf, cmph_uint32 buflen)
+{
+       register cmph_uint32 pos = 0;
+       cmph_uint32 buflen_sel = 0;
+       register cmph_uint32 length_rems_size = 0;
+       register cmph_uint32 store_table_size = 0;
+       
+       // loading n, rem_r and total_length
+       memcpy(&(cs->n), buf, sizeof(cmph_uint32));
+       pos += (cmph_uint32)sizeof(cmph_uint32);
+       DEBUGP("n = %u\n", cs->n);
+
+       memcpy(&(cs->rem_r), buf + pos, sizeof(cmph_uint32));
+       pos += (cmph_uint32)sizeof(cmph_uint32);
+       DEBUGP("rem_r = %u\n", cs->rem_r);
+
+       memcpy(&(cs->total_length), buf + pos, sizeof(cmph_uint32));
+       pos += (cmph_uint32)sizeof(cmph_uint32);
+       DEBUGP("total_length = %u\n", cs->total_length);
+       
+       // loading sel
+       memcpy(&buflen_sel, buf + pos, sizeof(cmph_uint32));
+       pos += (cmph_uint32)sizeof(cmph_uint32);
+       DEBUGP("buflen_sel = %u\n", buflen_sel);
+
+       select_load(&cs->sel, buf + pos, buflen_sel);
+       #ifdef DEBUG    
+       cmph_uint32 i = 0;  
+       for(i = 0; i < buflen_sel; i++)
+       {
+           DEBUGP("pos = %u  -- buf_sel[%u] = %u\n", pos, i, *(buf + pos + i));
+       }
+       #endif
+       pos += buflen_sel;
+       
+       // loading length_rems
+       if(cs->length_rems)
+       {
+               free(cs->length_rems);
+       }
+       length_rems_size = BITS_TABLE_SIZE(cs->n, cs->rem_r);
+       cs->length_rems = (cmph_uint32 *) calloc(length_rems_size, sizeof(cmph_uint32));
+       length_rems_size *= 4;
+       memcpy(cs->length_rems, buf + pos, length_rems_size);
+       
+       #ifdef DEBUG    
+       for(i = 0; i < length_rems_size; i++)
+       {
+           DEBUGP("pos = %u -- length_rems_size = %u  -- length_rems[%u] = %u\n", pos, length_rems_size, i, *(buf + pos + i));
+       }
+       #endif
+       pos += length_rems_size;
+
+       // loading store_table
+       store_table_size = ((cs->total_length + 31) >> 5);
+       if(cs->store_table)
+       {
+               free(cs->store_table);
+       }
+       cs->store_table = (cmph_uint32 *) calloc(store_table_size, sizeof(cmph_uint32));
+        store_table_size *= 4;
+       memcpy(cs->store_table, buf + pos, store_table_size);
+       
+       #ifdef DEBUG    
+       for(i = 0; i < store_table_size; i++)
+       {
+           DEBUGP("pos = %u -- store_table_size = %u  -- store_table[%u] = %u\n", pos, store_table_size, i, *(buf + pos + i));
+       }
+       #endif
+
+       DEBUGP("Loaded compressed sequence structure with size %u bytes\n", buflen);
+}
+
+void compressed_seq_pack(compressed_seq_t *cs, void *cs_packed)
+{
+       if (cs && cs_packed)
+       {
+               char *buf = NULL;
+               cmph_uint32 buflen = 0;
+               compressed_seq_dump(cs, &buf, &buflen);
+               memcpy(cs_packed, buf, buflen);
+               free(buf);
+       }
+
+}
+
+cmph_uint32 compressed_seq_packed_size(compressed_seq_t *cs)
+{
+       register cmph_uint32 sel_size = select_packed_size(&cs->sel);
+       register cmph_uint32 store_table_size = ((cs->total_length + 31) >> 5) * (cmph_uint32)sizeof(cmph_uint32);
+       register cmph_uint32 length_rems_size = BITS_TABLE_SIZE(cs->n, cs->rem_r) * (cmph_uint32)sizeof(cmph_uint32);
+       return 4 * (cmph_uint32)sizeof(cmph_uint32) + sel_size + store_table_size + length_rems_size;
+}
+
+
+cmph_uint32 compressed_seq_query_packed(void * cs_packed, cmph_uint32 idx)
+{
+       // unpacking cs_packed
+       register cmph_uint32 *ptr = (cmph_uint32 *)cs_packed;
+       register cmph_uint32 n = *ptr++;
+       register cmph_uint32 rem_r = *ptr++;
+       ptr++; // skipping total_length 
+//     register cmph_uint32 total_length = *ptr++;
+       register cmph_uint32 buflen_sel = *ptr++;
+       register cmph_uint32 * sel_packed = ptr;
+       register cmph_uint32 * length_rems = (ptr += (buflen_sel >> 2)); 
+       register cmph_uint32 length_rems_size = BITS_TABLE_SIZE(n, rem_r);
+       register cmph_uint32 * store_table = (ptr += length_rems_size);
+
+       // compressed sequence query computation
+       register cmph_uint32 enc_idx, enc_length;
+       register cmph_uint32 rems_mask;
+       register cmph_uint32 stored_value;
+       register cmph_uint32 sel_res;
+
+       rems_mask = (1U << rem_r) - 1U;
+       
+       if(idx == 0)
+       {
+               enc_idx = 0;
+               sel_res = select_query_packed(sel_packed, idx);
+       }
+       else
+       {
+               sel_res = select_query_packed(sel_packed, idx - 1);
+               
+               enc_idx = (sel_res - (idx - 1)) << rem_r;
+               enc_idx += get_bits_value(length_rems, idx-1, rem_r, rems_mask);
+               
+               sel_res = select_next_query_packed(sel_packed, sel_res);
+       };
+
+       enc_length = (sel_res - idx) << rem_r;
+       enc_length += get_bits_value(length_rems, idx, rem_r, rems_mask);
+       enc_length -= enc_idx;
+       if(enc_length == 0)
+               return 0;
+               
+       stored_value = get_bits_at_pos(store_table, enc_idx, enc_length);
+       return stored_value + ((1U << enc_length) - 1U);
+}
diff --git a/girepository/cmph/compressed_seq.h b/girepository/cmph/compressed_seq.h
new file mode 100644 (file)
index 0000000..8d87fc7
--- /dev/null
@@ -0,0 +1,84 @@
+#ifndef __CMPH_COMPRESSED_SEQ_H__
+#define __CMPH_COMPRESSED_SEQ_H__
+
+#include"select.h"
+
+struct _compressed_seq_t
+{
+       cmph_uint32 n; // number of values stored in store_table
+       // The length in bits of each value is decomposed into two compnents: the lg(n) MSBs are stored in rank_select data structure
+       // the remaining LSBs are stored in a table of n cells, each one of rem_r bits.
+       cmph_uint32 rem_r;
+       cmph_uint32 total_length; // total length in bits of stored_table
+       select_t sel;
+       cmph_uint32 * length_rems;
+       cmph_uint32 * store_table;
+};
+
+typedef struct _compressed_seq_t compressed_seq_t;
+
+/** \fn void compressed_seq_init(compressed_seq_t * cs);
+ *  \brief Initialize a compressed sequence structure.
+ *  \param cs points to the compressed sequence structure to be initialized
+ */
+void compressed_seq_init(compressed_seq_t * cs);
+
+/** \fn void compressed_seq_destroy(compressed_seq_t * cs);
+ *  \brief Destroy a compressed sequence given as input.
+ *  \param cs points to the compressed sequence structure to be destroyed
+ */
+void compressed_seq_destroy(compressed_seq_t * cs);
+
+/** \fn void compressed_seq_generate(compressed_seq_t * cs, cmph_uint32 * vals_table, cmph_uint32 n);
+ *  \brief Generate a compressed sequence from an input array with n values.
+ *  \param cs points to the compressed sequence structure
+ *  \param vals_table poiter to the array given as input
+ *  \param n number of values in @see vals_table
+ */
+void compressed_seq_generate(compressed_seq_t * cs, cmph_uint32 * vals_table, cmph_uint32 n);
+
+
+/** \fn cmph_uint32 compressed_seq_query(compressed_seq_t * cs, cmph_uint32 idx);
+ *  \brief Returns the value stored at index @see idx of the compressed sequence structure.
+ *  \param cs points to the compressed sequence structure
+ *  \param idx index to retrieve the value from
+ *  \return the value stored at index @see idx of the compressed sequence structure
+ */
+cmph_uint32 compressed_seq_query(compressed_seq_t * cs, cmph_uint32 idx);
+
+
+/** \fn cmph_uint32 compressed_seq_get_space_usage(compressed_seq_t * cs);
+ *  \brief Returns amount of space (in bits) to store the compressed sequence.
+ *  \param cs points to the compressed sequence structure
+ *  \return the amount of space (in bits) to store @see cs
+ */
+cmph_uint32 compressed_seq_get_space_usage(compressed_seq_t * cs);
+
+void compressed_seq_dump(compressed_seq_t * cs, char ** buf, cmph_uint32 * buflen);
+
+void compressed_seq_load(compressed_seq_t * cs, const char * buf, cmph_uint32 buflen);
+
+
+/** \fn void compressed_seq_pack(compressed_seq_t *cs, void *cs_packed);
+ *  \brief Support the ability to pack a compressed sequence structure into a preallocated contiguous memory space pointed by cs_packed.
+ *  \param cs points to the compressed sequence structure
+ *  \param cs_packed pointer to the contiguous memory area used to store the compressed sequence structure. The size of cs_packed must be at least @see compressed_seq_packed_size 
+ */
+void compressed_seq_pack(compressed_seq_t *cs, void *cs_packed);
+
+/** \fn cmph_uint32 compressed_seq_packed_size(compressed_seq_t *cs);
+ *  \brief Return the amount of space needed to pack a compressed sequence structure.
+ *  \return the size of the packed compressed sequence structure or zero for failures
+ */ 
+cmph_uint32 compressed_seq_packed_size(compressed_seq_t *cs);
+
+
+/** \fn cmph_uint32 compressed_seq_query_packed(void * cs_packed, cmph_uint32 idx);
+ *  \brief Returns the value stored at index @see idx of the packed compressed sequence structure.
+ *  \param cs_packed is a pointer to a contiguous memory area
+ *  \param idx is the index to retrieve the value from
+ *  \return the value stored at index @see idx of the packed compressed sequence structure
+ */
+cmph_uint32 compressed_seq_query_packed(void * cs_packed, cmph_uint32 idx);
+
+#endif
diff --git a/girepository/cmph/debug.h b/girepository/cmph/debug.h
new file mode 100644 (file)
index 0000000..0f7ddb1
--- /dev/null
@@ -0,0 +1,53 @@
+#ifdef DEBUGP
+#undef DEBUGP
+#endif
+
+#ifdef __cplusplus
+#include <cstdio>
+#ifdef WIN32
+#include <cstring>
+#endif
+#else
+#include <stdio.h>
+#ifdef WIN32
+#include <string.h>
+#endif
+#endif
+
+#ifndef __GNUC__
+#ifndef __DEBUG_H__
+#define __DEBUG_H__
+#include <stdarg.h>
+static void debugprintf(const char *format, ...)
+{
+    va_list ap;
+       char *f = NULL;
+       const char *p="%s:%d ";
+       size_t plen = strlen(p);
+    va_start(ap, format);
+       f = (char *)malloc(plen + strlen(format) + 1);
+       if (!f) return;
+       memcpy(f, p, plen);
+       memcpy(f + plen, format, strlen(format) + 1);
+    vfprintf(stderr, f, ap);
+    va_end(ap);
+       free(f);
+}
+static void dummyprintf(const char *format, ...)
+{}
+#endif
+#endif
+
+#ifdef DEBUG
+#ifndef __GNUC__
+#define DEBUGP debugprintf
+#else
+#define DEBUGP(args...) do { fprintf(stderr, "%s:%d ", __FILE__, __LINE__); fprintf(stderr, ## args); } while(0)
+#endif
+#else
+#ifndef __GNUC__
+#define DEBUGP dummyprintf
+#else
+#define DEBUGP(args...)
+#endif
+#endif
diff --git a/girepository/cmph/fch.c b/girepository/cmph/fch.c
new file mode 100644 (file)
index 0000000..67b68fb
--- /dev/null
@@ -0,0 +1,517 @@
+#include "fch.h"
+#include "cmph_structs.h"
+#include "fch_structs.h"
+#include "hash.h"
+#include "bitbool.h"
+#include "fch_buckets.h"
+#include <math.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <assert.h>
+#include <string.h>
+#define INDEX 0 /* alignment index within a bucket */
+//#define DEBUG
+#include "debug.h"
+
+static fch_buckets_t * mapping(cmph_config_t *mph);
+static cmph_uint32 * ordering(fch_buckets_t * buckets);
+static cmph_uint8 check_for_collisions_h2(fch_config_data_t *fch, fch_buckets_t * buckets, cmph_uint32 *sorted_indexes);
+static void permut(cmph_uint32 * vector, cmph_uint32 n);
+static cmph_uint8 searching(fch_config_data_t *fch, fch_buckets_t *buckets, cmph_uint32 *sorted_indexes);
+
+fch_config_data_t *fch_config_new()
+{
+       fch_config_data_t *fch;
+       fch = (fch_config_data_t *)malloc(sizeof(fch_config_data_t));
+       assert(fch);
+       memset(fch, 0, sizeof(fch_config_data_t));
+       fch->hashfuncs[0] = CMPH_HASH_JENKINS;
+       fch->hashfuncs[1] = CMPH_HASH_JENKINS;
+       fch->m = fch->b = 0;
+       fch->c = fch->p1 = fch->p2 = 0.0;
+       fch->g = NULL;
+       fch->h1 = NULL;
+       fch->h2 = NULL;
+       return fch;
+}
+
+void fch_config_destroy(cmph_config_t *mph)
+{
+       fch_config_data_t *data = (fch_config_data_t *)mph->data;
+       //DEBUGP("Destroying algorithm dependent data\n");
+       free(data);
+}
+
+void fch_config_set_hashfuncs(cmph_config_t *mph, CMPH_HASH *hashfuncs)
+{
+       fch_config_data_t *fch = (fch_config_data_t *)mph->data;
+       CMPH_HASH *hashptr = hashfuncs;
+       cmph_uint32 i = 0;
+       while(*hashptr != CMPH_HASH_COUNT)
+       {
+               if (i >= 2) break; //fch only uses two hash functions
+               fch->hashfuncs[i] = *hashptr;   
+               ++i, ++hashptr;
+       }
+}
+
+cmph_uint32 mixh10h11h12(cmph_uint32 b, double p1, double p2, cmph_uint32 initial_index)
+{
+       register cmph_uint32 int_p2 = (cmph_uint32)p2;
+       if (initial_index < p1)  initial_index %= int_p2;  /* h11 o h10 */
+       else { /* h12 o h10 */
+               initial_index %= b;
+               if(initial_index < p2) initial_index += int_p2;
+       }
+       return initial_index;
+}
+
+
+cmph_uint32 fch_calc_b(double c, cmph_uint32 m)
+{
+       return (cmph_uint32)ceil((c*m)/(log((double)m)/log(2.0) + 1));
+}
+
+double fch_calc_p1(cmph_uint32 m)
+{
+       return ceil(0.55*m);
+}
+
+double fch_calc_p2(cmph_uint32 b)
+{
+       return ceil(0.3*b);
+}
+
+static fch_buckets_t * mapping(cmph_config_t *mph)
+{
+       cmph_uint32 i = 0;
+       fch_buckets_t *buckets = NULL;
+       fch_config_data_t *fch = (fch_config_data_t *)mph->data;
+       if (fch->h1) hash_state_destroy(fch->h1);
+       fch->h1 = hash_state_new(fch->hashfuncs[0], fch->m);  
+       fch->b = fch_calc_b(fch->c, fch->m);
+       fch->p1 = fch_calc_p1(fch->m);
+       fch->p2 = fch_calc_p2(fch->b);
+       //DEBUGP("b:%u   p1:%f   p2:%f\n", fch->b, fch->p1, fch->p2);
+       buckets = fch_buckets_new(fch->b);
+
+       mph->key_source->rewind(mph->key_source->data);  
+       for(i = 0; i < fch->m; i++)
+       {
+               cmph_uint32 h1, keylen;
+               char *key = NULL;
+               mph->key_source->read(mph->key_source->data, &key, &keylen);    
+               h1 = hash(fch->h1, key, keylen) % fch->m;
+               h1 = mixh10h11h12 (fch->b, fch->p1, fch->p2, h1);
+               fch_buckets_insert(buckets, h1, key, keylen);
+               key = NULL; // transger memory ownership
+               
+       }
+       return buckets;  
+}
+
+
+// returns the buckets indexes sorted by their sizes. 
+static cmph_uint32 * ordering(fch_buckets_t * buckets)
+{
+  return fch_buckets_get_indexes_sorted_by_size(buckets);
+}
+
+/* Check whether function h2 causes collisions among the keys of each bucket */ 
+static cmph_uint8 check_for_collisions_h2(fch_config_data_t *fch, fch_buckets_t * buckets, cmph_uint32 *sorted_indexes)
+{
+       //cmph_uint32 max_size = fch_buckets_get_max_size(buckets);
+       cmph_uint8 * hashtable = (cmph_uint8 *)calloc((size_t)fch->m, sizeof(cmph_uint8));
+       cmph_uint32 nbuckets = fch_buckets_get_nbuckets(buckets);
+       cmph_uint32 i = 0, index = 0, j =0;
+       for (i = 0; i < nbuckets; i++)
+       {
+               cmph_uint32 nkeys = fch_buckets_get_size(buckets, sorted_indexes[i]);
+               memset(hashtable, 0, (size_t)fch->m);
+               //DEBUGP("bucket %u -- nkeys: %u\n", i, nkeys);
+               for (j = 0; j < nkeys; j++)
+               {
+                       char * key = fch_buckets_get_key(buckets, sorted_indexes[i], j);
+                       cmph_uint32 keylen = fch_buckets_get_keylength(buckets, sorted_indexes[i], j);
+                       index = hash(fch->h2, key, keylen) % fch->m;
+                       if(hashtable[index]) { // collision detected
+                               free(hashtable);
+                               return 1;
+                       }
+                       hashtable[index] = 1;
+               }
+       }
+       free(hashtable);
+       return 0;
+}
+
+static void permut(cmph_uint32 * vector, cmph_uint32 n)
+{ 
+  cmph_uint32 i, j, b;
+  for (i = 0; i < n; i++) {
+    j = (cmph_uint32) rand() % n;
+    b = vector[i];
+    vector[i] = vector[j];
+    vector[j] = b;
+  }
+}
+
+static cmph_uint8 searching(fch_config_data_t *fch, fch_buckets_t *buckets, cmph_uint32 *sorted_indexes)
+{
+       cmph_uint32 * random_table = (cmph_uint32 *) calloc((size_t)fch->m, sizeof(cmph_uint32));
+       cmph_uint32 * map_table    = (cmph_uint32 *) calloc((size_t)fch->m, sizeof(cmph_uint32));
+       cmph_uint32 iteration_to_generate_h2 = 0;
+       cmph_uint32 searching_iterations     = 0;
+       cmph_uint8 restart                   = 0;
+       cmph_uint32 nbuckets                 = fch_buckets_get_nbuckets(buckets);
+       cmph_uint32 i, j, z, counter = 0, filled_count = 0;
+       if (fch->g) free (fch->g);
+       fch->g = (cmph_uint32 *) calloc((size_t)fch->b, sizeof(cmph_uint32));
+
+       //DEBUGP("max bucket size: %u\n", fch_buckets_get_max_size(buckets));
+
+       for(i = 0; i < fch->m; i++)
+       {
+               random_table[i] = i;
+       }
+       permut(random_table, fch->m);
+       for(i = 0; i < fch->m; i++)
+       {
+               map_table[random_table[i]] = i;
+       }
+       do {   
+               if (fch->h2) hash_state_destroy(fch->h2);
+               fch->h2 = hash_state_new(fch->hashfuncs[1], fch->m);  
+               restart = check_for_collisions_h2(fch, buckets, sorted_indexes);
+               filled_count = 0;
+               if (!restart) 
+               {
+                       searching_iterations++; iteration_to_generate_h2 = 0;
+                       //DEBUGP("searching_iterations: %u\n", searching_iterations);
+               }
+               else {
+                       iteration_to_generate_h2++;
+                       //DEBUGP("iteration_to_generate_h2: %u\n", iteration_to_generate_h2);
+               }               
+               for(i = 0; (i < nbuckets) && !restart; i++) {
+                       cmph_uint32 bucketsize = fch_buckets_get_size(buckets, sorted_indexes[i]);
+                       if (bucketsize == 0)
+                       {
+                               restart = 0; // false
+                               break;
+                       }
+                       else restart = 1; // true
+                       for(z = 0; (z < (fch->m - filled_count)) && restart; z++) {
+                               char * key = fch_buckets_get_key(buckets, sorted_indexes[i], INDEX);
+                               cmph_uint32 keylen = fch_buckets_get_keylength(buckets, sorted_indexes[i], INDEX);
+                               cmph_uint32 h2 = hash(fch->h2, key, keylen) % fch->m;                           
+                               counter = 0; 
+                               restart = 0; // false
+                               fch->g[sorted_indexes[i]] = (fch->m + random_table[filled_count + z] - h2) % fch->m;
+                               //DEBUGP("g[%u]: %u\n", sorted_indexes[i], fch->g[sorted_indexes[i]]);
+                               j = INDEX;
+                               do {
+                                       cmph_uint32 index = 0;
+                                       key = fch_buckets_get_key(buckets, sorted_indexes[i], j);
+                                       keylen = fch_buckets_get_keylength(buckets, sorted_indexes[i], j);
+                                       h2 = hash(fch->h2, key, keylen) % fch->m;
+                                       index = (h2 + fch->g[sorted_indexes[i]]) % fch->m;
+                                       //DEBUGP("key:%s  keylen:%u  index: %u  h2:%u  bucketsize:%u\n", key, keylen, index, h2, bucketsize);
+                                       if (map_table[index] >= filled_count) {  
+                                               cmph_uint32 y  = map_table[index];
+                                               cmph_uint32 ry = random_table[y];
+                                               random_table[y] = random_table[filled_count];
+                                               random_table[filled_count] = ry;
+                                               map_table[random_table[y]] = y;
+                                               map_table[random_table[filled_count]] = filled_count;
+                                               filled_count++;
+                                               counter ++; 
+                                       }
+                                       else { 
+                                               restart = 1; // true
+                                               filled_count = filled_count - counter;
+                                               counter = 0; 
+                                               break;
+                                       }
+                                       j = (j + 1) % bucketsize;
+                               } while(j % bucketsize != INDEX); 
+                       }
+                       //getchar();
+               }              
+       } while(restart  && (searching_iterations < 10) && (iteration_to_generate_h2 < 1000));
+       free(map_table);
+       free(random_table);
+       return restart;
+}
+
+
+
+cmph_t *fch_new(cmph_config_t *mph, double c)
+{
+       cmph_t *mphf = NULL;
+       fch_data_t *fchf = NULL;
+       cmph_uint32 iterations = 100;
+       cmph_uint8 restart_mapping = 0;
+       fch_buckets_t * buckets = NULL;
+       cmph_uint32 * sorted_indexes = NULL;
+       fch_config_data_t *fch = (fch_config_data_t *)mph->data;
+       fch->m = mph->key_source->nkeys;
+       //DEBUGP("m: %f\n", fch->m);
+       if (c <= 2) c = 2.6; // validating restrictions over parameter c.
+       fch->c = c;
+       //DEBUGP("c: %f\n", fch->c);
+       fch->h1 = NULL;
+       fch->h2 = NULL;
+       fch->g = NULL;
+       do
+       {         
+               if (mph->verbosity)
+               {
+                       fprintf(stderr, "Entering mapping step for mph creation of %u keys\n", fch->m);
+               }
+               if (buckets) fch_buckets_destroy(buckets);
+               buckets = mapping(mph);
+               if (mph->verbosity)
+               {
+                       fprintf(stderr, "Starting ordering step\n");
+               }
+               if (sorted_indexes) free (sorted_indexes);
+               sorted_indexes = ordering(buckets);
+               if (mph->verbosity)
+               {
+                       fprintf(stderr, "Starting searching step.\n");
+               }
+               restart_mapping = searching(fch, buckets, sorted_indexes);
+               iterations--;
+               
+        } while(restart_mapping && iterations > 0);
+       if (buckets) fch_buckets_destroy(buckets);
+       if (sorted_indexes) free (sorted_indexes);
+       if (iterations == 0) return NULL;
+       mphf = (cmph_t *)malloc(sizeof(cmph_t));
+       mphf->algo = mph->algo;
+       fchf = (fch_data_t *)malloc(sizeof(fch_data_t));
+       fchf->g = fch->g;
+       fch->g = NULL; //transfer memory ownership
+       fchf->h1 = fch->h1;
+       fch->h1 = NULL; //transfer memory ownership
+       fchf->h2 = fch->h2;
+       fch->h2 = NULL; //transfer memory ownership
+       fchf->p2 = fch->p2;
+       fchf->p1 = fch->p1;
+       fchf->b = fch->b;
+       fchf->c = fch->c;
+       fchf->m = fch->m;
+       mphf->data = fchf;
+       mphf->size = fch->m;
+       //DEBUGP("Successfully generated minimal perfect hash\n");
+       if (mph->verbosity)
+       {
+               fprintf(stderr, "Successfully generated minimal perfect hash function\n");
+       }
+       return mphf;
+}
+
+int fch_dump(cmph_t *mphf, FILE *fd)
+{
+       char *buf = NULL;
+       cmph_uint32 buflen;
+       register size_t nbytes;
+       
+       fch_data_t *data = (fch_data_t *)mphf->data;
+       __cmph_dump(mphf, fd);
+
+       hash_state_dump(data->h1, &buf, &buflen);
+       //DEBUGP("Dumping hash state with %u bytes to disk\n", buflen);
+       nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd);
+       nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd);
+       free(buf);
+
+       hash_state_dump(data->h2, &buf, &buflen);
+       //DEBUGP("Dumping hash state with %u bytes to disk\n", buflen);
+       nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd);
+       nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd);
+       free(buf);
+
+       nbytes = fwrite(&(data->m), sizeof(cmph_uint32), (size_t)1, fd);
+       nbytes = fwrite(&(data->c), sizeof(double), (size_t)1, fd);
+       nbytes = fwrite(&(data->b), sizeof(cmph_uint32), (size_t)1, fd);
+       nbytes = fwrite(&(data->p1), sizeof(double), (size_t)1, fd);
+       nbytes = fwrite(&(data->p2), sizeof(double), (size_t)1, fd);
+       nbytes = fwrite(data->g, sizeof(cmph_uint32)*(data->b), (size_t)1, fd);
+       #ifdef DEBUG
+       cmph_uint32 i;
+       fprintf(stderr, "G: ");
+       for (i = 0; i < data->b; ++i) fprintf(stderr, "%u ", data->g[i]);
+       fprintf(stderr, "\n");
+       #endif
+       return 1;
+}
+
+void fch_load(FILE *f, cmph_t *mphf)
+{
+       char *buf = NULL;
+       cmph_uint32 buflen;
+       register size_t nbytes;
+       fch_data_t *fch = (fch_data_t *)malloc(sizeof(fch_data_t));
+
+       //DEBUGP("Loading fch mphf\n");
+       mphf->data = fch;
+       //DEBUGP("Reading h1\n");
+       fch->h1 = NULL;
+       nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f);
+       //DEBUGP("Hash state of h1 has %u bytes\n", buflen);
+       buf = (char *)malloc((size_t)buflen);
+       nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
+       fch->h1 = hash_state_load(buf, buflen);
+       free(buf);
+       
+       //DEBUGP("Loading fch mphf\n");
+       mphf->data = fch;
+       //DEBUGP("Reading h2\n");
+       fch->h2 = NULL;
+       nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f);
+       //DEBUGP("Hash state of h2 has %u bytes\n", buflen);
+       buf = (char *)malloc((size_t)buflen);
+       nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
+       fch->h2 = hash_state_load(buf, buflen);
+       free(buf);
+       
+       
+       //DEBUGP("Reading m and n\n");
+       nbytes = fread(&(fch->m), sizeof(cmph_uint32), (size_t)1, f);
+       nbytes = fread(&(fch->c), sizeof(double), (size_t)1, f);
+       nbytes = fread(&(fch->b), sizeof(cmph_uint32), (size_t)1, f);
+       nbytes = fread(&(fch->p1), sizeof(double), (size_t)1, f);
+       nbytes = fread(&(fch->p2), sizeof(double), (size_t)1, f);
+
+       fch->g = (cmph_uint32 *)malloc(sizeof(cmph_uint32)*fch->b);
+       nbytes = fread(fch->g, fch->b*sizeof(cmph_uint32), (size_t)1, f);
+       #ifdef DEBUG
+       cmph_uint32 i;
+       fprintf(stderr, "G: ");
+       for (i = 0; i < fch->b; ++i) fprintf(stderr, "%u ", fch->g[i]);
+       fprintf(stderr, "\n");
+       #endif
+       return;
+}
+
+cmph_uint32 fch_search(cmph_t *mphf, const char *key, cmph_uint32 keylen)
+{
+       fch_data_t *fch = mphf->data;
+       cmph_uint32 h1 = hash(fch->h1, key, keylen) % fch->m;
+       cmph_uint32 h2 = hash(fch->h2, key, keylen) % fch->m;
+       h1 = mixh10h11h12 (fch->b, fch->p1, fch->p2, h1);
+       //DEBUGP("key: %s h1: %u h2: %u  g[h1]: %u\n", key, h1, h2, fch->g[h1]);
+       return (h2 + fch->g[h1]) % fch->m;
+}
+void fch_destroy(cmph_t *mphf)
+{
+       fch_data_t *data = (fch_data_t *)mphf->data;
+       free(data->g);
+       hash_state_destroy(data->h1);
+       hash_state_destroy(data->h2);
+       free(data);
+       free(mphf);
+}
+
+/** \fn void fch_pack(cmph_t *mphf, void *packed_mphf);
+ *  \brief Support the ability to pack a perfect hash function into a preallocated contiguous memory space pointed by packed_mphf.
+ *  \param mphf pointer to the resulting mphf
+ *  \param packed_mphf pointer to the contiguous memory area used to store the resulting mphf. The size of packed_mphf must be at least cmph_packed_size() 
+ */
+void fch_pack(cmph_t *mphf, void *packed_mphf)
+{
+       fch_data_t *data = (fch_data_t *)mphf->data;
+       cmph_uint8 * ptr = packed_mphf;
+
+       // packing h1 type
+       CMPH_HASH h1_type = hash_get_type(data->h1);
+       *((cmph_uint32 *) ptr) = h1_type;
+       ptr += sizeof(cmph_uint32);
+
+       // packing h1
+       hash_state_pack(data->h1, ptr);
+       ptr += hash_state_packed_size(h1_type);
+
+       // packing h2 type
+       CMPH_HASH h2_type = hash_get_type(data->h2);
+       *((cmph_uint32 *) ptr) = h2_type;
+       ptr += sizeof(cmph_uint32);
+
+       // packing h2
+       hash_state_pack(data->h2, ptr);
+       ptr += hash_state_packed_size(h2_type);
+
+       // packing m
+       *((cmph_uint32 *) ptr) = data->m;
+       ptr += sizeof(data->m);
+
+       // packing b
+       *((cmph_uint32 *) ptr) = data->b;
+       ptr += sizeof(data->b);
+       
+       // packing p1
+       *((cmph_uint64 *)ptr) = (cmph_uint64)data->p1; 
+       ptr += sizeof(data->p1);
+
+       // packing p2
+       *((cmph_uint64 *)ptr) = (cmph_uint64)data->p2; 
+       ptr += sizeof(data->p2);
+
+       // packing g
+       memcpy(ptr, data->g, sizeof(cmph_uint32)*(data->b));    
+}
+
+/** \fn cmph_uint32 fch_packed_size(cmph_t *mphf);
+ *  \brief Return the amount of space needed to pack mphf.
+ *  \param mphf pointer to a mphf
+ *  \return the size of the packed function or zero for failures
+ */ 
+cmph_uint32 fch_packed_size(cmph_t *mphf)
+{
+       fch_data_t *data = (fch_data_t *)mphf->data;
+       CMPH_HASH h1_type = hash_get_type(data->h1); 
+       CMPH_HASH h2_type = hash_get_type(data->h2); 
+
+       return (cmph_uint32)(sizeof(CMPH_ALGO) + hash_state_packed_size(h1_type) + hash_state_packed_size(h2_type) + 
+                       4*sizeof(cmph_uint32) + 2*sizeof(double) + sizeof(cmph_uint32)*(data->b));
+}
+
+
+/** cmph_uint32 fch_search(void *packed_mphf, const char *key, cmph_uint32 keylen);
+ *  \brief Use the packed mphf to do a search. 
+ *  \param  packed_mphf pointer to the packed mphf
+ *  \param key key to be hashed
+ *  \param keylen key legth in bytes
+ *  \return The mphf value
+ */
+cmph_uint32 fch_search_packed(void *packed_mphf, const char *key, cmph_uint32 keylen)
+{
+       register cmph_uint8 *h1_ptr = packed_mphf;
+       register CMPH_HASH h1_type  = *((cmph_uint32 *)h1_ptr);
+       h1_ptr += 4;
+
+       register cmph_uint8 *h2_ptr = h1_ptr + hash_state_packed_size(h1_type);
+       register CMPH_HASH h2_type  = *((cmph_uint32 *)h2_ptr);
+       h2_ptr += 4;
+       
+       register cmph_uint32 *g_ptr = (cmph_uint32 *)(h2_ptr + hash_state_packed_size(h2_type));
+       
+       register cmph_uint32 m = *g_ptr++;  
+
+       register cmph_uint32 b = *g_ptr++;  
+
+       register double p1 = (double)(*((cmph_uint64 *)g_ptr));
+       g_ptr += 2;
+
+       register double p2 = (double)(*((cmph_uint64 *)g_ptr));
+       g_ptr += 2;
+
+       register cmph_uint32 h1 = hash_packed(h1_ptr, h1_type, key, keylen) % m; 
+       register cmph_uint32 h2 = hash_packed(h2_ptr, h2_type, key, keylen) % m;
+
+       h1 = mixh10h11h12 (b, p1, p2, h1);
+       return (h2 + g_ptr[h1]) % m;
+}
+
diff --git a/girepository/cmph/fch.h b/girepository/cmph/fch.h
new file mode 100644 (file)
index 0000000..9d13a1c
--- /dev/null
@@ -0,0 +1,48 @@
+#ifndef __CMPH_FCH_H__
+#define __CMPH_FCH_H__
+
+#include "cmph.h"
+
+typedef struct __fch_data_t fch_data_t;
+typedef struct __fch_config_data_t fch_config_data_t;
+
+/* Parameters calculation */
+cmph_uint32 fch_calc_b(double c, cmph_uint32 m);
+double fch_calc_p1(cmph_uint32 m);
+double fch_calc_p2(cmph_uint32 b);
+cmph_uint32 mixh10h11h12(cmph_uint32 b, double p1, double p2, cmph_uint32 initial_index);
+
+fch_config_data_t *fch_config_new(void);
+void fch_config_set_hashfuncs(cmph_config_t *mph, CMPH_HASH *hashfuncs);
+void fch_config_destroy(cmph_config_t *mph);
+cmph_t *fch_new(cmph_config_t *mph, double c);
+
+void fch_load(FILE *f, cmph_t *mphf);
+int fch_dump(cmph_t *mphf, FILE *f);
+void fch_destroy(cmph_t *mphf);
+cmph_uint32 fch_search(cmph_t *mphf, const char *key, cmph_uint32 keylen);
+
+/** \fn void fch_pack(cmph_t *mphf, void *packed_mphf);
+ *  \brief Support the ability to pack a perfect hash function into a preallocated contiguous memory space pointed by packed_mphf.
+ *  \param mphf pointer to the resulting mphf
+ *  \param packed_mphf pointer to the contiguous memory area used to store the resulting mphf. The size of packed_mphf must be at least cmph_packed_size() 
+ */
+void fch_pack(cmph_t *mphf, void *packed_mphf);
+
+/** \fn cmph_uint32 fch_packed_size(cmph_t *mphf);
+ *  \brief Return the amount of space needed to pack mphf.
+ *  \param mphf pointer to a mphf
+ *  \return the size of the packed function or zero for failures
+ */ 
+cmph_uint32 fch_packed_size(cmph_t *mphf);
+
+/** cmph_uint32 fch_search(void *packed_mphf, const char *key, cmph_uint32 keylen);
+ *  \brief Use the packed mphf to do a search. 
+ *  \param  packed_mphf pointer to the packed mphf
+ *  \param key key to be hashed
+ *  \param keylen key legth in bytes
+ *  \return The mphf value
+ */
+cmph_uint32 fch_search_packed(void *packed_mphf, const char *key, cmph_uint32 keylen);
+
+#endif
diff --git a/girepository/cmph/fch_buckets.c b/girepository/cmph/fch_buckets.c
new file mode 100644 (file)
index 0000000..a588f14
--- /dev/null
@@ -0,0 +1,214 @@
+#include "vqueue.h"
+#include "fch_buckets.h"
+#include <stdio.h>
+#include <assert.h>
+#include <stdlib.h>
+//#define DEBUG
+#include "debug.h"
+
+typedef struct __fch_bucket_entry_t
+{
+  char * value;
+  cmph_uint32 length;
+} fch_bucket_entry_t;
+
+typedef struct __fch_bucket_t
+{
+  fch_bucket_entry_t * entries;
+  cmph_uint32 capacity, size;
+} fch_bucket_t;
+
+
+
+static void fch_bucket_new(fch_bucket_t *bucket) 
+{
+       assert(bucket);
+       bucket->size = 0;
+       bucket->entries = NULL;
+       bucket->capacity = 0;
+}
+
+static void fch_bucket_destroy(fch_bucket_t *bucket)
+{
+       cmph_uint32 i;
+       assert(bucket);
+       for (i = 0; i < bucket->size; i++)
+       {
+               free((bucket->entries + i)->value);
+       }
+       free(bucket->entries);
+}
+
+
+static void fch_bucket_reserve(fch_bucket_t *bucket, cmph_uint32 size)
+{
+       assert(bucket);
+       if (bucket->capacity < size)
+       {
+               cmph_uint32 new_capacity = bucket->capacity + 1;
+               DEBUGP("Increasing current capacity %u to %u\n", bucket->capacity, size);
+               while (new_capacity < size)
+               {
+                       new_capacity *= 2;
+               }
+               bucket->entries = (fch_bucket_entry_t *)realloc(bucket->entries, sizeof(fch_bucket_entry_t)*new_capacity);
+               assert(bucket->entries);
+               bucket->capacity = new_capacity;
+               DEBUGP("Increased\n");
+       }
+}
+
+static void fch_bucket_insert(fch_bucket_t *bucket, char *val, cmph_uint32 val_length)
+{
+       assert(bucket);
+       fch_bucket_reserve(bucket, bucket->size + 1);
+       (bucket->entries + bucket->size)->value = val;
+       (bucket->entries + bucket->size)->length = val_length;
+       ++(bucket->size);
+}
+
+
+static cmph_uint8 fch_bucket_is_empty(fch_bucket_t *bucket)
+{
+       assert(bucket);
+       return (cmph_uint8)(bucket->size == 0);
+}
+
+static cmph_uint32 fch_bucket_size(fch_bucket_t *bucket)
+{
+       assert(bucket);
+       return bucket->size;
+}
+
+static char * fch_bucket_get_key(fch_bucket_t *bucket, cmph_uint32 index_key)
+{
+       assert(bucket); assert(index_key < bucket->size);
+       return (bucket->entries + index_key)->value;
+}
+
+static cmph_uint32 fch_bucket_get_length(fch_bucket_t *bucket, cmph_uint32 index_key)
+{
+       assert(bucket); assert(index_key < bucket->size);
+       return (bucket->entries + index_key)->length;
+}
+
+static void fch_bucket_print(fch_bucket_t * bucket, cmph_uint32 index)
+{
+       cmph_uint32 i;
+       assert(bucket);
+       fprintf(stderr, "Printing bucket %u ...\n", index);
+       for (i = 0; i < bucket->size; i++)
+       {
+               fprintf(stderr, "  key: %s\n", (bucket->entries + i)->value);
+       }
+}
+
+//////////////////////////////////////////////////////////////////////////////////////
+
+struct __fch_buckets_t
+{
+  fch_bucket_t * values;
+  cmph_uint32 nbuckets, max_size;
+  
+};
+
+fch_buckets_t * fch_buckets_new(cmph_uint32 nbuckets)
+{
+       cmph_uint32 i;
+       fch_buckets_t *buckets = (fch_buckets_t *)malloc(sizeof(fch_buckets_t));
+       assert(buckets);
+       buckets->values = (fch_bucket_t *)calloc((size_t)nbuckets, sizeof(fch_bucket_t));
+       for (i = 0; i < nbuckets; i++) fch_bucket_new(buckets->values + i); 
+       assert(buckets->values);
+       buckets->nbuckets = nbuckets;
+       buckets->max_size = 0;
+       return buckets;
+}
+
+cmph_uint8 fch_buckets_is_empty(fch_buckets_t * buckets, cmph_uint32 index)
+{
+       assert(index < buckets->nbuckets);
+       return fch_bucket_is_empty(buckets->values + index);
+}
+
+void fch_buckets_insert(fch_buckets_t * buckets, cmph_uint32 index, char * key, cmph_uint32 length)
+{
+       assert(index < buckets->nbuckets);
+       fch_bucket_insert(buckets->values + index, key, length);
+       if (fch_bucket_size(buckets->values + index) > buckets->max_size) 
+       {
+               buckets->max_size = fch_bucket_size(buckets->values + index);
+       }
+}
+
+cmph_uint32 fch_buckets_get_size(fch_buckets_t * buckets, cmph_uint32 index)
+{
+       assert(index < buckets->nbuckets);
+       return fch_bucket_size(buckets->values + index);
+}
+
+
+char * fch_buckets_get_key(fch_buckets_t * buckets, cmph_uint32 index, cmph_uint32 index_key)
+{
+       assert(index < buckets->nbuckets);
+       return fch_bucket_get_key(buckets->values + index, index_key);
+}
+
+cmph_uint32 fch_buckets_get_keylength(fch_buckets_t * buckets, cmph_uint32 index, cmph_uint32 index_key)
+{
+       assert(index < buckets->nbuckets);
+       return fch_bucket_get_length(buckets->values + index, index_key);
+}
+
+cmph_uint32 fch_buckets_get_max_size(fch_buckets_t * buckets)
+{
+       return buckets->max_size;
+}
+
+cmph_uint32 fch_buckets_get_nbuckets(fch_buckets_t * buckets)
+{
+       return buckets->nbuckets;
+}
+
+cmph_uint32 * fch_buckets_get_indexes_sorted_by_size(fch_buckets_t * buckets) 
+{
+       cmph_uint32 i = 0;
+       cmph_uint32 sum = 0, value;
+       cmph_uint32 *nbuckets_size = (cmph_uint32 *) calloc((size_t)buckets->max_size + 1, sizeof(cmph_uint32));
+       cmph_uint32 * sorted_indexes = (cmph_uint32 *) calloc((size_t)buckets->nbuckets, sizeof(cmph_uint32));
+       
+       // collect how many buckets for each size.
+       for(i = 0; i < buckets->nbuckets; i++) nbuckets_size[fch_bucket_size(buckets->values + i)] ++;
+       
+       // calculating offset considering a decreasing order of buckets size.
+       value = nbuckets_size[buckets->max_size];
+       nbuckets_size[buckets->max_size] = sum;
+       for(i = (int)buckets->max_size - 1; i >= 0; i--)
+       {
+               sum += value;
+               value = nbuckets_size[i];
+               nbuckets_size[i] = sum;
+               
+       }
+       for(i = 0; i < buckets->nbuckets; i++) 
+       {
+               sorted_indexes[nbuckets_size[fch_bucket_size(buckets->values + i)]] = (cmph_uint32)i;
+               nbuckets_size[fch_bucket_size(buckets->values + i)] ++;
+       }       
+       free(nbuckets_size);
+       return sorted_indexes;
+}
+
+void fch_buckets_print(fch_buckets_t * buckets)
+{
+       cmph_uint32 i;
+       for (i = 0; i < buckets->nbuckets; i++) fch_bucket_print(buckets->values + i, i);
+}
+
+void fch_buckets_destroy(fch_buckets_t * buckets)
+{
+       cmph_uint32 i;
+       for (i = 0; i < buckets->nbuckets; i++) fch_bucket_destroy(buckets->values + i); 
+       free(buckets->values);
+       free(buckets);
+}
diff --git a/girepository/cmph/fch_buckets.h b/girepository/cmph/fch_buckets.h
new file mode 100644 (file)
index 0000000..2a1b8b2
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef __CMPH_FCH_BUCKETS_H__
+#define __CMPH_FCH_BUCKETS_H__
+
+#include "cmph_types.h"
+typedef struct __fch_buckets_t fch_buckets_t;
+
+fch_buckets_t * fch_buckets_new(cmph_uint32 nbuckets);
+
+cmph_uint8 fch_buckets_is_empty(fch_buckets_t * buckets, cmph_uint32 index);
+
+void fch_buckets_insert(fch_buckets_t * buckets, cmph_uint32 index, char * key, cmph_uint32 length);
+
+cmph_uint32 fch_buckets_get_size(fch_buckets_t * buckets, cmph_uint32 index);
+
+char * fch_buckets_get_key(fch_buckets_t * buckets, cmph_uint32 index, cmph_uint32 index_key);
+
+cmph_uint32 fch_buckets_get_keylength(fch_buckets_t * buckets, cmph_uint32 index, cmph_uint32 index_key);
+
+// returns the size of biggest bucket.
+cmph_uint32 fch_buckets_get_max_size(fch_buckets_t * buckets);
+
+// returns the number of buckets.
+cmph_uint32 fch_buckets_get_nbuckets(fch_buckets_t * buckets);
+
+cmph_uint32 * fch_buckets_get_indexes_sorted_by_size(fch_buckets_t * buckets);
+
+void fch_buckets_print(fch_buckets_t * buckets);
+
+void fch_buckets_destroy(fch_buckets_t * buckets);
+#endif
diff --git a/girepository/cmph/fch_structs.h b/girepository/cmph/fch_structs.h
new file mode 100755 (executable)
index 0000000..fcd1555
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef __CMPH_FCH_STRUCTS_H__
+#define __CMPH_FCH_STRUCTS_H__
+
+#include "hash_state.h"
+
+struct __fch_data_t
+{
+       cmph_uint32 m;       // words count
+       double c;      // constant c
+       cmph_uint32  b;      // parameter b = ceil(c*m/(log(m)/log(2) + 1)). Don't need to be stored 
+       double p1;     // constant p1 = ceil(0.6*m). Don't need to be stored 
+       double p2;     // constant p2 = ceil(0.3*b). Don't need to be stored 
+       cmph_uint32 *g;      // g function. 
+       hash_state_t *h1;    // h10 function. 
+       hash_state_t *h2;    // h20 function.
+};
+
+struct __fch_config_data_t
+{
+       CMPH_HASH hashfuncs[2];
+       cmph_uint32 m;       // words count
+       double c;      // constant c
+       cmph_uint32  b;      // parameter b = ceil(c*m/(log(m)/log(2) + 1)). Don't need to be stored 
+       double p1;     // constant p1 = ceil(0.6*m). Don't need to be stored 
+       double p2;     // constant p2 = ceil(0.3*b). Don't need to be stored 
+       cmph_uint32 *g;      // g function. 
+       hash_state_t *h1;    // h10 function. 
+       hash_state_t *h2;    // h20 function.
+};
+#endif
diff --git a/girepository/cmph/graph.c b/girepository/cmph/graph.c
new file mode 100644 (file)
index 0000000..c29fd8b
--- /dev/null
@@ -0,0 +1,338 @@
+#include "graph.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <limits.h>
+#include <assert.h>
+#include <string.h>
+#include "vstack.h"
+#include "bitbool.h"
+
+//#define DEBUG
+#include "debug.h"
+
+/* static const cmph_uint8 bitmask[8] = { 1, 1 << 1, 1 << 2, 1 << 3, 1 << 4, 1 << 5, 1 << 6, 1 << 7 }; */
+/* #define GETBIT(array, i) (array[(i) / 8] & bitmask[(i) % 8]) */
+/* #define SETBIT(array, i) (array[(i) / 8] |= bitmask[(i) % 8]) */
+/* #define UNSETBIT(array, i) (array[(i) / 8] &= (~(bitmask[(i) % 8]))) */
+
+#define abs_edge(e, i) (e % g->nedges + i * g->nedges)
+
+struct __graph_t
+{
+       cmph_uint32 nnodes;
+       cmph_uint32 nedges;
+       cmph_uint32 *edges;
+       cmph_uint32 *first;
+       cmph_uint32 *next;
+        cmph_uint8  *critical_nodes;   /* included -- Fabiano*/
+        cmph_uint32 ncritical_nodes;   /* included -- Fabiano*/
+       cmph_uint32 cedges;
+       int shrinking;
+};
+
+static cmph_uint32 EMPTY = UINT_MAX;
+
+graph_t *graph_new(cmph_uint32 nnodes, cmph_uint32 nedges)
+{
+       graph_t *graph = (graph_t *)malloc(sizeof(graph_t));
+       if (!graph) return NULL;
+
+       graph->edges = (cmph_uint32 *)malloc(sizeof(cmph_uint32) * 2 * nedges);
+       graph->next =  (cmph_uint32 *)malloc(sizeof(cmph_uint32) * 2 * nedges);
+       graph->first = (cmph_uint32 *)malloc(sizeof(cmph_uint32) * nnodes);
+        graph->critical_nodes = NULL; /* included -- Fabiano*/
+       graph->ncritical_nodes = 0;   /* included -- Fabiano*/
+       graph->nnodes = nnodes;
+       graph->nedges = nedges;
+
+       graph_clear_edges(graph);
+       return graph;
+}
+
+
+void graph_destroy(graph_t *graph)
+{
+       DEBUGP("Destroying graph\n");
+       free(graph->edges);
+       free(graph->first);
+       free(graph->next);
+        free(graph->critical_nodes); /* included -- Fabiano*/
+       free(graph);
+       return;
+}
+
+void graph_print(graph_t *g)
+{
+       cmph_uint32 i, e;
+       for (i = 0; i < g->nnodes; ++i)
+       {
+               DEBUGP("Printing edges connected to %u\n", i);
+               e = g->first[i];
+               if (e != EMPTY)
+               {
+                       printf("%u -> %u\n", g->edges[abs_edge(e, 0)], g->edges[abs_edge(e, 1)]);
+                       while ((e = g->next[e]) != EMPTY)
+                       {
+                               printf("%u -> %u\n", g->edges[abs_edge(e, 0)], g->edges[abs_edge(e, 1)]);
+                       }
+               }
+                       
+       }
+       return;
+}
+
+void graph_add_edge(graph_t *g, cmph_uint32 v1, cmph_uint32 v2)
+{
+       cmph_uint32 e = g->cedges;
+
+       assert(v1 < g->nnodes);
+       assert(v2 < g->nnodes);
+       assert(e < g->nedges);
+       assert(!g->shrinking);
+
+       g->next[e] = g->first[v1];
+       g->first[v1] = e;
+       g->edges[e] = v2;
+
+       g->next[e + g->nedges] = g->first[v2];
+       g->first[v2] = e + g->nedges;
+       g->edges[e + g->nedges] = v1;
+
+       ++(g->cedges);
+}
+
+static int check_edge(graph_t *g, cmph_uint32 e, cmph_uint32 v1, cmph_uint32 v2)
+{
+       DEBUGP("Checking edge %u %u looking for %u %u\n", g->edges[abs_edge(e, 0)], g->edges[abs_edge(e, 1)], v1, v2);
+       if (g->edges[abs_edge(e, 0)] == v1 && g->edges[abs_edge(e, 1)] == v2) return 1;
+       if (g->edges[abs_edge(e, 0)] == v2 && g->edges[abs_edge(e, 1)] == v1) return 1;
+       return 0;
+}
+
+cmph_uint32 graph_edge_id(graph_t *g, cmph_uint32 v1, cmph_uint32 v2)
+{
+       cmph_uint32 e;
+       e = g->first[v1];
+       assert(e != EMPTY);
+       if (check_edge(g, e, v1, v2)) return abs_edge(e, 0);
+       do
+       {
+               e = g->next[e];
+               assert(e != EMPTY);
+       }
+       while (!check_edge(g, e, v1, v2));
+       return abs_edge(e, 0);
+}
+static void del_edge_point(graph_t *g, cmph_uint32 v1, cmph_uint32 v2)
+{
+       cmph_uint32 e, prev;
+
+       DEBUGP("Deleting edge point %u %u\n", v1, v2);
+       e = g->first[v1];
+       if (check_edge(g, e, v1, v2)) 
+       {
+               g->first[v1] = g->next[e];
+               //g->edges[e] = EMPTY;
+               DEBUGP("Deleted\n");
+               return;
+       }
+       DEBUGP("Checking linked list\n");
+       do
+       {
+               prev = e;
+               e = g->next[e];
+               assert(e != EMPTY);
+       }
+       while (!check_edge(g, e, v1, v2));
+
+       g->next[prev] = g->next[e];
+       //g->edges[e] = EMPTY;
+       DEBUGP("Deleted\n");
+}
+
+       
+void graph_del_edge(graph_t *g, cmph_uint32 v1, cmph_uint32 v2)
+{
+       g->shrinking = 1;
+       del_edge_point(g, v1, v2);
+       del_edge_point(g, v2, v1);
+}
+
+void graph_clear_edges(graph_t *g)
+{
+       cmph_uint32 i;
+       for (i = 0; i < g->nnodes; ++i) g->first[i] = EMPTY;
+       for (i = 0; i < g->nedges*2; ++i) 
+       {
+               g->edges[i] = EMPTY;
+               g->next[i] = EMPTY;
+       }
+       g->cedges = 0;
+       g->shrinking = 0;
+}
+
+static cmph_uint8 find_degree1_edge(graph_t *g, cmph_uint32 v, cmph_uint8 *deleted, cmph_uint32 *e)
+{
+       cmph_uint32 edge = g->first[v];
+       cmph_uint8 found = 0;
+       DEBUGP("Checking degree of vertex %u\n", v);
+       if (edge == EMPTY) return 0;
+       else if (!(GETBIT(deleted, abs_edge(edge, 0)))) 
+       {
+               found = 1;
+               *e = edge;
+       }
+       while(1)
+       {
+               edge = g->next[edge];
+               if (edge == EMPTY) break;
+               if (GETBIT(deleted, abs_edge(edge, 0))) continue;
+               if (found) return 0;
+               DEBUGP("Found first edge\n");
+               *e = edge;
+               found = 1;
+       }
+       return found;
+}
+
+static void cyclic_del_edge(graph_t *g, cmph_uint32 v, cmph_uint8 *deleted)
+{
+
+       cmph_uint32 e = 0;
+       cmph_uint8 degree1;
+       cmph_uint32 v1 = v;
+       cmph_uint32 v2 = 0;
+
+       degree1 = find_degree1_edge(g, v1, deleted, &e);
+       if (!degree1) return;
+       while(1) 
+       {
+               DEBUGP("Deleting edge %u (%u->%u)\n", e, g->edges[abs_edge(e, 0)], g->edges[abs_edge(e, 1)]);
+               SETBIT(deleted, abs_edge(e, 0));
+               
+               v2 = g->edges[abs_edge(e, 0)];
+               if (v2 == v1) v2 = g->edges[abs_edge(e, 1)];
+
+               DEBUGP("Checking if second endpoint %u has degree 1\n", v2); 
+               degree1 = find_degree1_edge(g, v2, deleted, &e);
+               if (degree1) 
+               {
+                       DEBUGP("Inspecting vertex %u\n", v2);
+                       v1 = v2;
+               }
+               else break;
+       }
+}
+
+int graph_is_cyclic(graph_t *g)
+{
+       cmph_uint32 i;
+       cmph_uint32 v;
+       cmph_uint8 *deleted = (cmph_uint8 *)malloc((g->nedges*sizeof(cmph_uint8))/8 + 1);
+       size_t deleted_len = g->nedges/8 + 1;
+       memset(deleted, 0, deleted_len);
+
+       DEBUGP("Looking for cycles in graph with %u vertices and %u edges\n", g->nnodes, g->nedges);
+       for (v = 0; v < g->nnodes; ++v)
+       {
+               cyclic_del_edge(g, v, deleted);
+       }
+       for (i = 0; i < g->nedges; ++i)
+       {
+               if (!(GETBIT(deleted, i))) 
+               {
+                       DEBUGP("Edge %u %u->%u was not deleted\n", i, g->edges[i], g->edges[i + g->nedges]);
+                       free(deleted);
+                       return 1;
+               }
+       }
+       free(deleted);
+       return 0;
+}
+
+cmph_uint8 graph_node_is_critical(graph_t * g, cmph_uint32 v) /* included -- Fabiano */
+{
+        return (cmph_uint8)GETBIT(g->critical_nodes,v);
+}
+
+void graph_obtain_critical_nodes(graph_t *g) /* included -- Fabiano*/
+{
+        cmph_uint32 i;
+       cmph_uint32 v;
+       cmph_uint8 *deleted = (cmph_uint8 *)malloc((g->nedges*sizeof(cmph_uint8))/8+1);
+       size_t deleted_len = g->nedges/8 + 1;
+       memset(deleted, 0, deleted_len);
+       free(g->critical_nodes);
+       g->critical_nodes = (cmph_uint8 *)malloc((g->nnodes*sizeof(cmph_uint8))/8 + 1);
+       g->ncritical_nodes = 0;
+       memset(g->critical_nodes, 0, (g->nnodes*sizeof(cmph_uint8))/8 + 1);
+       DEBUGP("Looking for the 2-core in graph with %u vertices and %u edges\n", g->nnodes, g->nedges);
+       for (v = 0; v < g->nnodes; ++v)
+       {
+               cyclic_del_edge(g, v, deleted);
+       }
+
+       for (i = 0; i < g->nedges; ++i)
+       {
+               if (!(GETBIT(deleted,i))) 
+               {
+                       DEBUGP("Edge %u %u->%u belongs to the 2-core\n", i, g->edges[i], g->edges[i + g->nedges]);
+                       if(!(GETBIT(g->critical_nodes,g->edges[i]))) 
+                       {
+                         g->ncritical_nodes ++;
+                         SETBIT(g->critical_nodes,g->edges[i]);
+                       }
+                       if(!(GETBIT(g->critical_nodes,g->edges[i + g->nedges]))) 
+                       {
+                         g->ncritical_nodes ++;
+                         SETBIT(g->critical_nodes,g->edges[i + g->nedges]);
+                       }
+               }
+       }
+       free(deleted);
+}
+
+cmph_uint8 graph_contains_edge(graph_t *g, cmph_uint32 v1, cmph_uint32 v2) /* included -- Fabiano*/
+{
+       cmph_uint32 e;
+       e = g->first[v1];
+       if(e == EMPTY) return 0;
+       if (check_edge(g, e, v1, v2)) return 1;
+       do
+       {
+               e = g->next[e];
+               if(e == EMPTY) return 0;
+       }
+       while (!check_edge(g, e, v1, v2));
+       return 1;
+}
+
+cmph_uint32 graph_vertex_id(graph_t *g, cmph_uint32 e, cmph_uint32 id) /* included -- Fabiano*/
+{
+  return (g->edges[e + id*g->nedges]);
+}
+
+cmph_uint32 graph_ncritical_nodes(graph_t *g) /* included -- Fabiano*/
+{
+  return g->ncritical_nodes;
+}
+
+graph_iterator_t graph_neighbors_it(graph_t *g, cmph_uint32 v)
+{
+       graph_iterator_t it;
+       it.vertex = v;
+       it.edge = g->first[v];
+       return it;
+}
+cmph_uint32 graph_next_neighbor(graph_t *g, graph_iterator_t* it)
+{
+       cmph_uint32 ret;
+       if(it->edge == EMPTY) return GRAPH_NO_NEIGHBOR; 
+       if (g->edges[it->edge] == it->vertex) ret = g->edges[it->edge + g->nedges];
+       else ret = g->edges[it->edge];
+       it->edge = g->next[it->edge];
+       return ret;
+}
+       
+
diff --git a/girepository/cmph/graph.h b/girepository/cmph/graph.h
new file mode 100644 (file)
index 0000000..e1b5de6
--- /dev/null
@@ -0,0 +1,40 @@
+#ifndef _CMPH_GRAPH_H__
+#define _CMPH_GRAPH_H__
+
+#include <limits.h>
+#include "cmph_types.h"
+
+#define GRAPH_NO_NEIGHBOR UINT_MAX
+
+typedef struct __graph_t graph_t;
+typedef struct __graph_iterator_t graph_iterator_t;
+struct __graph_iterator_t
+{
+       cmph_uint32 vertex;
+       cmph_uint32 edge;
+};
+
+
+
+graph_t *graph_new(cmph_uint32 nnodes, cmph_uint32 nedges);
+void graph_destroy(graph_t *graph);
+
+void graph_add_edge(graph_t *g, cmph_uint32 v1, cmph_uint32 v2);
+void graph_del_edge(graph_t *g, cmph_uint32 v1, cmph_uint32 v2);
+void graph_clear_edges(graph_t *g);
+cmph_uint32 graph_edge_id(graph_t *g, cmph_uint32 v1, cmph_uint32 v2);
+cmph_uint8 graph_contains_edge(graph_t *g, cmph_uint32 v1, cmph_uint32 v2);
+
+graph_iterator_t graph_neighbors_it(graph_t *g, cmph_uint32 v);
+cmph_uint32 graph_next_neighbor(graph_t *g, graph_iterator_t* it);
+
+void graph_obtain_critical_nodes(graph_t *g);            /* included -- Fabiano*/
+cmph_uint8 graph_node_is_critical(graph_t * g, cmph_uint32 v);     /* included -- Fabiano */
+cmph_uint32 graph_ncritical_nodes(graph_t *g);                /* included -- Fabiano*/
+cmph_uint32 graph_vertex_id(graph_t *g, cmph_uint32 e, cmph_uint32 id); /* included -- Fabiano*/
+
+int graph_is_cyclic(graph_t *g);
+
+void graph_print(graph_t *);
+
+#endif
diff --git a/girepository/cmph/hash.c b/girepository/cmph/hash.c
new file mode 100644 (file)
index 0000000..be86d6e
--- /dev/null
@@ -0,0 +1,216 @@
+#include "hash_state.h"
+#include <stdlib.h>
+#include <assert.h>
+#include <limits.h>
+#include <string.h>
+
+//#define DEBUG
+#include "debug.h"
+
+const char *cmph_hash_names[] = { "jenkins", NULL };
+
+hash_state_t *hash_state_new(CMPH_HASH hashfunc, cmph_uint32 hashsize)
+{
+       hash_state_t *state = NULL;
+       switch (hashfunc)
+       {
+               case CMPH_HASH_JENKINS:
+                       DEBUGP("Jenkins function - %u\n", hashsize);
+                       state = (hash_state_t *)jenkins_state_new(hashsize);
+                       DEBUGP("Jenkins function created\n");
+                       break;
+               default:
+                       assert(0);
+       }
+       state->hashfunc = hashfunc;
+       return state;
+}
+cmph_uint32 hash(hash_state_t *state, const char *key, cmph_uint32 keylen)
+{
+       switch (state->hashfunc)
+       {
+               case CMPH_HASH_JENKINS:
+                       return jenkins_hash((jenkins_state_t *)state, key, keylen);
+               default:
+                       assert(0);
+       }
+       assert(0);
+       return 0;
+}
+
+void hash_vector(hash_state_t *state, const char *key, cmph_uint32 keylen, cmph_uint32 * hashes)
+{
+       switch (state->hashfunc)
+       {
+               case CMPH_HASH_JENKINS:
+                       jenkins_hash_vector_((jenkins_state_t *)state, key, keylen, hashes);
+                       break;
+               default:
+                       assert(0);
+       }
+}
+
+
+void hash_state_dump(hash_state_t *state, char **buf, cmph_uint32 *buflen)
+{
+       char *algobuf;
+       size_t len;
+       switch (state->hashfunc)
+       {
+               case CMPH_HASH_JENKINS:
+                       jenkins_state_dump((jenkins_state_t *)state, &algobuf, buflen);
+                       if (*buflen == UINT_MAX) return;
+                       break;
+               default:
+                       assert(0);
+       }
+       *buf = (char *)malloc(strlen(cmph_hash_names[state->hashfunc]) + 1 + *buflen);
+       memcpy(*buf, cmph_hash_names[state->hashfunc], strlen(cmph_hash_names[state->hashfunc]) + 1);
+       DEBUGP("Algobuf is %u\n", *(cmph_uint32 *)algobuf);
+       len = *buflen;
+       memcpy(*buf + strlen(cmph_hash_names[state->hashfunc]) + 1, algobuf, len);
+       *buflen  = (cmph_uint32)strlen(cmph_hash_names[state->hashfunc]) + 1 + *buflen;
+       free(algobuf);
+       return;
+}
+
+hash_state_t * hash_state_copy(hash_state_t *src_state)
+{
+       hash_state_t *dest_state = NULL;
+       switch (src_state->hashfunc)
+       {
+               case CMPH_HASH_JENKINS:
+                       dest_state = (hash_state_t *)jenkins_state_copy((jenkins_state_t *)src_state);
+                       break;
+               default:
+                       assert(0);
+       }
+       dest_state->hashfunc = src_state->hashfunc;
+       return dest_state;
+}
+
+hash_state_t *hash_state_load(const char *buf, cmph_uint32 buflen)
+{
+       cmph_uint32 i;
+       cmph_uint32 offset;
+       CMPH_HASH hashfunc = CMPH_HASH_COUNT;
+       for (i = 0; i < CMPH_HASH_COUNT; ++i)
+       {
+               if (strcmp(buf, cmph_hash_names[i]) == 0)
+               {
+                       hashfunc = i;
+                       break;
+               }
+       }
+       if (hashfunc == CMPH_HASH_COUNT) return NULL;
+       offset = (cmph_uint32)strlen(cmph_hash_names[hashfunc]) + 1;
+       switch (hashfunc)
+       {
+               case CMPH_HASH_JENKINS:
+                       return (hash_state_t *)jenkins_state_load(buf + offset, buflen - offset);
+               default:
+                       return NULL;
+       }
+       return NULL;
+}
+void hash_state_destroy(hash_state_t *state)
+{
+       switch (state->hashfunc)
+       {
+               case CMPH_HASH_JENKINS:
+                       jenkins_state_destroy((jenkins_state_t *)state);
+                       break;
+               default:
+                       assert(0);
+       }
+       return;
+}
+
+/** \fn void hash_state_pack(hash_state_t *state, void *hash_packed)
+ *  \brief Support the ability to pack a hash function into a preallocated contiguous memory space pointed by hash_packed.
+ *  \param state points to the hash function
+ *  \param hash_packed pointer to the contiguous memory area used to store the hash function. The size of hash_packed must be at least hash_state_packed_size()
+ *  
+ * Support the ability to pack a hash function into a preallocated contiguous memory space pointed by hash_packed.
+ * However, the hash function type must be packed outside.
+ */
+void hash_state_pack(hash_state_t *state, void *hash_packed)
+{
+       switch (state->hashfunc)
+       {
+               case CMPH_HASH_JENKINS:
+                       // pack the jenkins hash function                       
+                       jenkins_state_pack((jenkins_state_t *)state, hash_packed);
+                       break;
+               default:
+                       assert(0);
+       }
+       return; 
+}
+
+/** \fn cmph_uint32 hash_state_packed_size(CMPH_HASH hashfunc)
+ *  \brief Return the amount of space needed to pack a hash function.
+ *  \param hashfunc function type
+ *  \return the size of the packed function or zero for failures
+ */ 
+cmph_uint32 hash_state_packed_size(CMPH_HASH hashfunc)
+{
+       cmph_uint32 size = 0;
+       switch (hashfunc)
+       {
+               case CMPH_HASH_JENKINS:
+                       size += jenkins_state_packed_size();
+                       break;
+               default:
+                       assert(0);
+       }
+       return size;
+}
+
+/** \fn cmph_uint32 hash_packed(void *hash_packed, CMPH_HASH hashfunc, const char *k, cmph_uint32 keylen)
+ *  \param hash_packed is a pointer to a contiguous memory area
+ *  \param hashfunc is the type of the hash function packed in hash_packed
+ *  \param key is a pointer to a key
+ *  \param keylen is the key length
+ *  \return an integer that represents a hash value of 32 bits.
+ */
+cmph_uint32 hash_packed(void *hash_packed, CMPH_HASH hashfunc, const char *k, cmph_uint32 keylen)
+{
+       switch (hashfunc)
+       {
+               case CMPH_HASH_JENKINS:
+                       return jenkins_hash_packed(hash_packed, k, keylen);
+               default:
+                       assert(0);
+       }
+       assert(0);
+       return 0;
+}
+
+/** \fn hash_vector_packed(void *hash_packed, CMPH_HASH hashfunc, const char *k, cmph_uint32 keylen, cmph_uint32 * hashes)
+ *  \param hash_packed is a pointer to a contiguous memory area
+ *  \param key is a pointer to a key
+ *  \param keylen is the key length
+ *  \param hashes is a pointer to a memory large enough to fit three 32-bit integers.
+ */
+void hash_vector_packed(void *hash_packed, CMPH_HASH hashfunc, const char *k, cmph_uint32 keylen, cmph_uint32 * hashes)
+{              
+       switch (hashfunc)
+       {
+               case CMPH_HASH_JENKINS:
+                       jenkins_hash_vector_packed(hash_packed, k, keylen, hashes);
+                       break;
+               default:
+                       assert(0);
+       }
+}
+
+
+/** \fn CMPH_HASH hash_get_type(hash_state_t *state);
+ *  \param state is a pointer to a hash_state_t structure
+ *  \return the hash function type pointed by state
+ */
+CMPH_HASH hash_get_type(hash_state_t *state)
+{
+       return state->hashfunc;
+}
diff --git a/girepository/cmph/hash.h b/girepository/cmph/hash.h
new file mode 100644 (file)
index 0000000..0ec4ce1
--- /dev/null
@@ -0,0 +1,76 @@
+#ifndef __CMPH_HASH_H__
+#define __CMPH_HASH_H__
+
+#include "cmph_types.h"
+
+typedef union __hash_state_t hash_state_t;
+
+hash_state_t *hash_state_new(CMPH_HASH, cmph_uint32 hashsize);
+
+/** \fn cmph_uint32 hash(hash_state_t *state, const char *key, cmph_uint32 keylen);
+ *  \param state is a pointer to a hash_state_t structure
+ *  \param key is a pointer to a key
+ *  \param keylen is the key length
+ *  \return an integer that represents a hash value of 32 bits.
+ */
+cmph_uint32 hash(hash_state_t *state, const char *key, cmph_uint32 keylen);
+
+/** \fn void hash_vector(hash_state_t *state, const char *key, cmph_uint32 keylen, cmph_uint32 * hashes);
+ *  \param state is a pointer to a hash_state_t structure
+ *  \param key is a pointer to a key
+ *  \param keylen is the key length
+ *  \param hashes is a pointer to a memory large enough to fit three 32-bit integers.
+ */
+void hash_vector(hash_state_t *state, const char *key, cmph_uint32 keylen, cmph_uint32 * hashes);
+
+void hash_state_dump(hash_state_t *state, char **buf, cmph_uint32 *buflen);
+
+hash_state_t * hash_state_copy(hash_state_t *src_state);
+
+hash_state_t *hash_state_load(const char *buf, cmph_uint32 buflen);
+
+void hash_state_destroy(hash_state_t *state);
+
+/** \fn void hash_state_pack(hash_state_t *state, void *hash_packed);
+ *  \brief Support the ability to pack a hash function into a preallocated contiguous memory space pointed by hash_packed.
+ *  \param state points to the hash function
+ *  \param hash_packed pointer to the contiguous memory area used to store the hash function. The size of hash_packed must be at least hash_state_packed_size()
+ *  
+ * Support the ability to pack a hash function into a preallocated contiguous memory space pointed by hash_packed.
+ * However, the hash function type must be packed outside.
+ */
+void hash_state_pack(hash_state_t *state, void *hash_packed);
+
+/** \fn cmph_uint32 hash_packed(void *hash_packed, CMPH_HASH hashfunc, const char *k, cmph_uint32 keylen);
+ *  \param hash_packed is a pointer to a contiguous memory area
+ *  \param hashfunc is the type of the hash function packed in hash_packed
+ *  \param key is a pointer to a key
+ *  \param keylen is the key length
+ *  \return an integer that represents a hash value of 32 bits.
+ */
+cmph_uint32 hash_packed(void *hash_packed, CMPH_HASH hashfunc, const char *k, cmph_uint32 keylen);
+
+/** \fn cmph_uint32 hash_state_packed_size(CMPH_HASH hashfunc)
+ *  \brief Return the amount of space needed to pack a hash function.
+ *  \param hashfunc function type
+ *  \return the size of the packed function or zero for failures
+ */ 
+cmph_uint32 hash_state_packed_size(CMPH_HASH hashfunc);
+
+
+/** \fn hash_vector_packed(void *hash_packed, CMPH_HASH hashfunc, const char *k, cmph_uint32 keylen, cmph_uint32 * hashes);
+ *  \param hash_packed is a pointer to a contiguous memory area
+ *  \param key is a pointer to a key
+ *  \param keylen is the key length
+ *  \param hashes is a pointer to a memory large enough to fit three 32-bit integers.
+ */
+void hash_vector_packed(void *hash_packed, CMPH_HASH hashfunc, const char *k, cmph_uint32 keylen, cmph_uint32 * hashes);
+
+
+/** \fn CMPH_HASH hash_get_type(hash_state_t *state);
+ *  \param state is a pointer to a hash_state_t structure
+ *  \return the hash function type pointed by state
+ */
+CMPH_HASH hash_get_type(hash_state_t *state);
+
+#endif
diff --git a/girepository/cmph/hash_state.h b/girepository/cmph/hash_state.h
new file mode 100644 (file)
index 0000000..1b567dc
--- /dev/null
@@ -0,0 +1,12 @@
+#ifndef __HASH_STATE_H__
+#define __HASH_STATE_H__
+
+#include "hash.h"
+#include "jenkins_hash.h"
+union __hash_state_t
+{
+       CMPH_HASH hashfunc;
+       jenkins_state_t jenkins;
+};
+
+#endif
diff --git a/girepository/cmph/jenkins_hash.c b/girepository/cmph/jenkins_hash.c
new file mode 100644 (file)
index 0000000..65cdff9
--- /dev/null
@@ -0,0 +1,297 @@
+#include "jenkins_hash.h"
+#include <stdlib.h>
+#ifdef WIN32
+#define _USE_MATH_DEFINES //For M_LOG2E
+#endif
+#include <math.h>
+#include <limits.h>
+#include <string.h>
+
+//#define DEBUG
+#include "debug.h"
+
+#define hashsize(n) ((cmph_uint32)1<<(n))
+#define hashmask(n) (hashsize(n)-1)
+
+
+
+//#define NM2 /* Define this if you do not want power of 2 table sizes*/
+
+
+/*
+   --------------------------------------------------------------------
+   mix -- mix 3 32-bit values reversibly.
+   For every delta with one or two bits set, and the deltas of all three
+   high bits or all three low bits, whether the original value of a,b,c
+   is almost all zero or is uniformly distributed,
+ * If mix() is run forward or backward, at least 32 bits in a,b,c
+ have at least 1/4 probability of changing.
+ * If mix() is run forward, every bit of c will change between 1/3 and
+ 2/3 of the time.  (Well, 22/100 and 78/100 for some 2-bit deltas.)
+ mix() was built out of 36 single-cycle latency instructions in a 
+ structure that could supported 2x parallelism, like so:
+ a -= b; 
+ a -= c; x = (c>>13);
+ b -= c; a ^= x;
+ b -= a; x = (a<<8);
+ c -= a; b ^= x;
+ c -= b; x = (b>>13);
+ ...
+ Unfortunately, superscalar Pentiums and Sparcs can't take advantage 
+ of that parallelism.  They've also turned some of those single-cycle
+ latency instructions into multi-cycle latency instructions.  Still,
+ this is the fastest good hash I could find.  There were about 2^^68
+ to choose from.  I only looked at a billion or so.
+ --------------------------------------------------------------------
+ */
+#define mix(a,b,c) \
+{ \
+       a -= b; a -= c; a ^= (c>>13); \
+       b -= c; b -= a; b ^= (a<<8); \
+       c -= a; c -= b; c ^= (b>>13); \
+       a -= b; a -= c; a ^= (c>>12);  \
+       b -= c; b -= a; b ^= (a<<16); \
+       c -= a; c -= b; c ^= (b>>5); \
+       a -= b; a -= c; a ^= (c>>3);  \
+       b -= c; b -= a; b ^= (a<<10); \
+       c -= a; c -= b; c ^= (b>>15); \
+}
+
+/*
+   --------------------------------------------------------------------
+   hash() -- hash a variable-length key into a 32-bit value
+k       : the key (the unaligned variable-length array of bytes)
+len     : the length of the key, counting by bytes
+initval : can be any 4-byte value
+Returns a 32-bit value.  Every bit of the key affects every bit of
+the return value.  Every 1-bit and 2-bit delta achieves avalanche.
+About 6*len+35 instructions.
+
+The best hash table sizes are powers of 2.  There is no need to do
+mod a prime (mod is sooo slow!).  If you need less than 32 bits,
+use a bitmask.  For example, if you need only 10 bits, do
+h = (h & hashmask(10));
+In which case, the hash table should have hashsize(10) elements.
+
+If you are hashing n strings (cmph_uint8 **)k, do it like this:
+for (i=0, h=0; i<n; ++i) h = hash( k[i], len[i], h);
+
+By Bob Jenkins, 1996.  bob_jenkins@burtleburtle.net.  You may use this
+code any way you wish, private, educational, or commercial.  It's free.
+
+See http://burtleburtle.net/bob/hash/evahash.html
+Use for hash table lookup, or anything where one collision in 2^^32 is
+acceptable.  Do NOT use for cryptographic purposes.
+--------------------------------------------------------------------
+ */
+jenkins_state_t *jenkins_state_new(cmph_uint32 size) //size of hash table
+{
+       jenkins_state_t *state = (jenkins_state_t *)malloc(sizeof(jenkins_state_t));
+       DEBUGP("Initializing jenkins hash\n");
+       state->seed = ((cmph_uint32)rand() % size);
+       return state;
+}
+void jenkins_state_destroy(jenkins_state_t *state)
+{
+       free(state);
+}
+
+
+static inline void __jenkins_hash_vector(cmph_uint32 seed, const char *k, cmph_uint32 keylen, cmph_uint32 * hashes)
+{
+       register cmph_uint32 len, length;
+
+       /* Set up the internal state */
+       length = keylen;
+       len = length;
+       hashes[0] = hashes[1] = 0x9e3779b9;  /* the golden ratio; an arbitrary value */
+       hashes[2] = seed;   /* the previous hash value - seed in our case */
+
+       /*---------------------------------------- handle most of the key */
+       while (len >= 12)
+       {
+               hashes[0] += ((cmph_uint32)k[0] +((cmph_uint32)k[1]<<8) +((cmph_uint32)k[2]<<16) +((cmph_uint32)k[3]<<24));
+               hashes[1] += ((cmph_uint32)k[4] +((cmph_uint32)k[5]<<8) +((cmph_uint32)k[6]<<16) +((cmph_uint32)k[7]<<24));
+               hashes[2] += ((cmph_uint32)k[8] +((cmph_uint32)k[9]<<8) +((cmph_uint32)k[10]<<16)+((cmph_uint32)k[11]<<24));
+               mix(hashes[0],hashes[1],hashes[2]);
+               k += 12; len -= 12;
+       }
+
+       /*------------------------------------- handle the last 11 bytes */
+       hashes[2]  += length;
+       switch(len)              /* all the case statements fall through */
+       {
+               case 11: 
+                       hashes[2] +=((cmph_uint32)k[10]<<24);
+               case 10: 
+                       hashes[2] +=((cmph_uint32)k[9]<<16);
+               case 9 : 
+                       hashes[2] +=((cmph_uint32)k[8]<<8);
+                       /* the first byte of hashes[2] is reserved for the length */
+               case 8 : 
+                       hashes[1] +=((cmph_uint32)k[7]<<24);
+               case 7 : 
+                       hashes[1] +=((cmph_uint32)k[6]<<16);
+               case 6 : 
+                       hashes[1] +=((cmph_uint32)k[5]<<8);
+               case 5 :
+                       hashes[1] +=(cmph_uint8) k[4];
+               case 4 : 
+                       hashes[0] +=((cmph_uint32)k[3]<<24);
+               case 3 : 
+                       hashes[0] +=((cmph_uint32)k[2]<<16);
+               case 2 : 
+                       hashes[0] +=((cmph_uint32)k[1]<<8);
+               case 1 : 
+                       hashes[0] +=(cmph_uint8)k[0];
+                       /* case 0: nothing left to add */
+       }
+
+       mix(hashes[0],hashes[1],hashes[2]);
+}
+
+cmph_uint32 jenkins_hash(jenkins_state_t *state, const char *k, cmph_uint32 keylen)
+{
+       cmph_uint32 hashes[3];
+       __jenkins_hash_vector(state->seed, k, keylen, hashes);
+       return hashes[2];
+/*     cmph_uint32 a, b, c;
+       cmph_uint32 len, length;
+
+       // Set up the internal state 
+       length = keylen;
+       len = length;
+       a = b = 0x9e3779b9;  // the golden ratio; an arbitrary value 
+       c = state->seed;   // the previous hash value - seed in our case 
+
+       // handle most of the key 
+       while (len >= 12)
+       {
+               a += (k[0] +((cmph_uint32)k[1]<<8) +((cmph_uint32)k[2]<<16) +((cmph_uint32)k[3]<<24));
+               b += (k[4] +((cmph_uint32)k[5]<<8) +((cmph_uint32)k[6]<<16) +((cmph_uint32)k[7]<<24));
+               c += (k[8] +((cmph_uint32)k[9]<<8) +((cmph_uint32)k[10]<<16)+((cmph_uint32)k[11]<<24));
+               mix(a,b,c);
+               k += 12; len -= 12;
+       }
+
+       // handle the last 11 bytes
+       c  += length;
+       switch(len)              /// all the case statements fall through 
+       {
+               case 11: 
+                       c +=((cmph_uint32)k[10]<<24);
+               case 10: 
+                       c +=((cmph_uint32)k[9]<<16);
+               case 9 : 
+                       c +=((cmph_uint32)k[8]<<8);
+                       // the first byte of c is reserved for the length 
+               case 8 : 
+                       b +=((cmph_uint32)k[7]<<24);
+               case 7 : 
+                       b +=((cmph_uint32)k[6]<<16);
+               case 6 : 
+                       b +=((cmph_uint32)k[5]<<8);
+               case 5 : 
+                       b +=k[4];
+               case 4 : 
+                       a +=((cmph_uint32)k[3]<<24);
+               case 3 : 
+                       a +=((cmph_uint32)k[2]<<16);
+               case 2 : 
+                       a +=((cmph_uint32)k[1]<<8);
+               case 1 : 
+                       a +=k[0];
+               // case 0: nothing left to add 
+       }
+
+       mix(a,b,c);
+
+       /// report the result 
+
+       return c;
+       */
+}
+
+void jenkins_hash_vector_(jenkins_state_t *state, const char *k, cmph_uint32 keylen, cmph_uint32 * hashes)
+{
+       __jenkins_hash_vector(state->seed, k, keylen, hashes);
+}
+
+void jenkins_state_dump(jenkins_state_t *state, char **buf, cmph_uint32 *buflen)
+{
+       *buflen = sizeof(cmph_uint32);
+       *buf = (char *)malloc(sizeof(cmph_uint32));
+       if (!*buf) 
+       {
+               *buflen = UINT_MAX;
+               return;
+       }
+       memcpy(*buf, &(state->seed), sizeof(cmph_uint32));
+       DEBUGP("Dumped jenkins state with seed %u\n", state->seed);
+       return;
+}
+
+jenkins_state_t *jenkins_state_copy(jenkins_state_t *src_state)
+{
+       jenkins_state_t *dest_state = (jenkins_state_t *)malloc(sizeof(jenkins_state_t));
+       dest_state->hashfunc = src_state->hashfunc;
+       dest_state->seed = src_state->seed;
+       return dest_state;
+}
+
+jenkins_state_t *jenkins_state_load(const char *buf, cmph_uint32 buflen)
+{
+       jenkins_state_t *state = (jenkins_state_t *)malloc(sizeof(jenkins_state_t));
+       state->seed = *(cmph_uint32 *)buf;
+       state->hashfunc = CMPH_HASH_JENKINS;
+       DEBUGP("Loaded jenkins state with seed %u\n", state->seed);
+       return state;
+}
+
+
+/** \fn void jenkins_state_pack(jenkins_state_t *state, void *jenkins_packed);
+ *  \brief Support the ability to pack a jenkins function into a preallocated contiguous memory space pointed by jenkins_packed.
+ *  \param state points to the jenkins function
+ *  \param jenkins_packed pointer to the contiguous memory area used to store the jenkins function. The size of jenkins_packed must be at least jenkins_state_packed_size() 
+ */
+void jenkins_state_pack(jenkins_state_t *state, void *jenkins_packed)
+{
+       if (state && jenkins_packed)
+       {
+               memcpy(jenkins_packed, &(state->seed), sizeof(cmph_uint32));
+       }
+}
+
+/** \fn cmph_uint32 jenkins_state_packed_size(jenkins_state_t *state);
+ *  \brief Return the amount of space needed to pack a jenkins function.
+ *  \return the size of the packed function or zero for failures
+ */ 
+cmph_uint32 jenkins_state_packed_size(void)
+{
+       return sizeof(cmph_uint32);
+}
+
+
+/** \fn cmph_uint32 jenkins_hash_packed(void *jenkins_packed, const char *k, cmph_uint32 keylen);
+ *  \param jenkins_packed is a pointer to a contiguous memory area
+ *  \param key is a pointer to a key
+ *  \param keylen is the key length
+ *  \return an integer that represents a hash value of 32 bits.
+ */
+cmph_uint32 jenkins_hash_packed(void *jenkins_packed, const char *k, cmph_uint32 keylen)
+{
+       cmph_uint32 hashes[3];
+       __jenkins_hash_vector(*((cmph_uint32 *)jenkins_packed), k, keylen, hashes);
+       return hashes[2];
+}
+
+/** \fn jenkins_hash_vector_packed(void *jenkins_packed, const char *k, cmph_uint32 keylen, cmph_uint32 * hashes);
+ *  \param jenkins_packed is a pointer to a contiguous memory area
+ *  \param key is a pointer to a key
+ *  \param keylen is the key length
+ *  \param hashes is a pointer to a memory large enough to fit three 32-bit integers.
+ */
+void jenkins_hash_vector_packed(void *jenkins_packed, const char *k, cmph_uint32 keylen, cmph_uint32 * hashes)
+{
+       __jenkins_hash_vector(*((cmph_uint32 *)jenkins_packed), k, keylen, hashes);
+}
diff --git a/girepository/cmph/jenkins_hash.h b/girepository/cmph/jenkins_hash.h
new file mode 100644 (file)
index 0000000..39626e2
--- /dev/null
@@ -0,0 +1,65 @@
+#ifndef __JEKINS_HASH_H__
+#define __JEKINS_HASH_H__
+
+#include "hash.h"
+
+typedef struct __jenkins_state_t
+{
+       CMPH_HASH hashfunc;
+       cmph_uint32 seed;
+} jenkins_state_t;
+       
+jenkins_state_t *jenkins_state_new(cmph_uint32 size); //size of hash table
+
+/** \fn cmph_uint32 jenkins_hash(jenkins_state_t *state, const char *k, cmph_uint32 keylen);
+ *  \param state is a pointer to a jenkins_state_t structure
+ *  \param key is a pointer to a key
+ *  \param keylen is the key length
+ *  \return an integer that represents a hash value of 32 bits.
+ */
+cmph_uint32 jenkins_hash(jenkins_state_t *state, const char *k, cmph_uint32 keylen);
+
+/** \fn void jenkins_hash_vector_(jenkins_state_t *state, const char *k, cmph_uint32 keylen, cmph_uint32 * hashes);
+ *  \param state is a pointer to a jenkins_state_t structure
+ *  \param key is a pointer to a key
+ *  \param keylen is the key length
+ *  \param hashes is a pointer to a memory large enough to fit three 32-bit integers.
+ */
+void jenkins_hash_vector_(jenkins_state_t *state, const char *k, cmph_uint32 keylen, cmph_uint32 * hashes);
+
+void jenkins_state_dump(jenkins_state_t *state, char **buf, cmph_uint32 *buflen);
+jenkins_state_t *jenkins_state_copy(jenkins_state_t *src_state);
+jenkins_state_t *jenkins_state_load(const char *buf, cmph_uint32 buflen);
+void jenkins_state_destroy(jenkins_state_t *state);
+
+/** \fn void jenkins_state_pack(jenkins_state_t *state, void *jenkins_packed);
+ *  \brief Support the ability to pack a jenkins function into a preallocated contiguous memory space pointed by jenkins_packed.
+ *  \param state points to the jenkins function
+ *  \param jenkins_packed pointer to the contiguous memory area used to store the jenkins function. The size of jenkins_packed must be at least jenkins_state_packed_size() 
+ */
+void jenkins_state_pack(jenkins_state_t *state, void *jenkins_packed);
+
+/** \fn cmph_uint32 jenkins_state_packed_size();
+ *  \brief Return the amount of space needed to pack a jenkins function.
+ *  \return the size of the packed function or zero for failures
+ */ 
+cmph_uint32 jenkins_state_packed_size(void);
+
+
+/** \fn cmph_uint32 jenkins_hash_packed(void *jenkins_packed, const char *k, cmph_uint32 keylen);
+ *  \param jenkins_packed is a pointer to a contiguous memory area
+ *  \param key is a pointer to a key
+ *  \param keylen is the key length
+ *  \return an integer that represents a hash value of 32 bits.
+ */
+cmph_uint32 jenkins_hash_packed(void *jenkins_packed, const char *k, cmph_uint32 keylen);
+
+/** \fn jenkins_hash_vector_packed(void *jenkins_packed, const char *k, cmph_uint32 keylen, cmph_uint32 * hashes);
+ *  \param jenkins_packed is a pointer to a contiguous memory area
+ *  \param key is a pointer to a key
+ *  \param keylen is the key length
+ *  \param hashes is a pointer to a memory large enough to fit three 32-bit integers.
+ */
+void jenkins_hash_vector_packed(void *jenkins_packed, const char *k, cmph_uint32 keylen, cmph_uint32 * hashes);
+
+#endif
diff --git a/girepository/cmph/miller_rabin.c b/girepository/cmph/miller_rabin.c
new file mode 100644 (file)
index 0000000..17d0ed3
--- /dev/null
@@ -0,0 +1,67 @@
+#include "miller_rabin.h"
+
+static inline cmph_uint64 int_pow(cmph_uint64 a, cmph_uint64 d, cmph_uint64 n)
+{
+       cmph_uint64 a_pow = a;
+       cmph_uint64 res = 1;
+       while(d > 0)
+       {
+               if((d & 1) == 1)
+                       res =(((cmph_uint64)res) * a_pow) % n;
+               a_pow = (((cmph_uint64)a_pow) * a_pow) % n;
+               d /= 2;
+       };
+       return res;
+};
+
+static inline cmph_uint8 check_witness(cmph_uint64 a_exp_d, cmph_uint64 n, cmph_uint64 s)
+{
+       cmph_uint64 i;
+       cmph_uint64 a_exp = a_exp_d;
+       if(a_exp == 1 || a_exp == (n - 1))
+               return 1;
+       for(i = 1; i < s; i++)
+       {
+               a_exp = (((cmph_uint64)a_exp) * a_exp) % n;
+               if(a_exp == (n - 1))
+                       return 1;
+       };
+       return 0;
+};
+
+cmph_uint8 check_primality(cmph_uint64 n)
+{
+       cmph_uint64 a, d, s, a_exp_d;
+       if((n % 2) == 0)
+               return 0;
+       if((n % 3) == 0)
+               return 0;
+       if((n % 5) == 0)
+               return 0;
+       if((n % 7 ) == 0)
+               return 0;
+       //we decompoe the number n - 1 into 2^s*d
+       s = 0;
+       d = n - 1;
+       do 
+       {
+               s++;
+               d /= 2;
+       }while((d % 2) == 0);
+
+       a = 2;
+       a_exp_d = int_pow(a, d, n);
+       if(check_witness(a_exp_d, n, s) == 0)
+               return 0;
+       a = 7;
+       a_exp_d = int_pow(a, d, n);
+       if(check_witness(a_exp_d, n, s) == 0)
+               return 0;
+       a = 61;
+       a_exp_d = int_pow(a, d, n);
+       if(check_witness(a_exp_d, n, s) == 0)
+               return 0;
+       return 1;
+};
+
+
diff --git a/girepository/cmph/miller_rabin.h b/girepository/cmph/miller_rabin.h
new file mode 100644 (file)
index 0000000..42dc6ce
--- /dev/null
@@ -0,0 +1,5 @@
+#ifndef _CMPH_MILLER_RABIN_H__ 
+#define _CMPH_MILLER_RABIN_H__ 
+#include "cmph_types.h"
+cmph_uint8 check_primality(cmph_uint64 n);
+#endif
diff --git a/girepository/cmph/select.c b/girepository/cmph/select.c
new file mode 100644 (file)
index 0000000..fec4b7a
--- /dev/null
@@ -0,0 +1,337 @@
+#include<stdlib.h>
+#include<stdio.h>
+#include <assert.h>
+#include <string.h>
+#include <limits.h>
+#include "select_lookup_tables.h"
+#include "select.h"
+
+//#define DEBUG
+#include "debug.h"
+
+#ifndef STEP_SELECT_TABLE
+#define STEP_SELECT_TABLE 128
+#endif
+
+#ifndef NBITS_STEP_SELECT_TABLE
+#define NBITS_STEP_SELECT_TABLE 7
+#endif
+
+#ifndef MASK_STEP_SELECT_TABLE
+#define MASK_STEP_SELECT_TABLE 0x7f // 0x7f = 127
+#endif
+
+static inline void select_insert_0(cmph_uint32 * buffer)
+{
+       (*buffer) >>= 1;
+};
+
+static inline void select_insert_1(cmph_uint32 * buffer)
+{
+       (*buffer) >>= 1;
+       (*buffer) |= 0x80000000;
+};
+
+void select_init(select_t * sel)
+{
+       sel->n = 0;
+       sel->m = 0;
+       sel->bits_vec = 0;
+       sel->select_table = 0;
+};
+
+cmph_uint32 select_get_space_usage(select_t * sel)
+{
+       register cmph_uint32 nbits;
+       register cmph_uint32 vec_size;
+       register cmph_uint32 sel_table_size;
+       register cmph_uint32 space_usage;
+       
+       nbits = sel->n + sel->m;
+       vec_size = (nbits + 31) >> 5;
+       sel_table_size = (sel->n >> NBITS_STEP_SELECT_TABLE) + 1; // (sel->n >> NBITS_STEP_SELECT_TABLE) = (sel->n/STEP_SELECT_TABLE)
+
+       space_usage = 2 * sizeof(cmph_uint32) * 8; // n and m
+       space_usage += vec_size * (cmph_uint32) sizeof(cmph_uint32) * 8;
+       space_usage += sel_table_size * (cmph_uint32)sizeof(cmph_uint32) * 8;
+       return space_usage;
+}
+
+void select_destroy(select_t * sel)
+{
+       free(sel->bits_vec);
+       free(sel->select_table);
+       sel->bits_vec = 0;
+       sel->select_table = 0;
+};
+
+static inline void select_generate_sel_table(select_t * sel)
+{
+       register cmph_uint8 * bits_table = (cmph_uint8 *)sel->bits_vec;
+       register cmph_uint32 part_sum, old_part_sum;
+       register cmph_uint32 vec_idx, one_idx, sel_table_idx;
+       
+       part_sum = vec_idx = one_idx = sel_table_idx = 0;
+       
+       for(;;)
+       {
+               // FABIANO: Should'n it be one_idx >= sel->n
+               if(one_idx >= sel->n)
+                       break;
+               do 
+               {
+                       old_part_sum = part_sum; 
+                       part_sum += rank_lookup_table[bits_table[vec_idx]];
+                       vec_idx++;
+               } while (part_sum <= one_idx);
+               
+               sel->select_table[sel_table_idx] = select_lookup_table[bits_table[vec_idx - 1]][one_idx - old_part_sum] + ((vec_idx - 1) << 3); // ((vec_idx - 1) << 3) = ((vec_idx - 1) * 8)
+               one_idx += STEP_SELECT_TABLE ;
+               sel_table_idx++;
+       };
+};
+
+void select_generate(select_t * sel, cmph_uint32 * keys_vec, cmph_uint32 n, cmph_uint32 m)
+{
+       register cmph_uint32 i, j, idx;
+       cmph_uint32 buffer = 0;
+       
+       register cmph_uint32 nbits;
+       register cmph_uint32 vec_size;
+       register cmph_uint32 sel_table_size;
+       sel->n = n;
+       sel->m = m; // n values in the range [0,m-1]
+       
+       nbits = sel->n + sel->m; 
+       vec_size = (nbits + 31) >> 5; // (nbits + 31) >> 5 = (nbits + 31)/32
+       
+       sel_table_size = (sel->n >> NBITS_STEP_SELECT_TABLE) + 1; // (sel->n >> NBITS_STEP_SELECT_TABLE) = (sel->n/STEP_SELECT_TABLE)
+       
+       if(sel->bits_vec)
+       {
+               free(sel->bits_vec);
+       }
+       sel->bits_vec = (cmph_uint32 *)calloc(vec_size, sizeof(cmph_uint32));
+
+       if(sel->select_table)
+       {
+               free(sel->select_table);
+       }
+       sel->select_table = (cmph_uint32 *)calloc(sel_table_size, sizeof(cmph_uint32));
+
+       
+       
+       idx = i = j = 0;
+       
+       for(;;)
+       {
+               while(keys_vec[j]==i)
+               {
+                       select_insert_1(&buffer);
+                       idx++;
+                       
+                       if((idx & 0x1f) == 0 ) // (idx & 0x1f) = idx % 32
+                               sel->bits_vec[(idx >> 5) - 1] = buffer; // (idx >> 5) = idx/32
+                       j++;
+                       
+                       if(j == sel->n)
+                               goto loop_end;
+                               
+                       //assert(keys_vec[j] < keys_vec[j-1]);
+               }
+               
+               if(i == sel->m)
+                       break;
+                       
+               while(keys_vec[j] > i)
+               {
+                       select_insert_0(&buffer);
+                       idx++;
+                       
+                       if((idx & 0x1f) == 0 ) // (idx & 0x1f) = idx % 32
+                               sel->bits_vec[(idx >> 5) - 1] = buffer; // (idx >> 5) = idx/32
+                       i++;
+               };
+               
+       };
+       loop_end:
+       if((idx & 0x1f) != 0 ) // (idx & 0x1f) = idx % 32
+       {
+               buffer >>= 32 - (idx & 0x1f);
+               sel->bits_vec[ (idx - 1) >> 5 ] = buffer;
+       };
+       
+       select_generate_sel_table(sel);
+};
+
+static inline cmph_uint32 _select_query(cmph_uint8 * bits_table, cmph_uint32 * select_table, cmph_uint32 one_idx)
+{
+       register cmph_uint32 vec_bit_idx ,vec_byte_idx;
+       register cmph_uint32 part_sum, old_part_sum;
+       
+       vec_bit_idx = select_table[one_idx >> NBITS_STEP_SELECT_TABLE]; // one_idx >> NBITS_STEP_SELECT_TABLE = one_idx/STEP_SELECT_TABLE
+       vec_byte_idx = vec_bit_idx >> 3; // vec_bit_idx / 8
+       
+       one_idx &= MASK_STEP_SELECT_TABLE; // one_idx %= STEP_SELECT_TABLE == one_idx &= MASK_STEP_SELECT_TABLE
+       one_idx += rank_lookup_table[bits_table[vec_byte_idx] & ((1 << (vec_bit_idx & 0x7)) - 1)];
+       part_sum = 0;
+       
+       do
+       {
+               old_part_sum = part_sum; 
+               part_sum += rank_lookup_table[bits_table[vec_byte_idx]];
+               vec_byte_idx++;
+               
+       }while (part_sum <= one_idx);
+       
+       return select_lookup_table[bits_table[vec_byte_idx - 1]][one_idx - old_part_sum] + ((vec_byte_idx-1) << 3);
+}
+
+cmph_uint32 select_query(select_t * sel, cmph_uint32 one_idx)
+{
+       return _select_query((cmph_uint8 *)sel->bits_vec, sel->select_table, one_idx);
+};
+
+
+static inline cmph_uint32 _select_next_query(cmph_uint8 * bits_table, cmph_uint32 vec_bit_idx)
+{
+       register cmph_uint32 vec_byte_idx, one_idx;
+       register cmph_uint32 part_sum, old_part_sum;
+       
+       vec_byte_idx = vec_bit_idx >> 3;
+       
+       one_idx = rank_lookup_table[bits_table[vec_byte_idx] & ((1U << (vec_bit_idx & 0x7)) - 1U)] + 1U;
+       part_sum = 0;
+       
+       do
+       {
+               old_part_sum = part_sum; 
+               part_sum += rank_lookup_table[bits_table[vec_byte_idx]];
+               vec_byte_idx++;
+               
+       }while (part_sum <= one_idx);
+       
+       return select_lookup_table[bits_table[(vec_byte_idx - 1)]][(one_idx - old_part_sum)] + ((vec_byte_idx - 1) << 3);
+}
+
+cmph_uint32 select_next_query(select_t * sel, cmph_uint32 vec_bit_idx)
+{
+       return _select_next_query((cmph_uint8 *)sel->bits_vec, vec_bit_idx);
+};
+
+void select_dump(select_t *sel, char **buf, cmph_uint32 *buflen)
+{
+        register cmph_uint32 nbits = sel->n + sel->m;
+       register cmph_uint32 vec_size = ((nbits + 31) >> 5) * (cmph_uint32)sizeof(cmph_uint32); // (nbits + 31) >> 5 = (nbits + 31)/32
+       register cmph_uint32 sel_table_size = ((sel->n >> NBITS_STEP_SELECT_TABLE) + 1) * (cmph_uint32)sizeof(cmph_uint32); // (sel->n >> NBITS_STEP_SELECT_TABLE) = (sel->n/STEP_SELECT_TABLE)
+       register cmph_uint32 pos = 0;
+       
+       *buflen = 2*(cmph_uint32)sizeof(cmph_uint32) + vec_size + sel_table_size;
+       
+       *buf = (char *)calloc(*buflen, sizeof(char));
+       
+       if (!*buf) 
+       {
+               *buflen = UINT_MAX;
+               return;
+       }
+       
+       memcpy(*buf, &(sel->n), sizeof(cmph_uint32));
+       pos += (cmph_uint32)sizeof(cmph_uint32);
+       memcpy(*buf + pos, &(sel->m), sizeof(cmph_uint32));
+       pos += (cmph_uint32)sizeof(cmph_uint32);
+       memcpy(*buf + pos, sel->bits_vec, vec_size);
+       pos += vec_size;
+       memcpy(*buf + pos, sel->select_table, sel_table_size);
+
+       DEBUGP("Dumped select structure with size %u bytes\n", *buflen);
+}
+
+void select_load(select_t * sel, const char *buf, cmph_uint32 buflen)
+{
+       register cmph_uint32 pos = 0;
+        register cmph_uint32 nbits = 0;
+       register cmph_uint32 vec_size = 0;
+       register cmph_uint32 sel_table_size = 0;
+       
+       memcpy(&(sel->n), buf, sizeof(cmph_uint32));
+       pos += (cmph_uint32)sizeof(cmph_uint32);
+       memcpy(&(sel->m), buf + pos, sizeof(cmph_uint32));
+       pos += (cmph_uint32)sizeof(cmph_uint32);
+       
+       nbits = sel->n + sel->m;
+       vec_size = ((nbits + 31) >> 5) * (cmph_uint32)sizeof(cmph_uint32); // (nbits + 31) >> 5 = (nbits + 31)/32
+       sel_table_size = ((sel->n >> NBITS_STEP_SELECT_TABLE) + 1) * (cmph_uint32)sizeof(cmph_uint32); // (sel->n >> NBITS_STEP_SELECT_TABLE) = (sel->n/STEP_SELECT_TABLE)
+       
+       if(sel->bits_vec) 
+       {
+               free(sel->bits_vec);
+       }
+       sel->bits_vec = (cmph_uint32 *)calloc(vec_size/sizeof(cmph_uint32), sizeof(cmph_uint32));
+
+       if(sel->select_table) 
+       {
+               free(sel->select_table);
+       }
+       sel->select_table = (cmph_uint32 *)calloc(sel_table_size/sizeof(cmph_uint32), sizeof(cmph_uint32));
+
+       memcpy(sel->bits_vec, buf + pos, vec_size);
+       pos += vec_size;
+       memcpy(sel->select_table, buf + pos, sel_table_size);
+       
+       DEBUGP("Loaded select structure with size %u bytes\n", buflen);
+}
+
+
+/** \fn void select_pack(select_t *sel, void *sel_packed);
+ *  \brief Support the ability to pack a select structure function into a preallocated contiguous memory space pointed by sel_packed.
+ *  \param sel points to the select structure
+ *  \param sel_packed pointer to the contiguous memory area used to store the select structure. The size of sel_packed must be at least @see select_packed_size 
+ */
+void select_pack(select_t *sel, void *sel_packed)
+{
+       if (sel && sel_packed)
+       {
+               char *buf = NULL;
+               cmph_uint32 buflen = 0;
+               select_dump(sel, &buf, &buflen);
+               memcpy(sel_packed, buf, buflen);
+               free(buf);
+       }
+}
+
+
+/** \fn cmph_uint32 select_packed_size(select_t *sel);
+ *  \brief Return the amount of space needed to pack a select structure.
+ *  \return the size of the packed select structure or zero for failures
+ */ 
+cmph_uint32 select_packed_size(select_t *sel)
+{
+        register cmph_uint32 nbits = sel->n + sel->m;
+       register cmph_uint32 vec_size = ((nbits + 31) >> 5) * (cmph_uint32)sizeof(cmph_uint32); // (nbits + 31) >> 5 = (nbits + 31)/32
+       register cmph_uint32 sel_table_size = ((sel->n >> NBITS_STEP_SELECT_TABLE) + 1) * (cmph_uint32)sizeof(cmph_uint32); // (sel->n >> NBITS_STEP_SELECT_TABLE) = (sel->n/STEP_SELECT_TABLE)
+       return 2*(cmph_uint32)sizeof(cmph_uint32) + vec_size + sel_table_size;
+}
+
+
+
+cmph_uint32 select_query_packed(void * sel_packed, cmph_uint32 one_idx)
+{
+       register cmph_uint32 *ptr = (cmph_uint32 *)sel_packed;
+       register cmph_uint32 n = *ptr++;
+       register cmph_uint32 m = *ptr++;
+        register cmph_uint32 nbits = n + m;
+       register cmph_uint32 vec_size = (nbits + 31) >> 5; // (nbits + 31) >> 5 = (nbits + 31)/32
+       register cmph_uint8 * bits_vec = (cmph_uint8 *)ptr;
+       register cmph_uint32 * select_table = ptr + vec_size;
+       
+       return _select_query(bits_vec, select_table, one_idx);
+}
+
+
+cmph_uint32 select_next_query_packed(void * sel_packed, cmph_uint32 vec_bit_idx)
+{
+       register cmph_uint8 * bits_vec = (cmph_uint8 *)sel_packed;
+       bits_vec += 8; // skipping n and m
+       return _select_next_query(bits_vec, vec_bit_idx);
+}
diff --git a/girepository/cmph/select.h b/girepository/cmph/select.h
new file mode 100644 (file)
index 0000000..a31eb0f
--- /dev/null
@@ -0,0 +1,61 @@
+#ifndef __CMPH_SELECT_H__
+#define __CMPH_SELECT_H__
+
+#include "cmph_types.h"
+
+struct _select_t
+{
+       cmph_uint32 n,m;
+       cmph_uint32 * bits_vec;
+       cmph_uint32 * select_table;
+};
+
+typedef struct _select_t select_t;
+
+void select_init(select_t * sel);
+
+void select_destroy(select_t * sel);
+void select_generate(select_t * sel, cmph_uint32 * keys_vec, cmph_uint32 n, cmph_uint32 m);
+
+cmph_uint32 select_query(select_t * sel, cmph_uint32 one_idx);
+
+cmph_uint32 select_next_query(select_t * sel, cmph_uint32 vec_bit_idx);
+
+cmph_uint32 select_get_space_usage(select_t * sel);
+
+void select_dump(select_t *sel, char **buf, cmph_uint32 *buflen);
+
+void select_load(select_t * sel, const char *buf, cmph_uint32 buflen);
+
+
+/** \fn void select_pack(select_t *sel, void *sel_packed);
+ *  \brief Support the ability to pack a select structure into a preallocated contiguous memory space pointed by sel_packed.
+ *  \param sel points to the select structure
+ *  \param sel_packed pointer to the contiguous memory area used to store the select structure. The size of sel_packed must be at least @see select_packed_size 
+ */
+void select_pack(select_t *sel, void *sel_packed);
+
+/** \fn cmph_uint32 select_packed_size(select_t *sel);
+ *  \brief Return the amount of space needed to pack a select structure.
+ *  \return the size of the packed select structure or zero for failures
+ */ 
+cmph_uint32 select_packed_size(select_t *sel);
+
+
+/** \fn cmph_uint32 select_query_packed(void * sel_packed, cmph_uint32 one_idx);
+ *  \param sel_packed is a pointer to a contiguous memory area
+ *  \param one_idx is the rank for which we want to calculate the inverse function select
+ *  \return an integer that represents the select value of rank idx.
+ */
+cmph_uint32 select_query_packed(void * sel_packed, cmph_uint32 one_idx);
+
+
+/** \fn cmph_uint32 select_next_query_packed(void * sel_packed, cmph_uint32 vec_bit_idx);
+ *  \param sel_packed is a pointer to a contiguous memory area
+ *  \param vec_bit_idx is a value prior computed by @see select_query_packed
+ *  \return an integer that represents the next select value greater than @see vec_bit_idx.
+ */
+cmph_uint32 select_next_query_packed(void * sel_packed, cmph_uint32 vec_bit_idx);
+
+#endif
diff --git a/girepository/cmph/select_lookup_tables.h b/girepository/cmph/select_lookup_tables.h
new file mode 100644 (file)
index 0000000..efd595e
--- /dev/null
@@ -0,0 +1,170 @@
+#ifndef SELECT_LOOKUP_TABLES
+#define SELECT_LOOKUP_TABLES
+
+#include "cmph_types.h"
+
+/*
+rank_lookup_table[i] simply gives the number of bits set to one in the byte of value i.
+For example if i = 01010101 in binary then we have :
+rank_lookup_table[i] = 4
+*/
+
+static cmph_uint8 rank_lookup_table[256] ={
+   0 , 1 , 1 , 2 , 1 , 2 , 2 , 3 , 1 , 2 , 2 , 3 , 2 , 3 , 3 , 4
+,  1 , 2 , 2 , 3 , 2 , 3 , 3 , 4 , 2 , 3 , 3 , 4 , 3 , 4 , 4 , 5
+,  1 , 2 , 2 , 3 , 2 , 3 , 3 , 4 , 2 , 3 , 3 , 4 , 3 , 4 , 4 , 5
+,  2 , 3 , 3 , 4 , 3 , 4 , 4 , 5 , 3 , 4 , 4 , 5 , 4 , 5 , 5 , 6
+,  1 , 2 , 2 , 3 , 2 , 3 , 3 , 4 , 2 , 3 , 3 , 4 , 3 , 4 , 4 , 5
+,  2 , 3 , 3 , 4 , 3 , 4 , 4 , 5 , 3 , 4 , 4 , 5 , 4 , 5 , 5 , 6
+,  2 , 3 , 3 , 4 , 3 , 4 , 4 , 5 , 3 , 4 , 4 , 5 , 4 , 5 , 5 , 6
+,  3 , 4 , 4 , 5 , 4 , 5 , 5 , 6 , 4 , 5 , 5 , 6 , 5 , 6 , 6 , 7
+,  1 , 2 , 2 , 3 , 2 , 3 , 3 , 4 , 2 , 3 , 3 , 4 , 3 , 4 , 4 , 5
+,  2 , 3 , 3 , 4 , 3 , 4 , 4 , 5 , 3 , 4 , 4 , 5 , 4 , 5 , 5 , 6
+,  2 , 3 , 3 , 4 , 3 , 4 , 4 , 5 , 3 , 4 , 4 , 5 , 4 , 5 , 5 , 6
+,  3 , 4 , 4 , 5 , 4 , 5 , 5 , 6 , 4 , 5 , 5 , 6 , 5 , 6 , 6 , 7
+,  2 , 3 , 3 , 4 , 3 , 4 , 4 , 5 , 3 , 4 , 4 , 5 , 4 , 5 , 5 , 6
+,  3 , 4 , 4 , 5 , 4 , 5 , 5 , 6 , 4 , 5 , 5 , 6 , 5 , 6 , 6 , 7
+,  3 , 4 , 4 , 5 , 4 , 5 , 5 , 6 , 4 , 5 , 5 , 6 , 5 , 6 , 6 , 7
+,  4 , 5 , 5 , 6 , 5 , 6 , 6 , 7 , 5 , 6 , 6 , 7 , 6 , 7 , 7 , 8 
+ };
+
+/*
+select_lookup_table[i][j] simply gives the index of the j'th bit set to one in the byte of value i.
+For example if i=01010101 in binary then we have :
+select_lookup_table[i][0] = 0,   the first bit set to one is at position 0
+select_lookup_table[i][1] = 2,   the second bit set to one is at position 2
+select_lookup_table[i][2] = 4,   the third bit set to one is at position 4
+select_lookup_table[i][3] = 6,   the fourth bit set to one is at position 6
+select_lookup_table[i][4] = 255, there is no more than 4 bits set to one in i, so we return escape value 255. 
+*/
+static cmph_uint8 select_lookup_table[256][8]={
+{ 255 , 255 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 255 , 255 , 255 , 255 , 255 , 255 , 255 } ,
+{ 1 , 255 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 1 , 255 , 255 , 255 , 255 , 255 , 255 } ,
+{ 2 , 255 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 2 , 255 , 255 , 255 , 255 , 255 , 255 } ,
+{ 1 , 2 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 1 , 2 , 255 , 255 , 255 , 255 , 255 } ,
+{ 3 , 255 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 3 , 255 , 255 , 255 , 255 , 255 , 255 } ,
+{ 1 , 3 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 1 , 3 , 255 , 255 , 255 , 255 , 255 } ,
+{ 2 , 3 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 2 , 3 , 255 , 255 , 255 , 255 , 255 } ,
+{ 1 , 2 , 3 , 255 , 255 , 255 , 255 , 255 } , { 0 , 1 , 2 , 3 , 255 , 255 , 255 , 255 } ,
+{ 4 , 255 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 4 , 255 , 255 , 255 , 255 , 255 , 255 } ,
+{ 1 , 4 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 1 , 4 , 255 , 255 , 255 , 255 , 255 } ,
+{ 2 , 4 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 2 , 4 , 255 , 255 , 255 , 255 , 255 } ,
+{ 1 , 2 , 4 , 255 , 255 , 255 , 255 , 255 } , { 0 , 1 , 2 , 4 , 255 , 255 , 255 , 255 } ,
+{ 3 , 4 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 3 , 4 , 255 , 255 , 255 , 255 , 255 } ,
+{ 1 , 3 , 4 , 255 , 255 , 255 , 255 , 255 } , { 0 , 1 , 3 , 4 , 255 , 255 , 255 , 255 } ,
+{ 2 , 3 , 4 , 255 , 255 , 255 , 255 , 255 } , { 0 , 2 , 3 , 4 , 255 , 255 , 255 , 255 } ,
+{ 1 , 2 , 3 , 4 , 255 , 255 , 255 , 255 } , { 0 , 1 , 2 , 3 , 4 , 255 , 255 , 255 } ,
+{ 5 , 255 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 5 , 255 , 255 , 255 , 255 , 255 , 255 } ,
+{ 1 , 5 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 1 , 5 , 255 , 255 , 255 , 255 , 255 } ,
+{ 2 , 5 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 2 , 5 , 255 , 255 , 255 , 255 , 255 } ,
+{ 1 , 2 , 5 , 255 , 255 , 255 , 255 , 255 } , { 0 , 1 , 2 , 5 , 255 , 255 , 255 , 255 } ,
+{ 3 , 5 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 3 , 5 , 255 , 255 , 255 , 255 , 255 } ,
+{ 1 , 3 , 5 , 255 , 255 , 255 , 255 , 255 } , { 0 , 1 , 3 , 5 , 255 , 255 , 255 , 255 } ,
+{ 2 , 3 , 5 , 255 , 255 , 255 , 255 , 255 } , { 0 , 2 , 3 , 5 , 255 , 255 , 255 , 255 } ,
+{ 1 , 2 , 3 , 5 , 255 , 255 , 255 , 255 } , { 0 , 1 , 2 , 3 , 5 , 255 , 255 , 255 } ,
+{ 4 , 5 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 4 , 5 , 255 , 255 , 255 , 255 , 255 } ,
+{ 1 , 4 , 5 , 255 , 255 , 255 , 255 , 255 } , { 0 , 1 , 4 , 5 , 255 , 255 , 255 , 255 } ,
+{ 2 , 4 , 5 , 255 , 255 , 255 , 255 , 255 } , { 0 , 2 , 4 , 5 , 255 , 255 , 255 , 255 } ,
+{ 1 , 2 , 4 , 5 , 255 , 255 , 255 , 255 } , { 0 , 1 , 2 , 4 , 5 , 255 , 255 , 255 } ,
+{ 3 , 4 , 5 , 255 , 255 , 255 , 255 , 255 } , { 0 , 3 , 4 , 5 , 255 , 255 , 255 , 255 } ,
+{ 1 , 3 , 4 , 5 , 255 , 255 , 255 , 255 } , { 0 , 1 , 3 , 4 , 5 , 255 , 255 , 255 } ,
+{ 2 , 3 , 4 , 5 , 255 , 255 , 255 , 255 } , { 0 , 2 , 3 , 4 , 5 , 255 , 255 , 255 } ,
+{ 1 , 2 , 3 , 4 , 5 , 255 , 255 , 255 } , { 0 , 1 , 2 , 3 , 4 , 5 , 255 , 255 } ,
+{ 6 , 255 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 6 , 255 , 255 , 255 , 255 , 255 , 255 } ,
+{ 1 , 6 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 1 , 6 , 255 , 255 , 255 , 255 , 255 } ,
+{ 2 , 6 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 2 , 6 , 255 , 255 , 255 , 255 , 255 } ,
+{ 1 , 2 , 6 , 255 , 255 , 255 , 255 , 255 } , { 0 , 1 , 2 , 6 , 255 , 255 , 255 , 255 } ,
+{ 3 , 6 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 3 , 6 , 255 , 255 , 255 , 255 , 255 } ,
+{ 1 , 3 , 6 , 255 , 255 , 255 , 255 , 255 } , { 0 , 1 , 3 , 6 , 255 , 255 , 255 , 255 } ,
+{ 2 , 3 , 6 , 255 , 255 , 255 , 255 , 255 } , { 0 , 2 , 3 , 6 , 255 , 255 , 255 , 255 } ,
+{ 1 , 2 , 3 , 6 , 255 , 255 , 255 , 255 } , { 0 , 1 , 2 , 3 , 6 , 255 , 255 , 255 } ,
+{ 4 , 6 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 4 , 6 , 255 , 255 , 255 , 255 , 255 } ,
+{ 1 , 4 , 6 , 255 , 255 , 255 , 255 , 255 } , { 0 , 1 , 4 , 6 , 255 , 255 , 255 , 255 } ,
+{ 2 , 4 , 6 , 255 , 255 , 255 , 255 , 255 } , { 0 , 2 , 4 , 6 , 255 , 255 , 255 , 255 } ,
+{ 1 , 2 , 4 , 6 , 255 , 255 , 255 , 255 } , { 0 , 1 , 2 , 4 , 6 , 255 , 255 , 255 } ,
+{ 3 , 4 , 6 , 255 , 255 , 255 , 255 , 255 } , { 0 , 3 , 4 , 6 , 255 , 255 , 255 , 255 } ,
+{ 1 , 3 , 4 , 6 , 255 , 255 , 255 , 255 } , { 0 , 1 , 3 , 4 , 6 , 255 , 255 , 255 } ,
+{ 2 , 3 , 4 , 6 , 255 , 255 , 255 , 255 } , { 0 , 2 , 3 , 4 , 6 , 255 , 255 , 255 } ,
+{ 1 , 2 , 3 , 4 , 6 , 255 , 255 , 255 } , { 0 , 1 , 2 , 3 , 4 , 6 , 255 , 255 } ,
+{ 5 , 6 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 5 , 6 , 255 , 255 , 255 , 255 , 255 } ,
+{ 1 , 5 , 6 , 255 , 255 , 255 , 255 , 255 } , { 0 , 1 , 5 , 6 , 255 , 255 , 255 , 255 } ,
+{ 2 , 5 , 6 , 255 , 255 , 255 , 255 , 255 } , { 0 , 2 , 5 , 6 , 255 , 255 , 255 , 255 } ,
+{ 1 , 2 , 5 , 6 , 255 , 255 , 255 , 255 } , { 0 , 1 , 2 , 5 , 6 , 255 , 255 , 255 } ,
+{ 3 , 5 , 6 , 255 , 255 , 255 , 255 , 255 } , { 0 , 3 , 5 , 6 , 255 , 255 , 255 , 255 } ,
+{ 1 , 3 , 5 , 6 , 255 , 255 , 255 , 255 } , { 0 , 1 , 3 , 5 , 6 , 255 , 255 , 255 } ,
+{ 2 , 3 , 5 , 6 , 255 , 255 , 255 , 255 } , { 0 , 2 , 3 , 5 , 6 , 255 , 255 , 255 } ,
+{ 1 , 2 , 3 , 5 , 6 , 255 , 255 , 255 } , { 0 , 1 , 2 , 3 , 5 , 6 , 255 , 255 } ,
+{ 4 , 5 , 6 , 255 , 255 , 255 , 255 , 255 } , { 0 , 4 , 5 , 6 , 255 , 255 , 255 , 255 } ,
+{ 1 , 4 , 5 , 6 , 255 , 255 , 255 , 255 } , { 0 , 1 , 4 , 5 , 6 , 255 , 255 , 255 } ,
+{ 2 , 4 , 5 , 6 , 255 , 255 , 255 , 255 } , { 0 , 2 , 4 , 5 , 6 , 255 , 255 , 255 } ,
+{ 1 , 2 , 4 , 5 , 6 , 255 , 255 , 255 } , { 0 , 1 , 2 , 4 , 5 , 6 , 255 , 255 } ,
+{ 3 , 4 , 5 , 6 , 255 , 255 , 255 , 255 } , { 0 , 3 , 4 , 5 , 6 , 255 , 255 , 255 } ,
+{ 1 , 3 , 4 , 5 , 6 , 255 , 255 , 255 } , { 0 , 1 , 3 , 4 , 5 , 6 , 255 , 255 } ,
+{ 2 , 3 , 4 , 5 , 6 , 255 , 255 , 255 } , { 0 , 2 , 3 , 4 , 5 , 6 , 255 , 255 } ,
+{ 1 , 2 , 3 , 4 , 5 , 6 , 255 , 255 } , { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 255 } ,
+{ 7 , 255 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 7 , 255 , 255 , 255 , 255 , 255 , 255 } ,
+{ 1 , 7 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 1 , 7 , 255 , 255 , 255 , 255 , 255 } ,
+{ 2 , 7 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 2 , 7 , 255 , 255 , 255 , 255 , 255 } ,
+{ 1 , 2 , 7 , 255 , 255 , 255 , 255 , 255 } , { 0 , 1 , 2 , 7 , 255 , 255 , 255 , 255 } ,
+{ 3 , 7 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 3 , 7 , 255 , 255 , 255 , 255 , 255 } ,
+{ 1 , 3 , 7 , 255 , 255 , 255 , 255 , 255 } , { 0 , 1 , 3 , 7 , 255 , 255 , 255 , 255 } ,
+{ 2 , 3 , 7 , 255 , 255 , 255 , 255 , 255 } , { 0 , 2 , 3 , 7 , 255 , 255 , 255 , 255 } ,
+{ 1 , 2 , 3 , 7 , 255 , 255 , 255 , 255 } , { 0 , 1 , 2 , 3 , 7 , 255 , 255 , 255 } ,
+{ 4 , 7 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 4 , 7 , 255 , 255 , 255 , 255 , 255 } ,
+{ 1 , 4 , 7 , 255 , 255 , 255 , 255 , 255 } , { 0 , 1 , 4 , 7 , 255 , 255 , 255 , 255 } ,
+{ 2 , 4 , 7 , 255 , 255 , 255 , 255 , 255 } , { 0 , 2 , 4 , 7 , 255 , 255 , 255 , 255 } ,
+{ 1 , 2 , 4 , 7 , 255 , 255 , 255 , 255 } , { 0 , 1 , 2 , 4 , 7 , 255 , 255 , 255 } ,
+{ 3 , 4 , 7 , 255 , 255 , 255 , 255 , 255 } , { 0 , 3 , 4 , 7 , 255 , 255 , 255 , 255 } ,
+{ 1 , 3 , 4 , 7 , 255 , 255 , 255 , 255 } , { 0 , 1 , 3 , 4 , 7 , 255 , 255 , 255 } ,
+{ 2 , 3 , 4 , 7 , 255 , 255 , 255 , 255 } , { 0 , 2 , 3 , 4 , 7 , 255 , 255 , 255 } ,
+{ 1 , 2 , 3 , 4 , 7 , 255 , 255 , 255 } , { 0 , 1 , 2 , 3 , 4 , 7 , 255 , 255 } ,
+{ 5 , 7 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 5 , 7 , 255 , 255 , 255 , 255 , 255 } ,
+{ 1 , 5 , 7 , 255 , 255 , 255 , 255 , 255 } , { 0 , 1 , 5 , 7 , 255 , 255 , 255 , 255 } ,
+{ 2 , 5 , 7 , 255 , 255 , 255 , 255 , 255 } , { 0 , 2 , 5 , 7 , 255 , 255 , 255 , 255 } ,
+{ 1 , 2 , 5 , 7 , 255 , 255 , 255 , 255 } , { 0 , 1 , 2 , 5 , 7 , 255 , 255 , 255 } ,
+{ 3 , 5 , 7 , 255 , 255 , 255 , 255 , 255 } , { 0 , 3 , 5 , 7 , 255 , 255 , 255 , 255 } ,
+{ 1 , 3 , 5 , 7 , 255 , 255 , 255 , 255 } , { 0 , 1 , 3 , 5 , 7 , 255 , 255 , 255 } ,
+{ 2 , 3 , 5 , 7 , 255 , 255 , 255 , 255 } , { 0 , 2 , 3 , 5 , 7 , 255 , 255 , 255 } ,
+{ 1 , 2 , 3 , 5 , 7 , 255 , 255 , 255 } , { 0 , 1 , 2 , 3 , 5 , 7 , 255 , 255 } ,
+{ 4 , 5 , 7 , 255 , 255 , 255 , 255 , 255 } , { 0 , 4 , 5 , 7 , 255 , 255 , 255 , 255 } ,
+{ 1 , 4 , 5 , 7 , 255 , 255 , 255 , 255 } , { 0 , 1 , 4 , 5 , 7 , 255 , 255 , 255 } ,
+{ 2 , 4 , 5 , 7 , 255 , 255 , 255 , 255 } , { 0 , 2 , 4 , 5 , 7 , 255 , 255 , 255 } ,
+{ 1 , 2 , 4 , 5 , 7 , 255 , 255 , 255 } , { 0 , 1 , 2 , 4 , 5 , 7 , 255 , 255 } ,
+{ 3 , 4 , 5 , 7 , 255 , 255 , 255 , 255 } , { 0 , 3 , 4 , 5 , 7 , 255 , 255 , 255 } ,
+{ 1 , 3 , 4 , 5 , 7 , 255 , 255 , 255 } , { 0 , 1 , 3 , 4 , 5 , 7 , 255 , 255 } ,
+{ 2 , 3 , 4 , 5 , 7 , 255 , 255 , 255 } , { 0 , 2 , 3 , 4 , 5 , 7 , 255 , 255 } ,
+{ 1 , 2 , 3 , 4 , 5 , 7 , 255 , 255 } , { 0 , 1 , 2 , 3 , 4 , 5 , 7 , 255 } ,
+{ 6 , 7 , 255 , 255 , 255 , 255 , 255 , 255 } , { 0 , 6 , 7 , 255 , 255 , 255 , 255 , 255 } ,
+{ 1 , 6 , 7 , 255 , 255 , 255 , 255 , 255 } , { 0 , 1 , 6 , 7 , 255 , 255 , 255 , 255 } ,
+{ 2 , 6 , 7 , 255 , 255 , 255 , 255 , 255 } , { 0 , 2 , 6 , 7 , 255 , 255 , 255 , 255 } ,
+{ 1 , 2 , 6 , 7 , 255 , 255 , 255 , 255 } , { 0 , 1 , 2 , 6 , 7 , 255 , 255 , 255 } ,
+{ 3 , 6 , 7 , 255 , 255 , 255 , 255 , 255 } , { 0 , 3 , 6 , 7 , 255 , 255 , 255 , 255 } ,
+{ 1 , 3 , 6 , 7 , 255 , 255 , 255 , 255 } , { 0 , 1 , 3 , 6 , 7 , 255 , 255 , 255 } ,
+{ 2 , 3 , 6 , 7 , 255 , 255 , 255 , 255 } , { 0 , 2 , 3 , 6 , 7 , 255 , 255 , 255 } ,
+{ 1 , 2 , 3 , 6 , 7 , 255 , 255 , 255 } , { 0 , 1 , 2 , 3 , 6 , 7 , 255 , 255 } ,
+{ 4 , 6 , 7 , 255 , 255 , 255 , 255 , 255 } , { 0 , 4 , 6 , 7 , 255 , 255 , 255 , 255 } ,
+{ 1 , 4 , 6 , 7 , 255 , 255 , 255 , 255 } , { 0 , 1 , 4 , 6 , 7 , 255 , 255 , 255 } ,
+{ 2 , 4 , 6 , 7 , 255 , 255 , 255 , 255 } , { 0 , 2 , 4 , 6 , 7 , 255 , 255 , 255 } ,
+{ 1 , 2 , 4 , 6 , 7 , 255 , 255 , 255 } , { 0 , 1 , 2 , 4 , 6 , 7 , 255 , 255 } ,
+{ 3 , 4 , 6 , 7 , 255 , 255 , 255 , 255 } , { 0 , 3 , 4 , 6 , 7 , 255 , 255 , 255 } ,
+{ 1 , 3 , 4 , 6 , 7 , 255 , 255 , 255 } , { 0 , 1 , 3 , 4 , 6 , 7 , 255 , 255 } ,
+{ 2 , 3 , 4 , 6 , 7 , 255 , 255 , 255 } , { 0 , 2 , 3 , 4 , 6 , 7 , 255 , 255 } ,
+{ 1 , 2 , 3 , 4 , 6 , 7 , 255 , 255 } , { 0 , 1 , 2 , 3 , 4 , 6 , 7 , 255 } ,
+{ 5 , 6 , 7 , 255 , 255 , 255 , 255 , 255 } , { 0 , 5 , 6 , 7 , 255 , 255 , 255 , 255 } ,
+{ 1 , 5 , 6 , 7 , 255 , 255 , 255 , 255 } , { 0 , 1 , 5 , 6 , 7 , 255 , 255 , 255 } ,
+{ 2 , 5 , 6 , 7 , 255 , 255 , 255 , 255 } , { 0 , 2 , 5 , 6 , 7 , 255 , 255 , 255 } ,
+{ 1 , 2 , 5 , 6 , 7 , 255 , 255 , 255 } , { 0 , 1 , 2 , 5 , 6 , 7 , 255 , 255 } ,
+{ 3 , 5 , 6 , 7 , 255 , 255 , 255 , 255 } , { 0 , 3 , 5 , 6 , 7 , 255 , 255 , 255 } ,
+{ 1 , 3 , 5 , 6 , 7 , 255 , 255 , 255 } , { 0 , 1 , 3 , 5 , 6 , 7 , 255 , 255 } ,
+{ 2 , 3 , 5 , 6 , 7 , 255 , 255 , 255 } , { 0 , 2 , 3 , 5 , 6 , 7 , 255 , 255 } ,
+{ 1 , 2 , 3 , 5 , 6 , 7 , 255 , 255 } , { 0 , 1 , 2 , 3 , 5 , 6 , 7 , 255 } ,
+{ 4 , 5 , 6 , 7 , 255 , 255 , 255 , 255 } , { 0 , 4 , 5 , 6 , 7 , 255 , 255 , 255 } ,
+{ 1 , 4 , 5 , 6 , 7 , 255 , 255 , 255 } , { 0 , 1 , 4 , 5 , 6 , 7 , 255 , 255 } ,
+{ 2 , 4 , 5 , 6 , 7 , 255 , 255 , 255 } , { 0 , 2 , 4 , 5 , 6 , 7 , 255 , 255 } ,
+{ 1 , 2 , 4 , 5 , 6 , 7 , 255 , 255 } , { 0 , 1 , 2 , 4 , 5 , 6 , 7 , 255 } ,
+{ 3 , 4 , 5 , 6 , 7 , 255 , 255 , 255 } , { 0 , 3 , 4 , 5 , 6 , 7 , 255 , 255 } ,
+{ 1 , 3 , 4 , 5 , 6 , 7 , 255 , 255 } , { 0 , 1 , 3 , 4 , 5 , 6 , 7 , 255 } ,
+{ 2 , 3 , 4 , 5 , 6 , 7 , 255 , 255 } , { 0 , 2 , 3 , 4 , 5 , 6 , 7 , 255 } ,
+{ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 255 } , { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 } };
+
+#endif
diff --git a/girepository/cmph/vqueue.c b/girepository/cmph/vqueue.c
new file mode 100644 (file)
index 0000000..0619dd7
--- /dev/null
@@ -0,0 +1,51 @@
+#include "vqueue.h"
+#include <stdio.h>
+#include <assert.h>
+#include <stdlib.h>
+struct __vqueue_t
+{
+  cmph_uint32 * values;
+  cmph_uint32 beg, end, capacity;
+};
+
+vqueue_t * vqueue_new(cmph_uint32 capacity)
+{
+  size_t capacity_plus_one = capacity + 1;
+  vqueue_t *q = (vqueue_t *)malloc(sizeof(vqueue_t));
+  assert(q);
+  q->values = (cmph_uint32 *)calloc(capacity_plus_one, sizeof(cmph_uint32));
+  q->beg = q->end = 0;
+  q->capacity = (cmph_uint32) capacity_plus_one;
+  return q;
+}
+
+cmph_uint8 vqueue_is_empty(vqueue_t * q)
+{
+  return (cmph_uint8)(q->beg == q->end);
+}
+
+void vqueue_insert(vqueue_t * q, cmph_uint32 val)
+{
+  assert((q->end + 1)%q->capacity != q->beg); // Is queue full?
+  q->end = (q->end + 1)%q->capacity;
+  q->values[q->end] = val;
+}
+
+cmph_uint32 vqueue_remove(vqueue_t * q)
+{
+  assert(!vqueue_is_empty(q)); // Is queue empty?
+  q->beg = (q->beg + 1)%q->capacity;
+  return q->values[q->beg];
+}
+
+void vqueue_print(vqueue_t * q)
+{
+  cmph_uint32 i;
+  for (i = q->beg; i != q->end; i = (i + 1)%q->capacity)
+    fprintf(stderr, "%u\n", q->values[(i + 1)%q->capacity]);
+} 
+
+void vqueue_destroy(vqueue_t *q)
+{
+  free(q->values); q->values = NULL; free(q);
+}
diff --git a/girepository/cmph/vqueue.h b/girepository/cmph/vqueue.h
new file mode 100644 (file)
index 0000000..86fccab
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef __CMPH_VQUEUE_H__
+#define __CMPH_VQUEUE_H__
+
+#include "cmph_types.h"
+typedef struct __vqueue_t vqueue_t;
+
+vqueue_t * vqueue_new(cmph_uint32 capacity);
+
+cmph_uint8 vqueue_is_empty(vqueue_t * q);
+
+void vqueue_insert(vqueue_t * q, cmph_uint32 val);
+
+cmph_uint32 vqueue_remove(vqueue_t * q);
+
+void vqueue_print(vqueue_t * q);
+
+void vqueue_destroy(vqueue_t * q);
+#endif
diff --git a/girepository/cmph/vstack.c b/girepository/cmph/vstack.c
new file mode 100644 (file)
index 0000000..96f5380
--- /dev/null
@@ -0,0 +1,79 @@
+#include "vstack.h"
+
+#include <stdlib.h>
+#include <assert.h>
+
+//#define DEBUG
+#include "debug.h"
+
+struct __vstack_t
+{
+       cmph_uint32 pointer;
+       cmph_uint32 *values;
+       cmph_uint32 capacity;
+};
+
+vstack_t *vstack_new(void)
+{
+       vstack_t *stack = (vstack_t *)malloc(sizeof(vstack_t));
+       assert(stack);
+       stack->pointer = 0;
+       stack->values = NULL;
+       stack->capacity = 0;
+       return stack;
+}
+
+void vstack_destroy(vstack_t *stack)
+{
+       assert(stack);
+       free(stack->values);
+       free(stack);
+}
+
+void vstack_push(vstack_t *stack, cmph_uint32 val)
+{
+       assert(stack);
+       vstack_reserve(stack, stack->pointer + 1);
+       stack->values[stack->pointer] = val;
+       ++(stack->pointer);
+}
+void vstack_pop(vstack_t *stack)
+{
+       assert(stack);
+       assert(stack->pointer > 0);
+       --(stack->pointer);
+}
+
+cmph_uint32 vstack_top(vstack_t *stack)
+{
+       assert(stack);
+       assert(stack->pointer > 0);
+       return stack->values[(stack->pointer - 1)];
+}
+int vstack_empty(vstack_t *stack)
+{
+       assert(stack);
+       return stack->pointer == 0;
+}
+cmph_uint32 vstack_size(vstack_t *stack)
+{
+       return stack->pointer;
+}
+void vstack_reserve(vstack_t *stack, cmph_uint32 size)
+{
+       assert(stack);
+       if (stack->capacity < size)
+       {
+               cmph_uint32 new_capacity = stack->capacity + 1;
+               DEBUGP("Increasing current capacity %u to %u\n", stack->capacity, size);
+               while (new_capacity     < size)
+               {
+                       new_capacity *= 2;
+               }
+               stack->values = (cmph_uint32 *)realloc(stack->values, sizeof(cmph_uint32)*new_capacity);
+               assert(stack->values);
+               stack->capacity = new_capacity;
+               DEBUGP("Increased\n");
+       }
+}
+               
diff --git a/girepository/cmph/vstack.h b/girepository/cmph/vstack.h
new file mode 100644 (file)
index 0000000..fecc7d5
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef __CMPH_VSTACK_H__
+#define __CMPH_VSTACK_H__
+
+#include "cmph_types.h"
+typedef struct __vstack_t vstack_t;
+
+vstack_t *vstack_new(void);
+void vstack_destroy(vstack_t *stack);
+
+void vstack_push(vstack_t *stack, cmph_uint32 val);
+cmph_uint32 vstack_top(vstack_t *stack);
+void vstack_pop(vstack_t *stack);
+int vstack_empty(vstack_t *stack);
+cmph_uint32 vstack_size(vstack_t *stack);
+
+void vstack_reserve(vstack_t *stack, cmph_uint32 size);
+
+#endif
diff --git a/girepository/gdump.c b/girepository/gdump.c
new file mode 100644 (file)
index 0000000..7e02d39
--- /dev/null
@@ -0,0 +1,564 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Dump introspection data
+ *
+ * Copyright (C) 2008 Colin Walters <walters@verbum.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 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.
+ */
+
+#include <stdlib.h>
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gio/gio.h>
+
+/* This file is both compiled into libgirepository.so, and installed
+ * on the filesystem.  But for the dumper, we want to avoid linking
+ * to libgirepository; see
+ * https://bugzilla.gnome.org/show_bug.cgi?id=630342
+ */
+#ifdef G_IREPOSITORY_COMPILATION
+#include "config.h"
+#include "girepository.h"
+#endif
+
+#include <string.h>
+
+static void
+escaped_printf (GOutputStream *out, const char *fmt, ...)
+{
+  char *str;
+  va_list args;
+  gsize written;
+  GError *error = NULL;
+
+  va_start (args, fmt);
+
+  str = g_markup_vprintf_escaped (fmt, args);
+  if (!g_output_stream_write_all (out, str, strlen (str), &written, NULL, &error))
+    {
+      g_critical ("failed to write to iochannel: %s", error->message);
+      g_clear_error (&error);
+    }
+  g_free (str);
+
+  va_end (args);
+}
+
+static void
+goutput_write (GOutputStream *out, const char *str)
+{
+  gsize written;
+  GError *error = NULL;
+  if (!g_output_stream_write_all (out, str, strlen (str), &written, NULL, &error))
+    {
+      g_critical ("failed to write to iochannel: %s", error->message);
+      g_clear_error (&error);
+    }
+}
+
+typedef GType (*GetTypeFunc)(void);
+typedef GQuark (*ErrorQuarkFunc)(void);
+
+static GType
+invoke_get_type (GModule *self, const char *symbol, GError **error)
+{
+  GetTypeFunc sym;
+  GType ret;
+
+  if (!g_module_symbol (self, symbol, (void**)&sym))
+    {
+      g_set_error (error,
+                  G_IO_ERROR,
+                  G_IO_ERROR_FAILED,
+                  "Failed to find symbol '%s'", symbol);
+      return G_TYPE_INVALID;
+    }
+
+  ret = sym ();
+  if (ret == G_TYPE_INVALID)
+    {
+      g_set_error (error,
+                  G_IO_ERROR,
+                  G_IO_ERROR_FAILED,
+                  "Function '%s' returned G_TYPE_INVALID", symbol);
+    }
+  return ret;
+}
+
+static GQuark
+invoke_error_quark (GModule *self, const char *symbol, GError **error)
+{
+  ErrorQuarkFunc sym;
+
+  if (!g_module_symbol (self, symbol, (void**)&sym))
+    {
+      g_set_error (error,
+                  G_IO_ERROR,
+                  G_IO_ERROR_FAILED,
+                  "Failed to find symbol '%s'", symbol);
+      return G_TYPE_INVALID;
+    }
+
+  return sym ();
+}
+
+static void
+dump_properties (GType type, GOutputStream *out)
+{
+  guint i;
+  guint n_properties;
+  GParamSpec **props;
+
+  if (G_TYPE_FUNDAMENTAL (type) == G_TYPE_OBJECT)
+    {
+      GObjectClass *klass;
+      klass = g_type_class_ref (type);
+      props = g_object_class_list_properties (klass, &n_properties);
+    }
+  else
+    {
+      void *klass;
+      klass = g_type_default_interface_ref (type);
+      props = g_object_interface_list_properties (klass, &n_properties);
+    }
+
+  for (i = 0; i < n_properties; i++)
+    {
+      GParamSpec *prop;
+
+      prop = props[i];
+      if (prop->owner_type != type)
+       continue;
+
+      escaped_printf (out, "    <property name=\"%s\" type=\"%s\" flags=\"%d\"/>\n",
+                     prop->name, g_type_name (prop->value_type), prop->flags);
+    }
+  g_free (props);
+}
+
+static void
+dump_signals (GType type, GOutputStream *out)
+{
+  guint i;
+  guint n_sigs;
+  guint *sig_ids;
+
+  sig_ids = g_signal_list_ids (type, &n_sigs);
+  for (i = 0; i < n_sigs; i++)
+    {
+      guint sigid;
+      GSignalQuery query;
+      guint j;
+
+      sigid = sig_ids[i];
+      g_signal_query (sigid, &query);
+
+      escaped_printf (out, "    <signal name=\"%s\" return=\"%s\"",
+                     query.signal_name, g_type_name (query.return_type));
+
+      if (query.signal_flags & G_SIGNAL_RUN_FIRST)
+        escaped_printf (out, " when=\"first\"");
+      else if (query.signal_flags & G_SIGNAL_RUN_LAST)
+        escaped_printf (out, " when=\"last\"");
+      else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
+        escaped_printf (out, " when=\"cleanup\"");
+#if GLIB_CHECK_VERSION(2, 29, 15)
+      else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
+        escaped_printf (out, " when=\"must-collect\"");
+#endif
+      if (query.signal_flags & G_SIGNAL_NO_RECURSE)
+        escaped_printf (out, " no-recurse=\"1\"");
+
+      if (query.signal_flags & G_SIGNAL_DETAILED)
+        escaped_printf (out, " detailed=\"1\"");
+
+      if (query.signal_flags & G_SIGNAL_ACTION)
+        escaped_printf (out, " action=\"1\"");
+
+      if (query.signal_flags & G_SIGNAL_NO_HOOKS)
+        escaped_printf (out, " no-hooks=\"1\"");
+
+      goutput_write (out, ">\n");
+
+      for (j = 0; j < query.n_params; j++)
+       {
+         escaped_printf (out, "      <param type=\"%s\"/>\n",
+                         g_type_name (query.param_types[j]));
+       }
+      goutput_write (out, "    </signal>\n");
+    }
+}
+
+static void
+dump_object_type (GType type, const char *symbol, GOutputStream *out)
+{
+  guint n_interfaces;
+  guint i;
+  GType *interfaces;
+
+  escaped_printf (out, "  <class name=\"%s\" get-type=\"%s\"",
+                 g_type_name (type), symbol);
+  if (type != G_TYPE_OBJECT)
+    {
+      GString *parent_str;
+      GType parent;
+      gboolean first = TRUE;
+
+      parent = g_type_parent (type);
+      parent_str = g_string_new ("");
+      while (parent != G_TYPE_INVALID)
+        {
+          if (first)
+            first = FALSE;
+          else
+            g_string_append_c (parent_str, ',');
+          g_string_append (parent_str, g_type_name (parent));
+          parent = g_type_parent (parent);
+        }
+
+      escaped_printf (out, " parents=\"%s\"", parent_str->str);
+
+      g_string_free (parent_str, TRUE);
+    }
+
+  if (G_TYPE_IS_ABSTRACT (type))
+    escaped_printf (out, " abstract=\"1\"");
+  goutput_write (out, ">\n");
+
+  interfaces = g_type_interfaces (type, &n_interfaces);
+  for (i = 0; i < n_interfaces; i++)
+    {
+      GType itype = interfaces[i];
+      escaped_printf (out, "    <implements name=\"%s\"/>\n",
+                     g_type_name (itype));
+    }
+  dump_properties (type, out);
+  dump_signals (type, out);
+  goutput_write (out, "  </class>\n");
+}
+
+static void
+dump_interface_type (GType type, const char *symbol, GOutputStream *out)
+{
+  guint n_interfaces;
+  guint i;
+  GType *interfaces;
+
+  escaped_printf (out, "  <interface name=\"%s\" get-type=\"%s\">\n",
+                 g_type_name (type), symbol);
+
+  interfaces = g_type_interface_prerequisites (type, &n_interfaces);
+  for (i = 0; i < n_interfaces; i++)
+    {
+      GType itype = interfaces[i];
+      if (itype == G_TYPE_OBJECT)
+       {
+         /* Treat this as implicit for now; in theory GInterfaces are
+          * supported on things like GstMiniObject, but right now
+          * the introspection system only supports GObject.
+          * http://bugzilla.gnome.org/show_bug.cgi?id=559706
+          */
+         continue;
+       }
+      escaped_printf (out, "    <prerequisite name=\"%s\"/>\n",
+                     g_type_name (itype));
+    }
+  dump_properties (type, out);
+  dump_signals (type, out);
+  goutput_write (out, "  </interface>\n");
+}
+
+static void
+dump_boxed_type (GType type, const char *symbol, GOutputStream *out)
+{
+  escaped_printf (out, "  <boxed name=\"%s\" get-type=\"%s\"/>\n",
+                 g_type_name (type), symbol);
+}
+
+static void
+dump_flags_type (GType type, const char *symbol, GOutputStream *out)
+{
+  guint i;
+  GFlagsClass *klass;
+
+  klass = g_type_class_ref (type);
+  escaped_printf (out, "  <flags name=\"%s\" get-type=\"%s\">\n",
+                 g_type_name (type), symbol);
+
+  for (i = 0; i < klass->n_values; i++)
+    {
+      GFlagsValue *value = &(klass->values[i]);
+
+      escaped_printf (out, "    <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
+                     value->value_name, value->value_nick, value->value);
+    }
+  goutput_write (out, "  </flags>\n");
+}
+
+static void
+dump_enum_type (GType type, const char *symbol, GOutputStream *out)
+{
+  guint i;
+  GEnumClass *klass;
+
+  klass = g_type_class_ref (type);
+  escaped_printf (out, "  <enum name=\"%s\" get-type=\"%s\">\n",
+                 g_type_name (type), symbol);
+
+  for (i = 0; i < klass->n_values; i++)
+    {
+      GEnumValue *value = &(klass->values[i]);
+
+      escaped_printf (out, "    <member name=\"%s\" nick=\"%s\" value=\"%d\"/>\n",
+                     value->value_name, value->value_nick, value->value);
+    }
+  goutput_write (out, "  </enum>");
+}
+
+static void
+dump_fundamental_type (GType type, const char *symbol, GOutputStream *out)
+{
+  guint n_interfaces;
+  guint i;
+  GType *interfaces;
+  GString *parent_str;
+  GType parent;
+  gboolean first = TRUE;
+
+
+  escaped_printf (out, "  <fundamental name=\"%s\" get-type=\"%s\"",
+                 g_type_name (type), symbol);
+
+  if (G_TYPE_IS_ABSTRACT (type))
+    escaped_printf (out, " abstract=\"1\"");
+
+  if (G_TYPE_IS_INSTANTIATABLE (type))
+    escaped_printf (out, " instantiatable=\"1\"");
+
+  parent = g_type_parent (type);
+  parent_str = g_string_new ("");
+  while (parent != G_TYPE_INVALID)
+    {
+      if (first)
+        first = FALSE;
+      else
+        g_string_append_c (parent_str, ',');
+      if (!g_type_name (parent))
+        break;
+      g_string_append (parent_str, g_type_name (parent));
+      parent = g_type_parent (parent);
+    }
+
+  if (parent_str->len > 0)
+    escaped_printf (out, " parents=\"%s\"", parent_str->str);
+  g_string_free (parent_str, TRUE);
+
+  goutput_write (out, ">\n");
+
+  interfaces = g_type_interfaces (type, &n_interfaces);
+  for (i = 0; i < n_interfaces; i++)
+    {
+      GType itype = interfaces[i];
+      escaped_printf (out, "    <implements name=\"%s\"/>\n",
+                     g_type_name (itype));
+    }
+  goutput_write (out, "  </fundamental>\n");
+}
+
+static void
+dump_type (GType type, const char *symbol, GOutputStream *out)
+{
+  switch (g_type_fundamental (type))
+    {
+    case G_TYPE_OBJECT:
+      dump_object_type (type, symbol, out);
+      break;
+    case G_TYPE_INTERFACE:
+      dump_interface_type (type, symbol, out);
+      break;
+    case G_TYPE_BOXED:
+      dump_boxed_type (type, symbol, out);
+      break;
+    case G_TYPE_FLAGS:
+      dump_flags_type (type, symbol, out);
+      break;
+    case G_TYPE_ENUM:
+      dump_enum_type (type, symbol, out);
+      break;
+    case G_TYPE_POINTER:
+      /* GValue, etc.  Just skip them. */
+      break;
+    default:
+      dump_fundamental_type (type, symbol, out);
+      break;
+    }
+}
+
+static void
+dump_error_quark (GQuark quark, const char *symbol, GOutputStream *out)
+{
+  escaped_printf (out, "  <error-quark function=\"%s\" domain=\"%s\"/>\n",
+                 symbol, g_quark_to_string (quark));
+}
+
+/**
+ * g_irepository_dump:
+ * @arg: Comma-separated pair of input and output filenames
+ * @error: a %GError
+ *
+ * Argument specified is a comma-separated pair of filenames; i.e. of
+ * the form "input.txt,output.xml".  The input file should be a
+ * UTF-8 Unix-line-ending text file, with each line containing the name
+ * of a GType _get_type function.
+ *
+ * The output file should already exist, but be empty.  This function will
+ * overwrite its contents.
+ *
+ * Returns: %TRUE on success, %FALSE on error
+ */
+#ifndef G_IREPOSITORY_COMPILATION
+static gboolean
+dump_irepository (const char *arg, GError **error) G_GNUC_UNUSED;
+static gboolean
+dump_irepository (const char *arg, GError **error)
+#else
+gboolean
+g_irepository_dump (const char *arg, GError **error)
+#endif
+{
+  GHashTable *output_types;
+  char **args;
+  GFile *input_file;
+  GFile *output_file;
+  GFileInputStream *input;
+  GFileOutputStream *output;
+  GDataInputStream *in;
+  GModule *self;
+  gboolean caught_error = FALSE;
+
+  self = g_module_open (NULL, 0);
+  if (!self)
+    {
+      g_set_error (error,
+                  G_IO_ERROR,
+                  G_IO_ERROR_FAILED,
+                  "failed to open self: %s",
+                  g_module_error ());
+      return FALSE;
+    }
+
+  args = g_strsplit (arg, ",", 2);
+
+  input_file = g_file_new_for_path (args[0]);
+  output_file = g_file_new_for_path (args[1]);
+
+  input = g_file_read (input_file, NULL, error);
+  if (input == NULL)
+    return FALSE;
+
+  output = g_file_replace (output_file, NULL, FALSE, 0, NULL, error);
+  if (output == NULL)
+    {
+      g_input_stream_close (G_INPUT_STREAM (input), NULL, NULL);
+      return FALSE;
+    }
+
+  goutput_write (G_OUTPUT_STREAM (output), "<?xml version=\"1.0\"?>\n");
+  goutput_write (G_OUTPUT_STREAM (output), "<dump>\n");
+
+  output_types = g_hash_table_new (NULL, NULL);
+
+  in = g_data_input_stream_new (G_INPUT_STREAM (input));
+  g_object_unref (input);
+
+  while (TRUE)
+    {
+      gsize len;
+      char *line = g_data_input_stream_read_line (in, &len, NULL, NULL);
+      const char *function;
+
+      if (line == NULL || *line == '\0')
+        {
+          g_free (line);
+          break;
+        }
+
+      g_strchomp (line);
+
+      if (strncmp (line, "get-type:", strlen ("get-type:")) == 0)
+        {
+          GType type;
+
+          function = line + strlen ("get-type:");
+
+          type = invoke_get_type (self, function, error);
+
+          if (type == G_TYPE_INVALID)
+            {
+              g_printerr ("Invalid GType function: '%s'\n", function);
+              caught_error = TRUE;
+              g_free (line);
+              break;
+            }
+
+          if (g_hash_table_lookup (output_types, (gpointer) type))
+            goto next;
+          g_hash_table_insert (output_types, (gpointer) type, (gpointer) type);
+
+          dump_type (type, function, G_OUTPUT_STREAM (output));
+        }
+      else if (strncmp (line, "error-quark:", strlen ("error-quark:")) == 0)
+        {
+          GQuark quark;
+          function = line + strlen ("error-quark:");
+          quark = invoke_error_quark (self, function, error);
+
+          if (quark == 0)
+            {
+              g_printerr ("Invalid error quark function: '%s'\n", function);
+              caught_error = TRUE;
+              g_free (line);
+              break;
+            }
+
+          dump_error_quark (quark, function, G_OUTPUT_STREAM (output));
+        }
+
+
+    next:
+      g_free (line);
+    }
+
+  g_hash_table_destroy (output_types);
+
+  goutput_write (G_OUTPUT_STREAM (output), "</dump>\n");
+
+  {
+    GError **ioerror;
+    /* Avoid overwriting an earlier set error */
+    if (caught_error)
+      ioerror = NULL;
+    else
+      ioerror = error;
+    if (!g_input_stream_close (G_INPUT_STREAM (in), NULL, ioerror))
+      return FALSE;
+    if (!g_output_stream_close (G_OUTPUT_STREAM (output), NULL, ioerror))
+      return FALSE;
+  }
+
+  return !caught_error;
+}
diff --git a/girepository/gi-dump-types.c b/girepository/gi-dump-types.c
new file mode 100644 (file)
index 0000000..13e7ae6
--- /dev/null
@@ -0,0 +1,35 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+#include "gdump.c"
+#include <gio/gunixoutputstream.h>
+
+int
+main (int    argc,
+      char **argv)
+{
+  int i;
+  GOutputStream *stdout;
+  GModule *self;
+
+  g_type_init ();
+
+  stdout = g_unix_output_stream_new (1, FALSE);
+
+  self = g_module_open (NULL, 0);
+
+  for (i = 1; i < argc; i++)
+    {
+      GError *error = NULL;
+      GType type;
+
+      type = invoke_get_type (self, argv[i], &error);
+      if (!type)
+       {
+         g_printerr ("%s\n", error->message);
+         g_clear_error (&error);
+       }
+      else
+       dump_type (type, argv[i], stdout);
+    }
+
+  return 0;
+}
diff --git a/girepository/giarginfo.c b/girepository/giarginfo.c
new file mode 100644 (file)
index 0000000..d61f4be
--- /dev/null
@@ -0,0 +1,331 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Argument implementation
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#include <glib.h>
+
+#include "gitypelib-internal.h"
+#include "girepository-private.h"
+
+
+/* GIArgInfo function */
+
+/**
+ * SECTION:giarginfo
+ * @Short_description: Struct representing an argument
+ * @Title: GIArgInfo
+ *
+ * GIArgInfo represents an argument. An argument is always
+ * part of a #GICallableInfo.
+ *
+ * <refsect1 id="gi-giarginfo.struct-hierarchy" role="struct_hierarchy">
+ * <title role="struct_hierarchy.title">Struct hierarchy</title>
+ * <synopsis>
+ *   <link linkend="gi-GIBaseInfo">GIBaseInfo</link>
+ *    +----GIArgInfo
+ * </synopsis>
+ * </refsect1>
+ */
+
+/**
+ * g_arg_info_get_direction:
+ * @info: a #GIArgInfo
+ *
+ * Obtain the direction of the argument. Check #GIDirection for possible
+ * direction values.
+ *
+ * Returns: the direction
+ */
+GIDirection
+g_arg_info_get_direction (GIArgInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ArgBlob *blob;
+
+  g_return_val_if_fail (info != NULL, -1);
+  g_return_val_if_fail (GI_IS_ARG_INFO (info), -1);
+
+  blob = (ArgBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  if (blob->in && blob->out)
+    return GI_DIRECTION_INOUT;
+  else if (blob->out)
+    return GI_DIRECTION_OUT;
+  else
+    return GI_DIRECTION_IN;
+}
+
+/**
+ * g_arg_info_is_return_value:
+ * @info: a #GIArgInfo
+ *
+ * Obtain if the argument is a return value. It can either be a
+ * parameter or a return value.
+ *
+ * Returns: %TRUE if it is a return value
+ */
+gboolean
+g_arg_info_is_return_value (GIArgInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ArgBlob *blob;
+
+  g_return_val_if_fail (info != NULL, FALSE);
+  g_return_val_if_fail (GI_IS_ARG_INFO (info), FALSE);
+
+  blob = (ArgBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->return_value;
+}
+
+/**
+ * g_arg_info_is_caller_allocates:
+ * @info: a #GIArgInfo
+ *
+ * Obtain if the argument is a pointer to a struct or object that will
+ * receive an output of a function.  The default assumption for
+ * %GI_DIRECTION_OUT arguments which have allocation is that the
+ * callee allocates; if this is %TRUE, then the caller must allocate.
+ *
+ * Returns: %TRUE if caller is required to have allocated the argument
+ */
+gboolean
+g_arg_info_is_caller_allocates (GIArgInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ArgBlob *blob;
+
+  g_return_val_if_fail (info != NULL, FALSE);
+  g_return_val_if_fail (GI_IS_ARG_INFO (info), FALSE);
+
+  blob = (ArgBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->caller_allocates;
+}
+
+/**
+ * g_arg_info_is_optional:
+ * @info: a #GIArgInfo
+ *
+ * Obtain if the argument is optional.
+ *
+ * Returns: %TRUE if it is an optional argument
+ */
+gboolean
+g_arg_info_is_optional (GIArgInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ArgBlob *blob;
+
+  g_return_val_if_fail (info != NULL, FALSE);
+  g_return_val_if_fail (GI_IS_ARG_INFO (info), FALSE);
+
+  blob = (ArgBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->optional;
+}
+
+/**
+ * g_arg_info_may_be_null:
+ * @info: a #GIArgInfo
+ *
+ * Obtain if the argument accepts %NULL.
+ *
+ * Returns: %TRUE if it accepts %NULL
+ */
+gboolean
+g_arg_info_may_be_null (GIArgInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ArgBlob *blob;
+
+  g_return_val_if_fail (info != NULL, FALSE);
+  g_return_val_if_fail (GI_IS_ARG_INFO (info), FALSE);
+
+  blob = (ArgBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->allow_none;
+}
+
+/**
+ * g_arg_info_is_skip:
+ * @info: a #GIArgInfo
+ *
+ * Obtain if an argument is only useful in C.
+ *
+ * Returns: %TRUE if argument is only useful in C.
+ * Since: 1.29.0
+ */
+gboolean
+g_arg_info_is_skip (GIArgInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ArgBlob *blob;
+
+  g_return_val_if_fail (info != NULL, FALSE);
+  g_return_val_if_fail (GI_IS_ARG_INFO (info), FALSE);
+
+  blob = (ArgBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->skip;
+}
+
+/**
+ * g_arg_info_get_ownership_transfer:
+ * @info: a #GIArgInfo
+ *
+ * Obtain the ownership transfer for this argument.
+ * #GITransfer contains a list of possible values.
+ *
+ * Returns: the transfer
+ */
+GITransfer
+g_arg_info_get_ownership_transfer (GIArgInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ArgBlob *blob;
+
+  g_return_val_if_fail (info != NULL, -1);
+  g_return_val_if_fail (GI_IS_ARG_INFO (info), -1);
+
+  blob = (ArgBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  if (blob->transfer_ownership)
+    return GI_TRANSFER_EVERYTHING;
+  else if (blob->transfer_container_ownership)
+    return GI_TRANSFER_CONTAINER;
+  else
+    return GI_TRANSFER_NOTHING;
+}
+
+/**
+ * g_arg_info_get_scope:
+ * @info: a #GIArgInfo
+ *
+ * Obtain the scope type for this argument. The scope type explains
+ * how a callback is going to be invoked, most importantly when
+ * the resources required to invoke it can be freed.
+ * #GIScopeType contains a list of possible values.
+ *
+ * Returns: the scope type
+ */
+GIScopeType
+g_arg_info_get_scope (GIArgInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ArgBlob *blob;
+
+  g_return_val_if_fail (info != NULL, -1);
+  g_return_val_if_fail (GI_IS_ARG_INFO (info), -1);
+
+  blob = (ArgBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->scope;
+}
+
+/**
+ * g_arg_info_get_closure:
+ * @info: a #GIArgInfo
+ *
+ * Obtain the index of the user data argument. This is only valid
+ * for arguments which are callbacks.
+ *
+ * Returns: index of the user data argument or -1 if there is none
+ */
+gint
+g_arg_info_get_closure (GIArgInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ArgBlob *blob;
+
+  g_return_val_if_fail (info != NULL, -1);
+  g_return_val_if_fail (GI_IS_ARG_INFO (info), -1);
+
+  blob = (ArgBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->closure;
+}
+
+/**
+ * g_arg_info_get_destroy:
+ * @info: a #GIArgInfo
+ *
+ * Obtains the index of the #GDestroyNotify argument. This is only valid
+ * for arguments which are callbacks.
+ *
+ * Returns: index of the #GDestroyNotify argument or -1 if there is none
+ */
+gint
+g_arg_info_get_destroy (GIArgInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ArgBlob *blob;
+
+  g_return_val_if_fail (info != NULL, -1);
+  g_return_val_if_fail (GI_IS_ARG_INFO (info), -1);
+
+  blob = (ArgBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->destroy;
+}
+
+/**
+ * g_arg_info_get_type:
+ * @info: a #GIArgInfo
+ *
+ * Obtain the type information for @info.
+ *
+ * Returns: (transfer full): the #GIArgInfo, free it with
+ * g_base_info_unref() when done.
+ */
+GITypeInfo *
+g_arg_info_get_type (GIArgInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_ARG_INFO (info), NULL);
+
+  return _g_type_info_new ((GIBaseInfo*)info, rinfo->typelib, rinfo->offset + G_STRUCT_OFFSET (ArgBlob, arg_type));
+}
+
+/**
+ * g_arg_info_load_type:
+ * @info: a #GIArgInfo
+ * @type: (out caller-allocates): Initialized with information about type of @info
+ *
+ * Obtain information about a the type of given argument @info; this
+ * function is a variant of g_arg_info_get_type() designed for stack
+ * allocation.
+ *
+ * The initialized @type must not be referenced after @info is deallocated.
+ */
+void
+g_arg_info_load_type (GIArgInfo  *info,
+                      GITypeInfo *type)
+{
+  GIRealInfo *rinfo = (GIRealInfo*) info;
+
+  g_return_if_fail (info != NULL);
+  g_return_if_fail (GI_IS_ARG_INFO (info));
+
+  _g_type_info_init (type, (GIBaseInfo*)info, rinfo->typelib, rinfo->offset + G_STRUCT_OFFSET (ArgBlob, arg_type));
+}
diff --git a/girepository/giarginfo.h b/girepository/giarginfo.h
new file mode 100644 (file)
index 0000000..3f4163e
--- /dev/null
@@ -0,0 +1,52 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Argument
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#ifndef __GIARGINFO_H__
+#define __GIARGINFO_H__
+
+#if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
+#error "Only <girepository.h> can be included directly."
+#endif
+
+#include <gitypes.h>
+
+G_BEGIN_DECLS
+
+#define GI_IS_ARG_INFO(info) \
+    (g_base_info_get_type((GIBaseInfo*)info) ==  GI_INFO_TYPE_ARG)
+
+GIDirection            g_arg_info_get_direction          (GIArgInfo *info);
+gboolean               g_arg_info_is_return_value        (GIArgInfo *info);
+gboolean               g_arg_info_is_optional            (GIArgInfo *info);
+gboolean               g_arg_info_is_caller_allocates    (GIArgInfo *info);
+gboolean               g_arg_info_may_be_null            (GIArgInfo *info);
+gboolean               g_arg_info_is_skip                (GIArgInfo *info);
+GITransfer             g_arg_info_get_ownership_transfer (GIArgInfo *info);
+GIScopeType            g_arg_info_get_scope              (GIArgInfo *info);
+gint                   g_arg_info_get_closure            (GIArgInfo *info);
+gint                   g_arg_info_get_destroy            (GIArgInfo *info);
+GITypeInfo *           g_arg_info_get_type               (GIArgInfo *info);
+void                   g_arg_info_load_type              (GIArgInfo *info,
+                                                          GITypeInfo *type);
+G_END_DECLS
+
+#endif  /* __GIARGINFO_H__ */
diff --git a/girepository/gibaseinfo.c b/girepository/gibaseinfo.c
new file mode 100644 (file)
index 0000000..ff9c939
--- /dev/null
@@ -0,0 +1,660 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Base struct implementation
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include "gitypelib-internal.h"
+#include "girepository-private.h"
+
+#define INVALID_REFCOUNT 0x7FFFFFFF
+
+/* GBoxed registration of BaseInfo. */
+GType
+g_base_info_gtype_get_type (void)
+{
+  static GType our_type = 0;
+  
+  if (our_type == 0)
+    our_type =
+        g_boxed_type_register_static ("GIBaseInfo",
+                                      (GBoxedCopyFunc) g_base_info_ref,
+                                      (GBoxedFreeFunc) g_base_info_unref);
+
+  return our_type;
+}
+
+/* info creation */
+GIBaseInfo *
+_g_info_new_full (GIInfoType     type,
+                  GIRepository  *repository,
+                  GIBaseInfo    *container,
+                  GITypelib      *typelib,
+                  guint32        offset)
+{
+  GIRealInfo *info;
+
+  g_return_val_if_fail (container != NULL || repository != NULL, NULL);
+
+  info = g_slice_new (GIRealInfo);
+
+  _g_info_init (info, type, repository, container, typelib, offset);
+  info->ref_count = 1;
+
+  if (container && ((GIRealInfo *) container)->ref_count != INVALID_REFCOUNT)
+    g_base_info_ref (info->container);
+
+  g_object_ref (info->repository);
+
+  return (GIBaseInfo*)info;
+}
+
+GIBaseInfo *
+g_info_new (GIInfoType     type,
+            GIBaseInfo    *container,
+            GITypelib      *typelib,
+            guint32        offset)
+{
+  return _g_info_new_full (type, ((GIRealInfo*)container)->repository, container, typelib, offset);
+}
+
+void
+_g_info_init (GIRealInfo     *info,
+              GIInfoType      type,
+              GIRepository   *repository,
+              GIBaseInfo     *container,
+              GITypelib       *typelib,
+              guint32         offset)
+{
+  memset (info, 0, sizeof (GIRealInfo));
+
+  /* Invalid refcount used to flag stack-allocated infos */
+  info->ref_count = INVALID_REFCOUNT;
+  info->type = type;
+
+  info->typelib = typelib;
+  info->offset = offset;
+
+  if (container)
+    info->container = container;
+
+  g_assert (G_IS_IREPOSITORY (repository));
+  info->repository = repository;
+}
+
+GIBaseInfo *
+_g_info_from_entry (GIRepository *repository,
+                    GITypelib     *typelib,
+                    guint16       index)
+{
+  GIBaseInfo *result;
+  DirEntry *entry = g_typelib_get_dir_entry (typelib, index);
+
+  if (entry->local)
+    result = _g_info_new_full (entry->blob_type, repository, NULL, typelib, entry->offset);
+  else
+    {
+      const gchar *namespace = g_typelib_get_string (typelib, entry->offset);
+      const gchar *name = g_typelib_get_string (typelib, entry->name);
+
+      result = g_irepository_find_by_name (repository, namespace, name);
+      if (result == NULL)
+        {
+          GIUnresolvedInfo *unresolved;
+
+          unresolved = g_slice_new0 (GIUnresolvedInfo);
+
+          unresolved->type = GI_INFO_TYPE_UNRESOLVED;
+          unresolved->ref_count = 1;
+          unresolved->repository = g_object_ref (repository);
+          unresolved->container = NULL;
+          unresolved->name = name;
+          unresolved->namespace = namespace;
+
+          return (GIBaseInfo *)unresolved;
+       }
+      return (GIBaseInfo *)result;
+    }
+
+  return (GIBaseInfo *)result;
+}
+
+GITypeInfo *
+_g_type_info_new (GIBaseInfo    *container,
+                 GITypelib      *typelib,
+                guint32        offset)
+{
+  SimpleTypeBlob *type = (SimpleTypeBlob *)&typelib->data[offset];
+
+  return (GITypeInfo *) g_info_new (GI_INFO_TYPE_TYPE, container, typelib,
+                                    (type->flags.reserved == 0 && type->flags.reserved2 == 0) ? offset : type->offset);
+}
+
+void
+_g_type_info_init (GIBaseInfo *info,
+                   GIBaseInfo *container,
+                   GITypelib   *typelib,
+                   guint32     offset)
+{
+  GIRealInfo *rinfo = (GIRealInfo*)container;
+  SimpleTypeBlob *type = (SimpleTypeBlob *)&typelib->data[offset];
+
+  _g_info_init ((GIRealInfo*)info, GI_INFO_TYPE_TYPE, rinfo->repository, container, typelib,
+                (type->flags.reserved == 0 && type->flags.reserved2 == 0) ? offset : type->offset);
+}
+
+/* GIBaseInfo functions */
+
+/**
+ * SECTION:gibaseinfo
+ * @Short_description: Base struct for all GITypelib structs
+ * @Title: GIBaseInfo
+ *
+ * GIBaseInfo is the common base struct of all other *Info structs
+ * accessible through the #GIRepository API.
+ * All other structs can be casted to a #GIBaseInfo, for instance:
+ * <example>
+ * <title>Casting a #GIFunctionInfo to #GIBaseInfo</title>
+ * <programlisting>
+ *    GIFunctionInfo *function_info = ...;
+ *    GIBaseInfo *info = (GIBaseInfo*)function_info;
+ * </programlisting>
+ * </example>
+ * Most #GIRepository APIs returning a #GIBaseInfo is actually creating a new struct, in other
+ * words, g_base_info_unref() has to be called when done accessing the data.
+ * GIBaseInfos are normally accessed by calling either
+ * g_irepository_find_by_name(), g_irepository_find_by_gtype() or g_irepository_get_info().
+ *
+ * <example>
+ * <title>Getting the Button of the Gtk typelib</title>
+ * <programlisting>
+ *    GIBaseInfo *button_info = g_irepository_find_by_name(NULL, "Gtk", "Button");
+ *    ... use button_info ...
+ *    g_base_info_unref(button_info);
+ * </programlisting>
+ * </example>
+ *
+ * <refsect1 id="gi-gibaseinfo.struct-hierarchy" role="struct_hierarchy">
+ * <title role="struct_hierarchy.title">Struct hierarchy</title>
+ * <synopsis>
+ *   GIBaseInfo
+ *    +----<link linkend="gi-GIArgInfo">GIArgInfo</link>
+ *    +----<link linkend="gi-GICallableInfo">GICallableInfo</link>
+ *    +----<link linkend="gi-GIConstantInfo">GIConstantInfo</link>
+ *    +----<link linkend="gi-GIFieldInfo">GIFieldInfo</link>
+ *    +----<link linkend="gi-GIPropertyInfo">GIPropertyInfo</link>
+ *    +----<link linkend="gi-GIRegisteredTypeInfo">GIRegisteredTypeInfo</link>
+ *    +----<link linkend="gi-GITypeInfo">GITypeInfo</link>
+ * </synopsis>
+ * </refsect1>
+ *
+ */
+
+/**
+ * g_base_info_ref: (skip)
+ * @info: a #GIBaseInfo
+ *
+ * Increases the reference count of @info.
+ *
+ * Returns: the same @info.
+ */
+GIBaseInfo *
+g_base_info_ref (GIBaseInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo*)info;
+
+  g_assert (rinfo->ref_count != INVALID_REFCOUNT);
+  ((GIRealInfo*)info)->ref_count++;
+
+  return info;
+}
+
+/**
+ * g_base_info_unref: (skip)
+ * @info: a #GIBaseInfo
+ *
+ * Decreases the reference count of @info. When its reference count
+ * drops to 0, the info is freed.
+ */
+void
+g_base_info_unref (GIBaseInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo*)info;
+
+  g_assert (rinfo->ref_count > 0 && rinfo->ref_count != INVALID_REFCOUNT);
+  rinfo->ref_count--;
+
+  if (!rinfo->ref_count)
+    {
+      if (rinfo->container && ((GIRealInfo *) rinfo->container)->ref_count != INVALID_REFCOUNT)
+        g_base_info_unref (rinfo->container);
+
+      if (rinfo->repository)
+        g_object_unref (rinfo->repository);
+
+      if (rinfo->type == GI_INFO_TYPE_UNRESOLVED)
+        g_slice_free (GIUnresolvedInfo, (GIUnresolvedInfo *) rinfo);
+      else
+        g_slice_free (GIRealInfo, rinfo);
+    }
+}
+
+/**
+ * g_base_info_get_type:
+ * @info: a #GIBaseInfo
+ *
+ * Obtain the info type of the GIBaseInfo.
+ *
+ * Returns: the info type of @info
+ */
+GIInfoType
+g_base_info_get_type (GIBaseInfo *info)
+{
+
+  return ((GIRealInfo*)info)->type;
+}
+
+/**
+ * g_base_info_get_name:
+ * @info: a #GIBaseInfo
+ *
+ * Obtain the name of the @info. What the name represents depends on
+ * the #GIInfoType of the @info. For instance for #GIFunctionInfo it is
+ * the name of the function.
+ *
+ * Returns: the name of @info or %NULL if it lacks a name.
+ */
+const gchar *
+g_base_info_get_name (GIBaseInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo*)info;
+  g_assert (rinfo->ref_count > 0);
+  switch (rinfo->type)
+    {
+    case GI_INFO_TYPE_FUNCTION:
+    case GI_INFO_TYPE_CALLBACK:
+    case GI_INFO_TYPE_STRUCT:
+    case GI_INFO_TYPE_BOXED:
+    case GI_INFO_TYPE_ENUM:
+    case GI_INFO_TYPE_FLAGS:
+    case GI_INFO_TYPE_OBJECT:
+    case GI_INFO_TYPE_INTERFACE:
+    case GI_INFO_TYPE_CONSTANT:
+    case GI_INFO_TYPE_INVALID_0:
+    case GI_INFO_TYPE_UNION:
+      {
+        CommonBlob *blob = (CommonBlob *)&rinfo->typelib->data[rinfo->offset];
+
+        return g_typelib_get_string (rinfo->typelib, blob->name);
+      }
+      break;
+
+    case GI_INFO_TYPE_VALUE:
+      {
+        ValueBlob *blob = (ValueBlob *)&rinfo->typelib->data[rinfo->offset];
+
+        return g_typelib_get_string (rinfo->typelib, blob->name);
+      }
+      break;
+
+    case GI_INFO_TYPE_SIGNAL:
+      {
+        SignalBlob *blob = (SignalBlob *)&rinfo->typelib->data[rinfo->offset];
+
+        return g_typelib_get_string (rinfo->typelib, blob->name);
+      }
+      break;
+
+    case GI_INFO_TYPE_PROPERTY:
+      {
+        PropertyBlob *blob = (PropertyBlob *)&rinfo->typelib->data[rinfo->offset];
+
+        return g_typelib_get_string (rinfo->typelib, blob->name);
+      }
+      break;
+
+    case GI_INFO_TYPE_VFUNC:
+      {
+        VFuncBlob *blob = (VFuncBlob *)&rinfo->typelib->data[rinfo->offset];
+
+        return g_typelib_get_string (rinfo->typelib, blob->name);
+      }
+      break;
+
+    case GI_INFO_TYPE_FIELD:
+      {
+        FieldBlob *blob = (FieldBlob *)&rinfo->typelib->data[rinfo->offset];
+
+        return g_typelib_get_string (rinfo->typelib, blob->name);
+      }
+      break;
+
+    case GI_INFO_TYPE_ARG:
+      {
+        ArgBlob *blob = (ArgBlob *)&rinfo->typelib->data[rinfo->offset];
+
+        return g_typelib_get_string (rinfo->typelib, blob->name);
+      }
+      break;
+    case GI_INFO_TYPE_UNRESOLVED:
+      {
+        GIUnresolvedInfo *unresolved = (GIUnresolvedInfo *)info;
+
+        return unresolved->name;
+      }
+      break;
+    case GI_INFO_TYPE_TYPE:
+    default: ;
+      g_assert_not_reached ();
+      /* unnamed */
+    }
+
+  return NULL;
+}
+
+/**
+ * g_base_info_get_namespace:
+ * @info: a #GIBaseInfo
+ *
+ * Obtain the namespace of @info.
+ *
+ * Returns: the namespace
+ */
+const gchar *
+g_base_info_get_namespace (GIBaseInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo*) info;
+  Header *header = (Header *)rinfo->typelib->data;
+
+  g_assert (rinfo->ref_count > 0);
+
+  if (rinfo->type == GI_INFO_TYPE_UNRESOLVED)
+    {
+      GIUnresolvedInfo *unresolved = (GIUnresolvedInfo *)info;
+
+      return unresolved->namespace;
+    }
+
+  return g_typelib_get_string (rinfo->typelib, header->namespace);
+}
+
+/**
+ * g_base_info_is_deprecated:
+ * @info: a #GIBaseInfo
+ *
+ * Obtain whether the @info is represents a metadata which is
+ * deprecated or not.
+ *
+ * Returns: %TRUE if deprecated
+ */
+gboolean
+g_base_info_is_deprecated (GIBaseInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo*) info;
+  switch (rinfo->type)
+    {
+    case GI_INFO_TYPE_FUNCTION:
+    case GI_INFO_TYPE_CALLBACK:
+    case GI_INFO_TYPE_STRUCT:
+    case GI_INFO_TYPE_BOXED:
+    case GI_INFO_TYPE_ENUM:
+    case GI_INFO_TYPE_FLAGS:
+    case GI_INFO_TYPE_OBJECT:
+    case GI_INFO_TYPE_INTERFACE:
+    case GI_INFO_TYPE_CONSTANT:
+    case GI_INFO_TYPE_INVALID_0:
+      {
+        CommonBlob *blob = (CommonBlob *)&rinfo->typelib->data[rinfo->offset];
+
+        return blob->deprecated;
+      }
+      break;
+
+    case GI_INFO_TYPE_VALUE:
+      {
+        ValueBlob *blob = (ValueBlob *)&rinfo->typelib->data[rinfo->offset];
+
+        return blob->deprecated;
+      }
+      break;
+
+    case GI_INFO_TYPE_SIGNAL:
+      {
+        SignalBlob *blob = (SignalBlob *)&rinfo->typelib->data[rinfo->offset];
+
+        return blob->deprecated;
+      }
+      break;
+
+    case GI_INFO_TYPE_PROPERTY:
+      {
+        PropertyBlob *blob = (PropertyBlob *)&rinfo->typelib->data[rinfo->offset];
+
+        return blob->deprecated;
+      }
+      break;
+
+    case GI_INFO_TYPE_VFUNC:
+    case GI_INFO_TYPE_FIELD:
+    case GI_INFO_TYPE_ARG:
+    case GI_INFO_TYPE_TYPE:
+    default: ;
+      /* no deprecation flag for these */
+    }
+
+  return FALSE;
+}
+
+/**
+ * g_base_info_get_attribute:
+ * @info: a #GIBaseInfo
+ * @name: a freeform string naming an attribute
+ *
+ * Retrieve an arbitrary attribute associated with this node.
+ *
+ * Returns: The value of the attribute, or %NULL if no such attribute exists
+ */
+const gchar *
+g_base_info_get_attribute (GIBaseInfo   *info,
+                           const gchar  *name)
+{
+  GIAttributeIter iter = { 0, };
+  gchar *curname, *curvalue;
+  while (g_base_info_iterate_attributes (info, &iter, &curname, &curvalue))
+    {
+      if (strcmp (name, curname) == 0)
+        return (const gchar*) curvalue;
+    }
+
+  return NULL;
+}
+
+static int
+cmp_attribute (const void *av,
+               const void *bv)
+{
+  const AttributeBlob *a = av;
+  const AttributeBlob *b = bv;
+
+  if (a->offset < b->offset)
+    return -1;
+  else if (a->offset == b->offset)
+    return 0;
+  else
+    return 1;
+}
+
+/*
+ * _attribute_blob_find_first:
+ * @GIBaseInfo: A #GIBaseInfo.
+ * @blob_offset: The offset for the blob to find the first attribute for.
+ *
+ * Searches for the first #AttributeBlob for @blob_offset and returns
+ * it if found.
+ *
+ * Returns: A pointer to #AttributeBlob or %NULL if not found.
+ */
+AttributeBlob *
+_attribute_blob_find_first (GIBaseInfo *info,
+                            guint32     blob_offset)
+{
+  GIRealInfo *rinfo = (GIRealInfo *) info;
+  Header *header = (Header *)rinfo->typelib->data;
+  AttributeBlob blob, *first, *res, *previous;
+
+  blob.offset = blob_offset;
+
+  first = (AttributeBlob *) &rinfo->typelib->data[header->attributes];
+
+  res = bsearch (&blob, first, header->n_attributes,
+                 header->attribute_blob_size, cmp_attribute);
+
+  if (res == NULL)
+    return NULL;
+
+  previous = res - 1;
+  while (previous >= first && previous->offset == blob_offset)
+    {
+      res = previous;
+      previous = res - 1;
+    }
+
+  return res;
+}
+
+/**
+ * g_base_info_iterate_attributes:
+ * @info: a #GIBaseInfo
+ * @iterator: a #GIAttributeIter structure, must be initialized; see below
+ * @name: (out) (transfer none): Returned name, must not be freed
+ * @value: (out) (transfer none): Returned name, must not be freed
+ *
+ * Iterate over all attributes associated with this node.  The iterator
+ * structure is typically stack allocated, and must have its first
+ * member initialized to %NULL.
+ *
+ * Both the @name and @value should be treated as constants
+ * and must not be freed.
+ *
+ * <example>
+ * <title>Iterating over attributes</title>
+ * <programlisting>
+ * void
+ * print_attributes (GIBaseInfo *info)
+ * {
+ *   GIAttributeIter iter = { 0, };
+ *   char *name;
+ *   char *value;
+ *   while (g_base_info_iterate_attributes (info, &iter, &name, &value))
+ *     {
+ *       g_print ("attribute name: %s value: %s", name, value);
+ *     }
+ * }
+ * </programlisting>
+ * </example>
+ *
+ * Returns: %TRUE if there are more attributes
+ */
+gboolean
+g_base_info_iterate_attributes (GIBaseInfo      *info,
+                                GIAttributeIter *iterator,
+                                gchar           **name,
+                                gchar           **value)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  Header *header = (Header *)rinfo->typelib->data;
+  AttributeBlob *next, *after;
+
+  after = (AttributeBlob *) &rinfo->typelib->data[header->attributes +
+                                                  header->n_attributes * header->attribute_blob_size];
+
+  if (iterator->data != NULL)
+    next = (AttributeBlob *) iterator->data;
+  else
+    next = _attribute_blob_find_first (info, rinfo->offset);
+
+  if (next == NULL || next->offset != rinfo->offset || next >= after)
+    return FALSE;
+
+  *name = (gchar*) g_typelib_get_string (rinfo->typelib, next->name);
+  *value = (gchar*) g_typelib_get_string (rinfo->typelib, next->value);
+  iterator->data = next + 1;
+
+  return TRUE;
+}
+
+/**
+ * g_base_info_get_container:
+ * @info: a #GIBaseInfo
+ *
+ * Obtain the container of the @info. The container is the parent
+ * GIBaseInfo. For instance, the parent of a #GIFunctionInfo is an
+ * #GIObjectInfo or #GIInterfaceInfo.
+ *
+ * Returns: (transfer none): the container
+ */
+GIBaseInfo *
+g_base_info_get_container (GIBaseInfo *info)
+{
+  return ((GIRealInfo*)info)->container;
+}
+
+/**
+ * g_base_info_get_typelib:
+ * @info: a #GIBaseInfo
+ *
+ * Obtain the typelib this @info belongs to
+ *
+ * Returns: (transfer none): the typelib.
+ */
+GITypelib *
+g_base_info_get_typelib (GIBaseInfo *info)
+{
+  return ((GIRealInfo*)info)->typelib;
+}
+
+/**
+ * g_base_info_equal:
+ * @info1: a #GIBaseInfo
+ * @info2: a #GIBaseInfo
+ *
+ * Compare two #GIBaseInfo.
+ *
+ * Using pointer comparison is not practical since many functions return
+ * different instances of #GIBaseInfo that refers to the same part of the
+ * TypeLib; use this function instead to do #GIBaseInfo comparisons.
+ *
+ * Returns: %TRUE if and only if @info1 equals @info2.
+ */
+gboolean
+g_base_info_equal (GIBaseInfo *info1, GIBaseInfo *info2)
+{
+  /* Compare the TypeLib pointers, which are mmapped. */
+  GIRealInfo *rinfo1 = (GIRealInfo*)info1;
+  GIRealInfo *rinfo2 = (GIRealInfo*)info2;
+  return rinfo1->typelib->data + rinfo1->offset == rinfo2->typelib->data + rinfo2->offset;
+}
+
+
diff --git a/girepository/gibaseinfo.h b/girepository/gibaseinfo.h
new file mode 100644 (file)
index 0000000..54c8ee4
--- /dev/null
@@ -0,0 +1,89 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: GIBaseInfo
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#ifndef __GIBASEINFO_H__
+#define __GIBASEINFO_H__
+
+#if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
+#error "Only <girepository.h> can be included directly."
+#endif
+
+#include <glib-object.h>
+#include <gitypelib.h>
+#include <gitypes.h>
+
+G_BEGIN_DECLS
+
+struct _GIBaseInfoStub {
+  /* <private> */
+  gint32 dummy1;
+  gint32 dummy2;
+  gpointer dummy3;
+  gpointer dummy4;
+  gpointer dummy5;
+  guint32  dummy6;
+  guint32  dummy7;
+  gpointer padding[4];
+};
+
+/**
+ * GIAttributeIter:
+ *
+ * An opaque structure used to iterate over attributes
+ * in a #GIBaseInfo struct.
+ */
+typedef struct {
+  /* <private> */
+  gpointer data;
+  gpointer data2;
+  gpointer data3;
+  gpointer data4;
+} GIAttributeIter;
+
+#define GI_TYPE_BASE_INFO      (g_base_info_gtype_get_type ())
+
+GType                  g_base_info_gtype_get_type   (void) G_GNUC_CONST;
+GIBaseInfo *           g_base_info_ref              (GIBaseInfo   *info);
+void                   g_base_info_unref            (GIBaseInfo   *info);
+GIInfoType             g_base_info_get_type         (GIBaseInfo   *info);
+const gchar *          g_base_info_get_name         (GIBaseInfo   *info);
+const gchar *          g_base_info_get_namespace    (GIBaseInfo   *info);
+gboolean               g_base_info_is_deprecated    (GIBaseInfo   *info);
+const gchar *          g_base_info_get_attribute    (GIBaseInfo   *info,
+                                                     const gchar  *name);
+gboolean               g_base_info_iterate_attributes (GIBaseInfo      *info,
+                                                       GIAttributeIter *iterator,
+                                                       char           **name,
+                                                       char          **value);
+GIBaseInfo *           g_base_info_get_container    (GIBaseInfo   *info);
+GITypelib *             g_base_info_get_typelib      (GIBaseInfo   *info);
+gboolean               g_base_info_equal            (GIBaseInfo   *info1,
+                                                     GIBaseInfo   *info2);
+GIBaseInfo *           g_info_new                   (GIInfoType    type,
+                                                    GIBaseInfo   *container,
+                                                    GITypelib     *typelib,
+                                                    guint32       offset);
+
+G_END_DECLS
+
+#endif  /* __GIBASEINFO_H__ */
+
diff --git a/girepository/gicallableinfo.c b/girepository/gicallableinfo.c
new file mode 100644 (file)
index 0000000..95fa2fc
--- /dev/null
@@ -0,0 +1,625 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Callable implementation
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#include <stdlib.h>
+
+#include <glib.h>
+
+#include <girepository.h>
+#include "girepository-private.h"
+#include "gitypelib-internal.h"
+#include "girffi.h"
+
+/* GICallableInfo functions */
+
+/**
+ * SECTION:gicallableinfo
+ * @Short_description: Struct representing a callable
+ * @Title: GICallableInfo
+ *
+ * GICallableInfo represents an entity which is callable.
+ * Currently a function (#GIFunctionInfo), virtual function,
+ * (#GIVFuncInfo) or callback (#GICallbackInfo).
+ *
+ * A callable has a list of arguments (#GIArgInfo), a return type,
+ * direction and a flag which decides if it returns null.
+ *
+ * <refsect1 id="gi-gicallableinfo.struct-hierarchy" role="struct_hierarchy">
+ * <title role="struct_hierarchy.title">Struct hierarchy</title>
+ * <synopsis>
+ *   <link linkend="gi-GIBaseInfo">GIBaseInfo</link>
+ *    +----GICallableInfo
+ *          +----<link linkend="gi-GIFunctionInfo">GIFunctionInfo</link>
+ *          +----<link linkend="gi-GISignalInfo">GISignalInfo</link>
+ *          +----<link linkend="gi-GIVFuncInfo">GIVFuncInfo</link>
+ * </synopsis>
+ * </refsect1>
+ */
+
+static guint32
+signature_offset (GICallableInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo*)info;
+  int sigoff = -1;
+
+  switch (rinfo->type)
+    {
+    case GI_INFO_TYPE_FUNCTION:
+      sigoff = G_STRUCT_OFFSET (FunctionBlob, signature);
+      break;
+    case GI_INFO_TYPE_VFUNC:
+      sigoff = G_STRUCT_OFFSET (VFuncBlob, signature);
+      break;
+    case GI_INFO_TYPE_CALLBACK:
+      sigoff = G_STRUCT_OFFSET (CallbackBlob, signature);
+      break;
+    case GI_INFO_TYPE_SIGNAL:
+      sigoff = G_STRUCT_OFFSET (SignalBlob, signature);
+      break;
+    }
+  if (sigoff >= 0)
+    return *(guint32 *)&rinfo->typelib->data[rinfo->offset + sigoff];
+  return 0;
+}
+
+/**
+ * g_callable_info_get_return_type:
+ * @info: a #GICallableInfo
+ *
+ * Obtain the return type of a callable item as a #GITypeInfo.
+ *
+ * Returns: (transfer full): the #GITypeInfo. Free the struct by calling
+ * g_base_info_unref() when done.
+ */
+GITypeInfo *
+g_callable_info_get_return_type (GICallableInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  guint32 offset;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_CALLABLE_INFO (info), NULL);
+
+  offset = signature_offset (info);
+
+  return _g_type_info_new ((GIBaseInfo*)info, rinfo->typelib, offset);
+}
+
+
+/**
+ * g_callable_info_load_return_type:
+ * @info: a #GICallableInfo
+ * @type: (out caller-allocates): Initialized with return type of @info
+ *
+ * Obtain information about a return value of callable; this
+ * function is a variant of g_callable_info_get_return_type() designed for stack
+ * allocation.
+ *
+ * The initialized @type must not be referenced after @info is deallocated.
+ */
+void
+g_callable_info_load_return_type (GICallableInfo *info,
+                                  GITypeInfo     *type)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  guint32 offset;
+
+  g_return_if_fail (info != NULL);
+  g_return_if_fail (GI_IS_CALLABLE_INFO (info));
+
+  offset = signature_offset (info);
+
+  _g_type_info_init (type, (GIBaseInfo*)info, rinfo->typelib, offset);
+}
+
+/**
+ * g_callable_info_may_return_null:
+ * @info: a #GICallableInfo
+ *
+ * See if a callable could return %NULL.
+ *
+ * Returns: %TRUE if callable could return %NULL
+ */
+gboolean
+g_callable_info_may_return_null (GICallableInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  SignatureBlob *blob;
+
+  g_return_val_if_fail (info != NULL, FALSE);
+  g_return_val_if_fail (GI_IS_CALLABLE_INFO (info), FALSE);
+
+  blob = (SignatureBlob *)&rinfo->typelib->data[signature_offset (info)];
+
+  return blob->may_return_null;
+}
+
+/**
+ * g_callable_info_skip_return:
+ * @info: a #GICallableInfo
+ *
+ * See if a callable's return value is only useful in C.
+ *
+ * Returns: %TRUE if return value is only useful in C.
+ */
+gboolean
+g_callable_info_skip_return (GICallableInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  SignatureBlob *blob;
+
+  g_return_val_if_fail (info != NULL, FALSE);
+  g_return_val_if_fail (GI_IS_CALLABLE_INFO (info), FALSE);
+
+  blob = (SignatureBlob *)&rinfo->typelib->data[signature_offset (info)];
+
+  return blob->skip_return;
+}
+
+/**
+ * g_callable_info_get_caller_owns:
+ * @info: a #GICallableInfo
+ *
+ * See whether the caller owns the return value of this callable.
+ * #GITransfer contains a list of possible transfer values.
+ *
+ * Returns: %TRUE if the caller owns the return value, %FALSE otherwise.
+ */
+GITransfer
+g_callable_info_get_caller_owns (GICallableInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo*) info;
+  SignatureBlob *blob;
+
+  g_return_val_if_fail (info != NULL, -1);
+  g_return_val_if_fail (GI_IS_CALLABLE_INFO (info), -1);
+
+  blob = (SignatureBlob *)&rinfo->typelib->data[signature_offset (info)];
+
+  if (blob->caller_owns_return_value)
+    return GI_TRANSFER_EVERYTHING;
+  else if (blob->caller_owns_return_container)
+    return GI_TRANSFER_CONTAINER;
+  else
+    return GI_TRANSFER_NOTHING;
+}
+
+/**
+ * g_callable_info_get_n_args:
+ * @info: a #GICallableInfo
+ *
+ * Obtain the number of arguments (both IN and OUT) for this callable.
+ *
+ * Returns: The number of arguments this callable expects.
+ */
+gint
+g_callable_info_get_n_args (GICallableInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  gint offset;
+  SignatureBlob *blob;
+
+  g_return_val_if_fail (info != NULL, -1);
+  g_return_val_if_fail (GI_IS_CALLABLE_INFO (info), -1);
+
+  offset = signature_offset (info);
+  blob = (SignatureBlob *)&rinfo->typelib->data[offset];
+
+  return blob->n_arguments;
+}
+
+/**
+ * g_callable_info_get_arg:
+ * @info: a #GICallableInfo
+ * @n: the argument index to fetch
+ *
+ * Obtain information about a particular argument of this callable.
+ *
+ * Returns: (transfer full): the #GIArgInfo. Free it with
+ * g_base_info_unref() when done.
+ */
+GIArgInfo *
+g_callable_info_get_arg (GICallableInfo *info,
+                        gint            n)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  Header *header;
+  gint offset;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_CALLABLE_INFO (info), NULL);
+
+  offset = signature_offset (info);
+  header = (Header *)rinfo->typelib->data;
+
+  return (GIArgInfo *) g_info_new (GI_INFO_TYPE_ARG, (GIBaseInfo*)info, rinfo->typelib,
+                                  offset + header->signature_blob_size + n * header->arg_blob_size);
+}
+
+/**
+ * g_callable_info_load_arg:
+ * @info: a #GICallableInfo
+ * @n: the argument index to fetch
+ * @arg: (out caller-allocates): Initialize with argument number @n
+ *
+ * Obtain information about a particular argument of this callable; this
+ * function is a variant of g_callable_info_get_arg() designed for stack
+ * allocation.
+ *
+ * The initialized @arg must not be referenced after @info is deallocated.
+ */
+void
+g_callable_info_load_arg (GICallableInfo *info,
+                          gint            n,
+                          GIArgInfo      *arg)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  Header *header;
+  gint offset;
+
+  g_return_if_fail (info != NULL);
+  g_return_if_fail (GI_IS_CALLABLE_INFO (info));
+
+  offset = signature_offset (info);
+  header = (Header *)rinfo->typelib->data;
+
+  _g_info_init ((GIRealInfo*)arg, GI_INFO_TYPE_ARG, rinfo->repository, (GIBaseInfo*)info, rinfo->typelib,
+                offset + header->signature_blob_size + n * header->arg_blob_size);
+}
+
+/**
+ * g_callable_info_get_return_attribute:
+ * @info: a #GICallableInfo
+ * @name: a freeform string naming an attribute
+ *
+ * Retrieve an arbitrary attribute associated with the return value.
+ *
+ * Returns: The value of the attribute, or %NULL if no such attribute exists
+ */
+const gchar *
+g_callable_info_get_return_attribute (GICallableInfo  *info,
+                                      const gchar     *name)
+{
+  GIAttributeIter iter = { 0, };
+  gchar *curname, *curvalue;
+  while (g_callable_info_iterate_return_attributes (info, &iter, &curname, &curvalue))
+    {
+      if (g_strcmp0 (name, curname) == 0)
+        return (const gchar*) curvalue;
+    }
+
+  return NULL;
+}
+
+/**
+ * g_callable_info_iterate_return_attributes:
+ * @info: a #GICallableInfo
+ * @iterator: a #GIAttributeIter structure, must be initialized; see below
+ * @name: (out) (transfer none): Returned name, must not be freed
+ * @value: (out) (transfer none): Returned name, must not be freed
+ *
+ * Iterate over all attributes associated with the return value.  The
+ * iterator structure is typically stack allocated, and must have its
+ * first member initialized to %NULL.
+ *
+ * Both the @name and @value should be treated as constants
+ * and must not be freed.
+ *
+ * See g_base_info_iterate_attributes() for an example of how to use a
+ * similar API.
+ *
+ * Returns: %TRUE if there are more attributes
+ */
+gboolean
+g_callable_info_iterate_return_attributes (GICallableInfo  *info,
+                                           GIAttributeIter *iterator,
+                                           char           **name,
+                                           char          **value)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  Header *header = (Header *)rinfo->typelib->data;
+  AttributeBlob *next, *after;
+  guint32 blob_offset;
+
+  after = (AttributeBlob *) &rinfo->typelib->data[header->attributes +
+                                                  header->n_attributes * header->attribute_blob_size];
+
+  blob_offset = signature_offset (info);
+
+  if (iterator->data != NULL)
+    next = (AttributeBlob *) iterator->data;
+  else
+    next = _attribute_blob_find_first (info, blob_offset);
+
+  if (next == NULL || next->offset != blob_offset || next >= after)
+    return FALSE;
+
+  *name = (gchar*) g_typelib_get_string (rinfo->typelib, next->name);
+  *value = (gchar*) g_typelib_get_string (rinfo->typelib, next->value);
+  iterator->data = next + 1;
+
+  return TRUE;
+}
+
+/* Extract the correct bits from an ffi_arg return value into
+ * GIArgument: https://bugzilla.gnome.org/show_bug.cgi?id=665152
+ *
+ * Also see the ffi_call man page - the storage requirements for return
+ * values are "special".
+ */
+void
+gi_type_info_extract_ffi_return_value (GITypeInfo                  *return_info,
+                                       GIFFIReturnValue            *ffi_value,
+                                       GIArgument                  *arg)
+{
+    switch (g_type_info_get_tag (return_info)) {
+    case GI_TYPE_TAG_INT8:
+        arg->v_int8 = (gint8) ffi_value->v_long;
+        break;
+    case GI_TYPE_TAG_UINT8:
+        arg->v_uint8 = (guint8) ffi_value->v_ulong;
+        break;
+    case GI_TYPE_TAG_INT16:
+        arg->v_int16 = (gint16) ffi_value->v_long;
+        break;
+    case GI_TYPE_TAG_UINT16:
+        arg->v_uint16 = (guint16) ffi_value->v_ulong;
+        break;
+    case GI_TYPE_TAG_INT32:
+        arg->v_int32 = (gint32) ffi_value->v_long;
+        break;
+    case GI_TYPE_TAG_UINT32:
+    case GI_TYPE_TAG_BOOLEAN:
+    case GI_TYPE_TAG_UNICHAR:
+        arg->v_uint32 = (guint32) ffi_value->v_ulong;
+        break;
+    case GI_TYPE_TAG_INT64:
+        arg->v_int64 = (gint64) ffi_value->v_int64;
+        break;
+    case GI_TYPE_TAG_UINT64:
+        arg->v_uint64 = (guint64) ffi_value->v_uint64;
+        break;
+    case GI_TYPE_TAG_FLOAT:
+        arg->v_float = ffi_value->v_float;
+        break;
+    case GI_TYPE_TAG_DOUBLE:
+        arg->v_double = ffi_value->v_double;
+        break;
+    case GI_TYPE_TAG_INTERFACE:
+        {
+            GIBaseInfo* interface_info;
+            GIInfoType interface_type;
+
+            interface_info = g_type_info_get_interface(return_info);
+            interface_type = g_base_info_get_type(interface_info);
+
+            switch(interface_type) {
+            case GI_INFO_TYPE_ENUM:
+            case GI_INFO_TYPE_FLAGS:
+                arg->v_int32 = (gint32) ffi_value->v_long;
+                break;
+            default:
+                arg->v_pointer = (gpointer) ffi_value->v_ulong;
+                break;
+            }
+
+            g_base_info_unref(interface_info);
+        }
+        break;
+    default:
+        arg->v_pointer = (gpointer) ffi_value->v_ulong;
+        break;
+    }
+}
+
+gboolean
+g_callable_info_invoke (GIFunctionInfo *info,
+                        gpointer          function,
+                        const GIArgument  *in_args,
+                        int               n_in_args,
+                        const GIArgument  *out_args,
+                        int               n_out_args,
+                        GIArgument        *return_value,
+                        gboolean          is_method,
+                        gboolean          throws,
+                        GError          **error)
+{
+  ffi_cif cif;
+  ffi_type *rtype;
+  ffi_type **atypes;
+  GITypeInfo *tinfo;
+  GITypeInfo *rinfo;
+  GITypeTag rtag;
+  GIArgInfo *ainfo;
+  gint n_args, n_invoke_args, in_pos, out_pos, i;
+  gpointer *args;
+  gboolean success = FALSE;
+  GError *local_error = NULL;
+  gpointer error_address = &local_error;
+  GIFFIReturnValue ffi_return_value;
+  gpointer return_value_p; /* Will point inside the union return_value */
+
+  rinfo = g_callable_info_get_return_type ((GICallableInfo *)info);
+  rtype = g_type_info_get_ffi_type (rinfo);
+  rtag = g_type_info_get_tag(rinfo);
+
+  in_pos = 0;
+  out_pos = 0;
+
+  n_args = g_callable_info_get_n_args ((GICallableInfo *)info);
+  if (is_method)
+    {
+      if (n_in_args == 0)
+        {
+          g_set_error (error,
+                       G_INVOKE_ERROR,
+                       G_INVOKE_ERROR_ARGUMENT_MISMATCH,
+                       "Too few \"in\" arguments (handling this)");
+          goto out;
+        }
+      n_invoke_args = n_args+1;
+      in_pos++;
+    }
+  else
+    n_invoke_args = n_args;
+
+  if (throws)
+    /* Add an argument for the GError */
+    n_invoke_args ++;
+
+  atypes = g_alloca (sizeof (ffi_type*) * n_invoke_args);
+  args = g_alloca (sizeof (gpointer) * n_invoke_args);
+
+  if (is_method)
+    {
+      atypes[0] = &ffi_type_pointer;
+      args[0] = (gpointer) &in_args[0];
+    }
+  for (i = 0; i < n_args; i++)
+    {
+      int offset = (is_method ? 1 : 0);
+      ainfo = g_callable_info_get_arg ((GICallableInfo *)info, i);
+      switch (g_arg_info_get_direction (ainfo))
+        {
+        case GI_DIRECTION_IN:
+          tinfo = g_arg_info_get_type (ainfo);
+          atypes[i+offset] = g_type_info_get_ffi_type (tinfo);
+          g_base_info_unref ((GIBaseInfo *)tinfo);
+
+          if (in_pos >= n_in_args)
+            {
+              g_set_error (error,
+                           G_INVOKE_ERROR,
+                           G_INVOKE_ERROR_ARGUMENT_MISMATCH,
+                           "Too few \"in\" arguments (handling in)");
+              goto out;
+            }
+
+          args[i+offset] = (gpointer)&in_args[in_pos];
+          in_pos++;
+
+          break;
+        case GI_DIRECTION_OUT:
+          atypes[i+offset] = &ffi_type_pointer;
+
+          if (out_pos >= n_out_args)
+            {
+              g_set_error (error,
+                           G_INVOKE_ERROR,
+                           G_INVOKE_ERROR_ARGUMENT_MISMATCH,
+                           "Too few \"out\" arguments (handling out)");
+              goto out;
+            }
+
+          args[i+offset] = (gpointer)&out_args[out_pos];
+          out_pos++;
+          break;
+        case GI_DIRECTION_INOUT:
+          atypes[i+offset] = &ffi_type_pointer;
+
+          if (in_pos >= n_in_args)
+            {
+              g_set_error (error,
+                           G_INVOKE_ERROR,
+                           G_INVOKE_ERROR_ARGUMENT_MISMATCH,
+                           "Too few \"in\" arguments (handling inout)");
+              goto out;
+            }
+
+          if (out_pos >= n_out_args)
+            {
+              g_set_error (error,
+                           G_INVOKE_ERROR,
+                           G_INVOKE_ERROR_ARGUMENT_MISMATCH,
+                           "Too few \"out\" arguments (handling inout)");
+              goto out;
+            }
+
+          args[i+offset] = (gpointer)&in_args[in_pos];
+          in_pos++;
+          out_pos++;
+          break;
+        default:
+          g_assert_not_reached ();
+        }
+      g_base_info_unref ((GIBaseInfo *)ainfo);
+    }
+
+  if (throws)
+    {
+      args[n_invoke_args - 1] = &error_address;
+      atypes[n_invoke_args - 1] = &ffi_type_pointer;
+    }
+
+  if (in_pos < n_in_args)
+    {
+      g_set_error (error,
+                   G_INVOKE_ERROR,
+                   G_INVOKE_ERROR_ARGUMENT_MISMATCH,
+                   "Too many \"in\" arguments (at end)");
+      goto out;
+    }
+  if (out_pos < n_out_args)
+    {
+      g_set_error (error,
+                   G_INVOKE_ERROR,
+                   G_INVOKE_ERROR_ARGUMENT_MISMATCH,
+                   "Too many \"out\" arguments (at end)");
+      goto out;
+    }
+
+  if (ffi_prep_cif (&cif, FFI_DEFAULT_ABI, n_invoke_args, rtype, atypes) != FFI_OK)
+    goto out;
+
+  g_return_val_if_fail (return_value, FALSE);
+  /* See comment for GIFFIReturnValue above */
+  switch (rtag)
+    {
+    case GI_TYPE_TAG_FLOAT:
+      return_value_p = &ffi_return_value.v_float;
+      break;
+    case GI_TYPE_TAG_DOUBLE:
+      return_value_p = &ffi_return_value.v_double;
+      break;
+    case GI_TYPE_TAG_INT64:
+    case GI_TYPE_TAG_UINT64:
+      return_value_p = &ffi_return_value.v_uint64;
+      break;
+    default:
+      return_value_p = &ffi_return_value.v_long;
+    }
+  ffi_call (&cif, function, return_value_p, args);
+
+  if (local_error)
+    {
+      g_propagate_error (error, local_error);
+      success = FALSE;
+    }
+  else
+    {
+      gi_type_info_extract_ffi_return_value (rinfo, &ffi_return_value, return_value);
+      success = TRUE;
+    }
+ out:
+  g_base_info_unref ((GIBaseInfo *)rinfo);
+  return success;
+}
diff --git a/girepository/gicallableinfo.h b/girepository/gicallableinfo.h
new file mode 100644 (file)
index 0000000..48c08c4
--- /dev/null
@@ -0,0 +1,72 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Callable
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#ifndef __GICALLABLEINFO_H__
+#define __GICALLABLEINFO_H__
+
+#if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
+#error "Only <girepository.h> can be included directly."
+#endif
+
+#include <gitypes.h>
+
+G_BEGIN_DECLS
+
+#define GI_IS_CALLABLE_INFO(info)                                      \
+    ((g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_FUNCTION) || \
+     (g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_CALLBACK) || \
+     (g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_SIGNAL) || \
+     (g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_VFUNC))
+
+GITypeInfo *           g_callable_info_get_return_type (GICallableInfo *info);
+void                   g_callable_info_load_return_type (GICallableInfo *info,
+                                                         GITypeInfo     *type);
+const gchar *          g_callable_info_get_return_attribute (GICallableInfo *info,
+                                                             const gchar    *name);
+gboolean               g_callable_info_iterate_return_attributes (GICallableInfo  *info,
+                                                                  GIAttributeIter *iterator,
+                                                                  char           **name,
+                                                                  char          **value);
+GITransfer             g_callable_info_get_caller_owns (GICallableInfo *info);
+gboolean               g_callable_info_may_return_null (GICallableInfo *info);
+gboolean               g_callable_info_skip_return     (GICallableInfo *info);
+gint                   g_callable_info_get_n_args      (GICallableInfo *info);
+GIArgInfo *            g_callable_info_get_arg         (GICallableInfo *info,
+                                                        gint            n);
+void                   g_callable_info_load_arg        (GICallableInfo *info,
+                                                        gint            n,
+                                                        GIArgInfo      *arg);
+gboolean               g_callable_info_invoke          (GICallableInfo   *info,
+                                                        gpointer          function,
+                                                        const GIArgument *in_args,
+                                                        int               n_in_args,
+                                                        const GIArgument *out_args,
+                                                        int               n_out_args,
+                                                        GIArgument       *return_value,
+                                                        gboolean          is_method,
+                                                        gboolean          throws,
+                                                        GError          **error);
+G_END_DECLS
+
+
+#endif  /* __GICALLABLEINFO_H__ */
+
diff --git a/girepository/giconstantinfo.c b/girepository/giconstantinfo.c
new file mode 100644 (file)
index 0000000..88220b4
--- /dev/null
@@ -0,0 +1,173 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Constant implementation
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#include <glib.h>
+#include <string.h> // memcpy
+
+#include <girepository.h>
+#include "girepository-private.h"
+#include "gitypelib-internal.h"
+
+/**
+ * SECTION:giconstantinfo
+ * @Short_description: Struct representing a constant
+ * @Title: GIConstantInfo
+ *
+ * GIConstantInfo represents a constant. A constant has a type associated
+ * which can be obtained by calling g_constant_info_get_type() and a value,
+ * which can be obtained by calling g_constant_info_get_value().
+ *
+ * <refsect1 id="gi-giconstantinfo.struct-hierarchy" role="struct_hierarchy">
+ * <title role="struct_hierarchy.title">Struct hierarchy</title>
+ * <synopsis>
+ *   <link linkend="gi-GIBaseInfo">GIBaseInfo</link>
+ *    +----GIConstantInfo
+ * </synopsis>
+ * </refsect1>
+ */
+
+
+/**
+ * g_constant_info_get_type:
+ * @info: a #GIConstantInfo
+ *
+ * Obtain the type of the constant as a #GITypeInfo.
+ *
+ * Returns: (transfer full): the #GITypeInfo. Free the struct by calling
+ * g_base_info_unref() when done.
+ */
+GITypeInfo *
+g_constant_info_get_type (GIConstantInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_CONSTANT_INFO (info), NULL);
+
+  return _g_type_info_new ((GIBaseInfo*)info, rinfo->typelib, rinfo->offset + 8);
+}
+
+#define DO_ALIGNED_COPY(dest_addr, src_addr, type) \
+        memcpy((dest_addr), (src_addr), sizeof(type))
+
+/**
+ * g_constant_info_free_value: (skip)
+ * @info: a #GIConstantInfo
+ * @value: the argument
+ *
+ * Free the value returned from g_constant_info_get_value().
+ *
+ * Since: 1.30.1
+ */
+void
+g_constant_info_free_value (GIConstantInfo *info,
+                            GIArgument     *value)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ConstantBlob *blob;
+
+  g_return_if_fail (info != NULL);
+  g_return_if_fail (GI_IS_CONSTANT_INFO (info));
+
+  blob = (ConstantBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  /* FIXME non-basic types ? */
+  if (blob->type.flags.reserved == 0 && blob->type.flags.reserved2 == 0)
+    {
+      if (blob->type.flags.pointer)
+        g_free (value->v_pointer);
+    }
+}
+
+/**
+ * g_constant_info_get_value: (skip)
+ * @info: a #GIConstantInfo
+ * @value: (out): an argument
+ *
+ * Obtain the value associated with the #GIConstantInfo and store it in the
+ * @value parameter. @argument needs to be allocated before passing it in.
+ * The size of the constant value stored in @argument will be returned.
+ * Free the value with g_constant_info_free_value().
+ *
+ * Returns: size of the constant
+ */
+gint
+g_constant_info_get_value (GIConstantInfo *info,
+                          GIArgument      *value)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ConstantBlob *blob;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_CONSTANT_INFO (info), 0);
+
+  blob = (ConstantBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  /* FIXME non-basic types ? */
+  if (blob->type.flags.reserved == 0 && blob->type.flags.reserved2 == 0)
+    {
+      if (blob->type.flags.pointer)
+       value->v_pointer = g_memdup (&rinfo->typelib->data[blob->offset], blob->size);
+      else
+       {
+         switch (blob->type.flags.tag)
+           {
+           case GI_TYPE_TAG_BOOLEAN:
+             value->v_boolean = *(gboolean*)&rinfo->typelib->data[blob->offset];
+             break;
+           case GI_TYPE_TAG_INT8:
+             value->v_int8 = *(gint8*)&rinfo->typelib->data[blob->offset];
+             break;
+           case GI_TYPE_TAG_UINT8:
+             value->v_uint8 = *(guint8*)&rinfo->typelib->data[blob->offset];
+             break;
+           case GI_TYPE_TAG_INT16:
+             value->v_int16 = *(gint16*)&rinfo->typelib->data[blob->offset];
+             break;
+           case GI_TYPE_TAG_UINT16:
+             value->v_uint16 = *(guint16*)&rinfo->typelib->data[blob->offset];
+             break;
+           case GI_TYPE_TAG_INT32:
+             value->v_int32 = *(gint32*)&rinfo->typelib->data[blob->offset];
+             break;
+           case GI_TYPE_TAG_UINT32:
+             value->v_uint32 = *(guint32*)&rinfo->typelib->data[blob->offset];
+             break;
+           case GI_TYPE_TAG_INT64:
+             DO_ALIGNED_COPY(&value->v_int64, &rinfo->typelib->data[blob->offset], gint64);
+             break;
+           case GI_TYPE_TAG_UINT64:
+             DO_ALIGNED_COPY(&value->v_uint64, &rinfo->typelib->data[blob->offset], guint64);
+             break;
+           case GI_TYPE_TAG_FLOAT:
+             DO_ALIGNED_COPY(&value->v_float, &rinfo->typelib->data[blob->offset], gfloat);
+             break;
+           case GI_TYPE_TAG_DOUBLE:
+             DO_ALIGNED_COPY(&value->v_double, &rinfo->typelib->data[blob->offset], gdouble);
+             break;
+           }
+       }
+    }
+
+  return blob->size;
+}
+
diff --git a/girepository/giconstantinfo.h b/girepository/giconstantinfo.h
new file mode 100644 (file)
index 0000000..2bbf956
--- /dev/null
@@ -0,0 +1,46 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Constant
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#ifndef __GICONSTANTINFO_H__
+#define __GICONSTANTINFO_H__
+
+#if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
+#error "Only <girepository.h> can be included directly."
+#endif
+
+#include <gitypes.h>
+
+G_BEGIN_DECLS
+
+#define GI_IS_CONSTANT_INFO(info) \
+    (g_base_info_get_type((GIBaseInfo*)info) ==  GI_INFO_TYPE_CONSTANT)
+
+GITypeInfo * g_constant_info_get_type (GIConstantInfo *info);
+void         g_constant_info_free_value(GIConstantInfo *info,
+                                        GIArgument      *value);
+gint         g_constant_info_get_value(GIConstantInfo *info,
+                                      GIArgument      *value);
+G_END_DECLS
+
+
+#endif  /* __GICONSTANTINFO_H__ */
+
diff --git a/girepository/gienuminfo.c b/girepository/gienuminfo.c
new file mode 100644 (file)
index 0000000..a9b7c1d
--- /dev/null
@@ -0,0 +1,227 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Enum implementation
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#include <glib.h>
+
+#include <girepository.h>
+#include "girepository-private.h"
+#include "gitypelib-internal.h"
+
+/**
+ * SECTION:gienuminfo
+ * @Short_description: Structs representing an enumeration and its values
+ * @Title: GIEnumInfo
+ *
+ * A GIEnumInfo represents an enumeration and a GIValueInfo struct represents a value
+ * of an enumeration. The GIEnumInfo contains a set of values and a type
+ * The GIValueInfo is fetched by calling g_enum_info_get_value() on a #GIEnumInfo.
+ *
+ * <refsect1 id="gi-gienuminfo.struct-hierarchy" role="struct_hierarchy">
+ * <title role="struct_hierarchy.title">Struct hierarchy</title>
+ * <synopsis>
+ *   <link linkend="gi-GIBaseInfo">GIBaseInfo</link>
+ *    +----<link linkend="gi-GIRegisteredTypeInfo">GIRegisteredTypeInfo</link>
+ *          +----GIEnumInfo
+ * </synopsis>
+ * </refsect1>
+ */
+
+/**
+* g_enum_info_get_n_values:
+* @info: a #GIEnumInfo
+*
+* Obtain the number of values this enumeration contains.
+*
+* Returns: the number of enumeration values
+*/
+gint
+g_enum_info_get_n_values (GIEnumInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  EnumBlob *blob;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_ENUM_INFO (info), 0);
+
+  blob = (EnumBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->n_values;
+}
+
+const gchar *
+g_enum_info_get_error_domain (GIEnumInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  EnumBlob *blob;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_ENUM_INFO (info), 0);
+
+  blob = (EnumBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  if (blob->error_domain)
+    return g_typelib_get_string (rinfo->typelib, blob->error_domain);
+  else
+    return NULL;
+}
+
+/**
+ * g_enum_info_get_value:
+ * @info: a #GIEnumInfo
+ * @n: index of value to fetch
+ *
+ * Obtain a value for this enumeration.
+ *
+ * Returns: (transfer full): the enumeration value or %NULL if type tag is wrong,
+ * free the struct with g_base_info_unref() when done.
+ */
+GIValueInfo *
+g_enum_info_get_value (GIEnumInfo *info,
+                      gint        n)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  Header *header;
+  gint offset;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_ENUM_INFO (info), NULL);
+
+  header = (Header *)rinfo->typelib->data;
+  offset = rinfo->offset + header->enum_blob_size
+    + n * header->value_blob_size;
+
+  return (GIValueInfo *) g_info_new (GI_INFO_TYPE_VALUE, (GIBaseInfo*)info, rinfo->typelib, offset);
+}
+
+/**
+ * g_enum_info_get_n_methods:
+ * @info: a #GIEnumInfo
+ *
+ * Obtain the number of methods that this enum type has.
+ *
+ * Returns: number of methods
+ *
+ * Since: 1.29.17
+ */
+gint
+g_enum_info_get_n_methods (GIEnumInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  EnumBlob *blob;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_ENUM_INFO (info), 0);
+
+  blob = (EnumBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->n_methods;
+}
+
+/**
+ * g_enum_info_get_method:
+ * @info: a #GIEnumInfo
+ * @n: index of method to get
+ *
+ * Obtain an enum type method at index @n.
+ *
+ * Returns: (transfer full): the #GIFunctionInfo. Free the struct by calling
+ * g_base_info_unref() when done.
+ *
+ * Since: 1.29.17
+ */
+GIFunctionInfo *
+g_enum_info_get_method (GIEnumInfo *info,
+                       gint        n)
+{
+  gint offset;
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  Header *header;
+  EnumBlob *blob;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_ENUM_INFO (info), NULL);
+
+  header = (Header *)rinfo->typelib->data;
+  blob = (EnumBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  offset = rinfo->offset + header->enum_blob_size
+    + blob->n_values * header->value_blob_size
+    + n * header->function_blob_size;
+
+  return (GIFunctionInfo *) g_info_new (GI_INFO_TYPE_FUNCTION, (GIBaseInfo*)info,
+                                       rinfo->typelib, offset);
+}
+
+/**
+ * g_enum_info_get_storage_type:
+ * @info: a #GIEnumInfo
+ *
+ * Obtain the tag of the type used for the enum in the C ABI. This will
+ * will be a signed or unsigned integral type.
+
+ * Note that in the current implementation the width of the type is
+ * computed correctly, but the signed or unsigned nature of the type
+ * may not match the sign of the type used by the C compiler.
+ *
+ * Return Value: the storage type for the enumeration
+ */
+GITypeTag
+g_enum_info_get_storage_type (GIEnumInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  EnumBlob *blob;
+
+  g_return_val_if_fail (info != NULL, GI_TYPE_TAG_BOOLEAN);
+  g_return_val_if_fail (GI_IS_ENUM_INFO (info), GI_TYPE_TAG_BOOLEAN);
+
+  blob = (EnumBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->storage_type;
+}
+
+/**
+ * g_value_info_get_value:
+ * @info: a #GIValueInfo
+ *
+ * Obtain the enumeration value of the #GIValueInfo.
+ *
+ * Returns: the enumeration value. This will always be representable
+ *   as a 32-bit signed or unsigned value. The use of gint64 as the
+ *   return type is to allow both.
+ */
+gint64
+g_value_info_get_value (GIValueInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ValueBlob *blob;
+
+  g_return_val_if_fail (info != NULL, -1);
+  g_return_val_if_fail (GI_IS_VALUE_INFO (info), -1);
+
+  blob = (ValueBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  if (blob->unsigned_value)
+    return (gint64)(guint32)blob->value;
+  else
+    return (gint64)blob->value;
+}
+
diff --git a/girepository/gienuminfo.h b/girepository/gienuminfo.h
new file mode 100644 (file)
index 0000000..0b9a9e1
--- /dev/null
@@ -0,0 +1,56 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Enum and Enum values
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#ifndef __GIENUMINFO_H__
+#define __GIENUMINFO_H__
+
+#if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
+#error "Only <girepository.h> can be included directly."
+#endif
+
+#include <gitypes.h>
+
+G_BEGIN_DECLS
+
+#define GI_IS_ENUM_INFO(info) \
+    ((g_base_info_get_type((GIBaseInfo*)info) ==  GI_INFO_TYPE_ENUM) || \
+     (g_base_info_get_type((GIBaseInfo*)info) ==  GI_INFO_TYPE_FLAGS))
+
+#define GI_IS_VALUE_INFO(info) \
+    (g_base_info_get_type((GIBaseInfo*)info) ==  GI_INFO_TYPE_VALUE)
+
+gint           g_enum_info_get_n_values      (GIEnumInfo  *info);
+GIValueInfo  * g_enum_info_get_value         (GIEnumInfo  *info,
+                                             gint         n);
+gint              g_enum_info_get_n_methods     (GIEnumInfo  *info);
+GIFunctionInfo  * g_enum_info_get_method        (GIEnumInfo  *info,
+                                                gint         n);
+GITypeTag      g_enum_info_get_storage_type  (GIEnumInfo  *info);
+const gchar *  g_enum_info_get_error_domain  (GIEnumInfo  *info);
+
+gint64         g_value_info_get_value        (GIValueInfo *info);
+
+G_END_DECLS
+
+
+#endif  /* __GIENUMINFO_H__ */
+
diff --git a/girepository/gifieldinfo.c b/girepository/gifieldinfo.c
new file mode 100644 (file)
index 0000000..1d9a20d
--- /dev/null
@@ -0,0 +1,547 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Field implementation
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#include <glib.h>
+
+#include <girepository.h>
+#include "girepository-private.h"
+#include "gitypelib-internal.h"
+#include "config.h"
+
+/**
+ * SECTION:gifieldinfo
+ * @Short_description: Struct representing a struct or union field
+ * @Title: GIFieldInfo
+ *
+ * A GIFieldInfo struct represents a field of a struct (see #GIStructInfo),
+ * union (see #GIUnionInfo) or an object (see #GIObjectInfo). The GIFieldInfo
+ * is fetched by calling g_struct_info_get_field(), g_union_info_get_field()
+ * or g_object_info_get_value().
+ * A field has a size, type and a struct offset asssociated and a set of flags,
+ * which is currently #GI_FIELD_IS_READABLE or #GI_FIELD_IS_WRITABLE.
+ *
+ * <refsect1 id="gi-gifieldinfo.struct-hierarchy" role="struct_hierarchy">
+ * <title role="struct_hierarchy.title">Struct hierarchy</title>
+ * <synopsis>
+ *   <link linkend="gi-GIBaseInfo">GIBaseInfo</link>
+ *    +----GIFieldInfo
+ * </synopsis>
+ * </refsect1>
+ */
+
+/**
+ * g_field_info_get_flags:
+ * @info: a #GIFieldInfo
+ *
+ * Obtain the flags for this #GIFieldInfo. See #GIFieldInfoFlags for possible
+ * flag values.
+ *
+ * Returns: the flags
+ */
+GIFieldInfoFlags
+g_field_info_get_flags (GIFieldInfo *info)
+{
+  GIFieldInfoFlags flags;
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  FieldBlob *blob;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_FIELD_INFO (info), 0);
+
+  blob = (FieldBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  flags = 0;
+
+  if (blob->readable)
+    flags = flags | GI_FIELD_IS_READABLE;
+
+  if (blob->writable)
+    flags = flags | GI_FIELD_IS_WRITABLE;
+
+  return flags;
+}
+
+/**
+ * g_field_info_get_size:
+ * @info: a #GIFieldInfo
+ *
+ * Obtain the size in bits of the field member, this is how
+ * much space you need to allocate to store the field.
+ *
+ * Returns: the field size
+ */
+gint
+g_field_info_get_size (GIFieldInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  FieldBlob *blob;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_FIELD_INFO (info), 0);
+
+  blob = (FieldBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->bits;
+}
+
+/**
+ * g_field_info_get_offset:
+ * @info: a #GIFieldInfo
+ *
+ * Obtain the offset in bits of the field member, this is relative
+ * to the beginning of the struct or union.
+ *
+ * Returns: the field offset
+ */
+gint
+g_field_info_get_offset (GIFieldInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  FieldBlob *blob;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_FIELD_INFO (info), 0);
+
+  blob = (FieldBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->struct_offset;
+}
+
+/**
+ * g_field_info_get_type:
+ * @info: a #GIFieldInfo
+ *
+ * Obtain the type of a field as a #GITypeInfo.
+ *
+ * Returns: (transfer full): the #GITypeInfo. Free the struct by calling
+ * g_base_info_unref() when done.
+ */
+GITypeInfo *
+g_field_info_get_type (GIFieldInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  Header *header = (Header *)rinfo->typelib->data;
+  FieldBlob *blob;
+  GIRealInfo *type_info;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_FIELD_INFO (info), NULL);
+
+  blob = (FieldBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  if (blob->has_embedded_type)
+    {
+      type_info = (GIRealInfo *) g_info_new (GI_INFO_TYPE_TYPE,
+                                                (GIBaseInfo*)info, rinfo->typelib,
+                                                rinfo->offset + header->field_blob_size);
+      type_info->type_is_embedded = TRUE;
+    }
+  else
+    return _g_type_info_new ((GIBaseInfo*)info, rinfo->typelib, rinfo->offset + G_STRUCT_OFFSET (FieldBlob, type));
+
+  return (GIBaseInfo*)type_info;
+}
+
+/**
+ * g_field_info_get_field: (skip)
+ * @field_info: a #GIFieldInfo
+ * @mem: pointer to a block of memory representing a C structure or union
+ * @value: a #GIArgument into which to store the value retrieved
+ *
+ * Reads a field identified by a #GFieldInfo from a C structure or
+ * union.  This only handles fields of simple C types. It will fail
+ * for a field of a composite type like a nested structure or union
+ * even if that is actually readable.
+ *
+ * Returns: %TRUE if reading the field succeeded, otherwise %FALSE
+ */
+gboolean
+g_field_info_get_field (GIFieldInfo *field_info,
+                       gpointer     mem,
+                       GIArgument   *value)
+{
+  int offset;
+  GITypeInfo *type_info;
+  gboolean result = FALSE;
+
+  g_return_val_if_fail (field_info != NULL, FALSE);
+  g_return_val_if_fail (GI_IS_FIELD_INFO (field_info), FALSE);
+
+  if ((g_field_info_get_flags (field_info) & GI_FIELD_IS_READABLE) == 0)
+    return FALSE;
+
+  offset = g_field_info_get_offset (field_info);
+  type_info = g_field_info_get_type (field_info);
+
+  if (g_type_info_is_pointer (type_info))
+    {
+      value->v_pointer = G_STRUCT_MEMBER (gpointer, mem, offset);
+      result = TRUE;
+    }
+  else
+    {
+      switch (g_type_info_get_tag (type_info))
+       {
+       case GI_TYPE_TAG_VOID:
+         g_warning("Field %s: should not be have void type",
+                   g_base_info_get_name ((GIBaseInfo *)field_info));
+         break;
+       case GI_TYPE_TAG_BOOLEAN:
+         value->v_boolean = G_STRUCT_MEMBER (gboolean, mem, offset) != FALSE;
+         result = TRUE;
+         break;
+       case GI_TYPE_TAG_INT8:
+       case GI_TYPE_TAG_UINT8:
+         value->v_uint8 = G_STRUCT_MEMBER (guint8, mem, offset);
+         result = TRUE;
+         break;
+       case GI_TYPE_TAG_INT16:
+       case GI_TYPE_TAG_UINT16:
+         value->v_uint16 = G_STRUCT_MEMBER (guint16, mem, offset);
+         result = TRUE;
+         break;
+       case GI_TYPE_TAG_INT32:
+       case GI_TYPE_TAG_UINT32:
+       case GI_TYPE_TAG_UNICHAR:
+         value->v_uint32 = G_STRUCT_MEMBER (guint32, mem, offset);
+         result = TRUE;
+         break;
+       case GI_TYPE_TAG_INT64:
+       case GI_TYPE_TAG_UINT64:
+         value->v_uint64 = G_STRUCT_MEMBER (guint64, mem, offset);
+         result = TRUE;
+         break;
+       case GI_TYPE_TAG_GTYPE:
+         value->v_size = G_STRUCT_MEMBER (gsize, mem, offset);
+         result = TRUE;
+         break;
+       case GI_TYPE_TAG_FLOAT:
+         value->v_float = G_STRUCT_MEMBER (gfloat, mem, offset);
+         result = TRUE;
+         break;
+       case GI_TYPE_TAG_DOUBLE:
+         value->v_double = G_STRUCT_MEMBER (gdouble, mem, offset);
+         result = TRUE;
+         break;
+       case GI_TYPE_TAG_ARRAY:
+         /* We don't check the array type and that it is fixed-size,
+            we trust g-ir-compiler to do the right thing */
+         value->v_pointer = G_STRUCT_MEMBER_P (mem, offset);
+         result = TRUE;
+         break;
+       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:
+         g_warning("Field %s: type %s should have is_pointer set",
+                   g_base_info_get_name ((GIBaseInfo *)field_info),
+                   g_type_tag_to_string (g_type_info_get_tag (type_info)));
+         break;
+       case GI_TYPE_TAG_ERROR:
+         /* Needs to be handled by the language binding directly */
+         break;
+       case GI_TYPE_TAG_INTERFACE:
+         {
+           GIBaseInfo *interface = g_type_info_get_interface (type_info);
+           switch (g_base_info_get_type (interface))
+             {
+             case GI_INFO_TYPE_STRUCT:
+             case GI_INFO_TYPE_UNION:
+             case GI_INFO_TYPE_BOXED:
+               /* Needs to be handled by the language binding directly */
+               break;
+             case GI_INFO_TYPE_OBJECT:
+               break;
+             case GI_INFO_TYPE_ENUM:
+             case GI_INFO_TYPE_FLAGS:
+               {
+                 /* FIXME: there's a mismatch here between the value->v_int we use
+                  * here and the gint64 result returned from g_value_info_get_value().
+                  * But to switch this to gint64, we'd have to make g_function_info_invoke()
+                  * translate value->v_int64 to the proper ABI for an enum function
+                  * call parameter, which will usually be int, and then fix up language
+                  * bindings.
+                  */
+                 GITypeTag storage_type = g_enum_info_get_storage_type ((GIEnumInfo *)interface);
+                 switch (storage_type)
+                   {
+                   case GI_TYPE_TAG_INT8:
+                   case GI_TYPE_TAG_UINT8:
+                     value->v_int = (gint)G_STRUCT_MEMBER (guint8, mem, offset);
+                     result = TRUE;
+                     break;
+                   case GI_TYPE_TAG_INT16:
+                   case GI_TYPE_TAG_UINT16:
+                     value->v_int = (gint)G_STRUCT_MEMBER (guint16, mem, offset);
+                     result = TRUE;
+                     break;
+                   case GI_TYPE_TAG_INT32:
+                   case GI_TYPE_TAG_UINT32:
+                     value->v_int = (gint)G_STRUCT_MEMBER (guint32, mem, offset);
+                     result = TRUE;
+                     break;
+                   case GI_TYPE_TAG_INT64:
+                   case GI_TYPE_TAG_UINT64:
+                     value->v_int = (gint)G_STRUCT_MEMBER (guint64, mem, offset);
+                     result = TRUE;
+                     break;
+                   default:
+                     g_warning("Field %s: Unexpected enum storage type %s",
+                               g_base_info_get_name ((GIBaseInfo *)field_info),
+                               g_type_tag_to_string (storage_type));
+                     break;
+                   }
+                 break;
+               }
+             case GI_INFO_TYPE_VFUNC:
+             case GI_INFO_TYPE_CALLBACK:
+               g_warning("Field %s: Interface type %d should have is_pointer set",
+                         g_base_info_get_name ((GIBaseInfo *)field_info),
+                         g_base_info_get_type (interface));
+               break;
+             case GI_INFO_TYPE_INVALID:
+             case GI_INFO_TYPE_INTERFACE:
+             case GI_INFO_TYPE_FUNCTION:
+             case GI_INFO_TYPE_CONSTANT:
+             case GI_INFO_TYPE_INVALID_0:
+             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_warning("Field %s: Interface type %d not expected",
+                         g_base_info_get_name ((GIBaseInfo *)field_info),
+                         g_base_info_get_type (interface));
+               break;
+             }
+
+           g_base_info_unref ((GIBaseInfo *)interface);
+           break;
+         }
+         break;
+       }
+    }
+
+  g_base_info_unref ((GIBaseInfo *)type_info);
+
+  return result;
+}
+
+/**
+ * g_field_info_set_field: (skip)
+ * @field_info: a #GIFieldInfo
+ * @mem: pointer to a block of memory representing a C structure or union
+ * @value: a #GIArgument holding the value to store
+ *
+ * Writes a field identified by a #GFieldInfo to a C structure or
+ * union.  This only handles fields of simple C types. It will fail
+ * for a field of a composite type like a nested structure or union
+ * even if that is actually writable. Note also that that it will refuse
+ * to write fields where memory management would by required. A field
+ * with a type such as 'char *' must be set with a setter function.
+ *
+ * Returns: %TRUE if writing the field succeeded, otherwise %FALSE
+ */
+gboolean
+g_field_info_set_field (GIFieldInfo     *field_info,
+                       gpointer         mem,
+                       const GIArgument *value)
+{
+  int offset;
+  GITypeInfo *type_info;
+  gboolean result = FALSE;
+
+  g_return_val_if_fail (field_info != NULL, FALSE);
+  g_return_val_if_fail (GI_IS_FIELD_INFO (field_info), FALSE);
+
+  if ((g_field_info_get_flags (field_info) & GI_FIELD_IS_WRITABLE) == 0)
+    return FALSE;
+
+  offset = g_field_info_get_offset (field_info);
+  type_info = g_field_info_get_type (field_info);
+
+  if (!g_type_info_is_pointer (type_info))
+    {
+      switch (g_type_info_get_tag (type_info))
+       {
+       case GI_TYPE_TAG_VOID:
+         g_warning("Field %s: should not be have void type",
+                   g_base_info_get_name ((GIBaseInfo *)field_info));
+         break;
+       case GI_TYPE_TAG_BOOLEAN:
+         G_STRUCT_MEMBER (gboolean, mem, offset) = value->v_boolean != FALSE;
+         result = TRUE;
+         break;
+       case GI_TYPE_TAG_INT8:
+       case GI_TYPE_TAG_UINT8:
+         G_STRUCT_MEMBER (guint8, mem, offset) = value->v_uint8;
+         result = TRUE;
+         break;
+       case GI_TYPE_TAG_INT16:
+       case GI_TYPE_TAG_UINT16:
+         G_STRUCT_MEMBER (guint16, mem, offset) = value->v_uint16;
+         result = TRUE;
+         break;
+       case GI_TYPE_TAG_INT32:
+       case GI_TYPE_TAG_UINT32:
+       case GI_TYPE_TAG_UNICHAR:
+         G_STRUCT_MEMBER (guint32, mem, offset) = value->v_uint32;
+         result = TRUE;
+         break;
+       case GI_TYPE_TAG_INT64:
+       case GI_TYPE_TAG_UINT64:
+         G_STRUCT_MEMBER (guint64, mem, offset) = value->v_uint64;
+         result = TRUE;
+         break;
+       case GI_TYPE_TAG_GTYPE:
+         G_STRUCT_MEMBER (gsize, mem, offset) = value->v_size;
+         result = TRUE;
+         break;
+       case GI_TYPE_TAG_FLOAT:
+         G_STRUCT_MEMBER (gfloat, mem, offset) = value->v_float;
+         result = TRUE;
+         break;
+       case GI_TYPE_TAG_DOUBLE:
+         G_STRUCT_MEMBER (gdouble, mem, offset)= value->v_double;
+         result = TRUE;
+         break;
+       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:
+         g_warning("Field %s: type %s should have is_pointer set",
+                   g_base_info_get_name ((GIBaseInfo *)field_info),
+                   g_type_tag_to_string (g_type_info_get_tag (type_info)));
+         break;
+       case GI_TYPE_TAG_ERROR:
+         /* Needs to be handled by the language binding directly */
+         break;
+       case GI_TYPE_TAG_INTERFACE:
+         {
+           GIBaseInfo *interface = g_type_info_get_interface (type_info);
+           switch (g_base_info_get_type (interface))
+             {
+             case GI_INFO_TYPE_STRUCT:
+             case GI_INFO_TYPE_UNION:
+             case GI_INFO_TYPE_BOXED:
+               /* Needs to be handled by the language binding directly */
+               break;
+             case GI_INFO_TYPE_OBJECT:
+               break;
+             case GI_INFO_TYPE_ENUM:
+             case GI_INFO_TYPE_FLAGS:
+               {
+                 /* See FIXME above
+                  */
+                 GITypeTag storage_type = g_enum_info_get_storage_type ((GIEnumInfo *)interface);
+                 switch (storage_type)
+                   {
+                   case GI_TYPE_TAG_INT8:
+                   case GI_TYPE_TAG_UINT8:
+                     G_STRUCT_MEMBER (guint8, mem, offset) = (guint8)value->v_int;
+                     result = TRUE;
+                     break;
+                   case GI_TYPE_TAG_INT16:
+                   case GI_TYPE_TAG_UINT16:
+                     G_STRUCT_MEMBER (guint16, mem, offset) = (guint16)value->v_int;
+                     result = TRUE;
+                     break;
+                   case GI_TYPE_TAG_INT32:
+                   case GI_TYPE_TAG_UINT32:
+                     G_STRUCT_MEMBER (guint32, mem, offset) = (guint32)value->v_int;
+                     result = TRUE;
+                     break;
+                   case GI_TYPE_TAG_INT64:
+                   case GI_TYPE_TAG_UINT64:
+                     G_STRUCT_MEMBER (guint64, mem, offset) = (guint64)value->v_int;
+                     result = TRUE;
+                     break;
+                   default:
+                     g_warning("Field %s: Unexpected enum storage type %s",
+                               g_base_info_get_name ((GIBaseInfo *)field_info),
+                               g_type_tag_to_string (storage_type));
+                     break;
+                   }
+                 break;
+               }
+               break;
+             case GI_INFO_TYPE_VFUNC:
+             case GI_INFO_TYPE_CALLBACK:
+               g_warning("Field%s: Interface type %d should have is_pointer set",
+                         g_base_info_get_name ((GIBaseInfo *)field_info),
+                         g_base_info_get_type (interface));
+               break;
+             case GI_INFO_TYPE_INVALID:
+             case GI_INFO_TYPE_INTERFACE:
+             case GI_INFO_TYPE_FUNCTION:
+             case GI_INFO_TYPE_CONSTANT:
+             case GI_INFO_TYPE_INVALID_0:
+             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_warning("Field %s: Interface type %d not expected",
+                         g_base_info_get_name ((GIBaseInfo *)field_info),
+                         g_base_info_get_type (interface));
+               break;
+             }
+
+           g_base_info_unref ((GIBaseInfo *)interface);
+           break;
+         }
+         break;
+       }
+    } else {
+      switch (g_type_info_get_tag (type_info))
+        {
+        case GI_TYPE_TAG_INTERFACE:
+          {
+           GIBaseInfo *interface = g_type_info_get_interface (type_info);
+           switch (g_base_info_get_type (interface))
+              {
+                case GI_INFO_TYPE_OBJECT:
+                case GI_INFO_TYPE_INTERFACE:
+                  G_STRUCT_MEMBER (gpointer, mem, offset) = (gpointer)value->v_pointer;
+                  result = TRUE;
+                  break;
+               default:
+                 break;
+              }
+              g_base_info_unref ((GIBaseInfo *)interface);
+          }
+       default:
+         break;
+        }
+    }
+
+  g_base_info_unref ((GIBaseInfo *)type_info);
+
+  return result;
+}
diff --git a/girepository/gifieldinfo.h b/girepository/gifieldinfo.h
new file mode 100644 (file)
index 0000000..4ca5409
--- /dev/null
@@ -0,0 +1,52 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Field and Field values
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#ifndef __GIFIELDINFO_H__
+#define __GIFIELDINFO_H__
+
+#if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
+#error "Only <girepository.h> can be included directly."
+#endif
+
+#include <gitypes.h>
+
+G_BEGIN_DECLS
+
+#define GI_IS_FIELD_INFO(info) \
+    (g_base_info_get_type((GIBaseInfo*)info) ==  GI_INFO_TYPE_FIELD)
+
+GIFieldInfoFlags       g_field_info_get_flags      (GIFieldInfo *info);
+gint                   g_field_info_get_size       (GIFieldInfo *info);
+gint                   g_field_info_get_offset     (GIFieldInfo *info);
+GITypeInfo *           g_field_info_get_type       (GIFieldInfo *info);
+gboolean               g_field_info_get_field      (GIFieldInfo     *field_info,
+                                                   gpointer         mem,
+                                                   GIArgument       *value);
+gboolean               g_field_info_set_field      (GIFieldInfo     *field_info,
+                                                   gpointer         mem,
+                                                   const GIArgument *value);
+
+G_END_DECLS
+
+
+#endif  /* __GIFIELDINFO_H__ */
+
diff --git a/girepository/gifunctioninfo.c b/girepository/gifunctioninfo.c
new file mode 100644 (file)
index 0000000..a5858c7
--- /dev/null
@@ -0,0 +1,284 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Function implementation
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#include <string.h>
+
+#include <glib.h>
+
+#include <girepository.h>
+#include "girepository-private.h"
+#include "gitypelib-internal.h"
+
+/**
+ * SECTION:gifunctioninfo
+ * @Short_description: Struct representing a function
+ * @Title: GIFunctionInfo
+ *
+ * GIFunctionInfo represents a function, method or constructor.
+ * To find out what kind of entity a #GIFunctionInfo represents, call
+ * g_function_info_get_flags().
+ *
+ * See also #GICallableInfo for information on how to retreive arguments and
+ * other metadata.
+ *
+ * <refsect1 id="gi-gifunctioninfo.struct-hierarchy" role="struct_hierarchy">
+ * <title role="struct_hierarchy.title">Struct hierarchy</title>
+ * <synopsis>
+ *   <link linkend="gi-GIBaseInfo">GIBaseInfo</link>
+ *    +----<link linkend="gi-GICallableInfo">GICallableInfo</link>
+ *          +----GIFunctionInfo
+ *          +----<link linkend="gi-GISignalInfo">GISignalInfo</link>
+ *          +----<link linkend="gi-GIVFuncInfo">GIVFuncInfo</link>
+ * </synopsis>
+ * </refsect1>
+ */
+
+GIFunctionInfo *
+_g_base_info_find_method (GIBaseInfo   *base,
+                         guint32       offset,
+                         gint          n_methods,
+                         const gchar  *name)
+{
+  /* FIXME hash */
+  GIRealInfo *rinfo = (GIRealInfo*)base;
+  Header *header = (Header *)rinfo->typelib->data;
+  gint i;
+
+  for (i = 0; i < n_methods; i++)
+    {
+      FunctionBlob *fblob = (FunctionBlob *)&rinfo->typelib->data[offset];
+      const gchar *fname = (const gchar *)&rinfo->typelib->data[fblob->name];
+
+      if (strcmp (name, fname) == 0)
+        return (GIFunctionInfo *) g_info_new (GI_INFO_TYPE_FUNCTION, base,
+                                             rinfo->typelib, offset);
+
+      offset += header->function_blob_size;
+    }
+
+  return NULL;
+}
+
+/**
+ * g_function_info_get_symbol:
+ * @info: a #GIFunctionInfo
+ *
+ * Obtain the symbol of the function. The symbol is the name of the
+ * exported function, suitable to be used as an argument to
+ * g_module_symbol().
+ *
+ * Returns: the symbol
+ */
+const gchar *
+g_function_info_get_symbol (GIFunctionInfo *info)
+{
+  GIRealInfo *rinfo;
+  FunctionBlob *blob;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_FUNCTION_INFO (info), NULL);
+
+  rinfo = (GIRealInfo *)info;
+  blob = (FunctionBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return g_typelib_get_string (rinfo->typelib, blob->symbol);
+}
+
+/**
+ * g_function_info_get_flags:
+ * @info: a #GIFunctionInfo
+ *
+ * Obtain the #GIFunctionInfoFlags for the @info.
+ *
+ * Returns: the flags
+ */
+GIFunctionInfoFlags
+g_function_info_get_flags (GIFunctionInfo *info)
+{
+  GIFunctionInfoFlags flags;
+  GIRealInfo *rinfo;
+  FunctionBlob *blob;
+
+  g_return_val_if_fail (info != NULL, -1);
+  g_return_val_if_fail (GI_IS_FUNCTION_INFO (info), -1);
+
+  rinfo = (GIRealInfo *)info;
+  blob = (FunctionBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  flags = 0;
+
+  /* Make sure we don't flag Constructors as methods */
+  if (!blob->constructor && !blob->is_static)
+    flags = flags | GI_FUNCTION_IS_METHOD;
+
+  if (blob->constructor)
+    flags = flags | GI_FUNCTION_IS_CONSTRUCTOR;
+
+  if (blob->getter)
+    flags = flags | GI_FUNCTION_IS_GETTER;
+
+  if (blob->setter)
+    flags = flags | GI_FUNCTION_IS_SETTER;
+
+  if (blob->wraps_vfunc)
+    flags = flags | GI_FUNCTION_WRAPS_VFUNC;
+
+  if (blob->throws)
+    flags = flags | GI_FUNCTION_THROWS;
+
+  return flags;
+}
+
+/**
+ * g_function_info_get_property:
+ * @info: a #GIFunctionInfo
+ *
+ * Obtain the property associated with this #GIFunctionInfo.
+ * Only #GIFunctionInfo with the flag %GI_FUNCTION_IS_GETTER or
+ * %GI_FUNCTION_IS_SETTER have a property set. For other cases,
+ * %NULL will be returned.
+ *
+ * Returns: (transfer full): the property or %NULL if not set. Free it with
+ * g_base_info_unref() when done.
+ */
+GIPropertyInfo *
+g_function_info_get_property (GIFunctionInfo *info)
+{
+  GIRealInfo *rinfo;
+  FunctionBlob *blob;
+  GIInterfaceInfo *container;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_FUNCTION_INFO (info), NULL);
+
+  rinfo = (GIRealInfo *)info;
+  blob = (FunctionBlob *)&rinfo->typelib->data[rinfo->offset];
+  container = (GIInterfaceInfo *)rinfo->container;
+
+  return g_interface_info_get_property (container, blob->index);
+}
+
+/**
+ * g_function_info_get_vfunc:
+ * @info: a #GIFunctionInfo
+ *
+ * Obtain the virtual function associated with this #GIFunctionInfo.
+ * Only #GIFunctionInfo with the flag %GI_FUNCTION_WRAPS_VFUNC has
+ * a virtual function set. For other cases, %NULL will be returned.
+ *
+ * Returns: (transfer full): the virtual function or %NULL if not set.
+ * Free it by calling g_base_info_unref() when done.
+ */
+GIVFuncInfo *
+g_function_info_get_vfunc (GIFunctionInfo *info)
+{
+  GIRealInfo *rinfo;
+  FunctionBlob *blob;
+  GIInterfaceInfo *container;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_FUNCTION_INFO (info), NULL);
+
+  rinfo = (GIRealInfo *)info;
+  blob = (FunctionBlob *)&rinfo->typelib->data[rinfo->offset];
+  container = (GIInterfaceInfo *)rinfo->container;
+
+  return g_interface_info_get_vfunc (container, blob->index);
+}
+
+GQuark
+g_invoke_error_quark (void)
+{
+  static GQuark quark = 0;
+  if (quark == 0)
+    quark = g_quark_from_static_string ("g-invoke-error-quark");
+  return quark;
+}
+
+/**
+ * g_function_info_invoke: (skip)
+ * @info: a #GIFunctionInfo describing the function to invoke
+ * @in_args: an array of #GIArgument<!-- -->s, one for each in
+ *    parameter of @info. If there are no in parameter, @in_args
+ *    can be %NULL
+ * @n_in_args: the length of the @in_args array
+ * @out_args: an array of #GIArgument<!-- -->s, one for each out
+ *    parameter of @info. If there are no out parameters, @out_args
+ *    may be %NULL
+ * @n_out_args: the length of the @out_args array
+ * @return_value: return location for the return value of the
+ *    function. If the function returns void, @return_value may be
+ *    %NULL
+ * @error: return location for detailed error information, or %NULL
+ *
+ * Invokes the function described in @info with the given
+ * arguments. Note that inout parameters must appear in both
+ * argument lists. This function uses dlsym() to obtain a pointer
+ * to the function, so the library or shared object containing the
+ * described function must either be linked to the caller, or must
+ * have been g_module_symbol()<!-- -->ed before calling this function.
+ *
+ * Returns: %TRUE if the function has been invoked, %FALSE if an
+ *   error occurred.
+ */
+gboolean
+g_function_info_invoke (GIFunctionInfo *info,
+                       const GIArgument  *in_args,
+                       int               n_in_args,
+                       const GIArgument  *out_args,
+                       int               n_out_args,
+                       GIArgument        *return_value,
+                       GError          **error)
+{
+  const gchar *symbol;
+  gpointer func;
+  gboolean is_method;
+  gboolean throws;
+
+  symbol = g_function_info_get_symbol (info);
+
+  if (!g_typelib_symbol (g_base_info_get_typelib((GIBaseInfo *) info),
+                         symbol, &func))
+    {
+      g_set_error (error,
+                   G_INVOKE_ERROR,
+                   G_INVOKE_ERROR_SYMBOL_NOT_FOUND,
+                   "Could not locate %s: %s", symbol, g_module_error ());
+
+      return FALSE;
+    }
+
+  is_method = (g_function_info_get_flags (info) & GI_FUNCTION_IS_METHOD) != 0
+    && (g_function_info_get_flags (info) & GI_FUNCTION_IS_CONSTRUCTOR) == 0;
+  throws = g_function_info_get_flags (info) & GI_FUNCTION_THROWS;
+
+  return g_callable_info_invoke ((GICallableInfo*) info,
+                                 func,
+                                 in_args,
+                                 n_in_args,
+                                 out_args,
+                                 n_out_args,
+                                 return_value,
+                                 is_method,
+                                 throws,
+                                 error);
+}
diff --git a/girepository/gifunctioninfo.h b/girepository/gifunctioninfo.h
new file mode 100644 (file)
index 0000000..7a9ecae
--- /dev/null
@@ -0,0 +1,77 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Function
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#ifndef __GIFUNCTIONINFO_H__
+#define __GIFUNCTIONINFO_H__
+
+#if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
+#error "Only <girepository.h> can be included directly."
+#endif
+
+#include <gitypes.h>
+
+G_BEGIN_DECLS
+
+#define GI_IS_FUNCTION_INFO(info) \
+    (g_base_info_get_type((GIBaseInfo*)info) ==  GI_INFO_TYPE_FUNCTION)
+
+const gchar *           g_function_info_get_symbol     (GIFunctionInfo *info);
+GIFunctionInfoFlags     g_function_info_get_flags      (GIFunctionInfo *info);
+GIPropertyInfo *        g_function_info_get_property   (GIFunctionInfo *info);
+GIVFuncInfo *           g_function_info_get_vfunc      (GIFunctionInfo *info);
+
+#define G_INVOKE_ERROR (g_invoke_error_quark ())
+GQuark g_invoke_error_quark (void);
+
+/**
+ * GInvokeError:
+ * @G_INVOKE_ERROR_FAILED: invokation failed, unknown error.
+ * @G_INVOKE_ERROR_SYMBOL_NOT_FOUND: symbol couldn't be found in any of the
+ * libraries associated with the typelib of the function.
+ * @G_INVOKE_ERROR_ARGUMENT_MISMATCH: the arguments provided didn't match
+ * the expected arguments for the functions type signature.
+ *
+ * An error occuring while invoking a function via
+ * g_function_info_invoke().
+ */
+
+typedef enum
+{
+  G_INVOKE_ERROR_FAILED,
+  G_INVOKE_ERROR_SYMBOL_NOT_FOUND,
+  G_INVOKE_ERROR_ARGUMENT_MISMATCH
+} GInvokeError;
+
+gboolean              g_function_info_invoke         (GIFunctionInfo *info,
+                                                     const GIArgument  *in_args,
+                                                     int               n_in_args,
+                                                     const GIArgument  *out_args,
+                                                     int               n_out_args,
+                                                     GIArgument        *return_value,
+                                                     GError          **error);
+
+
+G_END_DECLS
+
+
+#endif  /* __GIFUNCTIONINFO_H__ */
+
diff --git a/girepository/giinterfaceinfo.c b/girepository/giinterfaceinfo.c
new file mode 100644 (file)
index 0000000..69cd63d
--- /dev/null
@@ -0,0 +1,473 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Interface implementation
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#include <glib.h>
+
+#include <girepository.h>
+#include "girepository-private.h"
+#include "gitypelib-internal.h"
+
+/**
+ * SECTION:giinterfaceinfo
+ * @Short_description: Struct representing a GInterface
+ * @Title: GIInterfaceInfo
+ *
+ * GIInterfaceInfo represents a #GInterface type.
+ *
+ * A GInterface has methods, fields, properties, signals, interfaces, constants,
+ * virtual functions and prerequisites.
+ *
+ * <refsect1 id="gi-giinterfaceinfo.struct-hierarchy" role="struct_hierarchy">
+ * <title role="struct_hierarchy.title">Struct hierarchy</title>
+ * <synopsis>
+ *   <link linkend="gi-GIBaseInfo">GIBaseInfo</link>
+ *    +----<link linkend="gi-GIRegisteredTypeInfo">GIRegisteredTypeInfo</link>
+ *          +----GIInterfaceInfo
+ * </synopsis>
+ * </refsect1>
+ */
+
+/**
+ * g_interface_info_get_n_prerequisites:
+ * @info: a #GIInterfaceInfo
+ *
+ * Obtain the number of prerequisites for this interface type.
+ * A prerequisites is another interface that needs to be implemented for
+ * interface, similar to an base class for GObjects.
+ *
+ * Returns: number of prerequisites
+ */
+gint
+g_interface_info_get_n_prerequisites (GIInterfaceInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  InterfaceBlob *blob;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_INTERFACE_INFO (info), 0);
+
+  blob = (InterfaceBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->n_prerequisites;
+}
+
+/**
+ * g_interface_info_get_prerequisite:
+ * @info: a #GIInterfaceInfo
+ * @n: index of prerequisites to get
+ *
+ * Obtain an interface type prerequisites index @n.
+ *
+ * Returns: (transfer full): the prerequisites as a #GIBaseInfo. Free the struct by calling
+ * g_base_info_unref() when done.
+ */
+GIBaseInfo *
+g_interface_info_get_prerequisite (GIInterfaceInfo *info,
+                                  gint            n)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  InterfaceBlob *blob;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_INTERFACE_INFO (info), NULL);
+
+  blob = (InterfaceBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return _g_info_from_entry (rinfo->repository,
+                            rinfo->typelib, blob->prerequisites[n]);
+}
+
+
+/**
+ * g_interface_info_get_n_properties:
+ * @info: a #GIInterfaceInfo
+ *
+ * Obtain the number of properties that this interface type has.
+ *
+ * Returns: number of properties
+ */
+gint
+g_interface_info_get_n_properties (GIInterfaceInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  InterfaceBlob *blob;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_INTERFACE_INFO (info), 0);
+
+  blob = (InterfaceBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->n_properties;
+}
+
+/**
+ * g_interface_info_get_property:
+ * @info: a #GIInterfaceInfo
+ * @n: index of property to get
+ *
+ * Obtain an interface type property at index @n.
+ *
+ * Returns: (transfer full): the #GIPropertyInfo. Free the struct by calling
+ * g_base_info_unref() when done.
+ */
+GIPropertyInfo *
+g_interface_info_get_property (GIInterfaceInfo *info,
+                              gint            n)
+{
+  gint offset;
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  Header *header;
+  InterfaceBlob *blob;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_INTERFACE_INFO (info), NULL);
+
+  header = (Header *)rinfo->typelib->data;
+  blob = (InterfaceBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  offset = rinfo->offset + header->interface_blob_size
+    + (blob->n_prerequisites + (blob->n_prerequisites % 2)) * 2
+    + n * header->property_blob_size;
+
+  return (GIPropertyInfo *) g_info_new (GI_INFO_TYPE_PROPERTY, (GIBaseInfo*)info,
+                                       rinfo->typelib, offset);
+}
+
+/**
+ * g_interface_info_get_n_methods:
+ * @info: a #GIInterfaceInfo
+ *
+ * Obtain the number of methods that this interface type has.
+ *
+ * Returns: number of methods
+ */
+gint
+g_interface_info_get_n_methods (GIInterfaceInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  InterfaceBlob *blob;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_INTERFACE_INFO (info), 0);
+
+  blob = (InterfaceBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->n_methods;
+}
+
+/**
+ * g_interface_info_get_method:
+ * @info: a #GIInterfaceInfo
+ * @n: index of method to get
+ *
+ * Obtain an interface type method at index @n.
+ *
+ * Returns: (transfer full): the #GIFunctionInfo. Free the struct by calling
+ * g_base_info_unref() when done.
+ */
+GIFunctionInfo *
+g_interface_info_get_method (GIInterfaceInfo *info,
+                            gint            n)
+{
+  gint offset;
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  Header *header;
+  InterfaceBlob *blob;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_INTERFACE_INFO (info), NULL);
+
+  header = (Header *)rinfo->typelib->data;
+  blob = (InterfaceBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  offset = rinfo->offset + header->interface_blob_size
+    + (blob->n_prerequisites + (blob->n_prerequisites % 2)) * 2
+    + blob->n_properties * header->property_blob_size
+    + n * header->function_blob_size;
+
+  return (GIFunctionInfo *) g_info_new (GI_INFO_TYPE_FUNCTION, (GIBaseInfo*)info,
+                                       rinfo->typelib, offset);
+}
+
+/**
+ * g_interface_info_find_method:
+ * @info: a #GIInterfaceInfo
+ * @name: name of method to obtain
+ *
+ * Obtain a method of the interface type given a @name. %NULL will be
+ * returned if there's no method available with that name.
+ *
+ * Returns: (transfer full): the #GIFunctionInfo or %NULL if none found.
+ * Free the struct by calling g_base_info_unref() when done.
+ */
+GIFunctionInfo *
+g_interface_info_find_method (GIInterfaceInfo *info,
+                             const gchar     *name)
+{
+  gint offset;
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  Header *header = (Header *)rinfo->typelib->data;
+  InterfaceBlob *blob = (InterfaceBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  offset = rinfo->offset + header->interface_blob_size
+    + (blob->n_prerequisites + (blob->n_prerequisites % 2)) * 2
+    + blob->n_properties * header->property_blob_size;
+
+  return _g_base_info_find_method ((GIBaseInfo*)info, offset, blob->n_methods, name);
+}
+
+/**
+ * g_interface_info_get_n_signals:
+ * @info: a #GIInterfaceInfo
+ *
+ * Obtain the number of signals that this interface type has.
+ *
+ * Returns: number of signals
+ */
+gint
+g_interface_info_get_n_signals (GIInterfaceInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  InterfaceBlob *blob;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_INTERFACE_INFO (info), 0);
+
+  blob = (InterfaceBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->n_signals;
+}
+
+/**
+ * g_interface_info_get_signal:
+ * @info: a #GIInterfaceInfo
+ * @n: index of signal to get
+ *
+ * Obtain an interface type signal at index @n.
+ *
+ * Returns: (transfer full): the #GISignalInfo. Free the struct by calling
+ * g_base_info_unref() when done.
+ */
+GISignalInfo *
+g_interface_info_get_signal (GIInterfaceInfo *info,
+                            gint            n)
+{
+  gint offset;
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  Header *header;
+  InterfaceBlob *blob;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_INTERFACE_INFO (info), NULL);
+
+  header = (Header *)rinfo->typelib->data;
+  blob = (InterfaceBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  offset = rinfo->offset + header->interface_blob_size
+    + (blob->n_prerequisites + (blob->n_prerequisites % 2)) * 2
+    + blob->n_properties * header->property_blob_size
+    + blob->n_methods * header->function_blob_size
+    + n * header->signal_blob_size;
+
+  return (GISignalInfo *) g_info_new (GI_INFO_TYPE_SIGNAL, (GIBaseInfo*)info,
+                                     rinfo->typelib, offset);
+}
+
+/**
+ * g_interface_info_get_n_vfuncs:
+ * @info: a #GIInterfaceInfo
+ *
+ * Obtain the number of virtual functions that this interface type has.
+ *
+ * Returns: number of virtual functions
+ */
+gint
+g_interface_info_get_n_vfuncs (GIInterfaceInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  InterfaceBlob *blob;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_INTERFACE_INFO (info), 0);
+
+  blob = (InterfaceBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->n_vfuncs;
+}
+
+/**
+ * g_interface_info_get_vfunc:
+ * @info: a #GIInterfaceInfo
+ * @n: index of virtual function to get
+ *
+ * Obtain an interface type virtual function at index @n.
+ *
+ * Returns: (transfer full): the #GIVFuncInfo. Free the struct by calling
+ * g_base_info_unref() when done.
+ */
+GIVFuncInfo *
+g_interface_info_get_vfunc (GIInterfaceInfo *info,
+                           gint            n)
+{
+  gint offset;
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  Header *header;
+  InterfaceBlob *blob;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_INTERFACE_INFO (info), NULL);
+
+  header = (Header *)rinfo->typelib->data;
+  blob = (InterfaceBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  offset = rinfo->offset + header->interface_blob_size
+    + (blob->n_prerequisites + (blob->n_prerequisites % 2)) * 2
+    + blob->n_properties * header->property_blob_size
+    + blob->n_methods * header->function_blob_size
+    + blob->n_signals * header->signal_blob_size
+    + n * header->vfunc_blob_size;
+
+  return (GIVFuncInfo *) g_info_new (GI_INFO_TYPE_VFUNC, (GIBaseInfo*)info,
+                                    rinfo->typelib, offset);
+}
+
+/**
+ * g_interface_info_find_vfunc:
+ * @info: a #GIInterfaceInfo
+ * @name: The name of a virtual function to find.
+ *
+ * Locate a virtual function slot with name @name. See the documentation
+ * for g_object_info_find_vfunc() for more information on virtuals.
+ *
+ * Returns: (transfer full): the #GIVFuncInfo, or %NULL. Free it with
+ * g_base_info_unref() when done.
+ */
+GIVFuncInfo *
+g_interface_info_find_vfunc (GIInterfaceInfo *info,
+                             const gchar  *name)
+{
+  gint offset;
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  Header *header;
+  InterfaceBlob *blob;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_INTERFACE_INFO (info), NULL);
+
+  header = (Header *)rinfo->typelib->data;
+  blob = (InterfaceBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  offset = rinfo->offset + header->interface_blob_size
+    + (blob->n_prerequisites + blob->n_prerequisites % 2) * 2
+    + blob->n_properties * header->property_blob_size
+    + blob->n_methods * header->function_blob_size
+    + blob->n_signals * header->signal_blob_size;
+
+  return _g_base_info_find_vfunc (rinfo, offset, blob->n_vfuncs, name);
+}
+
+/**
+ * g_interface_info_get_n_constants:
+ * @info: a #GIInterfaceInfo
+ *
+ * Obtain the number of constants that this interface type has.
+ *
+ * Returns: number of constants
+ */
+gint
+g_interface_info_get_n_constants (GIInterfaceInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  InterfaceBlob *blob;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_INTERFACE_INFO (info), 0);
+
+  blob = (InterfaceBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->n_constants;
+}
+
+/**
+ * g_interface_info_get_constant:
+ * @info: a #GIInterfaceInfo
+ * @n: index of constant to get
+ *
+ * Obtain an interface type constant at index @n.
+ *
+ * Returns: (transfer full): the #GIConstantInfo. Free the struct by calling
+ * g_base_info_unref() when done.
+ */
+GIConstantInfo *
+g_interface_info_get_constant (GIInterfaceInfo *info,
+                              gint             n)
+{
+  gint offset;
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  Header *header;
+  InterfaceBlob *blob;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_INTERFACE_INFO (info), NULL);
+
+  header = (Header *)rinfo->typelib->data;
+  blob = (InterfaceBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  offset = rinfo->offset + header->interface_blob_size
+    + (blob->n_prerequisites + (blob->n_prerequisites % 2)) * 2
+    + blob->n_properties * header->property_blob_size
+    + blob->n_methods * header->function_blob_size
+    + blob->n_signals * header->signal_blob_size
+    + blob->n_vfuncs * header->vfunc_blob_size
+    + n * header->constant_blob_size;
+
+  return (GIConstantInfo *) g_info_new (GI_INFO_TYPE_CONSTANT, (GIBaseInfo*)info,
+                                       rinfo->typelib, offset);
+}
+
+/**
+ * g_interface_info_get_iface_struct:
+ * @info: a #GIInterfaceInfo
+ *
+ * Returns the layout C structure associated with this #GInterface.
+ *
+ * Returns: (transfer full): the #GIStructInfo or %NULL. Free it with
+ * g_base_info_unref() when done.
+ */
+GIStructInfo *
+g_interface_info_get_iface_struct (GIInterfaceInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  InterfaceBlob *blob;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_INTERFACE_INFO (info), NULL);
+
+  blob = (InterfaceBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  if (blob->gtype_struct)
+    return (GIStructInfo *) _g_info_from_entry (rinfo->repository,
+                                                rinfo->typelib, blob->gtype_struct);
+  else
+    return NULL;
+}
+
diff --git a/girepository/giinterfaceinfo.h b/girepository/giinterfaceinfo.h
new file mode 100644 (file)
index 0000000..8cab996
--- /dev/null
@@ -0,0 +1,66 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Interface
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#ifndef __GIINTERFACEINFO_H__
+#define __GIINTERFACEINFO_H__
+
+#if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
+#error "Only <girepository.h> can be included directly."
+#endif
+
+#include <gitypes.h>
+
+G_BEGIN_DECLS
+
+#define GI_IS_INTERFACE_INFO(info) \
+    (g_base_info_get_type((GIBaseInfo*)info) ==  GI_INFO_TYPE_INTERFACE)
+
+gint             g_interface_info_get_n_prerequisites (GIInterfaceInfo *info);
+GIBaseInfo *     g_interface_info_get_prerequisite    (GIInterfaceInfo *info,
+                                                      gint             n);
+gint             g_interface_info_get_n_properties    (GIInterfaceInfo *info);
+GIPropertyInfo * g_interface_info_get_property        (GIInterfaceInfo *info,
+                                                      gint             n);
+gint             g_interface_info_get_n_methods       (GIInterfaceInfo *info);
+GIFunctionInfo * g_interface_info_get_method          (GIInterfaceInfo *info,
+                                                      gint             n);
+GIFunctionInfo * g_interface_info_find_method         (GIInterfaceInfo *info,
+                                                      const gchar     *name);
+gint             g_interface_info_get_n_signals       (GIInterfaceInfo *info);
+GISignalInfo *   g_interface_info_get_signal          (GIInterfaceInfo *info,
+                                                      gint             n);
+gint             g_interface_info_get_n_vfuncs        (GIInterfaceInfo *info);
+GIVFuncInfo *    g_interface_info_get_vfunc           (GIInterfaceInfo *info,
+                                                      gint             n);
+GIVFuncInfo *    g_interface_info_find_vfunc          (GIInterfaceInfo *info,
+                                                       const gchar     *name);
+gint             g_interface_info_get_n_constants     (GIInterfaceInfo *info);
+GIConstantInfo * g_interface_info_get_constant        (GIInterfaceInfo *info,
+                                                      gint             n);
+
+GIStructInfo *   g_interface_info_get_iface_struct    (GIInterfaceInfo *info);
+
+G_END_DECLS
+
+
+#endif  /* __GIINTERFACEINFO_H__ */
+
diff --git a/girepository/ginvoke.c b/girepository/ginvoke.c
new file mode 100644 (file)
index 0000000..6c39c48
--- /dev/null
@@ -0,0 +1,273 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Invoke functionality
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ *
+ * 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 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.
+ */
+
+#include <stdlib.h>
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <girepository.h>
+#include "girffi.h"
+#include "config.h"
+
+static ffi_type *
+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;
+}
+
+/* See comment aboe set_gargument_from_ffi_return_value() */
+static ffi_type *
+g_value_to_ffi_return_type (const GValue *gvalue,
+                           const GIArgument *ffi_value,
+                           gpointer *value)
+{
+  ffi_type *rettype = NULL;
+  GType type = g_type_fundamental (G_VALUE_TYPE (gvalue));
+  g_assert (type != G_TYPE_INVALID);
+
+  *value = (gpointer)&(ffi_value->v_long);
+
+  switch (type) {
+  case G_TYPE_CHAR:
+    rettype = &ffi_type_sint8;
+    break;
+  case G_TYPE_UCHAR:
+    rettype = &ffi_type_uint8;
+    break;
+  case G_TYPE_BOOLEAN:
+  case G_TYPE_INT:
+    rettype = &ffi_type_sint;
+    break;
+  case G_TYPE_UINT:
+    rettype = &ffi_type_uint;
+    break;
+  case G_TYPE_STRING:
+  case G_TYPE_OBJECT:
+  case G_TYPE_BOXED:
+  case G_TYPE_POINTER:
+    rettype = &ffi_type_pointer;
+    break;
+  case G_TYPE_FLOAT:
+    rettype = &ffi_type_float;
+    *value = (gpointer)&(ffi_value->v_float);
+    break;
+  case G_TYPE_DOUBLE:
+    rettype = &ffi_type_double;
+    *value = (gpointer)&(ffi_value->v_double);
+    break;
+  case G_TYPE_LONG:
+    rettype = &ffi_type_slong;
+    break;
+  case G_TYPE_ULONG:
+    rettype = &ffi_type_ulong;
+    break;
+  case G_TYPE_INT64:
+    rettype = &ffi_type_sint64;
+    *value = (gpointer)&(ffi_value->v_int64);
+    break;
+  case G_TYPE_UINT64:
+    rettype = &ffi_type_uint64;
+    *value = (gpointer)&(ffi_value->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_value (GValue           *gvalue,
+                        const GIArgument *value)
+{
+  switch (g_type_fundamental (G_VALUE_TYPE (gvalue))) {
+  case G_TYPE_INT:
+      g_value_set_int (gvalue, (gint)value->v_long);
+      break;
+  case G_TYPE_FLOAT:
+      g_value_set_float (gvalue, (gfloat)value->v_float);
+      break;
+  case G_TYPE_DOUBLE:
+      g_value_set_double (gvalue, (gdouble)value->v_double);
+      break;
+  case G_TYPE_BOOLEAN:
+      g_value_set_boolean (gvalue, (gboolean)value->v_long);
+      break;
+  case G_TYPE_STRING:
+      g_value_set_string (gvalue, (gchar*)value->v_pointer);
+      break;
+  case G_TYPE_CHAR:
+      g_value_set_char (gvalue, (gchar)value->v_long);
+      break;
+  case G_TYPE_UCHAR:
+      g_value_set_uchar (gvalue, (guchar)value->v_ulong);
+      break;
+  case G_TYPE_UINT:
+      g_value_set_uint (gvalue, (guint)value->v_ulong);
+      break;
+  case G_TYPE_POINTER:
+      g_value_set_pointer (gvalue, (gpointer)value->v_pointer);
+      break;
+  case G_TYPE_LONG:
+      g_value_set_long (gvalue, (glong)value->v_long);
+      break;
+  case G_TYPE_ULONG:
+      g_value_set_ulong (gvalue, (gulong)value->v_ulong);
+      break;
+  case G_TYPE_INT64:
+      g_value_set_int64 (gvalue, (gint64)value->v_int64);
+      break;
+  case G_TYPE_UINT64:
+      g_value_set_uint64 (gvalue, (guint64)value->v_uint64);
+      break;
+  case G_TYPE_BOXED:
+      g_value_set_boxed (gvalue, (gpointer)value->v_pointer);
+      break;
+  default:
+    g_warning ("Unsupported fundamental type: %s",
+              g_type_name (g_type_fundamental (G_VALUE_TYPE (gvalue))));
+  }
+
+}
+
+void
+gi_cclosure_marshal_generic (GClosure *closure,
+                             GValue *return_gvalue,
+                             guint n_param_values,
+                             const GValue *param_values,
+                             gpointer invocation_hint,
+                             gpointer marshal_data)
+{
+  GIArgument return_ffi_value;
+  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_return_type (return_gvalue, &return_ffi_value,
+                                         &rvalue);
+    }
+  else
+    {
+      rtype = &ffi_type_void;
+      rvalue = &return_ffi_value.v_long;
+    }
+
+  n_args = n_param_values + 1;
+  atypes = g_alloca (sizeof (ffi_type *) * n_args);
+  args =  g_alloca (sizeof (gpointer) * n_args);
+
+  if (n_param_values > 0)
+    {
+      if (G_CCLOSURE_SWAP_DATA (closure))
+        {
+          atypes[n_args-1] = value_to_ffi_type (param_values + 0,
+                                                &args[n_args-1]);
+          atypes[0] = &ffi_type_pointer;
+          args[0] = &closure->data;
+        }
+      else
+        {
+          atypes[0] = value_to_ffi_type (param_values + 0, &args[0]);
+          atypes[n_args-1] = &ffi_type_pointer;
+          args[n_args-1] = &closure->data;
+        }
+    }
+  else
+    {
+      atypes[0] = &ffi_type_pointer;
+      args[0] = &closure->data;
+    }
+
+  for (i = 1; i < n_args - 1; i++)
+    atypes[i] = 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_value (return_gvalue, &return_ffi_value);
+}
diff --git a/girepository/giobjectinfo.c b/girepository/giobjectinfo.c
new file mode 100644 (file)
index 0000000..7ba2a93
--- /dev/null
@@ -0,0 +1,1037 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Object implementation
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#include <glib.h>
+
+#include <girepository.h>
+#include "girepository-private.h"
+#include "gitypelib-internal.h"
+
+/**
+ * SECTION:giobjectinfo
+ * @Short_description: Struct representing a GObject
+ * @Title: GIObjectInfo
+ *
+ * GIObjectInfo represents a #GObject. This doesn't represent a specific
+ * instance of a GObject, instead this represent the object type (eg class).
+ *
+ * A GObject has methods, fields, properties, signals, interfaces, constants
+ * and virtual functions.
+ *
+ * <refsect1 id="gi-giobjectinfo.struct-hierarchy" role="struct_hierarchy">
+ * <title role="struct_hierarchy.title">Struct hierarchy</title>
+ * <synopsis>
+ *   <link linkend="gi-GIBaseInfo">GIBaseInfo</link>
+ *    +----<link linkend="gi-GIRegisteredTypeInfo">GIRegisteredTypeInfo</link>
+ *          +----GIObjectInfo
+ * </synopsis>
+ * </refsect1>
+ */
+
+/**
+ * g_object_info_get_parent:
+ * @info: a #GIObjectInfo
+ *
+ * Obtain the parent of the object type.
+ *
+ * Returns: (transfer full): the #GIObjectInfo. Free the struct by calling
+ * g_base_info_unref() when done.
+ */
+GIObjectInfo *
+g_object_info_get_parent (GIObjectInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ObjectBlob *blob;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
+
+  blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  if (blob->parent)
+    return (GIObjectInfo *) _g_info_from_entry (rinfo->repository,
+                                                rinfo->typelib, blob->parent);
+  else
+    return NULL;
+}
+
+/**
+ * g_object_info_get_abstract:
+ * @info: a #GIObjectInfo
+ *
+ * Obtain if the object type is an abstract type, eg if it cannot be
+ * instantiated
+ *
+ * Returns: %TRUE if the object type is abstract
+ */
+gboolean
+g_object_info_get_abstract (GIObjectInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ObjectBlob *blob;
+
+  g_return_val_if_fail (info != NULL, FALSE);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), FALSE);
+
+  blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->abstract != 0;
+}
+
+/**
+ * g_object_info_get_fundamental:
+ * @info: a #GIObjectInfo
+ *
+ * Obtain if the object type is of a fundamental type which is not
+ * G_TYPE_OBJECT. This is mostly for supporting GstMiniObject.
+ *
+ * Returns: %TRUE if the object type is a fundamental type
+ */
+gboolean
+g_object_info_get_fundamental (GIObjectInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ObjectBlob *blob;
+
+  g_return_val_if_fail (info != NULL, FALSE);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), FALSE);
+
+  blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->fundamental != 0;
+}
+
+/**
+ * g_object_info_get_type_name:
+ * @info: a #GIObjectInfo
+ *
+ * Obtain the name of the objects class/type.
+ *
+ * Returns: name of the objects type
+ */
+const gchar *
+g_object_info_get_type_name (GIObjectInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ObjectBlob *blob;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
+
+  blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return g_typelib_get_string (rinfo->typelib, blob->gtype_name);
+}
+
+/**
+ * g_object_info_get_type_init:
+ * @info: a #GIObjectInfo
+ *
+ * Obtain the function which when called will return the GType
+ * function for which this object type is registered.
+ *
+ * Returns: the type init function
+ */
+const gchar *
+g_object_info_get_type_init (GIObjectInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ObjectBlob *blob;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
+
+  blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return g_typelib_get_string (rinfo->typelib, blob->gtype_init);
+}
+
+/**
+ * g_object_info_get_n_interfaces:
+ * @info: a #GIObjectInfo
+ *
+ * Obtain the number of interfaces that this object type has.
+ *
+ * Returns: number of interfaces
+ */
+gint
+g_object_info_get_n_interfaces (GIObjectInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ObjectBlob *blob;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), 0);
+
+  blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->n_interfaces;
+}
+
+/**
+ * g_object_info_get_interface:
+ * @info: a #GIObjectInfo
+ * @n: index of interface to get
+ *
+ * Obtain an object type interface at index @n.
+ *
+ * Returns: (transfer full): the #GIInterfaceInfo. Free the struct by calling
+ * g_base_info_unref() when done.
+ */
+GIInterfaceInfo *
+g_object_info_get_interface (GIObjectInfo *info,
+                            gint          n)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ObjectBlob *blob;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
+
+  blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return (GIInterfaceInfo *) _g_info_from_entry (rinfo->repository,
+                                                rinfo->typelib, blob->interfaces[n]);
+}
+
+/**
+ * g_object_info_get_n_fields:
+ * @info: a #GIObjectInfo
+ *
+ * Obtain the number of fields that this object type has.
+ *
+ * Returns: number of fields
+ */
+gint
+g_object_info_get_n_fields (GIObjectInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ObjectBlob *blob;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), 0);
+
+  blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->n_fields;
+}
+
+/**
+ * g_object_info_get_field:
+ * @info: a #GIObjectInfo
+ * @n: index of field to get
+ *
+ * Obtain an object type field at index @n.
+ *
+ * Returns: (transfer full): the #GIFieldInfo. Free the struct by calling
+ * g_base_info_unref() when done.
+ */
+GIFieldInfo *
+g_object_info_get_field (GIObjectInfo *info,
+                        gint          n)
+{
+  gint offset;
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  Header *header;
+  ObjectBlob *blob;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
+
+  header = (Header *)rinfo->typelib->data;
+  blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  offset = rinfo->offset + header->object_blob_size
+    + (blob->n_interfaces + blob->n_interfaces % 2) * 2
+    + n * header->field_blob_size;
+
+  return (GIFieldInfo *) g_info_new (GI_INFO_TYPE_FIELD, (GIBaseInfo*)info, rinfo->typelib, offset);
+}
+
+/**
+ * g_object_info_get_n_properties:
+ * @info: a #GIObjectInfo
+ *
+ * Obtain the number of properties that this object type has.
+ *
+ * Returns: number of properties
+ */
+gint
+g_object_info_get_n_properties (GIObjectInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ObjectBlob *blob;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), 0);
+
+  blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
+  return blob->n_properties;
+}
+
+/**
+ * g_object_info_get_property:
+ * @info: a #GIObjectInfo
+ * @n: index of property to get
+ *
+ * Obtain an object type property at index @n.
+ *
+ * Returns: (transfer full): the #GIPropertyInfo. Free the struct by calling
+ * g_base_info_unref() when done.
+ */
+GIPropertyInfo *
+g_object_info_get_property (GIObjectInfo *info,
+                           gint          n)
+{
+  gint offset;
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  Header *header;
+  ObjectBlob *blob;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
+
+  header = (Header *)rinfo->typelib->data;
+  blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  offset = rinfo->offset + header->object_blob_size
+    + (blob->n_interfaces + blob->n_interfaces % 2) * 2
+    + blob->n_fields * header->field_blob_size
+    + n * header->property_blob_size;
+
+  return (GIPropertyInfo *) g_info_new (GI_INFO_TYPE_PROPERTY, (GIBaseInfo*)info,
+                                       rinfo->typelib, offset);
+}
+
+/**
+ * g_object_info_get_n_methods:
+ * @info: a #GIObjectInfo
+ *
+ * Obtain the number of methods that this object type has.
+ *
+ * Returns: number of methods
+ */
+gint
+g_object_info_get_n_methods (GIObjectInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ObjectBlob *blob;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), 0);
+
+  blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->n_methods;
+}
+
+/**
+ * g_object_info_get_method:
+ * @info: a #GIObjectInfo
+ * @n: index of method to get
+ *
+ * Obtain an object type method at index @n.
+ *
+ * Returns: (transfer full): the #GIFunctionInfo. Free the struct by calling
+ * g_base_info_unref() when done.
+ */
+GIFunctionInfo *
+g_object_info_get_method (GIObjectInfo *info,
+                         gint          n)
+{
+  gint offset;
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  Header *header;
+  ObjectBlob *blob;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
+
+  header = (Header *)rinfo->typelib->data;
+  blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
+
+
+  offset = rinfo->offset + header->object_blob_size
+    + (blob->n_interfaces + blob->n_interfaces % 2) * 2
+    + blob->n_fields * header->field_blob_size
+    + blob->n_properties * header->property_blob_size
+    + n * header->function_blob_size;
+
+    return (GIFunctionInfo *) g_info_new (GI_INFO_TYPE_FUNCTION, (GIBaseInfo*)info,
+                                         rinfo->typelib, offset);
+}
+
+/**
+ * g_object_info_find_method:
+ * @info: a #GIObjectInfo
+ * @name: name of method to obtain
+ *
+ * Obtain a method of the object type given a @name. %NULL will be
+ * returned if there's no method available with that name.
+ *
+ * Returns: (transfer full): the #GIFunctionInfo. Free the struct by calling
+ * g_base_info_unref() when done.
+ */
+GIFunctionInfo *
+g_object_info_find_method (GIObjectInfo *info,
+                          const gchar  *name)
+{
+  gint offset;
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  Header *header;
+  ObjectBlob *blob;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), 0);
+
+  header = (Header *)rinfo->typelib->data;
+  blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  offset = rinfo->offset + header->object_blob_size
+    + (blob->n_interfaces + blob->n_interfaces % 2) * 2
+    + blob->n_fields * header->field_blob_size +
+    + blob->n_properties * header->property_blob_size;
+
+  return _g_base_info_find_method ((GIBaseInfo*)info, offset, blob->n_methods, name);
+}
+
+/**
+ * g_object_info_find_method_using_interfaces:
+ * @info: a #GIObjectInfo
+ * @name: name of method to obtain
+ * @implementor: (out) (transfer full): The implementor of the interface
+ *
+ * Obtain a method of the object given a @name, searching both the
+ * object @info and any interfaces it implements.  %NULL will be
+ * returned if there's no method available with that name.
+ *
+ * Note that this function does *not* search parent classes; you will have
+ * to chain up if that's desired.
+ *
+ * Returns: (transfer full): the #GIFunctionInfo. Free the struct by calling
+ * g_base_info_unref() when done.
+ */
+GIFunctionInfo *
+g_object_info_find_method_using_interfaces (GIObjectInfo  *info,
+                                           const gchar   *name,
+                                           GIObjectInfo **implementor)
+{
+  GIFunctionInfo *result = NULL;
+  GIObjectInfo *implementor_result = NULL;
+
+  result = g_object_info_find_method (info, name);
+  if (result)
+    implementor_result = g_base_info_ref ((GIBaseInfo*) info);
+
+  if (result == NULL)
+    {
+      int n_interfaces;
+      int i;
+
+      n_interfaces = g_object_info_get_n_interfaces (info);
+      for (i = 0; i < n_interfaces; ++i)
+       {
+         GIInterfaceInfo *iface_info;
+
+         iface_info = g_object_info_get_interface (info, i);
+
+         result = g_interface_info_find_method (iface_info, name);
+
+         if (result != NULL)
+           {
+             implementor_result = iface_info;
+             break;
+           }
+         g_base_info_unref ((GIBaseInfo*) iface_info);
+       }
+    }
+  if (implementor)
+    *implementor = implementor_result;
+  else if (implementor_result != NULL)
+    g_base_info_unref ((GIBaseInfo*) implementor_result);
+  return result;
+}
+
+/**
+ * g_object_info_get_n_signals:
+ * @info: a #GIObjectInfo
+ *
+ * Obtain the number of signals that this object type has.
+ *
+ * Returns: number of signals
+ */
+gint
+g_object_info_get_n_signals (GIObjectInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ObjectBlob *blob;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), 0);
+
+  blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->n_signals;
+}
+
+/**
+ * g_object_info_get_signal:
+ * @info: a #GIObjectInfo
+ * @n: index of signal to get
+ *
+ * Obtain an object type signal at index @n.
+ *
+ * Returns: (transfer full): the #GISignalInfo. Free the struct by calling
+ * g_base_info_unref() when done.
+ */
+GISignalInfo *
+g_object_info_get_signal (GIObjectInfo *info,
+                         gint          n)
+{
+  gint offset;
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  Header *header;
+  ObjectBlob *blob;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
+
+  header = (Header *)rinfo->typelib->data;
+  blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  offset = rinfo->offset + header->object_blob_size
+    + (blob->n_interfaces + blob->n_interfaces % 2) * 2
+    + blob->n_fields * header->field_blob_size
+    + blob->n_properties * header->property_blob_size
+    + blob->n_methods * header->function_blob_size
+    + n * header->signal_blob_size;
+
+  return (GISignalInfo *) g_info_new (GI_INFO_TYPE_SIGNAL, (GIBaseInfo*)info,
+                                     rinfo->typelib, offset);
+}
+
+/**
+ * g_object_info_find_signal:
+ * @info: a #GIObjectInfo
+ * @name: Name of signal
+ *
+ * Returns: Info for the signal with name @name in @info, or %NULL on failure.
+ */
+GISignalInfo *
+g_object_info_find_signal (GIObjectInfo *info,
+                          const gchar  *name)
+{
+  gint n_signals;
+  gint i;
+
+  n_signals = g_object_info_get_n_signals (info);
+  for (i = 0; i < n_signals; i++)
+    {
+      GISignalInfo *siginfo = g_object_info_get_signal (info, i);
+
+      if (g_strcmp0 (g_base_info_get_name (siginfo), name) != 0)
+       {
+         g_base_info_unref ((GIBaseInfo*)siginfo);
+         continue;
+       }
+
+      return siginfo;
+    }
+  return NULL;
+}
+
+
+/**
+ * g_object_info_get_n_vfuncs:
+ * @info: a #GIObjectInfo
+ *
+ * Obtain the number of virtual functions that this object type has.
+ *
+ * Returns: number of virtual functions
+ */
+gint
+g_object_info_get_n_vfuncs (GIObjectInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ObjectBlob *blob;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), 0);
+
+  blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->n_vfuncs;
+}
+
+/**
+ * g_object_info_get_vfunc:
+ * @info: a #GIObjectInfo
+ * @n: index of virtual function to get
+ *
+ * Obtain an object type virtual function at index @n.
+ *
+ * Returns: (transfer full): the #GIVFuncInfo. Free the struct by calling
+ * g_base_info_unref() when done.
+ */
+GIVFuncInfo *
+g_object_info_get_vfunc (GIObjectInfo *info,
+                        gint          n)
+{
+  gint offset;
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  Header *header;
+  ObjectBlob *blob;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
+
+  header = (Header *)rinfo->typelib->data;
+  blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  offset = rinfo->offset + header->object_blob_size
+    + (blob->n_interfaces + blob->n_interfaces % 2) * 2
+    + blob->n_fields * header->field_blob_size
+    + blob->n_properties * header->property_blob_size
+    + blob->n_methods * header->function_blob_size
+    + blob->n_signals * header->signal_blob_size
+    + n * header->vfunc_blob_size;
+
+  return (GIVFuncInfo *) g_info_new (GI_INFO_TYPE_VFUNC, (GIBaseInfo*)info,
+                                    rinfo->typelib, offset);
+}
+
+/**
+ * g_object_info_find_vfunc:
+ * @info: a #GIObjectInfo
+ * @name: The name of a virtual function to find.
+ *
+ * Locate a virtual function slot with name @name. Note that the namespace
+ * for virtuals is distinct from that of methods; there may or may not be
+ * a concrete method associated for a virtual. If there is one, it may
+ * be retrieved using g_vfunc_info_get_invoker(), otherwise %NULL will be
+ * returned.
+ * See the documentation for g_vfunc_info_get_invoker() for more
+ * information on invoking virtuals.
+ *
+ * Returns: (transfer full): the #GIVFuncInfo, or %NULL. Free it with
+ * g_base_info_unref() when done.
+ */
+GIVFuncInfo *
+g_object_info_find_vfunc (GIObjectInfo *info,
+                          const gchar  *name)
+{
+  gint offset;
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  Header *header;
+  ObjectBlob *blob;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
+
+  header = (Header *)rinfo->typelib->data;
+  blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  offset = rinfo->offset + header->object_blob_size
+    + (blob->n_interfaces + blob->n_interfaces % 2) * 2
+    + blob->n_fields * header->field_blob_size
+    + blob->n_properties * header->property_blob_size
+    + blob->n_methods * header->function_blob_size
+    + blob->n_signals * header->signal_blob_size;
+
+  return _g_base_info_find_vfunc (rinfo, offset, blob->n_vfuncs, name);
+}
+
+/**
+ * g_object_info_find_vfunc_using_interfaces:
+ * @info: a #GIObjectInfo
+ * @name: name of method to obtain
+ * @implementor: (out) (transfer full): The implementor of the interface
+ *
+ * Locate a virtual function slot with name @name, searching both the object
+ * @info and any interfaces it implements.  Note that the namespace for
+ * virtuals is distinct from that of methods; there may or may not be a
+ * concrete method associated for a virtual. If there is one, it may be
+ * retrieved using g_vfunc_info_get_invoker(), otherwise %NULL will be
+ * returned.
+ *
+ * Note that this function does *not* search parent classes; you will have
+ * to chain up if that's desired.
+ *
+ * Returns: (transfer full): the #GIFunctionInfo. Free the struct by calling
+ * g_base_info_unref() when done.
+ */
+GIVFuncInfo *
+g_object_info_find_vfunc_using_interfaces (GIObjectInfo  *info,
+                                           const gchar   *name,
+                                           GIObjectInfo **implementor)
+{
+  GIVFuncInfo *result = NULL;
+  GIObjectInfo *implementor_result = NULL;
+
+  result = g_object_info_find_vfunc (info, name);
+  if (result)
+    implementor_result = g_base_info_ref ((GIBaseInfo*) info);
+
+  if (result == NULL)
+    {
+      int n_interfaces;
+      int i;
+
+      n_interfaces = g_object_info_get_n_interfaces (info);
+      for (i = 0; i < n_interfaces; ++i)
+       {
+         GIInterfaceInfo *iface_info;
+
+         iface_info = g_object_info_get_interface (info, i);
+
+         result = g_interface_info_find_vfunc (iface_info, name);
+
+         if (result != NULL)
+           {
+             implementor_result = iface_info;
+             break;
+           }
+         g_base_info_unref ((GIBaseInfo*) iface_info);
+       }
+    }
+  if (implementor)
+    *implementor = implementor_result;
+  else if (implementor_result != NULL)
+    g_base_info_unref ((GIBaseInfo*) implementor_result);
+  return result;
+}
+
+/**
+ * g_object_info_get_n_constants:
+ * @info: a #GIObjectInfo
+ *
+ * Obtain the number of constants that this object type has.
+ *
+ * Returns: number of constants
+ */
+gint
+g_object_info_get_n_constants (GIObjectInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ObjectBlob *blob;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), 0);
+
+  blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->n_constants;
+}
+
+/**
+ * g_object_info_get_constant:
+ * @info: a #GIObjectInfo
+ * @n: index of constant to get
+ *
+ * Obtain an object type constant at index @n.
+ *
+ * Returns: (transfer full): the #GIConstantInfo. Free the struct by calling
+ * g_base_info_unref() when done.
+ */
+GIConstantInfo *
+g_object_info_get_constant (GIObjectInfo *info,
+                           gint          n)
+{
+  gint offset;
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  Header *header;
+  ObjectBlob *blob;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
+
+  header = (Header *)rinfo->typelib->data;
+  blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  offset = rinfo->offset + header->object_blob_size
+    + (blob->n_interfaces + blob->n_interfaces % 2) * 2
+    + blob->n_fields * header->field_blob_size
+    + blob->n_properties * header->property_blob_size
+    + blob->n_methods * header->function_blob_size
+    + blob->n_signals * header->signal_blob_size
+    + blob->n_vfuncs * header->vfunc_blob_size
+    + n * header->constant_blob_size;
+
+  return (GIConstantInfo *) g_info_new (GI_INFO_TYPE_CONSTANT, (GIBaseInfo*)info,
+                                       rinfo->typelib, offset);
+}
+
+/**
+ * g_object_info_get_class_struct:
+ * @info: a #GIObjectInfo
+ *
+ * Every #GObject has two structures; an instance structure and a class
+ * structure.  This function returns the metadata for the class structure.
+ *
+ * Returns: (transfer full): the #GIStructInfo or %NULL. Free with
+ * g_base_info_unref() when done.
+ */
+GIStructInfo *
+g_object_info_get_class_struct (GIObjectInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ObjectBlob *blob;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
+
+  blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  if (blob->gtype_struct)
+    return (GIStructInfo *) _g_info_from_entry (rinfo->repository,
+                                                rinfo->typelib, blob->gtype_struct);
+  else
+    return NULL;
+}
+
+typedef const char* (*SymbolGetter) (GIObjectInfo *info);
+
+static void *
+_get_func(GIObjectInfo *info,
+          SymbolGetter getter)
+{
+  const char* symbol;
+  GSList *parents = NULL, *l;
+  GIObjectInfo *parent_info;
+  gpointer func = NULL;
+
+  parent_info = g_base_info_ref (info);
+  while (parent_info != NULL)
+    {
+      parents = g_slist_prepend (parents, parent_info);
+      parent_info = g_object_info_get_parent (parent_info);
+    }
+
+  for (l = parents; l; l = l->next)
+    {
+      parent_info = l->data;
+      symbol = getter (parent_info);
+      if (symbol == NULL)
+        continue;
+
+      g_typelib_symbol (((GIRealInfo *)parent_info)->typelib, symbol, (gpointer*) &func);
+      if (func)
+        break;
+    }
+
+  g_slist_free_full (parents, (GDestroyNotify) g_base_info_unref);
+  return func;
+}
+
+/**
+ * g_object_info_get_ref_function:
+ * @info: a #GIObjectInfo
+ *
+ * Obtain the symbol name of the function that should be called to ref this
+ * object type. It's mainly used fundamental types. The type signature for
+ * the symbol is %GIObjectInfoRefFunction, to fetch the function pointer
+ * see g_object_info_get_ref_function().
+ *
+ * Returns: the symbol or %NULL
+ */
+const char *
+g_object_info_get_ref_function (GIObjectInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ObjectBlob *blob;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
+
+  blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  if (blob->ref_func)
+    return g_typelib_get_string (rinfo->typelib, blob->ref_func);
+
+  return NULL;
+}
+
+/**
+ * g_object_info_get_ref_function_pointer: (skip)
+ * @info: a #GIObjectInfo
+ *
+ * Obtain a pointer to a function which can be used to
+ * increase the reference count an instance of this object type.
+ * This takes derivation into account and will reversely traverse
+ * the base classes of this type, starting at the top type.
+ *
+ * Returns: the function pointer or %NULL
+ */
+GIObjectInfoRefFunction
+g_object_info_get_ref_function_pointer (GIObjectInfo *info)
+{
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
+
+  return (GIObjectInfoRefFunction)_get_func(info, (SymbolGetter)g_object_info_get_ref_function);
+}
+
+/**
+ * g_object_info_get_unref_function:
+ * @info: a #GIObjectInfo
+ *
+ * Obtain the symbol name of the function that should be called to unref this
+ * object type. It's mainly used fundamental types. The type signature for
+ * the symbol is %GIObjectInfoUnrefFunction, to fetch the function pointer
+ * see g_object_info_get_unref_function().
+ *
+ * Returns: the symbol or %NULL
+ */
+const char *
+g_object_info_get_unref_function (GIObjectInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ObjectBlob *blob;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
+
+  blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  if (blob->unref_func)
+    return g_typelib_get_string (rinfo->typelib, blob->unref_func);
+
+  return NULL;
+}
+
+/**
+ * g_object_info_get_unref_function_pointer: (skip)
+ * @info: a #GIObjectInfo
+ *
+ * Obtain a pointer to a function which can be used to
+ * decrease the reference count an instance of this object type.
+ * This takes derivation into account and will reversely traverse
+ * the base classes of this type, starting at the top type.
+ *
+ * Returns: the function pointer or %NULL
+ */
+GIObjectInfoUnrefFunction
+g_object_info_get_unref_function_pointer (GIObjectInfo *info)
+{
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
+
+  return (GIObjectInfoUnrefFunction)_get_func(info, (SymbolGetter)g_object_info_get_unref_function);
+}
+
+/**
+ * g_object_info_get_set_value_function:
+ * @info: a #GIObjectInfo
+ *
+ * Obtain the symbol name of the function that should be called to convert
+ * set a GValue giving an object instance pointer of this object type.
+ * I's mainly used fundamental types. The type signature for the symbol
+ * is %GIObjectInfoSetValueFunction, to fetch the function pointer
+ * see g_object_info_get_set_value_function().
+ *
+ * Returns: the symbol or %NULL
+ */
+const char *
+g_object_info_get_set_value_function (GIObjectInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ObjectBlob *blob;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
+
+  blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  if (blob->set_value_func)
+    return g_typelib_get_string (rinfo->typelib, blob->set_value_func);
+
+  return NULL;
+}
+
+/**
+ * g_object_info_get_set_value_function_pointer: (skip)
+ * @info: a #GIObjectInfo
+ *
+ * Obtain a pointer to a function which can be used to
+ * set a GValue given an instance of this object type.
+ * This takes derivation into account and will reversely traverse
+ * the base classes of this type, starting at the top type.
+ *
+ * Returns: the function pointer or %NULL
+ */
+GIObjectInfoSetValueFunction
+g_object_info_get_set_value_function_pointer (GIObjectInfo *info)
+{
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
+
+  return (GIObjectInfoSetValueFunction)_get_func(info, (SymbolGetter)g_object_info_get_set_value_function);
+}
+
+/**
+ * g_object_info_get_get_value_function:
+ * @info: a #GIObjectInfo
+ *
+ * Obtain the symbol name of the function that should be called to convert
+ * an object instance pointer of this object type to a GValue.
+ * I's mainly used fundamental types. The type signature for the symbol
+ * is %GIObjectInfoGetValueFunction, to fetch the function pointer
+ * see g_object_info_get_get_value_function().
+ *
+ * Returns: the symbol or %NULL
+ */
+const char *
+g_object_info_get_get_value_function (GIObjectInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  ObjectBlob *blob;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
+
+  blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  if (blob->get_value_func)
+    return g_typelib_get_string (rinfo->typelib, blob->get_value_func);
+
+  return NULL;
+}
+
+/**
+ * g_object_info_get_get_value_function_pointer: (skip)
+ * @info: a #GIObjectInfo
+ *
+ * Obtain a pointer to a function which can be used to
+ * extract an instance of this object type out of a GValue.
+ * This takes derivation into account and will reversely traverse
+ * the base classes of this type, starting at the top type.
+ *
+ * Returns: the function pointer or %NULL
+ */
+GIObjectInfoGetValueFunction
+g_object_info_get_get_value_function_pointer (GIObjectInfo *info)
+{
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
+
+  return (GIObjectInfoGetValueFunction)_get_func(info, (SymbolGetter)g_object_info_get_get_value_function);
+}
diff --git a/girepository/giobjectinfo.h b/girepository/giobjectinfo.h
new file mode 100644 (file)
index 0000000..ee4b8a8
--- /dev/null
@@ -0,0 +1,137 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Object
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#ifndef __GIOBJECTINFO_H__
+#define __GIOBJECTINFO_H__
+
+#if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
+#error "Only <girepository.h> can be included directly."
+#endif
+
+#include <gitypes.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GIObjectInfoRefFunction: (skip)
+ * @object: object instance pointer
+ *
+ * Increases the reference count of an object instance.
+ *
+ * Returns: (transfer full): the object instance
+ */
+typedef void * (*GIObjectInfoRefFunction) (void *object);
+
+/**
+ * GIObjectInfoUnrefFunction: (skip)
+ * @object: object instance pointer
+ *
+ * Decreases the reference count of an object instance.
+ *
+ */
+typedef void   (*GIObjectInfoUnrefFunction) (void *object);
+
+/**
+ * GIObjectInfoSetValueFunction: (skip)
+ * @value: a #GValue
+ * @object: object instance pointer
+ *
+ * Update @value and attach the object instance pointer @object to it.
+ *
+ */
+typedef void   (*GIObjectInfoSetValueFunction) (GValue *value, void *object);
+
+/**
+ * GIObjectInfoGetValueFunction: (skip)
+ * @value: a #GValue
+ *
+ * Extract an object instance out of @value
+ *
+ * Returns: (transfer full): the object instance
+ */
+typedef void * (*GIObjectInfoGetValueFunction) (const GValue *value);
+
+#define GI_IS_OBJECT_INFO(info) \
+    (g_base_info_get_type((GIBaseInfo*)info) ==  GI_INFO_TYPE_OBJECT)
+
+const gchar *     g_object_info_get_type_name   (GIObjectInfo *info);
+const gchar *     g_object_info_get_type_init   (GIObjectInfo *info);
+gboolean          g_object_info_get_abstract     (GIObjectInfo *info);
+gboolean          g_object_info_get_fundamental  (GIObjectInfo *info);
+GIObjectInfo *    g_object_info_get_parent       (GIObjectInfo *info);
+gint              g_object_info_get_n_interfaces (GIObjectInfo *info);
+GIInterfaceInfo * g_object_info_get_interface    (GIObjectInfo *info,
+                                                 gint          n);
+gint              g_object_info_get_n_fields     (GIObjectInfo *info);
+GIFieldInfo *     g_object_info_get_field        (GIObjectInfo *info,
+                                                 gint          n);
+gint              g_object_info_get_n_properties (GIObjectInfo *info);
+GIPropertyInfo *  g_object_info_get_property     (GIObjectInfo *info,
+                                                 gint          n);
+gint              g_object_info_get_n_methods    (GIObjectInfo *info);
+GIFunctionInfo *  g_object_info_get_method       (GIObjectInfo *info,
+                                                 gint          n);
+GIFunctionInfo *  g_object_info_find_method      (GIObjectInfo *info,
+                                                 const gchar  *name);
+
+GIFunctionInfo *  g_object_info_find_method_using_interfaces (GIObjectInfo  *info,
+                                                             const gchar   *name,
+                                                             GIObjectInfo **implementor);
+
+gint              g_object_info_get_n_signals    (GIObjectInfo *info);
+GISignalInfo *    g_object_info_get_signal       (GIObjectInfo *info,
+                                                 gint          n);
+
+GISignalInfo *    g_object_info_find_signal      (GIObjectInfo *info,
+                                                 const gchar  *name);
+
+gint              g_object_info_get_n_vfuncs     (GIObjectInfo *info);
+GIVFuncInfo *     g_object_info_get_vfunc        (GIObjectInfo *info,
+                                                 gint          n);
+GIVFuncInfo *     g_object_info_find_vfunc       (GIObjectInfo *info,
+                                                  const gchar  *name);
+GIVFuncInfo *     g_object_info_find_vfunc_using_interfaces (GIObjectInfo  *info,
+                                                               const gchar   *name,
+                                                               GIObjectInfo **implementor);
+gint              g_object_info_get_n_constants  (GIObjectInfo *info);
+GIConstantInfo *  g_object_info_get_constant     (GIObjectInfo *info,
+                                                 gint          n);
+GIStructInfo *    g_object_info_get_class_struct (GIObjectInfo *info);
+
+const char *                 g_object_info_get_ref_function               (GIObjectInfo *info);
+GIObjectInfoRefFunction      g_object_info_get_ref_function_pointer       (GIObjectInfo *info);
+
+const char *                 g_object_info_get_unref_function             (GIObjectInfo *info);
+GIObjectInfoUnrefFunction    g_object_info_get_unref_function_pointer     (GIObjectInfo *info);
+
+const char *                 g_object_info_get_set_value_function         (GIObjectInfo *info);
+GIObjectInfoSetValueFunction g_object_info_get_set_value_function_pointer (GIObjectInfo *info);
+
+const char *                 g_object_info_get_get_value_function         (GIObjectInfo *info);
+GIObjectInfoGetValueFunction g_object_info_get_get_value_function_pointer (GIObjectInfo *info);
+
+
+G_END_DECLS
+
+
+#endif  /* __GIOBJECTINFO_H__ */
+
diff --git a/girepository/gipropertyinfo.c b/girepository/gipropertyinfo.c
new file mode 100644 (file)
index 0000000..61316cb
--- /dev/null
@@ -0,0 +1,132 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Property implementation
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#include <glib.h>
+
+#include <girepository.h>
+#include "girepository-private.h"
+#include "gitypelib-internal.h"
+
+/**
+ * SECTION:gipropertyinfo
+ * @Short_description: Struct representing a property
+ * @Title: GIPropertyInfo
+ *
+ * GIPropertyInfo represents a property. A property belongs to
+ * either a #GIObjectInfo or a #GIInterfaceInfo.
+ *
+ * <refsect1 id="gi-gipropertyinfo.struct-hierarchy" role="struct_hierarchy">
+ * <title role="struct_hierarchy.title">Struct hierarchy</title>
+ * <synopsis>
+ *   <link linkend="gi-GIBaseInfo">GIBaseInfo</link>
+ *    +----GIPropertyInfo
+ * </synopsis>
+ * </refsect1>
+ */
+
+/**
+ * g_property_info_get_flags:
+ * @info: a #GIPropertyInfo
+ *
+ * Obtain the flags for this property info. See #GParamFags for
+ * more information about possible flag values.
+ *
+ * Returns: the flags
+ */
+GParamFlags
+g_property_info_get_flags (GIPropertyInfo *info)
+{
+  GParamFlags flags;
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  PropertyBlob *blob;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_PROPERTY_INFO (info), 0);
+
+  blob = (PropertyBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  flags = 0;
+
+  if (blob->readable)
+    flags = flags | G_PARAM_READABLE;
+
+  if (blob->writable)
+    flags = flags | G_PARAM_WRITABLE;
+
+  if (blob->construct)
+    flags = flags | G_PARAM_CONSTRUCT;
+
+  if (blob->construct_only)
+    flags = flags | G_PARAM_CONSTRUCT_ONLY;
+
+  return flags;
+}
+
+/**
+ * g_property_info_get_type:
+ * @info: a #GIPropertyInfo
+ *
+ * Obtain the type information for the property @info.
+ *
+ * Returns: (transfer full): the #GITypeInfo, free it with
+ * g_base_info_unref() when done.
+ */
+GITypeInfo *
+g_property_info_get_type (GIPropertyInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_PROPERTY_INFO (info), NULL);
+
+  return _g_type_info_new ((GIBaseInfo*)info,
+                           rinfo->typelib,
+                           rinfo->offset + G_STRUCT_OFFSET (PropertyBlob, type));
+}
+
+/**
+ * g_property_info_get_ownership_transfer:
+ * @info: a #GIPropertyInfo
+ *
+ * Obtain the ownership transfer for this property. See #GITransfer for more
+ * information about transfer values.
+ *
+ * Returns: the transfer
+ */
+GITransfer
+g_property_info_get_ownership_transfer (GIPropertyInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  PropertyBlob *blob;
+
+  g_return_val_if_fail (info != NULL, -1);
+  g_return_val_if_fail (GI_IS_PROPERTY_INFO (info), -1);
+
+  blob = (PropertyBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  if (blob->transfer_ownership)
+    return GI_TRANSFER_EVERYTHING;
+  else if (blob->transfer_container_ownership)
+    return GI_TRANSFER_CONTAINER;
+  else
+    return GI_TRANSFER_NOTHING;
+}
diff --git a/girepository/gipropertyinfo.h b/girepository/gipropertyinfo.h
new file mode 100644 (file)
index 0000000..14b18b4
--- /dev/null
@@ -0,0 +1,44 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Property
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#ifndef __GIPROPERTYINFO_H__
+#define __GIPROPERTYINFO_H__
+
+#if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
+#error "Only <girepository.h> can be included directly."
+#endif
+
+#include <gitypes.h>
+
+G_BEGIN_DECLS
+
+#define GI_IS_PROPERTY_INFO(info) \
+    (g_base_info_get_type((GIBaseInfo*)info) ==  GI_INFO_TYPE_PROPERTY)
+
+GParamFlags  g_property_info_get_flags (GIPropertyInfo *info);
+GITypeInfo * g_property_info_get_type  (GIPropertyInfo *info);
+GITransfer   g_property_info_get_ownership_transfer (GIPropertyInfo *info);
+
+G_END_DECLS
+
+#endif  /* __GIPROPERTYINFO_H__ */
+
diff --git a/girepository/giregisteredtypeinfo.c b/girepository/giregisteredtypeinfo.c
new file mode 100644 (file)
index 0000000..6e3d31e
--- /dev/null
@@ -0,0 +1,152 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Registered Type implementation
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#include <string.h>
+
+#include <glib.h>
+
+#include <girepository.h>
+#include "girepository-private.h"
+#include "gitypelib-internal.h"
+
+/**
+ * SECTION:giregisteredtypeinfo
+ * @Short_description: Struct representing a struct with a GType
+ * @Title: GIRegisteredTypeInfo
+ *
+ * GIRegisteredTypeInfo represents an entity with a GType associated. Could
+ * be either a #GIEnumInfo, #GIInterfaceInfo, #GIObjectInfo, #GIStructInfo or a
+ * #GIUnionInfo.
+ *
+ * A registered type info struct has a name and a type function.
+ * To get the name call g_registered_type_info_get_type_name().
+ * Most users want to call g_registered_type_info_get_g_type() and don't worry
+ * about the rest of the details.
+ *
+ * <refsect1 id="gi-giregisteredtypeinfo.struct-hierarchy" role="struct_hierarchy">
+ * <title role="struct_hierarchy.title">Struct hierarchy</title>
+ * <synopsis>
+ *   <link linkend="gi-GIBaseInfo">GIBaseInfo</link>
+ *    +----GIRegisteredTypeInfo
+ *          +----<link linkend="gi-GIEnumInfo">GIEnumInfo</link>
+ *          +----<link linkend="gi-GIInterfaceInfo">GIInterfaceInfo</link>
+ *          +----<link linkend="gi-GIObjectInfo">GIObjectInfo</link>
+ *          +----<link linkend="gi-GIStructInfo">GIStructInfo</link>
+ *          +----<link linkend="gi-GIUnionInfo">GIUnionInfo</link>
+ * </synopsis>
+ * </refsect1>
+ */
+
+/**
+ * g_registered_type_info_get_type_name:
+ * @info: a #GIRegisteredTypeInfo
+ *
+ * Obtain the type name of the struct within the GObject type system.
+ * This type can be passed to g_type_name() to get a #GType.
+ *
+ * Returns: the type name
+ */
+const gchar *
+g_registered_type_info_get_type_name (GIRegisteredTypeInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  RegisteredTypeBlob *blob;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_REGISTERED_TYPE_INFO (info), NULL);
+
+  blob = (RegisteredTypeBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  if (blob->gtype_name)
+    return g_typelib_get_string (rinfo->typelib, blob->gtype_name);
+
+  return NULL;
+}
+
+/**
+ * g_registered_type_info_get_type_init:
+ * @info: a #GIRegisteredTypeInfo
+ *
+ * Obtain the type init function for @info. The type init function is the
+ * function which will register the GType within the GObject type system.
+ * Usually this is not called by langauge bindings or applications, use
+ * g_registered_type_info_get_g_type() directly instead.
+ *
+ * Returns: the symbol name of the type init function, suitable for
+ * passing into g_module_symbol().
+ */
+const gchar *
+g_registered_type_info_get_type_init (GIRegisteredTypeInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  RegisteredTypeBlob *blob;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_REGISTERED_TYPE_INFO (info), NULL);
+
+  blob = (RegisteredTypeBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  if (blob->gtype_init)
+    return g_typelib_get_string (rinfo->typelib, blob->gtype_init);
+
+  return NULL;
+}
+
+/**
+ * g_registered_type_info_get_g_type:
+ * @info: a #GIRegisteredTypeInfo
+ *
+ * Obtain the #GType for this registered type or G_TYPE_NONE which a special meaning.
+ * It means that either there is no type information associated with this @info or
+ * that the shared library which provides the type_init function for this
+ * @info cannot be called.
+ *
+ * Returns: the #GType.
+ */
+GType
+g_registered_type_info_get_g_type (GIRegisteredTypeInfo *info)
+{
+  const char *type_init;
+  GType (* get_type_func) (void);
+  GIRealInfo *rinfo = (GIRealInfo*)info;
+
+  g_return_val_if_fail (info != NULL, G_TYPE_INVALID);
+  g_return_val_if_fail (GI_IS_REGISTERED_TYPE_INFO (info), G_TYPE_INVALID);
+
+  type_init = g_registered_type_info_get_type_init (info);
+
+  if (type_init == NULL)
+    return G_TYPE_NONE;
+  else if (!strcmp (type_init, "intern"))
+    /* The special string "intern" is used for some types exposed by libgobject
+       (that therefore should be always available) */
+    return g_type_from_name (g_registered_type_info_get_type_name (info));
+
+  get_type_func = NULL;
+  if (!g_typelib_symbol (rinfo->typelib,
+                         type_init,
+                         (void**) &get_type_func))
+    return G_TYPE_NONE;
+
+  return (* get_type_func) ();
+}
+
diff --git a/girepository/giregisteredtypeinfo.h b/girepository/giregisteredtypeinfo.h
new file mode 100644 (file)
index 0000000..d46d738
--- /dev/null
@@ -0,0 +1,53 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Registered Type
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#ifndef __GIREGISTEREDTYPEINFO_H__
+#define __GIREGISTEREDTYPEINFO_H__
+
+#if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
+#error "Only <girepository.h> can be included directly."
+#endif
+
+#include <glib-object.h>
+#include <gitypes.h>
+
+G_BEGIN_DECLS
+
+#define GI_IS_REGISTERED_TYPE_INFO(info) \
+    ((g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_BOXED) || \
+     (g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_ENUM) || \
+     (g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_FLAGS) ||        \
+     (g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_INTERFACE) || \
+     (g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_OBJECT) || \
+     (g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_STRUCT) || \
+     (g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_UNION) || \
+     (g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_BOXED))
+
+const gchar *          g_registered_type_info_get_type_name (GIRegisteredTypeInfo *info);
+const gchar *          g_registered_type_info_get_type_init (GIRegisteredTypeInfo *info);
+GType                  g_registered_type_info_get_g_type    (GIRegisteredTypeInfo *info);
+
+G_END_DECLS
+
+
+#endif  /* __GIREGISTEREDTYPEINFO_H__ */
+
diff --git a/girepository/girepository-private.h b/girepository/girepository-private.h
new file mode 100644 (file)
index 0000000..275776d
--- /dev/null
@@ -0,0 +1,120 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Private headers
+ *
+ * Copyright (C) 2010 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 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.
+ */
+
+#ifndef __GIREPOSITORY_PRIVATE_H__
+#define __GIREPOSITORY_PRIVATE_H__
+
+#include <ffi.h>
+#include <glib.h>
+
+#define __GIREPOSITORY_H_INSIDE__
+
+#include <gibaseinfo.h>
+#include <girepository.h>
+#include <gitypelib.h>
+
+typedef struct _GIRealInfo GIRealInfo;
+
+/*
+ * We just use one structure for all of the info object
+ * types; in general, we should be reading data directly
+ * from the typelib, and not having computed data in
+ * per-type structures.
+ */
+struct _GIRealInfo
+{
+  /* Keep this part in sync with GIUnresolvedInfo below */
+  gint32 type;
+  gint32 ref_count;
+  GIRepository *repository;
+  GIBaseInfo *container;
+
+  /* Resolved specific */
+
+  GITypelib *typelib;
+  guint32 offset;
+
+  guint32 type_is_embedded : 1; /* Used by GITypeInfo */
+  guint32 reserved : 31;
+
+  gpointer reserved2[4];
+};
+
+struct _GIUnresolvedInfo
+{
+  /* Keep this part in sync with GIBaseInfo above */
+  gint32 type;
+  gint32 ref_count;
+  GIRepository *repository;
+  GIBaseInfo *container;
+
+  /* Unresolved specific */
+
+  const gchar *name;
+  const gchar *namespace;
+};
+
+void         _g_info_init       (GIRealInfo   *info,
+                                 GIInfoType    type,
+                                 GIRepository *repository,
+                                 GIBaseInfo   *container,
+                                 GITypelib     *typelib,
+                                 guint32       offset);
+
+GIBaseInfo * _g_info_from_entry (GIRepository *repository,
+                                 GITypelib     *typelib,
+                                 guint16       index);
+
+GIBaseInfo * _g_info_new_full   (GIInfoType    type,
+                                GIRepository *repository,
+                                GIBaseInfo   *container,
+                                GITypelib     *typelib,
+                                guint32       offset);
+
+GITypeInfo * _g_type_info_new   (GIBaseInfo   *container,
+                                GITypelib     *typelib,
+                                guint32       offset);
+
+void         _g_type_info_init  (GIBaseInfo   *info,
+                                GIBaseInfo   *container,
+                                GITypelib     *typelib,
+                                guint32       offset);
+
+GIFunctionInfo * _g_base_info_find_method (GIBaseInfo   *base,
+                                          guint32       offset,
+                                          gint          n_methods,
+                                          const gchar  *name);
+
+GIVFuncInfo * _g_base_info_find_vfunc (GIRealInfo   *rinfo,
+                                      guint32       offset,
+                                      gint          n_vfuncs,
+                                      const gchar  *name);
+
+extern ffi_status ffi_prep_closure_loc (ffi_closure *,
+                                        ffi_cif *,
+                                        void (*fun)(ffi_cif *, void *, void **, void *),
+                                        void *user_data,
+                                        void *codeloc);
+extern void *ffi_closure_alloc (size_t size, void **code);
+extern void ffi_closure_free (void *);
+
+
+#endif /* __GIREPOSITORY_PRIVATE_H__ */
diff --git a/girepository/girepository.c b/girepository/girepository.c
new file mode 100644 (file)
index 0000000..1384c0e
--- /dev/null
@@ -0,0 +1,1608 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Repository implementation
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008 Colin Walters <walters@verbum.org>
+ * Copyright (C) 2008 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <glib.h>
+#include <glib/gprintf.h>
+#include <gmodule.h>
+#include "girepository.h"
+#include "gitypelib-internal.h"
+#include "girepository-private.h"
+#include "glib-compat.h"
+
+#include "config.h"
+
+static GStaticMutex globals_lock = G_STATIC_MUTEX_INIT;
+static GIRepository *default_repository = NULL;
+static GSList *search_path = NULL;
+static GSList *override_search_path = NULL;
+
+struct _GIRepositoryPrivate
+{
+  GHashTable *typelibs; /* (string) namespace -> GITypelib */
+  GHashTable *lazy_typelibs; /* (string) namespace-version -> GITypelib */
+  GHashTable *info_by_gtype; /* GType -> GIBaseInfo */
+  GHashTable *info_by_error_domain; /* GQuark -> GIBaseInfo */
+};
+
+G_DEFINE_TYPE (GIRepository, g_irepository, G_TYPE_OBJECT);
+
+#ifdef G_PLATFORM_WIN32
+
+#include <windows.h>
+
+static HMODULE girepository_dll = NULL;
+
+#ifdef DLL_EXPORT
+
+BOOL WINAPI
+DllMain (HINSTANCE hinstDLL,
+        DWORD     fdwReason,
+        LPVOID    lpvReserved)
+{
+  if (fdwReason == DLL_PROCESS_ATTACH)
+      girepository_dll = hinstDLL;
+
+  return TRUE;
+}
+
+#endif
+
+#undef GOBJECT_INTROSPECTION_LIBDIR
+
+/* GOBJECT_INTROSPECTION_LIBDIR is used only in code called just once,
+ * so no problem leaking this
+ */
+#define GOBJECT_INTROSPECTION_LIBDIR \
+  g_build_filename (g_win32_get_package_installation_directory_of_module (girepository_dll), \
+                   "lib", \
+                   NULL)
+
+#endif
+
+static void
+g_irepository_init (GIRepository *repository)
+{
+  repository->priv = G_TYPE_INSTANCE_GET_PRIVATE (repository, G_TYPE_IREPOSITORY,
+                                                 GIRepositoryPrivate);
+  repository->priv->typelibs
+    = g_hash_table_new_full (g_str_hash, g_str_equal,
+                            (GDestroyNotify) NULL,
+                            (GDestroyNotify) g_typelib_free);
+  repository->priv->lazy_typelibs
+    = g_hash_table_new_full (g_str_hash, g_str_equal,
+                             (GDestroyNotify) g_free,
+                             (GDestroyNotify) NULL);
+  repository->priv->info_by_gtype
+    = g_hash_table_new_full (g_direct_hash, g_direct_equal,
+                             (GDestroyNotify) NULL,
+                             (GDestroyNotify) g_base_info_unref);
+  repository->priv->info_by_error_domain
+    = g_hash_table_new_full (g_direct_hash, g_direct_equal,
+                             (GDestroyNotify) NULL,
+                             (GDestroyNotify) g_base_info_unref);
+}
+
+static void
+g_irepository_finalize (GObject *object)
+{
+  GIRepository *repository = G_IREPOSITORY (object);
+
+  g_hash_table_destroy (repository->priv->typelibs);
+  g_hash_table_destroy (repository->priv->lazy_typelibs);
+  g_hash_table_destroy (repository->priv->info_by_gtype);
+  g_hash_table_destroy (repository->priv->info_by_error_domain);
+
+  (* G_OBJECT_CLASS (g_irepository_parent_class)->finalize) (G_OBJECT (repository));
+}
+
+static void
+g_irepository_class_init (GIRepositoryClass *class)
+{
+  GObjectClass *gobject_class;
+
+  gobject_class = G_OBJECT_CLASS (class);
+
+  gobject_class->finalize = g_irepository_finalize;
+
+  g_type_class_add_private (class, sizeof (GIRepositoryPrivate));
+}
+
+static void
+init_globals (void)
+{
+  g_static_mutex_lock (&globals_lock);
+
+  if (default_repository == NULL)
+    {
+      default_repository = g_object_new (G_TYPE_IREPOSITORY, NULL);
+    }
+
+  if (search_path == NULL)
+    {
+      const char *libdir;
+      char *typelib_dir;
+      const gchar *type_lib_path_env;
+
+      /* This variable is intended to take precedence over both the default
+       * search path, as well as anything written into code with g_irepository_prepend_search_path.
+       */
+      type_lib_path_env = g_getenv ("GI_TYPELIB_PATH");
+
+      search_path = NULL;
+      override_search_path = NULL;
+      if (type_lib_path_env)
+        {
+          gchar **custom_dirs;
+          gchar **d;
+
+          custom_dirs = g_strsplit (type_lib_path_env, G_SEARCHPATH_SEPARATOR_S, 0);
+
+          d = custom_dirs;
+          while (*d)
+            {
+              override_search_path = g_slist_prepend (override_search_path, *d);
+              d++;
+            }
+
+          /* ownership of the array content was passed to the list */
+          g_free (custom_dirs);
+        }
+
+      if (override_search_path != NULL)
+        override_search_path = g_slist_reverse (override_search_path);
+
+      libdir = GOBJECT_INTROSPECTION_LIBDIR;
+
+      typelib_dir = g_build_filename (libdir, "girepository-1.0", NULL);
+
+      search_path = g_slist_prepend (search_path, typelib_dir);
+
+      search_path = g_slist_reverse (search_path);
+    }
+
+  g_static_mutex_unlock (&globals_lock);
+}
+
+void
+g_irepository_prepend_search_path (const char *directory)
+{
+  init_globals ();
+  search_path = g_slist_prepend (search_path, g_strdup (directory));
+}
+
+/**
+ * g_irepository_get_search_path:
+ *
+ * Returns the search path the GIRepository will use when looking for typelibs.
+ * The string is internal to GIRespository and should not be freed, nor should
+ * the elements.
+ *
+ * Return value: (element-type filename) (transfer none): list of strings
+ */
+GSList *
+g_irepository_get_search_path (void)
+{
+  return search_path;
+}
+
+static GSList *
+build_search_path_with_overrides (void)
+{
+  GSList *result;
+
+  init_globals ();
+
+  if (override_search_path != NULL)
+    {
+      result = g_slist_copy (override_search_path);
+      g_slist_last (result)->next = g_slist_copy (search_path);
+    }
+  else
+    result = g_slist_copy (search_path);
+  return result;
+}
+
+static char *
+build_typelib_key (const char *name, const char *source)
+{
+  GString *str = g_string_new (name);
+  g_string_append_c (str, '\0');
+  g_string_append (str, source);
+  return g_string_free (str, FALSE);
+}
+
+static char **
+get_typelib_dependencies (GITypelib *typelib)
+{
+  Header *header;
+  const char *dependencies_glob;
+
+  header = (Header *)typelib->data;
+
+  if (header->dependencies == 0)
+    return NULL;
+
+  dependencies_glob = g_typelib_get_string (typelib, header->dependencies);
+  return g_strsplit (dependencies_glob, "|", 0);
+}
+
+static GIRepository *
+get_repository (GIRepository *repository)
+{
+  init_globals ();
+
+  if (repository != NULL)
+    return repository;
+  else
+    return default_repository;
+}
+
+static GITypelib *
+check_version_conflict (GITypelib *typelib,
+                       const gchar *namespace,
+                       const gchar *expected_version,
+                       char       **version_conflict)
+{
+  Header *header;
+  const char *loaded_version;
+
+  if (expected_version == NULL)
+    {
+      if (version_conflict)
+       *version_conflict = NULL;
+      return typelib;
+    }
+
+  header = (Header*)typelib->data;
+  loaded_version = g_typelib_get_string (typelib, header->nsversion);
+  g_assert (loaded_version != NULL);
+
+  if (strcmp (expected_version, loaded_version) != 0)
+    {
+      if (version_conflict)
+       *version_conflict = (char*)loaded_version;
+      return NULL;
+    }
+  if (version_conflict)
+    *version_conflict = NULL;
+  return typelib;
+}
+
+static GITypelib *
+get_registered_status (GIRepository *repository,
+                      const char   *namespace,
+                      const char   *version,
+                      gboolean      allow_lazy,
+                      gboolean     *lazy_status,
+                      char        **version_conflict)
+{
+  GITypelib *typelib;
+  repository = get_repository (repository);
+  if (lazy_status)
+    *lazy_status = FALSE;
+  typelib = g_hash_table_lookup (repository->priv->typelibs, namespace);
+  if (typelib)
+    return check_version_conflict (typelib, namespace, version, version_conflict);
+  typelib = g_hash_table_lookup (repository->priv->lazy_typelibs, namespace);
+  if (!typelib)
+    return NULL;
+  if (lazy_status)
+    *lazy_status = TRUE;
+  if (!allow_lazy)
+    return NULL;
+  return check_version_conflict (typelib, namespace, version, version_conflict);
+}
+
+static GITypelib *
+get_registered (GIRepository *repository,
+               const char   *namespace,
+               const char   *version)
+{
+  return get_registered_status (repository, namespace, version, TRUE, NULL, NULL);
+}
+
+static gboolean
+load_dependencies_recurse (GIRepository *repository,
+                          GITypelib     *typelib,
+                          GError      **error)
+{
+  char **dependencies;
+
+  dependencies = get_typelib_dependencies (typelib);
+
+  if (dependencies != NULL)
+    {
+      int i;
+
+      for (i = 0; dependencies[i]; i++)
+       {
+         char *dependency = dependencies[i];
+         const char *last_dash;
+         char *dependency_namespace;
+         const char *dependency_version;
+
+         last_dash = strrchr (dependency, '-');
+         dependency_namespace = g_strndup (dependency, last_dash - dependency);
+         dependency_version = last_dash+1;
+
+         if (!g_irepository_require (repository, dependency_namespace, dependency_version,
+                                     0, error))
+           {
+             g_free (dependency_namespace);
+             g_strfreev (dependencies);
+             return FALSE;
+           }
+         g_free (dependency_namespace);
+       }
+      g_strfreev (dependencies);
+    }
+  return TRUE;
+}
+
+static const char *
+register_internal (GIRepository *repository,
+                  const char   *source,
+                  gboolean      lazy,
+                  GITypelib     *typelib,
+                  GError      **error)
+{
+  Header *header;
+  const gchar *namespace;
+  const gchar *version;
+
+  g_return_val_if_fail (typelib != NULL, FALSE);
+
+  header = (Header *)typelib->data;
+
+  g_return_val_if_fail (header != NULL, FALSE);
+
+  namespace = g_typelib_get_string (typelib, header->namespace);
+  version = g_typelib_get_string (typelib, header->nsversion);
+
+  if (lazy)
+    {
+      g_assert (!g_hash_table_lookup (repository->priv->lazy_typelibs,
+                                     namespace));
+      g_hash_table_insert (repository->priv->lazy_typelibs,
+                          build_typelib_key (namespace, source), (void *)typelib);
+    }
+  else
+    {
+      gpointer value;
+      char *key;
+
+      /* First, try loading all the dependencies */
+      if (!load_dependencies_recurse (repository, typelib, error))
+       return NULL;
+
+      /* Check if we are transitioning from lazily loaded state */
+      if (g_hash_table_lookup_extended (repository->priv->lazy_typelibs,
+                                       namespace,
+                                       (gpointer)&key, &value))
+       g_hash_table_remove (repository->priv->lazy_typelibs, key);
+      else
+       key = build_typelib_key (namespace, source);
+
+      g_hash_table_insert (repository->priv->typelibs, key, (void *)typelib);
+    }
+
+  return namespace;
+}
+
+/**
+ * g_irepository_get_dependencies:
+ * @repository: (allow-none): A #GIRepository, may be %NULL for the default
+ * @namespace_: Namespace of interest
+ *
+ * Return an array of all (transitive) dependencies for namespace
+ * @namespace_, including version.  The returned strings are of the
+ * form <code>namespace-version</code>.
+ *
+ * Note: The namespace must have already been loaded using a function
+ * such as g_irepository_require() before calling this function.
+ *
+ * Returns: (transfer full): Zero-terminated string array of versioned dependencies
+ */
+char **
+g_irepository_get_dependencies (GIRepository *repository,
+                               const char *namespace)
+{
+  GITypelib *typelib;
+
+  g_return_val_if_fail (namespace != NULL, NULL);
+
+  repository = get_repository (repository);
+
+  typelib = get_registered (repository, namespace, NULL);
+  g_return_val_if_fail (typelib != NULL, NULL);
+
+  return get_typelib_dependencies (typelib);
+}
+
+const char *
+g_irepository_load_typelib (GIRepository *repository,
+                           GITypelib     *typelib,
+                           GIRepositoryLoadFlags flags,
+                           GError      **error)
+{
+  Header *header;
+  const char *namespace;
+  const char *nsversion;
+  gboolean allow_lazy = flags & G_IREPOSITORY_LOAD_FLAG_LAZY;
+  gboolean is_lazy;
+  char *version_conflict;
+
+  repository = get_repository (repository);
+
+  header = (Header *) typelib->data;
+  namespace = g_typelib_get_string (typelib, header->namespace);
+  nsversion = g_typelib_get_string (typelib, header->nsversion);
+
+  if (get_registered_status (repository, namespace, nsversion, allow_lazy,
+                            &is_lazy, &version_conflict))
+    {
+      if (version_conflict != NULL)
+       {
+         g_set_error (error, G_IREPOSITORY_ERROR,
+                      G_IREPOSITORY_ERROR_NAMESPACE_VERSION_CONFLICT,
+                      "Attempting to load namespace '%s', version '%s', but '%s' is already loaded",
+                      namespace, nsversion, version_conflict);
+         return NULL;
+       }
+      return namespace;
+    }
+  return register_internal (repository, "<builtin>",
+                           allow_lazy, typelib, error);
+}
+
+/**
+ * g_irepository_is_registered:
+ * @repository: (allow-none): A #GIRepository, may be %NULL for the default
+ * @namespace_: Namespace of interest
+ * @version: (allow-none): Required version, may be %NULL for latest
+ *
+ * Check whether a particular namespace (and optionally, a specific
+ * version thereof) is currently loaded.  This function is likely to
+ * only be useful in unusual circumstances; in order to act upon
+ * metadata in the namespace, you should call g_irepository_require()
+ * instead which will ensure the namespace is loaded, and return as
+ * quickly as this function will if it has already been loaded.
+ *
+ * Returns: %TRUE if namespace-version is loaded, %FALSE otherwise
+ */
+gboolean
+g_irepository_is_registered (GIRepository *repository,
+                            const gchar *namespace,
+                            const gchar *version)
+{
+  repository = get_repository (repository);
+  return get_registered (repository, namespace, version) != NULL;
+}
+
+/**
+ * g_irepository_get_default:
+ *
+ * Returns the singleton process-global default #GIRepository.  It is
+ * not currently supported to have multiple repositories in a
+ * particular process, but this function is provided in the unlikely
+ * eventuality that it would become possible, and as a convenience for
+ * higher level language bindings to conform to the GObject method
+ * call conventions.
+
+ * All methods on #GIRepository also accept %NULL as an instance
+ * parameter to mean this default repository, which is usually more
+ * convenient for C.
+ *
+ * Returns: (transfer none): The global singleton #GIRepository
+ */
+GIRepository *
+g_irepository_get_default (void)
+{
+  return get_repository (NULL);
+}
+
+/**
+ * g_irepository_get_n_infos:
+ * @repository: (allow-none): A #GIRepository, may be %NULL for the default
+ * @namespace_: Namespace to inspect
+ *
+ * This function returns the number of metadata entries in
+ * given namespace @namespace_.  The namespace must have
+ * already been loaded before calling this function.
+ *
+ * Returns: number of metadata entries
+ */
+gint
+g_irepository_get_n_infos (GIRepository *repository,
+                          const gchar  *namespace)
+{
+  GITypelib *typelib;
+  gint n_interfaces = 0;
+
+  g_return_val_if_fail (namespace != NULL, -1);
+
+  repository = get_repository (repository);
+
+  typelib = get_registered (repository, namespace, NULL);
+
+  g_return_val_if_fail (typelib != NULL, -1);
+
+  n_interfaces = ((Header *)typelib->data)->n_local_entries;
+
+  return n_interfaces;
+}
+
+/**
+ * g_irepository_get_info:
+ * @repository: (allow-none): A #GIRepository, may be %NULL for the default
+ * @namespace_: Namespace to inspect
+ * @index: 0-based offset into namespace metadata for entry
+ *
+ * This function returns a particular metadata entry in the
+ * given namespace @namespace_.  The namespace must have
+ * already been loaded before calling this function.
+ * See g_irepository_get_n_infos() to find the maximum number of
+ * entries.
+ *
+ * Returns: (transfer full): #GIBaseInfo containing metadata
+ */
+GIBaseInfo *
+g_irepository_get_info (GIRepository *repository,
+                       const gchar  *namespace,
+                       gint          index)
+{
+  GITypelib *typelib;
+  DirEntry *entry;
+
+  g_return_val_if_fail (namespace != NULL, NULL);
+
+  repository = get_repository (repository);
+
+  typelib = get_registered (repository, namespace, NULL);
+
+  g_return_val_if_fail (typelib != NULL, NULL);
+
+  entry = g_typelib_get_dir_entry (typelib, index + 1);
+  if (entry == NULL)
+    return NULL;
+  return _g_info_new_full (entry->blob_type,
+                          repository,
+                          NULL, typelib, entry->offset);
+}
+
+typedef struct {
+  GIRepository *repository;
+  GType type;
+
+  gboolean fastpass;
+  GITypelib *result_typelib;
+  DirEntry *result;
+} FindByGTypeData;
+
+static void
+find_by_gtype_foreach (gpointer key,
+                      gpointer value,
+                      gpointer datap)
+{
+  GITypelib *typelib = (GITypelib*)value;
+  FindByGTypeData *data = datap;
+
+  if (data->result != NULL)
+    return;
+
+  data->result = g_typelib_get_dir_entry_by_gtype (typelib, data->fastpass, data->type);
+  if (data->result)
+    data->result_typelib = typelib;
+}
+
+/**
+ * g_irepository_find_by_gtype:
+ * @repository: (allow-none): A #GIRepository, may be %NULL for the default
+ * @gtype: GType to search for
+ *
+ * Searches all loaded namespaces for a particular #GType.  Note that
+ * in order to locate the metadata, the namespace corresponding to
+ * the type must first have been loaded.  There is currently no
+ * mechanism for determining the namespace which corresponds to an
+ * arbitrary GType - thus, this function will operate most reliably
+ * when you know the GType to originate from be from a loaded namespace.
+ *
+ * Returns: (transfer full): #GIBaseInfo representing metadata about @type, or %NULL
+ */
+GIBaseInfo *
+g_irepository_find_by_gtype (GIRepository *repository,
+                            GType         gtype)
+{
+  FindByGTypeData data;
+  GIBaseInfo *cached;
+
+  repository = get_repository (repository);
+
+  cached = g_hash_table_lookup (repository->priv->info_by_gtype,
+                               (gpointer)gtype);
+
+  if (cached != NULL)
+    return g_base_info_ref (cached);
+
+  data.repository = repository;
+  data.fastpass = TRUE;
+  data.type = gtype;
+  data.result_typelib = NULL;
+  data.result = NULL;
+
+  g_hash_table_foreach (repository->priv->typelibs, find_by_gtype_foreach, &data);
+  if (data.result == NULL)
+    g_hash_table_foreach (repository->priv->lazy_typelibs, find_by_gtype_foreach, &data);
+
+  /* We do two passes; see comment in find_interface */
+  if (data.result == NULL)
+    {
+      data.fastpass = FALSE;
+      g_hash_table_foreach (repository->priv->typelibs, find_by_gtype_foreach, &data);
+    }
+  if (data.result == NULL)
+    g_hash_table_foreach (repository->priv->lazy_typelibs, find_by_gtype_foreach, &data);
+
+  if (data.result != NULL)
+    {
+      cached = _g_info_new_full (data.result->blob_type,
+                                repository,
+                                NULL, data.result_typelib, data.result->offset);
+
+      g_hash_table_insert (repository->priv->info_by_gtype,
+                          (gpointer) gtype,
+                          g_base_info_ref (cached));
+      return cached;
+    }
+  return NULL;
+}
+
+/**
+ * g_irepository_find_by_name:
+ * @repository: (allow-none): A #GIRepository, may be %NULL for the default
+ * @namespace_: Namespace which will be searched
+ * @name: Entry name to find
+ *
+ * Searches for a particular entry in a namespace.  Before calling
+ * this function for a particular namespace, you must call
+ * g_irepository_require() once to load the namespace, or otherwise
+ * ensure the namespace has already been loaded.
+ *
+ * Returns: (transfer full): #GIBaseInfo representing metadata about @name, or %NULL
+ */
+GIBaseInfo *
+g_irepository_find_by_name (GIRepository *repository,
+                           const gchar  *namespace,
+                           const gchar  *name)
+{
+  GITypelib *typelib;
+  DirEntry *entry;
+
+  g_return_val_if_fail (namespace != NULL, NULL);
+
+  repository = get_repository (repository);
+  typelib = get_registered (repository, namespace, NULL);
+  g_return_val_if_fail (typelib != NULL, NULL);
+
+  entry = g_typelib_get_dir_entry_by_name (typelib, name);
+  if (entry == NULL)
+    return NULL;
+  return _g_info_new_full (entry->blob_type,
+                          repository,
+                          NULL, typelib, entry->offset);
+}
+
+typedef struct {
+  GIRepository *repository;
+  GQuark domain;
+
+  GITypelib *result_typelib;
+  DirEntry *result;
+} FindByErrorDomainData;
+
+static void
+find_by_error_domain_foreach (gpointer key,
+                             gpointer value,
+                             gpointer datap)
+{
+  GITypelib *typelib = (GITypelib*)value;
+  FindByErrorDomainData *data = datap;
+
+  if (data->result != NULL)
+    return;
+
+  data->result = g_typelib_get_dir_entry_by_error_domain (typelib, data->domain);
+  if (data->result)
+    data->result_typelib = typelib;
+}
+
+/**
+ * g_irepository_find_by_error_domain:
+ * @repository: (allow-none): A #GIRepository, may be %NULL for the default
+ * @domain: a #GError domain
+ *
+ * Searches for the enum type corresponding to the given #GError
+ * domain. Before calling this function for a particular namespace,
+ * you must call g_irepository_require() once to load the namespace, or
+ * otherwise ensure the namespace has already been loaded.
+ *
+ * Returns: (transfer full): #GIEnumInfo representing metadata about @domain's
+ * enum type, or %NULL
+ *
+ * Since: 1.29.17
+ */
+GIEnumInfo *
+g_irepository_find_by_error_domain (GIRepository *repository,
+                                   GQuark        domain)
+{
+  FindByErrorDomainData data;
+  GIEnumInfo *cached;
+
+  repository = get_repository (repository);
+
+  cached = g_hash_table_lookup (repository->priv->info_by_error_domain,
+                               GUINT_TO_POINTER (domain));
+
+  if (cached != NULL)
+    return g_base_info_ref ((GIBaseInfo *)cached);
+
+  data.repository = repository;
+  data.domain = domain;
+  data.result_typelib = NULL;
+  data.result = NULL;
+
+  g_hash_table_foreach (repository->priv->typelibs, find_by_error_domain_foreach, &data);
+  if (data.result == NULL)
+    g_hash_table_foreach (repository->priv->lazy_typelibs, find_by_error_domain_foreach, &data);
+
+  if (data.result != NULL)
+    {
+      cached = _g_info_new_full (data.result->blob_type,
+                                repository,
+                                NULL, data.result_typelib, data.result->offset);
+
+      g_hash_table_insert (repository->priv->info_by_error_domain,
+                          GUINT_TO_POINTER (domain),
+                          g_base_info_ref (cached));
+      return cached;
+    }
+  return NULL;
+}
+
+static void
+collect_namespaces (gpointer key,
+                   gpointer value,
+                   gpointer data)
+{
+  GList **list = data;
+
+  *list = g_list_append (*list, key);
+}
+
+/**
+ * g_irepository_get_loaded_namespaces:
+ * @repository: (allow-none): A #GIRepository, may be %NULL for the default
+ *
+ * Return the list of currently loaded namespaces.
+ *
+ * Returns: (utf8) (transfer full): List of namespaces
+ */
+gchar **
+g_irepository_get_loaded_namespaces (GIRepository *repository)
+{
+  GList *l, *list = NULL;
+  gchar **names;
+  gint i;
+
+  repository = get_repository (repository);
+
+  g_hash_table_foreach (repository->priv->typelibs, collect_namespaces, &list);
+  g_hash_table_foreach (repository->priv->lazy_typelibs, collect_namespaces, &list);
+
+  names = g_malloc0 (sizeof (gchar *) * (g_list_length (list) + 1));
+  i = 0;
+  for (l = list; l; l = l->next)
+    names[i++] = g_strdup (l->data);
+  g_list_free (list);
+
+  return names;
+}
+
+/**
+ * g_irepository_get_version:
+ * @repository: (allow-none): A #GIRepository, may be %NULL for the default
+ * @namespace_: Namespace to inspect
+ *
+ * This function returns the loaded version associated with the given
+ * namespace @namespace_.
+ *
+ * Note: The namespace must have already been loaded using a function
+ * such as g_irepository_require() before calling this function.
+ *
+ * Returns: Loaded version
+ */
+const gchar *
+g_irepository_get_version (GIRepository *repository,
+                          const gchar  *namespace)
+{
+  GITypelib *typelib;
+  Header *header;
+
+  g_return_val_if_fail (namespace != NULL, NULL);
+
+  repository = get_repository (repository);
+
+  typelib = get_registered (repository, namespace, NULL);
+
+  g_return_val_if_fail (typelib != NULL, NULL);
+
+  header = (Header *) typelib->data;
+  return g_typelib_get_string (typelib, header->nsversion);
+}
+
+/**
+ * g_irepository_get_shared_library:
+ * @repository: (allow-none): A #GIRepository, may be %NULL for the default
+ * @namespace_: Namespace to inspect
+ *
+ * This function returns the full path to the shared C library
+ * associated with the given namespace @namespace_. There may be no
+ * shared library path associated, in which case this function will
+ * return %NULL.
+ *
+ * Note: The namespace must have already been loaded using a function
+ * such as g_irepository_require() before calling this function.
+ *
+ * Returns: Full path to shared library, or %NULL if none associated
+ */
+const gchar *
+g_irepository_get_shared_library (GIRepository *repository,
+                                 const gchar  *namespace)
+{
+  GITypelib *typelib;
+  Header *header;
+
+  g_return_val_if_fail (namespace != NULL, NULL);
+
+  repository = get_repository (repository);
+
+  typelib = get_registered (repository, namespace, NULL);
+
+  g_return_val_if_fail (typelib != NULL, NULL);
+
+  header = (Header *) typelib->data;
+  if (header->shared_library)
+    return g_typelib_get_string (typelib, header->shared_library);
+  else
+    return NULL;
+}
+
+/**
+ * g_irepository_get_c_prefix
+ * @repository: (allow-none): A #GIRepository, may be %NULL for the default
+ * @namespace_: Namespace to inspect
+ *
+ * This function returns the "C prefix", or the C level namespace
+ * associated with the given introspection namespace.  Each C symbol
+ * starts with this prefix, as well each #GType in the library.
+ *
+ * Note: The namespace must have already been loaded using a function
+ * such as g_irepository_require() before calling this function.
+ *
+ * Returns: C namespace prefix, or %NULL if none associated
+ */
+const gchar *
+g_irepository_get_c_prefix (GIRepository *repository,
+                            const gchar  *namespace_)
+{
+  GITypelib *typelib;
+  Header *header;
+
+  g_return_val_if_fail (namespace_ != NULL, NULL);
+
+  repository = get_repository (repository);
+
+  typelib = get_registered (repository, namespace_, NULL);
+
+  g_return_val_if_fail (typelib != NULL, NULL);
+
+  header = (Header *) typelib->data;
+  if (header->c_prefix)
+    return g_typelib_get_string (typelib, header->c_prefix);
+  else
+    return NULL;
+}
+
+/**
+ * g_irepository_get_typelib_path
+ * @repository: (allow-none): Repository, may be %NULL for the default
+ * @namespace_: GI namespace to use, e.g. "Gtk"
+ *
+ * If namespace @namespace_ is loaded, return the full path to the
+ * .typelib file it was loaded from.  If the typelib for
+ * namespace @namespace_ was included in a shared library, return
+ * the special string "$lt;builtin$gt;".
+ *
+ * Returns: Filesystem path (or $lt;builtin$gt;) if successful, %NULL if namespace is not loaded
+ */
+
+const gchar *
+g_irepository_get_typelib_path (GIRepository *repository,
+                               const gchar  *namespace)
+{
+  gpointer orig_key, value;
+
+  repository = get_repository (repository);
+
+  if (!g_hash_table_lookup_extended (repository->priv->typelibs, namespace,
+                                    &orig_key, &value))
+    {
+      if (!g_hash_table_lookup_extended (repository->priv->lazy_typelibs, namespace,
+                                        &orig_key, &value))
+
+       return NULL;
+    }
+  return ((char*)orig_key) + strlen ((char *) orig_key) + 1;
+}
+
+/* This simple search function looks for a specified namespace-version;
+   it's faster than the full directory listing required for latest version. */
+static GMappedFile *
+find_namespace_version (const gchar  *namespace,
+                       const gchar  *version,
+                       GSList       *search_path,
+                       gchar       **path_ret)
+{
+  GSList *ldir;
+  GError *error = NULL;
+  GMappedFile *mfile = NULL;
+  char *fname;
+
+  fname = g_strdup_printf ("%s-%s.typelib", namespace, version);
+
+  for (ldir = search_path; ldir; ldir = ldir->next)
+    {
+      char *path = g_build_filename (ldir->data, fname, NULL);
+
+      mfile = g_mapped_file_new (path, FALSE, &error);
+      if (error)
+       {
+         g_free (path);
+         g_clear_error (&error);
+         continue;
+       }
+      *path_ret = path;
+      break;
+    }
+  g_free (fname);
+  return mfile;
+}
+
+static gboolean
+parse_version (const char *version,
+              int *major,
+              int *minor)
+{
+  const char *dot;
+  char *end;
+
+  *major = strtol (version, &end, 10);
+  dot = strchr (version, '.');
+  if (dot == NULL)
+    {
+      *minor = 0;
+      return TRUE;
+    }
+  if (dot != end)
+    return FALSE;
+  *minor = strtol (dot+1, &end, 10);
+  if (end != (version + strlen (version)))
+    return FALSE;
+  return TRUE;
+}
+
+static int
+compare_version (const char *v1,
+                const char *v2)
+{
+  gboolean success;
+  int v1_major, v1_minor;
+  int v2_major, v2_minor;
+
+  success = parse_version (v1, &v1_major, &v1_minor);
+  g_assert (success);
+
+  success = parse_version (v2, &v2_major, &v2_minor);
+  g_assert (success);
+
+  if (v1_major > v2_major)
+    return 1;
+  else if (v2_major > v1_major)
+    return -1;
+  else if (v1_minor > v2_minor)
+    return 1;
+  else if (v2_minor > v1_minor)
+    return -1;
+  return 0;
+}
+
+struct NamespaceVersionCandidadate
+{
+  GMappedFile *mfile;
+  int path_index;
+  char *path;
+  char *version;
+};
+
+static int
+compare_candidate_reverse (struct NamespaceVersionCandidadate *c1,
+                          struct NamespaceVersionCandidadate *c2)
+{
+  int result = compare_version (c1->version, c2->version);
+  /* First, check the version */
+  if (result > 0)
+    return -1;
+  else if (result < 0)
+    return 1;
+  else
+    {
+      /* Now check the path index, which says how early in the search path
+       * we found it.  This ensures that of equal version targets, we
+       * pick the earlier one.
+       */
+      if (c1->path_index == c2->path_index)
+       return 0;
+      else if (c1->path_index > c2->path_index)
+       return 1;
+      else
+       return -1;
+    }
+}
+
+static void
+free_candidate (struct NamespaceVersionCandidadate *candidate)
+{
+  g_mapped_file_unref (candidate->mfile);
+  g_free (candidate->path);
+  g_free (candidate->version);
+  g_slice_free (struct NamespaceVersionCandidadate, candidate);
+}
+
+static GSList *
+enumerate_namespace_versions (const gchar *namespace,
+                             GSList      *search_path)
+{
+  GSList *candidates = NULL;
+  GHashTable *found_versions = g_hash_table_new (g_str_hash, g_str_equal);
+  char *namespace_dash;
+  char *namespace_typelib;
+  GSList *ldir;
+  GError *error = NULL;
+  int index;
+
+  namespace_dash = g_strdup_printf ("%s-", namespace);
+  namespace_typelib = g_strdup_printf ("%s.typelib", namespace);
+
+  index = 0;
+  for (ldir = search_path; ldir; ldir = ldir->next)
+    {
+      GDir *dir;
+      const char *dirname;
+      const char *entry;
+
+      dirname = (const char*)ldir->data;
+      dir = g_dir_open (dirname, 0, NULL);
+      if (dir == NULL)
+       continue;
+      while ((entry = g_dir_read_name (dir)) != NULL)
+       {
+         GMappedFile *mfile;
+         char *path, *version;
+         struct NamespaceVersionCandidadate *candidate;
+
+         if (!g_str_has_suffix (entry, ".typelib"))
+           continue;
+
+         if (g_str_has_prefix (entry, namespace_dash))
+           {
+             const char *last_dash;
+             const char *name_end;
+             int major, minor;
+
+             name_end = strrchr (entry, '.');
+             last_dash = strrchr (entry, '-');
+             version = g_strndup (last_dash+1, name_end-(last_dash+1));
+             if (!parse_version (version, &major, &minor))
+               {
+                 g_free (version);
+                 continue;
+               }
+           }
+         else
+           continue;
+
+         if (g_hash_table_lookup (found_versions, version) != NULL)
+           {
+             g_free (version);
+             continue;
+           }
+         g_hash_table_insert (found_versions, version, version);
+
+         path = g_build_filename (dirname, entry, NULL);
+         mfile = g_mapped_file_new (path, FALSE, &error);
+         if (mfile == NULL)
+           {
+             g_free (path);
+             g_free (version);
+             g_clear_error (&error);
+             continue;
+           }
+         candidate = g_slice_new0 (struct NamespaceVersionCandidadate);
+         candidate->mfile = mfile;
+         candidate->path_index = index;
+         candidate->path = path;
+         candidate->version = version;
+         candidates = g_slist_prepend (candidates, candidate);
+       }
+      g_dir_close (dir);
+      index++;
+    }
+
+  g_free (namespace_dash);
+  g_free (namespace_typelib);
+  g_hash_table_destroy (found_versions);
+
+  return candidates;
+}
+
+static GMappedFile *
+find_namespace_latest (const gchar  *namespace,
+                      GSList       *search_path,
+                      gchar       **version_ret,
+                      gchar       **path_ret)
+{
+  GSList *candidates;
+  GMappedFile *result = NULL;
+
+  *version_ret = NULL;
+  *path_ret = NULL;
+
+  candidates = enumerate_namespace_versions (namespace, search_path);
+
+  if (candidates != NULL)
+    {
+      struct NamespaceVersionCandidadate *elected;
+      candidates = g_slist_sort (candidates, (GCompareFunc) compare_candidate_reverse);
+
+      elected = (struct NamespaceVersionCandidadate *) candidates->data;
+      /* Remove the elected one so we don't try to free its contents */
+      candidates = g_slist_delete_link (candidates, candidates);
+
+      result = elected->mfile;
+      *path_ret = elected->path;
+      *version_ret = elected->version;
+      g_slice_free (struct NamespaceVersionCandidadate, elected); /* just free the container */
+      g_slist_foreach (candidates, (GFunc) free_candidate, NULL);
+      g_slist_free (candidates);
+    }
+  return result;
+}
+
+/**
+ * g_irepository_enumerate_versions:
+ * @repository: (allow-none): the repository
+ * @namespace_: GI namespace, e.g. "Gtk"
+ *
+ * Obtain an unordered list of versions (either currently loaded or
+ * available) for @namespace_ in this @repository.
+ *
+ * Returns: (element-type utf8) (transfer full): the array of versions.
+ */
+GList *
+g_irepository_enumerate_versions (GIRepository *repository,
+                        const gchar  *namespace_)
+{
+  GList *ret = NULL;
+  GSList *search_path;
+  GSList *candidates, *link;
+  const gchar *loaded_version;
+
+  search_path = build_search_path_with_overrides ();
+  candidates = enumerate_namespace_versions (namespace_, search_path);
+  g_slist_free (search_path);
+
+  for (link = candidates; link; link = link->next)
+    {
+      struct NamespaceVersionCandidadate *candidate = link->data;
+      ret = g_list_prepend (ret, g_strdup (candidate->version));
+      free_candidate (candidate);
+    }
+  g_slist_free (candidates);
+
+  /* The currently loaded version of a namespace is also part of the
+   * available versions, as it could have been loaded using
+   * require_private().
+   */
+  if (g_irepository_is_registered (repository, namespace_, NULL))
+    {
+      loaded_version = g_irepository_get_version (repository, namespace_);
+      if (loaded_version && !g_list_find_custom (ret, loaded_version, g_str_equal))
+        ret = g_list_prepend (ret, g_strdup (loaded_version));
+    }
+
+  return ret;
+}
+
+static GITypelib *
+require_internal (GIRepository  *repository,
+                 const gchar   *namespace,
+                 const gchar   *version,
+                 GIRepositoryLoadFlags flags,
+                 GSList        *search_path,
+                 GError       **error)
+{
+  GMappedFile *mfile;
+  GITypelib *ret = NULL;
+  Header *header;
+  GITypelib *typelib = NULL;
+  const gchar *typelib_namespace, *typelib_version;
+  gboolean allow_lazy = (flags & G_IREPOSITORY_LOAD_FLAG_LAZY) > 0;
+  gboolean is_lazy;
+  char *version_conflict = NULL;
+  char *path = NULL;
+  char *tmp_version = NULL;
+
+  g_return_val_if_fail (namespace != NULL, FALSE);
+
+  repository = get_repository (repository);
+
+  typelib = get_registered_status (repository, namespace, version, allow_lazy,
+                                   &is_lazy, &version_conflict);
+  if (typelib)
+    return typelib;
+
+  if (version_conflict != NULL)
+    {
+      g_set_error (error, G_IREPOSITORY_ERROR,
+                  G_IREPOSITORY_ERROR_NAMESPACE_VERSION_CONFLICT,
+                  "Requiring namespace '%s' version '%s', but '%s' is already loaded",
+                  namespace, version, version_conflict);
+      return NULL;
+    }
+
+  if (version != NULL)
+    {
+      mfile = find_namespace_version (namespace, version,
+                                     search_path, &path);
+      tmp_version = g_strdup (version);
+    }
+  else
+    {
+      mfile = find_namespace_latest (namespace, search_path,
+                                    &tmp_version, &path);
+    }
+
+  if (mfile == NULL)
+    {
+      if (version != NULL)
+       g_set_error (error, G_IREPOSITORY_ERROR,
+                    G_IREPOSITORY_ERROR_TYPELIB_NOT_FOUND,
+                    "Typelib file for namespace '%s', version '%s' not found",
+                    namespace, version);
+      else
+       g_set_error (error, G_IREPOSITORY_ERROR,
+                    G_IREPOSITORY_ERROR_TYPELIB_NOT_FOUND,
+                    "Typelib file for namespace '%s' (any version) not found",
+                    namespace);
+      goto out;
+    }
+
+  {
+    GError *temp_error = NULL;
+    typelib = g_typelib_new_from_mapped_file (mfile, &temp_error);
+    if (!typelib)
+      {
+       g_set_error (error, G_IREPOSITORY_ERROR,
+                    G_IREPOSITORY_ERROR_TYPELIB_NOT_FOUND,
+                    "Failed to load typelib file '%s' for namespace '%s': %s",
+                    path, namespace, temp_error->message);
+       g_clear_error (&temp_error);
+       goto out;
+      }
+  }
+  header = (Header *) typelib->data;
+  typelib_namespace = g_typelib_get_string (typelib, header->namespace);
+  typelib_version = g_typelib_get_string (typelib, header->nsversion);
+
+  if (strcmp (typelib_namespace, namespace) != 0)
+    {
+      g_set_error (error, G_IREPOSITORY_ERROR,
+                  G_IREPOSITORY_ERROR_NAMESPACE_MISMATCH,
+                  "Typelib file %s for namespace '%s' contains "
+                  "namespace '%s' which doesn't match the file name",
+                  path, namespace, typelib_namespace);
+      g_typelib_free (typelib);
+      goto out;
+    }
+  if (version != NULL && strcmp (typelib_version, version) != 0)
+    {
+      g_set_error (error, G_IREPOSITORY_ERROR,
+                  G_IREPOSITORY_ERROR_NAMESPACE_MISMATCH,
+                  "Typelib file %s for namespace '%s' contains "
+                  "version '%s' which doesn't match the expected version '%s'",
+                  path, namespace, typelib_version, version);
+      g_typelib_free (typelib);
+      goto out;
+    }
+
+  if (!register_internal (repository, path, allow_lazy,
+                         typelib, error))
+    {
+      g_typelib_free (typelib);
+      goto out;
+    }
+  ret = typelib;
+ out:
+  g_free (tmp_version);
+  g_free (path);
+  return ret;
+}
+
+/**
+ * g_irepository_require:
+ * @repository: (allow-none): Repository, may be %NULL for the default
+ * @namespace_: GI namespace to use, e.g. "Gtk"
+ * @version: (allow-none): Version of namespace, may be %NULL for latest
+ * @flags: Set of %GIRepositoryLoadFlags, may be 0
+ * @error: a #GError.
+ *
+ * Force the namespace @namespace_ to be loaded if it isn't already.
+ * If @namespace_ is not loaded, this function will search for a
+ * ".typelib" file using the repository search path.  In addition, a
+ * version @version of namespace may be specified.  If @version is
+ * not specified, the latest will be used.
+ *
+ * Returns: (transfer none): a pointer to the #GITypelib if successful, %NULL otherwise
+ */
+GITypelib *
+g_irepository_require (GIRepository  *repository,
+                      const gchar   *namespace,
+                      const gchar   *version,
+                      GIRepositoryLoadFlags flags,
+                      GError       **error)
+{
+  GSList *search_path;
+  GITypelib *typelib;
+
+  search_path = build_search_path_with_overrides ();
+  typelib = require_internal (repository, namespace, version, flags,
+                             search_path, error);
+  g_slist_free (search_path);
+
+  return typelib;
+}
+
+/**
+ * g_irepository_require_private:
+ * @repository: (allow-none): Repository, may be %NULL for the default
+ * @typelib_dir: Private directory where to find the requested typelib
+ * @namespace_: GI namespace to use, e.g. "Gtk"
+ * @version: (allow-none): Version of namespace, may be %NULL for latest
+ * @flags: Set of %GIRepositoryLoadFlags, may be 0
+ * @error: a #GError.
+ *
+ * Force the namespace @namespace_ to be loaded if it isn't already.
+ * If @namespace_ is not loaded, this function will search for a
+ * ".typelib" file within the private directory only. In addition, a
+ * version @version of namespace should be specified.  If @version is
+ * not specified, the latest will be used.
+ *
+ * Returns: (transfer none): a pointer to the #GITypelib if successful, %NULL otherwise
+ */
+GITypelib *
+g_irepository_require_private (GIRepository  *repository,
+                              const gchar   *typelib_dir,
+                              const gchar   *namespace,
+                              const gchar   *version,
+                              GIRepositoryLoadFlags flags,
+                              GError       **error)
+{
+  GSList search_path = { (gpointer) typelib_dir, NULL };
+
+  return require_internal (repository, namespace, version, flags,
+                          &search_path, error);
+}
+
+static gboolean
+g_irepository_introspect_cb (const char *option_name,
+                            const char *value,
+                            gpointer data,
+                            GError **error)
+{
+  GError *tmp_error = NULL;
+  gboolean ret = g_irepository_dump (value, &tmp_error);
+  if (!ret)
+    {
+      g_error ("Failed to extract GType data: %s",
+              tmp_error->message);
+      exit (1);
+    }
+  exit (0);
+}
+
+static const GOptionEntry introspection_args[] = {
+  { "introspect-dump", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_CALLBACK,
+    g_irepository_introspect_cb, "Dump introspection information",
+    "infile.txt,outfile.xml" },
+  { NULL }
+};
+
+/**
+ * g_irepository_get_option_group: (skip)
+ *
+ * Obtain the option group for girepository, it's used
+ * by the dumper and for programs that wants to provide
+ * introspection information
+ *
+ * Returns: (transfer full): the option group
+ */
+GOptionGroup *
+g_irepository_get_option_group (void)
+{
+  GOptionGroup *group;
+  group = g_option_group_new ("girepository", "Introspection Options", "Show Introspection Options", NULL, NULL);
+
+  g_option_group_add_entries (group, introspection_args);
+  return group;
+}
+
+GQuark
+g_irepository_error_quark (void)
+{
+  static GQuark quark = 0;
+  if (quark == 0)
+    quark = g_quark_from_static_string ("g-irepository-error-quark");
+  return quark;
+}
+
+/**
+ * g_type_tag_to_string:
+ * @type: the type_tag
+ *
+ * Obtain a string representation of @type
+ *
+ * Returns: the string
+ */
+const gchar*
+g_type_tag_to_string (GITypeTag type)
+{
+  switch (type)
+    {
+    case GI_TYPE_TAG_VOID:
+      return "void";
+    case GI_TYPE_TAG_BOOLEAN:
+      return "gboolean";
+    case GI_TYPE_TAG_INT8:
+      return "gint8";
+    case GI_TYPE_TAG_UINT8:
+      return "guint8";
+    case GI_TYPE_TAG_INT16:
+      return "gint16";
+    case GI_TYPE_TAG_UINT16:
+      return "guint16";
+    case GI_TYPE_TAG_INT32:
+      return "gint32";
+    case GI_TYPE_TAG_UINT32:
+      return "guint32";
+    case GI_TYPE_TAG_INT64:
+      return "gint64";
+    case GI_TYPE_TAG_UINT64:
+      return "guint64";
+    case GI_TYPE_TAG_FLOAT:
+      return "gfloat";
+    case GI_TYPE_TAG_DOUBLE:
+      return "gdouble";
+    case GI_TYPE_TAG_UNICHAR:
+      return "gunichar";
+    case GI_TYPE_TAG_GTYPE:
+      return "GType";
+    case GI_TYPE_TAG_UTF8:
+      return "utf8";
+    case GI_TYPE_TAG_FILENAME:
+      return "filename";
+    case GI_TYPE_TAG_ARRAY:
+      return "array";
+    case GI_TYPE_TAG_INTERFACE:
+      return "interface";
+    case GI_TYPE_TAG_GLIST:
+      return "glist";
+    case GI_TYPE_TAG_GSLIST:
+      return "gslist";
+    case GI_TYPE_TAG_GHASH:
+      return "ghash";
+    case GI_TYPE_TAG_ERROR:
+      return "error";
+    default:
+      return "unknown";
+    }
+}
+
+/**
+ * g_info_type_to_string:
+ * @type: the info type
+ *
+ * Obtain a string representation of @type
+ *
+ * Returns: the string
+ */
+const gchar*
+g_info_type_to_string (GIInfoType type)
+{
+  switch (type)
+    {
+    case GI_INFO_TYPE_INVALID:
+      return "invalid";
+    case GI_INFO_TYPE_FUNCTION:
+      return "function";
+    case GI_INFO_TYPE_CALLBACK:
+      return "callback";
+    case GI_INFO_TYPE_STRUCT:
+      return "struct";
+    case GI_INFO_TYPE_BOXED:
+      return "boxed";
+    case GI_INFO_TYPE_ENUM:
+      return "enum";
+    case GI_INFO_TYPE_FLAGS:
+      return "flags";
+    case GI_INFO_TYPE_OBJECT:
+      return "object";
+    case GI_INFO_TYPE_INTERFACE:
+      return "interface";
+    case GI_INFO_TYPE_CONSTANT:
+      return "constant";
+    case GI_INFO_TYPE_UNION:
+      return "union";
+    case GI_INFO_TYPE_VALUE:
+      return "value";
+    case GI_INFO_TYPE_SIGNAL:
+      return "signal";
+    case GI_INFO_TYPE_VFUNC:
+      return "vfunc";
+    case GI_INFO_TYPE_PROPERTY:
+      return "property";
+    case GI_INFO_TYPE_FIELD:
+      return "field";
+    case GI_INFO_TYPE_ARG:
+      return "arg";
+    case GI_INFO_TYPE_TYPE:
+      return "type";
+    case GI_INFO_TYPE_UNRESOLVED:
+      return "unresolved";
+    default:
+      return "unknown";
+  }
+}
diff --git a/girepository/girepository.h b/girepository/girepository.h
new file mode 100644 (file)
index 0000000..02bd4a1
--- /dev/null
@@ -0,0 +1,178 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Repository
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#ifndef __G_IREPOSITORY_H__
+#define __G_IREPOSITORY_H__
+
+#include <glib-object.h>
+#include <gmodule.h>
+
+#define __GIREPOSITORY_H_INSIDE__
+
+#include <giarginfo.h>
+#include <gibaseinfo.h>
+#include <gicallableinfo.h>
+#include <giconstantinfo.h>
+#include <gienuminfo.h>
+#include <gifieldinfo.h>
+#include <gifunctioninfo.h>
+#include <giinterfaceinfo.h>
+#include <giobjectinfo.h>
+#include <gipropertyinfo.h>
+#include <giregisteredtypeinfo.h>
+#include <gisignalinfo.h>
+#include <gistructinfo.h>
+#include <gitypeinfo.h>
+#include <gitypelib.h>
+#include <gitypes.h>
+#include <giunioninfo.h>
+#include <givfuncinfo.h>
+
+G_BEGIN_DECLS
+
+#define G_TYPE_IREPOSITORY              (g_irepository_get_type ())
+#define G_IREPOSITORY(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), G_TYPE_IREPOSITORY, GIRepository))
+#define G_IREPOSITORY_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), G_TYPE_IREPOSITORY, GIRepositoryClass))
+#define G_IS_IREPOSITORY(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), G_TYPE_IREPOSITORY))
+#define G_IS_IREPOSITORY_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), G_TYPE_IREPOSITORY))
+#define G_IREPOSITORY_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), G_TYPE_IREPOSITORY, GIRepositoryClass))
+
+typedef struct _GIRepository         GIRepository;
+typedef struct _GIRepositoryClass    GIRepositoryClass;
+typedef struct _GIRepositoryPrivate  GIRepositoryPrivate;
+
+struct _GIRepository
+{
+  GObject parent;
+
+  /*< private >*/
+  GIRepositoryPrivate *priv;
+};
+
+struct _GIRepositoryClass
+{
+  GObjectClass parent;
+};
+
+/**
+ * GIRepositoryLoadFlags
+ * @G_IREPOSITORY_LOAD_FLAG_LAZY: Load the types lazily.
+ *
+ * Flags that controlls how a typelib is loaded by
+ * GIRepositry, used by g_irepository_load_typelib().
+ */
+typedef enum
+{
+  G_IREPOSITORY_LOAD_FLAG_LAZY = 1 << 0
+} GIRepositoryLoadFlags;
+
+/* Repository */
+
+GType         g_irepository_get_type      (void) G_GNUC_CONST;
+GIRepository *g_irepository_get_default   (void);
+void          g_irepository_prepend_search_path (const char *directory);
+GSList *      g_irepository_get_search_path     (void);
+const char *  g_irepository_load_typelib  (GIRepository *repository,
+                                          GITypelib     *typelib,
+                                          GIRepositoryLoadFlags flags,
+                                          GError      **error);
+gboolean      g_irepository_is_registered (GIRepository *repository,
+                                          const gchar  *namespace_,
+                                          const gchar  *version);
+GIBaseInfo *  g_irepository_find_by_name  (GIRepository *repository,
+                                          const gchar  *namespace_,
+                                          const gchar  *name);
+GList *       g_irepository_enumerate_versions (GIRepository *repository,
+                                               const gchar  *namespace_);
+GITypelib *    g_irepository_require       (GIRepository *repository,
+                                          const gchar  *namespace_,
+                                          const gchar  *version,
+                                          GIRepositoryLoadFlags flags,
+                                          GError      **error);
+GITypelib *    g_irepository_require_private (GIRepository  *repository,
+                                            const gchar   *typelib_dir,
+                                            const gchar   *namespace_,
+                                            const gchar   *version,
+                                            GIRepositoryLoadFlags flags,
+                                            GError       **error);
+gchar      ** g_irepository_get_dependencies (GIRepository *repository,
+                                             const gchar  *namespace_);
+gchar      ** g_irepository_get_loaded_namespaces (GIRepository *repository);
+GIBaseInfo *  g_irepository_find_by_gtype (GIRepository *repository,
+                                          GType         gtype);
+gint          g_irepository_get_n_infos   (GIRepository *repository,
+                                          const gchar  *namespace_);
+GIBaseInfo *  g_irepository_get_info      (GIRepository *repository,
+                                          const gchar  *namespace_,
+                                          gint          index);
+GIEnumInfo *  g_irepository_find_by_error_domain (GIRepository *repository,
+                                                 GQuark        domain);
+const gchar * g_irepository_get_typelib_path   (GIRepository *repository,
+                                               const gchar  *namespace_);
+const gchar * g_irepository_get_shared_library (GIRepository *repository,
+                                               const gchar  *namespace_);
+const gchar * g_irepository_get_c_prefix (GIRepository *repository,
+                                          const gchar  *namespace_);
+const gchar * g_irepository_get_version (GIRepository *repository,
+                                        const gchar  *namespace_);
+
+GOptionGroup * g_irepository_get_option_group (void);
+
+gboolean       g_irepository_dump  (const char *arg, GError **error);
+
+/**
+ * GIRepositoryError:
+ * @G_IREPOSITORY_ERROR_TYPELIB_NOT_FOUND: the typelib could not be found.
+ * @G_IREPOSITORY_ERROR_NAMESPACE_MISMATCH: the namespace does not match the
+ * requested namespace.
+ * @G_IREPOSITORY_ERROR_NAMESPACE_VERSION_CONFLICT: the version of the
+ * typelib does not match the requested version.
+ * @G_IREPOSITORY_ERROR_LIBRARY_NOT_FOUND: the library used by the typelib
+ * could not be found.
+ */
+typedef enum
+{
+  G_IREPOSITORY_ERROR_TYPELIB_NOT_FOUND,
+  G_IREPOSITORY_ERROR_NAMESPACE_MISMATCH,
+  G_IREPOSITORY_ERROR_NAMESPACE_VERSION_CONFLICT,
+  G_IREPOSITORY_ERROR_LIBRARY_NOT_FOUND
+} GIRepositoryError;
+
+#define G_IREPOSITORY_ERROR (g_irepository_error_quark ())
+
+GQuark g_irepository_error_quark (void);
+
+
+/* Global utility functions */
+
+void gi_cclosure_marshal_generic (GClosure       *closure,
+                                  GValue         *return_gvalue,
+                                  guint           n_param_values,
+                                  const GValue   *param_values,
+                                  gpointer        invocation_hint,
+                                  gpointer        marshal_data);
+
+G_END_DECLS
+
+
+#endif  /* __G_IREPOSITORY_H__ */
+
diff --git a/girepository/girffi.c b/girepository/girffi.c
new file mode 100644 (file)
index 0000000..1140061
--- /dev/null
@@ -0,0 +1,463 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Helper functions for ffi integration
+ *
+ * Copyright (C) 2008 Red Hat, Inc
+ * Copyright (C) 2005 Matthias Clasen
+ *
+ * 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 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.
+ */
+
+#include "config.h"
+
+#include <sys/types.h>
+
+#include <errno.h>
+#include <string.h>
+#include <unistd.h>
+#include "girffi.h"
+#include "girepository.h"
+#include "girepository-private.h"
+
+static ffi_type *
+gi_type_tag_get_ffi_type_internal (GITypeTag   tag,
+                                   gboolean    is_pointer,
+                                  gboolean    is_enum)
+{
+  switch (tag)
+    {
+    case GI_TYPE_TAG_BOOLEAN:
+      return &ffi_type_uint;
+    case GI_TYPE_TAG_INT8:
+      return &ffi_type_sint8;
+    case GI_TYPE_TAG_UINT8:
+      return &ffi_type_uint8;
+    case GI_TYPE_TAG_INT16:
+      return &ffi_type_sint16;
+    case GI_TYPE_TAG_UINT16:
+      return &ffi_type_uint16;
+    case GI_TYPE_TAG_INT32:
+      return &ffi_type_sint32;
+    case GI_TYPE_TAG_UINT32:
+    case GI_TYPE_TAG_UNICHAR:
+      return &ffi_type_uint32;
+    case GI_TYPE_TAG_INT64:
+      return &ffi_type_sint64;
+    case GI_TYPE_TAG_UINT64:
+      return &ffi_type_uint64;
+    case GI_TYPE_TAG_GTYPE:
+#if GLIB_SIZEOF_SIZE_T == 4
+      return &ffi_type_uint32;
+#elif GLIB_SIZEOF_SIZE_T == 8
+      return &ffi_type_uint64;
+#else
+#  error "Unexpected size for size_t: not 4 or 8"
+#endif
+    case GI_TYPE_TAG_FLOAT:
+      return &ffi_type_float;
+    case GI_TYPE_TAG_DOUBLE:
+      return &ffi_type_double;
+    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:
+    case GI_TYPE_TAG_ERROR:
+      return &ffi_type_pointer;
+    case GI_TYPE_TAG_INTERFACE:
+      {
+       /* We need to handle enums specially:
+        * https://bugzilla.gnome.org/show_bug.cgi?id=665150
+        */
+        if (!is_enum)
+          return &ffi_type_pointer;
+       else
+         return &ffi_type_sint32;
+      }
+    case GI_TYPE_TAG_VOID:
+      if (is_pointer)
+        return &ffi_type_pointer;
+      else
+        return &ffi_type_void;
+    }
+
+  g_assert_not_reached ();
+
+  return NULL;
+}
+
+/**
+ * gi_type_tag_get_ffi_type:
+ * @tag: A #GITypeTag
+ * @is_pointer: Whether or not this is a pointer type
+ *
+ * Returns: A #ffi_type corresponding to the platform default C ABI for @tag and @is_pointer.
+ */
+ffi_type *
+gi_type_tag_get_ffi_type (GITypeTag   tag,
+                         gboolean    is_pointer)
+{
+  return gi_type_tag_get_ffi_type_internal (tag, is_pointer, FALSE);
+}
+
+/**
+ * g_type_info_get_ffi_type:
+ * @info: A #GITypeInfo
+ *
+ * Returns: A #ffi_type corresponding to the platform default C ABI for @info.
+ */
+ffi_type *
+g_type_info_get_ffi_type (GITypeInfo *info)
+{
+  gboolean is_enum = FALSE;
+  GIBaseInfo *iinfo;
+
+  if (g_type_info_get_tag (info) == GI_TYPE_TAG_INTERFACE)
+    {
+      iinfo = g_type_info_get_interface (info);
+      switch (g_base_info_get_type (iinfo))
+        {
+        case GI_INFO_TYPE_ENUM:
+        case GI_INFO_TYPE_FLAGS:
+          is_enum = TRUE;
+          break;
+        default:
+          break;
+        }
+      g_base_info_unref (iinfo);
+    }
+
+  return gi_type_tag_get_ffi_type_internal (g_type_info_get_tag (info), g_type_info_is_pointer (info), is_enum);
+}
+
+/**
+ * g_callable_info_get_ffi_arg_types:
+ * @callable_info: a callable info from a typelib
+ *
+ * Return value: an array of ffi_type*. The array itself
+ * should be freed using g_free() after use.
+ */
+static ffi_type **
+g_callable_info_get_ffi_arg_types (GICallableInfo *callable_info)
+{
+    ffi_type **arg_types;
+    gint n_args, i;
+
+    g_return_val_if_fail (callable_info != NULL, NULL);
+
+    n_args = g_callable_info_get_n_args (callable_info);
+
+    arg_types = (ffi_type **) g_new0 (ffi_type *, n_args + 1);
+
+    for (i = 0; i < n_args; ++i)
+      {
+        GIArgInfo *arg_info = g_callable_info_get_arg (callable_info, i);
+        GITypeInfo *arg_type = g_arg_info_get_type (arg_info);
+        switch (g_arg_info_get_direction (arg_info))
+          {
+            case GI_DIRECTION_IN:
+              arg_types[i] = g_type_info_get_ffi_type (arg_type);
+              break;
+            case GI_DIRECTION_OUT:
+            case GI_DIRECTION_INOUT:
+              arg_types[i] = &ffi_type_pointer;
+              break;
+            default:
+              g_assert_not_reached ();
+          }
+        g_base_info_unref ((GIBaseInfo *)arg_info);
+        g_base_info_unref ((GIBaseInfo *)arg_type);
+      }
+    arg_types[n_args] = NULL;
+
+    return arg_types;
+}
+
+/**
+ * g_callable_info_get_ffi_return_type:
+ * @callable_info: a callable info from a typelib
+ *
+ * Fetches the ffi_type for a corresponding return value of
+ * a #GICallableInfo
+ * Return value: the ffi_type for the return value
+ */
+static ffi_type *
+g_callable_info_get_ffi_return_type (GICallableInfo *callable_info)
+{
+  GITypeInfo *return_type;
+  ffi_type *return_ffi_type;
+
+  g_return_val_if_fail (callable_info != NULL, NULL);
+
+  return_type = g_callable_info_get_return_type (callable_info);
+  return_ffi_type = g_type_info_get_ffi_type (return_type);
+  g_base_info_unref((GIBaseInfo*)return_type);
+
+  return return_ffi_type;
+}
+
+/**
+ * g_function_info_prep_invoker:
+ * @info: A #GIFunctionInfo
+ * @invoker: Output invoker structure
+ * @error: A #GError
+ *
+ * Initialize the caller-allocated @invoker structure with a cache
+ * of information needed to invoke the C function corresponding to
+ * @info with the platform's default ABI.
+ *
+ * A primary intent of this function is that a dynamic structure allocated
+ * by a language binding could contain a #GIFunctionInvoker structure
+ * inside the binding's function mapping.
+ *
+ * Returns: %TRUE on success, %FALSE otherwise with @error set.
+ */
+gboolean
+g_function_info_prep_invoker (GIFunctionInfo       *info,
+                              GIFunctionInvoker    *invoker,
+                              GError              **error)
+{
+  const char *symbol;
+  gpointer addr;
+
+  g_return_val_if_fail (info != NULL, FALSE);
+  g_return_val_if_fail (invoker != NULL, FALSE);
+
+  symbol = g_function_info_get_symbol ((GIFunctionInfo*) info);
+
+  if (!g_typelib_symbol (g_base_info_get_typelib((GIBaseInfo *) info),
+                         symbol, &addr))
+    {
+      g_set_error (error,
+                   G_INVOKE_ERROR,
+                   G_INVOKE_ERROR_SYMBOL_NOT_FOUND,
+                   "Could not locate %s: %s", symbol, g_module_error ());
+
+      return FALSE;
+    }
+
+  return g_function_invoker_new_for_address (addr, info, invoker, error);
+}
+
+/**
+ * g_function_invoker_new_for_address:
+ * @addr: The address
+ * @info: A #GICallableInfo
+ * @invoker: Output invoker structure
+ * @error: A #GError
+ *
+ * Initialize the caller-allocated @invoker structure with a cache
+ * of information needed to invoke the C function corresponding to
+ * @info with the platform's default ABI.
+ *
+ * A primary intent of this function is that a dynamic structure allocated
+ * by a language binding could contain a #GIFunctionInvoker structure
+ * inside the binding's function mapping.
+ *
+ * Returns: %TRUE on success, %FALSE otherwise with @error set.
+ */
+gboolean
+g_function_invoker_new_for_address (gpointer           addr,
+                                    GICallableInfo    *info,
+                                    GIFunctionInvoker *invoker,
+                                    GError           **error)
+{
+  ffi_type *rtype;
+  ffi_type **atypes;
+  GITypeInfo *tinfo;
+  GIArgInfo *ainfo;
+  GIInfoType info_type;
+  gboolean is_method;
+  gboolean throws;
+  gint n_args, n_invoke_args, i;
+
+  g_return_val_if_fail (info != NULL, FALSE);
+  g_return_val_if_fail (invoker != NULL, FALSE);
+
+  invoker->native_address = addr;
+
+  info_type = g_base_info_get_type ((GIBaseInfo *) info);
+
+  switch (info_type)
+    {
+    case GI_INFO_TYPE_FUNCTION:
+      {
+        GIFunctionInfoFlags flags;
+        flags = g_function_info_get_flags ((GIFunctionInfo *)info);
+        is_method = (flags & GI_FUNCTION_IS_METHOD) != 0;
+        throws = (flags & GI_FUNCTION_THROWS) != 0;
+      }
+      break;
+    case GI_INFO_TYPE_VFUNC:
+      {
+        GIVFuncInfoFlags flags;
+        flags = g_vfunc_info_get_flags ((GIVFuncInfo *)info);
+        throws = (flags & GI_VFUNC_THROWS) != 0;
+      }
+      is_method = TRUE;
+      break;
+    case GI_INFO_TYPE_CALLBACK:
+      is_method = TRUE;
+      throws = FALSE;
+      break;
+    default:
+      g_assert_not_reached ();
+    }
+
+  tinfo = g_callable_info_get_return_type (info);
+  rtype = g_type_info_get_ffi_type (tinfo);
+  g_base_info_unref ((GIBaseInfo *)tinfo);
+
+  n_args = g_callable_info_get_n_args (info);
+  if (is_method)
+    n_invoke_args = n_args+1;
+  else
+    n_invoke_args = n_args;
+
+  if (throws)
+    /* Add an argument for the GError */
+    n_invoke_args ++;
+
+  /* TODO: avoid malloc here? */
+  atypes = g_malloc0 (sizeof (ffi_type*) * n_invoke_args);
+
+  if (is_method)
+    {
+      atypes[0] = &ffi_type_pointer;
+    }
+  for (i = 0; i < n_args; i++)
+    {
+      int offset = (is_method ? 1 : 0);
+      ainfo = g_callable_info_get_arg (info, i);
+      switch (g_arg_info_get_direction (ainfo))
+        {
+          case GI_DIRECTION_IN:
+            tinfo = g_arg_info_get_type (ainfo);
+            atypes[i+offset] = g_type_info_get_ffi_type (tinfo);
+            g_base_info_unref ((GIBaseInfo *)tinfo);
+            break;
+          case GI_DIRECTION_OUT:
+          case GI_DIRECTION_INOUT:
+            atypes[i+offset] = &ffi_type_pointer;
+           break;
+          default:
+            g_assert_not_reached ();
+        }
+      g_base_info_unref ((GIBaseInfo *)ainfo);
+    }
+
+  if (throws)
+    {
+      atypes[n_invoke_args - 1] = &ffi_type_pointer;
+    }
+
+  return ffi_prep_cif (&(invoker->cif), FFI_DEFAULT_ABI, n_invoke_args, rtype, atypes) == FFI_OK;
+}
+
+/**
+ * g_function_info_invoker_destroy:
+ * @invoker: A #GIFunctionInvoker
+ *
+ * Release all resources allocated for the internals of @invoker; callers
+ * are responsible for freeing any resources allocated for the structure
+ * itself however.
+ */
+void
+g_function_invoker_destroy (GIFunctionInvoker    *invoker)
+{
+  g_free (invoker->cif.arg_types);
+}
+
+typedef struct {
+  ffi_closure ffi_closure;
+  gpointer writable_self;
+} GIClosureWrapper;
+
+/**
+ * g_callable_info_prepare_closure:
+ * @callable_info: a callable info from a typelib
+ * @cif: a ffi_cif structure
+ * @callback: the ffi callback
+ * @user_data: data to be passed into the callback
+ *
+ * Prepares a callback for ffi invocation.
+ *
+ * Return value: the ffi_closure or NULL on error.
+ * The return value should be freed by calling g_callable_info_free_closure().
+ */
+ffi_closure *
+g_callable_info_prepare_closure (GICallableInfo       *callable_info,
+                                 ffi_cif              *cif,
+                                 GIFFIClosureCallback  callback,
+                                 gpointer              user_data)
+{
+  gpointer exec_ptr;
+  GIClosureWrapper *closure;
+  ffi_status status;
+
+  g_return_val_if_fail (callable_info != NULL, FALSE);
+  g_return_val_if_fail (cif != NULL, FALSE);
+  g_return_val_if_fail (callback != NULL, FALSE);
+
+  closure = ffi_closure_alloc (sizeof (GIClosureWrapper), &exec_ptr);
+  if (!closure)
+    {
+      g_warning ("could not allocate closure\n");
+      return NULL;
+    }
+  closure->writable_self = closure;
+
+  status = ffi_prep_cif (cif, FFI_DEFAULT_ABI,
+                         g_callable_info_get_n_args (callable_info),
+                         g_callable_info_get_ffi_return_type (callable_info),
+                         g_callable_info_get_ffi_arg_types (callable_info));
+  if (status != FFI_OK)
+    {
+      g_warning ("ffi_prep_cif failed: %d\n", status);
+      ffi_closure_free (closure);
+      return NULL;
+    }
+
+  status = ffi_prep_closure_loc (&closure->ffi_closure, cif, callback, user_data, exec_ptr);
+  if (status != FFI_OK)
+    {
+      g_warning ("ffi_prep_closure failed: %d\n", status);
+      ffi_closure_free (closure);
+      return NULL;
+    }
+
+  /* Return exec_ptr, which points to the same underlying memory as
+   * closure, but via an executable-non-writable mapping.
+   */
+  return exec_ptr;
+}
+
+/**
+ * g_callable_info_free_closure:
+ * @callable_info: a callable info from a typelib
+ * @closure: ffi closure
+ *
+ * Frees a ffi_closure returned from g_callable_info_prepare_closure()
+ */
+void
+g_callable_info_free_closure (GICallableInfo *callable_info,
+                              ffi_closure    *closure)
+{
+  GIClosureWrapper *wrapper = (GIClosureWrapper *)closure;
+
+  g_free (wrapper->ffi_closure.cif->arg_types);
+  ffi_closure_free (wrapper->writable_self);
+}
diff --git a/girepository/girffi.h b/girepository/girffi.h
new file mode 100644 (file)
index 0000000..56caff7
--- /dev/null
@@ -0,0 +1,80 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Helper functions for ffi integration
+ *
+ * Copyright (C) 2008 Red Hat, Inc
+ *
+ * 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 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.
+ */
+
+#ifndef __GIRFFI_H__
+#define __GIRFFI_H__
+
+#include <ffi.h>
+#include "girepository.h"
+
+G_BEGIN_DECLS
+
+typedef void (*GIFFIClosureCallback) (ffi_cif *,
+                                      void *,
+                                      void **,
+                                      void *);
+
+/**
+ * GIFunctionInvoker:
+ * @cif: the cif
+ * @native_address: the native adress
+ */
+typedef struct _GIFunctionInvoker GIFunctionInvoker;
+
+struct _GIFunctionInvoker {
+  ffi_cif cif;
+  gpointer native_address;
+  /* <private> */
+  gpointer padding[3];
+};
+
+typedef GIArgument GIFFIReturnValue;
+
+ffi_type *    gi_type_tag_get_ffi_type            (GITypeTag type_tag, gboolean is_pointer);
+
+ffi_type *    g_type_info_get_ffi_type            (GITypeInfo           *info);
+
+void          gi_type_info_extract_ffi_return_value (GITypeInfo                  *return_info,
+                                                     GIFFIReturnValue            *ffi_value,
+                                                     GIArgument                  *arg);
+
+gboolean      g_function_info_prep_invoker        (GIFunctionInfo       *info,
+                                                   GIFunctionInvoker    *invoker,
+                                                   GError              **error);
+
+gboolean      g_function_invoker_new_for_address  (gpointer              addr,
+                                                   GICallableInfo       *info,
+                                                   GIFunctionInvoker    *invoker,
+                                                   GError              **error);
+
+void          g_function_invoker_destroy          (GIFunctionInvoker    *invoker);
+
+
+ffi_closure * g_callable_info_prepare_closure     (GICallableInfo       *callable_info,
+                                                   ffi_cif              *cif,
+                                                   GIFFIClosureCallback  callback,
+                                                   gpointer              user_data);
+void          g_callable_info_free_closure        (GICallableInfo       *callable_info,
+                                                   ffi_closure          *closure);
+
+G_END_DECLS
+
+#endif /* __GIRFFI_H__ */
diff --git a/girepository/girmodule.c b/girepository/girmodule.c
new file mode 100644 (file)
index 0000000..af71f36
--- /dev/null
@@ -0,0 +1,561 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Typelib creation
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ *
+ * 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 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.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include "girmodule.h"
+#include "gitypelib-internal.h"
+#include "girnode.h"
+
+#define ALIGN_VALUE(this, boundary) \
+  (( ((unsigned long)(this)) + (((unsigned long)(boundary)) -1)) & (~(((unsigned long)(boundary))-1)))
+
+#define NUM_SECTIONS 2
+
+GIrModule *
+_g_ir_module_new (const gchar *name,
+                 const gchar *version,
+                 const gchar *shared_library,
+                 const gchar *c_prefix)
+{
+  GIrModule *module;
+
+  module = g_slice_new0 (GIrModule);
+
+  module->name = g_strdup (name);
+  module->version = g_strdup (version);
+  if (shared_library)
+      module->shared_library = g_strdup (shared_library);
+  else
+      module->shared_library = NULL;
+  module->c_prefix = g_strdup (c_prefix);
+  module->dependencies = NULL;
+  module->entries = NULL;
+
+  module->include_modules = NULL;
+  module->aliases = NULL;
+
+  return module;
+}
+
+void
+_g_ir_module_free (GIrModule *module)
+{
+  GList *e;
+
+  g_free (module->name);
+
+  for (e = module->entries; e; e = e->next)
+    _g_ir_node_free ((GIrNode *)e->data);
+
+  g_list_free (module->entries);
+  /* Don't free dependencies, we inherit that from the parser */
+
+  g_list_free (module->include_modules);
+
+  g_hash_table_destroy (module->aliases);
+  g_hash_table_destroy (module->disguised_structures);
+
+  g_slice_free (GIrModule, module);
+}
+
+/**
+ * _g_ir_module_fatal:
+ * @build: Current build
+ * @line: Origin line number, or 0 if unknown
+ * @msg: printf-format string
+ * @args: Remaining arguments
+ *
+ * Report a fatal error, then exit.
+ */
+void
+_g_ir_module_fatal (GIrTypelibBuild  *build,
+                   guint       line,
+                   const char *msg,
+                   ...)
+{
+  GString *context;
+  char *formatted;
+  GList *link;
+
+  va_list args;
+
+  va_start (args, msg);
+
+  formatted = g_strdup_vprintf (msg, args);
+
+  context = g_string_new ("");
+  if (line > 0)
+    g_string_append_printf (context, "%d: ", line);
+  if (build->stack)
+    g_string_append (context, "In ");
+  for (link = g_list_last (build->stack); link; link = link->prev)
+    {
+      GIrNode *node = link->data;
+      const char *name = node->name;
+      if (name)
+       g_string_append (context, name);
+      if (link->prev)
+       g_string_append (context, ".");
+    }
+  if (build->stack)
+    g_string_append (context, ": ");
+
+  g_printerr ("%s-%s.gir:%serror: %s\n", build->module->name, 
+             build->module->version,
+             context->str, formatted);
+  g_string_free (context, TRUE);
+
+  exit (1);
+
+  va_end (args);
+}
+
+static void
+add_alias_foreach (gpointer key,
+                  gpointer value,
+                  gpointer data)
+{
+  GIrModule *module = data;
+
+  g_hash_table_replace (module->aliases, g_strdup (key), g_strdup (value));
+}
+
+static void
+add_disguised_structure_foreach (gpointer key,
+                                gpointer value,
+                                gpointer data)
+{
+  GIrModule *module = data;
+
+  g_hash_table_replace (module->disguised_structures, g_strdup (key), value);
+}
+
+void
+_g_ir_module_add_include_module (GIrModule  *module,
+                                GIrModule  *include_module)
+{
+  module->include_modules = g_list_prepend (module->include_modules,
+                                           include_module);
+
+  g_hash_table_foreach (include_module->aliases,
+                       add_alias_foreach,
+                       module);
+
+  g_hash_table_foreach (include_module->disguised_structures,
+                       add_disguised_structure_foreach,
+                       module);
+}
+
+struct AttributeWriteData
+{
+  guint count;
+  guchar *databuf;
+  GIrNode *node;
+  GHashTable *strings;
+  guint32 *offset;
+  guint32 *offset2;
+};
+
+static void
+write_attribute (gpointer key, gpointer value, gpointer datap)
+{
+  struct AttributeWriteData *data = datap;
+  guint32 old_offset = *(data->offset);
+  AttributeBlob *blob = (AttributeBlob*)&(data->databuf[old_offset]);
+
+  *(data->offset) += sizeof (AttributeBlob);
+
+  blob->offset = data->node->offset;
+  blob->name = _g_ir_write_string ((const char*) key, data->strings, data->databuf, data->offset2);
+  blob->value = _g_ir_write_string ((const char*) value, data->strings, data->databuf, data->offset2);
+
+  data->count++;
+}
+
+static guint
+write_attributes (GIrModule *module,
+                   GIrNode   *node,
+                   GHashTable *strings,
+                   guchar    *data,
+                   guint32   *offset,
+                   guint32   *offset2)
+{
+  struct AttributeWriteData wdata;
+  wdata.count = 0;
+  wdata.databuf = data;
+  wdata.node = node;
+  wdata.offset = offset;
+  wdata.offset2 = offset2;
+  wdata.strings = strings;
+
+  g_hash_table_foreach (node->attributes, write_attribute, &wdata);
+
+  return wdata.count;
+}
+
+static gint
+node_cmp_offset_func (gconstpointer a,
+                      gconstpointer b)
+{
+  const GIrNode *na = a;
+  const GIrNode *nb = b;
+  return na->offset - nb->offset;
+}
+
+static void
+alloc_section (guint8 *data, SectionType section_id, guint32 offset)
+{
+  int i;
+  Header *header = (Header*)data;
+  Section *section_data = (Section*)&data[header->sections];
+
+  g_assert (section_id != GI_SECTION_END);
+
+  for (i = 0; i < NUM_SECTIONS; i++)
+    {
+      if (section_data->id == GI_SECTION_END)
+       {
+         section_data->id = section_id;
+         section_data->offset = offset;
+         return;
+       }
+      section_data++;
+    }
+  g_assert_not_reached ();
+}
+
+static guint8*
+add_directory_index_section (guint8 *data, GIrModule *module, guint32 *offset2)
+{
+  DirEntry *entry;
+  Header *header = (Header*)data;
+  GITypelibHashBuilder *dirindex_builder;
+  guint i, n_interfaces;
+  guint16 required_size;
+  guint32 new_offset;
+
+  dirindex_builder = _gi_typelib_hash_builder_new ();
+
+  n_interfaces = ((Header *)data)->n_local_entries;
+
+  for (i = 0; i < n_interfaces; i++)
+    {
+      entry = (DirEntry *)&data[header->directory + (i * header->entry_blob_size)];
+      const char *str = (const char *) (&data[entry->name]);
+      _gi_typelib_hash_builder_add_string (dirindex_builder, str, i);
+    }
+
+  if (!_gi_typelib_hash_builder_prepare (dirindex_builder))
+    {
+      /* This happens if CMPH couldn't create a perfect hash.  So
+       * we just punt and leave no directory index section.
+       */
+      _gi_typelib_hash_builder_destroy (dirindex_builder);
+      return data;
+    }
+
+  alloc_section (data, GI_SECTION_DIRECTORY_INDEX, *offset2);
+
+  required_size = _gi_typelib_hash_builder_get_buffer_size (dirindex_builder);
+
+  new_offset = *offset2 + ALIGN_VALUE (required_size, 4);
+
+  data = g_realloc (data, new_offset);
+
+  _gi_typelib_hash_builder_pack (dirindex_builder, ((guint8*)data) + *offset2, required_size);
+
+  *offset2 = new_offset;
+
+  _gi_typelib_hash_builder_destroy (dirindex_builder);
+  return data;
+}
+
+GITypelib *
+_g_ir_module_build_typelib (GIrModule  *module)
+{
+  GError *error = NULL;
+  GITypelib *typelib;
+  gsize length;
+  guint i;
+  GList *e;
+  Header *header;
+  DirEntry *entry;
+  guint32 header_size;
+  guint32 dir_size;
+  guint32 n_entries;
+  guint32 n_local_entries;
+  guint32 size, offset, offset2, old_offset;
+  GHashTable *strings;
+  GHashTable *types;
+  GList *nodes_with_attributes;
+  char *dependencies;
+  guchar *data;
+  Section *section;
+
+  header_size = ALIGN_VALUE (sizeof (Header), 4);
+  n_local_entries = g_list_length (module->entries);
+
+  /* Serialize dependencies into one string; this is convenient
+   * and not a major change to the typelib format. */
+  {
+    GString *dependencies_str = g_string_new ("");
+    GList *link;
+    for (link = module->dependencies; link; link = link->next)
+      {
+       const char *dependency = link->data;
+       if (!strcmp (dependency, module->name))
+         continue;
+       g_string_append (dependencies_str, dependency);
+       if (link->next)
+         g_string_append_c (dependencies_str, '|');
+      }
+    dependencies = g_string_free (dependencies_str, FALSE);
+    if (!dependencies[0])
+      {
+       g_free (dependencies);
+       dependencies = NULL;
+      }
+  }
+
+ restart:
+  _g_irnode_init_stats ();
+  strings = g_hash_table_new (g_str_hash, g_str_equal);
+  types = g_hash_table_new (g_str_hash, g_str_equal);
+  nodes_with_attributes = NULL;
+  n_entries = g_list_length (module->entries);
+
+  g_message ("%d entries (%d local), %d dependencies\n", n_entries, n_local_entries,
+            g_list_length (module->dependencies));
+
+  dir_size = n_entries * sizeof (DirEntry);
+  size = header_size + dir_size;
+
+  size += ALIGN_VALUE (strlen (module->name) + 1, 4);
+
+  for (e = module->entries; e; e = e->next)
+    {
+      GIrNode *node = e->data;
+
+      size += _g_ir_node_get_full_size (node);
+
+      /* Also reset the offset here */
+      node->offset = 0;
+    }
+
+  /* Adjust size for strings allocated in header below specially */
+  size += ALIGN_VALUE (strlen (module->name) + 1, 4);
+  if (module->shared_library)
+    size += ALIGN_VALUE (strlen (module->shared_library) + 1, 4);
+  if (dependencies != NULL)
+    size += ALIGN_VALUE (strlen (dependencies) + 1, 4);
+  if (module->c_prefix != NULL)
+    size += ALIGN_VALUE (strlen (module->c_prefix) + 1, 4);
+
+  size += sizeof (Section) * NUM_SECTIONS;
+
+  g_message ("allocating %d bytes (%d header, %d directory, %d entries)\n",
+         size, header_size, dir_size, size - header_size - dir_size);
+
+  data = g_malloc0 (size);
+
+  /* fill in header */
+  header = (Header *)data;
+  memcpy (header, G_IR_MAGIC, 16);
+  header->major_version = 4;
+  header->minor_version = 0;
+  header->reserved = 0;
+  header->n_entries = n_entries;
+  header->n_local_entries = n_local_entries;
+  header->n_attributes = 0;
+  header->attributes = 0; /* filled in later */
+  /* NOTE: When writing strings to the typelib here, you should also update
+   * the size calculations above.
+   */
+  if (dependencies != NULL)
+    header->dependencies = _g_ir_write_string (dependencies, strings, data, &header_size);
+  else
+    header->dependencies = 0;
+  header->size = 0; /* filled in later */
+  header->namespace = _g_ir_write_string (module->name, strings, data, &header_size);
+  header->nsversion = _g_ir_write_string (module->version, strings, data, &header_size);
+  header->shared_library = (module->shared_library?
+                             _g_ir_write_string (module->shared_library, strings, data, &header_size)
+                             : 0);
+  if (module->c_prefix != NULL)
+    header->c_prefix = _g_ir_write_string (module->c_prefix, strings, data, &header_size);
+  else
+    header->c_prefix = 0;
+  header->entry_blob_size = sizeof (DirEntry);
+  header->function_blob_size = sizeof (FunctionBlob);
+  header->callback_blob_size = sizeof (CallbackBlob);
+  header->signal_blob_size = sizeof (SignalBlob);
+  header->vfunc_blob_size = sizeof (VFuncBlob);
+  header->arg_blob_size = sizeof (ArgBlob);
+  header->property_blob_size = sizeof (PropertyBlob);
+  header->field_blob_size = sizeof (FieldBlob);
+  header->value_blob_size = sizeof (ValueBlob);
+  header->constant_blob_size = sizeof (ConstantBlob);
+  header->error_domain_blob_size = 16; /* No longer used */
+  header->attribute_blob_size = sizeof (AttributeBlob);
+  header->signature_blob_size = sizeof (SignatureBlob);
+  header->enum_blob_size = sizeof (EnumBlob);
+  header->struct_blob_size = sizeof (StructBlob);
+  header->object_blob_size = sizeof(ObjectBlob);
+  header->interface_blob_size = sizeof (InterfaceBlob);
+  header->union_blob_size = sizeof (UnionBlob);
+
+  offset2 = ALIGN_VALUE (header_size, 4);
+  header->sections = offset2;
+
+  /* Initialize all the sections to _END/0; we fill them in later using
+   * alloc_section().  (Right now there's just the directory index
+   * though, note)
+   */
+  for (i = 0; i < NUM_SECTIONS; i++)
+    {
+      section = (Section*) &data[offset2];
+      section->id = GI_SECTION_END;
+      section->offset = 0;
+      offset2 += sizeof(Section);
+    }
+  header->directory = offset2;
+
+  /* fill in directory and content */
+  entry = (DirEntry *)&data[header->directory];
+
+  offset2 += dir_size;
+
+  for (e = module->entries, i = 0; e; e = e->next, i++)
+    {
+      GIrTypelibBuild build;
+      GIrNode *node = e->data;
+
+      if (strchr (node->name, '.'))
+        {
+         g_error ("Names may not contain '.'");
+       }
+
+      /* we picked up implicit xref nodes, start over */
+      if (i == n_entries)
+       {
+         GList *link;
+         g_message ("Found implicit cross references, starting over");
+
+         g_hash_table_destroy (strings);
+         g_hash_table_destroy (types);
+
+         /* Reset the cached offsets */
+         for (link = nodes_with_attributes; link; link = link->next)
+           ((GIrNode *) link->data)->offset = 0;
+
+         g_list_free (nodes_with_attributes);
+         strings = NULL;
+
+         g_free (data);
+         data = NULL;
+
+         goto restart;
+       }
+
+      offset = offset2;
+
+      if (node->type == G_IR_NODE_XREF)
+       {
+         const char *namespace = ((GIrNodeXRef*)node)->namespace;
+
+         entry->blob_type = 0;
+         entry->local = FALSE;
+         entry->offset = _g_ir_write_string (namespace, strings, data, &offset2);
+         entry->name = _g_ir_write_string (node->name, strings, data, &offset2);
+       }
+      else
+       {
+         old_offset = offset;
+         offset2 = offset + _g_ir_node_get_size (node);
+
+         entry->blob_type = node->type;
+         entry->local = TRUE;
+         entry->offset = offset;
+         entry->name = _g_ir_write_string (node->name, strings, data, &offset2);
+
+         memset (&build, 0, sizeof (build));
+         build.module = module;
+         build.strings = strings;
+         build.types = types;
+         build.nodes_with_attributes = nodes_with_attributes;
+         build.n_attributes = header->n_attributes;
+         build.data = data;
+         _g_ir_node_build_typelib (node, NULL, &build, &offset, &offset2);
+
+         nodes_with_attributes = build.nodes_with_attributes;
+         header->n_attributes = build.n_attributes;
+
+         if (offset2 > old_offset + _g_ir_node_get_full_size (node))
+           g_error ("left a hole of %d bytes\n", offset2 - old_offset - _g_ir_node_get_full_size (node));
+       }
+
+      entry++;
+    }
+
+  /* GIBaseInfo expects the AttributeBlob array to be sorted on the field (offset) */
+  nodes_with_attributes = g_list_sort (nodes_with_attributes, node_cmp_offset_func);
+
+  g_message ("header: %d entries, %d attributes", header->n_entries, header->n_attributes);
+
+  _g_irnode_dump_stats ();
+
+  /* Write attributes after the blobs */
+  offset = offset2;
+  header->attributes = offset;
+  offset2 = offset + header->n_attributes * header->attribute_blob_size;
+
+  for (e = nodes_with_attributes; e; e = e->next)
+    {
+      GIrNode *node = e->data;
+      write_attributes (module, node, strings, data, &offset, &offset2);
+    }
+
+  g_message ("reallocating to %d bytes", offset2);
+
+  data = g_realloc (data, offset2);
+  header = (Header*) data;
+
+  data = add_directory_index_section (data, module, &offset2);
+  header = (Header *)data;
+
+  length = header->size = offset2;
+  typelib = g_typelib_new_from_memory (data, length, &error);
+  if (!typelib)
+    {
+      g_error ("error building typelib: %s",
+              error->message);
+    }
+
+  g_hash_table_destroy (strings);
+  g_hash_table_destroy (types);
+  g_list_free (nodes_with_attributes);
+
+  return typelib;
+}
+
diff --git a/girepository/girmodule.h b/girepository/girmodule.h
new file mode 100644 (file)
index 0000000..7837f2c
--- /dev/null
@@ -0,0 +1,81 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Parsed IDL
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ *
+ * 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 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.
+ */
+
+#ifndef __G_IR_MODULE_H__
+#define __G_IR_MODULE_H__
+
+#include <glib.h>
+#include "gitypelib-internal.h"
+
+G_BEGIN_DECLS
+
+typedef struct _GIrTypelibBuild GIrTypelibBuild;
+typedef struct _GIrModule GIrModule;
+
+struct _GIrTypelibBuild {
+  GIrModule  *module;
+  GHashTable  *strings;
+  GHashTable  *types;
+  GList       *nodes_with_attributes;
+  guint32      n_attributes;
+  guchar      *data;
+  GList       *stack; 
+};
+
+struct _GIrModule
+{
+  gchar *name;
+  gchar *version;
+  gchar *shared_library;
+  gchar *c_prefix;
+  GList *dependencies;
+  GList *entries;
+
+  /* All modules that are included directly or indirectly */
+  GList *include_modules;
+
+  /* Aliases defined in the module or in included modules */
+  GHashTable *aliases;
+
+  /* Structures with the 'disguised' flag (typedef struct _X *X)
+  * in the module or in included modules */
+  GHashTable *disguised_structures;
+};
+
+GIrModule *_g_ir_module_new            (const gchar *name,
+                                       const gchar *nsversion,
+                                       const gchar *module_filename,
+                                       const gchar *c_prefix);
+void       _g_ir_module_free           (GIrModule  *module);
+
+void       _g_ir_module_add_include_module (GIrModule  *module,
+                                          GIrModule  *include_module);
+
+GITypelib * _g_ir_module_build_typelib  (GIrModule  *module);
+
+void       _g_ir_module_fatal (GIrTypelibBuild  *build, guint line, const char *msg, ...) G_GNUC_PRINTF (3, 4) G_GNUC_NORETURN;
+
+void _g_irnode_init_stats (void);
+void _g_irnode_dump_stats (void);
+
+G_END_DECLS
+
+#endif  /* __G_IR_MODULE_H__ */
diff --git a/girepository/girnode.c b/girepository/girnode.c
new file mode 100644 (file)
index 0000000..881aa9b
--- /dev/null
@@ -0,0 +1,2340 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Typelib creation
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "girmodule.h"
+#include "girnode.h"
+#include "gitypelib-internal.h"
+
+static gulong string_count = 0;
+static gulong unique_string_count = 0;
+static gulong string_size = 0;
+static gulong unique_string_size = 0;
+static gulong types_count = 0;
+static gulong unique_types_count = 0;
+
+void
+_g_irnode_init_stats (void)
+{
+  string_count = 0;
+  unique_string_count = 0;
+  string_size = 0;
+  unique_string_size = 0;
+  types_count = 0;
+  unique_types_count = 0;
+}
+
+void
+_g_irnode_dump_stats (void)
+{
+  g_message ("%lu strings (%lu before sharing), %lu bytes (%lu before sharing)",
+            unique_string_count, string_count, unique_string_size, string_size);
+  g_message ("%lu types (%lu before sharing)", unique_types_count, types_count);
+}
+
+#define DO_ALIGNED_COPY(dest_addr, value, type) \
+do {                                            \
+       type tmp_var;                           \
+       tmp_var = value;                        \
+       memcpy(dest_addr, &tmp_var, sizeof(type));      \
+} while(0)
+
+#define ALIGN_VALUE(this, boundary) \
+  (( ((unsigned long)(this)) + (((unsigned long)(boundary)) -1)) & (~(((unsigned long)(boundary))-1)))
+
+
+const gchar *
+_g_ir_node_type_to_string (GIrNodeTypeId type)
+{
+  switch (type)
+    {
+    case G_IR_NODE_FUNCTION:
+      return "function";
+    case G_IR_NODE_CALLBACK:
+      return "callback";
+    case G_IR_NODE_PARAM:
+      return "param";
+    case G_IR_NODE_TYPE:
+      return "type";
+    case G_IR_NODE_OBJECT:
+      return "object";
+    case G_IR_NODE_INTERFACE:
+      return "interface";
+    case G_IR_NODE_SIGNAL:
+      return "signal";
+    case G_IR_NODE_PROPERTY:
+      return "property";
+    case G_IR_NODE_VFUNC:
+      return "vfunc";
+    case G_IR_NODE_FIELD:
+      return "field";
+    case G_IR_NODE_ENUM:
+      return "enum";
+    case G_IR_NODE_FLAGS:
+      return "flags";
+    case G_IR_NODE_BOXED:
+      return "boxed";
+    case G_IR_NODE_STRUCT:
+      return "struct";
+    case G_IR_NODE_VALUE:
+      return "value";
+    case G_IR_NODE_CONSTANT:
+      return "constant";
+    case G_IR_NODE_XREF:
+      return "xref";
+    case G_IR_NODE_UNION:
+      return "union";
+    default:
+      return "unknown";
+    }
+}
+
+GIrNode *
+_g_ir_node_new (GIrNodeTypeId  type,
+              GIrModule     *module)
+{
+  GIrNode *node = NULL;
+
+  switch (type)
+    {
+   case G_IR_NODE_FUNCTION:
+   case G_IR_NODE_CALLBACK:
+      node = g_malloc0 (sizeof (GIrNodeFunction));
+      break;
+
+   case G_IR_NODE_PARAM:
+      node = g_malloc0 (sizeof (GIrNodeParam));
+      break;
+
+   case G_IR_NODE_TYPE:
+      node = g_malloc0 (sizeof (GIrNodeType));
+      break;
+
+    case G_IR_NODE_OBJECT:
+    case G_IR_NODE_INTERFACE:
+      node = g_malloc0 (sizeof (GIrNodeInterface));
+      break;
+
+    case G_IR_NODE_SIGNAL:
+      node = g_malloc0 (sizeof (GIrNodeSignal));
+      break;
+
+    case G_IR_NODE_PROPERTY:
+      node = g_malloc0 (sizeof (GIrNodeProperty));
+      break;
+
+    case G_IR_NODE_VFUNC:
+      node = g_malloc0 (sizeof (GIrNodeFunction));
+      break;
+
+    case G_IR_NODE_FIELD:
+      node = g_malloc0 (sizeof (GIrNodeField));
+      break;
+
+    case G_IR_NODE_ENUM:
+    case G_IR_NODE_FLAGS:
+      node = g_malloc0 (sizeof (GIrNodeEnum));
+      break;
+
+    case G_IR_NODE_BOXED:
+      node = g_malloc0 (sizeof (GIrNodeBoxed));
+      break;
+
+    case G_IR_NODE_STRUCT:
+      node = g_malloc0 (sizeof (GIrNodeStruct));
+      break;
+
+    case G_IR_NODE_VALUE:
+      node = g_malloc0 (sizeof (GIrNodeValue));
+      break;
+
+    case G_IR_NODE_CONSTANT:
+      node = g_malloc0 (sizeof (GIrNodeConstant));
+      break;
+
+    case G_IR_NODE_XREF:
+      node = g_malloc0 (sizeof (GIrNodeXRef));
+      break;
+
+    case G_IR_NODE_UNION:
+      node = g_malloc0 (sizeof (GIrNodeUnion));
+      break;
+
+    default:
+      g_error ("Unhandled node type %d\n", type);
+      break;
+    }
+
+  node->type = type;
+  node->module = module;
+  node->offset = 0;
+  node->attributes = g_hash_table_new_full (g_str_hash, g_str_equal,
+                                            g_free, g_free);
+
+  return node;
+}
+
+void
+_g_ir_node_free (GIrNode *node)
+{
+  GList *l;
+
+  if (node == NULL)
+    return;
+
+  switch (node->type)
+    {
+    case G_IR_NODE_FUNCTION:
+    case G_IR_NODE_CALLBACK:
+      {
+       GIrNodeFunction *function = (GIrNodeFunction *)node;
+
+       g_free (node->name);
+       g_free (function->symbol);
+       _g_ir_node_free ((GIrNode *)function->result);
+       for (l = function->parameters; l; l = l->next)
+         _g_ir_node_free ((GIrNode *)l->data);
+       g_list_free (function->parameters);
+      }
+      break;
+
+    case G_IR_NODE_TYPE:
+      {
+       GIrNodeType *type = (GIrNodeType *)node;
+
+       g_free (node->name);
+       _g_ir_node_free ((GIrNode *)type->parameter_type1);
+       _g_ir_node_free ((GIrNode *)type->parameter_type2);
+
+       g_free (type->interface);
+       g_strfreev (type->errors);
+
+      }
+      break;
+
+    case G_IR_NODE_PARAM:
+      {
+       GIrNodeParam *param = (GIrNodeParam *)node;
+
+       g_free (node->name);
+       _g_ir_node_free ((GIrNode *)param->type);
+      }
+      break;
+
+    case G_IR_NODE_PROPERTY:
+      {
+       GIrNodeProperty *property = (GIrNodeProperty *)node;
+
+       g_free (node->name);
+       _g_ir_node_free ((GIrNode *)property->type);
+      }
+      break;
+
+    case G_IR_NODE_SIGNAL:
+      {
+       GIrNodeSignal *signal = (GIrNodeSignal *)node;
+
+       g_free (node->name);
+       for (l = signal->parameters; l; l = l->next)
+         _g_ir_node_free ((GIrNode *)l->data);
+       g_list_free (signal->parameters);
+       _g_ir_node_free ((GIrNode *)signal->result);
+      }
+      break;
+
+    case G_IR_NODE_VFUNC:
+      {
+       GIrNodeVFunc *vfunc = (GIrNodeVFunc *)node;
+
+       g_free (node->name);
+       g_free (vfunc->invoker);
+       for (l = vfunc->parameters; l; l = l->next)
+         _g_ir_node_free ((GIrNode *)l->data);
+       g_list_free (vfunc->parameters);
+       _g_ir_node_free ((GIrNode *)vfunc->result);
+      }
+      break;
+
+    case G_IR_NODE_FIELD:
+      {
+       GIrNodeField *field = (GIrNodeField *)node;
+
+       g_free (node->name);
+       _g_ir_node_free ((GIrNode *)field->type);
+       _g_ir_node_free ((GIrNode *)field->callback);
+      }
+      break;
+
+    case G_IR_NODE_OBJECT:
+    case G_IR_NODE_INTERFACE:
+      {
+       GIrNodeInterface *iface = (GIrNodeInterface *)node;
+
+       g_free (node->name);
+       g_free (iface->gtype_name);
+       g_free (iface->gtype_init);
+       g_free (iface->ref_func);
+       g_free (iface->unref_func);
+       g_free (iface->set_value_func);
+       g_free (iface->get_value_func);
+
+
+       g_free (iface->glib_type_struct);
+       g_free (iface->parent);
+
+       for (l = iface->interfaces; l; l = l->next)
+         g_free ((GIrNode *)l->data);
+       g_list_free (iface->interfaces);
+
+       for (l = iface->members; l; l = l->next)
+         _g_ir_node_free ((GIrNode *)l->data);
+       g_list_free (iface->members);
+
+      }
+      break;
+
+    case G_IR_NODE_VALUE:
+      {
+       g_free (node->name);
+      }
+      break;
+
+    case G_IR_NODE_ENUM:
+    case G_IR_NODE_FLAGS:
+      {
+       GIrNodeEnum *enum_ = (GIrNodeEnum *)node;
+
+       g_free (node->name);
+       g_free (enum_->gtype_name);
+       g_free (enum_->gtype_init);
+       g_free (enum_->error_domain);
+
+       for (l = enum_->values; l; l = l->next)
+         _g_ir_node_free ((GIrNode *)l->data);
+       g_list_free (enum_->values);
+
+       for (l = enum_->methods; l; l = l->next)
+         _g_ir_node_free ((GIrNode *)l->data);
+       g_list_free (enum_->methods);
+      }
+      break;
+
+    case G_IR_NODE_BOXED:
+      {
+       GIrNodeBoxed *boxed = (GIrNodeBoxed *)node;
+
+       g_free (node->name);
+       g_free (boxed->gtype_name);
+       g_free (boxed->gtype_init);
+
+       for (l = boxed->members; l; l = l->next)
+         _g_ir_node_free ((GIrNode *)l->data);
+       g_list_free (boxed->members);
+      }
+      break;
+
+    case G_IR_NODE_STRUCT:
+      {
+       GIrNodeStruct *struct_ = (GIrNodeStruct *)node;
+
+       g_free (node->name);
+       g_free (struct_->gtype_name);
+       g_free (struct_->gtype_init);
+
+       for (l = struct_->members; l; l = l->next)
+         _g_ir_node_free ((GIrNode *)l->data);
+       g_list_free (struct_->members);
+      }
+      break;
+
+    case G_IR_NODE_CONSTANT:
+      {
+       GIrNodeConstant *constant = (GIrNodeConstant *)node;
+
+       g_free (node->name);
+       g_free (constant->value);
+       _g_ir_node_free ((GIrNode *)constant->type);
+      }
+      break;
+
+    case G_IR_NODE_XREF:
+      {
+       GIrNodeXRef *xref = (GIrNodeXRef *)node;
+
+       g_free (node->name);
+       g_free (xref->namespace);
+      }
+      break;
+
+    case G_IR_NODE_UNION:
+      {
+       GIrNodeUnion *union_ = (GIrNodeUnion *)node;
+
+       g_free (node->name);
+       g_free (union_->gtype_name);
+       g_free (union_->gtype_init);
+
+       _g_ir_node_free ((GIrNode *)union_->discriminator_type);
+       for (l = union_->members; l; l = l->next)
+         _g_ir_node_free ((GIrNode *)l->data);
+       for (l = union_->discriminators; l; l = l->next)
+         _g_ir_node_free ((GIrNode *)l->data);
+      }
+      break;
+
+    default:
+      g_error ("Unhandled node type %d\n", node->type);
+      break;
+    }
+
+  g_hash_table_destroy (node->attributes);
+
+  g_free (node);
+}
+
+/* returns the fixed size of the blob */
+guint32
+_g_ir_node_get_size (GIrNode *node)
+{
+  GList *l;
+  gint size, n;
+
+  switch (node->type)
+    {
+    case G_IR_NODE_CALLBACK:
+      size = sizeof (CallbackBlob);
+      break;
+
+    case G_IR_NODE_FUNCTION:
+      size = sizeof (FunctionBlob);
+      break;
+
+    case G_IR_NODE_PARAM:
+      /* See the comment in the G_IR_NODE_PARAM/ArgBlob writing below */
+      size = sizeof (ArgBlob) - sizeof (SimpleTypeBlob);
+      break;
+
+    case G_IR_NODE_TYPE:
+      size = sizeof (SimpleTypeBlob);
+      break;
+
+    case G_IR_NODE_OBJECT:
+      {
+       GIrNodeInterface *iface = (GIrNodeInterface *)node;
+
+       n = g_list_length (iface->interfaces);
+       size = sizeof (ObjectBlob) + 2 * (n + (n % 2));
+
+       for (l = iface->members; l; l = l->next)
+         size += _g_ir_node_get_size ((GIrNode *)l->data);
+      }
+      break;
+
+    case G_IR_NODE_INTERFACE:
+      {
+       GIrNodeInterface *iface = (GIrNodeInterface *)node;
+
+       n = g_list_length (iface->prerequisites);
+       size = sizeof (InterfaceBlob) + 2 * (n + (n % 2));
+
+       for (l = iface->members; l; l = l->next)
+         size += _g_ir_node_get_size ((GIrNode *)l->data);
+      }
+      break;
+
+    case G_IR_NODE_ENUM:
+    case G_IR_NODE_FLAGS:
+      {
+       GIrNodeEnum *enum_ = (GIrNodeEnum *)node;
+
+       size = sizeof (EnumBlob);
+       for (l = enum_->values; l; l = l->next)
+         size += _g_ir_node_get_size ((GIrNode *)l->data);
+       for (l = enum_->methods; l; l = l->next)
+         size += _g_ir_node_get_size ((GIrNode *)l->data);
+      }
+      break;
+
+    case G_IR_NODE_VALUE:
+      size = sizeof (ValueBlob);
+      break;
+
+    case G_IR_NODE_STRUCT:
+      {
+       GIrNodeStruct *struct_ = (GIrNodeStruct *)node;
+
+       size = sizeof (StructBlob);
+       for (l = struct_->members; l; l = l->next)
+         size += _g_ir_node_get_size ((GIrNode *)l->data);
+      }
+      break;
+
+    case G_IR_NODE_BOXED:
+      {
+       GIrNodeBoxed *boxed = (GIrNodeBoxed *)node;
+
+       size = sizeof (StructBlob);
+       for (l = boxed->members; l; l = l->next)
+         size += _g_ir_node_get_size ((GIrNode *)l->data);
+      }
+      break;
+
+    case G_IR_NODE_PROPERTY:
+      size = sizeof (PropertyBlob);
+      break;
+
+    case G_IR_NODE_SIGNAL:
+      size = sizeof (SignalBlob);
+      break;
+
+    case G_IR_NODE_VFUNC:
+      size = sizeof (VFuncBlob);
+      break;
+
+    case G_IR_NODE_FIELD:
+      {
+       GIrNodeField *field = (GIrNodeField *)node;
+
+        size = sizeof (FieldBlob);
+        if (field->callback)
+          size += _g_ir_node_get_size ((GIrNode *)field->callback);
+      }
+      break;
+
+    case G_IR_NODE_CONSTANT:
+      size = sizeof (ConstantBlob);
+      break;
+
+    case G_IR_NODE_XREF:
+      size = 0;
+      break;
+
+    case G_IR_NODE_UNION:
+      {
+       GIrNodeUnion *union_ = (GIrNodeUnion *)node;
+
+       size = sizeof (UnionBlob);
+       for (l = union_->members; l; l = l->next)
+         size += _g_ir_node_get_size ((GIrNode *)l->data);
+       for (l = union_->discriminators; l; l = l->next)
+         size += _g_ir_node_get_size ((GIrNode *)l->data);
+      }
+      break;
+
+    default:
+      g_error ("Unhandled node type '%s'\n",
+              _g_ir_node_type_to_string (node->type));
+      size = 0;
+    }
+
+  g_debug ("node %p type '%s' size %d", node,
+          _g_ir_node_type_to_string (node->type), size);
+
+  return size;
+}
+
+static void
+add_attribute_size (gpointer key, gpointer value, gpointer data)
+{
+  const gchar *key_str = key;
+  const gchar *value_str = value;
+  gint *size_p = data;
+
+  *size_p += sizeof (AttributeBlob);
+  *size_p += ALIGN_VALUE (strlen (key_str) + 1, 4);
+  *size_p += ALIGN_VALUE (strlen (value_str) + 1, 4);
+}
+
+/* returns the full size of the blob including variable-size parts (including attributes) */
+static guint32
+_g_ir_node_get_full_size_internal (GIrNode *parent,
+                                 GIrNode *node)
+{
+  GList *l;
+  gint size, n;
+
+  if (node == NULL && parent != NULL)
+    g_error ("Caught NULL node, parent=%s", parent->name);
+
+  g_debug ("node %p type '%s'", node,
+          _g_ir_node_type_to_string (node->type));
+
+  switch (node->type)
+    {
+    case G_IR_NODE_CALLBACK:
+      {
+       GIrNodeFunction *function = (GIrNodeFunction *)node;
+       size = sizeof (CallbackBlob);
+       size += ALIGN_VALUE (strlen (node->name) + 1, 4);
+       for (l = function->parameters; l; l = l->next)
+         {
+           size += _g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
+         }
+       size += _g_ir_node_get_full_size_internal (node, (GIrNode *)function->result);
+      }
+      break;
+
+    case G_IR_NODE_FUNCTION:
+      {
+       GIrNodeFunction *function = (GIrNodeFunction *)node;
+       size = sizeof (FunctionBlob);
+       size += ALIGN_VALUE (strlen (node->name) + 1, 4);
+       size += ALIGN_VALUE (strlen (function->symbol) + 1, 4);
+       for (l = function->parameters; l; l = l->next)
+         size += _g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
+       size += _g_ir_node_get_full_size_internal (node, (GIrNode *)function->result);
+      }
+      break;
+
+    case G_IR_NODE_PARAM:
+      {
+       GIrNodeParam *param = (GIrNodeParam *)node;
+
+       /* See the comment in the G_IR_NODE_PARAM/ArgBlob writing below */
+       size = sizeof (ArgBlob) - sizeof (SimpleTypeBlob);
+       if (node->name)
+         size += ALIGN_VALUE (strlen (node->name) + 1, 4);
+       size += _g_ir_node_get_full_size_internal (node, (GIrNode *)param->type);
+      }
+      break;
+
+    case G_IR_NODE_TYPE:
+      {
+       GIrNodeType *type = (GIrNodeType *)node;
+        size = sizeof (SimpleTypeBlob);
+        if (!G_TYPE_TAG_IS_BASIC(type->tag))
+         {
+           g_debug ("node %p type tag '%s'", node,
+                    g_type_tag_to_string (type->tag));
+
+           switch (type->tag)
+             {
+             case GI_TYPE_TAG_ARRAY:
+               size = sizeof (ArrayTypeBlob);
+               if (type->parameter_type1)
+                 size += _g_ir_node_get_full_size_internal (node, (GIrNode *)type->parameter_type1);
+               break;
+             case GI_TYPE_TAG_INTERFACE:
+               size += sizeof (InterfaceTypeBlob);
+               break;
+             case GI_TYPE_TAG_GLIST:
+             case GI_TYPE_TAG_GSLIST:
+               size += sizeof (ParamTypeBlob);
+               if (type->parameter_type1)
+                 size += _g_ir_node_get_full_size_internal (node, (GIrNode *)type->parameter_type1);
+               break;
+             case GI_TYPE_TAG_GHASH:
+               size += sizeof (ParamTypeBlob) * 2;
+               if (type->parameter_type1)
+                 size += _g_ir_node_get_full_size_internal (node, (GIrNode *)type->parameter_type1);
+               if (type->parameter_type2)
+                 size += _g_ir_node_get_full_size_internal (node, (GIrNode *)type->parameter_type2);
+               break;
+             case GI_TYPE_TAG_ERROR:
+               size += sizeof (ErrorTypeBlob);
+               break;
+             default:
+               g_error ("Unknown type tag %d\n", type->tag);
+               break;
+             }
+         }
+      }
+      break;
+
+    case G_IR_NODE_OBJECT:
+      {
+       GIrNodeInterface *iface = (GIrNodeInterface *)node;
+
+       n = g_list_length (iface->interfaces);
+       size = sizeof(ObjectBlob);
+       if (iface->parent)
+         size += ALIGN_VALUE (strlen (iface->parent) + 1, 4);
+        if (iface->glib_type_struct)
+          size += ALIGN_VALUE (strlen (iface->glib_type_struct) + 1, 4);
+       size += ALIGN_VALUE (strlen (node->name) + 1, 4);
+       size += ALIGN_VALUE (strlen (iface->gtype_name) + 1, 4);
+       if (iface->gtype_init)
+         size += ALIGN_VALUE (strlen (iface->gtype_init) + 1, 4);
+       if (iface->ref_func)
+         size += ALIGN_VALUE (strlen (iface->ref_func) + 1, 4);
+       if (iface->unref_func)
+         size += ALIGN_VALUE (strlen (iface->unref_func) + 1, 4);
+       if (iface->set_value_func)
+         size += ALIGN_VALUE (strlen (iface->set_value_func) + 1, 4);
+       if (iface->get_value_func)
+         size += ALIGN_VALUE (strlen (iface->get_value_func) + 1, 4);
+       size += 2 * (n + (n % 2));
+
+       for (l = iface->members; l; l = l->next)
+         size += _g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
+      }
+      break;
+
+    case G_IR_NODE_INTERFACE:
+      {
+       GIrNodeInterface *iface = (GIrNodeInterface *)node;
+
+       n = g_list_length (iface->prerequisites);
+       size = sizeof (InterfaceBlob);
+       size += ALIGN_VALUE (strlen (node->name) + 1, 4);
+       size += ALIGN_VALUE (strlen (iface->gtype_name) + 1, 4);
+       size += ALIGN_VALUE (strlen (iface->gtype_init) + 1, 4);
+       size += 2 * (n + (n % 2));
+
+       for (l = iface->members; l; l = l->next)
+         size += _g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
+      }
+      break;
+
+    case G_IR_NODE_ENUM:
+    case G_IR_NODE_FLAGS:
+      {
+       GIrNodeEnum *enum_ = (GIrNodeEnum *)node;
+
+       size = sizeof (EnumBlob);
+       size += ALIGN_VALUE (strlen (node->name) + 1, 4);
+       if (enum_->gtype_name)
+         {
+           size += ALIGN_VALUE (strlen (enum_->gtype_name) + 1, 4);
+           size += ALIGN_VALUE (strlen (enum_->gtype_init) + 1, 4);
+         }
+       if (enum_->error_domain)
+         size += ALIGN_VALUE (strlen (enum_->error_domain) + 1, 4);
+
+       for (l = enum_->values; l; l = l->next)
+         size += _g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
+       for (l = enum_->methods; l; l = l->next)
+         size += _g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
+      }
+      break;
+
+    case G_IR_NODE_VALUE:
+      {
+       size = sizeof (ValueBlob);
+       size += ALIGN_VALUE (strlen (node->name) + 1, 4);
+      }
+      break;
+
+    case G_IR_NODE_STRUCT:
+      {
+       GIrNodeStruct *struct_ = (GIrNodeStruct *)node;
+
+       size = sizeof (StructBlob);
+       size += ALIGN_VALUE (strlen (node->name) + 1, 4);
+       if (struct_->gtype_name)
+         size += ALIGN_VALUE (strlen (struct_->gtype_name) + 1, 4);
+       if (struct_->gtype_init)
+         size += ALIGN_VALUE (strlen (struct_->gtype_init) + 1, 4);
+       for (l = struct_->members; l; l = l->next)
+         size += _g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
+      }
+      break;
+
+    case G_IR_NODE_BOXED:
+      {
+       GIrNodeBoxed *boxed = (GIrNodeBoxed *)node;
+
+       size = sizeof (StructBlob);
+       size += ALIGN_VALUE (strlen (node->name) + 1, 4);
+       if (boxed->gtype_name)
+         {
+           size += ALIGN_VALUE (strlen (boxed->gtype_name) + 1, 4);
+           size += ALIGN_VALUE (strlen (boxed->gtype_init) + 1, 4);
+         }
+       for (l = boxed->members; l; l = l->next)
+         size += _g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
+      }
+      break;
+
+    case G_IR_NODE_PROPERTY:
+      {
+       GIrNodeProperty *prop = (GIrNodeProperty *)node;
+
+       size = sizeof (PropertyBlob);
+       size += ALIGN_VALUE (strlen (node->name) + 1, 4);
+       size += _g_ir_node_get_full_size_internal (node, (GIrNode *)prop->type);
+      }
+      break;
+
+    case G_IR_NODE_SIGNAL:
+      {
+       GIrNodeSignal *signal = (GIrNodeSignal *)node;
+
+       size = sizeof (SignalBlob);
+       size += ALIGN_VALUE (strlen (node->name) + 1, 4);
+       for (l = signal->parameters; l; l = l->next)
+         size += _g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
+       size += _g_ir_node_get_full_size_internal (node, (GIrNode *)signal->result);
+      }
+      break;
+
+    case G_IR_NODE_VFUNC:
+      {
+       GIrNodeVFunc *vfunc = (GIrNodeVFunc *)node;
+
+       size = sizeof (VFuncBlob);
+       size += ALIGN_VALUE (strlen (node->name) + 1, 4);
+       for (l = vfunc->parameters; l; l = l->next)
+         size += _g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
+       size += _g_ir_node_get_full_size_internal (node, (GIrNode *)vfunc->result);
+      }
+      break;
+
+    case G_IR_NODE_FIELD:
+      {
+       GIrNodeField *field = (GIrNodeField *)node;
+
+       size = sizeof (FieldBlob);
+       size += ALIGN_VALUE (strlen (node->name) + 1, 4);
+       if (field->callback)
+          size += _g_ir_node_get_full_size_internal (node, (GIrNode *)field->callback);
+       else
+          size += _g_ir_node_get_full_size_internal (node, (GIrNode *)field->type);
+      }
+      break;
+
+    case G_IR_NODE_CONSTANT:
+      {
+       GIrNodeConstant *constant = (GIrNodeConstant *)node;
+
+       size = sizeof (ConstantBlob);
+       size += ALIGN_VALUE (strlen (node->name) + 1, 4);
+       /* FIXME non-string values */
+       size += ALIGN_VALUE (strlen (constant->value) + 1, 4);
+       size += _g_ir_node_get_full_size_internal (node, (GIrNode *)constant->type);
+      }
+      break;
+
+    case G_IR_NODE_XREF:
+      {
+       GIrNodeXRef *xref = (GIrNodeXRef *)node;
+
+       size = 0;
+       size += ALIGN_VALUE (strlen (node->name) + 1, 4);
+       size += ALIGN_VALUE (strlen (xref->namespace) + 1, 4);
+      }
+      break;
+
+    case G_IR_NODE_UNION:
+      {
+       GIrNodeUnion *union_ = (GIrNodeUnion *)node;
+
+       size = sizeof (UnionBlob);
+       size += ALIGN_VALUE (strlen (node->name) + 1, 4);
+       if (union_->gtype_name)
+         size += ALIGN_VALUE (strlen (union_->gtype_name) + 1, 4);
+       if (union_->gtype_init)
+         size += ALIGN_VALUE (strlen (union_->gtype_init) + 1, 4);
+       for (l = union_->members; l; l = l->next)
+         size += _g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
+       for (l = union_->discriminators; l; l = l->next)
+         size += _g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
+      }
+      break;
+
+    default:
+      g_error ("Unknown type tag %d\n", node->type);
+      size = 0;
+    }
+
+  g_debug ("node %s%s%s%p type '%s' full size %d",
+          node->name ? "'" : "",
+          node->name ? node->name : "",
+          node->name ? "' " : "",
+          node, _g_ir_node_type_to_string (node->type), size);
+
+  g_hash_table_foreach (node->attributes, add_attribute_size, &size);
+
+  return size;
+}
+
+guint32
+_g_ir_node_get_full_size (GIrNode *node)
+{
+  return _g_ir_node_get_full_size_internal (NULL, node);
+}
+
+int
+_g_ir_node_cmp (GIrNode *node,
+               GIrNode *other)
+{
+  if (node->type < other->type)
+    return -1;
+  else if (node->type > other->type)
+    return 1;
+  else
+    return strcmp (node->name, other->name);
+}
+
+gboolean
+_g_ir_node_can_have_member (GIrNode    *node)
+{
+  switch (node->type)
+    {
+    case G_IR_NODE_OBJECT:
+    case G_IR_NODE_INTERFACE:
+    case G_IR_NODE_BOXED:
+    case G_IR_NODE_STRUCT:
+    case G_IR_NODE_UNION:
+      return TRUE;
+    /* list others individually rather than with default: so that compiler
+     * warns if new node types are added without adding them to the switch
+     */
+    case G_IR_NODE_INVALID:
+    case G_IR_NODE_FUNCTION:
+    case G_IR_NODE_CALLBACK:
+    case G_IR_NODE_ENUM:
+    case G_IR_NODE_FLAGS:
+    case G_IR_NODE_CONSTANT:
+    case G_IR_NODE_INVALID_0:
+    case G_IR_NODE_PARAM:
+    case G_IR_NODE_TYPE:
+    case G_IR_NODE_PROPERTY:
+    case G_IR_NODE_SIGNAL:
+    case G_IR_NODE_VALUE:
+    case G_IR_NODE_VFUNC:
+    case G_IR_NODE_FIELD:
+    case G_IR_NODE_XREF:
+      return FALSE;
+    };
+  return FALSE;
+}
+
+void
+_g_ir_node_add_member (GIrNode         *node,
+                     GIrNodeFunction *member)
+{
+  g_return_if_fail (node != NULL);
+  g_return_if_fail (member != NULL);
+
+  switch (node->type)
+    {
+    case G_IR_NODE_OBJECT:
+    case G_IR_NODE_INTERFACE:
+      {
+       GIrNodeInterface *iface = (GIrNodeInterface *)node;
+       iface->members =
+         g_list_insert_sorted (iface->members, member,
+                               (GCompareFunc) _g_ir_node_cmp);
+       break;
+      }
+    case G_IR_NODE_BOXED:
+      {
+       GIrNodeBoxed *boxed = (GIrNodeBoxed *)node;
+       boxed->members =
+         g_list_insert_sorted (boxed->members, member,
+                               (GCompareFunc) _g_ir_node_cmp);
+       break;
+      }
+    case G_IR_NODE_STRUCT:
+      {
+       GIrNodeStruct *struct_ = (GIrNodeStruct *)node;
+       struct_->members =
+         g_list_insert_sorted (struct_->members, member,
+                               (GCompareFunc) _g_ir_node_cmp);
+       break;
+      }
+    case G_IR_NODE_UNION:
+      {
+       GIrNodeUnion *union_ = (GIrNodeUnion *)node;
+       union_->members =
+         g_list_insert_sorted (union_->members, member,
+                               (GCompareFunc) _g_ir_node_cmp);
+       break;
+      }
+    default:
+      g_error ("Cannot add a member to unknown type tag type %d\n",
+              node->type);
+      break;
+    }
+}
+
+const gchar *
+_g_ir_node_param_direction_string (GIrNodeParam * node)
+{
+  if (node->out)
+    {
+      if (node->in)
+       return "in-out";
+      else
+       return "out";
+    }
+  return "in";
+}
+
+static gint64
+parse_int_value (const gchar *str)
+{
+  return strtoll (str, NULL, 0);
+}
+
+static guint64
+parse_uint_value (const gchar *str)
+{
+  return strtoull (str, NULL, 0);
+}
+
+static gdouble
+parse_float_value (const gchar *str)
+{
+  return strtod (str, NULL);
+}
+
+static gboolean
+parse_boolean_value (const gchar *str)
+{
+  if (strcmp (str, "TRUE") == 0)
+    return TRUE;
+
+  if (strcmp (str, "FALSE") == 0)
+    return FALSE;
+
+  return parse_int_value (str) ? TRUE : FALSE;
+}
+
+static GIrNode *
+find_entry_node (GIrTypelibBuild   *build,
+                const gchar *name,
+                guint16     *idx)
+
+{
+  GIrModule *module = build->module;
+  GList *l;
+  gint i;
+  gchar **names;
+  gint n_names;
+  GIrNode *result = NULL;
+
+  g_assert (name != NULL);
+  g_assert (strlen (name) > 0);
+
+  names = g_strsplit (name, ".", 0);
+  n_names = g_strv_length (names);
+  if (n_names > 2)
+    g_error ("Too many name parts");
+
+  for (l = module->entries, i = 1; l; l = l->next, i++)
+    {
+      GIrNode *node = (GIrNode *)l->data;
+
+      if (n_names > 1)
+       {
+         if (node->type != G_IR_NODE_XREF)
+           continue;
+
+         if (((GIrNodeXRef *)node)->namespace == NULL ||
+             strcmp (((GIrNodeXRef *)node)->namespace, names[0]) != 0)
+           continue;
+       }
+
+      if (strcmp (node->name, names[n_names - 1]) == 0)
+       {
+         if (idx)
+           *idx = i;
+
+         result = node;
+         goto out;
+       }
+    }
+
+  if (n_names > 1)
+    {
+      GIrNode *node = _g_ir_node_new (G_IR_NODE_XREF, module);
+
+      ((GIrNodeXRef *)node)->namespace = g_strdup (names[0]);
+      node->name = g_strdup (names[1]);
+
+      module->entries = g_list_append (module->entries, node);
+
+      if (idx)
+       *idx = g_list_length (module->entries);
+
+      result = node;
+
+      g_debug ("Creating XREF: %s %s", names[0], names[1]);
+
+      goto out;
+    }
+
+  
+  _g_ir_module_fatal (build, -1, "type reference '%s' not found",
+                     name);
+ out:
+
+  g_strfreev (names);
+
+  return result;
+}
+
+static guint16
+find_entry (GIrTypelibBuild   *build,
+           const gchar *name)
+{
+  guint16 idx = 0;
+
+  find_entry_node (build, name, &idx);
+
+  return idx;
+}
+
+static GIrModule *
+find_namespace (GIrModule  *module,
+               const char *name)
+{
+  GIrModule *target;
+  GList *l;
+  
+  if (strcmp (module->name, name) == 0)
+    return module;
+
+  for (l = module->include_modules; l; l = l->next)
+    {
+      GIrModule *submodule = l->data;
+
+     if (strcmp (submodule->name, name) == 0)
+       return submodule;
+
+      target = find_namespace (submodule, name);
+      if (target)
+       return target;
+    }
+  return NULL;
+}
+
+GIrNode *
+_g_ir_find_node (GIrTypelibBuild  *build,
+               GIrModule        *src_module,
+               const char       *name)
+{
+  GList *l;
+  GIrNode *return_node = NULL;
+  char **names = g_strsplit (name, ".", 0);
+  gint n_names = g_strv_length (names);
+  const char *target_name;
+  GIrModule *target_module;
+
+  if (n_names == 1)
+    {
+      target_module = src_module;
+      target_name = name;
+    }
+  else
+    {
+      target_module = find_namespace (build->module, names[0]);
+      target_name = names[1];
+    }
+
+  for (l = target_module->entries; l; l = l->next)
+    {
+      GIrNode *node = (GIrNode *)l->data;
+
+      if (strcmp (node->name, target_name) == 0)
+       {
+         return_node = node;
+         break;
+       }
+    }
+
+  g_strfreev (names);
+
+  return return_node;
+}
+
+static int
+get_index_of_member_type (GIrNodeInterface *node,
+                          GIrNodeTypeId type,
+                          const char *name)
+{
+  guint index = -1;
+  GList *l;
+
+  for (l = node->members; l; l = l->next)
+    {
+      GIrNode *node = l->data;
+
+      if (node->type != type)
+        continue;
+
+      index++;
+
+      if (strcmp (node->name, name) == 0)
+        break;
+    }
+
+  return index;
+}
+
+static void
+serialize_type (GIrTypelibBuild    *build,
+               GIrNodeType  *node,
+               GString      *str)
+{
+  gint i;
+
+  if (G_TYPE_TAG_IS_BASIC(node->tag))
+    {
+      g_string_append_printf (str, "%s%s", g_type_tag_to_string (node->tag),
+                             node->is_pointer ? "*" : "");
+    }
+  else if (node->tag == GI_TYPE_TAG_ARRAY)
+    {
+      if (node->array_type == GI_ARRAY_TYPE_C)
+       {
+         serialize_type (build, node->parameter_type1, str);
+         g_string_append (str, "[");
+
+         if (node->has_length)
+           g_string_append_printf (str, "length=%d", node->length);
+         else if (node->has_size)
+           g_string_append_printf (str, "fixed-size=%d", node->size);
+
+         if (node->zero_terminated)
+           g_string_append_printf (str, "%szero-terminated=1",
+                                   node->has_length ? "," : "");
+
+         g_string_append (str, "]");
+         if (node->is_pointer)
+           g_string_append (str, "*");
+       }
+      else if (node->array_type == GI_ARRAY_TYPE_BYTE_ARRAY)
+       {
+         /* We on purpose skip serializing parameter_type1, which should
+            always be void*
+         */
+         g_string_append (str, "GByteArray");
+       }
+      else
+       {
+         if (node->array_type == GI_ARRAY_TYPE_ARRAY)
+           g_string_append (str, "GArray");
+         else
+           g_string_append (str, "GPtrArray");
+         if (node->parameter_type1)
+           {
+             g_string_append (str, "<");
+             serialize_type (build, node->parameter_type1, str);
+             g_string_append (str, ">");
+           }
+       }
+    }
+  else if (node->tag == GI_TYPE_TAG_INTERFACE)
+    {
+      GIrNode *iface;
+      gchar *name;
+
+      iface = find_entry_node (build, node->interface, NULL);
+      if (iface)
+        {
+          if (iface->type == G_IR_NODE_XREF)
+            g_string_append_printf (str, "%s.", ((GIrNodeXRef *)iface)->namespace);
+          name = iface->name;
+        }
+      else
+       {
+         g_warning ("Interface for type reference %s not found", node->interface);
+         name = node->interface;
+       }
+
+      g_string_append_printf (str, "%s%s", name,
+                             node->is_pointer ? "*" : "");
+    }
+  else if (node->tag == GI_TYPE_TAG_GLIST)
+    {
+      g_string_append (str, "GList");
+      if (node->parameter_type1)
+       {
+         g_string_append (str, "<");
+         serialize_type (build, node->parameter_type1, str);
+         g_string_append (str, ">");
+       }
+    }
+  else if (node->tag == GI_TYPE_TAG_GSLIST)
+    {
+      g_string_append (str, "GSList");
+      if (node->parameter_type1)
+       {
+         g_string_append (str, "<");
+         serialize_type (build, node->parameter_type1, str);
+         g_string_append (str, ">");
+       }
+    }
+  else if (node->tag == GI_TYPE_TAG_GHASH)
+    {
+      g_string_append (str, "GHashTable");
+      if (node->parameter_type1)
+       {
+         g_string_append (str, "<");
+         serialize_type (build, node->parameter_type1, str);
+         g_string_append (str, ",");
+         serialize_type (build, node->parameter_type2, str);
+         g_string_append (str, ">");
+       }
+    }
+  else if (node->tag == GI_TYPE_TAG_ERROR)
+    {
+      g_string_append (str, "GError");
+      if (node->errors)
+       {
+         g_string_append (str, "<");
+         for (i = 0; node->errors[i]; i++)
+           {
+             if (i > 0)
+               g_string_append (str, ",");
+             g_string_append (str, node->errors[i]);
+           }
+         g_string_append (str, ">");
+       }
+    }
+}
+
+static void
+_g_ir_node_build_members (GList         **members,
+                        GIrNodeTypeId   type,
+                        guint16        *count,
+                        GIrNode        *parent,
+                         GIrTypelibBuild *build,
+                        guint32        *offset,
+                        guint32        *offset2)
+{
+  GList *l = *members;
+
+  while (l)
+    {
+      GIrNode *member = (GIrNode *)l->data;
+      GList *next = l->next;
+
+      if (member->type == type)
+       {
+         (*count)++;
+         _g_ir_node_build_typelib (member, parent, build, offset, offset2);
+         *members = g_list_delete_link (*members, l);
+       }
+      l = next;
+    }
+}
+
+static void
+_g_ir_node_check_unhandled_members (GList         **members,
+                                   GIrNodeTypeId   container_type)
+{
+#if 0
+  if (*members)
+    {
+      GList *l;
+
+      for (l = *members; l; l = l->next)
+       {
+         GIrNode *member = (GIrNode *)l->data;
+         g_printerr ("Unhandled '%s' member '%s' type '%s'\n",
+                     _g_ir_node_type_to_string (container_type),
+                     member->name,
+                     _g_ir_node_type_to_string (member->type));
+       }
+
+      g_list_free (*members);
+      *members = NULL;
+
+      g_error ("Unhandled members. Aborting.");
+    }
+#else
+  g_list_free (*members);
+  *members = NULL;
+#endif
+}
+
+void
+_g_ir_node_build_typelib (GIrNode         *node,
+                         GIrNode         *parent,
+                         GIrTypelibBuild *build,
+                         guint32         *offset,
+                         guint32         *offset2)
+{
+  gboolean appended_stack;
+  GHashTable *strings = build->strings;
+  GHashTable *types = build->types;
+  guchar *data = build->data;
+  GList *l;
+  guint32 old_offset = *offset;
+  guint32 old_offset2 = *offset2;
+
+  g_assert (node != NULL);
+
+  g_debug ("build_typelib: %s%s(%s)",
+          node->name ? node->name : "",
+          node->name ? " " : "",
+          _g_ir_node_type_to_string (node->type));
+
+  if (build->stack)
+    appended_stack = node != (GIrNode*)build->stack->data; 
+  else
+    appended_stack = TRUE;
+  if (appended_stack)
+    build->stack = g_list_prepend (build->stack, node);
+  
+  _g_ir_node_compute_offsets (build, node);
+
+  /* We should only be building each node once.  If we do a typelib expansion, we also
+   * reset the offset in girmodule.c.
+   */
+  g_assert (node->offset == 0);
+  node->offset = *offset;
+  build->nodes_with_attributes = g_list_prepend (build->nodes_with_attributes, node);
+
+  build->n_attributes += g_hash_table_size (node->attributes);
+
+  switch (node->type)
+    {
+    case G_IR_NODE_TYPE:
+      {
+       GIrNodeType *type = (GIrNodeType *)node;
+       SimpleTypeBlob *blob = (SimpleTypeBlob *)&data[*offset];
+
+       *offset += sizeof (SimpleTypeBlob);
+
+       if (G_TYPE_TAG_IS_BASIC (type->tag))
+         {
+           blob->flags.reserved = 0;
+           blob->flags.reserved2 = 0;
+           blob->flags.pointer = type->is_pointer;
+           blob->flags.reserved3 = 0;
+           blob->flags.tag = type->tag;
+         }
+       else
+         {
+           GString *str;
+           gchar *s;
+           gpointer value;
+
+           str = g_string_new (0);
+           serialize_type (build, type, str);
+           s = g_string_free (str, FALSE);
+
+           types_count += 1;
+           value = g_hash_table_lookup (types, s);
+           if (value)
+             {
+               blob->offset = GPOINTER_TO_UINT (value);
+               g_free (s);
+             }
+           else
+             {
+               unique_types_count += 1;
+               g_hash_table_insert (types, s, GUINT_TO_POINTER(*offset2));
+
+               blob->offset = *offset2;
+               switch (type->tag)
+                 {
+                 case GI_TYPE_TAG_ARRAY:
+                   {
+                     ArrayTypeBlob *array = (ArrayTypeBlob *)&data[*offset2];
+                     guint32 pos;
+
+                     array->pointer = type->is_pointer;
+                     array->reserved = 0;
+                     array->tag = type->tag;
+                     array->zero_terminated = type->zero_terminated;
+                     array->has_length = type->has_length;
+                      array->has_size = type->has_size;
+                      array->array_type = type->array_type;
+                     array->reserved2 = 0;
+                      if (array->has_length)
+                        array->dimensions.length = type->length;
+                      else if (array->has_size)
+                        array->dimensions.size  = type->size;
+                      else
+                        array->dimensions.length = -1;
+
+                     pos = *offset2 + G_STRUCT_OFFSET (ArrayTypeBlob, type);
+                     *offset2 += sizeof (ArrayTypeBlob);
+
+                     _g_ir_node_build_typelib ((GIrNode *)type->parameter_type1,
+                                              node, build, &pos, offset2);
+                   }
+                   break;
+
+                 case GI_TYPE_TAG_INTERFACE:
+                   {
+                     InterfaceTypeBlob *iface = (InterfaceTypeBlob *)&data[*offset2];
+                     *offset2 += sizeof (InterfaceTypeBlob);
+
+                     iface->pointer = type->is_pointer;
+                     iface->reserved = 0;
+                     iface->tag = type->tag;
+                     iface->reserved2 = 0;
+                     iface->interface = find_entry (build, type->interface);
+
+                   }
+                   break;
+
+                 case GI_TYPE_TAG_GLIST:
+                 case GI_TYPE_TAG_GSLIST:
+                   {
+                     ParamTypeBlob *param = (ParamTypeBlob *)&data[*offset2];
+                     guint32 pos;
+
+                     param->pointer = 1;
+                     param->reserved = 0;
+                     param->tag = type->tag;
+                     param->reserved2 = 0;
+                     param->n_types = 1;
+
+                     pos = *offset2 + G_STRUCT_OFFSET (ParamTypeBlob, type);
+                     *offset2 += sizeof (ParamTypeBlob) + sizeof (SimpleTypeBlob);
+
+                     _g_ir_node_build_typelib ((GIrNode *)type->parameter_type1,
+                                              node, build, &pos, offset2);
+                   }
+                   break;
+
+                 case GI_TYPE_TAG_GHASH:
+                   {
+                     ParamTypeBlob *param = (ParamTypeBlob *)&data[*offset2];
+                     guint32 pos;
+
+                     param->pointer = 1;
+                     param->reserved = 0;
+                     param->tag = type->tag;
+                     param->reserved2 = 0;
+                     param->n_types = 2;
+
+                     pos = *offset2 + G_STRUCT_OFFSET (ParamTypeBlob, type);
+                     *offset2 += sizeof (ParamTypeBlob) + sizeof (SimpleTypeBlob)*2;
+
+                     _g_ir_node_build_typelib ((GIrNode *)type->parameter_type1,
+                                              node, build, &pos, offset2);
+                     _g_ir_node_build_typelib ((GIrNode *)type->parameter_type2,
+                                              node, build, &pos, offset2);
+                   }
+                   break;
+
+                 case GI_TYPE_TAG_ERROR:
+                   {
+                     ErrorTypeBlob *blob = (ErrorTypeBlob *)&data[*offset2];
+
+                     blob->pointer = 1;
+                     blob->reserved = 0;
+                     blob->tag = type->tag;
+                     blob->reserved2 = 0;
+                     blob->n_domains = 0;
+
+                     *offset2 += sizeof (ErrorTypeBlob);
+                   }
+                   break;
+
+                 default:
+                   g_error ("Unknown type tag %d\n", type->tag);
+                   break;
+                 }
+             }
+         }
+      }
+      break;
+
+    case G_IR_NODE_FIELD:
+      {
+       GIrNodeField *field = (GIrNodeField *)node;
+       FieldBlob *blob;
+
+       blob = (FieldBlob *)&data[*offset];
+
+       blob->name = _g_ir_write_string (node->name, strings, data, offset2);
+       blob->readable = field->readable;
+       blob->writable = field->writable;
+       blob->reserved = 0;
+       blob->bits = 0;
+       if (field->offset >= 0)
+         blob->struct_offset = field->offset;
+       else
+         blob->struct_offset = 0xFFFF; /* mark as unknown */
+
+        if (field->callback)
+          {
+            blob->has_embedded_type = TRUE;
+            blob->type.offset = GI_INFO_TYPE_CALLBACK;
+           *offset += sizeof (FieldBlob);
+            _g_ir_node_build_typelib ((GIrNode *)field->callback,
+                                    node, build, offset, offset2);
+          }
+        else
+          {
+            blob->has_embedded_type = FALSE;
+            /* We handle the size member specially below, so subtract it */
+           *offset += sizeof (FieldBlob) - sizeof (SimpleTypeBlob);
+            _g_ir_node_build_typelib ((GIrNode *)field->type,
+                                    node, build, offset, offset2);
+          }
+      }
+      break;
+
+    case G_IR_NODE_PROPERTY:
+      {
+       GIrNodeProperty *prop = (GIrNodeProperty *)node;
+       PropertyBlob *blob = (PropertyBlob *)&data[*offset];
+        /* We handle the size member specially below, so subtract it */
+       *offset += sizeof (PropertyBlob) - sizeof (SimpleTypeBlob);
+
+       blob->name = _g_ir_write_string (node->name, strings, data, offset2);
+       blob->deprecated = prop->deprecated;
+       blob->readable = prop->readable;
+       blob->writable = prop->writable;
+       blob->construct = prop->construct;
+       blob->construct_only = prop->construct_only;
+       blob->transfer_ownership = prop->transfer;
+       blob->transfer_container_ownership = prop->shallow_transfer;
+       blob->reserved = 0;
+
+        _g_ir_node_build_typelib ((GIrNode *)prop->type,
+                                node, build, offset, offset2);
+      }
+      break;
+
+    case G_IR_NODE_FUNCTION:
+      {
+       FunctionBlob *blob = (FunctionBlob *)&data[*offset];
+       SignatureBlob *blob2 = (SignatureBlob *)&data[*offset2];
+       GIrNodeFunction *function = (GIrNodeFunction *)node;
+       guint32 signature;
+       gint n;
+
+       signature = *offset2;
+       n = g_list_length (function->parameters);
+
+       *offset += sizeof (FunctionBlob);
+       *offset2 += sizeof (SignatureBlob) + n * sizeof (ArgBlob);
+
+       blob->blob_type = BLOB_TYPE_FUNCTION;
+       blob->deprecated = function->deprecated;
+        blob->is_static = !function->is_method;
+       blob->setter = function->is_setter;
+       blob->getter = function->is_getter;
+       blob->constructor = function->is_constructor;
+       blob->wraps_vfunc = function->wraps_vfunc;
+       blob->throws = function->throws;
+       blob->index = 0;
+       blob->name = _g_ir_write_string (node->name, strings, data, offset2);
+       blob->symbol = _g_ir_write_string (function->symbol, strings, data, offset2);
+       blob->signature = signature;
+
+        /* function->result is special since it doesn't appear in the serialized format but
+         * we do want the attributes for it to appear
+         */
+        build->nodes_with_attributes = g_list_prepend (build->nodes_with_attributes, function->result);
+        build->n_attributes += g_hash_table_size (((GIrNode *) function->result)->attributes);
+        g_assert (((GIrNode *) function->result)->offset == 0);
+        ((GIrNode *) function->result)->offset = signature;
+
+       g_debug ("building function '%s'", function->symbol);
+
+        _g_ir_node_build_typelib ((GIrNode *)function->result->type,
+                                node, build, &signature, offset2);
+
+       blob2->may_return_null = function->result->allow_none;
+       blob2->caller_owns_return_value = function->result->transfer;
+       blob2->caller_owns_return_container = function->result->shallow_transfer;
+       blob2->skip_return = function->result->skip;
+       blob2->reserved = 0;
+       blob2->n_arguments = n;
+
+       signature += 4;
+
+       for (l = function->parameters; l; l = l->next)
+         {
+           GIrNode *param = (GIrNode *)l->data;
+
+           _g_ir_node_build_typelib (param, node, build, &signature, offset2);
+         }
+
+      }
+      break;
+
+    case G_IR_NODE_CALLBACK:
+      {
+       CallbackBlob *blob = (CallbackBlob *)&data[*offset];
+       SignatureBlob *blob2 = (SignatureBlob *)&data[*offset2];
+       GIrNodeFunction *function = (GIrNodeFunction *)node;
+       guint32 signature;
+       gint n;
+
+       signature = *offset2;
+       n = g_list_length (function->parameters);
+
+       *offset += sizeof (CallbackBlob);
+       *offset2 += sizeof (SignatureBlob) + n * sizeof (ArgBlob);
+
+       blob->blob_type = BLOB_TYPE_CALLBACK;
+       blob->deprecated = function->deprecated;
+       blob->reserved = 0;
+       blob->name = _g_ir_write_string (node->name, strings, data, offset2);
+       blob->signature = signature;
+
+        _g_ir_node_build_typelib ((GIrNode *)function->result->type,
+                                node, build, &signature, offset2);
+
+       blob2->may_return_null = function->result->allow_none;
+       blob2->caller_owns_return_value = function->result->transfer;
+       blob2->caller_owns_return_container = function->result->shallow_transfer;
+       blob2->reserved = 0;
+       blob2->n_arguments = n;
+
+       signature += 4;
+
+       for (l = function->parameters; l; l = l->next)
+         {
+           GIrNode *param = (GIrNode *)l->data;
+
+           _g_ir_node_build_typelib (param, node, build, &signature, offset2);
+         }
+      }
+      break;
+
+    case G_IR_NODE_SIGNAL:
+      {
+       SignalBlob *blob = (SignalBlob *)&data[*offset];
+       SignatureBlob *blob2 = (SignatureBlob *)&data[*offset2];
+       GIrNodeSignal *signal = (GIrNodeSignal *)node;
+       guint32 signature;
+       gint n;
+
+       signature = *offset2;
+       n = g_list_length (signal->parameters);
+
+       *offset += sizeof (SignalBlob);
+       *offset2 += sizeof (SignatureBlob) + n * sizeof (ArgBlob);
+
+       blob->deprecated = signal->deprecated;
+       blob->run_first = signal->run_first;
+       blob->run_last = signal->run_last;
+       blob->run_cleanup = signal->run_cleanup;
+       blob->no_recurse = signal->no_recurse;
+       blob->detailed = signal->detailed;
+       blob->action = signal->action;
+       blob->no_hooks = signal->no_hooks;
+       blob->has_class_closure = 0; /* FIXME */
+       blob->true_stops_emit = 0; /* FIXME */
+       blob->reserved = 0;
+       blob->class_closure = 0; /* FIXME */
+       blob->name = _g_ir_write_string (node->name, strings, data, offset2);
+       blob->signature = signature;
+
+        /* signal->result is special since it doesn't appear in the serialized format but
+         * we do want the attributes for it to appear
+         */
+        build->nodes_with_attributes = g_list_prepend (build->nodes_with_attributes, signal->result);
+        build->n_attributes += g_hash_table_size (((GIrNode *) signal->result)->attributes);
+        g_assert (((GIrNode *) signal->result)->offset == 0);
+        ((GIrNode *) signal->result)->offset = signature;
+
+        _g_ir_node_build_typelib ((GIrNode *)signal->result->type,
+                                node, build, &signature, offset2);
+
+       blob2->may_return_null = signal->result->allow_none;
+       blob2->caller_owns_return_value = signal->result->transfer;
+       blob2->caller_owns_return_container = signal->result->shallow_transfer;
+       blob2->reserved = 0;
+       blob2->n_arguments = n;
+
+       signature += 4;
+
+       for (l = signal->parameters; l; l = l->next)
+         {
+           GIrNode *param = (GIrNode *)l->data;
+
+           _g_ir_node_build_typelib (param, node, build, &signature, offset2);
+         }
+      }
+      break;
+
+    case G_IR_NODE_VFUNC:
+      {
+       VFuncBlob *blob = (VFuncBlob *)&data[*offset];
+       SignatureBlob *blob2 = (SignatureBlob *)&data[*offset2];
+       GIrNodeVFunc *vfunc = (GIrNodeVFunc *)node;
+       guint32 signature;
+       gint n;
+
+       signature = *offset2;
+       n = g_list_length (vfunc->parameters);
+
+       *offset += sizeof (VFuncBlob);
+       *offset2 += sizeof (SignatureBlob) + n * sizeof (ArgBlob);
+
+       blob->name = _g_ir_write_string (node->name, strings, data, offset2);
+       blob->must_chain_up = 0; /* FIXME */
+       blob->must_be_implemented = 0; /* FIXME */
+       blob->must_not_be_implemented = 0; /* FIXME */
+       blob->class_closure = 0; /* FIXME */
+        blob->throws = vfunc->throws;
+       blob->reserved = 0;
+
+       if (vfunc->invoker)
+         {
+           int index = get_index_of_member_type ((GIrNodeInterface*)parent, G_IR_NODE_FUNCTION, vfunc->invoker);
+           if (index == -1)
+             {
+               g_error ("Unknown member function %s for vfunc %s", vfunc->invoker, node->name);
+             }
+            blob->invoker = (guint) index;
+         }
+       else
+         blob->invoker = 0x3ff; /* max of 10 bits */
+
+       blob->struct_offset = vfunc->offset;
+       blob->reserved2 = 0;
+       blob->signature = signature;
+
+        _g_ir_node_build_typelib ((GIrNode *)vfunc->result->type,
+                                node, build, &signature, offset2);
+
+       blob2->may_return_null = vfunc->result->allow_none;
+       blob2->caller_owns_return_value = vfunc->result->transfer;
+       blob2->caller_owns_return_container = vfunc->result->shallow_transfer;
+       blob2->reserved = 0;
+       blob2->n_arguments = n;
+
+       signature += 4;
+
+       for (l = vfunc->parameters; l; l = l->next)
+         {
+           GIrNode *param = (GIrNode *)l->data;
+
+           _g_ir_node_build_typelib (param, node, build, &signature, offset2);
+         }
+      }
+      break;
+
+    case G_IR_NODE_PARAM:
+      {
+       ArgBlob *blob = (ArgBlob *)&data[*offset];
+       GIrNodeParam *param = (GIrNodeParam *)node;
+
+       /* The offset for this one is smaller than the struct because
+        * we recursively build the simple type inline here below.
+        */
+       *offset += sizeof (ArgBlob) - sizeof (SimpleTypeBlob);
+
+       blob->name = _g_ir_write_string (node->name, strings, data, offset2);
+       blob->in = param->in;
+       blob->out = param->out;
+       blob->caller_allocates = param->caller_allocates;
+       blob->allow_none = param->allow_none;
+       blob->skip = param->skip;
+       blob->optional = param->optional;
+       blob->transfer_ownership = param->transfer;
+       blob->transfer_container_ownership = param->shallow_transfer;
+       blob->return_value = param->retval;
+        blob->scope = param->scope;
+       blob->reserved = 0;
+        blob->closure = param->closure;
+        blob->destroy = param->destroy;
+
+        _g_ir_node_build_typelib ((GIrNode *)param->type, node, build, offset, offset2);
+      }
+      break;
+
+    case G_IR_NODE_STRUCT:
+      {
+       StructBlob *blob = (StructBlob *)&data[*offset];
+       GIrNodeStruct *struct_ = (GIrNodeStruct *)node;
+       GList *members;
+
+       blob->blob_type = BLOB_TYPE_STRUCT;
+        blob->foreign = struct_->foreign;
+       blob->deprecated = struct_->deprecated;
+       blob->is_gtype_struct = struct_->is_gtype_struct;
+       blob->reserved = 0;
+       blob->name = _g_ir_write_string (node->name, strings, data, offset2);
+       blob->alignment = struct_->alignment;
+       blob->size = struct_->size;
+
+       if (struct_->gtype_name)
+         {
+           blob->unregistered = FALSE;
+           blob->gtype_name = _g_ir_write_string (struct_->gtype_name, strings, data, offset2);
+           blob->gtype_init = _g_ir_write_string (struct_->gtype_init, strings, data, offset2);
+         }
+       else
+         {
+           blob->unregistered = TRUE;
+           blob->gtype_name = 0;
+           blob->gtype_init = 0;
+         }
+
+       blob->n_fields = 0;
+       blob->n_methods = 0;
+
+       *offset += sizeof (StructBlob);
+
+       members = g_list_copy (struct_->members);
+
+       _g_ir_node_build_members (&members, G_IR_NODE_FIELD, &blob->n_fields,
+                                node, build, offset, offset2);
+
+       _g_ir_node_build_members (&members, G_IR_NODE_FUNCTION, &blob->n_methods,
+                                node, build, offset, offset2);
+
+       _g_ir_node_check_unhandled_members (&members, node->type);
+
+       g_assert (members == NULL);
+      }
+      break;
+
+    case G_IR_NODE_BOXED:
+      {
+       StructBlob *blob = (StructBlob *)&data[*offset];
+       GIrNodeBoxed *boxed = (GIrNodeBoxed *)node;
+       GList *members;
+
+       blob->blob_type = BLOB_TYPE_BOXED;
+       blob->deprecated = boxed->deprecated;
+       blob->unregistered = FALSE;
+       blob->reserved = 0;
+       blob->name = _g_ir_write_string (node->name, strings, data, offset2);
+       blob->gtype_name = _g_ir_write_string (boxed->gtype_name, strings, data, offset2);
+       blob->gtype_init = _g_ir_write_string (boxed->gtype_init, strings, data, offset2);
+       blob->alignment = boxed->alignment;
+       blob->size = boxed->size;
+
+       blob->n_fields = 0;
+       blob->n_methods = 0;
+
+       *offset += sizeof (StructBlob);
+
+       members = g_list_copy (boxed->members);
+
+       _g_ir_node_build_members (&members, G_IR_NODE_FIELD, &blob->n_fields,
+                                 node, build, offset, offset2);
+
+       _g_ir_node_build_members (&members, G_IR_NODE_FUNCTION, &blob->n_methods,
+                                 node, build, offset, offset2);
+
+       _g_ir_node_check_unhandled_members (&members, node->type);
+
+       g_assert (members == NULL);
+      }
+      break;
+
+    case G_IR_NODE_UNION:
+      {
+       UnionBlob *blob = (UnionBlob *)&data[*offset];
+       GIrNodeUnion *union_ = (GIrNodeUnion *)node;
+       GList *members;
+
+       blob->blob_type = BLOB_TYPE_UNION;
+       blob->deprecated = union_->deprecated;
+       blob->reserved = 0;
+       blob->name = _g_ir_write_string (node->name, strings, data, offset2);
+       blob->alignment = union_->alignment;
+       blob->size = union_->size;
+       if (union_->gtype_name)
+         {
+           blob->unregistered = FALSE;
+           blob->gtype_name = _g_ir_write_string (union_->gtype_name, strings, data, offset2);
+           blob->gtype_init = _g_ir_write_string (union_->gtype_init, strings, data, offset2);
+         }
+       else
+         {
+           blob->unregistered = TRUE;
+           blob->gtype_name = 0;
+           blob->gtype_init = 0;
+         }
+
+       blob->n_fields = 0;
+       blob->n_functions = 0;
+
+       blob->discriminator_offset = union_->discriminator_offset;
+
+       /* We don't support Union discriminators right now. */
+       /*
+       if (union_->discriminator_type)
+         {
+           *offset += 28;
+           blob->discriminated = TRUE;
+           _g_ir_node_build_typelib ((GIrNode *)union_->discriminator_type,
+                                    build, offset, offset2);
+         }
+       else
+         {
+        */
+       *offset += sizeof (UnionBlob);
+       blob->discriminated = FALSE;
+       blob->discriminator_type.offset = 0;
+
+       members = g_list_copy (union_->members);
+
+       _g_ir_node_build_members (&members, G_IR_NODE_FIELD, &blob->n_fields,
+                                node, build, offset, offset2);
+
+       _g_ir_node_build_members (&members, G_IR_NODE_FUNCTION, &blob->n_functions,
+                                node, build, offset, offset2);
+
+       _g_ir_node_check_unhandled_members (&members, node->type);
+
+       g_assert (members == NULL);
+
+       if (union_->discriminator_type)
+         {
+           for (l = union_->discriminators; l; l = l->next)
+             {
+               GIrNode *member = (GIrNode *)l->data;
+
+               _g_ir_node_build_typelib (member, node, build, offset, offset2);
+             }
+         }
+      }
+      break;
+
+    case G_IR_NODE_ENUM:
+    case G_IR_NODE_FLAGS:
+      {
+       EnumBlob *blob = (EnumBlob *)&data[*offset];
+       GIrNodeEnum *enum_ = (GIrNodeEnum *)node;
+
+       *offset += sizeof (EnumBlob);
+
+       if (node->type == G_IR_NODE_ENUM)
+         blob->blob_type = BLOB_TYPE_ENUM;
+       else
+         blob->blob_type = BLOB_TYPE_FLAGS;
+
+       blob->deprecated = enum_->deprecated;
+       blob->reserved = 0;
+       blob->storage_type = enum_->storage_type;
+       blob->name = _g_ir_write_string (node->name, strings, data, offset2);
+       if (enum_->gtype_name)
+         {
+           blob->unregistered = FALSE;
+           blob->gtype_name = _g_ir_write_string (enum_->gtype_name, strings, data, offset2);
+           blob->gtype_init = _g_ir_write_string (enum_->gtype_init, strings, data, offset2);
+         }
+       else
+         {
+           blob->unregistered = TRUE;
+           blob->gtype_name = 0;
+           blob->gtype_init = 0;
+         }
+       if (enum_->error_domain)
+         blob->error_domain = _g_ir_write_string (enum_->error_domain, strings, data, offset2);
+       else
+         blob->error_domain = 0;
+
+       blob->n_values = 0;
+       blob->n_methods = 0;
+
+       for (l = enum_->values; l; l = l->next)
+         {
+           GIrNode *value = (GIrNode *)l->data;
+
+           blob->n_values++;
+           _g_ir_node_build_typelib (value, node, build, offset, offset2);
+         }
+
+       for (l = enum_->methods; l; l = l->next)
+         {
+           GIrNode *method = (GIrNode *)l->data;
+
+           blob->n_methods++;
+           _g_ir_node_build_typelib (method, node, build, offset, offset2);
+         }
+      }
+      break;
+
+    case G_IR_NODE_OBJECT:
+      {
+       ObjectBlob *blob = (ObjectBlob *)&data[*offset];
+       GIrNodeInterface *object = (GIrNodeInterface *)node;
+       GList *members;
+
+       blob->blob_type = BLOB_TYPE_OBJECT;
+       blob->abstract = object->abstract;
+        blob->fundamental = object->fundamental;
+       blob->deprecated = object->deprecated;
+       blob->reserved = 0;
+       blob->name = _g_ir_write_string (node->name, strings, data, offset2);
+       blob->gtype_name = _g_ir_write_string (object->gtype_name, strings, data, offset2);
+       blob->gtype_init = _g_ir_write_string (object->gtype_init, strings, data, offset2);
+        if (object->ref_func)
+          blob->ref_func = _g_ir_write_string (object->ref_func, strings, data, offset2);
+        if (object->unref_func)
+          blob->unref_func = _g_ir_write_string (object->unref_func, strings, data, offset2);
+        if (object->set_value_func)
+          blob->set_value_func = _g_ir_write_string (object->set_value_func, strings, data, offset2);
+        if (object->get_value_func)
+          blob->get_value_func = _g_ir_write_string (object->get_value_func, strings, data, offset2);
+       if (object->parent)
+         blob->parent = find_entry (build, object->parent);
+       else
+         blob->parent = 0;
+       if (object->glib_type_struct)
+         blob->gtype_struct = find_entry (build, object->glib_type_struct);
+       else
+         blob->gtype_struct = 0;
+
+       blob->n_interfaces = 0;
+       blob->n_fields = 0;
+       blob->n_properties = 0;
+       blob->n_methods = 0;
+       blob->n_signals = 0;
+       blob->n_vfuncs = 0;
+       blob->n_constants = 0;
+
+       *offset += sizeof(ObjectBlob);
+       for (l = object->interfaces; l; l = l->next)
+         {
+           blob->n_interfaces++;
+           *(guint16*)&data[*offset] = find_entry (build, (gchar *)l->data);
+           *offset += 2;
+         }
+
+       members = g_list_copy (object->members);
+
+       *offset = ALIGN_VALUE (*offset, 4);
+       _g_ir_node_build_members (&members, G_IR_NODE_FIELD, &blob->n_fields,
+                                node, build, offset, offset2);
+
+       *offset = ALIGN_VALUE (*offset, 4);
+       _g_ir_node_build_members (&members, G_IR_NODE_PROPERTY, &blob->n_properties,
+                                node, build, offset, offset2);
+
+       *offset = ALIGN_VALUE (*offset, 4);
+       _g_ir_node_build_members (&members, G_IR_NODE_FUNCTION, &blob->n_methods,
+                                node, build, offset, offset2);
+
+       *offset = ALIGN_VALUE (*offset, 4);
+       _g_ir_node_build_members (&members, G_IR_NODE_SIGNAL, &blob->n_signals,
+                                node, build, offset, offset2);
+
+       *offset = ALIGN_VALUE (*offset, 4);
+       _g_ir_node_build_members (&members, G_IR_NODE_VFUNC, &blob->n_vfuncs,
+                                node, build, offset, offset2);
+
+       *offset = ALIGN_VALUE (*offset, 4);
+       _g_ir_node_build_members (&members, G_IR_NODE_CONSTANT, &blob->n_constants,
+                                node, build, offset, offset2);
+
+       _g_ir_node_check_unhandled_members (&members, node->type);
+
+       g_assert (members == NULL);
+      }
+      break;
+
+    case G_IR_NODE_INTERFACE:
+      {
+       InterfaceBlob *blob = (InterfaceBlob *)&data[*offset];
+       GIrNodeInterface *iface = (GIrNodeInterface *)node;
+       GList *members;
+
+       blob->blob_type = BLOB_TYPE_INTERFACE;
+       blob->deprecated = iface->deprecated;
+       blob->reserved = 0;
+       blob->name = _g_ir_write_string (node->name, strings, data, offset2);
+       blob->gtype_name = _g_ir_write_string (iface->gtype_name, strings, data, offset2);
+       blob->gtype_init = _g_ir_write_string (iface->gtype_init, strings, data, offset2);
+       if (iface->glib_type_struct)
+         blob->gtype_struct = find_entry (build, iface->glib_type_struct);
+       else
+         blob->gtype_struct = 0;
+       blob->n_prerequisites = 0;
+       blob->n_properties = 0;
+       blob->n_methods = 0;
+       blob->n_signals = 0;
+       blob->n_vfuncs = 0;
+       blob->n_constants = 0;
+
+       *offset += sizeof (InterfaceBlob);
+       for (l = iface->prerequisites; l; l = l->next)
+         {
+           blob->n_prerequisites++;
+           *(guint16*)&data[*offset] = find_entry (build, (gchar *)l->data);
+           *offset += 2;
+         }
+
+       members = g_list_copy (iface->members);
+
+       *offset = ALIGN_VALUE (*offset, 4);
+       _g_ir_node_build_members (&members, G_IR_NODE_PROPERTY, &blob->n_properties,
+                                node, build, offset, offset2);
+
+       *offset = ALIGN_VALUE (*offset, 4);
+       _g_ir_node_build_members (&members, G_IR_NODE_FUNCTION, &blob->n_methods,
+                                node, build, offset, offset2);
+
+       *offset = ALIGN_VALUE (*offset, 4);
+       _g_ir_node_build_members (&members, G_IR_NODE_SIGNAL, &blob->n_signals,
+                                node, build, offset, offset2);
+
+       *offset = ALIGN_VALUE (*offset, 4);
+       _g_ir_node_build_members (&members, G_IR_NODE_VFUNC, &blob->n_vfuncs,
+                                node, build, offset, offset2);
+
+       *offset = ALIGN_VALUE (*offset, 4);
+       _g_ir_node_build_members (&members, G_IR_NODE_CONSTANT, &blob->n_constants,
+                                node, build, offset, offset2);
+
+       _g_ir_node_check_unhandled_members (&members, node->type);
+
+       g_assert (members == NULL);
+      }
+      break;
+
+
+    case G_IR_NODE_VALUE:
+      {
+       GIrNodeValue *value = (GIrNodeValue *)node;
+       ValueBlob *blob = (ValueBlob *)&data[*offset];
+       *offset += sizeof (ValueBlob);
+
+       blob->deprecated = value->deprecated;
+       blob->reserved = 0;
+       blob->unsigned_value = value->value >= 0 ? 1 : 0;
+       blob->name = _g_ir_write_string (node->name, strings, data, offset2);
+       blob->value = (gint32)value->value;
+      }
+      break;
+
+    case G_IR_NODE_CONSTANT:
+      {
+       GIrNodeConstant *constant = (GIrNodeConstant *)node;
+       ConstantBlob *blob = (ConstantBlob *)&data[*offset];
+       guint32 pos;
+
+       pos = *offset + G_STRUCT_OFFSET (ConstantBlob, type);
+       *offset += sizeof (ConstantBlob);
+
+       blob->blob_type = BLOB_TYPE_CONSTANT;
+       blob->deprecated = constant->deprecated;
+       blob->reserved = 0;
+       blob->name = _g_ir_write_string (node->name, strings, data, offset2);
+
+       blob->offset = *offset2;
+       switch (constant->type->tag)
+         {
+         case GI_TYPE_TAG_BOOLEAN:
+           blob->size = 4;
+           *(gboolean*)&data[blob->offset] = parse_boolean_value (constant->value);
+           break;
+           case GI_TYPE_TAG_INT8:
+           blob->size = 1;
+             *(gint8*)&data[blob->offset] = (gint8) parse_int_value (constant->value);
+           break;
+         case GI_TYPE_TAG_UINT8:
+           blob->size = 1;
+           *(guint8*)&data[blob->offset] = (guint8) parse_uint_value (constant->value);
+           break;
+         case GI_TYPE_TAG_INT16:
+           blob->size = 2;
+           *(gint16*)&data[blob->offset] = (gint16) parse_int_value (constant->value);
+           break;
+         case GI_TYPE_TAG_UINT16:
+           blob->size = 2;
+           *(guint16*)&data[blob->offset] = (guint16) parse_uint_value (constant->value);
+           break;
+         case GI_TYPE_TAG_INT32:
+           blob->size = 4;
+           *(gint32*)&data[blob->offset] = (gint32) parse_int_value (constant->value);
+           break;
+         case GI_TYPE_TAG_UINT32:
+           blob->size = 4;
+           *(guint32*)&data[blob->offset] = (guint32) parse_uint_value (constant->value);
+           break;
+         case GI_TYPE_TAG_INT64:
+           blob->size = 8;
+           DO_ALIGNED_COPY(&data[blob->offset], parse_int_value (constant->value), gint64);
+           break;
+         case GI_TYPE_TAG_UINT64:
+           blob->size = 8;
+           DO_ALIGNED_COPY(&data[blob->offset], parse_uint_value (constant->value), guint64);
+           break;
+         case GI_TYPE_TAG_FLOAT:
+           blob->size = sizeof (gfloat);
+           DO_ALIGNED_COPY(&data[blob->offset], parse_float_value (constant->value), gfloat);
+           break;
+         case GI_TYPE_TAG_DOUBLE:
+           blob->size = sizeof (gdouble);
+           DO_ALIGNED_COPY(&data[blob->offset], parse_float_value (constant->value), gdouble);
+           break;
+         case GI_TYPE_TAG_UTF8:
+         case GI_TYPE_TAG_FILENAME:
+           blob->size = strlen (constant->value) + 1;
+           memcpy (&data[blob->offset], constant->value, blob->size);
+           break;
+         }
+       *offset2 += ALIGN_VALUE (blob->size, 4);
+
+       _g_ir_node_build_typelib ((GIrNode *)constant->type, node, build, &pos, offset2);
+      }
+      break;
+    default:
+      g_assert_not_reached ();
+    }
+
+  g_debug ("node %s%s%s%p type '%s', offset %d -> %d, offset2 %d -> %d",
+          node->name ? "'" : "",
+          node->name ? node->name : "",
+          node->name ? "' " : "",
+          node, _g_ir_node_type_to_string (node->type),
+          old_offset, *offset, old_offset2, *offset2);
+
+  if (*offset2 - old_offset2 + *offset - old_offset > _g_ir_node_get_full_size (node))
+    g_error ("exceeding space reservation; offset: %d (prev %d) offset2: %d (prev %d) nodesize: %d",
+             *offset, old_offset, *offset2, old_offset2, _g_ir_node_get_full_size (node));
+
+  if (appended_stack)
+    build->stack = g_list_delete_link (build->stack, build->stack);
+}
+
+/* if str is already in the pool, return previous location, otherwise write str
+ * to the typelib at offset, put it in the pool and update offset. If the
+ * typelib is not large enough to hold the string, reallocate it.
+ */
+guint32
+_g_ir_write_string (const gchar *str,
+                   GHashTable  *strings,
+                   guchar      *data,
+                   guint32     *offset)
+{
+  gpointer value;
+  guint32 start;
+
+  string_count += 1;
+  string_size += strlen (str);
+
+  value = g_hash_table_lookup (strings, str);
+
+  if (value)
+    return GPOINTER_TO_UINT (value);
+
+  unique_string_count += 1;
+  unique_string_size += strlen (str);
+
+  g_hash_table_insert (strings, (gpointer)str, GUINT_TO_POINTER (*offset));
+
+  start = *offset;
+  *offset = ALIGN_VALUE (start + strlen (str) + 1, 4);
+
+  strcpy ((gchar*)&data[start], str);
+
+  return start;
+}
+
diff --git a/girepository/girnode.h b/girepository/girnode.h
new file mode 100644 (file)
index 0000000..d89847a
--- /dev/null
@@ -0,0 +1,384 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Parsed GIR
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ *
+ * 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 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.
+ */
+
+#ifndef __G_IR_NODE_H__
+#define __G_IR_NODE_H__
+
+#include <glib.h>
+
+#include "girmodule.h"
+
+G_BEGIN_DECLS
+
+typedef struct _GIrNode GIrNode;
+typedef struct _GIrNodeFunction GIrNodeFunction;
+typedef struct _GIrNodeParam GIrNodeParam;
+typedef struct _GIrNodeType GIrNodeType;
+typedef struct _GIrNodeInterface GIrNodeInterface;
+typedef struct _GIrNodeSignal GIrNodeSignal;
+typedef struct _GIrNodeProperty GIrNodeProperty;
+typedef struct _GIrNodeVFunc GIrNodeVFunc;
+typedef struct _GIrNodeField GIrNodeField;
+typedef struct _GIrNodeValue GIrNodeValue;
+typedef struct _GIrNodeEnum GIrNodeEnum;
+typedef struct _GIrNodeBoxed GIrNodeBoxed;
+typedef struct _GIrNodeStruct GIrNodeStruct;
+typedef struct _GIrNodeConstant GIrNodeConstant;
+typedef struct _GIrNodeXRef GIrNodeXRef;
+typedef struct _GIrNodeUnion GIrNodeUnion;
+
+typedef enum
+{
+  G_IR_NODE_INVALID      =  0,
+  G_IR_NODE_FUNCTION     =  1,
+  G_IR_NODE_CALLBACK     =  2,
+  G_IR_NODE_STRUCT       =  3,
+  G_IR_NODE_BOXED        =  4,
+  G_IR_NODE_ENUM         =  5,
+  G_IR_NODE_FLAGS        =  6,
+  G_IR_NODE_OBJECT       =  7,
+  G_IR_NODE_INTERFACE    =  8,
+  G_IR_NODE_CONSTANT     =  9,
+  G_IR_NODE_INVALID_0    = 10, /* DELETED - used to be ERROR_DOMAIN */
+  G_IR_NODE_UNION        = 11,
+  G_IR_NODE_PARAM        = 12,
+  G_IR_NODE_TYPE         = 13,
+  G_IR_NODE_PROPERTY     = 14,
+  G_IR_NODE_SIGNAL       = 15,
+  G_IR_NODE_VALUE        = 16,
+  G_IR_NODE_VFUNC        = 17,
+  G_IR_NODE_FIELD        = 18,
+  G_IR_NODE_XREF         = 19
+} GIrNodeTypeId;
+
+struct _GIrNode
+{
+  GIrNodeTypeId type;
+  gchar *name;
+  GIrModule *module;
+
+  guint32 offset; /* Assigned as we build the typelib */
+
+  GHashTable *attributes;
+};
+
+struct _GIrNodeXRef
+{
+  GIrNode node;
+
+  gchar *namespace;
+};
+
+struct _GIrNodeFunction
+{
+  GIrNode node;
+
+  gboolean deprecated;
+  gboolean is_varargs; /* Not in typelib yet */
+
+  gboolean is_method;
+  gboolean is_setter;
+  gboolean is_getter;
+  gboolean is_constructor;
+  gboolean wraps_vfunc;
+  gboolean throws;
+
+  gchar *symbol;
+
+  GIrNodeParam *result;
+  GList *parameters;
+};
+
+struct _GIrNodeType
+{
+  GIrNode node;
+
+  gboolean is_pointer;
+  gboolean is_basic;
+  gboolean is_array;
+  gboolean is_glist;
+  gboolean is_gslist;
+  gboolean is_ghashtable;
+  gboolean is_interface;
+  gboolean is_error;
+  gint tag;
+
+  gchar *unparsed;
+
+  gboolean zero_terminated;
+  gboolean has_length;
+  gint length;
+  gboolean has_size;
+  gint size;
+  gint array_type;
+
+  GIrNodeType *parameter_type1;
+  GIrNodeType *parameter_type2;
+
+  gchar *interface;
+  gchar **errors;
+};
+
+struct _GIrNodeParam
+{
+  GIrNode node;
+
+  gboolean in;
+  gboolean out;
+  gboolean caller_allocates;
+  gboolean optional;
+  gboolean retval;
+  gboolean allow_none;
+  gboolean skip;
+  gboolean transfer;
+  gboolean shallow_transfer;
+  GIScopeType scope;
+
+  gint8 closure;
+  gint8 destroy;
+
+  GIrNodeType *type;
+};
+
+struct _GIrNodeProperty
+{
+  GIrNode node;
+
+  gboolean deprecated;
+
+  gchar *name;
+  gboolean readable;
+  gboolean writable;
+  gboolean construct;
+  gboolean construct_only;
+  gboolean transfer;
+  gboolean shallow_transfer;
+
+  GIrNodeType *type;
+};
+
+struct _GIrNodeSignal
+{
+  GIrNode node;
+
+  gboolean deprecated;
+
+  gboolean run_first;
+  gboolean run_last;
+  gboolean run_cleanup;
+  gboolean no_recurse;
+  gboolean detailed;
+  gboolean action;
+  gboolean no_hooks;
+
+  gboolean has_class_closure;
+  gboolean true_stops_emit;
+
+  gint class_closure;
+
+  GList *parameters;
+  GIrNodeParam *result;
+};
+
+struct _GIrNodeVFunc
+{
+  GIrNode node;
+
+  gboolean is_varargs; /* Not in typelib yet */
+  gboolean must_chain_up;
+  gboolean must_be_implemented;
+  gboolean must_not_be_implemented;
+  gboolean is_class_closure;
+  gboolean throws;
+
+  char *invoker;
+
+  GList *parameters;
+  GIrNodeParam *result;
+
+  gint offset;
+};
+
+struct _GIrNodeField
+{
+  GIrNode node;
+
+  gboolean readable;
+  gboolean writable;
+  gint bits;
+  gint offset;
+  GIrNodeFunction *callback;
+
+  GIrNodeType *type;
+};
+
+struct _GIrNodeInterface
+{
+  GIrNode node;
+
+  gboolean abstract;
+  gboolean deprecated;
+  gboolean fundamental;
+
+  gchar *gtype_name;
+  gchar *gtype_init;
+
+  gchar *ref_func;
+  gchar *unref_func;
+  gchar *set_value_func;
+  gchar *get_value_func;
+
+  gchar *parent;
+  gchar *glib_type_struct;
+
+  GList *interfaces;
+  GList *prerequisites;
+
+  gint alignment;
+  gint size;
+
+  GList *members;
+};
+
+struct _GIrNodeValue
+{
+  GIrNode node;
+
+  gboolean deprecated;
+
+  gint64 value;
+};
+
+struct _GIrNodeConstant
+{
+  GIrNode node;
+
+  gboolean deprecated;
+
+  GIrNodeType *type;
+
+  gchar *value;
+};
+
+struct _GIrNodeEnum
+{
+  GIrNode node;
+
+  gboolean deprecated;
+  gint storage_type;
+
+  gchar *gtype_name;
+  gchar *gtype_init;
+  gchar *error_domain;
+
+  GList *values;
+  GList *methods;
+};
+
+struct _GIrNodeBoxed
+{
+  GIrNode node;
+
+  gboolean deprecated;
+
+  gchar *gtype_name;
+  gchar *gtype_init;
+
+  gint alignment;
+  gint size;
+
+  GList *members;
+};
+
+struct _GIrNodeStruct
+{
+  GIrNode node;
+
+  gboolean deprecated;
+  gboolean disguised;
+  gboolean is_gtype_struct;
+  gboolean foreign;
+
+  gchar *gtype_name;
+  gchar *gtype_init;
+
+  gint alignment;
+  gint size;
+
+  GList *members;
+};
+
+struct _GIrNodeUnion
+{
+  GIrNode node;
+
+  gboolean deprecated;
+
+  GList *members;
+  GList *discriminators;
+
+  gchar *gtype_name;
+  gchar *gtype_init;
+
+  gint alignment;
+  gint size;
+
+  gint discriminator_offset;
+  GIrNodeType *discriminator_type;
+};
+
+
+GIrNode * _g_ir_node_new             (GIrNodeTypeId type,
+                                    GIrModule     *module);
+void      _g_ir_node_free            (GIrNode    *node);
+guint32   _g_ir_node_get_size        (GIrNode    *node);
+guint32   _g_ir_node_get_full_size   (GIrNode    *node);
+void      _g_ir_node_build_typelib   (GIrNode         *node,
+                                     GIrNode         *parent,
+                                     GIrTypelibBuild *build,
+                                     guint32         *offset,
+                                     guint32         *offset2);
+int       _g_ir_node_cmp             (GIrNode    *node,
+                                    GIrNode    *other);
+gboolean  _g_ir_node_can_have_member (GIrNode    *node);
+void      _g_ir_node_add_member      (GIrNode         *node,
+                                     GIrNodeFunction *member);
+guint32   _g_ir_write_string              (const gchar *str,
+                                          GHashTable  *strings,
+                                          guchar      *data,
+                                          guint32     *offset);
+
+const gchar * _g_ir_node_param_direction_string (GIrNodeParam * node);
+const gchar * _g_ir_node_type_to_string         (GIrNodeTypeId type);
+
+GIrNode *_g_ir_find_node (GIrTypelibBuild  *build,
+                        GIrModule        *module,
+                        const char       *name);
+
+/* In giroffsets.c */
+
+void _g_ir_node_compute_offsets (GIrTypelibBuild *build,
+                               GIrNode         *node);
+
+
+G_END_DECLS
+
+#endif  /* __G_IR_NODE_H__ */
diff --git a/girepository/giroffsets.c b/girepository/giroffsets.c
new file mode 100644 (file)
index 0000000..e3c9d7f
--- /dev/null
@@ -0,0 +1,587 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Compute structure offsets
+ *
+ * Copyright (C) 2008 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#include "girffi.h"
+#include "girnode.h"
+#include <string.h>
+
+/* The C standard specifies that an enumeration can be any char or any signed
+ * or unsigned integer type capable of representing all the values of the
+ * enumeration. We use test enumerations to figure out what choices the
+ * compiler makes. (Ignoring > 32 bit enumerations)
+ */
+
+typedef enum {
+  ENUM_1 = 1 /* compiler could use int8, uint8, int16, uint16, int32, uint32 */
+} Enum1;
+
+typedef enum {
+  ENUM_2 = 128 /* compiler could use uint8, int16, uint16, int32, uint32 */
+} Enum2;
+
+typedef enum {
+  ENUM_3 = 257 /* compiler could use int16, uint16, int32, uint32 */
+} Enum3;
+
+typedef enum {
+  ENUM_4 = G_MAXSHORT + 1 /* compiler could use uint16, int32, uint32 */
+} Enum4;
+
+typedef enum {
+  ENUM_5 = G_MAXUSHORT + 1 /* compiler could use int32, uint32 */
+} Enum5;
+
+typedef enum {
+  ENUM_6 = ((guint)G_MAXINT) + 1 /* compiler could use uint32 */
+} Enum6;
+
+typedef enum {
+  ENUM_7 = -1 /* compiler could use int8, int16, int32 */
+} Enum7;
+
+typedef enum {
+  ENUM_8 = -129 /* compiler could use int16, int32 */
+} Enum8;
+
+typedef enum {
+  ENUM_9 = G_MINSHORT - 1 /* compiler could use int32 */
+} Enum9;
+
+static void
+compute_enum_storage_type (GIrNodeEnum *enum_node)
+{
+  GList *l;
+  gint64 max_value = 0;
+  gint64 min_value = 0;
+  int width;
+  gboolean signed_type;
+
+  if (enum_node->storage_type != GI_TYPE_TAG_VOID) /* already done */
+    return;
+
+  for (l = enum_node->values; l; l = l->next)
+    {
+      GIrNodeValue *value = l->data;
+      if (value->value > max_value)
+        max_value = value->value;
+      if (value->value < min_value)
+        min_value = value->value;
+    }
+
+  if (min_value < 0)
+    {
+      signed_type = TRUE;
+
+      if (min_value > -128 && max_value <= 127)
+       width = sizeof(Enum7);
+      else if (min_value >= G_MINSHORT && max_value <= G_MAXSHORT)
+       width = sizeof(Enum8);
+      else
+       width = sizeof(Enum9);
+    }
+  else
+    {
+      if (max_value <= 127)
+       {
+         width = sizeof (Enum1);
+         signed_type = (gint64)(Enum1)(-1) < 0;
+       }
+      else if (max_value <= 255)
+       {
+         width = sizeof (Enum2);
+         signed_type = (gint64)(Enum2)(-1) < 0;
+       }
+      else if (max_value <= G_MAXSHORT)
+       {
+         width = sizeof (Enum3);
+         signed_type = (gint64)(Enum3)(-1) < 0;
+       }
+      else if (max_value <= G_MAXUSHORT)
+       {
+         width = sizeof (Enum4);
+         signed_type = (gint64)(Enum4)(-1) < 0;
+       }
+      else if (max_value <= G_MAXINT)
+       {
+         width = sizeof (Enum5);
+         signed_type = (gint64)(Enum5)(-1) < 0;
+       }
+      else
+       {
+         width = sizeof (Enum6);
+         signed_type = (gint64)(Enum6)(-1) < 0;
+       }
+    }
+
+  if (width == 1)
+    enum_node->storage_type = signed_type ? GI_TYPE_TAG_INT8 : GI_TYPE_TAG_UINT8;
+  else if (width == 2)
+    enum_node->storage_type = signed_type ? GI_TYPE_TAG_INT16 : GI_TYPE_TAG_UINT16;
+  else if (width == 4)
+    enum_node->storage_type = signed_type ? GI_TYPE_TAG_INT32 : GI_TYPE_TAG_UINT32;
+  else if (width == 8)
+    enum_node->storage_type = signed_type ? GI_TYPE_TAG_INT64 : GI_TYPE_TAG_UINT64;
+  else
+    g_error ("Unexpected enum width %d", width);
+}
+
+static gboolean
+get_enum_size_alignment (GIrNodeEnum *enum_node,
+                        gint        *size,
+                        gint        *alignment)
+{
+  ffi_type *type_ffi;
+
+  compute_enum_storage_type (enum_node);
+
+  switch (enum_node->storage_type)
+    {
+    case GI_TYPE_TAG_INT8:
+    case GI_TYPE_TAG_UINT8:
+      type_ffi = &ffi_type_uint8;
+      break;
+    case GI_TYPE_TAG_INT16:
+    case GI_TYPE_TAG_UINT16:
+      type_ffi = &ffi_type_uint16;
+      break;
+    case GI_TYPE_TAG_INT32:
+    case GI_TYPE_TAG_UINT32:
+      type_ffi = &ffi_type_uint32;
+      break;
+    case GI_TYPE_TAG_INT64:
+    case GI_TYPE_TAG_UINT64:
+      type_ffi = &ffi_type_uint64;
+      break;
+    default:
+      g_error ("Unexpected enum storage type %s",
+              g_type_tag_to_string (enum_node->storage_type));
+    }
+
+  *size = type_ffi->size;
+  *alignment = type_ffi->alignment;
+
+  return TRUE;
+}
+
+static gboolean
+get_interface_size_alignment (GIrTypelibBuild   *build,
+                             GIrNodeType *type,
+                             gint        *size,
+                             gint        *alignment,
+                              const char  *who)
+{
+  GIrNode *iface;
+
+  iface = _g_ir_find_node (build, ((GIrNode*)type)->module, type->interface);
+  if (!iface)
+    {
+      _g_ir_module_fatal (build, 0, "Can't resolve type '%s' for %s", type->interface, who);
+      *size = -1;
+      *alignment = -1;
+      return FALSE;
+    }
+
+  _g_ir_node_compute_offsets (build, iface);
+
+  switch (iface->type)
+    {
+    case G_IR_NODE_BOXED:
+      {
+       GIrNodeBoxed *boxed = (GIrNodeBoxed *)iface;
+       *size = boxed->size;
+       *alignment = boxed->alignment;
+       break;
+      }
+    case G_IR_NODE_STRUCT:
+      {
+       GIrNodeStruct *struct_ = (GIrNodeStruct *)iface;
+       *size = struct_->size;
+       *alignment = struct_->alignment;
+       break;
+      }
+    case G_IR_NODE_OBJECT:
+    case G_IR_NODE_INTERFACE:
+      {
+       GIrNodeInterface *interface = (GIrNodeInterface *)iface;
+       *size = interface->size;
+       *alignment = interface->alignment;
+       break;
+      }
+    case G_IR_NODE_UNION:
+      {
+       GIrNodeUnion *union_ = (GIrNodeUnion *)iface;
+       *size = union_->size;
+       *alignment = union_->alignment;
+       break;
+      }
+    case G_IR_NODE_ENUM:
+    case G_IR_NODE_FLAGS:
+      {
+       return get_enum_size_alignment ((GIrNodeEnum *)iface,
+                                       size, alignment);
+      }
+    case G_IR_NODE_CALLBACK:
+      {
+       *size = ffi_type_pointer.size;
+       *alignment = ffi_type_pointer.alignment;
+       break;
+      }
+    default:
+      {
+       g_warning ("%s has is not a pointer and is of type %s",
+                   who,
+                  _g_ir_node_type_to_string (iface->type));
+       *size = -1;
+       *alignment = -1;
+       break;
+      }
+    }
+
+  return *alignment > 0;
+}
+
+static gboolean
+get_type_size_alignment (GIrTypelibBuild   *build,
+                        GIrNodeType *type,
+                         gint        *size,
+                         gint        *alignment,
+                         const char  *who)
+{
+  ffi_type *type_ffi;
+
+  if (type->is_pointer)
+    {
+      type_ffi = &ffi_type_pointer;
+    }
+  else if (type->tag == GI_TYPE_TAG_ARRAY)
+    {
+      gint elt_size, elt_alignment;
+
+      if (!type->has_size
+          || !get_type_size_alignment(build, type->parameter_type1,
+                                      &elt_size, &elt_alignment, who))
+        {
+          *size = -1;
+          *alignment = -1;
+          return FALSE;
+        }
+
+      *size = type->size * elt_size;
+      *alignment = elt_alignment;
+
+      return TRUE;
+    }
+  else
+    {
+      if (type->tag == GI_TYPE_TAG_INTERFACE)
+       {
+         return get_interface_size_alignment (build, type, size, alignment, who);
+       }
+      else
+       {
+         type_ffi = gi_type_tag_get_ffi_type (type->tag, type->is_pointer);
+
+         if (type_ffi == &ffi_type_void)
+           {
+             g_warning ("%s has void type", who);
+             *size = -1;
+             *alignment = -1;
+             return FALSE;
+           }
+         else if (type_ffi == &ffi_type_pointer)
+           {
+             g_warning ("%s has is not a pointer and is of type %s",
+                         who,
+                        g_type_tag_to_string (type->tag));
+             *size = -1;
+             *alignment = -1;
+             return FALSE;
+           }
+       }
+    }
+
+  g_assert (type_ffi);
+  *size = type_ffi->size;
+  *alignment = type_ffi->alignment;
+
+  return TRUE;
+}
+
+static gboolean
+get_field_size_alignment (GIrTypelibBuild    *build,
+                         GIrNodeField *field,
+                         GIrNode      *parent_node,
+                         gint         *size,
+                         gint         *alignment)
+{
+  GIrModule *module = build->module;
+  gchar *who;
+  gboolean success;
+
+  who = g_strdup_printf ("field %s.%s.%s", module->name, parent_node->name, ((GIrNode *)field)->name);
+
+  if (field->callback)
+    {
+      *size = ffi_type_pointer.size;
+      *alignment = ffi_type_pointer.alignment;
+      success = TRUE;
+    }
+  else
+    success = get_type_size_alignment (build, field->type, size, alignment, who);
+  g_free (who);
+
+  return success;
+}
+
+#define GI_ALIGN(n, align) (((n) + (align) - 1) & ~((align) - 1))
+
+static gboolean
+compute_struct_field_offsets (GIrTypelibBuild   *build,
+                             GIrNode     *node,
+                             GList       *members,
+                             gint        *size_out,
+                             gint        *alignment_out)
+{
+  int size = 0;
+  int alignment = 1;
+  GList *l;
+  gboolean have_error = FALSE;
+
+  *alignment_out = -2; /* mark to detect recursion */
+
+  for (l = members; l; l = l->next)
+    {
+      GIrNode *member = (GIrNode *)l->data;
+
+      if (member->type == G_IR_NODE_FIELD)
+       {
+         GIrNodeField *field = (GIrNodeField *)member;
+
+         if (!have_error)
+           {
+             int member_size;
+             int member_alignment;
+
+             if (get_field_size_alignment (build, field, node,
+                                           &member_size, &member_alignment))
+               {
+                 size = GI_ALIGN (size, member_alignment);
+                 alignment = MAX (alignment, member_alignment);
+                 field->offset = size;
+                 size += member_size;
+               }
+             else
+               have_error = TRUE;
+           }
+
+         if (have_error)
+           field->offset = -1;
+       }
+      else if (member->type == G_IR_NODE_CALLBACK)
+       {
+          size = GI_ALIGN (size, ffi_type_pointer.alignment);
+          alignment = MAX (alignment, ffi_type_pointer.alignment);
+         size += ffi_type_pointer.size;
+       }
+    }
+
+  /* Structs are tail-padded out to a multiple of their alignment */
+  size = GI_ALIGN (size, alignment);
+
+  if (!have_error)
+    {
+      *size_out = size;
+      *alignment_out = alignment;
+    }
+  else
+    {
+      *size_out = -1;
+      *alignment_out = -1;
+    }
+
+  return !have_error;
+}
+
+static gboolean
+compute_union_field_offsets (GIrTypelibBuild *build,
+                            GIrNode     *node,
+                            GList       *members,
+                            gint        *size_out,
+                            gint        *alignment_out)
+{
+  int size = 0;
+  int alignment = 1;
+  GList *l;
+  gboolean have_error = FALSE;
+
+  *alignment_out = -2; /* mark to detect recursion */
+
+  for (l = members; l; l = l->next)
+    {
+      GIrNode *member = (GIrNode *)l->data;
+
+      if (member->type == G_IR_NODE_FIELD)
+       {
+         GIrNodeField *field = (GIrNodeField *)member;
+
+         if (!have_error)
+           {
+             int member_size;
+             int member_alignment;
+
+             if (get_field_size_alignment (build,field, node,
+                                           &member_size, &member_alignment))
+               {
+                 size = MAX (size, member_size);
+                 alignment = MAX (alignment, member_alignment);
+               }
+             else
+               have_error = TRUE;
+           }
+       }
+    }
+
+  /* Unions are tail-padded out to a multiple of their alignment */
+  size = GI_ALIGN (size, alignment);
+
+  if (!have_error)
+    {
+      *size_out = size;
+      *alignment_out = alignment;
+    }
+  else
+    {
+      *size_out = -1;
+      *alignment_out = -1;
+    }
+
+  return !have_error;
+}
+
+static gboolean
+check_needs_computation (GIrTypelibBuild *build,
+                        GIrNode   *node,
+                        gint       alignment)
+{
+  GIrModule *module = build->module;
+  /*
+   *  0: Not yet computed
+   * >0: Previously succeeded
+   * -1: Previously failed
+   * -2: In progress
+   */
+  if (alignment == -2)
+    {
+      g_warning ("Recursion encountered when computing the size of %s.%s",
+                module->name, node->name);
+    }
+
+  return alignment == 0;
+}
+
+/**
+ * _g_ir_node_compute_offsets:
+ * @build: Current typelib build
+ * @node: a #GIrNode
+ *
+ * If a node is a a structure or union, makes sure that the field
+ * offsets have been computed, and also computes the overall size and
+ * alignment for the type.
+ */
+void
+_g_ir_node_compute_offsets (GIrTypelibBuild *build,
+                           GIrNode         *node)
+{
+  gboolean appended_stack;
+
+  if (build->stack)
+    appended_stack = node != (GIrNode*)build->stack->data; 
+  else
+    appended_stack = TRUE;
+  if (appended_stack)
+    build->stack = g_list_prepend (build->stack, node);
+
+  switch (node->type)
+    {
+    case G_IR_NODE_BOXED:
+      {
+       GIrNodeBoxed *boxed = (GIrNodeBoxed *)node;
+
+       if (!check_needs_computation (build, node, boxed->alignment))
+         return;
+
+       compute_struct_field_offsets (build, node, boxed->members,
+                                     &boxed->size, &boxed->alignment);
+       break;
+      }
+    case G_IR_NODE_STRUCT:
+      {
+       GIrNodeStruct *struct_ = (GIrNodeStruct *)node;
+
+       if (!check_needs_computation (build, node, struct_->alignment))
+         return;
+
+       compute_struct_field_offsets (build, node, struct_->members,
+                                     &struct_->size, &struct_->alignment);
+       break;
+      }
+    case G_IR_NODE_OBJECT:
+    case G_IR_NODE_INTERFACE:
+      {
+       GIrNodeInterface *iface = (GIrNodeInterface *)node;
+
+       if (!check_needs_computation (build, node, iface->alignment))
+         return;
+
+       compute_struct_field_offsets (build, node, iface->members,
+                                     &iface->size, &iface->alignment);
+       break;
+      }
+    case G_IR_NODE_UNION:
+      {
+       GIrNodeUnion *union_ = (GIrNodeUnion *)node;
+
+       if (!check_needs_computation (build, node, union_->alignment))
+         return;
+
+       compute_union_field_offsets (build, (GIrNode*)union_, union_->members,
+                                    &union_->size, &union_->alignment);
+       break;
+      }
+    case G_IR_NODE_ENUM:
+    case G_IR_NODE_FLAGS:
+      {
+       GIrNodeEnum *enum_ = (GIrNodeEnum *)node;
+
+       if (enum_->storage_type != GI_TYPE_TAG_VOID) /* already done */
+         return;
+
+       compute_enum_storage_type (enum_);
+
+       break;
+      }
+    default:
+      break;
+    }
+  
+  if (appended_stack)
+    build->stack = g_list_delete_link (build->stack, build->stack);
+}
diff --git a/girepository/girparser.c b/girepository/girparser.c
new file mode 100644 (file)
index 0000000..fa0de1f
--- /dev/null
@@ -0,0 +1,3581 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: A parser for the XML GIR format
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008 Philip Van Hoof
+ *
+ * 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 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.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+#include <glib.h>
+#include "girparser.h"
+#include "girmodule.h"
+#include "girnode.h"
+#include "gitypelib-internal.h"
+#include "config.h"
+
+/* This is a "major" version in the sense that it's only bumped
+ * for incompatible changes.
+ */
+#define SUPPORTED_GIR_VERSION "1.2"
+
+struct _GIrParser
+{
+  gchar **includes;
+  GList *parsed_modules; /* All previously parsed modules */
+};
+
+typedef enum
+{
+  STATE_START,
+  STATE_END,
+  STATE_REPOSITORY,
+  STATE_INCLUDE,
+  STATE_C_INCLUDE,
+  STATE_PACKAGE,  /* 5 */
+  STATE_NAMESPACE,
+  STATE_ENUM,
+  STATE_BITFIELD,
+  STATE_FUNCTION,
+  STATE_FUNCTION_RETURN,  /* 10 */
+  STATE_FUNCTION_PARAMETERS,
+  STATE_FUNCTION_PARAMETER,
+  STATE_CLASS,
+  STATE_CLASS_FIELD,
+  STATE_CLASS_PROPERTY,  /* 15 */
+  STATE_INTERFACE,
+  STATE_INTERFACE_PROPERTY,
+  STATE_INTERFACE_FIELD,
+  STATE_IMPLEMENTS,
+  STATE_PREREQUISITE,    /* 20 */
+  STATE_BOXED,
+  STATE_BOXED_FIELD,
+  STATE_STRUCT,
+  STATE_STRUCT_FIELD,
+  STATE_UNION,           /* 25 */
+  STATE_UNION_FIELD,
+  STATE_NAMESPACE_CONSTANT,
+  STATE_CLASS_CONSTANT,
+  STATE_INTERFACE_CONSTANT,
+  STATE_ALIAS,           /* 30 */
+  STATE_TYPE,
+  STATE_ATTRIBUTE,
+  STATE_DOC,
+  STATE_PASSTHROUGH
+} ParseState;
+
+typedef struct _ParseContext ParseContext;
+struct _ParseContext
+{
+  GIrParser *parser;
+
+  ParseState state;
+  int unknown_depth;
+  ParseState prev_state;
+
+  GList *modules;
+  GList *include_modules;
+  GList *dependencies;
+  GHashTable *aliases;
+  GHashTable *disguised_structures;
+
+  const char *file_path;
+  const char *namespace;
+  const char *c_prefix;
+  GIrModule *current_module;
+  GSList *node_stack;
+  char *current_alias;
+  GIrNode *current_typed;
+  GList *type_stack;
+  GList *type_parameters;
+  int type_depth;
+  gboolean in_embedded_type;
+};
+#define CURRENT_NODE(ctx) ((GIrNode *)((ctx)->node_stack->data))
+
+static void start_element_handler (GMarkupParseContext *context,
+                                  const gchar         *element_name,
+                                  const gchar        **attribute_names,
+                                  const gchar        **attribute_values,
+                                  gpointer             user_data,
+                                  GError             **error);
+static void end_element_handler   (GMarkupParseContext *context,
+                                  const gchar         *element_name,
+                                  gpointer             user_data,
+                                  GError             **error);
+static void text_handler          (GMarkupParseContext *context,
+                                  const gchar         *text,
+                                  gsize                text_len,
+                                  gpointer             user_data,
+                                  GError             **error);
+static void cleanup               (GMarkupParseContext *context,
+                                  GError              *error,
+                                  gpointer             user_data);
+static void state_switch (ParseContext *ctx, ParseState newstate);
+
+
+static GMarkupParser markup_parser =
+{
+  start_element_handler,
+  end_element_handler,
+  text_handler,
+  NULL,
+  cleanup
+};
+
+static gboolean
+start_alias (GMarkupParseContext *context,
+            const gchar         *element_name,
+            const gchar        **attribute_names,
+            const gchar        **attribute_values,
+            ParseContext        *ctx,
+            GError             **error);
+static gboolean
+start_type (GMarkupParseContext *context,
+           const gchar         *element_name,
+           const gchar        **attribute_names,
+           const gchar        **attribute_values,
+           ParseContext        *ctx,
+           GError             **error);
+
+static const gchar *find_attribute (const gchar  *name,
+                                   const gchar **attribute_names,
+                                   const gchar **attribute_values);
+
+
+GIrParser *
+_g_ir_parser_new (void)
+{
+  GIrParser *parser = g_slice_new0 (GIrParser);
+
+  return parser;
+}
+
+void
+_g_ir_parser_free (GIrParser *parser)
+{
+  GList *l;
+
+  if (parser->includes)
+    g_strfreev (parser->includes);
+
+  for (l = parser->parsed_modules; l; l = l->next)
+    _g_ir_module_free (l->data);
+
+  g_slice_free (GIrParser, parser);
+}
+
+void
+_g_ir_parser_set_includes (GIrParser          *parser,
+                          const gchar *const *includes)
+{
+  if (parser->includes)
+    g_strfreev (parser->includes);
+
+  parser->includes = g_strdupv ((char **)includes);
+}
+
+static void
+firstpass_start_element_handler (GMarkupParseContext *context,
+                                const gchar         *element_name,
+                                const gchar        **attribute_names,
+                                const gchar        **attribute_values,
+                                gpointer             user_data,
+                                GError             **error)
+{
+  ParseContext *ctx = user_data;
+
+  if (strcmp (element_name, "alias") == 0)
+    {
+      start_alias (context, element_name, attribute_names, attribute_values,
+                  ctx, error);
+    }
+  else if (ctx->state == STATE_ALIAS && strcmp (element_name, "type") == 0)
+    {
+      start_type (context, element_name, attribute_names, attribute_values,
+                 ctx, error);
+    }
+  else if (strcmp (element_name, "record") == 0)
+    {
+      const gchar *name;
+      const gchar *disguised;
+
+      name = find_attribute ("name", attribute_names, attribute_values);
+      disguised = find_attribute ("disguised", attribute_names, attribute_values);
+
+      if (disguised && strcmp (disguised, "1") == 0)
+       {
+         char *key;
+
+         key = g_strdup_printf ("%s.%s", ctx->namespace, name);
+         g_hash_table_replace (ctx->disguised_structures, key, GINT_TO_POINTER (1));
+       }
+    }
+}
+
+static void
+firstpass_end_element_handler (GMarkupParseContext *context,
+                              const gchar         *element_name,
+                              gpointer             user_data,
+                              GError             **error)
+{
+  ParseContext *ctx = user_data;
+  if (strcmp (element_name, "alias") == 0)
+    {
+      state_switch (ctx, STATE_NAMESPACE);
+      g_free (ctx->current_alias);
+      ctx->current_alias = NULL;
+    }
+  else if (strcmp (element_name, "type") == 0 && ctx->state == STATE_TYPE)
+    state_switch (ctx, ctx->prev_state);
+}
+
+static GMarkupParser firstpass_parser =
+{
+  firstpass_start_element_handler,
+  firstpass_end_element_handler,
+  NULL,
+  NULL,
+  NULL,
+};
+
+static char *
+locate_gir (GIrParser  *parser,
+           const char *girname)
+{
+  const gchar *const *datadirs;
+  const gchar *const *dir;
+  char *path = NULL;
+
+  datadirs = g_get_system_data_dirs ();
+
+  if (parser->includes != NULL)
+    {
+      for (dir = (const gchar *const *)parser->includes; *dir; dir++)
+       {
+         path = g_build_filename (*dir, girname, NULL);
+         if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
+           return path;
+         g_free (path);
+         path = NULL;
+       }
+    }
+  for (dir = datadirs; *dir; dir++)
+    {
+      path = g_build_filename (*dir, GIR_SUFFIX, girname, NULL);
+      if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
+       return path;
+      g_free (path);
+      path = NULL;
+    }
+
+  path = g_build_filename (GIR_DIR, girname, NULL);
+  if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
+    return path;
+  g_free (path);
+  return NULL;
+}
+
+#define MISSING_ATTRIBUTE(context,error,element,attribute)                             \
+  do {                                                                          \
+    int line_number, char_number;                                                \
+    g_markup_parse_context_get_position (context, &line_number, &char_number);  \
+    g_set_error (error,                                                         \
+                G_MARKUP_ERROR,                                                \
+                G_MARKUP_ERROR_INVALID_CONTENT,                                \
+                "Line %d, character %d: The attribute '%s' on the element '%s' must be specified",    \
+                line_number, char_number, attribute, element);         \
+  } while (0)
+
+static const gchar *
+find_attribute (const gchar  *name,
+               const gchar **attribute_names,
+               const gchar **attribute_values)
+{
+  gint i;
+
+  for (i = 0; attribute_names[i] != NULL; i++)
+    if (strcmp (attribute_names[i], name) == 0)
+      return attribute_values[i];
+
+  return 0;
+}
+
+static void
+state_switch (ParseContext *ctx, ParseState newstate)
+{
+  g_assert (ctx->state != newstate);
+  ctx->prev_state = ctx->state;
+  ctx->state = newstate;
+}
+
+static GIrNode *
+pop_node (ParseContext *ctx)
+{
+  g_assert (ctx->node_stack != 0);
+
+  GSList *top = ctx->node_stack;
+  GIrNode *node = top->data;
+
+  g_debug ("popping node %d %s", node->type, node->name);
+  ctx->node_stack = top->next;
+  g_slist_free_1 (top);
+  return node;
+}
+
+static void
+push_node (ParseContext *ctx, GIrNode *node)
+{
+  g_assert (node != NULL);
+  g_debug ("pushing node %d %s", node->type, node->name);
+  ctx->node_stack = g_slist_prepend (ctx->node_stack, node);
+}
+
+static GIrNodeType * parse_type_internal (GIrModule *module,
+                                         const gchar *str, gchar **next, gboolean in_glib,
+                                         gboolean in_gobject);
+
+typedef struct {
+  const gchar *str;
+  guint size;
+  guint is_signed : 1;
+} IntegerAliasInfo;
+
+static IntegerAliasInfo integer_aliases[] = {
+  { "gchar",    SIZEOF_CHAR,      0 },
+  { "gshort",   SIZEOF_SHORT,     1 },
+  { "gushort",  SIZEOF_SHORT,     0 },
+  { "gint",     SIZEOF_INT,       1 },
+  { "guint",    SIZEOF_INT,       0 },
+  { "glong",    SIZEOF_LONG,      1 },
+  { "gulong",   SIZEOF_LONG,      0 },
+  { "gssize",   GLIB_SIZEOF_SIZE_T,    1 },
+  { "gsize",    GLIB_SIZEOF_SIZE_T,    0 },
+  { "gintptr",  GLIB_SIZEOF_SIZE_T,    1 },
+  { "guintptr", GLIB_SIZEOF_SIZE_T,    0 },
+};
+
+typedef struct {
+  const gchar *str;
+  gint tag;
+  gboolean pointer;
+} BasicTypeInfo;
+
+#define BASIC_TYPE_FIXED_OFFSET 3
+
+static BasicTypeInfo basic_types[] = {
+    { "none",      GI_TYPE_TAG_VOID,    0 },
+    { "gpointer",  GI_TYPE_TAG_VOID,    1 },
+
+    { "gboolean",  GI_TYPE_TAG_BOOLEAN, 0 },
+    { "gint8",     GI_TYPE_TAG_INT8,    0 }, /* Start of BASIC_TYPE_FIXED_OFFSET */
+    { "guint8",    GI_TYPE_TAG_UINT8,   0 },
+    { "gint16",    GI_TYPE_TAG_INT16,   0 },
+    { "guint16",   GI_TYPE_TAG_UINT16,  0 },
+    { "gint32",    GI_TYPE_TAG_INT32,   0 },
+    { "guint32",   GI_TYPE_TAG_UINT32,  0 },
+    { "gint64",    GI_TYPE_TAG_INT64,   0 },
+    { "guint64",   GI_TYPE_TAG_UINT64,  0 },
+    { "gfloat",    GI_TYPE_TAG_FLOAT,   0 },
+    { "gdouble",   GI_TYPE_TAG_DOUBLE,  0 },
+    { "GType",     GI_TYPE_TAG_GTYPE,   0 },
+    { "utf8",      GI_TYPE_TAG_UTF8,    1 },
+    { "filename",  GI_TYPE_TAG_FILENAME,1 },
+    { "gunichar",  GI_TYPE_TAG_UNICHAR, 0 },
+};
+
+static const BasicTypeInfo *
+parse_basic (const char *str)
+{
+  guint i;
+  guint n_basic = G_N_ELEMENTS (basic_types);
+
+  for (i = 0; i < n_basic; i++)
+    {
+      if (strcmp (str, basic_types[i].str) == 0)
+       return &(basic_types[i]);
+    }
+  for (i = 0; i < G_N_ELEMENTS (integer_aliases); i++)
+    {
+      if (strcmp (str, integer_aliases[i].str) == 0)
+       {
+         switch (integer_aliases[i].size)
+           {
+           case sizeof(guint8):
+             if (integer_aliases[i].is_signed)
+               return &basic_types[BASIC_TYPE_FIXED_OFFSET];
+             else
+               return &basic_types[BASIC_TYPE_FIXED_OFFSET+1];
+             break;
+           case sizeof(guint16):
+             if (integer_aliases[i].is_signed)
+               return &basic_types[BASIC_TYPE_FIXED_OFFSET+2];
+             else
+               return &basic_types[BASIC_TYPE_FIXED_OFFSET+3];
+             break;
+           case sizeof(guint32):
+             if (integer_aliases[i].is_signed)
+               return &basic_types[BASIC_TYPE_FIXED_OFFSET+4];
+             else
+               return &basic_types[BASIC_TYPE_FIXED_OFFSET+5];
+             break;
+           case sizeof(guint64):
+             if (integer_aliases[i].is_signed)
+               return &basic_types[BASIC_TYPE_FIXED_OFFSET+6];
+             else
+               return &basic_types[BASIC_TYPE_FIXED_OFFSET+7];
+             break;
+           default:
+             g_assert_not_reached ();
+           }
+       }
+    }
+  return NULL;
+}
+
+static GIrNodeType *
+parse_type_internal (GIrModule *module,
+                    const gchar *str, char **next, gboolean in_glib,
+                    gboolean in_gobject)
+{
+  const BasicTypeInfo *basic;
+  GIrNodeType *type;
+  char *temporary_type = NULL;
+
+  type = (GIrNodeType *)_g_ir_node_new (G_IR_NODE_TYPE, module);
+
+  type->unparsed = g_strdup (str);
+
+  /* See comment below on GLib.List handling */
+  if (in_gobject && strcmp (str, "Type") == 0)
+    {
+      temporary_type = g_strdup ("GLib.Type");
+      str = temporary_type;
+    }
+
+  basic = parse_basic (str);
+  if (basic != NULL)
+    {
+      type->is_basic = TRUE;
+      type->tag = basic->tag;
+      type->is_pointer = basic->pointer;
+
+      str += strlen(basic->str);
+    }
+  else if (in_glib)
+    {
+      /* If we're inside GLib, handle "List" etc. by prefixing with
+       * "GLib." so the parsing code below doesn't have to get more
+       * special.
+       */
+      if (g_str_has_prefix (str, "List<") ||
+         strcmp (str, "List") == 0)
+       {
+         temporary_type = g_strdup_printf ("GLib.List%s", str + 4);
+         str = temporary_type;
+       }
+      else if (g_str_has_prefix (str, "SList<") ||
+         strcmp (str, "SList") == 0)
+       {
+         temporary_type = g_strdup_printf ("GLib.SList%s", str + 5);
+         str = temporary_type;
+       }
+      else if (g_str_has_prefix (str, "HashTable<") ||
+         strcmp (str, "HashTable") == 0)
+       {
+         temporary_type = g_strdup_printf ("GLib.HashTable%s", str + 9);
+         str = temporary_type;
+       }
+      else if (g_str_has_prefix (str, "Error<") ||
+         strcmp (str, "Error") == 0)
+       {
+         temporary_type = g_strdup_printf ("GLib.Error%s", str + 5);
+         str = temporary_type;
+       }
+    }
+
+  if (basic != NULL)
+    /* found a basic type */;
+  else if (g_str_has_prefix (str, "GLib.List") ||
+          g_str_has_prefix (str, "GLib.SList"))
+    {
+      str += strlen ("GLib.");
+      if (g_str_has_prefix (str, "List"))
+       {
+         type->tag = GI_TYPE_TAG_GLIST;
+         type->is_glist = TRUE;
+         type->is_pointer = TRUE;
+         str += strlen ("List");
+       }
+      else
+       {
+         type->tag = GI_TYPE_TAG_GSLIST;
+         type->is_gslist = TRUE;
+         type->is_pointer = TRUE;
+         str += strlen ("SList");
+       }
+    }
+  else if (g_str_has_prefix (str, "GLib.HashTable"))
+    {
+      str += strlen ("GLib.");
+
+      type->tag = GI_TYPE_TAG_GHASH;
+      type->is_ghashtable = TRUE;
+      type->is_pointer = TRUE;
+      str += strlen ("HashTable");
+    }
+  else if (g_str_has_prefix (str, "GLib.Error"))
+    {
+      str += strlen ("GLib.");
+
+      type->tag = GI_TYPE_TAG_ERROR;
+      type->is_error = TRUE;
+      type->is_pointer = TRUE;
+      str += strlen ("Error");
+
+      if (*str == '<')
+       {
+         (str)++;
+         char *tmp, *end;
+
+         end = strchr (str, '>');
+         tmp = g_strndup (str, end - str);
+         type->errors = g_strsplit (tmp, ",", 0);
+         g_free (tmp);
+
+         str = end;
+       }
+    }
+  else
+    {
+      type->tag = GI_TYPE_TAG_INTERFACE;
+      type->is_interface = TRUE;
+      const char *start = str;
+
+      /* must be an interface type */
+      while (g_ascii_isalnum (*str) ||
+            *str == '.' ||
+            *str == '-' ||
+            *str == '_' ||
+            *str == ':')
+       (str)++;
+
+      type->interface = g_strndup (start, str - start);
+    }
+
+  if (next)
+    *next = (char*)str;
+  g_assert (type->tag >= 0 && type->tag < GI_TYPE_TAG_N_TYPES);
+  g_free (temporary_type);
+  return type;
+
+/* error: */
+  _g_ir_node_free ((GIrNode *)type);
+  g_free (temporary_type);
+  return NULL;
+}
+
+static const char *
+resolve_aliases (ParseContext *ctx, const gchar *type)
+{
+  gpointer orig;
+  gpointer value;
+  GSList *seen_values = NULL;
+  const gchar *lookup;
+  gchar *prefixed;
+
+  if (strchr (type, '.') == NULL)
+    {
+      prefixed = g_strdup_printf ("%s.%s", ctx->namespace, type);
+      lookup = prefixed;
+    }
+  else
+    {
+      lookup = type;
+      prefixed = NULL;
+    }
+
+  seen_values = g_slist_prepend (seen_values, (char*)lookup);
+  while (g_hash_table_lookup_extended (ctx->current_module->aliases, lookup, &orig, &value))
+    {
+      g_debug ("Resolved: %s => %s\n", lookup, (char*)value);
+      lookup = value;
+      if (g_slist_find_custom (seen_values, lookup,
+                              (GCompareFunc)strcmp) != NULL)
+       break;
+      seen_values = g_slist_prepend (seen_values, (gchar*)lookup);
+    }
+  g_slist_free (seen_values);
+
+  if (lookup == prefixed)
+    lookup = type;
+
+  g_free (prefixed);
+
+  return lookup;
+}
+
+static gboolean
+is_disguised_structure (ParseContext *ctx, const gchar *type)
+{
+  const gchar *lookup;
+  gchar *prefixed;
+  gboolean result;
+
+  if (strchr (type, '.') == NULL)
+    {
+      prefixed = g_strdup_printf ("%s.%s", ctx->namespace, type);
+      lookup = prefixed;
+    }
+  else
+    {
+      lookup = type;
+      prefixed = NULL;
+    }
+
+  result = g_hash_table_lookup (ctx->current_module->disguised_structures,
+                               lookup) != NULL;
+
+  g_free (prefixed);
+
+  return result;
+}
+
+static GIrNodeType *
+parse_type (ParseContext *ctx, const gchar *type)
+{
+  GIrNodeType *node;
+  const BasicTypeInfo *basic;
+  gboolean in_glib, in_gobject;
+
+  in_glib = strcmp (ctx->namespace, "GLib") == 0;
+  in_gobject = strcmp (ctx->namespace, "GObject") == 0;
+
+  /* Do not search aliases for basic types */
+  basic = parse_basic (type);
+  if (basic == NULL)
+    type = resolve_aliases (ctx, type);
+
+  node = parse_type_internal (ctx->current_module, type, NULL, in_glib, in_gobject);
+  if (node)
+    g_debug ("Parsed type: %s => %d", type, node->tag);
+  else
+    g_critical ("Failed to parse type: '%s'", type);
+
+  return node;
+}
+
+static gboolean
+introspectable_prelude (GMarkupParseContext *context,
+                   const gchar        **attribute_names,
+                   const gchar        **attribute_values,
+                   ParseContext        *ctx,
+                   ParseState           new_state)
+{
+  const gchar *introspectable_arg;
+  const gchar *shadowed_by;
+  gboolean introspectable;
+
+  g_assert (ctx->state != STATE_PASSTHROUGH);
+
+  introspectable_arg = find_attribute ("introspectable", attribute_names, attribute_values);
+  shadowed_by = find_attribute ("shadowed-by", attribute_names, attribute_values);
+
+  introspectable = !(introspectable_arg && atoi (introspectable_arg) == 0) && shadowed_by == NULL;
+
+  if (introspectable)
+    state_switch (ctx, new_state);
+  else
+    {
+      state_switch (ctx, STATE_PASSTHROUGH);
+      ctx->unknown_depth = 1;
+    }
+
+  return introspectable;
+}
+
+static gboolean
+start_glib_boxed (GMarkupParseContext *context,
+                 const gchar         *element_name,
+                 const gchar        **attribute_names,
+                 const gchar        **attribute_values,
+                 ParseContext        *ctx,
+                 GError             **error)
+{
+  const gchar *name;
+  const gchar *typename;
+  const gchar *typeinit;
+  const gchar *deprecated;
+  GIrNodeBoxed *boxed;
+
+  if (!(strcmp (element_name, "glib:boxed") == 0 &&
+       ctx->state == STATE_NAMESPACE))
+    return FALSE;
+
+  if (!introspectable_prelude (context, attribute_names, attribute_values, ctx, STATE_BOXED))
+    return TRUE;
+
+  name = find_attribute ("glib:name", attribute_names, attribute_values);
+  typename = find_attribute ("glib:type-name", attribute_names, attribute_values);
+  typeinit = find_attribute ("glib:get-type", attribute_names, attribute_values);
+  deprecated = find_attribute ("deprecated", attribute_names, attribute_values);
+
+  if (name == NULL)
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "glib:name");
+      return FALSE;
+    }
+  else if (typename == NULL)
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "glib:type-name");
+      return FALSE;
+    }
+  else if (typeinit == NULL)
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "glib:get-type");
+      return FALSE;
+    }
+
+  boxed = (GIrNodeBoxed *) _g_ir_node_new (G_IR_NODE_BOXED,
+                                         ctx->current_module);
+
+  ((GIrNode *)boxed)->name = g_strdup (name);
+  boxed->gtype_name = g_strdup (typename);
+  boxed->gtype_init = g_strdup (typeinit);
+  if (deprecated)
+    boxed->deprecated = TRUE;
+  else
+    boxed->deprecated = FALSE;
+
+  push_node (ctx, (GIrNode *)boxed);
+  ctx->current_module->entries =
+    g_list_append (ctx->current_module->entries, boxed);
+
+  return TRUE;
+}
+
+static gboolean
+start_function (GMarkupParseContext *context,
+               const gchar         *element_name,
+               const gchar        **attribute_names,
+               const gchar        **attribute_values,
+               ParseContext        *ctx,
+               GError             **error)
+{
+  const gchar *name;
+  const gchar *shadows;
+  const gchar *symbol;
+  const gchar *deprecated;
+  const gchar *throws;
+  GIrNodeFunction *function;
+  gboolean found = FALSE;
+  gboolean in_embedded_type;
+
+  switch (ctx->state)
+    {
+    case STATE_NAMESPACE:
+      found = (strcmp (element_name, "function") == 0 ||
+              strcmp (element_name, "callback") == 0);
+      break;
+    case STATE_CLASS:
+    case STATE_BOXED:
+    case STATE_STRUCT:
+    case STATE_UNION:
+      found = strcmp (element_name, "constructor") == 0;
+      /* fallthrough */
+    case STATE_INTERFACE:
+      found = (found ||
+              strcmp (element_name, "function") == 0 ||
+              strcmp (element_name, "method") == 0 ||
+              strcmp (element_name, "callback") == 0);
+      break;
+    case STATE_ENUM:
+      found = strcmp (element_name, "function") == 0;
+      break;
+    case STATE_STRUCT_FIELD:
+      found = (found || strcmp (element_name, "callback") == 0);
+      break;
+    default:
+      break;
+    }
+
+  if (!found)
+    return FALSE;
+
+  in_embedded_type = ctx->state == STATE_STRUCT_FIELD;
+
+  if (!introspectable_prelude (context, attribute_names, attribute_values, ctx, STATE_FUNCTION))
+    return TRUE;
+
+  ctx->in_embedded_type = in_embedded_type;
+
+  name = find_attribute ("name", attribute_names, attribute_values);
+  shadows = find_attribute ("shadows", attribute_names, attribute_values);
+  symbol = find_attribute ("c:identifier", attribute_names, attribute_values);
+  deprecated = find_attribute ("deprecated", attribute_names, attribute_values);
+  throws = find_attribute ("throws", attribute_names, attribute_values);
+
+  if (name == NULL)
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "name");
+      return FALSE;
+    }
+  else if (strcmp (element_name, "callback") != 0 && symbol == NULL)
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "c:identifier");
+      return FALSE;
+    }
+
+  if (shadows)
+    name = shadows;
+
+  function = (GIrNodeFunction *) _g_ir_node_new (G_IR_NODE_FUNCTION,
+                                               ctx->current_module);
+
+  ((GIrNode *)function)->name = g_strdup (name);
+  function->symbol = g_strdup (symbol);
+  function->parameters = NULL;
+  if (deprecated)
+    function->deprecated = TRUE;
+  else
+    function->deprecated = FALSE;
+
+  if (strcmp (element_name, "method") == 0 ||
+      strcmp (element_name, "constructor") == 0)
+    {
+      function->is_method = TRUE;
+
+      if (strcmp (element_name, "constructor") == 0)
+       function->is_constructor = TRUE;
+      else
+       function->is_constructor = FALSE;
+    }
+  else
+    {
+      function->is_method = FALSE;
+      function->is_setter = FALSE;
+      function->is_getter = FALSE;
+      function->is_constructor = FALSE;
+      if (strcmp (element_name, "callback") == 0)
+       ((GIrNode *)function)->type = G_IR_NODE_CALLBACK;
+    }
+
+  if (throws && strcmp (throws, "1") == 0)
+    function->throws = TRUE;
+  else
+    function->throws = FALSE;
+
+  if (ctx->node_stack == NULL)
+    {
+      ctx->current_module->entries =
+       g_list_append (ctx->current_module->entries, function);
+    }
+  else if (ctx->current_typed)
+    {
+      GIrNodeField *field;
+
+      field = (GIrNodeField *)ctx->current_typed;
+      field->callback = function;
+    }
+  else
+    switch (CURRENT_NODE (ctx)->type)
+      {
+      case G_IR_NODE_INTERFACE:
+      case G_IR_NODE_OBJECT:
+       {
+         GIrNodeInterface *iface;
+
+         iface = (GIrNodeInterface *)CURRENT_NODE (ctx);
+         iface->members = g_list_append (iface->members, function);
+       }
+       break;
+      case G_IR_NODE_BOXED:
+       {
+         GIrNodeBoxed *boxed;
+
+         boxed = (GIrNodeBoxed *)CURRENT_NODE (ctx);
+         boxed->members = g_list_append (boxed->members, function);
+       }
+       break;
+      case G_IR_NODE_STRUCT:
+       {
+         GIrNodeStruct *struct_;
+
+         struct_ = (GIrNodeStruct *)CURRENT_NODE (ctx);
+         struct_->members = g_list_append (struct_->members, function);                }
+       break;
+      case G_IR_NODE_UNION:
+       {
+         GIrNodeUnion *union_;
+
+         union_ = (GIrNodeUnion *)CURRENT_NODE (ctx);
+         union_->members = g_list_append (union_->members, function);
+       }
+       break;
+      case G_IR_NODE_ENUM:
+      case G_IR_NODE_FLAGS:
+       {
+         GIrNodeEnum *enum_;
+
+         enum_ = (GIrNodeEnum *)CURRENT_NODE (ctx);
+         enum_->methods = g_list_append (enum_->methods, function);
+       }
+       break;
+      default:
+       g_assert_not_reached ();
+      }
+
+  push_node(ctx, (GIrNode *)function);
+
+  return TRUE;
+}
+
+static void
+parse_property_transfer (GIrNodeProperty *property,
+                         const gchar     *transfer,
+                         ParseContext    *ctx)
+{
+  if (transfer == NULL)
+  {
+#if 0
+    GIrNodeInterface *iface = (GIrNodeInterface *)CURRENT_NODE (ctx);
+
+    g_debug ("required attribute 'transfer-ownership' is missing from "
+             "property '%s' in type '%s.%s'. Assuming 'none'\n",
+             property->node.name, ctx->namespace, iface->node.name);
+#endif
+    transfer = "none";
+  }
+  if (strcmp (transfer, "none") == 0)
+    {
+      property->transfer = FALSE;
+      property->shallow_transfer = FALSE;
+    }
+  else if (strcmp (transfer, "container") == 0)
+    {
+      property->transfer = FALSE;
+      property->shallow_transfer = TRUE;
+    }
+  else if (strcmp (transfer, "full") == 0)
+    {
+      property->transfer = TRUE;
+      property->shallow_transfer = FALSE;
+    }
+  else
+    {
+      GIrNodeInterface *iface = (GIrNodeInterface *)CURRENT_NODE (ctx);
+
+      g_warning ("Unknown transfer-ownership value: '%s' for property '%s' in "
+                 "type '%s.%s'", transfer, property->node.name, ctx->namespace,
+                 iface->node.name);
+    }
+}
+
+static gboolean
+parse_param_transfer (GIrNodeParam *param, const gchar *transfer, const gchar *name,
+                     GError **error)
+{
+  if (transfer == NULL)
+  {
+    g_set_error (error, G_MARKUP_ERROR,
+                G_MARKUP_ERROR_INVALID_CONTENT,
+                "required attribute 'transfer-ownership' missing");
+    return FALSE;
+  }
+  else if (strcmp (transfer, "none") == 0)
+    {
+      param->transfer = FALSE;
+      param->shallow_transfer = FALSE;
+    }
+  else if (strcmp (transfer, "container") == 0)
+    {
+      param->transfer = FALSE;
+      param->shallow_transfer = TRUE;
+    }
+  else if (strcmp (transfer, "full") == 0)
+    {
+      param->transfer = TRUE;
+      param->shallow_transfer = FALSE;
+    }
+  else
+    {
+      g_set_error (error, G_MARKUP_ERROR,
+                  G_MARKUP_ERROR_INVALID_CONTENT,
+                  "invalid value for 'transfer-ownership': %s", transfer);
+      return FALSE;
+    }
+  return TRUE;
+}
+
+static gboolean
+start_parameter (GMarkupParseContext *context,
+                const gchar         *element_name,
+                const gchar        **attribute_names,
+                const gchar        **attribute_values,
+                ParseContext        *ctx,
+                GError             **error)
+{
+  const gchar *name;
+  const gchar *direction;
+  const gchar *retval;
+  const gchar *optional;
+  const gchar *caller_allocates;
+  const gchar *allow_none;
+  const gchar *transfer;
+  const gchar *scope;
+  const gchar *closure;
+  const gchar *destroy;
+  const gchar *skip;
+  GIrNodeParam *param;
+
+  if (!(strcmp (element_name, "parameter") == 0 &&
+       ctx->state == STATE_FUNCTION_PARAMETERS))
+    return FALSE;
+
+  name = find_attribute ("name", attribute_names, attribute_values);
+  direction = find_attribute ("direction", attribute_names, attribute_values);
+  retval = find_attribute ("retval", attribute_names, attribute_values);
+  optional = find_attribute ("optional", attribute_names, attribute_values);
+  allow_none = find_attribute ("allow-none", attribute_names, attribute_values);
+  caller_allocates = find_attribute ("caller-allocates", attribute_names, attribute_values);
+  transfer = find_attribute ("transfer-ownership", attribute_names, attribute_values);
+  scope = find_attribute ("scope", attribute_names, attribute_values);
+  closure = find_attribute ("closure", attribute_names, attribute_values);
+  destroy = find_attribute ("destroy", attribute_names, attribute_values);
+  skip = find_attribute ("skip", attribute_names, attribute_values);
+
+  if (name == NULL)
+    name = "unknown";
+
+  param = (GIrNodeParam *)_g_ir_node_new (G_IR_NODE_PARAM,
+                                         ctx->current_module);
+
+  ctx->current_typed = (GIrNode*) param;
+  ctx->current_typed->name = g_strdup (name);
+
+  state_switch (ctx, STATE_FUNCTION_PARAMETER);
+
+  if (direction && strcmp (direction, "out") == 0)
+    {
+      param->in = FALSE;
+      param->out = TRUE;
+      if (caller_allocates == NULL)
+       param->caller_allocates = FALSE;
+      else
+       param->caller_allocates = strcmp (caller_allocates, "1") == 0;
+    }
+  else if (direction && strcmp (direction, "inout") == 0)
+    {
+      param->in = TRUE;
+      param->out = TRUE;
+      param->caller_allocates = FALSE;
+    }
+  else
+    {
+      param->in = TRUE;
+      param->out = FALSE;
+      param->caller_allocates = FALSE;
+    }
+
+  if (retval && strcmp (retval, "1") == 0)
+    param->retval = TRUE;
+  else
+    param->retval = FALSE;
+
+  if (optional && strcmp (optional, "1") == 0)
+    param->optional = TRUE;
+  else
+    param->optional = FALSE;
+
+  if (allow_none && strcmp (allow_none, "1") == 0)
+    param->allow_none = TRUE;
+  else
+    param->allow_none = FALSE;
+
+  if (skip && strcmp (skip, "1") == 0)
+    param->skip = TRUE;
+  else
+    param->skip = FALSE;
+
+  if (!parse_param_transfer (param, transfer, name, error))
+    return FALSE;
+
+  if (scope && strcmp (scope, "call") == 0)
+    param->scope = GI_SCOPE_TYPE_CALL;
+  else if (scope && strcmp (scope, "async") == 0)
+    param->scope = GI_SCOPE_TYPE_ASYNC;
+  else if (scope && strcmp (scope, "notified") == 0)
+    param->scope = GI_SCOPE_TYPE_NOTIFIED;
+  else
+    param->scope = GI_SCOPE_TYPE_INVALID;
+
+  param->closure = closure ? atoi (closure) : -1;
+  param->destroy = destroy ? atoi (destroy) : -1;
+
+  ((GIrNode *)param)->name = g_strdup (name);
+
+  switch (CURRENT_NODE (ctx)->type)
+    {
+    case G_IR_NODE_FUNCTION:
+    case G_IR_NODE_CALLBACK:
+      {
+       GIrNodeFunction *func;
+
+       func = (GIrNodeFunction *)CURRENT_NODE (ctx);
+       func->parameters = g_list_append (func->parameters, param);
+      }
+      break;
+    case G_IR_NODE_SIGNAL:
+      {
+       GIrNodeSignal *signal;
+
+       signal = (GIrNodeSignal *)CURRENT_NODE (ctx);
+       signal->parameters = g_list_append (signal->parameters, param);
+      }
+      break;
+    case G_IR_NODE_VFUNC:
+      {
+       GIrNodeVFunc *vfunc;
+
+       vfunc = (GIrNodeVFunc *)CURRENT_NODE (ctx);
+       vfunc->parameters = g_list_append (vfunc->parameters, param);
+      }
+      break;
+    default:
+      g_assert_not_reached ();
+    }
+
+  return TRUE;
+}
+
+static gboolean
+start_field (GMarkupParseContext *context,
+            const gchar         *element_name,
+            const gchar        **attribute_names,
+            const gchar        **attribute_values,
+            ParseContext        *ctx,
+            GError             **error)
+{
+  const gchar *name;
+  const gchar *readable;
+  const gchar *writable;
+  const gchar *bits;
+  const gchar *branch;
+  GIrNodeField *field;
+  ParseState target_state;
+  gboolean introspectable;
+
+  switch (ctx->state)
+    {
+    case STATE_CLASS:
+      target_state = STATE_CLASS_FIELD;
+      break;
+    case STATE_BOXED:
+      target_state = STATE_BOXED_FIELD;
+      break;
+    case STATE_STRUCT:
+      target_state = STATE_STRUCT_FIELD;
+      break;
+    case STATE_UNION:
+      target_state = STATE_UNION_FIELD;
+      break;
+    case STATE_INTERFACE:
+      target_state = STATE_INTERFACE_FIELD;
+      break;
+    default:
+      return FALSE;
+    }
+
+  if (strcmp (element_name, "field") != 0)
+    return FALSE;
+
+  g_assert (ctx->state != STATE_PASSTHROUGH);
+
+  /* We handle introspectability specially here; we replace with just gpointer
+   * for the type.
+   */
+  introspectable = introspectable_prelude (context, attribute_names, attribute_values, ctx, target_state);
+
+  name = find_attribute ("name", attribute_names, attribute_values);
+  readable = find_attribute ("readable", attribute_names, attribute_values);
+  writable = find_attribute ("writable", attribute_names, attribute_values);
+  bits = find_attribute ("bits", attribute_names, attribute_values);
+  branch = find_attribute ("branch", attribute_names, attribute_values);
+
+  if (name == NULL)
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "name");
+      return FALSE;
+    }
+
+  field = (GIrNodeField *)_g_ir_node_new (G_IR_NODE_FIELD,
+                                         ctx->current_module);
+  if (introspectable)
+    {
+      ctx->current_typed = (GIrNode*) field;
+    }
+  else
+    {
+      field->type = parse_type (ctx, "gpointer");
+    }
+
+  ((GIrNode *)field)->name = g_strdup (name);
+  /* Fields are assumed to be read-only.
+   * (see also girwriter.py and generate.c)
+   */
+  field->readable = readable == NULL || strcmp (readable, "0") == 0;
+  field->writable = writable != NULL && strcmp (writable, "1") == 0;
+
+  if (bits)
+    field->bits = atoi (bits);
+  else
+    field->bits = 0;
+
+  switch (CURRENT_NODE (ctx)->type)
+    {
+    case G_IR_NODE_OBJECT:
+      {
+       GIrNodeInterface *iface;
+
+       iface = (GIrNodeInterface *)CURRENT_NODE (ctx);
+       iface->members = g_list_append (iface->members, field);
+      }
+      break;
+    case G_IR_NODE_INTERFACE:
+      {
+       GIrNodeInterface *iface;
+
+       iface = (GIrNodeInterface *)CURRENT_NODE (ctx);
+       iface->members = g_list_append (iface->members, field);
+      }
+      break;
+    case G_IR_NODE_BOXED:
+      {
+       GIrNodeBoxed *boxed;
+
+       boxed = (GIrNodeBoxed *)CURRENT_NODE (ctx);
+               boxed->members = g_list_append (boxed->members, field);
+      }
+      break;
+    case G_IR_NODE_STRUCT:
+      {
+       GIrNodeStruct *struct_;
+
+       struct_ = (GIrNodeStruct *)CURRENT_NODE (ctx);
+       struct_->members = g_list_append (struct_->members, field);
+      }
+      break;
+    case G_IR_NODE_UNION:
+      {
+       GIrNodeUnion *union_;
+
+       union_ = (GIrNodeUnion *)CURRENT_NODE (ctx);
+       union_->members = g_list_append (union_->members, field);
+       if (branch)
+         {
+           GIrNodeConstant *constant;
+
+           constant = (GIrNodeConstant *) _g_ir_node_new (G_IR_NODE_CONSTANT,
+                                                         ctx->current_module);
+           ((GIrNode *)constant)->name = g_strdup (name);
+           constant->value = g_strdup (branch);
+           constant->type = union_->discriminator_type;
+           constant->deprecated = FALSE;
+
+           union_->discriminators = g_list_append (union_->discriminators, constant);
+         }
+      }
+      break;
+    default:
+      g_assert_not_reached ();
+    }
+
+  return TRUE;
+}
+
+static gboolean
+start_alias (GMarkupParseContext *context,
+            const gchar         *element_name,
+            const gchar        **attribute_names,
+            const gchar        **attribute_values,
+            ParseContext        *ctx,
+            GError             **error)
+{
+  const gchar *name;
+
+  name = find_attribute ("name", attribute_names, attribute_values);
+  if (name == NULL)
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "name");
+      return FALSE;
+    }
+
+  ctx->current_alias = g_strdup (name);
+  state_switch (ctx, STATE_ALIAS);
+
+  return TRUE;
+}
+
+static gboolean
+start_enum (GMarkupParseContext *context,
+            const gchar         *element_name,
+            const gchar        **attribute_names,
+            const gchar        **attribute_values,
+            ParseContext        *ctx,
+            GError             **error)
+{
+  const gchar *name;
+  const gchar *typename;
+  const gchar *typeinit;
+  const gchar *deprecated;
+  const gchar *error_domain;
+  GIrNodeEnum *enum_;
+
+  if (!((strcmp (element_name, "enumeration") == 0 && ctx->state == STATE_NAMESPACE) ||
+       (strcmp (element_name, "bitfield") == 0 && ctx->state == STATE_NAMESPACE)))
+    return FALSE;
+
+  if (!introspectable_prelude (context, attribute_names, attribute_values, ctx, STATE_ENUM))
+    return TRUE;
+
+  name = find_attribute ("name", attribute_names, attribute_values);
+  typename = find_attribute ("glib:type-name", attribute_names, attribute_values);
+  typeinit = find_attribute ("glib:get-type", attribute_names, attribute_values);
+  error_domain = find_attribute ("glib:error-domain", attribute_names, attribute_values);
+  deprecated = find_attribute ("deprecated", attribute_names, attribute_values);
+
+  if (name == NULL)
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "name");
+      return FALSE;
+    }
+
+  if (strcmp (element_name, "enumeration") == 0)
+    enum_ = (GIrNodeEnum *) _g_ir_node_new (G_IR_NODE_ENUM,
+                                          ctx->current_module);
+  else
+    enum_ = (GIrNodeEnum *) _g_ir_node_new (G_IR_NODE_FLAGS,
+                                          ctx->current_module);
+  ((GIrNode *)enum_)->name = g_strdup (name);
+  enum_->gtype_name = g_strdup (typename);
+  enum_->gtype_init = g_strdup (typeinit);
+  enum_->error_domain = g_strdup (error_domain);
+
+  if (deprecated)
+    enum_->deprecated = TRUE;
+  else
+    enum_->deprecated = FALSE;
+
+  push_node (ctx, (GIrNode *) enum_);
+  ctx->current_module->entries =
+    g_list_append (ctx->current_module->entries, enum_);
+
+  return TRUE;
+}
+
+static gboolean
+start_property (GMarkupParseContext *context,
+               const gchar         *element_name,
+               const gchar        **attribute_names,
+               const gchar        **attribute_values,
+               ParseContext        *ctx,
+               GError             **error)
+{
+  ParseState target_state;
+  const gchar *name;
+  const gchar *readable;
+  const gchar *writable;
+  const gchar *construct;
+  const gchar *construct_only;
+  const gchar *transfer;
+  GIrNodeProperty *property;
+  GIrNodeInterface *iface;
+
+  if (!(strcmp (element_name, "property") == 0 &&
+       (ctx->state == STATE_CLASS ||
+        ctx->state == STATE_INTERFACE)))
+    return FALSE;
+
+  if (ctx->state == STATE_CLASS)
+    target_state = STATE_CLASS_PROPERTY;
+  else if (ctx->state == STATE_INTERFACE)
+    target_state = STATE_INTERFACE_PROPERTY;
+  else
+    g_assert_not_reached ();
+
+  if (!introspectable_prelude (context, attribute_names, attribute_values, ctx, target_state))
+    return TRUE;
+
+
+  name = find_attribute ("name", attribute_names, attribute_values);
+  readable = find_attribute ("readable", attribute_names, attribute_values);
+  writable = find_attribute ("writable", attribute_names, attribute_values);
+  construct = find_attribute ("construct", attribute_names, attribute_values);
+  construct_only = find_attribute ("construct-only", attribute_names, attribute_values);
+  transfer = find_attribute ("transfer-ownership", attribute_names, attribute_values);
+
+  if (name == NULL)
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "name");
+      return FALSE;
+    }
+
+  property = (GIrNodeProperty *) _g_ir_node_new (G_IR_NODE_PROPERTY,
+                                               ctx->current_module);
+  ctx->current_typed = (GIrNode*) property;
+
+  ((GIrNode *)property)->name = g_strdup (name);
+
+  /* Assume properties are readable */
+  if (readable == NULL || strcmp (readable, "1") == 0)
+    property->readable = TRUE;
+  else
+    property->readable = FALSE;
+  if (writable && strcmp (writable, "1") == 0)
+    property->writable = TRUE;
+  else
+    property->writable = FALSE;
+  if (construct && strcmp (construct, "1") == 0)
+    property->construct = TRUE;
+  else
+    property->construct = FALSE;
+  if (construct_only && strcmp (construct_only, "1") == 0)
+    property->construct_only = TRUE;
+  else
+    property->construct_only = FALSE;
+
+  parse_property_transfer (property, transfer, ctx);
+
+  iface = (GIrNodeInterface *)CURRENT_NODE (ctx);
+  iface->members = g_list_append (iface->members, property);
+
+  return TRUE;
+}
+
+static gint64
+parse_value (const gchar *str)
+{
+  gchar *shift_op;
+
+  /* FIXME just a quick hack */
+  shift_op = strstr (str, "<<");
+
+  if (shift_op)
+    {
+      gint64 base, shift;
+
+      base = g_ascii_strtoll (str, NULL, 10);
+      shift = g_ascii_strtoll (shift_op + 3, NULL, 10);
+
+      return base << shift;
+    }
+  else
+    return g_ascii_strtoll (str, NULL, 10);
+
+  return 0;
+}
+
+static gboolean
+start_member (GMarkupParseContext *context,
+             const gchar         *element_name,
+             const gchar        **attribute_names,
+             const gchar        **attribute_values,
+             ParseContext        *ctx,
+             GError             **error)
+{
+  const gchar *name;
+  const gchar *value;
+  const gchar *deprecated;
+  const gchar *c_identifier;
+  GIrNodeEnum *enum_;
+  GIrNodeValue *value_;
+
+  if (!(strcmp (element_name, "member") == 0 &&
+       ctx->state == STATE_ENUM))
+    return FALSE;
+
+  name = find_attribute ("name", attribute_names, attribute_values);
+  value = find_attribute ("value", attribute_names, attribute_values);
+  deprecated = find_attribute ("deprecated", attribute_names, attribute_values);
+  c_identifier = find_attribute ("c:identifier", attribute_names, attribute_values);
+
+  if (name == NULL)
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "name");
+      return FALSE;
+    }
+
+  value_ = (GIrNodeValue *) _g_ir_node_new (G_IR_NODE_VALUE,
+                                          ctx->current_module);
+
+  ((GIrNode *)value_)->name = g_strdup (name);
+
+  value_->value = parse_value (value);
+
+  if (deprecated)
+    value_->deprecated = TRUE;
+  else
+    value_->deprecated = FALSE;
+
+  g_hash_table_insert (((GIrNode *)value_)->attributes,
+                       g_strdup ("c:identifier"),
+                       g_strdup (c_identifier));
+
+  enum_ = (GIrNodeEnum *)CURRENT_NODE (ctx);
+  enum_->values = g_list_append (enum_->values, value_);
+
+  return TRUE;
+}
+
+static gboolean
+start_constant (GMarkupParseContext *context,
+               const gchar         *element_name,
+               const gchar        **attribute_names,
+               const gchar        **attribute_values,
+               ParseContext        *ctx,
+               GError             **error)
+{
+  ParseState prev_state;
+  ParseState target_state;
+  const gchar *name;
+  const gchar *value;
+  const gchar *deprecated;
+  GIrNodeConstant *constant;
+
+  if (!(strcmp (element_name, "constant") == 0 &&
+       (ctx->state == STATE_NAMESPACE ||
+        ctx->state == STATE_CLASS ||
+        ctx->state == STATE_INTERFACE)))
+    return FALSE;
+
+  switch (ctx->state)
+    {
+    case STATE_NAMESPACE:
+      target_state = STATE_NAMESPACE_CONSTANT;
+      break;
+    case STATE_CLASS:
+      target_state = STATE_CLASS_CONSTANT;
+      break;
+    case STATE_INTERFACE:
+      target_state = STATE_INTERFACE_CONSTANT;
+      break;
+    default:
+      g_assert_not_reached ();
+    }
+
+  prev_state = ctx->state;
+
+  if (!introspectable_prelude (context, attribute_names, attribute_values, ctx, target_state))
+    return TRUE;
+
+  name = find_attribute ("name", attribute_names, attribute_values);
+  value = find_attribute ("value", attribute_names, attribute_values);
+  deprecated = find_attribute ("deprecated", attribute_names, attribute_values);
+
+  if (name == NULL)
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "name");
+      return FALSE;
+    }
+  else if (value == NULL)
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "value");
+      return FALSE;
+    }
+
+  constant = (GIrNodeConstant *) _g_ir_node_new (G_IR_NODE_CONSTANT,
+                                               ctx->current_module);
+
+  ((GIrNode *)constant)->name = g_strdup (name);
+  constant->value = g_strdup (value);
+
+  ctx->current_typed = (GIrNode*) constant;
+
+  if (deprecated)
+    constant->deprecated = TRUE;
+  else
+    constant->deprecated = FALSE;
+
+  if (prev_state == STATE_NAMESPACE)
+    {
+      push_node (ctx, (GIrNode *) constant);
+      ctx->current_module->entries =
+       g_list_append (ctx->current_module->entries, constant);
+    }
+  else
+    {
+      GIrNodeInterface *iface;
+
+      iface = (GIrNodeInterface *)CURRENT_NODE (ctx);
+      iface->members = g_list_append (iface->members, constant);
+    }
+
+  return TRUE;
+}
+
+static gboolean
+start_interface (GMarkupParseContext *context,
+                const gchar         *element_name,
+                const gchar        **attribute_names,
+                const gchar        **attribute_values,
+                ParseContext        *ctx,
+                GError             **error)
+{
+  const gchar *name;
+  const gchar *typename;
+  const gchar *typeinit;
+  const gchar *deprecated;
+  const gchar *glib_type_struct;
+  GIrNodeInterface *iface;
+
+  if (!(strcmp (element_name, "interface") == 0 &&
+       ctx->state == STATE_NAMESPACE))
+    return FALSE;
+
+  if (!introspectable_prelude (context, attribute_names, attribute_values, ctx, STATE_INTERFACE))
+    return TRUE;
+
+  name = find_attribute ("name", attribute_names, attribute_values);
+  typename = find_attribute ("glib:type-name", attribute_names, attribute_values);
+  typeinit = find_attribute ("glib:get-type", attribute_names, attribute_values);
+  glib_type_struct = find_attribute ("glib:type-struct", attribute_names, attribute_values);
+  deprecated = find_attribute ("deprecated", attribute_names, attribute_values);
+
+  if (name == NULL)
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "name");
+      return FALSE;
+    }
+  else if (typename == NULL)
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "glib:type-name");
+      return FALSE;
+    }
+  else if (typeinit == NULL)
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "glib:get-type");
+      return FALSE;
+    }
+
+  iface = (GIrNodeInterface *) _g_ir_node_new (G_IR_NODE_INTERFACE,
+                                             ctx->current_module);
+  ((GIrNode *)iface)->name = g_strdup (name);
+  iface->gtype_name = g_strdup (typename);
+  iface->gtype_init = g_strdup (typeinit);
+  iface->glib_type_struct = g_strdup (glib_type_struct);
+  if (deprecated)
+    iface->deprecated = TRUE;
+  else
+    iface->deprecated = FALSE;
+
+  push_node (ctx, (GIrNode *) iface);
+  ctx->current_module->entries =
+    g_list_append (ctx->current_module->entries, iface);
+
+  return TRUE;
+}
+
+static gboolean
+start_class (GMarkupParseContext *context,
+             const gchar         *element_name,
+             const gchar        **attribute_names,
+             const gchar        **attribute_values,
+             ParseContext        *ctx,
+             GError             **error)
+{
+  const gchar *name;
+  const gchar *parent;
+  const gchar *glib_type_struct;
+  const gchar *typename;
+  const gchar *typeinit;
+  const gchar *deprecated;
+  const gchar *abstract;
+  const gchar *fundamental;
+  const gchar *ref_func;
+  const gchar *unref_func;
+  const gchar *set_value_func;
+  const gchar *get_value_func;
+  GIrNodeInterface *iface;
+
+  if (!(strcmp (element_name, "class") == 0 &&
+       ctx->state == STATE_NAMESPACE))
+    return FALSE;
+
+  if (!introspectable_prelude (context, attribute_names, attribute_values, ctx, STATE_CLASS))
+    return TRUE;
+
+  name = find_attribute ("name", attribute_names, attribute_values);
+  parent = find_attribute ("parent", attribute_names, attribute_values);
+  glib_type_struct = find_attribute ("glib:type-struct", attribute_names, attribute_values);
+  typename = find_attribute ("glib:type-name", attribute_names, attribute_values);
+  typeinit = find_attribute ("glib:get-type", attribute_names, attribute_values);
+  deprecated = find_attribute ("deprecated", attribute_names, attribute_values);
+  abstract = find_attribute ("abstract", attribute_names, attribute_values);
+  fundamental = find_attribute ("glib:fundamental", attribute_names, attribute_values);
+  ref_func = find_attribute ("glib:ref-func", attribute_names, attribute_values);
+  unref_func = find_attribute ("glib:unref-func", attribute_names, attribute_values);
+  set_value_func = find_attribute ("glib:set-value-func", attribute_names, attribute_values);
+  get_value_func = find_attribute ("glib:get-value-func", attribute_names, attribute_values);
+
+  if (name == NULL)
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "name");
+      return FALSE;
+    }
+  else if (typename == NULL)
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "glib:type-name");
+      return FALSE;
+    }
+  else if (typeinit == NULL && strcmp (typename, "GObject"))
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "glib:get-type");
+      return FALSE;
+    }
+
+  iface = (GIrNodeInterface *) _g_ir_node_new (G_IR_NODE_OBJECT,
+                                             ctx->current_module);
+  ((GIrNode *)iface)->name = g_strdup (name);
+  iface->gtype_name = g_strdup (typename);
+  iface->gtype_init = g_strdup (typeinit);
+  iface->parent = g_strdup (parent);
+  iface->glib_type_struct = g_strdup (glib_type_struct);
+  if (deprecated)
+    iface->deprecated = TRUE;
+  else
+    iface->deprecated = FALSE;
+
+  iface->abstract = abstract && strcmp (abstract, "1") == 0;
+
+  if (fundamental)
+    iface->fundamental = TRUE;
+  if (ref_func)
+    iface->ref_func = g_strdup (ref_func);
+  if (unref_func)
+    iface->unref_func = g_strdup (unref_func);
+  if (set_value_func)
+    iface->set_value_func = g_strdup (set_value_func);
+  if (get_value_func)
+    iface->get_value_func = g_strdup (get_value_func);
+
+  push_node (ctx, (GIrNode *) iface);
+  ctx->current_module->entries =
+    g_list_append (ctx->current_module->entries, iface);
+
+  return TRUE;
+}
+
+static gboolean
+start_type (GMarkupParseContext *context,
+           const gchar         *element_name,
+           const gchar        **attribute_names,
+           const gchar        **attribute_values,
+           ParseContext       *ctx,
+           GError             **error)
+{
+  const gchar *name;
+  const gchar *ctype;
+  gboolean in_alias = FALSE;
+  gboolean is_array;
+  gboolean is_varargs;
+  GIrNodeType *typenode;
+
+  is_array = strcmp (element_name, "array") == 0;
+  is_varargs = strcmp (element_name, "varargs") == 0;
+
+  if (!(is_array || is_varargs || (strcmp (element_name, "type") == 0)))
+    return FALSE;
+
+  if (ctx->state == STATE_TYPE)
+    {
+      ctx->type_depth++;
+      ctx->type_stack = g_list_prepend (ctx->type_stack, ctx->type_parameters);
+      ctx->type_parameters = NULL;
+    }
+  else if (ctx->state == STATE_FUNCTION_PARAMETER ||
+          ctx->state == STATE_FUNCTION_RETURN ||
+          ctx->state == STATE_STRUCT_FIELD ||
+          ctx->state == STATE_UNION_FIELD ||
+          ctx->state == STATE_CLASS_PROPERTY ||
+          ctx->state == STATE_CLASS_FIELD ||
+          ctx->state == STATE_INTERFACE_FIELD ||
+          ctx->state == STATE_INTERFACE_PROPERTY ||
+          ctx->state == STATE_BOXED_FIELD ||
+          ctx->state == STATE_NAMESPACE_CONSTANT ||
+          ctx->state == STATE_CLASS_CONSTANT ||
+          ctx->state == STATE_INTERFACE_CONSTANT ||
+          ctx->state == STATE_ALIAS
+          )
+    {
+      if (ctx->state == STATE_ALIAS)
+       in_alias = TRUE;
+      state_switch (ctx, STATE_TYPE);
+      ctx->type_depth = 1;
+      ctx->type_stack = NULL;
+      ctx->type_parameters = NULL;
+    }
+
+  name = find_attribute ("name", attribute_names, attribute_values);
+
+  if (in_alias && ctx->current_alias)
+    {
+      char *key;
+      char *value;
+
+      if (name == NULL)
+       {
+         MISSING_ATTRIBUTE (context, error, element_name, "name");
+         return FALSE;
+       }
+
+      key = g_strdup_printf ("%s.%s", ctx->namespace, ctx->current_alias);
+      if (!strchr (name, '.'))
+       {
+         const BasicTypeInfo *basic = parse_basic (name);
+         if (!basic)
+           {
+             /* For non-basic types, re-qualify the interface */
+             value = g_strdup_printf ("%s.%s", ctx->namespace, name);
+           }
+         else
+           {
+             value = g_strdup (name);
+           }
+       }
+      else
+       value = g_strdup (name);
+
+      g_hash_table_replace (ctx->aliases, key, value);
+
+      return TRUE;
+    }
+  else if (!ctx->current_module || in_alias)
+    return TRUE;
+
+  if (!ctx->current_typed)
+    {
+      g_set_error (error,
+                  G_MARKUP_ERROR,
+                  G_MARKUP_ERROR_INVALID_CONTENT,
+                  "The element <type> is invalid here");
+      return FALSE;
+    }
+
+  if (is_varargs)
+    return TRUE;
+
+  if (is_array)
+    {
+      const char *zero;
+      const char *len;
+      const char *size;
+
+      typenode = (GIrNodeType *)_g_ir_node_new (G_IR_NODE_TYPE,
+                                               ctx->current_module);
+
+      typenode->tag = GI_TYPE_TAG_ARRAY;
+      typenode->is_pointer = TRUE;
+      typenode->is_array = TRUE;
+
+      if (name && strcmp (name, "GLib.Array") == 0) {
+        typenode->array_type = GI_ARRAY_TYPE_ARRAY;
+      } else if (name && strcmp (name, "GLib.ByteArray") == 0) {
+        typenode->array_type = GI_ARRAY_TYPE_BYTE_ARRAY;
+      } else if (name && strcmp (name, "GLib.PtrArray") == 0) {
+        typenode->array_type = GI_ARRAY_TYPE_PTR_ARRAY;
+      } else {
+        typenode->array_type = GI_ARRAY_TYPE_C;
+      }
+
+      if (typenode->array_type == GI_ARRAY_TYPE_C) {
+          zero = find_attribute ("zero-terminated", attribute_names, attribute_values);
+          len = find_attribute ("length", attribute_names, attribute_values);
+          size = find_attribute ("fixed-size", attribute_names, attribute_values);
+
+          typenode->has_length = len != NULL;
+          typenode->length = typenode->has_length ? atoi (len) : -1;
+
+          typenode->has_size = size != NULL;
+          typenode->size = typenode->has_size ? atoi (size) : -1;
+
+          if (zero)
+            typenode->zero_terminated = strcmp(zero, "1") == 0;
+          else
+            /* If neither zero-terminated nor length nor fixed-size is given, assume zero-terminated. */
+            typenode->zero_terminated = !(typenode->has_length || typenode->has_size);
+
+          if (typenode->has_size && ctx->current_typed->type == G_IR_NODE_FIELD)
+            typenode->is_pointer = FALSE;
+        } else {
+          typenode->zero_terminated = FALSE;
+          typenode->has_length = FALSE;
+          typenode->length = -1;
+          typenode->has_size = FALSE;
+          typenode->size = -1;
+        }
+    }
+  else
+    {
+      int pointer_depth;
+
+      if (name == NULL)
+       {
+         MISSING_ATTRIBUTE (context, error, element_name, "name");
+         return FALSE;
+       }
+
+      pointer_depth = 0;
+      ctype = find_attribute ("c:type", attribute_names, attribute_values);
+      if (ctype != NULL)
+        {
+          const char *cp = ctype + strlen(ctype) - 1;
+          while (cp > ctype && *cp-- == '*')
+            pointer_depth++;
+
+         if (g_str_has_prefix (ctype, "gpointer")
+             || g_str_has_prefix (ctype, "gconstpointer"))
+           pointer_depth++;
+        }
+
+      if (ctx->current_typed->type == G_IR_NODE_PARAM &&
+          ((GIrNodeParam *)ctx->current_typed)->out &&
+          pointer_depth > 0)
+        pointer_depth--;
+
+      typenode = parse_type (ctx, name);
+
+      /* A 'disguised' structure is one where the c:type is a typedef that
+       * doesn't look like a pointer, but is internally.
+       */
+      if (typenode->tag == GI_TYPE_TAG_INTERFACE &&
+         is_disguised_structure (ctx, typenode->interface))
+       pointer_depth++;
+
+      if (pointer_depth > 0)
+       typenode->is_pointer = TRUE;
+    }
+
+  ctx->type_parameters = g_list_append (ctx->type_parameters, typenode);
+
+  return TRUE;
+}
+
+static void
+end_type_top (ParseContext *ctx)
+{
+  GIrNodeType *typenode;
+
+  if (!ctx->type_parameters)
+    goto out;
+
+  typenode = (GIrNodeType*)ctx->type_parameters->data;
+
+  /* Default to pointer for unspecified containers */
+  if (typenode->tag == GI_TYPE_TAG_ARRAY ||
+      typenode->tag == GI_TYPE_TAG_GLIST ||
+      typenode->tag == GI_TYPE_TAG_GSLIST)
+    {
+      if (typenode->parameter_type1 == NULL)
+       typenode->parameter_type1 = parse_type (ctx, "gpointer");
+    }
+  else if (typenode->tag == GI_TYPE_TAG_GHASH)
+    {
+      if (typenode->parameter_type1 == NULL)
+       {
+         typenode->parameter_type1 = parse_type (ctx, "gpointer");
+         typenode->parameter_type2 = parse_type (ctx, "gpointer");
+       }
+    }
+
+  switch (ctx->current_typed->type)
+    {
+    case G_IR_NODE_PARAM:
+      {
+       GIrNodeParam *param = (GIrNodeParam *)ctx->current_typed;
+       param->type = typenode;
+      }
+      break;
+    case G_IR_NODE_FIELD:
+      {
+       GIrNodeField *field = (GIrNodeField *)ctx->current_typed;
+       field->type = typenode;
+      }
+      break;
+    case G_IR_NODE_PROPERTY:
+      {
+       GIrNodeProperty *property = (GIrNodeProperty *) ctx->current_typed;
+       property->type = typenode;
+      }
+      break;
+    case G_IR_NODE_CONSTANT:
+      {
+       GIrNodeConstant *constant = (GIrNodeConstant *)ctx->current_typed;
+       constant->type = typenode;
+      }
+      break;
+    default:
+      g_printerr("current node is %d\n", CURRENT_NODE (ctx)->type);
+      g_assert_not_reached ();
+    }
+  g_list_free (ctx->type_parameters);
+
+ out:
+  ctx->type_depth = 0;
+  ctx->type_parameters = NULL;
+  ctx->current_typed = NULL;
+}
+
+static void
+end_type_recurse (ParseContext *ctx)
+{
+  GIrNodeType *parent;
+  GIrNodeType *param = NULL;
+
+  parent = (GIrNodeType *) ((GList*)ctx->type_stack->data)->data;
+  if (ctx->type_parameters)
+    param = (GIrNodeType *) ctx->type_parameters->data;
+
+  if (parent->tag == GI_TYPE_TAG_ARRAY ||
+      parent->tag == GI_TYPE_TAG_GLIST ||
+      parent->tag == GI_TYPE_TAG_GSLIST)
+    {
+      g_assert (param != NULL);
+
+      if (parent->parameter_type1 == NULL)
+        parent->parameter_type1 = param;
+      else
+        g_assert_not_reached ();
+    }
+  else if (parent->tag == GI_TYPE_TAG_GHASH)
+    {
+      g_assert (param != NULL);
+
+      if (parent->parameter_type1 == NULL)
+        parent->parameter_type1 = param;
+      else if (parent->parameter_type2 == NULL)
+        parent->parameter_type2 = param;
+      else
+        g_assert_not_reached ();
+    }
+  g_list_free (ctx->type_parameters);
+  ctx->type_parameters = (GList *)ctx->type_stack->data;
+  ctx->type_stack = g_list_delete_link (ctx->type_stack, ctx->type_stack);
+}
+
+static void
+end_type (ParseContext *ctx)
+{
+  if (ctx->type_depth == 1)
+    {
+      end_type_top (ctx);
+      state_switch (ctx, ctx->prev_state);
+    }
+  else
+    {
+      end_type_recurse (ctx);
+      ctx->type_depth--;
+    }
+}
+
+static gboolean
+start_doc (GMarkupParseContext *context,
+          const gchar         *element_name,
+          const gchar        **attribute_names,
+          const gchar        **attribute_values,
+          ParseContext       *ctx,
+          GError             **error)
+{
+  if (strcmp (element_name, "doc") != 0)
+    return FALSE;
+
+  state_switch (ctx, STATE_DOC);
+
+  return TRUE;
+}
+
+static gboolean
+start_attribute (GMarkupParseContext *context,
+                 const gchar         *element_name,
+                 const gchar        **attribute_names,
+                 const gchar        **attribute_values,
+                 ParseContext       *ctx,
+                 GError             **error)
+{
+  const gchar *name;
+  const gchar *value;
+  GIrNode *curnode;
+
+  if (strcmp (element_name, "attribute") != 0 || ctx->node_stack == NULL)
+    return FALSE;
+
+  name = find_attribute ("name", attribute_names, attribute_values);
+  value = find_attribute ("value", attribute_names, attribute_values);
+
+  if (name == NULL)
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "name");
+      return FALSE;
+    }
+  if (value == NULL)
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "value");
+      return FALSE;
+    }
+
+  state_switch (ctx, STATE_ATTRIBUTE);
+
+  curnode = CURRENT_NODE (ctx);
+
+  if (ctx->current_typed && ctx->current_typed->type == G_IR_NODE_PARAM)
+    {
+      g_hash_table_insert (ctx->current_typed->attributes, g_strdup (name), g_strdup (value));
+    }
+  else
+    {
+      g_hash_table_insert (curnode->attributes, g_strdup (name), g_strdup (value));
+    }
+
+  return TRUE;
+}
+
+static gboolean
+start_return_value (GMarkupParseContext *context,
+                   const gchar         *element_name,
+                   const gchar        **attribute_names,
+                   const gchar        **attribute_values,
+                   ParseContext       *ctx,
+                   GError             **error)
+{
+  GIrNodeParam *param;
+  const gchar  *transfer;
+  const gchar  *skip;
+
+  if (!(strcmp (element_name, "return-value") == 0 &&
+       ctx->state == STATE_FUNCTION))
+    return FALSE;
+
+  param = (GIrNodeParam *)_g_ir_node_new (G_IR_NODE_PARAM,
+                                         ctx->current_module);
+  param->in = FALSE;
+  param->out = FALSE;
+  param->retval = TRUE;
+
+  ctx->current_typed = (GIrNode*) param;
+
+  state_switch (ctx, STATE_FUNCTION_RETURN);
+
+  skip = find_attribute ("skip", attribute_names, attribute_values);
+  if (skip && strcmp (skip, "1") == 0)
+    param->skip = TRUE;
+  else
+    param->skip = FALSE;
+
+  transfer = find_attribute ("transfer-ownership", attribute_names, attribute_values);
+  if (!parse_param_transfer (param, transfer, NULL, error))
+    return FALSE;
+
+  switch (CURRENT_NODE (ctx)->type)
+    {
+    case G_IR_NODE_FUNCTION:
+    case G_IR_NODE_CALLBACK:
+      {
+       GIrNodeFunction *func = (GIrNodeFunction *)CURRENT_NODE (ctx);
+       func->result = param;
+      }
+      break;
+    case G_IR_NODE_SIGNAL:
+      {
+       GIrNodeSignal *signal = (GIrNodeSignal *)CURRENT_NODE (ctx);
+       signal->result = param;
+      }
+      break;
+    case G_IR_NODE_VFUNC:
+      {
+       GIrNodeVFunc *vfunc = (GIrNodeVFunc *)CURRENT_NODE (ctx);
+       vfunc->result = param;
+      }
+      break;
+    default:
+      g_assert_not_reached ();
+    }
+
+  return TRUE;
+}
+
+static gboolean
+start_implements (GMarkupParseContext *context,
+                 const gchar         *element_name,
+                 const gchar        **attribute_names,
+                 const gchar        **attribute_values,
+                 ParseContext       *ctx,
+                 GError             **error)
+{
+  GIrNodeInterface *iface;
+  const char *name;
+
+  if (strcmp (element_name, "implements") != 0 ||
+      !(ctx->state == STATE_CLASS))
+    return FALSE;
+
+  state_switch (ctx, STATE_IMPLEMENTS);
+
+  name = find_attribute ("name", attribute_names, attribute_values);
+  if (name == NULL)
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "name");
+      return FALSE;
+    }
+
+  iface = (GIrNodeInterface *)CURRENT_NODE (ctx);
+  iface->interfaces = g_list_append (iface->interfaces, g_strdup (name));
+
+  return TRUE;
+}
+
+static gboolean
+start_glib_signal (GMarkupParseContext *context,
+                  const gchar         *element_name,
+                  const gchar        **attribute_names,
+                  const gchar        **attribute_values,
+                  ParseContext       *ctx,
+                  GError             **error)
+{
+  const gchar *name;
+  const gchar *when;
+  const gchar *no_recurse;
+  const gchar *detailed;
+  const gchar *action;
+  const gchar *no_hooks;
+  const gchar *has_class_closure;
+  GIrNodeInterface *iface;
+  GIrNodeSignal *signal;
+
+  if (!(strcmp (element_name, "glib:signal") == 0 &&
+       (ctx->state == STATE_CLASS ||
+        ctx->state == STATE_INTERFACE)))
+    return FALSE;
+
+  if (!introspectable_prelude (context, attribute_names, attribute_values, ctx, STATE_FUNCTION))
+    return TRUE;
+
+  name = find_attribute ("name", attribute_names, attribute_values);
+  when = find_attribute ("when", attribute_names, attribute_values);
+  no_recurse = find_attribute ("no-recurse", attribute_names, attribute_values);
+  detailed = find_attribute ("detailed", attribute_names, attribute_values);
+  action = find_attribute ("action", attribute_names, attribute_values);
+  no_hooks = find_attribute ("no-hooks", attribute_names, attribute_values);
+  has_class_closure = find_attribute ("has-class-closure", attribute_names, attribute_values);
+
+  if (name == NULL)
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "name");
+      return FALSE;
+    }
+  signal = (GIrNodeSignal *)_g_ir_node_new (G_IR_NODE_SIGNAL,
+                                           ctx->current_module);
+
+  ((GIrNode *)signal)->name = g_strdup (name);
+
+  signal->run_first = FALSE;
+  signal->run_last = FALSE;
+  signal->run_cleanup = FALSE;
+  if (when == NULL || strcmp (when, "LAST") == 0)
+    signal->run_last = TRUE;
+  else if (strcmp (when, "FIRST") == 0)
+    signal->run_first = TRUE;
+  else
+    signal->run_cleanup = TRUE;
+
+  if (no_recurse && strcmp (no_recurse, "1") == 0)
+    signal->no_recurse = TRUE;
+  else
+    signal->no_recurse = FALSE;
+  if (detailed && strcmp (detailed, "1") == 0)
+    signal->detailed = TRUE;
+  else
+    signal->detailed = FALSE;
+  if (action && strcmp (action, "1") == 0)
+    signal->action = TRUE;
+  else
+    signal->action = FALSE;
+  if (no_hooks && strcmp (no_hooks, "1") == 0)
+    signal->no_hooks = TRUE;
+  else
+    signal->no_hooks = FALSE;
+  if (has_class_closure && strcmp (has_class_closure, "1") == 0)
+    signal->has_class_closure = TRUE;
+  else
+    signal->has_class_closure = FALSE;
+
+  iface = (GIrNodeInterface *)CURRENT_NODE (ctx);
+  iface->members = g_list_append (iface->members, signal);
+
+  push_node (ctx, (GIrNode *)signal);
+
+  return TRUE;
+}
+
+static gboolean
+start_vfunc (GMarkupParseContext *context,
+            const gchar         *element_name,
+            const gchar        **attribute_names,
+            const gchar        **attribute_values,
+            ParseContext       *ctx,
+            GError             **error)
+{
+  const gchar *name;
+  const gchar *must_chain_up;
+  const gchar *override;
+  const gchar *is_class_closure;
+  const gchar *offset;
+  const gchar *invoker;
+  const gchar *throws;
+  GIrNodeInterface *iface;
+  GIrNodeVFunc *vfunc;
+
+  if (!(strcmp (element_name, "virtual-method") == 0 &&
+       (ctx->state == STATE_CLASS ||
+        ctx->state == STATE_INTERFACE)))
+    return FALSE;
+
+  if (!introspectable_prelude (context, attribute_names, attribute_values, ctx, STATE_FUNCTION))
+    return TRUE;
+
+  name = find_attribute ("name", attribute_names, attribute_values);
+  must_chain_up = find_attribute ("must-chain-up", attribute_names, attribute_values);
+  override = find_attribute ("override", attribute_names, attribute_values);
+  is_class_closure = find_attribute ("is-class-closure", attribute_names, attribute_values);
+  offset = find_attribute ("offset", attribute_names, attribute_values);
+  invoker = find_attribute ("invoker", attribute_names, attribute_values);
+  throws = find_attribute ("throws", attribute_names, attribute_values);
+
+  if (name == NULL)
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "name");
+      return FALSE;
+    }
+
+  vfunc = (GIrNodeVFunc *)_g_ir_node_new (G_IR_NODE_VFUNC,
+                                         ctx->current_module);
+
+  ((GIrNode *)vfunc)->name = g_strdup (name);
+
+  if (must_chain_up && strcmp (must_chain_up, "1") == 0)
+    vfunc->must_chain_up = TRUE;
+  else
+    vfunc->must_chain_up = FALSE;
+
+  if (override && strcmp (override, "always") == 0)
+    {
+      vfunc->must_be_implemented = TRUE;
+      vfunc->must_not_be_implemented = FALSE;
+    }
+  else if (override && strcmp (override, "never") == 0)
+    {
+      vfunc->must_be_implemented = FALSE;
+      vfunc->must_not_be_implemented = TRUE;
+    }
+  else
+    {
+      vfunc->must_be_implemented = FALSE;
+      vfunc->must_not_be_implemented = FALSE;
+    }
+
+  if (is_class_closure && strcmp (is_class_closure, "1") == 0)
+    vfunc->is_class_closure = TRUE;
+  else
+    vfunc->is_class_closure = FALSE;
+
+  if (throws && strcmp (throws, "1") == 0)
+    vfunc->throws = TRUE;
+  else
+    vfunc->throws = FALSE;
+
+  if (offset)
+    vfunc->offset = atoi (offset);
+  else
+    vfunc->offset = 0xFFFF;
+
+  vfunc->invoker = g_strdup (invoker);
+
+  iface = (GIrNodeInterface *)CURRENT_NODE (ctx);
+  iface->members = g_list_append (iface->members, vfunc);
+
+  push_node (ctx, (GIrNode *)vfunc);
+
+  return TRUE;
+}
+
+static gboolean
+start_struct (GMarkupParseContext *context,
+             const gchar         *element_name,
+             const gchar        **attribute_names,
+             const gchar        **attribute_values,
+             ParseContext       *ctx,
+             GError             **error)
+{
+  const gchar *name;
+  const gchar *deprecated;
+  const gchar *disguised;
+  const gchar *gtype_name;
+  const gchar *gtype_init;
+  const gchar *gtype_struct;
+  const gchar *foreign;
+  GIrNodeStruct *struct_;
+
+  if (!(strcmp (element_name, "record") == 0 &&
+       (ctx->state == STATE_NAMESPACE ||
+        ctx->state == STATE_UNION ||
+        ctx->state == STATE_STRUCT ||
+        ctx->state == STATE_CLASS)))
+    return FALSE;
+
+  if (!introspectable_prelude (context, attribute_names, attribute_values, ctx, STATE_STRUCT))
+    return TRUE;
+
+  name = find_attribute ("name", attribute_names, attribute_values);
+  deprecated = find_attribute ("deprecated", attribute_names, attribute_values);
+  disguised = find_attribute ("disguised", attribute_names, attribute_values);
+  gtype_name = find_attribute ("glib:type-name", attribute_names, attribute_values);
+  gtype_init = find_attribute ("glib:get-type", attribute_names, attribute_values);
+  gtype_struct = find_attribute ("glib:is-gtype-struct-for", attribute_names, attribute_values);
+  foreign = find_attribute ("foreign", attribute_names, attribute_values);
+
+  if (name == NULL && ctx->node_stack == NULL)
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "name");
+      return FALSE;
+    }
+  if ((gtype_name == NULL && gtype_init != NULL))
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "glib:type-name");
+      return FALSE;
+    }
+  if ((gtype_name != NULL && gtype_init == NULL))
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "glib:get-type");
+      return FALSE;
+    }
+
+  struct_ = (GIrNodeStruct *) _g_ir_node_new (G_IR_NODE_STRUCT,
+                                            ctx->current_module);
+
+  ((GIrNode *)struct_)->name = g_strdup (name ? name : "");
+  if (deprecated)
+    struct_->deprecated = TRUE;
+  else
+    struct_->deprecated = FALSE;
+
+  if (disguised && strcmp (disguised, "1") == 0)
+    struct_->disguised = TRUE;
+
+  struct_->is_gtype_struct = gtype_struct != NULL;
+
+  struct_->gtype_name = g_strdup (gtype_name);
+  struct_->gtype_init = g_strdup (gtype_init);
+
+  struct_->foreign = (g_strcmp0 (foreign, "1") == 0);
+
+  if (ctx->node_stack == NULL)
+    ctx->current_module->entries =
+      g_list_append (ctx->current_module->entries, struct_);
+  push_node (ctx, (GIrNode *)struct_);
+  return TRUE;
+}
+
+static gboolean
+start_union (GMarkupParseContext *context,
+            const gchar         *element_name,
+            const gchar        **attribute_names,
+            const gchar        **attribute_values,
+            ParseContext       *ctx,
+            GError             **error)
+{
+  const gchar *name;
+  const gchar *deprecated;
+  const gchar *typename;
+  const gchar *typeinit;
+  GIrNodeUnion *union_;
+
+  if (!(strcmp (element_name, "union") == 0 &&
+       (ctx->state == STATE_NAMESPACE ||
+        ctx->state == STATE_UNION ||
+        ctx->state == STATE_STRUCT ||
+        ctx->state == STATE_CLASS)))
+    return FALSE;
+
+  if (!introspectable_prelude (context, attribute_names, attribute_values, ctx, STATE_UNION))
+    return TRUE;
+
+  name = find_attribute ("name", attribute_names, attribute_values);
+  deprecated = find_attribute ("deprecated", attribute_names, attribute_values);
+  typename = find_attribute ("glib:type-name", attribute_names, attribute_values);
+  typeinit = find_attribute ("glib:get-type", attribute_names, attribute_values);
+
+  if (name == NULL && ctx->node_stack == NULL)
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "name");
+      return FALSE;
+    }
+
+  union_ = (GIrNodeUnion *) _g_ir_node_new (G_IR_NODE_UNION,
+                                          ctx->current_module);
+
+  ((GIrNode *)union_)->name = g_strdup (name ? name : "");
+  union_->gtype_name = g_strdup (typename);
+  union_->gtype_init = g_strdup (typeinit);
+  if (deprecated)
+    union_->deprecated = TRUE;
+  else
+    union_->deprecated = FALSE;
+
+  if (ctx->node_stack == NULL)
+    ctx->current_module->entries =
+      g_list_append (ctx->current_module->entries, union_);
+  push_node (ctx, (GIrNode *)union_);
+  return TRUE;
+}
+
+static gboolean
+start_discriminator (GMarkupParseContext *context,
+                    const gchar         *element_name,
+                    const gchar        **attribute_names,
+                    const gchar        **attribute_values,
+                    ParseContext       *ctx,
+                    GError             **error)
+{
+  const gchar *type;
+  const gchar *offset;
+  if (!(strcmp (element_name, "discriminator") == 0 &&
+       ctx->state == STATE_UNION))
+    return FALSE;
+
+  type = find_attribute ("type", attribute_names, attribute_values);
+  offset = find_attribute ("offset", attribute_names, attribute_values);
+  if (type == NULL)
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "type");
+      return FALSE;
+    }
+  else if (offset == NULL)
+    {
+      MISSING_ATTRIBUTE (context, error, element_name, "offset");
+      return FALSE;
+    }
+
+  ((GIrNodeUnion *)CURRENT_NODE (ctx))->discriminator_type
+    = parse_type (ctx, type);
+  ((GIrNodeUnion *)CURRENT_NODE (ctx))->discriminator_offset
+    = atoi (offset);
+
+  return TRUE;
+}
+
+static gboolean
+parse_include (GMarkupParseContext *context,
+              ParseContext        *ctx,
+              const char          *name,
+              const char          *version)
+{
+  GError *error = NULL;
+  gchar *buffer;
+  gsize length;
+  gchar *girpath, *girname;
+  GIrModule *module;
+  GList *l;
+
+  for (l = ctx->parser->parsed_modules; l; l = l->next)
+    {
+      GIrModule *m = l->data;
+
+      if (strcmp (m->name, name) == 0)
+       {
+         if (strcmp (m->version, version) == 0)
+           {
+             ctx->include_modules = g_list_prepend (ctx->include_modules, m);
+
+             return TRUE;
+           }
+         else
+           {
+             g_printerr ("Module '%s' imported with conflicting versions '%s' and '%s'\n",
+                         name, m->version, version);
+             return FALSE;
+           }
+       }
+    }
+
+  girname = g_strdup_printf ("%s-%s.gir", name, version);
+  girpath = locate_gir (ctx->parser, girname);
+
+  if (girpath == NULL)
+    {
+      g_printerr ("Could not find GIR file '%s'; check XDG_DATA_DIRS or use --includedir\n",
+                  girname);
+      g_free (girname);
+      return FALSE;
+    }
+  g_free (girname);
+
+  g_debug ("Parsing include %s\n", girpath);
+
+  if (!g_file_get_contents (girpath, &buffer, &length, &error))
+    {
+      g_printerr ("%s: %s\n", girpath, error->message);
+      g_clear_error (&error);
+      g_free (girpath);
+      return FALSE;
+    }
+
+  module = _g_ir_parser_parse_string (ctx->parser, name, girpath, buffer, length, &error);
+  g_free (buffer);
+  if (error != NULL)
+    {
+      int line_number, char_number;
+      g_markup_parse_context_get_position (context, &line_number, &char_number);
+      g_printerr ("%s:%d:%d: error: %s\n", girpath, line_number, char_number, error->message);
+      g_clear_error (&error);
+      g_free (girpath);
+      return FALSE;
+    }
+  g_free (girpath);
+
+  ctx->include_modules = g_list_append (ctx->include_modules,
+                                       module);
+
+  return TRUE;
+}
+
+extern GLogLevelFlags logged_levels;
+
+static void
+start_element_handler (GMarkupParseContext *context,
+                      const gchar         *element_name,
+                      const gchar        **attribute_names,
+                      const gchar        **attribute_values,
+                      gpointer             user_data,
+                      GError             **error)
+{
+  ParseContext *ctx = user_data;
+  gint line_number, char_number;
+
+  if (logged_levels & G_LOG_LEVEL_DEBUG)
+    {
+      GString *tags = g_string_new ("");
+      int i;
+      for (i = 0; attribute_names[i]; i++)
+        g_string_append_printf (tags, "%s=\"%s\" ",
+                               attribute_names[i],
+                               attribute_values[i]);
+
+      if (i)
+        {
+          g_string_insert_c (tags, 0, ' ');
+          g_string_truncate (tags, tags->len - 1);
+        }
+      g_debug ("<%s%s>", element_name, tags->str);
+      g_string_free (tags, TRUE);
+    }
+
+  if (ctx->state == STATE_PASSTHROUGH)
+    {
+      ctx->unknown_depth += 1;
+      return;
+    }
+
+  switch (element_name[0])
+    {
+    case 'a':
+      if (ctx->state == STATE_NAMESPACE && strcmp (element_name, "alias") == 0)
+       {
+         state_switch (ctx, STATE_ALIAS);
+         goto out;
+       }
+      if (start_type (context, element_name,
+                     attribute_names, attribute_values,
+                     ctx, error))
+       goto out;
+      else if (start_attribute (context, element_name,
+                                attribute_names, attribute_values,
+                                ctx, error))
+        goto out;
+      break;
+    case 'b':
+      if (start_enum (context, element_name,
+                     attribute_names, attribute_values,
+                     ctx, error))
+       goto out;
+      break;
+    case 'c':
+      if (start_function (context, element_name,
+                         attribute_names, attribute_values,
+                         ctx, error))
+       goto out;
+      else if (start_constant (context, element_name,
+                              attribute_names, attribute_values,
+                              ctx, error))
+       goto out;
+      else if (start_class (context, element_name,
+                           attribute_names, attribute_values,
+                           ctx, error))
+       goto out;
+      break;
+
+    case 'd':
+      if (start_discriminator (context, element_name,
+                              attribute_names, attribute_values,
+                              ctx, error))
+       goto out;
+      else if (start_doc (context, element_name, attribute_names,
+                         attribute_values, ctx, error))
+       goto out;
+      break;
+
+    case 'e':
+      if (start_enum (context, element_name,
+                     attribute_names, attribute_values,
+                     ctx, error))
+       goto out;
+      break;
+
+    case 'f':
+      if (start_function (context, element_name,
+                         attribute_names, attribute_values,
+                         ctx, error))
+       goto out;
+      else if (start_field (context, element_name,
+                           attribute_names, attribute_values,
+                           ctx, error))
+       goto out;
+      break;
+
+    case 'g':
+      if (start_glib_boxed (context, element_name,
+                           attribute_names, attribute_values,
+                           ctx, error))
+       goto out;
+      else if (start_glib_signal (context, element_name,
+                            attribute_names, attribute_values,
+                            ctx, error))
+       goto out;
+      break;
+
+    case 'i':
+      if (strcmp (element_name, "include") == 0 &&
+         ctx->state == STATE_REPOSITORY)
+       {
+         const gchar *name;
+         const gchar *version;
+
+         name = find_attribute ("name", attribute_names, attribute_values);
+         version = find_attribute ("version", attribute_names, attribute_values);
+
+         if (name == NULL)
+           {
+             MISSING_ATTRIBUTE (context, error, element_name, "name");
+             break;
+           }
+         if (version == NULL)
+           {
+             MISSING_ATTRIBUTE (context, error, element_name, "version");
+             break;
+           }
+
+         if (!parse_include (context, ctx, name, version))
+           {
+             g_set_error (error,
+                          G_MARKUP_ERROR,
+                          G_MARKUP_ERROR_INVALID_CONTENT,
+                          "Failed to parse included gir %s-%s",
+                          name,
+                          version);
+             return;
+           }
+
+         ctx->dependencies = g_list_prepend (ctx->dependencies,
+                                             g_strdup_printf ("%s-%s", name, version));
+
+
+         state_switch (ctx, STATE_INCLUDE);
+         goto out;
+       }
+      if (start_interface (context, element_name,
+                          attribute_names, attribute_values,
+                          ctx, error))
+       goto out;
+      else if (start_implements (context, element_name,
+                                attribute_names, attribute_values,
+                                ctx, error))
+       goto out;
+      else if (strcmp (element_name, "c:include") == 0)
+       {
+         state_switch (ctx, STATE_C_INCLUDE);
+         goto out;
+       }
+      break;
+
+    case 'm':
+      if (start_function (context, element_name,
+                         attribute_names, attribute_values,
+                         ctx, error))
+       goto out;
+      else if (start_member (context, element_name,
+                         attribute_names, attribute_values,
+                         ctx, error))
+       goto out;
+      break;
+
+    case 'n':
+      if (strcmp (element_name, "namespace") == 0 && ctx->state == STATE_REPOSITORY)
+       {
+         const gchar *name, *version, *shared_library, *cprefix;
+
+         if (ctx->current_module != NULL)
+           {
+             g_set_error (error,
+                          G_MARKUP_ERROR,
+                          G_MARKUP_ERROR_INVALID_CONTENT,
+                          "Only one <namespace/> element is currently allowed per <repository/>");
+             goto out;
+           }
+
+         name = find_attribute ("name", attribute_names, attribute_values);
+         version = find_attribute ("version", attribute_names, attribute_values);
+         shared_library = find_attribute ("shared-library", attribute_names, attribute_values);
+         cprefix = find_attribute ("c:identifier-prefixes", attribute_names, attribute_values);
+
+         if (name == NULL)
+           MISSING_ATTRIBUTE (context, error, element_name, "name");
+         else if (version == NULL)
+           MISSING_ATTRIBUTE (context, error, element_name, "version");
+         else
+           {
+             GList *l;
+
+             if (strcmp (name, ctx->namespace) != 0)
+               g_set_error (error,
+                            G_MARKUP_ERROR,
+                            G_MARKUP_ERROR_INVALID_CONTENT,
+                            "<namespace/> name element '%s' doesn't match file name '%s'",
+                            name, ctx->namespace);
+
+             ctx->current_module = _g_ir_module_new (name, version, shared_library, cprefix);
+
+             ctx->current_module->aliases = ctx->aliases;
+             ctx->aliases = NULL;
+             ctx->current_module->disguised_structures = ctx->disguised_structures;
+             ctx->disguised_structures = NULL;
+
+             for (l = ctx->include_modules; l; l = l->next)
+               _g_ir_module_add_include_module (ctx->current_module, l->data);
+
+             g_list_free (ctx->include_modules);
+             ctx->include_modules = NULL;
+
+             ctx->modules = g_list_append (ctx->modules, ctx->current_module);
+             ctx->current_module->dependencies = ctx->dependencies;
+
+             state_switch (ctx, STATE_NAMESPACE);
+             goto out;
+           }
+       }
+      break;
+
+    case 'p':
+      if (start_property (context, element_name,
+                         attribute_names, attribute_values,
+                         ctx, error))
+       goto out;
+      else if (strcmp (element_name, "parameters") == 0 &&
+              ctx->state == STATE_FUNCTION)
+       {
+         state_switch (ctx, STATE_FUNCTION_PARAMETERS);
+
+         goto out;
+       }
+      else if (start_parameter (context, element_name,
+                               attribute_names, attribute_values,
+                               ctx, error))
+       goto out;
+      else if (strcmp (element_name, "prerequisite") == 0 &&
+              ctx->state == STATE_INTERFACE)
+       {
+         const gchar *name;
+
+         name = find_attribute ("name", attribute_names, attribute_values);
+
+         state_switch (ctx, STATE_PREREQUISITE);
+
+         if (name == NULL)
+           MISSING_ATTRIBUTE (context, error, element_name, "name");
+         else
+           {
+             GIrNodeInterface *iface;
+
+             iface = (GIrNodeInterface *)CURRENT_NODE(ctx);
+             iface->prerequisites = g_list_append (iface->prerequisites, g_strdup (name));
+           }
+         goto out;
+       }
+      else if (strcmp (element_name, "package") == 0 &&
+          ctx->state == STATE_REPOSITORY)
+        {
+          state_switch (ctx, STATE_PACKAGE);
+          goto out;
+        }
+      break;
+
+    case 'r':
+      if (strcmp (element_name, "repository") == 0 && ctx->state == STATE_START)
+       {
+         const gchar *version;
+
+         version = find_attribute ("version", attribute_names, attribute_values);
+
+         if (version == NULL)
+           MISSING_ATTRIBUTE (context, error, element_name, "version");
+         else if (strcmp (version, SUPPORTED_GIR_VERSION) != 0)
+           g_set_error (error,
+                        G_MARKUP_ERROR,
+                        G_MARKUP_ERROR_INVALID_CONTENT,
+                        "Unsupported version '%s'",
+                        version);
+         else
+           state_switch (ctx, STATE_REPOSITORY);
+
+         goto out;
+       }
+      else if (start_return_value (context, element_name,
+                                  attribute_names, attribute_values,
+                                  ctx, error))
+       goto out;
+      else if (start_struct (context, element_name,
+                            attribute_names, attribute_values,
+                            ctx, error))
+       goto out;
+      break;
+
+    case 'u':
+      if (start_union (context, element_name,
+                      attribute_names, attribute_values,
+                      ctx, error))
+       goto out;
+      break;
+
+    case 't':
+      if (start_type (context, element_name,
+                     attribute_names, attribute_values,
+                     ctx, error))
+       goto out;
+      break;
+
+    case 'v':
+      if (start_vfunc (context, element_name,
+                      attribute_names, attribute_values,
+                      ctx, error))
+       goto out;
+      if (start_type (context, element_name,
+                     attribute_names, attribute_values,
+                     ctx, error))
+       goto out;
+      break;
+    }
+
+  if (*error == NULL && ctx->state != STATE_PASSTHROUGH)
+    {
+      g_markup_parse_context_get_position (context, &line_number, &char_number);
+      if (!g_str_has_prefix (element_name, "c:"))
+       g_printerr ("%s:%d:%d: warning: element %s from state %d is unknown, ignoring\n",
+                   ctx->file_path, line_number, char_number, element_name,
+                   ctx->state);
+      state_switch (ctx, STATE_PASSTHROUGH);
+      ctx->unknown_depth = 1;
+    }
+
+ out:
+  if (*error)
+    {
+      g_markup_parse_context_get_position (context, &line_number, &char_number);
+
+      g_printerr ("%s:%d:%d: error: %s\n", ctx->file_path, line_number, char_number, (*error)->message);
+    }
+}
+
+static gboolean
+require_one_of_end_elements (GMarkupParseContext *context,
+                            ParseContext        *ctx,
+                            const char          *actual_name,
+                            GError             **error,
+                            ...)
+{
+  va_list args;
+  int line_number, char_number;
+  const char *expected;
+  gboolean matched = FALSE;
+
+  va_start (args, error);
+
+  while ((expected = va_arg (args, const char*)) != NULL)
+    {
+      if (strcmp (expected, actual_name) == 0)
+       {
+         matched = TRUE;
+         break;
+       }
+    }
+
+  va_end (args);
+
+  if (matched)
+    return TRUE;
+
+  g_markup_parse_context_get_position (context, &line_number, &char_number);
+  g_set_error (error,
+              G_MARKUP_ERROR,
+              G_MARKUP_ERROR_INVALID_CONTENT,
+              "Unexpected end tag '%s' on line %d char %d; current state=%d (prev=%d)",
+              actual_name,
+              line_number, char_number, ctx->state, ctx->prev_state);
+  return FALSE;
+}
+
+static gboolean
+state_switch_end_struct_or_union (GMarkupParseContext *context,
+                                  ParseContext *ctx,
+                                  const gchar *element_name,
+                                  GError **error)
+{
+  pop_node (ctx);
+  if (ctx->node_stack == NULL)
+    {
+      state_switch (ctx, STATE_NAMESPACE);
+    }
+  else
+    {
+      if (CURRENT_NODE (ctx)->type == G_IR_NODE_STRUCT)
+        state_switch (ctx, STATE_STRUCT);
+      else if (CURRENT_NODE (ctx)->type == G_IR_NODE_UNION)
+        state_switch (ctx, STATE_UNION);
+      else if (CURRENT_NODE (ctx)->type == G_IR_NODE_OBJECT)
+        state_switch (ctx, STATE_CLASS);
+      else
+        {
+          int line_number, char_number;
+          g_markup_parse_context_get_position (context, &line_number, &char_number);
+          g_set_error (error,
+                       G_MARKUP_ERROR,
+                       G_MARKUP_ERROR_INVALID_CONTENT,
+                       "Unexpected end tag '%s' on line %d char %d",
+                       element_name,
+                       line_number, char_number);
+          return FALSE;
+        }
+    }
+  return TRUE;
+}
+
+static gboolean
+require_end_element (GMarkupParseContext *context,
+                    ParseContext        *ctx,
+                    const char          *expected_name,
+                    const char          *actual_name,
+                    GError             **error)
+{
+  return require_one_of_end_elements (context, ctx, actual_name, error, expected_name, NULL);
+}
+
+static void
+end_element_handler (GMarkupParseContext *context,
+                    const gchar         *element_name,
+                    gpointer             user_data,
+                    GError             **error)
+{
+  ParseContext *ctx = user_data;
+
+  g_debug ("</%s>", element_name);
+
+  switch (ctx->state)
+    {
+    case STATE_START:
+    case STATE_END:
+      /* no need to GError here, GMarkup already catches this */
+      break;
+
+    case STATE_REPOSITORY:
+      state_switch (ctx, STATE_END);
+      break;
+
+    case STATE_INCLUDE:
+      if (require_end_element (context, ctx, "include", element_name, error))
+       {
+          state_switch (ctx, STATE_REPOSITORY);
+        }
+      break;
+
+    case STATE_C_INCLUDE:
+      if (require_end_element (context, ctx, "c:include", element_name, error))
+       {
+          state_switch (ctx, STATE_REPOSITORY);
+        }
+      break;
+
+    case STATE_PACKAGE:
+      if (require_end_element (context, ctx, "package", element_name, error))
+        {
+          state_switch (ctx, STATE_REPOSITORY);
+        }
+      break;
+
+    case STATE_NAMESPACE:
+      if (require_end_element (context, ctx, "namespace", element_name, error))
+       {
+          ctx->current_module = NULL;
+          state_switch (ctx, STATE_REPOSITORY);
+        }
+      break;
+
+    case STATE_ALIAS:
+      if (require_end_element (context, ctx, "alias", element_name, error))
+       {
+         g_free (ctx->current_alias);
+         ctx->current_alias = NULL;
+         state_switch (ctx, STATE_NAMESPACE);
+       }
+      break;
+
+    case STATE_FUNCTION_RETURN:
+      if (strcmp ("type", element_name) == 0)
+       break;
+      if (require_end_element (context, ctx, "return-value", element_name, error))
+       {
+         state_switch (ctx, STATE_FUNCTION);
+       }
+      break;
+
+    case STATE_FUNCTION_PARAMETERS:
+      if (require_end_element (context, ctx, "parameters", element_name, error))
+       {
+         state_switch (ctx, STATE_FUNCTION);
+       }
+      break;
+
+    case STATE_FUNCTION_PARAMETER:
+      if (strcmp ("type", element_name) == 0)
+       break;
+      if (require_end_element (context, ctx, "parameter", element_name, error))
+       {
+         state_switch (ctx, STATE_FUNCTION_PARAMETERS);
+       }
+      break;
+
+    case STATE_FUNCTION:
+      {
+        pop_node (ctx);
+       if (ctx->node_stack == NULL)
+         {
+           state_switch (ctx, STATE_NAMESPACE);
+         }
+       else
+         {
+            g_debug("case STATE_FUNCTION %d", CURRENT_NODE (ctx)->type);
+            if (ctx->in_embedded_type)
+              {
+                ctx->in_embedded_type = FALSE;
+                state_switch (ctx, STATE_STRUCT_FIELD);
+              }
+           else if (CURRENT_NODE (ctx)->type == G_IR_NODE_INTERFACE)
+             state_switch (ctx, STATE_INTERFACE);
+           else if (CURRENT_NODE (ctx)->type == G_IR_NODE_OBJECT)
+             state_switch (ctx, STATE_CLASS);
+           else if (CURRENT_NODE (ctx)->type == G_IR_NODE_BOXED)
+             state_switch (ctx, STATE_BOXED);
+           else if (CURRENT_NODE (ctx)->type == G_IR_NODE_STRUCT)
+             state_switch (ctx, STATE_STRUCT);
+           else if (CURRENT_NODE (ctx)->type == G_IR_NODE_UNION)
+             state_switch (ctx, STATE_UNION);
+           else if (CURRENT_NODE (ctx)->type == G_IR_NODE_ENUM ||
+                    CURRENT_NODE (ctx)->type == G_IR_NODE_FLAGS)
+             state_switch (ctx, STATE_ENUM);
+           else
+             {
+               int line_number, char_number;
+               g_markup_parse_context_get_position (context, &line_number, &char_number);
+               g_set_error (error,
+                            G_MARKUP_ERROR,
+                            G_MARKUP_ERROR_INVALID_CONTENT,
+                            "Unexpected end tag '%s' on line %d char %d",
+                            element_name,
+                            line_number, char_number);
+             }
+         }
+      }
+      break;
+
+    case STATE_CLASS_FIELD:
+      if (strcmp ("type", element_name) == 0)
+       break;
+      if (require_end_element (context, ctx, "field", element_name, error))
+       {
+         state_switch (ctx, STATE_CLASS);
+       }
+      break;
+
+    case STATE_CLASS_PROPERTY:
+      if (strcmp ("type", element_name) == 0)
+       break;
+      if (require_end_element (context, ctx, "property", element_name, error))
+       {
+         state_switch (ctx, STATE_CLASS);
+       }
+      break;
+
+    case STATE_CLASS:
+      if (require_end_element (context, ctx, "class", element_name, error))
+       {
+         pop_node (ctx);
+         state_switch (ctx, STATE_NAMESPACE);
+       }
+      break;
+
+    case STATE_INTERFACE_PROPERTY:
+      if (strcmp ("type", element_name) == 0)
+       break;
+      if (require_end_element (context, ctx, "property", element_name, error))
+       {
+         state_switch (ctx, STATE_INTERFACE);
+       }
+      break;
+
+    case STATE_INTERFACE_FIELD:
+      if (strcmp ("type", element_name) == 0)
+       break;
+      if (require_end_element (context, ctx, "field", element_name, error))
+       {
+         state_switch (ctx, STATE_INTERFACE);
+       }
+      break;
+
+    case STATE_INTERFACE:
+      if (require_end_element (context, ctx, "interface", element_name, error))
+       {
+         pop_node (ctx);
+         state_switch (ctx, STATE_NAMESPACE);
+       }
+      break;
+
+    case STATE_ENUM:
+      if (strcmp ("member", element_name) == 0)
+       break;
+      else if (strcmp ("function", element_name) == 0)
+       break;
+      else if (require_one_of_end_elements (context, ctx,
+                                           element_name, error, "enumeration",
+                                           "bitfield", NULL))
+       {
+         pop_node (ctx);
+         state_switch (ctx, STATE_NAMESPACE);
+       }
+      break;
+
+    case STATE_BOXED:
+      if (require_end_element (context, ctx, "glib:boxed", element_name, error))
+       {
+         pop_node (ctx);
+         state_switch (ctx, STATE_NAMESPACE);
+       }
+      break;
+
+    case STATE_BOXED_FIELD:
+      if (strcmp ("type", element_name) == 0)
+       break;
+      if (require_end_element (context, ctx, "field", element_name, error))
+       {
+         state_switch (ctx, STATE_BOXED);
+       }
+      break;
+
+    case STATE_STRUCT_FIELD:
+      if (strcmp ("type", element_name) == 0)
+       break;
+      if (require_end_element (context, ctx, "field", element_name, error))
+       {
+         state_switch (ctx, STATE_STRUCT);
+       }
+      break;
+
+    case STATE_STRUCT:
+      if (require_end_element (context, ctx, "record", element_name, error))
+       {
+         state_switch_end_struct_or_union (context, ctx, element_name, error);
+       }
+      break;
+
+    case STATE_UNION_FIELD:
+      if (strcmp ("type", element_name) == 0)
+       break;
+      if (require_end_element (context, ctx, "field", element_name, error))
+       {
+         state_switch (ctx, STATE_UNION);
+       }
+      break;
+
+    case STATE_UNION:
+      if (require_end_element (context, ctx, "union", element_name, error))
+       {
+         state_switch_end_struct_or_union (context, ctx, element_name, error);
+       }
+      break;
+    case STATE_IMPLEMENTS:
+      if (strcmp ("interface", element_name) == 0)
+       break;
+      if (require_end_element (context, ctx, "implements", element_name, error))
+        state_switch (ctx, STATE_CLASS);
+      break;
+    case STATE_PREREQUISITE:
+      if (require_end_element (context, ctx, "prerequisite", element_name, error))
+        state_switch (ctx, STATE_INTERFACE);
+      break;
+    case STATE_NAMESPACE_CONSTANT:
+    case STATE_CLASS_CONSTANT:
+    case STATE_INTERFACE_CONSTANT:
+      if (strcmp ("type", element_name) == 0)
+       break;
+      if (require_end_element (context, ctx, "constant", element_name, error))
+       {
+         switch (ctx->state)
+           {
+           case STATE_NAMESPACE_CONSTANT:
+                 pop_node (ctx);
+             state_switch (ctx, STATE_NAMESPACE);
+             break;
+           case STATE_CLASS_CONSTANT:
+             state_switch (ctx, STATE_CLASS);
+             break;
+           case STATE_INTERFACE_CONSTANT:
+             state_switch (ctx, STATE_INTERFACE);
+             break;
+           default:
+             g_assert_not_reached ();
+             break;
+           }
+       }
+      break;
+    case STATE_TYPE:
+      if ((strcmp ("type", element_name) == 0) || (strcmp ("array", element_name) == 0) ||
+         (strcmp ("varargs", element_name) == 0))
+       {
+         end_type (ctx);
+         break;
+       }
+    case STATE_ATTRIBUTE:
+      if (strcmp ("attribute", element_name) == 0)
+        {
+          state_switch (ctx, ctx->prev_state);
+        }
+      break;
+
+    case STATE_DOC:
+      if (strcmp ("doc", element_name) == 0)
+        {
+          state_switch (ctx, ctx->prev_state);
+        }
+      break;
+
+    case STATE_PASSTHROUGH:
+      ctx->unknown_depth -= 1;
+      g_assert (ctx->unknown_depth >= 0);
+      if (ctx->unknown_depth == 0)
+        state_switch (ctx, ctx->prev_state);
+      break;
+    default:
+      g_error ("Unhandled state %d in end_element_handler\n", ctx->state);
+    }
+}
+
+static void
+text_handler (GMarkupParseContext *context,
+             const gchar         *text,
+             gsize                text_len,
+             gpointer             user_data,
+             GError             **error)
+{
+  /* FIXME warn about non-whitespace text */
+}
+
+static void
+cleanup (GMarkupParseContext *context,
+        GError              *error,
+        gpointer             user_data)
+{
+  ParseContext *ctx = user_data;
+  GList *m;
+
+  for (m = ctx->modules; m; m = m->next)
+    _g_ir_module_free (m->data);
+  g_list_free (ctx->modules);
+  ctx->modules = NULL;
+
+  ctx->current_module = NULL;
+}
+
+/**
+ * _g_ir_parser_parse_string:
+ * @parser: a #GIrParser
+ * @namespace: the namespace of the string
+ * @filename: (allow-none): Path to parsed file, or %NULL
+ * @buffer: the data containing the XML
+ * @length: length of the data
+ * @error: return location for a #GError, or %NULL
+ *
+ * Parse a string that holds a complete GIR XML file, and return a list of a
+ * a #GirModule for each &lt;namespace/&gt; element within the file.
+ *
+ * Returns: (transfer none): a new #GirModule
+ */
+GIrModule *
+_g_ir_parser_parse_string (GIrParser           *parser,
+                          const gchar         *namespace,
+                          const gchar         *filename,
+                          const gchar         *buffer,
+                          gssize               length,
+                          GError             **error)
+{
+  ParseContext ctx = { 0 };
+  GMarkupParseContext *context;
+
+  ctx.parser = parser;
+  ctx.state = STATE_START;
+  ctx.file_path = filename;
+  ctx.namespace = namespace;
+  ctx.include_modules = NULL;
+  ctx.aliases = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
+  ctx.disguised_structures = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+  ctx.type_depth = 0;
+  ctx.dependencies = NULL;
+  ctx.current_module = NULL;
+
+  context = g_markup_parse_context_new (&firstpass_parser, 0, &ctx, NULL);
+
+  if (!g_markup_parse_context_parse (context, buffer, length, error))
+    goto out;
+
+  if (!g_markup_parse_context_end_parse (context, error))
+    goto out;
+
+  g_markup_parse_context_free (context);
+
+  ctx.state = STATE_START;
+  context = g_markup_parse_context_new (&markup_parser, 0, &ctx, NULL);
+  if (!g_markup_parse_context_parse (context, buffer, length, error))
+    goto out;
+
+  if (!g_markup_parse_context_end_parse (context, error))
+    goto out;
+
+  parser->parsed_modules = g_list_concat (g_list_copy (ctx.modules),
+                                         parser->parsed_modules);
+
+ out:
+
+  if (ctx.modules == NULL)
+    {
+      /* An error occurred before we created a module, so we haven't
+       * transferred ownership of these hash tables to the module.
+       */
+      if (ctx.aliases != NULL)
+       g_hash_table_destroy (ctx.aliases);
+      if (ctx.disguised_structures != NULL)
+       g_hash_table_destroy (ctx.disguised_structures);
+      g_list_free (ctx.include_modules);
+    }
+
+  g_markup_parse_context_free (context);
+
+  if (ctx.modules)
+    return ctx.modules->data;
+
+  if (error && *error == NULL)
+    g_set_error (error,
+                 G_MARKUP_ERROR,
+                 G_MARKUP_ERROR_INVALID_CONTENT,
+                 "Expected namespace element in the gir file");
+  return NULL;
+}
+
+/**
+ * _g_ir_parser_parse_file:
+ * @parser: a #GIrParser
+ * @filename: filename to parse
+ * @error: return location for a #GError, or %NULL
+ *
+ * Parse GIR XML file, and return a list of a a #GirModule for each
+ * &lt;namespace/&gt; element within the file.
+ *
+ * Returns: (transfer container): a newly allocated list of #GIrModule. The modules themselves
+ *  are owned by the #GIrParser and will be freed along with the parser.
+ */
+GIrModule *
+_g_ir_parser_parse_file (GIrParser   *parser,
+                        const gchar *filename,
+                        GError     **error)
+{
+  gchar *buffer;
+  gsize length;
+  GIrModule *module;
+  const char *slash;
+  char *dash;
+  char *namespace;
+
+  if (!g_str_has_suffix (filename, ".gir"))
+    {
+      g_set_error (error,
+                  G_MARKUP_ERROR,
+                  G_MARKUP_ERROR_INVALID_CONTENT,
+                  "Expected filename to end with '.gir'");
+      return NULL;
+    }
+
+  g_debug ("[parsing] filename %s", filename);
+
+  slash = g_strrstr (filename, "/");
+  if (!slash)
+    namespace = g_strdup (filename);
+  else
+    namespace = g_strdup (slash+1);
+  namespace[strlen(namespace)-4] = '\0';
+
+  /* Remove version */
+  dash = strstr (namespace, "-");
+  if (dash != NULL)
+    *dash = '\0';
+
+  if (!g_file_get_contents (filename, &buffer, &length, error))
+    return NULL;
+
+  module = _g_ir_parser_parse_string (parser, namespace, filename, buffer, length, error);
+
+  g_free (namespace);
+
+  g_free (buffer);
+
+  return module;
+}
+
+
diff --git a/girepository/girparser.h b/girepository/girparser.h
new file mode 100644 (file)
index 0000000..4f79c77
--- /dev/null
@@ -0,0 +1,50 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: A parser for the XML GIR format
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ *
+ * 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 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.
+ */
+
+#ifndef __G_GIR_PARSER_H__
+#define __G_GIR_PARSER_H__
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+#include "girmodule.h"
+
+typedef struct _GIrParser GIrParser;
+
+GIrParser *_g_ir_parser_new          (void);
+void       _g_ir_parser_free         (GIrParser          *parser);
+void       _g_ir_parser_set_includes (GIrParser          *parser,
+                                     const gchar *const *includes);
+
+GIrModule *_g_ir_parser_parse_string (GIrParser    *parser,
+                                     const gchar  *namespace,
+                                     const gchar  *filename,
+                                     const gchar  *buffer,
+                                     gssize        length,
+                                     GError      **error);
+GIrModule *_g_ir_parser_parse_file   (GIrParser    *parser,
+                                     const gchar  *filename,
+                                     GError      **error);
+
+G_END_DECLS
+
+#endif  /* __G_GIR_PARSER_H__ */
diff --git a/girepository/girwriter.c b/girepository/girwriter.c
new file mode 100644 (file)
index 0000000..73088a1
--- /dev/null
@@ -0,0 +1,1398 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: IDL generator
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#include <errno.h>
+#include <string.h>
+#include <stdio.h>
+
+#include <glib.h>
+#include <glib-object.h>
+#include <glib/gstdio.h>
+
+#include "girwriter.h"
+#include "girepository.h"
+#include "gitypelib-internal.h"
+
+typedef struct {
+  FILE *file;
+  GSList *stack;
+  gboolean show_all;
+} Xml;
+
+typedef struct {
+  char *name;
+  guint has_children : 1;
+} XmlElement;
+
+static XmlElement *
+xml_element_new (const char *name)
+{
+  XmlElement *elem;
+
+  elem = g_slice_new (XmlElement);
+  elem->name = g_strdup (name);
+  elem->has_children = FALSE;
+  return elem;
+}
+
+static void
+xml_element_free (XmlElement *elem)
+{
+  g_free (elem->name);
+  g_slice_free (XmlElement, elem);
+}
+
+static void
+xml_printf (Xml *xml, const char *fmt, ...)
+{
+  va_list ap;
+  char *s;
+
+  va_start (ap, fmt);
+  s = g_markup_vprintf_escaped (fmt, ap);
+  fputs (s, xml->file);
+  g_free (s);
+  va_end (ap);
+}
+
+static void
+xml_start_element (Xml *xml, const char *element_name)
+{
+  XmlElement *parent = NULL;
+
+  if (xml->stack)
+    {
+      parent = xml->stack->data;
+
+      if (!parent->has_children)
+        xml_printf (xml, ">\n");
+
+      parent->has_children = TRUE;
+    }
+
+  xml_printf (xml, "%*s<%s", g_slist_length(xml->stack)*2, "", element_name);
+
+  xml->stack = g_slist_prepend (xml->stack, xml_element_new (element_name));
+}
+
+static void
+xml_end_element (Xml *xml, const char *name)
+{
+  XmlElement *elem;
+
+  g_assert (xml->stack != NULL);
+
+  elem = xml->stack->data;
+  xml->stack = g_slist_delete_link (xml->stack, xml->stack);
+
+  if (name != NULL)
+    g_assert_cmpstr (name, ==, elem->name);
+
+  if (elem->has_children)
+    xml_printf (xml, "%*s</%s>\n", g_slist_length (xml->stack)*2, "", elem->name);
+  else
+    xml_printf (xml, "/>\n");
+
+  xml_element_free (elem);
+}
+
+static void
+xml_end_element_unchecked (Xml *xml)
+{
+  xml_end_element (xml, NULL);
+}
+
+static Xml *
+xml_open (FILE *file)
+{
+  Xml *xml;
+
+  xml = g_slice_new (Xml);
+  xml->file = file;
+  xml->stack = NULL;
+
+  return xml;
+}
+
+static void
+xml_close (Xml *xml)
+{
+  g_assert (xml->stack == NULL);
+  if (xml->file != NULL)
+    {
+      fflush (xml->file);
+      if (xml->file != stdout)
+        fclose (xml->file);
+      xml->file = NULL;
+    }
+}
+
+static void
+xml_free (Xml *xml)
+{
+  xml_close (xml);
+  g_slice_free (Xml, xml);
+}
+
+
+static void
+check_unresolved (GIBaseInfo *info)
+{
+  if (g_base_info_get_type (info) != GI_INFO_TYPE_UNRESOLVED)
+    return;
+
+  g_critical ("Found unresolved type '%s' '%s'\n",
+             g_base_info_get_name (info), g_base_info_get_namespace (info));
+}
+
+static void
+write_type_name (const gchar *namespace,
+                GIBaseInfo  *info,
+                Xml         *file)
+{
+  if (strcmp (namespace, g_base_info_get_namespace (info)) != 0)
+    xml_printf (file, "%s.", g_base_info_get_namespace (info));
+
+  xml_printf (file, "%s", g_base_info_get_name (info));
+}
+
+static void
+write_type_name_attribute (const gchar *namespace,
+                          GIBaseInfo  *info,
+                          const char  *attr_name,
+                          Xml         *file)
+{
+  xml_printf (file, " %s=\"", attr_name);
+  write_type_name (namespace, info, file);
+  xml_printf (file, "\"");
+}
+
+ static void
+write_ownership_transfer (GITransfer transfer,
+                          Xml       *file)
+{
+  switch (transfer)
+    {
+    case GI_TRANSFER_NOTHING:
+      xml_printf (file, " transfer-ownership=\"none\"");
+      break;
+    case GI_TRANSFER_CONTAINER:
+      xml_printf (file, " transfer-ownership=\"container\"");
+      break;
+    case GI_TRANSFER_EVERYTHING:
+      xml_printf (file, " transfer-ownership=\"full\"");
+      break;
+    default:
+      g_assert_not_reached ();
+    }
+}
+
+static void
+write_type_info (const gchar *namespace,
+                GITypeInfo  *info,
+                Xml         *file)
+{
+  gint tag;
+  GITypeInfo *type;
+  gboolean is_pointer;
+
+  check_unresolved ((GIBaseInfo*)info);
+
+  tag = g_type_info_get_tag (info);
+  is_pointer = g_type_info_is_pointer (info);
+
+  if (tag == GI_TYPE_TAG_VOID)
+    {
+      xml_start_element (file, "type");
+
+      xml_printf (file, " name=\"%s\"", is_pointer ? "any" : "none");
+
+      xml_end_element (file, "type");
+    }
+  else if (G_TYPE_TAG_IS_BASIC (tag))
+    {
+      xml_start_element (file, "type");
+      xml_printf (file, " name=\"%s\"", g_type_tag_to_string (tag));
+      xml_end_element (file, "type");
+    }
+  else if (tag == GI_TYPE_TAG_ARRAY)
+    {
+      gint length, size;
+      char *name = NULL;
+
+      xml_start_element (file, "array");
+
+      switch (g_type_info_get_array_type (info)) {
+        case GI_ARRAY_TYPE_C:
+            break;
+        case GI_ARRAY_TYPE_ARRAY:
+            name = "GLib.Array";
+            break;
+        case GI_ARRAY_TYPE_PTR_ARRAY:
+            name = "GLib.PtrArray";
+            break;
+        case GI_ARRAY_TYPE_BYTE_ARRAY:
+            name = "GLib.ByteArray";
+            break;
+        default:
+            break;
+      }
+
+      if (name)
+        xml_printf (file, " name=\"%s\"", name);
+
+      type = g_type_info_get_param_type (info, 0);
+
+      length = g_type_info_get_array_length (info);
+      if (length >= 0)
+        xml_printf (file, " length=\"%d\"", length);
+
+      size = g_type_info_get_array_fixed_size (info);
+      if (size >= 0)
+        xml_printf (file, " fixed-size=\"%d\"", size);
+
+      if (g_type_info_is_zero_terminated (info))
+       xml_printf (file, " zero-terminated=\"1\"");
+
+      write_type_info (namespace, type, file);
+
+      g_base_info_unref ((GIBaseInfo *)type);
+
+      xml_end_element (file, "array");
+    }
+  else if (tag == GI_TYPE_TAG_INTERFACE)
+    {
+      GIBaseInfo *iface = g_type_info_get_interface (info);
+      xml_start_element (file, "type");
+      write_type_name_attribute (namespace, iface, "name", file);
+      xml_end_element (file, "type");
+      g_base_info_unref (iface);
+    }
+  else if (tag == GI_TYPE_TAG_GLIST)
+    {
+      xml_start_element (file, "type");
+      xml_printf (file, " name=\"GLib.List\"");
+      type = g_type_info_get_param_type (info, 0);
+      if (type)
+       {
+         write_type_info (namespace, type, file);
+         g_base_info_unref ((GIBaseInfo *)type);
+       }
+      xml_end_element (file, "type");
+    }
+  else if (tag == GI_TYPE_TAG_GSLIST)
+    {
+      xml_start_element (file, "type");
+      xml_printf (file, " name=\"GLib.SList\"");
+      type = g_type_info_get_param_type (info, 0);
+      if (type)
+       {
+         write_type_info (namespace, type, file);
+         g_base_info_unref ((GIBaseInfo *)type);
+       }
+      xml_end_element (file, "type");
+    }
+  else if (tag == GI_TYPE_TAG_GHASH)
+    {
+      xml_start_element (file, "type");
+      xml_printf (file, " name=\"GLib.HashTable\"");
+      type = g_type_info_get_param_type (info, 0);
+      if (type)
+       {
+         write_type_info (namespace, type, file);
+         g_base_info_unref ((GIBaseInfo *)type);
+         type = g_type_info_get_param_type (info, 1);
+         write_type_info (namespace, type, file);
+         g_base_info_unref ((GIBaseInfo *)type);
+       }
+      xml_end_element (file, "type");
+    }
+  else if (tag == GI_TYPE_TAG_ERROR)
+    {
+      xml_start_element (file, "type");
+      xml_printf (file, " name=\"GLib.Error\"");
+      xml_end_element (file, "type");
+    }
+  else
+    {
+      g_printerr ("Unhandled type tag %d\n", tag);
+      g_assert_not_reached ();
+    }
+}
+
+static void
+write_attributes (Xml *file,
+                  GIBaseInfo *info)
+{
+  GIAttributeIter iter = { 0, };
+  char *name, *value;
+
+  while (g_base_info_iterate_attributes (info, &iter, &name, &value))
+    {
+      xml_start_element (file, "attribute");
+      xml_printf (file, " name=\"%s\" value=\"%s\"", name, value);
+      xml_end_element (file, "attribute");
+    }
+}
+
+static void
+write_return_value_attributes (Xml *file,
+                               GICallableInfo *info)
+{
+  GIAttributeIter iter = { 0, };
+  char *name, *value;
+
+  while (g_callable_info_iterate_return_attributes (info, &iter, &name, &value))
+    {
+      xml_start_element (file, "attribute");
+      xml_printf (file, " name=\"%s\" value=\"%s\"", name, value);
+      xml_end_element (file, "attribute");
+    }
+}
+
+static void
+write_constant_value (const gchar *namespace,
+                     GITypeInfo *info,
+                     GIArgument *argument,
+                     Xml *file);
+
+static void
+write_callback_info (const gchar    *namespace,
+                    GICallbackInfo *info,
+                    Xml            *file);
+
+static void
+write_field_info (const gchar *namespace,
+                 GIFieldInfo *info,
+                 GIConstantInfo *branch,
+                 Xml         *file)
+{
+  const gchar *name;
+  GIFieldInfoFlags flags;
+  gint size;
+  gint offset;
+  GITypeInfo *type;
+  GIBaseInfo *interface;
+  GIArgument value;
+
+  name = g_base_info_get_name ((GIBaseInfo *)info);
+  flags = g_field_info_get_flags (info);
+  size = g_field_info_get_size (info);
+  offset = g_field_info_get_offset (info);
+
+  xml_start_element (file, "field");
+  xml_printf (file, " name=\"%s\"", name);
+
+  /* Fields are assumed to be read-only
+   * (see also girwriter.py and girparser.c)
+   */
+  if (!(flags & GI_FIELD_IS_READABLE))
+    xml_printf (file, " readable=\"0\"");
+  if (flags & GI_FIELD_IS_WRITABLE)
+    xml_printf (file, " writable=\"1\"");
+
+  if (size)
+    xml_printf (file, " bits=\"%d\"", size);
+
+  write_attributes (file, (GIBaseInfo*) info);
+
+  type = g_field_info_get_type (info);
+
+  if (branch)
+    {
+      xml_printf (file, " branch=\"");
+      type = g_constant_info_get_type (branch);
+      g_constant_info_get_value (branch, &value);
+      write_constant_value (namespace, type, &value, file);
+      xml_printf (file, "\"");
+    }
+
+  if (file->show_all)
+    {
+      if (offset >= 0)
+        xml_printf (file, "offset=\"%d\"", offset);
+    }
+
+  interface = g_type_info_get_interface (type);
+  if (interface && g_base_info_get_type(interface) == GI_INFO_TYPE_CALLBACK)
+    write_callback_info (namespace, (GICallbackInfo *)interface, file);
+  else
+    write_type_info (namespace, type, file);
+
+  if (interface)
+    g_base_info_unref (interface);
+
+  g_base_info_unref ((GIBaseInfo *)type);
+
+  xml_end_element (file, "field");
+}
+
+static void
+write_callable_info (const gchar    *namespace,
+                    GICallableInfo *info,
+                    Xml            *file)
+{
+  GITypeInfo *type;
+  gint i;
+
+  write_attributes (file, (GIBaseInfo*) info);
+
+  type = g_callable_info_get_return_type (info);
+
+  xml_start_element (file, "return-value");
+
+  write_ownership_transfer (g_callable_info_get_caller_owns (info), file);
+
+  if (g_callable_info_may_return_null (info))
+    xml_printf (file, " allow-none=\"1\"");
+
+  if (g_callable_info_skip_return (info))
+    xml_printf (file, " skip=\"1\"");
+
+  write_return_value_attributes (file, info);
+
+  write_type_info (namespace, type, file);
+
+  xml_end_element (file, "return-value");
+
+  if (g_callable_info_get_n_args (info) <= 0)
+    return;
+
+  xml_start_element (file, "parameters");
+  for (i = 0; i < g_callable_info_get_n_args (info); i++)
+    {
+      GIArgInfo *arg = g_callable_info_get_arg (info, i);
+
+      xml_start_element (file, "parameter");
+      xml_printf (file, " name=\"%s\"",
+                  g_base_info_get_name ((GIBaseInfo *) arg));
+
+      write_ownership_transfer (g_arg_info_get_ownership_transfer (arg), file);
+
+      switch (g_arg_info_get_direction (arg))
+       {
+       case GI_DIRECTION_IN:
+         break;
+       case GI_DIRECTION_OUT:
+         xml_printf (file, " direction=\"out\" caller-allocates=\"%s\"",
+                     g_arg_info_is_caller_allocates (arg) ? "1" : "0");
+         break;
+       case GI_DIRECTION_INOUT:
+         xml_printf (file, " direction=\"inout\"");
+         break;
+       }
+
+      if (g_arg_info_may_be_null (arg))
+       xml_printf (file, " allow-none=\"1\"");
+
+      if (g_arg_info_is_return_value (arg))
+       xml_printf (file, " retval=\"1\"");
+
+      if (g_arg_info_is_optional (arg))
+       xml_printf (file, " optional=\"1\"");
+
+      switch (g_arg_info_get_scope (arg))
+        {
+        case GI_SCOPE_TYPE_INVALID:
+          break;
+        case GI_SCOPE_TYPE_CALL:
+          xml_printf (file, " scope=\"call\"");
+          break;
+        case GI_SCOPE_TYPE_ASYNC:
+          xml_printf (file, " scope=\"async\"");
+          break;
+        case GI_SCOPE_TYPE_NOTIFIED:
+          xml_printf (file, " scope=\"notified\"");
+          break;
+        }
+
+      if (g_arg_info_get_closure (arg) >= 0)
+        xml_printf (file, " closure=\"%d\"", g_arg_info_get_closure (arg));
+
+      if (g_arg_info_get_destroy (arg) >= 0)
+        xml_printf (file, " destroy=\"%d\"", g_arg_info_get_destroy (arg));
+
+      if (g_arg_info_is_skip (arg))
+        xml_printf (file, " skip=\"1\"");
+
+      write_attributes (file, (GIBaseInfo*) arg);
+
+      type = g_arg_info_get_type (arg);
+      write_type_info (namespace, type, file);
+
+      xml_end_element (file, "parameter");
+
+      g_base_info_unref ((GIBaseInfo *)arg);
+    }
+
+  xml_end_element (file, "parameters");
+  g_base_info_unref ((GIBaseInfo *)type);
+}
+
+static void
+write_function_info (const gchar    *namespace,
+                    GIFunctionInfo *info,
+                    Xml            *file)
+{
+  GIFunctionInfoFlags flags;
+  const gchar *tag;
+  const gchar *name;
+  const gchar *symbol;
+  gboolean deprecated;
+  gboolean throws;
+
+  flags = g_function_info_get_flags (info);
+  name = g_base_info_get_name ((GIBaseInfo *)info);
+  symbol = g_function_info_get_symbol (info);
+  deprecated = g_base_info_is_deprecated ((GIBaseInfo *)info);
+  throws = flags & GI_FUNCTION_THROWS;
+
+  if (flags & GI_FUNCTION_IS_CONSTRUCTOR)
+    tag = "constructor";
+  else if (flags & GI_FUNCTION_IS_METHOD)
+    tag = "method";
+  else
+    tag = "function";
+
+  xml_start_element (file, tag);
+  xml_printf (file, " name=\"%s\" c:identifier=\"%s\"",
+              name, symbol);
+
+  if (flags & GI_FUNCTION_IS_SETTER)
+    xml_printf (file, " type=\"setter\"");
+  else if (flags & GI_FUNCTION_IS_GETTER)
+    xml_printf (file, " type=\"getter\"");
+
+  if (deprecated)
+    xml_printf (file, " deprecated=\"1\"");
+
+  if (throws)
+    xml_printf (file, " throws=\"1\"");
+
+  write_callable_info (namespace, (GICallableInfo*)info, file);
+  xml_end_element (file, tag);
+}
+
+static void
+write_callback_info (const gchar    *namespace,
+                    GICallbackInfo *info,
+                    Xml            *file)
+{
+  const gchar *name;
+  gboolean deprecated;
+
+  name = g_base_info_get_name ((GIBaseInfo *)info);
+  deprecated = g_base_info_is_deprecated ((GIBaseInfo *)info);
+
+  xml_start_element (file, "callback");
+  xml_printf (file, " name=\"%s\"", name);
+
+  if (deprecated)
+    xml_printf (file, " deprecated=\"1\"");
+
+  write_callable_info (namespace, (GICallableInfo*)info, file);
+  xml_end_element (file, "callback");
+}
+
+static void
+write_struct_info (const gchar  *namespace,
+                  GIStructInfo *info,
+                  Xml          *file)
+{
+  const gchar *name;
+  const gchar *type_name;
+  const gchar *type_init;
+  gboolean deprecated;
+  gboolean is_gtype_struct;
+  gboolean foreign;
+  gint i;
+  gint size;
+  int n_elts;
+
+  name = g_base_info_get_name ((GIBaseInfo *)info);
+  deprecated = g_base_info_is_deprecated ((GIBaseInfo *)info);
+
+  type_name = g_registered_type_info_get_type_name ((GIRegisteredTypeInfo*)info);
+  type_init = g_registered_type_info_get_type_init ((GIRegisteredTypeInfo*)info);
+
+  if (g_base_info_get_type ((GIBaseInfo *)info) == GI_INFO_TYPE_BOXED)
+    {
+      xml_start_element (file, "glib:boxed");
+      xml_printf (file, " glib:name=\"%s\"", name);
+    }
+  else
+    {
+      xml_start_element (file, "record");
+      xml_printf (file, " name=\"%s\"", name);
+    }
+
+  if (type_name != NULL)
+    xml_printf (file, " glib:type-name=\"%s\" glib:get-type=\"%s\"", type_name, type_init);
+
+  if (deprecated)
+    xml_printf (file, " deprecated=\"1\"");
+
+  is_gtype_struct = g_struct_info_is_gtype_struct (info);
+  if (is_gtype_struct)
+    xml_printf (file, " glib:is-gtype-struct=\"1\"");
+
+  write_attributes (file, (GIBaseInfo*) info);
+
+  size = g_struct_info_get_size (info);
+  if (file->show_all && size >= 0)
+    xml_printf (file, " size=\"%d\"", size);
+
+  foreign = g_struct_info_is_foreign (info);
+  if (foreign)
+    xml_printf (file, " foreign=\"1\"");
+
+  n_elts = g_struct_info_get_n_fields (info) + g_struct_info_get_n_methods (info);
+  if (n_elts > 0)
+    {
+      for (i = 0; i < g_struct_info_get_n_fields (info); i++)
+       {
+         GIFieldInfo *field = g_struct_info_get_field (info, i);
+         write_field_info (namespace, field, NULL, file);
+         g_base_info_unref ((GIBaseInfo *)field);
+       }
+
+      for (i = 0; i < g_struct_info_get_n_methods (info); i++)
+       {
+         GIFunctionInfo *function = g_struct_info_get_method (info, i);
+         write_function_info (namespace, function, file);
+         g_base_info_unref ((GIBaseInfo *)function);
+       }
+
+    }
+
+  xml_end_element_unchecked (file);
+}
+
+static void
+write_value_info (const gchar *namespace,
+                 GIValueInfo *info,
+                 Xml         *file)
+{
+  const gchar *name;
+  gint64 value;
+  gchar *value_str;
+  gboolean deprecated;
+
+  name = g_base_info_get_name ((GIBaseInfo *)info);
+  value = g_value_info_get_value (info);
+  deprecated = g_base_info_is_deprecated ((GIBaseInfo *)info);
+
+  xml_start_element (file, "member");
+  value_str = g_strdup_printf ("%" G_GINT64_FORMAT, value);
+  xml_printf (file, " name=\"%s\" value=\"%s\"", name, value_str);
+  g_free (value_str);
+
+  if (deprecated)
+    xml_printf (file, " deprecated=\"1\"");
+
+  write_attributes (file, (GIBaseInfo*) info);
+
+  xml_end_element (file, "member");
+}
+
+static void
+write_constant_value (const gchar *namespace,
+                     GITypeInfo *type,
+                     GIArgument  *value,
+                     Xml        *file)
+{
+  switch (g_type_info_get_tag (type))
+    {
+    case GI_TYPE_TAG_BOOLEAN:
+      xml_printf (file, "%d", value->v_boolean);
+      break;
+    case GI_TYPE_TAG_INT8:
+      xml_printf (file, "%d", value->v_int8);
+      break;
+    case GI_TYPE_TAG_UINT8:
+      xml_printf (file, "%d", value->v_uint8);
+      break;
+    case GI_TYPE_TAG_INT16:
+      xml_printf (file, "%" G_GINT16_FORMAT, value->v_int16);
+      break;
+    case GI_TYPE_TAG_UINT16:
+      xml_printf (file, "%" G_GUINT16_FORMAT, value->v_uint16);
+      break;
+    case GI_TYPE_TAG_INT32:
+      xml_printf (file, "%" G_GINT32_FORMAT, value->v_int32);
+      break;
+    case GI_TYPE_TAG_UINT32:
+      xml_printf (file, "%" G_GUINT32_FORMAT, value->v_uint32);
+      break;
+    case GI_TYPE_TAG_INT64:
+      xml_printf (file, "%" G_GINT64_FORMAT, value->v_int64);
+      break;
+    case GI_TYPE_TAG_UINT64:
+      xml_printf (file, "%" G_GUINT64_FORMAT, value->v_uint64);
+      break;
+    case GI_TYPE_TAG_FLOAT:
+      xml_printf (file, "%f", value->v_float);
+      break;
+    case GI_TYPE_TAG_DOUBLE:
+      xml_printf (file, "%f", value->v_double);
+      break;
+    case GI_TYPE_TAG_UTF8:
+    case GI_TYPE_TAG_FILENAME:
+      xml_printf (file, "%s", value->v_string);
+      break;
+    default:
+      g_assert_not_reached ();
+    }
+}
+
+static void
+write_constant_info (const gchar    *namespace,
+                    GIConstantInfo *info,
+                    Xml            *file)
+{
+  GITypeInfo *type;
+  const gchar *name;
+  gboolean deprecated;
+  GIArgument value;
+
+  name = g_base_info_get_name ((GIBaseInfo *)info);
+  deprecated = g_base_info_is_deprecated ((GIBaseInfo *)info);
+
+  xml_start_element (file, "constant");
+  xml_printf (file, " name=\"%s\"", name);
+
+  type = g_constant_info_get_type (info);
+  xml_printf (file, " value=\"");
+
+  g_constant_info_get_value (info, &value);
+  write_constant_value (namespace, type, &value, file);
+  xml_printf (file, "\"");
+
+  write_type_info (namespace, type, file);
+
+  write_attributes (file, (GIBaseInfo*) info);
+
+  xml_end_element (file, "constant");
+
+  g_base_info_unref ((GIBaseInfo *)type);
+}
+
+
+static void
+write_enum_info (const gchar *namespace,
+                GIEnumInfo *info,
+                Xml         *file)
+{
+  const gchar *name;
+  const gchar *type_name;
+  const gchar *type_init;
+  const gchar *error_domain;
+  gboolean deprecated;
+  gint i;
+
+  name = g_base_info_get_name ((GIBaseInfo *)info);
+  deprecated = g_base_info_is_deprecated ((GIBaseInfo *)info);
+
+  type_name = g_registered_type_info_get_type_name ((GIRegisteredTypeInfo*)info);
+  type_init = g_registered_type_info_get_type_init ((GIRegisteredTypeInfo*)info);
+  error_domain = g_enum_info_get_error_domain (info);
+
+  if (g_base_info_get_type ((GIBaseInfo *)info) == GI_INFO_TYPE_ENUM)
+    xml_start_element (file, "enumeration");
+  else
+    xml_start_element (file, "bitfield");
+  xml_printf (file, " name=\"%s\"", name);
+
+  if (type_init)
+    xml_printf (file, " glib:type-name=\"%s\" glib:get-type=\"%s\"", type_name, type_init);
+  if (error_domain)
+    xml_printf (file, " glib:error-domain=\"%s\"", error_domain);
+
+  if (deprecated)
+    xml_printf (file, " deprecated=\"1\"");
+
+  write_attributes (file, (GIBaseInfo*) info);
+
+  for (i = 0; i < g_enum_info_get_n_values (info); i++)
+    {
+      GIValueInfo *value = g_enum_info_get_value (info, i);
+      write_value_info (namespace, value, file);
+      g_base_info_unref ((GIBaseInfo *)value);
+    }
+
+  xml_end_element_unchecked (file);
+}
+
+static void
+write_signal_info (const gchar  *namespace,
+                  GISignalInfo *info,
+                  Xml          *file)
+{
+  GSignalFlags flags;
+  const gchar *name;
+  gboolean deprecated;
+
+  name = g_base_info_get_name ((GIBaseInfo *)info);
+  flags = g_signal_info_get_flags (info);
+  deprecated = g_base_info_is_deprecated ((GIBaseInfo *)info);
+
+  xml_start_element (file, "glib:signal");
+  xml_printf (file, " name=\"%s\"", name);
+
+  if (deprecated)
+    xml_printf (file, " deprecated=\"1\"");
+
+  if (flags & G_SIGNAL_RUN_FIRST)
+    xml_printf (file, " when=\"FIRST\"");
+  else if (flags & G_SIGNAL_RUN_LAST)
+    xml_printf (file, " when=\"LAST\"");
+  else if (flags & G_SIGNAL_RUN_CLEANUP)
+    xml_printf (file, " when=\"CLEANUP\"");
+
+  if (flags & G_SIGNAL_NO_RECURSE)
+    xml_printf (file, " no-recurse=\"1\"");
+
+  if (flags & G_SIGNAL_DETAILED)
+    xml_printf (file, " detailed=\"1\"");
+
+  if (flags & G_SIGNAL_ACTION)
+    xml_printf (file, " action=\"1\"");
+
+  if (flags & G_SIGNAL_NO_HOOKS)
+    xml_printf (file, " no-hooks=\"1\"");
+
+  write_callable_info (namespace, (GICallableInfo*)info, file);
+
+  xml_end_element (file, "glib:signal");
+}
+
+static void
+write_vfunc_info (const gchar *namespace,
+                 GIVFuncInfo *info,
+                 Xml         *file)
+{
+  GIVFuncInfoFlags flags;
+  const gchar *name;
+  GIFunctionInfo *invoker;
+  gboolean deprecated;
+  gint offset;
+
+  name = g_base_info_get_name ((GIBaseInfo *)info);
+  flags = g_vfunc_info_get_flags (info);
+  deprecated = g_base_info_is_deprecated ((GIBaseInfo *)info);
+  offset = g_vfunc_info_get_offset (info);
+  invoker = g_vfunc_info_get_invoker (info);
+
+  xml_start_element (file, "virtual-method");
+  xml_printf (file, " name=\"%s\"", name);
+
+  if (deprecated)
+    xml_printf (file, " deprecated=\"1\"");
+
+  if (flags & GI_VFUNC_MUST_CHAIN_UP)
+    xml_printf (file, " must-chain-up=\"1\"");
+
+  if (flags & GI_VFUNC_MUST_OVERRIDE)
+    xml_printf (file, " override=\"always\"");
+  else if (flags & GI_VFUNC_MUST_NOT_OVERRIDE)
+    xml_printf (file, " override=\"never\"");
+
+  if (flags & GI_VFUNC_THROWS)
+    xml_printf (file, " throws=\"1\"");
+
+  xml_printf (file, " offset=\"%d\"", offset);
+
+  if (invoker)
+    xml_printf (file, " invoker=\"%s\"", g_base_info_get_name ((GIBaseInfo*)invoker));
+
+  write_callable_info (namespace, (GICallableInfo*)info, file);
+
+  xml_end_element (file, "virtual-method");
+}
+
+static void
+write_property_info (const gchar    *namespace,
+                    GIPropertyInfo *info,
+                    Xml            *file)
+{
+  GParamFlags flags;
+  const gchar *name;
+  gboolean deprecated;
+  GITypeInfo *type;
+
+  name = g_base_info_get_name ((GIBaseInfo *)info);
+  flags = g_property_info_get_flags (info);
+  deprecated = g_base_info_is_deprecated ((GIBaseInfo *)info);
+
+  xml_start_element (file, "property");
+  xml_printf (file, " name=\"%s\"", name);
+
+  if (deprecated)
+    xml_printf (file, " deprecated=\"1\"");
+
+  /* Properties are assumed to be read-only (see also girwriter.py) */
+  if (!(flags & G_PARAM_READABLE))
+    xml_printf (file, " readable=\"0\"");
+  if (flags & G_PARAM_WRITABLE)
+    xml_printf (file, " writable=\"1\"");
+
+  if (flags & G_PARAM_CONSTRUCT)
+    xml_printf (file, " construct=\"1\"");
+
+  if (flags & G_PARAM_CONSTRUCT_ONLY)
+    xml_printf (file, " construct-only=\"1\"");
+
+  write_ownership_transfer (g_property_info_get_ownership_transfer (info), file);
+
+  write_attributes (file, (GIBaseInfo*) info);
+
+  type = g_property_info_get_type (info);
+
+  write_type_info (namespace, type, file);
+
+  xml_end_element (file, "property");
+}
+
+static void
+write_object_info (const gchar  *namespace,
+                  GIObjectInfo *info,
+                  Xml          *file)
+{
+  const gchar *name;
+  const gchar *type_name;
+  const gchar *type_init;
+  const gchar *func;
+  gboolean deprecated;
+  gboolean is_abstract;
+  gboolean is_fundamental;
+  GIObjectInfo *pnode;
+  GIStructInfo *class_struct;
+  gint i;
+
+  name = g_base_info_get_name ((GIBaseInfo *)info);
+  deprecated = g_base_info_is_deprecated ((GIBaseInfo *)info);
+  is_abstract = g_object_info_get_abstract (info);
+  is_fundamental = g_object_info_get_fundamental (info);
+
+  type_name = g_registered_type_info_get_type_name ((GIRegisteredTypeInfo*)info);
+  type_init = g_registered_type_info_get_type_init ((GIRegisteredTypeInfo*)info);
+  xml_start_element (file, "class");
+  xml_printf (file, " name=\"%s\"", name);
+
+  pnode = g_object_info_get_parent (info);
+  if (pnode)
+    {
+      write_type_name_attribute (namespace, (GIBaseInfo *)pnode, "parent", file);
+      g_base_info_unref ((GIBaseInfo *)pnode);
+    }
+
+  class_struct = g_object_info_get_class_struct (info);
+  if (class_struct)
+    {
+      write_type_name_attribute (namespace, (GIBaseInfo*) class_struct, "glib:type-struct", file);
+      g_base_info_unref ((GIBaseInfo*)class_struct);
+    }
+
+  if (is_abstract)
+    xml_printf (file, " abstract=\"1\"");
+
+  xml_printf (file, " glib:type-name=\"%s\" glib:get-type=\"%s\"", type_name, type_init);
+
+  if (is_fundamental)
+    xml_printf (file, " glib:fundamental=\"1\"");
+
+  func = g_object_info_get_unref_function (info);
+  if (func)
+    xml_printf (file, " glib:unref-function=\"%s\"", func);
+
+  func = g_object_info_get_ref_function (info);
+  if (func)
+    xml_printf (file, " glib:ref-function=\"%s\"", func);
+
+  func = g_object_info_get_set_value_function (info);
+  if (func)
+    xml_printf (file, " glib:set-value-function=\"%s\"", func);
+
+  func = g_object_info_get_get_value_function (info);
+  if (func)
+    xml_printf (file, " glib:get-value-function=\"%s\"", func);
+
+  if (deprecated)
+    xml_printf (file, " deprecated=\"1\"");
+
+  write_attributes (file, (GIBaseInfo*) info);
+
+  if (g_object_info_get_n_interfaces (info) > 0)
+    {
+      for (i = 0; i < g_object_info_get_n_interfaces (info); i++)
+       {
+         GIInterfaceInfo *imp = g_object_info_get_interface (info, i);
+          xml_start_element (file, "implements");
+         write_type_name_attribute (namespace, (GIBaseInfo *)imp, "name", file);
+          xml_end_element (file, "implements");
+         g_base_info_unref ((GIBaseInfo*)imp);
+       }
+    }
+
+  for (i = 0; i < g_object_info_get_n_fields (info); i++)
+    {
+      GIFieldInfo *field = g_object_info_get_field (info, i);
+      write_field_info (namespace, field, NULL, file);
+      g_base_info_unref ((GIBaseInfo *)field);
+    }
+
+  for (i = 0; i < g_object_info_get_n_methods (info); i++)
+    {
+      GIFunctionInfo *function = g_object_info_get_method (info, i);
+      write_function_info (namespace, function, file);
+      g_base_info_unref ((GIBaseInfo *)function);
+    }
+
+  for (i = 0; i < g_object_info_get_n_properties (info); i++)
+    {
+      GIPropertyInfo *prop = g_object_info_get_property (info, i);
+      write_property_info (namespace, prop, file);
+      g_base_info_unref ((GIBaseInfo *)prop);
+    }
+
+  for (i = 0; i < g_object_info_get_n_signals (info); i++)
+    {
+      GISignalInfo *signal = g_object_info_get_signal (info, i);
+      write_signal_info (namespace, signal, file);
+      g_base_info_unref ((GIBaseInfo *)signal);
+    }
+
+  for (i = 0; i < g_object_info_get_n_vfuncs (info); i++)
+    {
+      GIVFuncInfo *vfunc = g_object_info_get_vfunc (info, i);
+      write_vfunc_info (namespace, vfunc, file);
+      g_base_info_unref ((GIBaseInfo *)vfunc);
+    }
+
+  for (i = 0; i < g_object_info_get_n_constants (info); i++)
+    {
+      GIConstantInfo *constant = g_object_info_get_constant (info, i);
+      write_constant_info (namespace, constant, file);
+      g_base_info_unref ((GIBaseInfo *)constant);
+    }
+
+  xml_end_element (file, "class");
+}
+
+static void
+write_interface_info (const gchar     *namespace,
+                     GIInterfaceInfo *info,
+                     Xml             *file)
+{
+  const gchar *name;
+  const gchar *type_name;
+  const gchar *type_init;
+  GIStructInfo *class_struct;
+  gboolean deprecated;
+  gint i;
+
+  name = g_base_info_get_name ((GIBaseInfo *)info);
+  deprecated = g_base_info_is_deprecated ((GIBaseInfo *)info);
+
+  type_name = g_registered_type_info_get_type_name ((GIRegisteredTypeInfo*)info);
+  type_init = g_registered_type_info_get_type_init ((GIRegisteredTypeInfo*)info);
+  xml_start_element (file, "interface");
+  xml_printf (file, " name=\"%s\" glib:type-name=\"%s\" glib:get-type=\"%s\"",
+            name, type_name, type_init);
+
+  class_struct = g_interface_info_get_iface_struct (info);
+  if (class_struct)
+    {
+      write_type_name_attribute (namespace, (GIBaseInfo*) class_struct, "glib:type-struct", file);
+      g_base_info_unref ((GIBaseInfo*)class_struct);
+    }
+
+  if (deprecated)
+    xml_printf (file, " deprecated=\"1\"");
+
+  write_attributes (file, (GIBaseInfo*) info);
+
+  if (g_interface_info_get_n_prerequisites (info) > 0)
+    {
+      for (i = 0; i < g_interface_info_get_n_prerequisites (info); i++)
+       {
+         GIBaseInfo *req = g_interface_info_get_prerequisite (info, i);
+
+         xml_start_element (file, "prerequisite");
+         write_type_name_attribute (namespace, req, "name", file);
+
+          xml_end_element_unchecked (file);
+         g_base_info_unref (req);
+       }
+    }
+
+  for (i = 0; i < g_interface_info_get_n_methods (info); i++)
+    {
+      GIFunctionInfo *function = g_interface_info_get_method (info, i);
+      write_function_info (namespace, function, file);
+      g_base_info_unref ((GIBaseInfo *)function);
+    }
+
+  for (i = 0; i < g_interface_info_get_n_properties (info); i++)
+    {
+      GIPropertyInfo *prop = g_interface_info_get_property (info, i);
+      write_property_info (namespace, prop, file);
+      g_base_info_unref ((GIBaseInfo *)prop);
+    }
+
+  for (i = 0; i < g_interface_info_get_n_signals (info); i++)
+    {
+      GISignalInfo *signal = g_interface_info_get_signal (info, i);
+      write_signal_info (namespace, signal, file);
+      g_base_info_unref ((GIBaseInfo *)signal);
+    }
+
+  for (i = 0; i < g_interface_info_get_n_vfuncs (info); i++)
+    {
+      GIVFuncInfo *vfunc = g_interface_info_get_vfunc (info, i);
+      write_vfunc_info (namespace, vfunc, file);
+      g_base_info_unref ((GIBaseInfo *)vfunc);
+    }
+
+  for (i = 0; i < g_interface_info_get_n_constants (info); i++)
+    {
+      GIConstantInfo *constant = g_interface_info_get_constant (info, i);
+      write_constant_info (namespace, constant, file);
+      g_base_info_unref ((GIBaseInfo *)constant);
+    }
+
+  xml_end_element (file, "interface");
+}
+
+static void
+write_union_info (const gchar *namespace,
+                 GIUnionInfo *info,
+                 Xml         *file)
+{
+  const gchar *name;
+  const gchar *type_name;
+  const gchar *type_init;
+  gboolean deprecated;
+  gint i;
+  gint size;
+
+  name = g_base_info_get_name ((GIBaseInfo *)info);
+  deprecated = g_base_info_is_deprecated ((GIBaseInfo *)info);
+
+  type_name = g_registered_type_info_get_type_name ((GIRegisteredTypeInfo*)info);
+  type_init = g_registered_type_info_get_type_init ((GIRegisteredTypeInfo*)info);
+
+  xml_start_element (file, "union");
+  xml_printf (file, " name=\"%s\"", name);
+
+  if (type_name)
+    xml_printf (file, " type-name=\"%s\" get-type=\"%s\"", type_name, type_init);
+
+  if (deprecated)
+    xml_printf (file, " deprecated=\"1\"");
+
+  size = g_union_info_get_size (info);
+  if (file->show_all && size >= 0)
+    xml_printf (file, " size=\"%d\"", size);
+
+  write_attributes (file, (GIBaseInfo*) info);
+
+  if (g_union_info_is_discriminated (info))
+    {
+      gint offset;
+      GITypeInfo *type;
+
+      offset = g_union_info_get_discriminator_offset (info);
+      type = g_union_info_get_discriminator_type (info);
+
+      xml_start_element (file, "discriminator");
+      xml_printf (file, " offset=\"%d\" type=\"", offset);
+      write_type_info (namespace, type, file);
+      xml_end_element (file, "discriminator");
+      g_base_info_unref ((GIBaseInfo *)type);
+    }
+
+  for (i = 0; i < g_union_info_get_n_fields (info); i++)
+    {
+      GIFieldInfo *field = g_union_info_get_field (info, i);
+      GIConstantInfo *constant = g_union_info_get_discriminator (info, i);
+      write_field_info (namespace, field, constant, file);
+      g_base_info_unref ((GIBaseInfo *)field);
+      if (constant)
+       g_base_info_unref ((GIBaseInfo *)constant);
+    }
+
+  for (i = 0; i < g_union_info_get_n_methods (info); i++)
+    {
+      GIFunctionInfo *function = g_union_info_get_method (info, i);
+      write_function_info (namespace, function, file);
+      g_base_info_unref ((GIBaseInfo *)function);
+    }
+
+  xml_end_element (file, "union");
+}
+
+
+/**
+ * gir_writer_write:
+ * @filename: filename to write to
+ * @namespace: GIR namespace to write
+ * @needs_prefix: if the filename needs prefixing
+ * @show_all: if field size calculations should be included
+ *
+ * Writes the output of a typelib represented by @namespace
+ * into a GIR xml file named @filename.
+ */
+void
+gir_writer_write (const char *filename,
+                 const char *namespace,
+                 gboolean    needs_prefix,
+                 gboolean    show_all)
+{
+  FILE *ofile;
+  gint i, j;
+  char **dependencies;
+  GIRepository *repository;
+  Xml *xml;
+
+  repository = g_irepository_get_default ();
+
+  if (filename == NULL)
+    ofile = stdout;
+  else
+    {
+      gchar *full_filename;
+
+      if (needs_prefix)
+       full_filename = g_strdup_printf ("%s-%s", namespace, filename);
+      else
+       full_filename = g_strdup (filename);
+      ofile = g_fopen (filename, "w");
+
+      if (ofile == NULL)
+       {
+         g_fprintf (stderr, "failed to open '%s': %s\n",
+                    full_filename, g_strerror (errno));
+         g_free (full_filename);
+
+         return;
+       }
+
+      g_free (full_filename);
+    }
+
+  xml = xml_open (ofile);
+  xml->show_all = show_all;
+  xml_printf (xml, "<?xml version=\"1.0\"?>\n");
+  xml_start_element (xml, "repository");
+  xml_printf (xml, " version=\"1.0\"\n"
+             "            xmlns=\"http://www.gtk.org/introspection/core/1.0\"\n"
+             "            xmlns:c=\"http://www.gtk.org/introspection/c/1.0\"\n"
+             "            xmlns:glib=\"http://www.gtk.org/introspection/glib/1.0\"");
+
+  dependencies = g_irepository_get_dependencies (repository,
+                                                namespace);
+  if (dependencies != NULL)
+    {
+      for (i = 0; dependencies[i]; i++)
+       {
+         char **parts = g_strsplit (dependencies[i], "-", 2);
+         xml_start_element (xml, "include");
+         xml_printf (xml, " name=\"%s\" version=\"%s\"", parts[0], parts[1]);
+         xml_end_element (xml, "include");
+         g_strfreev (parts);
+       }
+    }
+
+  if (TRUE)
+    {
+      const gchar *shared_library;
+      const gchar *c_prefix;
+      const char *ns = namespace;
+      const char *version;
+      gint n_infos;
+
+      version = g_irepository_get_version (repository, ns);
+
+      shared_library = g_irepository_get_shared_library (repository, ns);
+      c_prefix = g_irepository_get_c_prefix (repository, ns);
+      xml_start_element (xml, "namespace");
+      xml_printf (xml, " name=\"%s\" version=\"%s\"", ns, version);
+      if (shared_library)
+        xml_printf (xml, " shared-library=\"%s\"", shared_library);
+      if (c_prefix)
+        xml_printf (xml, " c:prefix=\"%s\"", c_prefix);
+
+      n_infos = g_irepository_get_n_infos (repository, ns);
+      for (j = 0; j < n_infos; j++)
+       {
+         GIBaseInfo *info = g_irepository_get_info (repository, ns, j);
+         switch (g_base_info_get_type (info))
+           {
+           case GI_INFO_TYPE_FUNCTION:
+             write_function_info (ns, (GIFunctionInfo *)info, xml);
+             break;
+
+           case GI_INFO_TYPE_CALLBACK:
+             write_callback_info (ns, (GICallbackInfo *)info, xml);
+             break;
+
+           case GI_INFO_TYPE_STRUCT:
+           case GI_INFO_TYPE_BOXED:
+             write_struct_info (ns, (GIStructInfo *)info, xml);
+             break;
+
+           case GI_INFO_TYPE_UNION:
+             write_union_info (ns, (GIUnionInfo *)info, xml);
+             break;
+
+           case GI_INFO_TYPE_ENUM:
+           case GI_INFO_TYPE_FLAGS:
+             write_enum_info (ns, (GIEnumInfo *)info, xml);
+             break;
+
+           case GI_INFO_TYPE_CONSTANT:
+             write_constant_info (ns, (GIConstantInfo *)info, xml);
+             break;
+
+           case GI_INFO_TYPE_OBJECT:
+             write_object_info (ns, (GIObjectInfo *)info, xml);
+             break;
+
+           case GI_INFO_TYPE_INTERFACE:
+             write_interface_info (ns, (GIInterfaceInfo *)info, xml);
+             break;
+
+           default:
+             g_error ("unknown info type %d\n", g_base_info_get_type (info));
+           }
+
+         g_base_info_unref (info);
+       }
+
+      xml_end_element (xml, "namespace");
+    }
+
+  xml_end_element (xml, "repository");
+
+  xml_free (xml);
+}
diff --git a/girepository/girwriter.h b/girepository/girwriter.h
new file mode 100644 (file)
index 0000000..85f74a7
--- /dev/null
@@ -0,0 +1,30 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: IDL writer
+ *
+ * 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 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.
+ */
+
+#ifndef __GIRWRITER_H__
+#define __GIRWRITER_H__
+
+void gir_writer_write (const char *filename,
+                      const char *namespace,
+                      gboolean    needs_prefix,
+                      gboolean    show_all);
+
+#endif  /* __GIRWRITER_H__ */
diff --git a/girepository/gisignalinfo.c b/girepository/gisignalinfo.c
new file mode 100644 (file)
index 0000000..f4110c3
--- /dev/null
@@ -0,0 +1,147 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Signal implementation
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#include <glib.h>
+
+#include <girepository.h>
+#include "girepository-private.h"
+#include "gitypelib-internal.h"
+
+/**
+ * SECTION:gisignalinfo
+ * @Short_description: Struct representing a signal
+ * @Title: GISignalInfo
+ *
+ * GISignalInfo represents a signal. It's a sub-struct of #GICallableInfo
+ * and contains a set of flags and a class closure.
+ *
+ * See #GICallableInfo for information on how to retreive arguments
+ * and other metadata from the signal.
+ *
+ * <refsect1 id="gi-gisignalinfo.struct-hierarchy" role="struct_hierarchy">
+ * <title role="struct_hierarchy.title">Struct hierarchy</title>
+ * <synopsis>
+ *   <link linkend="gi-GIBaseInfo">GIBaseInfo</link>
+ *    +----<link linkend="gi-GICallableInfo">GICallableInfo</link>
+ *          +----<link linkend="gi-GIFunctionInfo">GIFunctionInfo</link>
+ *          +----GISignalInfo
+ *          +----<link linkend="gi-GIVFuncInfo">GIVFuncInfo</link>
+ * </synopsis>
+ * </refsect1>
+ */
+
+/**
+ * g_signal_info_get_flags:
+ * @info: a #GISignalInfo
+ *
+ * Obtain the flags for this signal info. See #GSignalFlags for
+ * more information about possible flag values.
+ *
+ * Returns: the flags
+ */
+GSignalFlags
+g_signal_info_get_flags (GISignalInfo *info)
+{
+  GSignalFlags flags;
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  SignalBlob *blob;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_SIGNAL_INFO (info), 0);
+
+  blob = (SignalBlob *)&rinfo->typelib->data[rinfo->offset];
+  flags = 0;
+
+  if (blob->run_first)
+    flags = flags | G_SIGNAL_RUN_FIRST;
+
+  if (blob->run_last)
+    flags = flags | G_SIGNAL_RUN_LAST;
+
+  if (blob->run_cleanup)
+    flags = flags | G_SIGNAL_RUN_CLEANUP;
+
+  if (blob->no_recurse)
+    flags = flags | G_SIGNAL_NO_RECURSE;
+
+  if (blob->detailed)
+    flags = flags | G_SIGNAL_DETAILED;
+
+  if (blob->action)
+    flags = flags | G_SIGNAL_ACTION;
+
+  if (blob->no_hooks)
+    flags = flags | G_SIGNAL_NO_HOOKS;
+
+  return flags;
+}
+
+/**
+ * g_signal_info_get_class_closure:
+ * @info: a #GISignalInfo
+ *
+ * Obtain the class closure for this signal if one is set. The class
+ * closure is a virtual function on the type that the signal belongs to.
+ * If the signal lacks a closure %NULL will be returned.
+ *
+ * Returns: (transfer full): the class closure or %NULL
+ */
+GIVFuncInfo *
+g_signal_info_get_class_closure (GISignalInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  SignalBlob *blob;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_SIGNAL_INFO (info), 0);
+
+  blob = (SignalBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  if (blob->has_class_closure)
+    return g_interface_info_get_vfunc ((GIInterfaceInfo *)rinfo->container, blob->class_closure);
+
+  return NULL;
+}
+
+/**
+ * g_signal_info_true_stops_emit:
+ * @info: a #GISignalInfo
+ *
+ * Obtain if the returning true in the signal handler will
+ * stop the emission of the signal.
+ *
+ * Returns: %TRUE if returning true stops the signal emission
+ */
+gboolean
+g_signal_info_true_stops_emit (GISignalInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  SignalBlob *blob;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_SIGNAL_INFO (info), 0);
+
+  blob = (SignalBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->true_stops_emit;
+}
+
diff --git a/girepository/gisignalinfo.h b/girepository/gisignalinfo.h
new file mode 100644 (file)
index 0000000..e3a1e4a
--- /dev/null
@@ -0,0 +1,45 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Signal
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#ifndef __GISIGNALINFO_H__
+#define __GISIGNALINFO_H__
+
+#if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
+#error "Only <girepository.h> can be included directly."
+#endif
+
+#include <glib-object.h>
+#include <gitypes.h>
+
+G_BEGIN_DECLS
+
+#define GI_IS_SIGNAL_INFO(info) \
+    (g_base_info_get_type((GIBaseInfo*)info) ==  GI_INFO_TYPE_SIGNAL)
+
+GSignalFlags  g_signal_info_get_flags         (GISignalInfo *info);
+GIVFuncInfo * g_signal_info_get_class_closure (GISignalInfo *info);
+gboolean      g_signal_info_true_stops_emit   (GISignalInfo *info);
+
+G_END_DECLS
+
+
+#endif  /* __GISIGNALINFO_H__ */
diff --git a/girepository/gistructinfo.c b/girepository/gistructinfo.c
new file mode 100644 (file)
index 0000000..dc17e32
--- /dev/null
@@ -0,0 +1,241 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Struct implementation
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#include <glib.h>
+
+#include <girepository.h>
+#include "girepository-private.h"
+#include "gitypelib-internal.h"
+
+/**
+ * SECTION:gistructinfo
+ * @Short_description: Struct representing a C structure
+ * @Title: GIStructInfo
+ *
+ * GIStructInfo represents a generic C structure type.
+ *
+ * A structure has methods and fields.
+ *
+ * <refsect1 id="gi-giobjectinfo.struct-hierarchy" role="struct_hierarchy">
+ * <title role="struct_hierarchy.title">Struct hierarchy</title>
+ * <synopsis>
+ *   <link linkend="gi-GIBaseInfo">GIBaseInfo</link>
+ *    +----<link linkend="gi-GIRegisteredTypeInfo">GIRegisteredTypeInfo</link>
+ *          +----GIStructInfo
+ * </synopsis>
+ * </refsect1>
+ */
+
+/**
+ * g_struct_info_get_n_fields:
+ * @info: a #GIStructInfo
+ *
+ * Obtain the number of fields this structure has.
+ *
+ * Returns: number of fields
+ */
+gint
+g_struct_info_get_n_fields (GIStructInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  StructBlob *blob = (StructBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->n_fields;
+}
+
+/**
+ * g_struct_info_get_field_offset:
+ * @info: a #GIStructInfo
+ * @n: index of queried field
+ *
+ * Obtain the offset of the specified field.
+ *
+ * Returns: field offset in bytes
+ */
+static gint32
+g_struct_get_field_offset (GIStructInfo *info,
+                          gint         n)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  Header *header = (Header *)rinfo->typelib->data;
+  guint32 offset = rinfo->offset + header->struct_blob_size;
+  gint i;
+  FieldBlob *field_blob;
+
+  for (i = 0; i < n; i++)
+    {
+      field_blob = (FieldBlob *)&rinfo->typelib->data[offset];
+      offset += header->field_blob_size;
+      if (field_blob->has_embedded_type)
+        offset += header->callback_blob_size;
+    }
+
+  return offset;
+}
+
+/**
+ * g_struct_info_get_field:
+ * @info: a #GIStructInfo
+ * @n: a field index
+ *
+ * Obtain the type information for field with specified index.
+ *
+ * Returns: (transfer full): the #GIFieldInfo, free it with g_base_info_unref()
+ * when done.
+ */
+GIFieldInfo *
+g_struct_info_get_field (GIStructInfo *info,
+                         gint          n)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+
+  return (GIFieldInfo *) g_info_new (GI_INFO_TYPE_FIELD, (GIBaseInfo*)info, rinfo->typelib,
+                                     g_struct_get_field_offset (info, n));
+}
+
+/**
+ * g_struct_info_get_n_methods:
+ * @info: a #GIStructInfo
+ *
+ * Obtain the number of methods this structure has.
+ *
+ * Returns: number of methods
+ */
+gint
+g_struct_info_get_n_methods (GIStructInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  StructBlob *blob = (StructBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->n_methods;
+}
+
+/**
+ * g_struct_info_get_method:
+ * @info: a #GIStructInfo
+ * @n: a method index
+ *
+ * Obtain the type information for method with specified index.
+ *
+ * Returns: (transfer full): the #GIFunctionInfo, free it with g_base_info_unref()
+ * when done.
+ */
+GIFunctionInfo *
+g_struct_info_get_method (GIStructInfo *info,
+                         gint         n)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  StructBlob *blob = (StructBlob *)&rinfo->typelib->data[rinfo->offset];
+  Header *header = (Header *)rinfo->typelib->data;
+  gint offset;
+
+  offset = g_struct_get_field_offset (info, blob->n_fields) + n * header->function_blob_size;
+  return (GIFunctionInfo *) g_info_new (GI_INFO_TYPE_FUNCTION, (GIBaseInfo*)info,
+                                        rinfo->typelib, offset);
+}
+
+/**
+ * g_struct_info_find_method:
+ * @info: a #GIStructInfo
+ * @name: a method name
+ *
+ * Obtain the type information for method named @name.
+ *
+ * Returns: (transfer full): the #GIFunctionInfo, free it with g_base_info_unref()
+ * when done.
+ */
+GIFunctionInfo *
+g_struct_info_find_method (GIStructInfo *info,
+                          const gchar  *name)
+{
+  gint offset;
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  Header *header = (Header *)rinfo->typelib->data;
+  StructBlob *blob = (StructBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  offset = rinfo->offset + header->struct_blob_size
+    + blob->n_fields * header->field_blob_size;
+
+  return _g_base_info_find_method ((GIBaseInfo*)info, offset, blob->n_methods, name);
+}
+
+/**
+ * g_struct_info_get_size:
+ * @info: a #GIStructInfo
+ *
+ * Obtain the total size of the structure.
+ *
+ * Returns: size of the structure in bytes
+ */
+gsize
+g_struct_info_get_size (GIStructInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  StructBlob *blob = (StructBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->size;
+}
+
+/**
+ * g_struct_info_get_alignment:
+ * @info: a #GIStructInfo
+ *
+ * Obtain the required alignment of the structure.
+ *
+ * Returns: required alignment in bytes
+ */
+gsize
+g_struct_info_get_alignment (GIStructInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  StructBlob *blob = (StructBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->alignment;
+}
+
+gboolean
+g_struct_info_is_foreign (GIStructInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  StructBlob *blob = (StructBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->foreign;
+}
+
+/**
+ * g_struct_info_is_gtype_struct:
+ * @info: a #GIStructInfo
+ *
+ * Return true if this structure represents the "class structure" for some
+ * #GObject or #GInterface.  This function is mainly useful to hide this kind of structure
+ * from generated public APIs.
+ *
+ * Returns: %TRUE if this is a class struct, %FALSE otherwise
+ */
+gboolean
+g_struct_info_is_gtype_struct (GIStructInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  StructBlob *blob = (StructBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->is_gtype_struct;
+}
diff --git a/girepository/gistructinfo.h b/girepository/gistructinfo.h
new file mode 100644 (file)
index 0000000..1d10708
--- /dev/null
@@ -0,0 +1,53 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Struct
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#ifndef __GISTRUCTINFO_H__
+#define __GISTRUCTINFO_H__
+
+#if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
+#error "Only <girepository.h> can be included directly."
+#endif
+
+#include <gitypes.h>
+
+G_BEGIN_DECLS
+
+#define GI_IS_STRUCT_INFO(info) \
+    (g_base_info_get_type((GIBaseInfo*)info) ==  GI_INFO_TYPE_STRUCT)
+
+gint             g_struct_info_get_n_fields    (GIStructInfo *info);
+GIFieldInfo *    g_struct_info_get_field       (GIStructInfo *info,
+                                               gint          n);
+gint             g_struct_info_get_n_methods   (GIStructInfo *info);
+GIFunctionInfo * g_struct_info_get_method      (GIStructInfo *info,
+                                               gint          n);
+GIFunctionInfo * g_struct_info_find_method     (GIStructInfo *info,
+                                               const gchar  *name);
+gsize            g_struct_info_get_size        (GIStructInfo *info);
+gsize            g_struct_info_get_alignment   (GIStructInfo *info);
+gboolean         g_struct_info_is_gtype_struct (GIStructInfo *info);
+gboolean         g_struct_info_is_foreign      (GIStructInfo *info);
+
+G_END_DECLS
+
+
+#endif  /* __GISTRUCTINFO_H__ */
diff --git a/girepository/gitypeinfo.c b/girepository/gitypeinfo.c
new file mode 100644 (file)
index 0000000..a43fbc1
--- /dev/null
@@ -0,0 +1,343 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Type implementation
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#include <glib.h>
+
+#include <girepository.h>
+#include "girepository-private.h"
+#include "gitypelib-internal.h"
+
+/**
+ * SECTION:gitypeinfo
+ * @Short_description: Struct representing a type
+ * @Title: GITypeInfo
+ *
+ * GITypeInfo represents a type. You can retrieve a type info from
+ * an argument (see #GIArgInfo), a functions return value (see #GIFunctionInfo),
+ * a field (see #GIFieldInfo), a property (see #GIPropertyInfo), a constant
+ * (see #GIConstantInfo) or for a union discriminator (see #GIUnionInfo).
+ *
+ * A type can either be a of a basic type which is a standard C primitive
+ * type or an interface type. For interface types you need to call
+ * g_type_info_get_interface() to get a reference to the base info for that
+ * interface.
+ *
+ * <refsect1 id="gi-gitypeinfo.struct-hierarchy" role="struct_hierarchy">
+ * <title role="struct_hierarchy.title">Struct hierarchy</title>
+ * <synopsis>
+ *   <link linkend="gi-GIBaseInfo">GIBaseInfo</link>
+ *    +----GITypeInfo
+ * </synopsis>
+ * </refsect1>
+ *
+ */
+
+/**
+ * g_type_info_is_pointer:
+ * @info: a #GITypeInfo
+ *
+ * Obtain if the type is passed as a reference.
+ *
+ * Returns: %TRUE if it is a pointer
+ */
+gboolean
+g_type_info_is_pointer (GITypeInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  SimpleTypeBlob *type;
+
+  g_return_val_if_fail (info != NULL, FALSE);
+  g_return_val_if_fail (GI_IS_TYPE_INFO (info), FALSE);
+
+  type = (SimpleTypeBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  if (type->flags.reserved == 0 && type->flags.reserved2 == 0)
+    return type->flags.pointer;
+  else
+    {
+      InterfaceTypeBlob *iface = (InterfaceTypeBlob *)&rinfo->typelib->data[rinfo->offset];
+
+      return iface->pointer;
+    }
+}
+
+/**
+ * g_type_info_get_tag:
+ * @info: a #GITypeInfo
+ *
+ * Obtain the type tag for the type. See #GITypeTag for a list
+ * of type tags.
+ *
+ * Returns: the type tag
+ */
+GITypeTag
+g_type_info_get_tag (GITypeInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  SimpleTypeBlob *type;
+
+  g_return_val_if_fail (info != NULL, GI_TYPE_TAG_BOOLEAN);
+  g_return_val_if_fail (GI_IS_TYPE_INFO (info), GI_TYPE_TAG_BOOLEAN);
+
+  type = (SimpleTypeBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  if (rinfo->type_is_embedded)
+    return GI_TYPE_TAG_INTERFACE;
+  else if (type->flags.reserved == 0 && type->flags.reserved2 == 0)
+    return type->flags.tag;
+  else
+    {
+      InterfaceTypeBlob *iface = (InterfaceTypeBlob *)&rinfo->typelib->data[rinfo->offset];
+
+      return iface->tag;
+    }
+}
+
+/**
+ * g_type_info_get_param_type:
+ * @info: a #GITypeInfo
+ * @n: index of the parameter
+ *
+ * Obtain the parameter type @n.
+ *
+ * Returns: (transfer full): the param type info
+ */
+GITypeInfo *
+g_type_info_get_param_type (GITypeInfo *info,
+                            gint        n)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  SimpleTypeBlob *type;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_TYPE_INFO (info), NULL);
+
+  type = (SimpleTypeBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  if (!(type->flags.reserved == 0 && type->flags.reserved2 == 0))
+    {
+      ParamTypeBlob *param = (ParamTypeBlob *)&rinfo->typelib->data[rinfo->offset];
+
+      switch (param->tag)
+        {
+          case GI_TYPE_TAG_ARRAY:
+          case GI_TYPE_TAG_GLIST:
+          case GI_TYPE_TAG_GSLIST:
+          case GI_TYPE_TAG_GHASH:
+            return _g_type_info_new ((GIBaseInfo*)info, rinfo->typelib,
+                                    rinfo->offset + sizeof (ParamTypeBlob)
+                                    + sizeof (SimpleTypeBlob) * n);
+            break;
+          default:
+            break;
+        }
+    }
+
+  return NULL;
+}
+
+/**
+ * g_type_info_get_interface:
+ * @info: a #GITypeInfo
+ *
+ * For types which have #GI_TYPE_TAG_INTERFACE such as GObjects and boxed values,
+ * this function returns full information about the referenced type.  You can then
+ * inspect the type of the returned #GIBaseInfo to further query whether it is
+ * a concrete GObject, a GInterface, a structure, etc. using g_base_info_get_type().
+ *
+ * Returns: (transfer full): the #GIBaseInfo, or %NULL. Free it with
+ * g_base_info_unref() when done.
+ */
+GIBaseInfo *
+g_type_info_get_interface (GITypeInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_TYPE_INFO (info), NULL);
+
+  /* For embedded types, the given offset is a pointer to the actual blob,
+   * after the end of the field.  In that case we know it's a "subclass" of
+   * CommonBlob, so use that to determine the info type.
+   */
+  if (rinfo->type_is_embedded)
+    {
+      CommonBlob *common = (CommonBlob *)&rinfo->typelib->data[rinfo->offset];
+      GIInfoType info_type;
+
+      switch (common->blob_type)
+        {
+          case BLOB_TYPE_CALLBACK:
+            info_type = GI_INFO_TYPE_CALLBACK;
+            break;
+          default:
+            g_assert_not_reached ();
+            return NULL;
+        }
+      return (GIBaseInfo *) g_info_new (info_type, (GIBaseInfo*)info, rinfo->typelib,
+                                        rinfo->offset);
+    }
+  else
+    {
+      SimpleTypeBlob *type = (SimpleTypeBlob *)&rinfo->typelib->data[rinfo->offset];
+      if (!(type->flags.reserved == 0 && type->flags.reserved2 == 0))
+        {
+          InterfaceTypeBlob *blob = (InterfaceTypeBlob *)&rinfo->typelib->data[rinfo->offset];
+
+          if (blob->tag == GI_TYPE_TAG_INTERFACE)
+            return _g_info_from_entry (rinfo->repository, rinfo->typelib, blob->interface);
+        }
+    }
+
+  return NULL;
+}
+
+/**
+ * g_type_info_get_array_length:
+ * @info: a #GITypeInfo
+ *
+ * Obtain the array length of the type. The type tag must be a
+ * #GI_TYPE_TAG_ARRAY or -1 will returned.
+ *
+ * Returns: the array length, or -1 if the type is not an array
+ */
+gint
+g_type_info_get_array_length (GITypeInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  SimpleTypeBlob *type;
+
+  g_return_val_if_fail (info != NULL, -1);
+  g_return_val_if_fail (GI_IS_TYPE_INFO (info), -1);
+
+  type = (SimpleTypeBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  if (!(type->flags.reserved == 0 && type->flags.reserved2 == 0))
+    {
+      ArrayTypeBlob *blob = (ArrayTypeBlob *)&rinfo->typelib->data[rinfo->offset];
+
+      if (blob->tag == GI_TYPE_TAG_ARRAY)
+       {
+         if (blob->has_length)
+           return blob->dimensions.length;
+       }
+    }
+
+  return -1;
+}
+
+/**
+ * g_type_info_get_array_fixed_size:
+ * @info: a #GITypeInfo
+ *
+ * Obtain the fixed array size of the type. The type tag must be a
+ * #GI_TYPE_TAG_ARRAY or -1 will returned.
+ *
+ * Returns: the size or -1 if it's not an array
+ */
+gint
+g_type_info_get_array_fixed_size (GITypeInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  SimpleTypeBlob *type;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_TYPE_INFO (info), 0);
+
+  type = (SimpleTypeBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  if (!(type->flags.reserved == 0 && type->flags.reserved2 == 0))
+    {
+      ArrayTypeBlob *blob = (ArrayTypeBlob *)&rinfo->typelib->data[rinfo->offset];
+
+      if (blob->tag == GI_TYPE_TAG_ARRAY)
+       {
+         if (blob->has_size)
+           return blob->dimensions.size;
+       }
+    }
+
+  return -1;
+}
+
+/**
+ * g_type_info_is_zero_terminated:
+ * @info: a #GITypeInfo
+ *
+ * Obtain if the last element of the array is %NULL. The type tag must be a
+ * #GI_TYPE_TAG_ARRAY or %FALSE will returned.
+ *
+ * Returns: %TRUE if zero terminated
+ */
+gboolean
+g_type_info_is_zero_terminated (GITypeInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  SimpleTypeBlob *type;
+
+  g_return_val_if_fail (info != NULL, FALSE);
+  g_return_val_if_fail (GI_IS_TYPE_INFO (info), FALSE);
+
+  type = (SimpleTypeBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  if (!(type->flags.reserved == 0 && type->flags.reserved2 == 0))
+    {
+      ArrayTypeBlob *blob = (ArrayTypeBlob *)&rinfo->typelib->data[rinfo->offset];
+
+      if (blob->tag == GI_TYPE_TAG_ARRAY)
+       return blob->zero_terminated;
+    }
+
+  return FALSE;
+}
+
+/**
+ * g_type_info_get_array_type:
+ * @info: a #GITypeInfo
+ *
+ * Obtain the array type for this type. See #GIArrayType for a list of
+ * possible values. If the type tag of this type is not array, -1 will be
+ * returned.
+ *
+ * Returns: the array type or -1
+ */
+GIArrayType
+g_type_info_get_array_type (GITypeInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  SimpleTypeBlob *type;
+
+  g_return_val_if_fail (info != NULL, -1);
+  g_return_val_if_fail (GI_IS_TYPE_INFO (info), -1);
+
+  type = (SimpleTypeBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  if (!(type->flags.reserved == 0 && type->flags.reserved2 == 0))
+    {
+      ArrayTypeBlob *blob = (ArrayTypeBlob *)&rinfo->typelib->data[rinfo->offset];
+      g_return_val_if_fail (blob->tag == GI_TYPE_TAG_ARRAY, -1);
+
+      return blob->array_type;
+    }
+
+  return -1;
+}
diff --git a/girepository/gitypeinfo.h b/girepository/gitypeinfo.h
new file mode 100644 (file)
index 0000000..ef834b1
--- /dev/null
@@ -0,0 +1,56 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Type
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#ifndef __GITYPEINFO_H__
+#define __GITYPEINFO_H__
+
+#if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
+#error "Only <girepository.h> can be included directly."
+#endif
+
+#include <gitypes.h>
+
+G_BEGIN_DECLS
+
+#define GI_IS_TYPE_INFO(info) \
+    (g_base_info_get_type((GIBaseInfo*)info) ==  GI_INFO_TYPE_TYPE)
+
+#define G_TYPE_TAG_IS_BASIC(tag) (tag < GI_TYPE_TAG_ARRAY || tag == GI_TYPE_TAG_UNICHAR)
+
+const gchar*           g_type_tag_to_string            (GITypeTag   type);
+const gchar*           g_info_type_to_string           (GIInfoType  type);
+
+gboolean               g_type_info_is_pointer          (GITypeInfo *info);
+GITypeTag              g_type_info_get_tag             (GITypeInfo *info);
+GITypeInfo *           g_type_info_get_param_type      (GITypeInfo *info,
+                                                       gint       n);
+GIBaseInfo *           g_type_info_get_interface       (GITypeInfo *info);
+gint                   g_type_info_get_array_length    (GITypeInfo *info);
+gint                   g_type_info_get_array_fixed_size(GITypeInfo *info);
+gboolean               g_type_info_is_zero_terminated  (GITypeInfo *info);
+GIArrayType            g_type_info_get_array_type      (GITypeInfo *info);
+
+G_END_DECLS
+
+
+#endif  /* __GITYPEINFO_H__ */
+
diff --git a/girepository/gitypelib-internal.h b/girepository/gitypelib-internal.h
new file mode 100644 (file)
index 0000000..ed8e679
--- /dev/null
@@ -0,0 +1,1192 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: struct definitions for the binary
+ * typelib format, validation
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#ifndef __G_TYPELIB_H__
+#define __G_TYPELIB_H__
+
+#include <gmodule.h>
+#include "girepository.h"
+
+G_BEGIN_DECLS
+
+/**
+ * SECTION:gtypelib
+ * @short_description: Layout and accessors for typelib
+ * @stability: Stable
+ *
+ * The "typelib" is a binary, readonly, memory-mappable database
+ * containing reflective information about a GObject library.
+ *
+ * The format of GObject typelib is strongly influenced by the Mozilla XPCOM
+ * format.
+ *
+ * Some of the differences to XPCOM include:
+ * - Type information is stored not quite as compactly (XPCOM stores it inline
+ * in function descriptions in variable-sized blobs of 1 to n bytes. We store
+ * 16 bits of type information for each parameter, which is enough to encode
+ * simple types inline. Complex (e.g. recursive) types are stored out of line
+ * in a separate list of types.
+ * - String and complex type data is stored outside of typelib entry blobs,
+ * references are stored as offsets relative to the start of the typelib.
+ * One possibility is to store the strings and types in a pools at the end
+ * of the typelib.
+ *
+ * The typelib has the following general format.
+ *
+ * typelib ::= header, section-index, directory, blobs, attributes, attributedata
+ *
+ * directory ::= list of entries
+ *
+ * entry ::= blob type, name, namespace, offset
+ * blob ::= function|callback|struct|boxed|enum|flags|object|interface|constant|union
+ * attributes ::= list of attributes, sorted by offset
+ * attribute ::= offset, key, value
+ * attributedata ::= string data for attributes
+ *
+ * Details
+ *
+ * We describe the fragments that make up the typelib in the form of C structs
+ * (although some fall short of being valid C structs since they contain multiple
+ * flexible arrays).
+ */
+
+/*
+TYPELIB HISTORY
+-----
+
+Version 1.1
+- Add ref/unref/set-value/get-value functions to Object, to be able
+  to support instantiatable fundamental types which are not GObject based.
+
+Version 1.0
+- Rename class_struct to gtype_struct, add to interfaces
+
+Changes since 0.9:
+- Add padding to structures
+
+Changes since 0.8:
+- Add class struct concept to ObjectBlob
+- Add is_class_struct bit to StructBlob
+
+Changes since 0.7:
+- Add dependencies
+
+Changes since 0.6:
+- rename metadata to typelib, to follow xpcom terminology
+
+Changes since 0.5:
+- basic type cleanup:
+  + remove GString
+  + add [u]int, [u]long, [s]size_t
+  + rename string to utf8, add filename
+- allow blob_type to be zero for non-local entries
+
+Changes since 0.4:
+- add a UnionBlob
+
+Changes since 0.3:
+- drop short_name for ValueBlob
+
+Changes since 0.2:
+- make inline types 4 bytes after all, remove header->types and allow
+  types to appear anywhere
+- allow error domains in the directory
+
+Changes since 0.1:
+
+- drop comments about _GOBJ_METADATA
+- drop string pool, strings can appear anywhere
+- use 'blob' as collective name for the various blob types
+- rename 'type' field in blobs to 'blob_type'
+- rename 'type_name' and 'type_init' fields to 'gtype_name', 'gtype_init'
+- shrink directory entries to 12 bytes
+- merge struct and boxed blobs
+- split interface blobs into enum, object and interface blobs
+- add an 'unregistered' flag to struct and enum blobs
+- add a 'wraps_vfunc' flag to function blobs and link them to
+  the vfuncs they wrap
+- restrict value blobs to only occur inside enums and flags again
+- add constant blobs, allow them toplevel, in interfaces and in objects
+- rename 'receiver_owns_value' and 'receiver_owns_container' to
+  'transfer_ownership' and 'transfer_container_ownership'
+- add a 'struct_offset' field to virtual function and field blobs
+- add 'dipper' and 'optional' flags to arg blobs
+- add a 'true_stops_emit' flag to signal blobs
+- add variable blob sizes to header
+- store offsets to signature blobs instead of including them directly
+- change the type offset to be measured in words rather than bytes
+*/
+
+/**
+ * G_IR_MAGIC:
+ *
+ * Identifying prefix for the typelib.  This was inspired by XPCOM,
+ * which in turn borrowed from PNG.
+ */
+#define G_IR_MAGIC "GOBJ\nMETADATA\r\n\032"
+
+/**
+ * GTypelibBlobType:
+ * @BLOB_TYPE_INVALID: Should not appear in code
+ * @BLOB_TYPE_FUNCTION: A #FunctionBlob
+ * @BLOB_TYPE_CALLBACK: A #CallbackBlob
+ * @BLOB_TYPE_STRUCT: A #StructBlob
+ * @BLOB_TYPE_BOXED: Can be either a #StructBlob or #UnionBlob
+ * @BLOB_TYPE_ENUM: An #EnumBlob
+ * @BLOB_TYPE_FLAGS: An #EnumBlob
+ * @BLOB_TYPE_OBJECT: An #ObjectBlob
+ * @BLOB_TYPE_INTERFACE: An #InterfaceBlob
+ * @BLOB_TYPE_CONSTANT: A #ConstantBlob
+ * @BLOB_TYPE_UNION: A #UnionBlob
+ *
+ * The integral value of this enumeration appears in each "Blob"
+ * component of a typelib to identify its type.
+ */
+typedef enum {
+  BLOB_TYPE_INVALID,
+  BLOB_TYPE_FUNCTION,
+  BLOB_TYPE_CALLBACK,
+  BLOB_TYPE_STRUCT,
+  BLOB_TYPE_BOXED,
+  BLOB_TYPE_ENUM,
+  BLOB_TYPE_FLAGS,
+  BLOB_TYPE_OBJECT,
+  BLOB_TYPE_INTERFACE,
+  BLOB_TYPE_CONSTANT,
+  BLOB_TYPE_INVALID_0, /* DELETED - used to be ErrorDomain */
+  BLOB_TYPE_UNION
+} GTypelibBlobType;
+
+#define BLOB_IS_REGISTERED_TYPE(blob)               \
+        ((blob)->blob_type == BLOB_TYPE_STRUCT ||   \
+         (blob)->blob_type == BLOB_TYPE_UNION  ||   \
+         (blob)->blob_type == BLOB_TYPE_ENUM   ||   \
+         (blob)->blob_type == BLOB_TYPE_FLAGS  ||   \
+         (blob)->blob_type == BLOB_TYPE_OBJECT ||   \
+         (blob)->blob_type == BLOB_TYPE_INTERFACE)
+
+/**
+ * Header:
+ * @magic: See #G_IR_MAGIC.
+ * @major_version: The version of the typelib format. Minor version changes indicate
+ * compatible changes and should still allow the typelib to be parsed
+ * by a parser designed for the same major_version.
+ * @minor_version: See major_version.
+ * @n_entries: The number of entries in the directory.
+ * @n_local_entries: The number of entries referring to blobs in this typelib. The
+ * local entries must occur before the unresolved entries.
+ * @directory: Offset of the directory in the typelib.
+ * @n_attributes: Number of attribute blocks
+ * @attributes: Offset of the list of attributes in the typelib.
+ * @dependencies: Offset of a single string, which is the list of
+ * dependencies, separated by the '|' character.  The
+ * dependencies are required in order to avoid having programs
+ * consuming a typelib check for an "Unresolved" type return
+ * from every API call.
+ * @size: The size in bytes of the typelib.
+ * @namespace: Offset of the namespace string in the typelib.
+ * @nsversion: Offset of the namespace version string in the typelib.
+ * @shared_library: This field is the set of shared libraries associated
+ * with the typelib.  The entries are separated by the '|' (pipe) character.
+ * @c_prefix: The prefix for the function names of the library
+ * @entry_blob_size: The sizes of fixed-size blobs. Recording this information here
+ * allows to write parser which continue to work if the format is
+ * extended by adding new fields to the end of the fixed-size blobs.
+ * @function_blob_size: See above.
+ * @callback_blob_size: See above.
+ * @signal_blob_size: See above.
+ * @vfunc_blob_size: See above.
+ * @arg_blob_size: See above.
+ * @property_blob_size: See above.
+ * @field_blob_size: See above.
+ * @value_blob_size: See above.
+ * @attribute_blob_size: See above.
+ * @constant_blob_size: See above.
+ * @object_blob_size: See above.
+ * @union_blob_size: See above.
+ * @signature_blob_size: See above.
+ * @enum_blob_size: See above.
+ * @struct_blob_size: See above.
+ * @error_domain_blob_size: See above.
+ * @interface_blob_size: For variable-size blobs, the size of the struct up to the first
+ * flexible array member. Recording this information here allows to
+ * write parser which continue to work if the format is extended by
+ * adding new fields before the first flexible array member in
+ * variable-size blobs.
+ * @sections: Offset of section blob array
+ *
+ * The header structure appears exactly once at the beginning of a typelib.  It is a
+ * collection of meta-information, such as the number of entries and dependencies.
+ */
+typedef struct {
+  gchar   magic[16];
+  guint8  major_version;
+  guint8  minor_version;
+  /* <private> */
+  guint16 reserved;
+  /* <public> */
+  guint16 n_entries;
+  guint16 n_local_entries;
+  guint32 directory;
+  guint32 n_attributes;
+  guint32 attributes;
+
+  guint32 dependencies;
+
+  guint32 size;
+  guint32 namespace;
+  guint32 nsversion;
+  guint32 shared_library;
+  guint32 c_prefix;
+
+  guint16 entry_blob_size;
+  guint16 function_blob_size;
+  guint16 callback_blob_size;
+  guint16 signal_blob_size;
+  guint16 vfunc_blob_size;
+  guint16 arg_blob_size;
+  guint16 property_blob_size;
+  guint16 field_blob_size;
+  guint16 value_blob_size;
+  guint16 attribute_blob_size;
+  guint16 constant_blob_size;
+  guint16 error_domain_blob_size;
+
+  guint16 signature_blob_size;
+  guint16 enum_blob_size;
+  guint16 struct_blob_size;
+  guint16 object_blob_size;
+  guint16 interface_blob_size;
+  guint16 union_blob_size;
+
+  guint32 sections;
+
+  /* <private> */
+  guint16 padding[6];
+} Header;
+
+typedef enum {
+  GI_SECTION_END = 0,
+  GI_SECTION_DIRECTORY_INDEX = 1
+} SectionType;
+
+/**
+ * Section:
+ * @id: A #SectionType
+ * @offset: Integer offset for this section
+ *
+ * A section is a blob of data that's (at least theoretically) optional,
+ * and may or may not be present in the typelib.  Presently, just used
+ * for the directory index.  This allows a form of dynamic extensibility
+ * with different tradeoffs from the format minor version.
+ *
+ */
+typedef struct {
+  guint32 id;
+  guint32 offset;
+} Section;
+
+
+/**
+ * DirEntry:
+ * @blob_type: A #GTypelibBlobType
+ * @local: Whether this entry refers to a blob in this typelib.
+ * @name: The name of the entry.
+ * @offset:   If is_local is set, this is the offset of the blob in the typelib.
+ * Otherwise, it is the offset of the namespace in which the blob has
+ * to be looked up by name.
+ *
+ * References to directory entries are stored as 1-based 16-bit indexes.
+ *
+ * All blobs pointed to by a directory entry start with the same layout for
+ * the first 8 bytes (the reserved flags may be used by some blob types)
+ */
+typedef struct {
+  guint16 blob_type;
+
+  guint16 local    : 1;
+  /* <private> */
+  guint16 reserved :15;
+  /* <public> */
+  guint32 name;
+  guint32 offset;
+} DirEntry;
+
+/**
+ * SimpleTypeBlob:
+ * @is_pointer: Indicates whether the type is passed by reference.
+ * @tag: A #GITypeTag
+ * @offset:  Offset relative to header->types that points to a TypeBlob.
+ * Unlike other offsets, this is in words (ie 32bit units) rather
+ * than bytes.
+ *
+ * The SimpleTypeBlob is the general purpose "reference to a type" construct, used
+ * in method parameters, returns, callback definitions, fields, constants, etc.
+ * It's actually just a 32 bit integer which you can see from the union definition.
+ * This is for efficiency reasons, since there are so many references to types.
+ *
+ * SimpleTypeBlob is divided into two cases; first, if "reserved" and "reserved2", the
+ * type tag for a basic type is embedded in the "tag" bits.  This allows e.g.
+ * GI_TYPE_TAG_UTF8, GI_TYPE_TAG_INT and the like to be embedded directly without
+ * taking up extra space.
+ *
+ * References to "interfaces" (objects, interfaces) are more complicated;  In this case,
+ * the integer is actually an offset into the directory (see above).  Because the header
+ * is larger than 2^8=256 bits, all offsets will have one of the upper 24 bits set.
+ */
+typedef union
+{
+  struct
+  {
+    /* <private> */
+    guint reserved   : 8;
+    guint reserved2  :16;
+    /* <public> */
+    guint pointer    : 1;
+    /* <private> */
+    guint reserved3  : 2;
+    /* <public> */
+    guint tag        : 5;
+  } flags;
+  guint32    offset;
+} SimpleTypeBlob;
+
+/**
+ * ArgBlob:
+ * @name: A suggested name for the parameter.
+ * @in: The parameter is an input to the function
+ * @out: The parameter is used to return an output of the function.
+ * Parameters can be both in and out. Out parameters implicitly
+ * add another level of indirection to the parameter type. Ie if
+ * the type is uint32 in an out parameter, the function actually
+ * takes an uint32*.
+ * @caller_allocates: The parameter is a pointer to a struct or object that will
+ * receive an output of the function.
+ * @allow_none: Only meaningful for types which are passed as pointers.
+ * For an in parameter, indicates if it is ok to pass NULL in, for
+ * an out parameter, whether it may return NULL. Note that NULL is a
+ * valid GList and GSList value, thus allow_none will normally be set
+ * for parameters of these types.
+ * @optional: For an out parameter, indicates that NULL may be passed in
+ * if the value is not needed.
+ * @transfer_ownership: For an in parameter, indicates that the function takes over
+ * ownership of the parameter value. For an out parameter, it
+ * indicates that the caller is responsible for freeing the return
+ * value.
+ * @transfer_container_ownership: For container types, indicates that the
+ * ownership of the container,  but not of its contents is transferred. This is typically the case
+ * for out parameters returning lists of statically allocated things.
+ * @return_value: The parameter should be considered the return value of the function.
+ * Only out parameters can be marked as return value, and there can be
+ * at most one per function call. If an out parameter is marked as
+ * return value, the actual return value of the function should be
+ * either void or a boolean indicating the success of the call.
+ * @scope: A #GIScopeType. If the parameter is of a callback type, this denotes the scope
+ * of the user_data and the callback function pointer itself
+ * (for languages that emit code at run-time).
+ * @closure: Index of the closure (user_data) parameter associated with the callback,
+ * or -1.
+ * @destroy: Index of the destroy notfication callback parameter associated with
+ * the callback, or -1.
+ * @arg_type: Describes the type of the parameter. See details below.
+ * @skip: Indicates that the parameter is only useful in C and should be skipped.
+ *
+ * Types are specified by four bytes. If the three high bytes are zero,
+ * the low byte describes a basic type, otherwise the 32bit number is an
+ * offset which points to a TypeBlob.
+ */
+typedef struct {
+  guint32        name;
+
+  guint          in                           : 1;
+  guint          out                          : 1;
+  guint          caller_allocates             : 1;
+  guint          allow_none                   : 1;
+  guint          optional                     : 1;
+  guint          transfer_ownership           : 1;
+  guint          transfer_container_ownership : 1;
+  guint          return_value                 : 1;
+  guint          scope                        : 3;
+  guint          skip                         : 1;
+  /* <private> */
+  guint          reserved                     :20;
+  /* <public> */
+  gint8        closure;
+  gint8        destroy;
+
+  /* <private> */
+  guint16      padding;
+  /* <public> */
+
+  SimpleTypeBlob arg_type;
+} ArgBlob;
+
+/**
+ * SignatureBlob:
+ * @return_type: Describes the type of the return value. See details below.
+ * @may_return_null: Only relevant for pointer types. Indicates whether the caller
+ * must expect NULL as a return value.
+ * @caller_owns_return_value: If set, the caller is responsible for freeing the return value
+ * if it is no longer needed.
+ * @caller_owns_return_container: This flag is only relevant if the return type is a container type.
+ * If the flag is set, the caller is resonsible for freeing the
+ * container, but not its contents.
+ * @skip_return: Indicates that the return value is only useful in C and should be skipped.
+ * @n_arguments: The number of arguments that this function expects, also the length
+ * of the array of ArgBlobs.
+ * @arguments: An array of ArgBlob for the arguments of the function.
+ */
+typedef struct {
+  SimpleTypeBlob return_type;
+
+  guint16        may_return_null              : 1;
+  guint16        caller_owns_return_value     : 1;
+  guint16        caller_owns_return_container : 1;
+  guint16        skip_return                  : 1;
+  guint16        reserved                     :12;
+
+  guint16        n_arguments;
+
+  ArgBlob        arguments[];
+} SignatureBlob;
+
+/**
+ * CommonBlob:
+ * @blob_type: A #GTypelibBlobType
+ * @deprecated: Whether the blob is deprecated.
+ * @name: The name of the blob.
+ *
+ * The #CommonBlob is shared between #FunctionBlob,
+ * #CallbackBlob, #SignalBlob.
+ */
+typedef struct {
+  guint16 blob_type;  /* 1 */
+
+  guint16 deprecated : 1;
+  /* <private> */
+  guint16 reserved   :15;
+  /* <public> */
+  guint32 name;
+} CommonBlob;
+
+/**
+ * FunctionBlob:
+ * @blob_Type: #BLOB_TYPE_FUNCTION
+ * @symbol:   The symbol which can be used to obtain the function pointer with
+ * dlsym().
+ * @deprecated: The function is deprecated.
+ * @setter: The function is a setter for a property. Language bindings may
+ * prefer to not bind individual setters and rely on the generic
+ * g_object_set().
+ * @getter: The function is a getter for a property. Language bindings may
+ * prefer to not bind individual getters and rely on the generic
+ * g_object_get().
+ * @constructor:The function acts as a constructor for the object it is contained
+ * in.
+ * @wraps_vfunc: The function is a simple wrapper for a virtual function.
+ * @index: Index of the property that this function is a setter or getter of
+ * in the array of properties of the containing interface, or index
+ * of the virtual function that this function wraps.
+ * @signature: Offset of the SignatureBlob describing the parameter types and the
+ * return value type.
+ * @is_static: The function is a "static method"; in other words it's a pure
+ * function whose name is conceptually scoped to the object.
+ */
+typedef struct {
+  guint16 blob_type;  /* 1 */
+
+  guint16 deprecated  : 1;
+  guint16 setter      : 1;
+  guint16 getter      : 1;
+  guint16 constructor : 1;
+  guint16 wraps_vfunc : 1;
+  guint16 throws      : 1;
+  guint16 index       :10;
+  /* Note the bits above need to match CommonBlob
+   * and are thus exhausted, extend things using
+   * the reserved block below. */
+
+  guint32 name;
+  guint32 symbol;
+  guint32 signature;
+
+  guint16 is_static   : 1;
+  guint16 reserved    : 15;
+  guint16 reserved2   : 16;
+} FunctionBlob;
+
+/**
+ * CallbackBlob:
+ * @signature: Offset of the #SignatureBlob describing the parameter types and the
+ * return value type.
+ */
+typedef struct {
+  guint16 blob_type;  /* 2 */
+
+  guint16 deprecated : 1;
+  /* <private> */
+  guint16 reserved   :15;
+  /* <public> */
+  guint32 name;
+  guint32 signature;
+} CallbackBlob;
+
+/**
+ * InterfaceTypeBlob:
+ * @pointer: Whether this type represents an indirection
+ * @tag: A #GITypeTag
+ * @interface: Index of the directory entry for the interface.
+ *
+ * If the interface is an enum of flags type, is_pointer is 0, otherwise it is 1.
+ */
+typedef struct {
+  guint8  pointer  :1;
+  /* <private> */
+  guint8  reserved :2;
+  /* <public> */
+  guint8  tag      :5;
+  /* <private> */
+  guint8  reserved2;
+  /* <public> */
+  guint16 interface;
+} InterfaceTypeBlob;
+
+/**
+ * ArrayTypeBlob:
+ * @zero_terminated: Indicates that the array must be terminated by a suitable #NULL
+ * value.
+ * @has_length: Indicates that length points to a parameter specifying the length
+ * of the array. If both has_length and zero_terminated are set, the
+ * convention is to pass -1 for the length if the array is
+ * zero-terminated.
+ * @has_size: Indicates that size is the fixed size of the array.
+ * @array_type: Indicates whether this is a C array, GArray, GPtrArray, or
+ * GByteArray. If something other than a C array, the length and element size
+ * are implicit in the structure.
+ * @length: The index of the parameter which is used to pass the length of the
+ * array. The parameter must be an integer type and have the same
+ * direction as this one.
+ * @size: The fixed size of the array.
+ * @type: The type of the array elements.
+ * Arrays are passed by reference, thus is_pointer is always 1.
+ */
+typedef struct {
+  guint16 pointer         :1;
+  guint16 reserved        :2;
+  guint16 tag             :5;
+
+  guint16 zero_terminated :1;
+  guint16 has_length      :1;
+  guint16 has_size        :1;
+  guint16 array_type      :2;
+  guint16 reserved2       :3;
+
+  union {
+    guint16 length;
+    guint16 size;
+  } dimensions;
+
+  SimpleTypeBlob type;
+} ArrayTypeBlob;
+
+/**
+ * ParamTypeBlob:
+ * @n_types: The number of parameter types to follow.
+ * @type: Describes the type of the list elements.
+ *
+ */
+typedef struct {
+  guint8        pointer  :1;
+  guint8        reserved :2;
+  guint8        tag      :5;
+
+  guint8        reserved2;
+  guint16       n_types;
+
+  SimpleTypeBlob type[];
+} ParamTypeBlob;
+
+/**
+ * ErrorTypeBlob:
+ */
+typedef struct {
+  guint8  pointer  :1;
+  guint8  reserved :2;
+  guint8  tag      :5;
+
+  guint8  reserved2;
+
+  guint16 n_domains; /* Must be 0 */
+  guint16 domains[];
+}  ErrorTypeBlob;
+
+/**
+ * ValueBlob:
+ * @deprecated: Whether this value is deprecated
+ * @unsigned_value: if set, value is a 32-bit unsigned integer cast to gint32
+ * @value: The numerical value
+ * @name: Name of blob
+ *
+ * Values commonly occur in enums and flags.
+ */
+typedef struct {
+  guint32 deprecated : 1;
+  guint32 unsigned_value : 1;
+  /* <private> */
+  guint32 reserved   :30;
+  /* <public> */
+  guint32 name;
+  gint32 value;
+} ValueBlob;
+
+/**
+ * FieldBlob:
+ * @name: The name of the field.
+ * @readable:
+ * @writable: How the field may be accessed.
+ * @has_embedded_type: An anonymous type follows the FieldBlob.
+ * @bits: If this field is part of a bitfield, the number of bits which it
+ * uses, otherwise 0.
+ * @struct_offset:
+ * The offset of the field in the struct. The value 0xFFFF indicates
+ * that the struct offset is unknown.
+ * @type: The type of the field.
+ */
+typedef struct {
+  guint32        name;
+
+  guint8         readable :1;
+  guint8         writable :1;
+  guint8         has_embedded_type :1;
+  guint8         reserved :5;
+  guint8         bits;
+
+  guint16        struct_offset;
+
+  guint32        reserved2;
+
+  SimpleTypeBlob type;
+} FieldBlob;
+
+/**
+ * RegisteredTypeBlob:
+ * @gtype_name: The name under which the type is registered with GType.
+ * @gtype_init: The symbol name of the get_type() function which registers the type.
+ */
+typedef struct {
+  guint16 blob_type;
+  guint16 deprecated   : 1;
+  guint16 unregistered : 1;
+  guint16 reserved :14;
+  guint32 name;
+
+  guint32 gtype_name;
+  guint32 gtype_init;
+} RegisteredTypeBlob;
+
+/**
+ * StructBlob:
+ * @blob_type: #BLOB_TYPE_STRUCT
+ * @deprecated: Whether this structure is deprecated
+ * @unregistered: If this is set, the type is not registered with GType.
+ * @alignment: The byte boundary that the struct is aligned to in memory
+ * @is_gtype_struct: Whether this structure is the class or interface layout for a GObject
+ * @foreign: If the type is foreign, eg if it's expected to be overridden by
+ * a native language binding instead of relying of introspected bindings.
+ * @size: The size of the struct in bytes.
+ * @gtype_name: String name of the associated #GType
+ * @gtype_init: String naming the symbol which gets the runtime #GType
+ * @n_fields:
+ * @fields: An array of n_fields FieldBlobs.
+ * should be considered as methods of the struct.
+ */
+typedef struct {
+  guint16   blob_type;
+
+  guint16   deprecated   : 1;
+  guint16   unregistered : 1;
+  guint16   is_gtype_struct : 1;
+  guint16   alignment    : 6;
+  guint16   foreign      : 1;
+  guint16   reserved     : 6;
+
+  guint32   name;
+
+  guint32   gtype_name;
+  guint32   gtype_init;
+
+  guint32   size;
+
+  guint16   n_fields;
+  guint16   n_methods;
+
+  guint32   reserved2;
+  guint32   reserved3;
+
+#if 0
+  /* variable-length parts of the blob */
+  FieldBlob    fields[];
+  FunctionBlob methods[];
+#endif
+} StructBlob;
+
+/**
+ * UnionBlob:
+ * @unregistered: If this is set, the type is not registered with GType.
+ * @discriminated: Is set if the union is discriminated
+ * @alignment: The byte boundary that the union is aligned to in memory
+ * @size: The size of the union in bytes.
+ * @gtype_name: String name of the associated #GType
+ * @gtype_init: String naming the symbol which gets the runtime #GType
+ * @n_fields: Length of the arrays
+ * @discriminator_offset: Offset from the beginning of the union where the
+ * discriminator of a discriminated union is located.
+ * The value 0xFFFF indicates that the discriminator offset
+ * is unknown.
+ * @discriminator_type: Type of the discriminator
+ * @fields: Array of FieldBlobs describing the alternative branches of the union
+ */
+typedef struct {
+  guint16      blob_type;
+  guint16      deprecated    : 1;
+  guint16      unregistered  : 1;
+  guint16      discriminated : 1;
+  guint16      alignment     : 6;
+  guint16      reserved      : 7;
+  guint32      name;
+
+  guint32      gtype_name;
+  guint32      gtype_init;
+
+  guint32      size;
+
+  guint16      n_fields;
+  guint16      n_functions;
+
+  guint32      reserved2;
+  guint32      reserved3;
+
+  gint32       discriminator_offset;
+  SimpleTypeBlob discriminator_type;
+
+#if 0
+  FieldBlob    fields[];
+  FunctionBlob functions[];
+  ConstantBlob discriminator_values[]
+#endif
+} UnionBlob;
+
+/**
+ * EnumBlob:
+ * @unregistered: If this is set, the type is not registered with GType.
+ * @storage_type: The tag of the type used for the enum in the C ABI
+ * (will be a signed or unsigned integral type)
+ * @gtype_name: String name of the associated #GType
+ * @gtype_init: String naming the symbol which gets the runtime #GType
+ * @error_domain: String naming the #GError domain this enum is
+ *   associated with
+ * @n_values: The length of the values array.
+ * @n_methods: The length of the methods array.
+ * @values: Describes the enum values.
+ * @methods: Describes the enum methods.
+ */
+typedef struct {
+  guint16   blob_type;
+
+  guint16   deprecated   : 1;
+  guint16   unregistered : 1;
+  guint16   storage_type : 5;
+  guint16   reserved     : 9;
+
+  guint32   name;
+
+  guint32   gtype_name;
+  guint32   gtype_init;
+
+  guint16   n_values;
+  guint16   n_methods;
+
+  guint32   error_domain;
+
+  ValueBlob values[];
+#if 0
+  FunctionBlob methods[];
+#endif
+} EnumBlob;
+
+/**
+ * PropertyBlob:
+ * @name:     The name of the property.
+ * @readable:
+ * @writable:
+ * @construct:
+ * @construct_only: The ParamFlags used when registering the property.
+ * @transfer_ownership: When writing, the type containing the property takes
+ * ownership of the value. When reading, the returned value needs to be released
+ * by the caller.
+ * @transfer_container_ownership: For container types indicates that the
+ * ownership of the container, but not of its contents, is transferred. This is
+ * typically the case when reading lists of statically allocated things.
+ * @type: Describes the type of the property.
+ */
+typedef struct {
+  guint32        name;
+
+  guint32        deprecated                   : 1;
+  guint32        readable                     : 1;
+  guint32        writable                     : 1;
+  guint32        construct                    : 1;
+  guint32        construct_only               : 1;
+  guint32        transfer_ownership           : 1;
+  guint32        transfer_container_ownership : 1;
+  guint32        reserved                     :25;
+
+  guint32        reserved2;
+
+  SimpleTypeBlob type;
+} PropertyBlob;
+
+/**
+ * SignalBlob:
+ * @name: The name of the signal.
+ * @run_first:
+ * @run_last:
+ * @run_cleanup:
+ * @no_recurse:
+ * @detailed:
+ * @action:
+ * @no_hooks: The flags used when registering the signal.
+ * @has_class_closure: Set if the signal has a class closure.
+ * @true_stops_emit: Whether the signal has true-stops-emit semantics
+ * @class_closure: The index of the class closure in the list of virtual functions
+ * of the object or interface on which the signal is defined.
+ * @signature: Offset of the SignatureBlob describing the parameter types and the
+ * return value type.
+ */
+typedef struct {
+  guint16 deprecated        : 1;
+  guint16 run_first         : 1;
+  guint16 run_last          : 1;
+  guint16 run_cleanup       : 1;
+  guint16 no_recurse        : 1;
+  guint16 detailed          : 1;
+  guint16 action            : 1;
+  guint16 no_hooks          : 1;
+  guint16 has_class_closure : 1;
+  guint16 true_stops_emit   : 1;
+  guint16 reserved          : 6;
+
+  guint16 class_closure;
+
+  guint32 name;
+
+  guint32 reserved2;
+
+  guint32 signature;
+} SignalBlob;
+
+/**
+ * VFuncBlob:
+ * @name: The name of the virtual function.
+ * @must_chain_up: If set, every implementation of this virtual function must
+ * chain up to the implementation of the parent class.
+ * @must_be_implemented: If set, every derived class must override this virtual function.
+ * @must_not_be_implemented: If set, derived class must not override this virtual function.
+ * @class_closure: Set if this virtual function is the class closure of a signal.
+ * @signal: The index of the signal in the list of signals of the object or
+ * interface to which this virtual function belongs.
+ * @struct_offset: The offset of the function pointer in the class struct. The value
+ * 0xFFFF indicates that the struct offset is unknown.
+ * @invoker: If a method invoker for this virtual exists, this is the offset in the
+ * class structure of the method.  If no method is known, this value will be 0x3ff.
+ * @signature:
+ * Offset of the SignatureBlob describing the parameter types and the
+ * return value type.
+ */
+typedef struct {
+  guint32 name;
+
+  guint16 must_chain_up           : 1;
+  guint16 must_be_implemented     : 1;
+  guint16 must_not_be_implemented : 1;
+  guint16 class_closure           : 1;
+  guint16 throws                  : 1;
+  guint16 reserved                :11;
+  guint16 signal;
+
+  guint16 struct_offset;
+  guint16 invoker : 10; /* Number of bits matches @index in FunctionBlob */
+  guint16 reserved2 : 6;
+
+  guint32 reserved3;
+  guint32 signature;
+} VFuncBlob;
+
+/**
+ * ObjectBlob:
+ * @blob_type: #BLOB_TYPE_OBJECT
+ * @fundamental: this object is not a GObject derived type, instead it's
+ * an additional fundamental type.
+ * @gtype_name: String name of the associated #GType
+ * @gtype_init: String naming the symbol which gets the runtime #GType
+ * @parent: The directory index of the parent type. This is only set for
+ * objects. If an object does not have a parent, it is zero.
+ * @n_interfaces:
+ * @n_fields:
+ * @n_properties:
+ * @n_methods:
+ * @n_signals:
+ * @n_vfuncs:
+ * @n_constants: The lengths of the arrays.Up to 16bits of padding may be inserted
+ * between the arrays to ensure that they start on a 32bit boundary.
+ * @interfaces: An array of indices of directory entries for the implemented
+ * interfaces.
+ * @fields: Describes the fields.
+ * @methods: Describes the methods, constructors, setters and getters.
+ * @properties: Describes the properties.
+ * @signals: Describes the signals.
+ * @vfuncs: Describes the virtual functions.
+ * @constants: Describes the constants.
+ * @ref_func: String pointing to a function which can be called to increase
+ * the reference count for an instance of this object type.
+ * @unref_func: String pointing to a function which can be called to decrease
+ * the reference count for an instance of this object type.
+ * @set_value_func: String pointing to a function which can be called to
+ * convert a pointer of this object to a GValue
+ * @get_value_func: String pointing to a function which can be called to
+ * convert extract a pointer to this object from a GValue
+ */
+typedef struct {
+  guint16   blob_type;  /* 7 */
+  guint16   deprecated   : 1;
+  guint16   abstract     : 1;
+  guint16   fundamental  : 1;
+  guint16   reserved     :13;
+  guint32   name;
+
+  guint32   gtype_name;
+  guint32   gtype_init;
+
+  guint16   parent;
+  guint16   gtype_struct;
+
+  guint16   n_interfaces;
+  guint16   n_fields;
+  guint16   n_properties;
+  guint16   n_methods;
+  guint16   n_signals;
+  guint16   n_vfuncs;
+  guint16   n_constants;
+  guint16   reserved2;
+
+  guint32   ref_func;
+  guint32   unref_func;
+  guint32   set_value_func;
+  guint32   get_value_func;
+
+  guint32   reserved3;
+  guint32   reserved4;
+
+  guint16   interfaces[];
+
+#if 0
+  /* variable-length parts of the blob */
+  FieldBlob           fields[];
+  PropertyBlob        properties[];
+  FunctionBlob        methods[];
+  SignalBlob          signals[];
+  VFuncBlob           vfuncs[];
+  ConstantBlob        constants[];
+#endif
+} ObjectBlob;
+
+/**
+ * InterfaceBlob:
+ * @gtype_struct: Name of the interface "class" C structure
+ * @n_prerequisites: Number of prerequisites
+ * @n_properties: Number of properties
+ * @n_methods: Number of methods
+ * @n_signals: Number of signals
+ * @n_vfuncs: Number of virtual functions
+ * @n_constants: The lengths of the arrays.
+ * Up to 16bits of padding may be inserted between the arrays to ensure that they
+ * start on a 32bit boundary.
+ * @prerequisites: An array of indices of directory entries for required interfaces.
+ * @methods: Describes the methods, constructors, setters and getters.
+ * @properties: Describes the properties.
+ * @signals:  Describes the signals.
+ * @vfuncs: Describes the virtual functions.
+ * @constants: Describes the constants.
+ */
+typedef struct {
+  guint16 blob_type;
+  guint16 deprecated   : 1;
+  guint16 reserved     :15;
+  guint32 name;
+
+  guint32 gtype_name;
+  guint32 gtype_init;
+  guint16 gtype_struct;
+
+  guint16 n_prerequisites;
+  guint16 n_properties;
+  guint16 n_methods;
+  guint16 n_signals;
+  guint16 n_vfuncs;
+  guint16 n_constants;
+
+  guint16 padding;
+
+  guint32 reserved2;
+  guint32 reserved3;
+
+  guint16 prerequisites[];
+
+#if 0
+  /* variable-length parts of the blob */
+  PropertyBlob        properties[];
+  FunctionBlob        methods[];
+  SignalBlob          signals[];
+  VFuncBlob           vfuncs[];
+  ConstantBlob        constants[];
+#endif
+} InterfaceBlob;
+
+/**
+ * ConstantBlob:
+ * @type: The type of the value. In most cases this should be a numeric
+ * type or string.
+ * @size: The size of the value in bytes.
+ * @offset: The offset of the value in the typelib.
+ */
+typedef struct {
+  guint16        blob_type;
+  guint16        deprecated   : 1;
+  guint16        reserved     :15;
+  guint32        name;
+
+  SimpleTypeBlob type;
+
+  guint32        size;
+  guint32        offset;
+
+  guint32        reserved2;
+} ConstantBlob;
+
+/**
+ * AttributeBlob:
+ * @offset: The offset of the typelib entry to which this attribute refers.
+ * Attributes are kept sorted by offset, so that the attributes
+ * of an entry can be found by a binary search.
+ * @name: The name of the attribute, a string.
+ * @value: The value of the attribute (also a string)
+ */
+typedef struct {
+  guint32 offset;
+  guint32 name;
+  guint32 value;
+} AttributeBlob;
+
+/**
+ * GITypelib:
+ */
+struct _GITypelib {
+  /* <private> */
+  guchar *data;
+  gsize len;
+  gboolean owns_memory;
+  GMappedFile *mfile;
+  GList *modules;
+  gboolean open_attempted;
+};
+
+DirEntry *g_typelib_get_dir_entry (GITypelib *typelib,
+                                  guint16   index);
+
+DirEntry *g_typelib_get_dir_entry_by_name (GITypelib *typelib,
+                                          const char *name);
+
+DirEntry *g_typelib_get_dir_entry_by_gtype (GITypelib *typelib,
+                                           gboolean   fastpass,
+                                           GType      gtype);
+
+DirEntry *g_typelib_get_dir_entry_by_error_domain (GITypelib *typelib,
+                                                  GQuark     error_domain);
+
+void      g_typelib_check_sanity (void);
+
+#define   g_typelib_get_string(typelib,offset) ((const gchar*)&(typelib->data)[(offset)])
+
+
+/**
+ * GITypelibError:
+ * @G_TYPELIB_ERROR_INVALID: the typelib is invalid
+ * @G_TYPELIB_ERROR_INVALID_HEADER: the typelib header is invalid
+ * @G_TYPELIB_ERROR_INVALID_DIRECTORY: the typelib directory is invalid
+ * @G_TYPELIB_ERROR_INVALID_ENTRY: a typelib entry is invalid
+ * @G_TYPELIB_ERROR_INVALID_BLOB: a typelib blob is invalid
+ *
+ * A error set while validating the #GITypelib
+ */
+typedef enum
+{
+  G_TYPELIB_ERROR_INVALID,
+  G_TYPELIB_ERROR_INVALID_HEADER,
+  G_TYPELIB_ERROR_INVALID_DIRECTORY,
+  G_TYPELIB_ERROR_INVALID_ENTRY,
+  G_TYPELIB_ERROR_INVALID_BLOB
+} GITypelibError;
+
+#define G_TYPELIB_ERROR (g_typelib_error_quark ())
+
+GQuark g_typelib_error_quark (void);
+
+gboolean g_typelib_validate (GITypelib  *typelib,
+                            GError    **error);
+
+
+/* defined in gibaseinfo.c */
+AttributeBlob *_attribute_blob_find_first (GIBaseInfo *info,
+                                           guint32     blob_offset);
+
+typedef struct _GITypelibHashBuilder GITypelibHashBuilder;
+
+GITypelibHashBuilder * _gi_typelib_hash_builder_new (void);
+
+void _gi_typelib_hash_builder_add_string (GITypelibHashBuilder *builder, const char *str, guint16 value);
+
+gboolean _gi_typelib_hash_builder_prepare (GITypelibHashBuilder *builder);
+
+guint32 _gi_typelib_hash_builder_get_buffer_size (GITypelibHashBuilder *builder);
+
+void _gi_typelib_hash_builder_pack (GITypelibHashBuilder *builder, guint8* mem, guint32 size);
+
+void _gi_typelib_hash_builder_destroy (GITypelibHashBuilder *builder);
+
+guint16 _gi_typelib_hash_search (guint8* memory, const char *str);
+
+
+G_END_DECLS
+
+#endif  /* __G_TYPELIB_H__ */
+
diff --git a/girepository/gitypelib.c b/girepository/gitypelib.c
new file mode 100644 (file)
index 0000000..ae6b845
--- /dev/null
@@ -0,0 +1,2310 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: typelib validation, auxiliary functions
+ * related to the binary typelib format
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ *
+ * 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 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.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+
+#include <glib.h>
+
+#include "config.h"
+#include "gitypelib-internal.h"
+#include "glib-compat.h"
+
+typedef struct {
+  GITypelib *typelib;
+  GSList *context_stack;
+} ValidateContext;
+
+#define ALIGN_VALUE(this, boundary) \
+  (( ((unsigned long)(this)) + (((unsigned long)(boundary)) -1)) & (~(((unsigned long)(boundary))-1)))
+
+static void
+push_context (ValidateContext *ctx, const char *name)
+{
+  ctx->context_stack = g_slist_prepend (ctx->context_stack, (char*)name);
+}
+
+static void
+pop_context (ValidateContext *ctx)
+{
+  g_assert (ctx->context_stack != NULL);
+  ctx->context_stack = g_slist_delete_link (ctx->context_stack,
+                                           ctx->context_stack);
+}
+
+static gboolean
+validate_interface_blob (ValidateContext *ctx,
+                        guint32        offset,
+                        GError       **error);
+
+static DirEntry *
+get_dir_entry_checked (GITypelib *typelib,
+                      guint16    index,
+                      GError   **error)
+{
+  Header *header = (Header *)typelib->data;
+  guint32 offset;
+
+  if (index == 0 || index > header->n_entries)
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID_BLOB,
+                  "Invalid directory index %d", index);
+      return FALSE;
+    }
+
+  offset = header->directory + (index - 1) * header->entry_blob_size;
+
+  if (typelib->len < offset + sizeof (DirEntry))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "The buffer is too short");
+      return FALSE;
+    }
+
+  return (DirEntry *)&typelib->data[offset];
+}
+
+
+static CommonBlob *
+get_blob (GITypelib *typelib,
+         guint32   offset,
+         GError  **error)
+{
+  if (typelib->len < offset + sizeof (CommonBlob))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "The buffer is too short");
+      return FALSE;
+    }
+  return (CommonBlob *)&typelib->data[offset];
+}
+
+static InterfaceTypeBlob *
+get_type_blob (GITypelib *typelib,
+              SimpleTypeBlob *simple,
+              GError  **error)
+{
+  if (simple->offset == 0)
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "Expected blob for type");
+      return FALSE;
+    }
+
+  if (simple->flags.reserved == 0 && simple->flags.reserved2 == 0)
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "Expected non-basic type but got %d",
+                  simple->flags.tag);
+      return FALSE;
+    }
+
+  return (InterfaceTypeBlob*) get_blob (typelib, simple->offset, error);
+}
+
+DirEntry *
+g_typelib_get_dir_entry (GITypelib *typelib,
+                         guint16    index)
+{
+  Header *header = (Header *)typelib->data;
+
+  return (DirEntry *)&typelib->data[header->directory + (index - 1) * header->entry_blob_size];
+}
+
+static Section *
+get_section_by_id (GITypelib   *typelib,
+                  SectionType  section_type)
+{
+  Header *header = (Header *)typelib->data;
+  Section *section;
+
+  if (header->sections == 0)
+    return NULL;
+
+  for (section = (Section*)&typelib->data[header->sections];
+       section->id != GI_SECTION_END;
+       section++)
+    {
+      if (section->id == section_type)
+       return section;
+    }
+  return NULL;
+}
+
+DirEntry *
+g_typelib_get_dir_entry_by_name (GITypelib *typelib,
+                                const char *name)
+{
+  Section *dirindex;
+  gint i;
+  const char *entry_name;
+  DirEntry *entry;
+
+  dirindex = get_section_by_id (typelib, GI_SECTION_DIRECTORY_INDEX);
+
+  if (dirindex == NULL)
+    {
+      gint n_entries = ((Header *)typelib->data)->n_local_entries;
+      for (i = 1; i <= n_entries; i++)
+       {
+         entry = g_typelib_get_dir_entry (typelib, i);
+         entry_name = g_typelib_get_string (typelib, entry->name);
+         if (strcmp (name, entry_name) == 0)
+           return entry;
+       }
+      return NULL;
+    }
+  else
+    {
+      guint8 *hash = (guint8*) &typelib->data[dirindex->offset];
+      guint16 index;
+
+      index = _gi_typelib_hash_search (hash, name);
+      entry = g_typelib_get_dir_entry (typelib, index + 1);
+      entry_name = g_typelib_get_string (typelib, entry->name);
+      if (strcmp (name, entry_name) == 0)
+       return entry;
+      return NULL;
+    }
+}
+
+DirEntry *
+g_typelib_get_dir_entry_by_gtype (GITypelib *typelib,
+                                 gboolean   fastpass,
+                                 GType      gtype)
+{
+  Header *header = (Header *)typelib->data;
+  guint n_entries = header->n_local_entries;
+  const char *gtype_name = g_type_name (gtype);
+  DirEntry *entry;
+  guint i;
+  const char *c_prefix;
+
+  /* There is a corner case regarding GdkRectangle.  GdkRectangle is a
+     boxed type, but it is just an alias to boxed struct
+     CairoRectangleInt.  Scanner automatically converts all references
+     to GdkRectangle to CairoRectangleInt, so GdkRectangle does not
+     appear in the typelibs at all, although user code might query it.
+     So if we get such query, we also change it to lookup of
+     CairoRectangleInt.
+     https://bugzilla.gnome.org/show_bug.cgi?id=655423 */
+  if (!fastpass && !strcmp (gtype_name, "GdkRectangle"))
+    gtype_name = "CairoRectangleInt";
+
+  /* Inside each typelib, we include the "C prefix" which acts as
+   * a namespace mechanism.  For GtkTreeView, the C prefix is Gtk.
+   * Given the assumption that GTypes for a library also use the
+   * C prefix, we know we can skip examining a typelib if our
+   * target type does not have this typelib's C prefix.
+   *
+   * However, not every class library necessarily conforms to this,
+   * e.g. Clutter has Cogl inside it.  So, we split this into two
+   * passes.  First we try a lookup, skipping things which don't
+   * have the prefix.  If that fails then we try a global lookup,
+   * ignoring the prefix.
+   *
+   * See http://bugzilla.gnome.org/show_bug.cgi?id=564016
+   */
+  c_prefix = g_typelib_get_string (typelib, header->c_prefix);
+  if (fastpass && c_prefix != NULL)
+    {
+      if (g_ascii_strncasecmp (c_prefix, gtype_name, strlen (c_prefix)) != 0)
+       return NULL;
+    }
+
+  for (i = 1; i <= n_entries; i++)
+    {
+      RegisteredTypeBlob *blob;
+      const char *type;
+
+      entry = g_typelib_get_dir_entry (typelib, i);
+      if (!BLOB_IS_REGISTERED_TYPE (entry))
+       continue;
+
+      blob = (RegisteredTypeBlob *)(&typelib->data[entry->offset]);
+      if (!blob->gtype_name)
+       continue;
+
+      type = g_typelib_get_string (typelib, blob->gtype_name);
+      if (strcmp (type, gtype_name) == 0)
+       return entry;
+    }
+  return NULL;
+}
+
+DirEntry *
+g_typelib_get_dir_entry_by_error_domain (GITypelib *typelib,
+                                        GQuark     error_domain)
+{
+  Header *header = (Header *)typelib->data;
+  guint n_entries = header->n_local_entries;
+  const char *domain_string = g_quark_to_string (error_domain);
+  DirEntry *entry;
+  guint i;
+
+  for (i = 1; i <= n_entries; i++)
+    {
+      EnumBlob *blob;
+      const char *enum_domain_string;
+
+      entry = g_typelib_get_dir_entry (typelib, i);
+      if (entry->blob_type != BLOB_TYPE_ENUM)
+       continue;
+
+      blob = (EnumBlob *)(&typelib->data[entry->offset]);
+      if (!blob->error_domain)
+       continue;
+
+      enum_domain_string = g_typelib_get_string (typelib, blob->error_domain);
+      if (strcmp (domain_string, enum_domain_string) == 0)
+       return entry;
+    }
+  return NULL;
+}
+
+void
+g_typelib_check_sanity (void)
+{
+  /* Check that struct layout is as we expect */
+
+  gboolean size_check_ok = TRUE;
+
+#define CHECK_SIZE(s,n) \
+  if (sizeof(s) != n) \
+    { \
+      g_printerr ("sizeof("#s") is expected to be %d but is %"G_GSIZE_FORMAT".\n", \
+                 n, sizeof (s));                                       \
+      size_check_ok = FALSE; \
+    }
+
+  /* When changing the size of a typelib structure, you are required to update
+   * the hardcoded size here.  Do NOT change these to use sizeof(); these
+   * should match whatever is defined in the text specification and serve as
+   * a sanity check on structure modifications.
+   *
+   * Everything else in the code however should be using sizeof().
+   */
+
+  CHECK_SIZE (Header, 112);
+  CHECK_SIZE (DirEntry, 12);
+  CHECK_SIZE (SimpleTypeBlob, 4);
+  CHECK_SIZE (ArgBlob, 16);
+  CHECK_SIZE (SignatureBlob, 8);
+  CHECK_SIZE (CommonBlob, 8);
+  CHECK_SIZE (FunctionBlob, 20);
+  CHECK_SIZE (CallbackBlob, 12);
+  CHECK_SIZE (InterfaceTypeBlob, 4);
+  CHECK_SIZE (ArrayTypeBlob, 8);
+  CHECK_SIZE (ParamTypeBlob, 4);
+  CHECK_SIZE (ErrorTypeBlob, 4);
+  CHECK_SIZE (ValueBlob, 12);
+  CHECK_SIZE (FieldBlob, 16);
+  CHECK_SIZE (RegisteredTypeBlob, 16);
+  CHECK_SIZE (StructBlob, 32);
+  CHECK_SIZE (EnumBlob, 24);
+  CHECK_SIZE (PropertyBlob, 16);
+  CHECK_SIZE (SignalBlob, 16);
+  CHECK_SIZE (VFuncBlob, 20);
+  CHECK_SIZE (ObjectBlob, 60);
+  CHECK_SIZE (InterfaceBlob, 40);
+  CHECK_SIZE (ConstantBlob, 24);
+  CHECK_SIZE (AttributeBlob, 12);
+  CHECK_SIZE (UnionBlob, 40);
+#undef CHECK_SIZE
+
+  g_assert (size_check_ok);
+}
+
+
+static gboolean
+is_aligned (guint32 offset)
+{
+  return offset == ALIGN_VALUE (offset, 4);
+}
+
+#define MAX_NAME_LEN 200
+
+static const char *
+get_string (GITypelib *typelib, guint32 offset, GError **error)
+{
+  if (typelib->len < offset)
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "Buffer is too short while looking up name");
+      return NULL;
+    }
+
+  return (const char*)&typelib->data[offset];
+}
+
+static const char *
+get_string_nofail (GITypelib *typelib, guint32 offset)
+{
+  const char *ret = get_string (typelib, offset, NULL);
+  g_assert (ret);
+  return ret;
+}
+
+static gboolean
+validate_name (GITypelib   *typelib,
+              const char *msg,
+              const guchar *data, guint32 offset,
+              GError **error)
+{
+  const char *name;
+
+  name = get_string (typelib, offset, error);
+  if (!name)
+    return FALSE;
+
+  if (!memchr (name, '\0', MAX_NAME_LEN))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "The %s is too long: %s",
+                  msg, name);
+      return FALSE;
+    }
+
+  if (strspn (name, G_CSET_a_2_z G_CSET_A_2_Z G_CSET_DIGITS "-_") < strlen (name))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "The %s contains invalid characters: '%s'",
+                  msg, name);
+      return FALSE;
+    }
+
+  return TRUE;
+}
+
+/* Fast path sanity check, operates on a memory blob */
+static gboolean
+validate_header_basic (const guint8   *memory,
+                      gsize           len,
+                      GError        **error)
+{
+  Header *header = (Header *)memory;
+
+  if (len < sizeof (Header))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "The specified typelib length %" G_GSIZE_FORMAT " is too short",
+                  len);
+      return FALSE;
+    }
+
+  if (strncmp (header->magic, G_IR_MAGIC, 16) != 0)
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID_HEADER,
+                  "Invalid magic header");
+      return FALSE;
+
+    }
+
+  if (header->major_version != 4)
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID_HEADER,
+                  "Typelib version mismatch; expected 4, found %d",
+                  header->major_version);
+      return FALSE;
+
+    }
+
+  if (header->n_entries < header->n_local_entries)
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID_HEADER,
+                  "Inconsistent entry counts");
+      return FALSE;
+    }
+
+  if (header->size != len)
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID_HEADER,
+                  "Typelib size %" G_GSIZE_FORMAT " does not match %" G_GSIZE_FORMAT,
+                  (gsize) header->size, len);
+      return FALSE;
+    }
+
+  /* This is a sanity check for a specific typelib; it
+   * prevents us from loading an incompatible typelib.
+   *
+   * The hardcoded checks in g_typelib_check_sanity to
+   * protect against inadvertent or buggy changes to the typelib format
+   * itself.
+   */
+
+  if (header->entry_blob_size != sizeof (DirEntry) ||
+      header->function_blob_size != sizeof (FunctionBlob) ||
+      header->callback_blob_size != sizeof (CallbackBlob) ||
+      header->signal_blob_size != sizeof (SignalBlob) ||
+      header->vfunc_blob_size != sizeof (VFuncBlob) ||
+      header->arg_blob_size != sizeof (ArgBlob) ||
+      header->property_blob_size != sizeof (PropertyBlob) ||
+      header->field_blob_size != sizeof (FieldBlob) ||
+      header->value_blob_size != sizeof (ValueBlob) ||
+      header->constant_blob_size != sizeof (ConstantBlob) ||
+      header->attribute_blob_size != sizeof (AttributeBlob) ||
+      header->signature_blob_size != sizeof (SignatureBlob) ||
+      header->enum_blob_size != sizeof (EnumBlob) ||
+      header->struct_blob_size != sizeof (StructBlob) ||
+      header->object_blob_size != sizeof(ObjectBlob) ||
+      header->interface_blob_size != sizeof (InterfaceBlob) ||
+      header->union_blob_size != sizeof (UnionBlob))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID_HEADER,
+                  "Blob size mismatch");
+      return FALSE;
+    }
+
+  if (!is_aligned (header->directory))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID_HEADER,
+                  "Misaligned directory");
+      return FALSE;
+    }
+
+  if (!is_aligned (header->attributes))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID_HEADER,
+                  "Misaligned attributes");
+      return FALSE;
+    }
+
+  if (header->attributes == 0 && header->n_attributes > 0)
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID_HEADER,
+                  "Wrong number of attributes");
+      return FALSE;
+    }
+
+  return TRUE;
+}
+
+static gboolean
+validate_header (ValidateContext  *ctx,
+                GError          **error)
+{
+  GITypelib *typelib = ctx->typelib;
+  
+  if (!validate_header_basic (typelib->data, typelib->len, error))
+    return FALSE;
+
+  {
+    Header *header = (Header*)typelib->data;
+    if (!validate_name (typelib, "namespace", typelib->data, header->namespace, error))
+      return FALSE;
+  }
+
+  return TRUE;
+}
+
+static gboolean validate_type_blob (GITypelib     *typelib,
+                                   guint32        offset,
+                                   guint32        signature_offset,
+                                   gboolean       return_type,
+                                   GError       **error);
+
+static gboolean
+validate_array_type_blob (GITypelib     *typelib,
+                         guint32        offset,
+                         guint32        signature_offset,
+                         gboolean       return_type,
+                         GError       **error)
+{
+  /* FIXME validate length */
+
+  if (!validate_type_blob (typelib,
+                          offset + G_STRUCT_OFFSET (ArrayTypeBlob, type),
+                          0, FALSE, error))
+    return FALSE;
+
+  return TRUE;
+}
+
+static gboolean
+validate_iface_type_blob (GITypelib     *typelib,
+                         guint32        offset,
+                         guint32        signature_offset,
+                         gboolean       return_type,
+                         GError       **error)
+{
+  InterfaceTypeBlob *blob;
+  InterfaceBlob *target;
+
+  blob = (InterfaceTypeBlob*)&typelib->data[offset];
+
+  target = (InterfaceBlob*) get_dir_entry_checked (typelib, blob->interface, error);
+
+  if (!target)
+    return FALSE;
+  if (target->blob_type == 0) /* non-local */
+    return TRUE;
+
+  return TRUE;
+}
+
+static gboolean
+validate_param_type_blob (GITypelib     *typelib,
+                         guint32        offset,
+                         guint32        signature_offset,
+                         gboolean       return_type,
+                         gint           n_params,
+                         GError       **error)
+{
+  ParamTypeBlob *blob;
+  gint i;
+
+  blob = (ParamTypeBlob*)&typelib->data[offset];
+
+  if (!blob->pointer)
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID_BLOB,
+                  "Pointer type exected for tag %d", blob->tag);
+      return FALSE;
+    }
+
+  if (blob->n_types != n_params)
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID_BLOB,
+                  "Parameter type number mismatch");
+      return FALSE;
+    }
+
+  for (i = 0; i < n_params; i++)
+    {
+      if (!validate_type_blob (typelib,
+                              offset + sizeof (ParamTypeBlob) +
+                              i * sizeof (SimpleTypeBlob),
+                              0, FALSE, error))
+       return FALSE;
+    }
+
+  return TRUE;
+}
+
+static gboolean
+validate_error_type_blob (GITypelib     *typelib,
+                         guint32        offset,
+                         guint32        signature_offset,
+                         gboolean       return_type,
+                         GError       **error)
+{
+  ErrorTypeBlob *blob;
+
+  blob = (ErrorTypeBlob*)&typelib->data[offset];
+
+  if (!blob->pointer)
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID_BLOB,
+                  "Pointer type exected for tag %d", blob->tag);
+      return FALSE;
+    }
+
+  return TRUE;
+}
+
+static gboolean
+validate_type_blob (GITypelib     *typelib,
+                   guint32        offset,
+                   guint32        signature_offset,
+                   gboolean       return_type,
+                   GError       **error)
+{
+  SimpleTypeBlob *simple;
+  InterfaceTypeBlob *iface;
+
+  simple = (SimpleTypeBlob *)&typelib->data[offset];
+
+  if (simple->flags.reserved == 0 &&
+      simple->flags.reserved2 == 0)
+    {
+      if (!G_TYPE_TAG_IS_BASIC(simple->flags.tag))
+       {
+         g_set_error (error,
+                      G_TYPELIB_ERROR,
+                      G_TYPELIB_ERROR_INVALID_BLOB,
+                      "Invalid non-basic tag %d in simple type", simple->flags.tag);
+         return FALSE;
+       }
+
+      if (simple->flags.tag >= GI_TYPE_TAG_UTF8 &&
+         simple->flags.tag != GI_TYPE_TAG_UNICHAR &&
+         !simple->flags.pointer)
+       {
+         g_set_error (error,
+                      G_TYPELIB_ERROR,
+                      G_TYPELIB_ERROR_INVALID_BLOB,
+                      "Pointer type exected for tag %d", simple->flags.tag);
+         return FALSE;
+       }
+
+      return TRUE;
+    }
+
+  iface = (InterfaceTypeBlob*)&typelib->data[simple->offset];
+
+  switch (iface->tag)
+    {
+    case GI_TYPE_TAG_ARRAY:
+      if (!validate_array_type_blob (typelib, simple->offset,
+                                    signature_offset, return_type, error))
+       return FALSE;
+      break;
+    case GI_TYPE_TAG_INTERFACE:
+      if (!validate_iface_type_blob (typelib, simple->offset,
+                                    signature_offset, return_type, error))
+       return FALSE;
+      break;
+    case GI_TYPE_TAG_GLIST:
+    case GI_TYPE_TAG_GSLIST:
+      if (!validate_param_type_blob (typelib, simple->offset,
+                                    signature_offset, return_type, 1, error))
+       return FALSE;
+      break;
+    case GI_TYPE_TAG_GHASH:
+      if (!validate_param_type_blob (typelib, simple->offset,
+                                    signature_offset, return_type, 2, error))
+       return FALSE;
+      break;
+    case GI_TYPE_TAG_ERROR:
+      if (!validate_error_type_blob (typelib, simple->offset,
+                                    signature_offset, return_type, error))
+       return FALSE;
+      break;
+    default:
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID_BLOB,
+                  "Wrong tag in complex type");
+      return FALSE;
+    }
+
+  return TRUE;
+}
+
+static gboolean
+validate_arg_blob (GITypelib     *typelib,
+                  guint32        offset,
+                  guint32        signature_offset,
+                  GError       **error)
+{
+  ArgBlob *blob;
+
+  if (typelib->len < offset + sizeof (ArgBlob))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "The buffer is too short");
+      return FALSE;
+    }
+
+  blob = (ArgBlob*) &typelib->data[offset];
+
+  if (!validate_name (typelib, "argument", typelib->data, blob->name, error))
+    return FALSE;
+
+  if (!validate_type_blob (typelib,
+                          offset + G_STRUCT_OFFSET (ArgBlob, arg_type),
+                          signature_offset, FALSE, error))
+    return FALSE;
+
+  return TRUE;
+}
+
+static SimpleTypeBlob *
+return_type_from_signature (GITypelib *typelib,
+                           guint32   offset,
+                           GError  **error)
+{
+  SignatureBlob *blob;
+  if (typelib->len < offset + sizeof (SignatureBlob))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "The buffer is too short");
+      return NULL;
+    }
+
+  blob = (SignatureBlob*) &typelib->data[offset];
+  if (blob->return_type.offset == 0)
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "No return type found in signature");
+      return NULL;
+    }
+
+  return (SimpleTypeBlob *)&typelib->data[offset + G_STRUCT_OFFSET (SignatureBlob, return_type)];
+}
+
+static gboolean
+validate_signature_blob (GITypelib     *typelib,
+                        guint32        offset,
+                        GError       **error)
+{
+  SignatureBlob *blob;
+  gint i;
+
+  if (typelib->len < offset + sizeof (SignatureBlob))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "The buffer is too short");
+      return FALSE;
+    }
+
+  blob = (SignatureBlob*) &typelib->data[offset];
+
+  if (blob->return_type.offset != 0)
+    {
+      if (!validate_type_blob (typelib,
+                              offset + G_STRUCT_OFFSET (SignatureBlob, return_type),
+                              offset, TRUE, error))
+       return FALSE;
+    }
+
+  for (i = 0; i < blob->n_arguments; i++)
+    {
+      if (!validate_arg_blob (typelib,
+                             offset + sizeof (SignatureBlob) +
+                             i * sizeof (ArgBlob),
+                             offset,
+                             error))
+       return FALSE;
+    }
+
+  /* FIXME check constraints on return_value */
+  /* FIXME check array-length pairs */
+  return TRUE;
+}
+
+static gboolean
+validate_function_blob (ValidateContext *ctx,
+                       guint32        offset,
+                       guint16        container_type,
+                       GError       **error)
+{
+  GITypelib *typelib = ctx->typelib;
+  FunctionBlob *blob;
+
+  if (typelib->len < offset + sizeof (FunctionBlob))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "The buffer is too short");
+      return FALSE;
+    }
+
+  blob = (FunctionBlob*) &typelib->data[offset];
+
+  if (blob->blob_type != BLOB_TYPE_FUNCTION)
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID_BLOB,
+                  "Wrong blob type %d, expected function", blob->blob_type);
+      return FALSE;
+    }
+
+  if (!validate_name (typelib, "function", typelib->data, blob->name, error))
+    return FALSE;
+
+  push_context (ctx, get_string_nofail (typelib, blob->name));
+
+  if (!validate_name (typelib, "function symbol", typelib->data, blob->symbol, error))
+    return FALSE;
+
+  if (blob->constructor)
+    {
+      switch (container_type)
+       {
+       case BLOB_TYPE_BOXED:
+       case BLOB_TYPE_STRUCT:
+       case BLOB_TYPE_UNION:
+       case BLOB_TYPE_OBJECT:
+       case BLOB_TYPE_INTERFACE:
+         break;
+       default:
+         g_set_error (error,
+                      G_TYPELIB_ERROR,
+                      G_TYPELIB_ERROR_INVALID_BLOB,
+                      "Constructor not allowed");
+         return FALSE;
+       }
+    }
+
+  if (blob->setter || blob->getter || blob->wraps_vfunc)
+    {
+      switch (container_type)
+       {
+       case BLOB_TYPE_OBJECT:
+       case BLOB_TYPE_INTERFACE:
+         break;
+       default:
+         g_set_error (error,
+                      G_TYPELIB_ERROR,
+                      G_TYPELIB_ERROR_INVALID_BLOB,
+                      "Setter, getter or wrapper not allowed");
+         return FALSE;
+       }
+    }
+
+  if (blob->index)
+    {
+      if (!(blob->setter || blob->getter || blob->wraps_vfunc))
+       {
+         g_set_error (error,
+                      G_TYPELIB_ERROR,
+                      G_TYPELIB_ERROR_INVALID_BLOB,
+                      "Must be setter, getter or wrapper");
+         return FALSE;
+       }
+    }
+
+  /* FIXME: validate index range */
+
+  if (!validate_signature_blob (typelib, blob->signature, error))
+    return FALSE;
+
+  if (blob->constructor)
+    {
+      SimpleTypeBlob *simple = return_type_from_signature (typelib,
+                                                          blob->signature,
+                                                          error);
+      InterfaceTypeBlob *iface_type;
+
+      if (!simple)
+       return FALSE;
+      iface_type = get_type_blob (typelib, simple, error);
+      if (!iface_type)
+       return FALSE;
+      if (iface_type->tag != GI_TYPE_TAG_INTERFACE &&
+          (container_type == BLOB_TYPE_OBJECT ||
+           container_type == BLOB_TYPE_INTERFACE))
+       {
+         g_set_error (error,
+                      G_TYPELIB_ERROR,
+                      G_TYPELIB_ERROR_INVALID,
+                      "Invalid return type '%s' for constructor '%s'",
+                      g_type_tag_to_string (iface_type->tag),
+                      get_string_nofail (typelib, blob->symbol));
+         return FALSE;
+       }
+    }
+
+  pop_context (ctx);
+
+  return TRUE;
+}
+
+static gboolean
+validate_callback_blob (ValidateContext *ctx,
+                       guint32        offset,
+                       GError       **error)
+{
+  GITypelib *typelib = ctx->typelib;
+  CallbackBlob *blob;
+
+  if (typelib->len < offset + sizeof (CallbackBlob))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "The buffer is too short");
+      return FALSE;
+    }
+
+  blob = (CallbackBlob*) &typelib->data[offset];
+
+  if (blob->blob_type != BLOB_TYPE_CALLBACK)
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID_BLOB,
+                  "Wrong blob type");
+      return FALSE;
+    }
+
+  if (!validate_name (typelib, "callback", typelib->data, blob->name, error))
+    return FALSE;
+
+  push_context (ctx, get_string_nofail (typelib, blob->name));
+
+  if (!validate_signature_blob (typelib, blob->signature, error))
+    return FALSE;
+
+  pop_context (ctx);
+
+  return TRUE;
+}
+
+static gboolean
+validate_constant_blob (GITypelib     *typelib,
+                       guint32        offset,
+                       GError       **error)
+{
+  guint value_size[] = {
+    0, /* VOID */
+    4, /* BOOLEAN */
+    1, /* INT8 */
+    1, /* UINT8 */
+    2, /* INT16 */
+    2, /* UINT16 */
+    4, /* INT32 */
+    4, /* UINT32 */
+    8, /* INT64 */
+    8, /* UINT64 */
+    sizeof (gfloat),
+    sizeof (gdouble),
+    0, /* GTYPE */
+    0, /* UTF8 */
+    0, /* FILENAME */
+    0, /* ARRAY */
+    0, /* INTERFACE */
+    0, /* GLIST */
+    0, /* GSLIST */
+    0, /* GHASH */
+    0, /* ERROR */
+    4 /* UNICHAR */
+  };
+  ConstantBlob *blob;
+  SimpleTypeBlob *type;
+
+  g_assert (G_N_ELEMENTS (value_size) == GI_TYPE_TAG_N_TYPES);
+
+  if (typelib->len < offset + sizeof (ConstantBlob))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "The buffer is too short");
+      return FALSE;
+    }
+
+  blob = (ConstantBlob*) &typelib->data[offset];
+
+  if (blob->blob_type != BLOB_TYPE_CONSTANT)
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID_BLOB,
+                  "Wrong blob type");
+      return FALSE;
+    }
+
+  if (!validate_name (typelib, "constant", typelib->data, blob->name, error))
+    return FALSE;
+
+  if (!validate_type_blob (typelib, offset + G_STRUCT_OFFSET (ConstantBlob, type),
+                          0, FALSE, error))
+    return FALSE;
+
+  if (!is_aligned (blob->offset))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID_BLOB,
+                  "Misaligned constant value");
+      return FALSE;
+    }
+
+  type = (SimpleTypeBlob *)&typelib->data[offset + G_STRUCT_OFFSET (ConstantBlob, type)];
+  if (type->flags.reserved == 0 && type->flags.reserved2 == 0)
+    {
+      if (type->flags.tag == 0)
+       {
+         g_set_error (error,
+                      G_TYPELIB_ERROR,
+                      G_TYPELIB_ERROR_INVALID_BLOB,
+                      "Constant value type void");
+         return FALSE;
+       }
+
+      if (value_size[type->flags.tag] != 0 &&
+         blob->size != value_size[type->flags.tag])
+       {
+         g_set_error (error,
+                      G_TYPELIB_ERROR,
+                      G_TYPELIB_ERROR_INVALID_BLOB,
+                      "Constant value size mismatch");
+         return FALSE;
+       }
+      /* FIXME check string values */
+    }
+
+  return TRUE;
+}
+
+static gboolean
+validate_value_blob (GITypelib     *typelib,
+                    guint32        offset,
+                    GError       **error)
+{
+  ValueBlob *blob;
+
+  if (typelib->len < offset + sizeof (ValueBlob))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "The buffer is too short");
+      return FALSE;
+    }
+
+  blob = (ValueBlob*) &typelib->data[offset];
+
+  if (!validate_name (typelib, "value", typelib->data, blob->name, error))
+    return FALSE;
+
+  return TRUE;
+}
+
+static gboolean
+validate_field_blob (ValidateContext *ctx,
+                    guint32        offset,
+                    GError       **error)
+{
+  GITypelib *typelib = ctx->typelib;
+  Header *header = (Header *)typelib->data;
+  FieldBlob *blob;
+
+  if (typelib->len < offset + sizeof (FieldBlob))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "The buffer is too short");
+      return FALSE;
+    }
+
+  blob = (FieldBlob*) &typelib->data[offset];
+
+  if (!validate_name (typelib, "field", typelib->data, blob->name, error))
+    return FALSE;
+
+  if (blob->has_embedded_type)
+    {
+      if (!validate_callback_blob (ctx, offset + header->field_blob_size, error))
+        return FALSE;
+    }
+  else if (!validate_type_blob (typelib,
+                               offset + G_STRUCT_OFFSET (FieldBlob, type),
+                               0, FALSE, error))
+    return FALSE;
+
+  return TRUE;
+}
+
+static gboolean
+validate_property_blob (GITypelib     *typelib,
+                       guint32        offset,
+                       GError       **error)
+{
+  PropertyBlob *blob;
+
+  if (typelib->len < offset + sizeof (PropertyBlob))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "The buffer is too short");
+      return FALSE;
+    }
+
+  blob = (PropertyBlob*) &typelib->data[offset];
+
+  if (!validate_name (typelib, "property", typelib->data, blob->name, error))
+    return FALSE;
+
+  if (!validate_type_blob (typelib,
+                          offset + G_STRUCT_OFFSET (PropertyBlob, type),
+                          0, FALSE, error))
+    return FALSE;
+
+  return TRUE;
+}
+
+static gboolean
+validate_signal_blob (GITypelib     *typelib,
+                     guint32        offset,
+                     guint32        container_offset,
+                     GError       **error)
+{
+  SignalBlob *blob;
+  gint n_signals;
+
+  if (typelib->len < offset + sizeof (SignalBlob))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "The buffer is too short");
+      return FALSE;
+    }
+
+  blob = (SignalBlob*) &typelib->data[offset];
+
+  if (!validate_name (typelib, "signal", typelib->data, blob->name, error))
+    return FALSE;
+
+  if ((blob->run_first != 0) +
+      (blob->run_last != 0) +
+      (blob->run_cleanup != 0) != 1)
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID_BLOB,
+                  "Invalid signal run flags");
+      return FALSE;
+    }
+
+  if (blob->has_class_closure)
+    {
+      if (((CommonBlob*)&typelib->data[container_offset])->blob_type == BLOB_TYPE_OBJECT)
+       {
+         ObjectBlob *object;
+
+         object = (ObjectBlob*)&typelib->data[container_offset];
+
+         n_signals = object->n_signals;
+       }
+      else
+       {
+         InterfaceBlob *iface;
+
+         iface = (InterfaceBlob*)&typelib->data[container_offset];
+
+         n_signals = iface->n_signals;
+       }
+
+      if (blob->class_closure >= n_signals)
+       {
+         g_set_error (error,
+                      G_TYPELIB_ERROR,
+                      G_TYPELIB_ERROR_INVALID_BLOB,
+                      "Invalid class closure index");
+         return FALSE;
+       }
+    }
+
+  if (!validate_signature_blob (typelib, blob->signature, error))
+    return FALSE;
+
+  return TRUE;
+}
+
+static gboolean
+validate_vfunc_blob (GITypelib     *typelib,
+                    guint32        offset,
+                    guint32        container_offset,
+                    GError       **error)
+{
+  VFuncBlob *blob;
+  gint n_vfuncs;
+
+  if (typelib->len < offset + sizeof (VFuncBlob))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "The buffer is too short");
+      return FALSE;
+    }
+
+  blob = (VFuncBlob*) &typelib->data[offset];
+
+  if (!validate_name (typelib, "vfunc", typelib->data, blob->name, error))
+    return FALSE;
+
+  if (blob->class_closure)
+    {
+      if (((CommonBlob*)&typelib->data[container_offset])->blob_type == BLOB_TYPE_OBJECT)
+       {
+         ObjectBlob *object;
+
+         object = (ObjectBlob*)&typelib->data[container_offset];
+
+         n_vfuncs = object->n_vfuncs;
+       }
+      else
+       {
+         InterfaceBlob *iface;
+
+         iface = (InterfaceBlob*)&typelib->data[container_offset];
+
+         n_vfuncs = iface->n_vfuncs;
+       }
+
+      if (blob->class_closure >= n_vfuncs)
+       {
+         g_set_error (error,
+                      G_TYPELIB_ERROR,
+                      G_TYPELIB_ERROR_INVALID_BLOB,
+                      "Invalid class closure index");
+         return FALSE;
+       }
+    }
+
+  if (!validate_signature_blob (typelib, blob->signature, error))
+    return FALSE;
+
+  return TRUE;
+}
+
+static gboolean
+validate_struct_blob (ValidateContext *ctx,
+                     guint32        offset,
+                     guint16        blob_type,
+                     GError       **error)
+{
+  GITypelib *typelib = ctx->typelib;
+  StructBlob *blob;
+  gint i;
+  guint32 field_offset;
+
+  if (typelib->len < offset + sizeof (StructBlob))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "The buffer is too short");
+      return FALSE;
+    }
+
+  blob = (StructBlob*) &typelib->data[offset];
+
+  if (blob->blob_type != blob_type)
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID_BLOB,
+                  "Wrong blob type");
+      return FALSE;
+    }
+
+  if (!validate_name (typelib, "struct", typelib->data, blob->name, error))
+    return FALSE;
+
+  push_context (ctx, get_string_nofail (typelib, blob->name));
+
+  if (!blob->unregistered)
+    {
+      if (!validate_name (typelib, "boxed", typelib->data, blob->gtype_name, error))
+       return FALSE;
+
+      if (!validate_name (typelib, "boxed", typelib->data, blob->gtype_init, error))
+       return FALSE;
+    }
+  else
+    {
+      if (blob->gtype_name || blob->gtype_init)
+       {
+         g_set_error (error,
+                      G_TYPELIB_ERROR,
+                      G_TYPELIB_ERROR_INVALID_BLOB,
+                      "Gtype data in struct");
+         return FALSE;
+       }
+    }
+
+  if (typelib->len < offset + sizeof (StructBlob) +
+            blob->n_fields * sizeof (FieldBlob) +
+            blob->n_methods * sizeof (FunctionBlob))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "The buffer is too short");
+      return FALSE;
+    }
+
+  field_offset = offset + sizeof (StructBlob);
+  for (i = 0; i < blob->n_fields; i++)
+    {
+      FieldBlob *blob = (FieldBlob*) &typelib->data[field_offset];
+
+      if (!validate_field_blob (ctx,
+                               field_offset,
+                               error))
+       return FALSE;
+
+      field_offset += sizeof (FieldBlob);
+      if (blob->has_embedded_type)
+        field_offset += sizeof (CallbackBlob);
+    }
+
+  for (i = 0; i < blob->n_methods; i++)
+    {
+      if (!validate_function_blob (ctx,
+                                  field_offset +
+                                  i * sizeof (FunctionBlob),
+                                  blob_type,
+                                  error))
+       return FALSE;
+    }
+
+  pop_context (ctx);
+
+  return TRUE;
+}
+
+static gboolean
+validate_enum_blob (ValidateContext *ctx,
+                   guint32        offset,
+                   guint16        blob_type,
+                   GError       **error)
+{
+  GITypelib *typelib = ctx->typelib;
+  EnumBlob *blob;
+  gint i;
+  guint32 offset2;
+
+  if (typelib->len < offset + sizeof (EnumBlob))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "The buffer is too short");
+      return FALSE;
+    }
+
+  blob = (EnumBlob*) &typelib->data[offset];
+
+  if (blob->blob_type != blob_type)
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID_BLOB,
+                  "Wrong blob type");
+      return FALSE;
+    }
+
+  if (!blob->unregistered)
+    {
+      if (!validate_name (typelib, "enum", typelib->data, blob->gtype_name, error))
+       return FALSE;
+
+      if (!validate_name (typelib, "enum", typelib->data, blob->gtype_init, error))
+       return FALSE;
+    }
+  else
+    {
+      if (blob->gtype_name || blob->gtype_init)
+       {
+         g_set_error (error,
+                      G_TYPELIB_ERROR,
+                      G_TYPELIB_ERROR_INVALID_BLOB,
+                      "Gtype data in unregistered enum");
+         return FALSE;
+       }
+    }
+
+  if (!validate_name (typelib, "enum", typelib->data, blob->name, error))
+    return FALSE;
+
+  if (typelib->len < offset + sizeof (EnumBlob) +
+      blob->n_values * sizeof (ValueBlob) +
+      blob->n_methods * sizeof (FunctionBlob))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "The buffer is too short");
+      return FALSE;
+    }
+
+  offset2 = offset + sizeof (EnumBlob);
+
+  push_context (ctx, get_string_nofail (typelib, blob->name));
+
+  for (i = 0; i < blob->n_values; i++, offset2 += sizeof (ValueBlob))
+    {
+      if (!validate_value_blob (typelib,
+                               offset2,
+                               error))
+       return FALSE;
+
+#if 0
+      v1 = (ValueBlob *)&typelib->data[offset2];
+      for (j = 0; j < i; j++)
+       {
+         v2 = (ValueBlob *)&typelib->data[offset2 +
+                                            j * sizeof (ValueBlob)];
+
+         if (v1->value == v2->value)
+           {
+
+             /* FIXME should this be an error ? */
+             g_set_error (error,
+                          G_TYPELIB_ERROR,
+                          G_TYPELIB_ERROR_INVALID_BLOB,
+                          "Duplicate enum value");
+             return FALSE;
+           }
+       }
+#endif
+    }
+
+  for (i = 0; i < blob->n_methods; i++, offset2 += sizeof (FunctionBlob))
+    {
+      if (!validate_function_blob (ctx, offset2, BLOB_TYPE_ENUM, error))
+       return FALSE;
+    }
+
+  pop_context (ctx);
+
+  return TRUE;
+}
+
+static gboolean
+validate_object_blob (ValidateContext *ctx,
+                     guint32        offset,
+                     GError       **error)
+{
+  GITypelib *typelib = ctx->typelib;
+  Header *header;
+  ObjectBlob *blob;
+  gint i;
+  guint32 offset2;
+
+  header = (Header *)typelib->data;
+
+  if (typelib->len < offset + sizeof (ObjectBlob))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "The buffer is too short");
+      return FALSE;
+    }
+
+  blob = (ObjectBlob*) &typelib->data[offset];
+
+  if (blob->blob_type != BLOB_TYPE_OBJECT)
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID_BLOB,
+                  "Wrong blob type");
+      return FALSE;
+    }
+
+  if (!validate_name (typelib, "object", typelib->data, blob->gtype_name, error))
+    return FALSE;
+
+  if (!validate_name (typelib, "object", typelib->data, blob->gtype_init, error))
+    return FALSE;
+
+  if (!validate_name (typelib, "object", typelib->data, blob->name, error))
+    return FALSE;
+
+  if (blob->parent > header->n_entries)
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID_BLOB,
+                  "Invalid parent index");
+      return FALSE;
+    }
+
+  if (blob->parent != 0)
+    {
+      DirEntry *entry;
+
+      entry = get_dir_entry_checked (typelib, blob->parent, error);
+      if (!entry)
+        return FALSE;
+      if (entry->blob_type != BLOB_TYPE_OBJECT &&
+         (entry->local || entry->blob_type != 0))
+       {
+         g_set_error (error,
+                      G_TYPELIB_ERROR,
+                      G_TYPELIB_ERROR_INVALID_BLOB,
+                      "Parent not object");
+         return FALSE;
+       }
+    }
+
+  if (blob->gtype_struct != 0)
+    {
+      DirEntry *entry;
+
+      entry = get_dir_entry_checked (typelib, blob->gtype_struct, error);
+      if (!entry)
+        return FALSE;
+      if (entry->blob_type != BLOB_TYPE_STRUCT && entry->local)
+        {
+          g_set_error (error,
+                       G_TYPELIB_ERROR,
+                       G_TYPELIB_ERROR_INVALID_BLOB,
+                       "Class struct invalid type or not local");
+          return FALSE;
+        }
+    }
+
+  if (typelib->len < offset + sizeof (ObjectBlob) +
+            (blob->n_interfaces + blob->n_interfaces % 2) * 2 +
+            blob->n_fields * sizeof (FieldBlob) +
+            blob->n_properties * sizeof (PropertyBlob) +
+            blob->n_methods * sizeof (FunctionBlob) +
+            blob->n_signals * sizeof (SignalBlob) +
+            blob->n_vfuncs * sizeof (VFuncBlob) +
+            blob->n_constants * sizeof (ConstantBlob))
+
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "The buffer is too short");
+      return FALSE;
+    }
+
+  offset2 = offset + sizeof (ObjectBlob);
+
+  for (i = 0; i < blob->n_interfaces; i++, offset2 += 2)
+    {
+      guint16 iface;
+      DirEntry *entry;
+
+      iface = *(guint16*)&typelib->data[offset2];
+      if (iface == 0 || iface > header->n_entries)
+       {
+         g_set_error (error,
+                      G_TYPELIB_ERROR,
+                      G_TYPELIB_ERROR_INVALID_BLOB,
+                      "Invalid interface index");
+         return FALSE;
+       }
+
+      entry = get_dir_entry_checked (typelib, iface, error);
+      if (!entry)
+        return FALSE;
+
+      if (entry->blob_type != BLOB_TYPE_INTERFACE &&
+         (entry->local || entry->blob_type != 0))
+       {
+         g_set_error (error,
+                      G_TYPELIB_ERROR,
+                      G_TYPELIB_ERROR_INVALID_BLOB,
+                      "Not an interface");
+         return FALSE;
+       }
+    }
+
+  offset2 += 2 * (blob->n_interfaces %2);
+
+  push_context (ctx, get_string_nofail (typelib, blob->name));
+
+  for (i = 0; i < blob->n_fields; i++, offset2 += sizeof (FieldBlob))
+    {
+      if (!validate_field_blob (ctx, offset2, error))
+       return FALSE;
+    }
+
+  for (i = 0; i < blob->n_properties; i++, offset2 += sizeof (PropertyBlob))
+    {
+      if (!validate_property_blob (typelib, offset2, error))
+       return FALSE;
+    }
+
+  for (i = 0; i < blob->n_methods; i++, offset2 += sizeof (FunctionBlob))
+    {
+      if (!validate_function_blob (ctx, offset2, BLOB_TYPE_OBJECT, error))
+       return FALSE;
+    }
+
+  for (i = 0; i < blob->n_signals; i++, offset2 += sizeof (SignalBlob))
+    {
+      if (!validate_signal_blob (typelib, offset2, offset, error))
+       return FALSE;
+    }
+
+  for (i = 0; i < blob->n_vfuncs; i++, offset2 += sizeof (VFuncBlob))
+    {
+      if (!validate_vfunc_blob (typelib, offset2, offset, error))
+       return FALSE;
+    }
+
+  for (i = 0; i < blob->n_constants; i++, offset2 += sizeof (ConstantBlob))
+    {
+      if (!validate_constant_blob (typelib, offset2, error))
+       return FALSE;
+    }
+
+  pop_context (ctx);
+
+  return TRUE;
+}
+
+static gboolean
+validate_interface_blob (ValidateContext *ctx,
+                        guint32        offset,
+                        GError       **error)
+{
+  GITypelib *typelib = ctx->typelib;
+  Header *header;
+  InterfaceBlob *blob;
+  gint i;
+  guint32 offset2;
+
+  header = (Header *)typelib->data;
+
+  if (typelib->len < offset + sizeof (InterfaceBlob))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "The buffer is too short");
+      return FALSE;
+    }
+
+  blob = (InterfaceBlob*) &typelib->data[offset];
+
+  if (blob->blob_type != BLOB_TYPE_INTERFACE)
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID_BLOB,
+                  "Wrong blob type; expected interface, got %d", blob->blob_type);
+      return FALSE;
+    }
+
+  if (!validate_name (typelib, "interface", typelib->data, blob->gtype_name, error))
+    return FALSE;
+
+  if (!validate_name (typelib, "interface", typelib->data, blob->gtype_init, error))
+    return FALSE;
+
+  if (!validate_name (typelib, "interface", typelib->data, blob->name, error))
+    return FALSE;
+
+  if (typelib->len < offset + sizeof (InterfaceBlob) +
+            (blob->n_prerequisites + blob->n_prerequisites % 2) * 2 +
+            blob->n_properties * sizeof (PropertyBlob) +
+            blob->n_methods * sizeof (FunctionBlob) +
+            blob->n_signals * sizeof (SignalBlob) +
+            blob->n_vfuncs * sizeof (VFuncBlob) +
+            blob->n_constants * sizeof (ConstantBlob))
+
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "The buffer is too short");
+      return FALSE;
+    }
+
+  offset2 = offset + sizeof (InterfaceBlob);
+
+  for (i = 0; i < blob->n_prerequisites; i++, offset2 += 2)
+    {
+      DirEntry *entry;
+      guint16 req;
+
+      req = *(guint16*)&typelib->data[offset2];
+      if (req == 0 || req > header->n_entries)
+       {
+         g_set_error (error,
+                      G_TYPELIB_ERROR,
+                      G_TYPELIB_ERROR_INVALID_BLOB,
+                      "Invalid prerequisite index");
+         return FALSE;
+       }
+
+      entry = g_typelib_get_dir_entry (typelib, req);
+      if (entry->blob_type != BLOB_TYPE_INTERFACE &&
+         entry->blob_type != BLOB_TYPE_OBJECT &&
+         (entry->local || entry->blob_type != 0))
+       {
+         g_set_error (error,
+                      G_TYPELIB_ERROR,
+                      G_TYPELIB_ERROR_INVALID_BLOB,
+                      "Not an interface or object");
+         return FALSE;
+       }
+    }
+
+  offset2 += 2 * (blob->n_prerequisites % 2);
+
+  push_context (ctx, get_string_nofail (typelib, blob->name));
+
+  for (i = 0; i < blob->n_properties; i++, offset2 += sizeof (PropertyBlob))
+    {
+      if (!validate_property_blob (typelib, offset2, error))
+       return FALSE;
+    }
+
+  for (i = 0; i < blob->n_methods; i++, offset2 += sizeof (FunctionBlob))
+    {
+      if (!validate_function_blob (ctx, offset2, BLOB_TYPE_INTERFACE, error))
+       return FALSE;
+    }
+
+  for (i = 0; i < blob->n_signals; i++, offset2 += sizeof (SignalBlob))
+    {
+      if (!validate_signal_blob (typelib, offset2, offset, error))
+       return FALSE;
+    }
+
+  for (i = 0; i < blob->n_vfuncs; i++, offset2 += sizeof (VFuncBlob))
+    {
+      if (!validate_vfunc_blob (typelib, offset2, offset, error))
+       return FALSE;
+    }
+
+  for (i = 0; i < blob->n_constants; i++, offset2 += sizeof (ConstantBlob))
+    {
+      if (!validate_constant_blob (typelib, offset2, error))
+       return FALSE;
+    }
+
+  pop_context (ctx);
+
+  return TRUE;
+}
+
+static gboolean
+validate_union_blob (GITypelib     *typelib,
+                    guint32        offset,
+                    GError       **error)
+{
+  return TRUE;
+}
+
+static gboolean
+validate_blob (ValidateContext *ctx,
+              guint32          offset,
+              GError         **error)
+{
+  GITypelib *typelib = ctx->typelib;
+  CommonBlob *common;
+
+  if (typelib->len < offset + sizeof (CommonBlob))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "The buffer is too short");
+      return FALSE;
+    }
+
+  common = (CommonBlob*)&typelib->data[offset];
+
+  switch (common->blob_type)
+    {
+    case BLOB_TYPE_FUNCTION:
+      if (!validate_function_blob (ctx, offset, 0, error))
+       return FALSE;
+      break;
+    case BLOB_TYPE_CALLBACK:
+      if (!validate_callback_blob (ctx, offset, error))
+       return FALSE;
+      break;
+    case BLOB_TYPE_STRUCT:
+    case BLOB_TYPE_BOXED:
+      if (!validate_struct_blob (ctx, offset, common->blob_type, error))
+       return FALSE;
+      break;
+    case BLOB_TYPE_ENUM:
+    case BLOB_TYPE_FLAGS:
+      if (!validate_enum_blob (ctx, offset, common->blob_type, error))
+       return FALSE;
+      break;
+    case BLOB_TYPE_OBJECT:
+      if (!validate_object_blob (ctx, offset, error))
+       return FALSE;
+      break;
+    case BLOB_TYPE_INTERFACE:
+      if (!validate_interface_blob (ctx, offset, error))
+       return FALSE;
+      break;
+    case BLOB_TYPE_CONSTANT:
+      if (!validate_constant_blob (typelib, offset, error))
+       return FALSE;
+      break;
+    case BLOB_TYPE_UNION:
+      if (!validate_union_blob (typelib, offset, error))
+       return FALSE;
+      break;
+    default:
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID_ENTRY,
+                  "Invalid blob type");
+      return FALSE;
+    }
+
+  return TRUE;
+}
+
+static gboolean
+validate_directory (ValidateContext   *ctx,
+                   GError            **error)
+{
+  GITypelib *typelib = ctx->typelib;
+  Header *header = (Header *)typelib->data;
+  DirEntry *entry;
+  gint i;
+
+  if (typelib->len < header->directory + header->n_entries * sizeof (DirEntry))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "The buffer is too short");
+      return FALSE;
+    }
+
+  for (i = 0; i < header->n_entries; i++)
+    {
+      entry = g_typelib_get_dir_entry (typelib, i + 1);
+
+      if (!validate_name (typelib, "entry", typelib->data, entry->name, error))
+       return FALSE;
+
+      if ((entry->local && entry->blob_type == BLOB_TYPE_INVALID) ||
+         entry->blob_type > BLOB_TYPE_UNION)
+       {
+         g_set_error (error,
+                      G_TYPELIB_ERROR,
+                      G_TYPELIB_ERROR_INVALID_DIRECTORY,
+                      "Invalid entry type");
+         return FALSE;
+       }
+
+      if (i < header->n_local_entries)
+       {
+         if (!entry->local)
+           {
+             g_set_error (error,
+                          G_TYPELIB_ERROR,
+                          G_TYPELIB_ERROR_INVALID_DIRECTORY,
+                          "Too few local directory entries");
+             return FALSE;
+           }
+
+         if (!is_aligned (entry->offset))
+           {
+             g_set_error (error,
+                          G_TYPELIB_ERROR,
+                          G_TYPELIB_ERROR_INVALID_DIRECTORY,
+                          "Misaligned entry");
+             return FALSE;
+           }
+
+         if (!validate_blob (ctx, entry->offset, error))
+           return FALSE;
+       }
+      else
+       {
+         if (entry->local)
+           {
+             g_set_error (error,
+                          G_TYPELIB_ERROR,
+                          G_TYPELIB_ERROR_INVALID_DIRECTORY,
+                          "Too many local directory entries");
+             return FALSE;
+           }
+
+         if (!validate_name (typelib, "namespace", typelib->data, entry->offset, error))
+           return FALSE;
+       }
+    }
+
+  return TRUE;
+}
+
+static gboolean
+validate_attributes (ValidateContext *ctx,
+                    GError       **error)
+{
+  GITypelib *typelib = ctx->typelib;
+  Header *header = (Header *)typelib->data;
+
+  if (header->size < header->attributes + header->n_attributes * sizeof (AttributeBlob))
+    {
+      g_set_error (error,
+                  G_TYPELIB_ERROR,
+                  G_TYPELIB_ERROR_INVALID,
+                  "The buffer is too short");
+      return FALSE;
+    }
+
+  return TRUE;
+}
+
+static void
+prefix_with_context (GError **error,
+                    const char *section,
+                    ValidateContext *ctx)
+{
+  GString *str = g_string_new (NULL);
+  GSList *link;
+  char *buf;
+
+  link = ctx->context_stack;
+  if (!link)
+    {
+      g_prefix_error (error, "In %s:", section);
+      return;
+    }
+
+  for (; link; link = link->next)
+    {
+      g_string_append (str, link->data);
+      if (link->next)
+       g_string_append_c (str, '/');
+    }
+  g_string_append_c (str, ')');
+  buf = g_string_free (str, FALSE);
+  g_prefix_error (error, "In %s (Context: %s): ", section, buf);
+  g_free (buf);
+}
+
+gboolean
+g_typelib_validate (GITypelib     *typelib,
+                    GError       **error)
+{
+  ValidateContext ctx;
+  ctx.typelib = typelib;
+  ctx.context_stack = NULL;
+
+  if (!validate_header (&ctx, error))
+    {
+      prefix_with_context (error, "In header", &ctx);
+      return FALSE;
+    }
+
+  if (!validate_directory (&ctx, error))
+    {
+      prefix_with_context (error, "directory", &ctx);
+      return FALSE;
+    }
+
+  if (!validate_attributes (&ctx, error))
+    {
+      prefix_with_context (error, "attributes", &ctx);
+      return FALSE;
+    }
+
+  return TRUE;
+}
+
+GQuark
+g_typelib_error_quark (void)
+{
+  static GQuark quark = 0;
+  if (quark == 0)
+    quark = g_quark_from_static_string ("g-typelib-error-quark");
+  return quark;
+}
+
+static void
+_g_typelib_do_dlopen (GITypelib *typelib)
+{
+  Header *header;
+  const char *shlib_str;
+
+  header = (Header *) typelib->data;
+  /* note that NULL shlib means to open the main app, which is allowed */
+  if (header->shared_library)
+    shlib_str = g_typelib_get_string (typelib, header->shared_library);
+  else
+    shlib_str = NULL;
+
+  if (shlib_str != NULL && shlib_str[0] != '\0')
+    {
+      gchar **shlibs;
+      gint i;
+
+      /* shared-library is a comma-separated list of libraries */
+      shlibs = g_strsplit (shlib_str, ",", 0);
+
+       /* We load all passed libs unconditionally as if the same library is loaded
+        * again with g_module_open(), the same file handle will be returned. See bug:
+        * http://bugzilla.gnome.org/show_bug.cgi?id=555294
+        */
+      for (i = 0; shlibs[i]; i++)
+        {
+          GModule *module;
+
+          /* Glade's autoconnect feature and OpenGL's extension mechanism
+           * as used by Clutter rely on g_module_open(NULL) to work as a means of
+           * accessing the app's symbols. This keeps us from using
+           * G_MODULE_BIND_LOCAL. BIND_LOCAL may have other issues as well;
+           * in general libraries are not expecting multiple copies of
+           * themselves and are not expecting to be unloaded. So we just
+           * load modules globally for now.
+           */
+
+          module = g_module_open (shlibs[i], G_MODULE_BIND_LAZY);
+
+          if (module == NULL)
+            {
+              GString *shlib_full = g_string_new (shlibs[i]);
+
+              module = g_module_open (shlib_full->str, G_MODULE_BIND_LAZY);
+              if (module == NULL)
+                {
+                  g_string_overwrite (shlib_full, strlen (shlib_full->str)-2, SHLIB_SUFFIX);
+                  module = g_module_open (shlib_full->str, G_MODULE_BIND_LAZY);
+                }
+
+              g_string_free (shlib_full, TRUE);
+            }
+
+          if (module == NULL)
+            {
+              g_warning ("Failed to load shared library '%s' referenced by the typelib: %s",
+                         shlibs[i], g_module_error ());
+            }
+          else
+            {
+              typelib->modules = g_list_append (typelib->modules, module);
+            }
+       }
+
+      g_strfreev (shlibs);
+    }
+  else
+    {
+      /* If there's no shared-library entry for this module, assume that
+       * the module is for the application.  Some of the hand-written .gir files
+       * in gobject-introspection don't have shared-library entries, but no one
+       * is really going to be calling g_module_symbol on them either.
+       */
+      GModule *module = g_module_open (NULL, 0);
+      if (module == NULL)
+        g_warning ("gtypelib.c: Failed to g_module_open (NULL): %s", g_module_error ());
+      else
+        typelib->modules = g_list_prepend (typelib->modules, module);
+    }
+}
+
+static inline void
+_g_typelib_ensure_open (GITypelib *typelib)
+{
+  if (typelib->open_attempted)
+    return;
+  typelib->open_attempted = TRUE;
+  _g_typelib_do_dlopen (typelib);
+}
+
+/**
+ * g_typelib_new_from_memory: (skip)
+ * @memory: address of memory chunk containing the typelib
+ * @len: length of memory chunk containing the typelib
+ * @error: a #GError
+ *
+ * Creates a new #GITypelib from a memory location.  The memory block
+ * pointed to by @typelib will be automatically g_free()d when the
+ * repository is destroyed.
+ *
+ * Return value: the new #GITypelib
+ **/
+GITypelib *
+g_typelib_new_from_memory (guint8  *memory, 
+                          gsize    len,
+                          GError **error)
+{
+  GITypelib *meta;
+
+  if (!validate_header_basic (memory, len, error))
+    return NULL;
+
+  meta = g_slice_new0 (GITypelib);
+  meta->data = memory;
+  meta->len = len;
+  meta->owns_memory = TRUE;
+  meta->modules = NULL;
+
+  return meta;
+}
+
+/**
+ * g_typelib_new_from_const_memory: (skip)
+ * @memory: address of memory chunk containing the typelib
+ * @len: length of memory chunk containing the typelib
+ * @error: A #GError
+ *
+ * Creates a new #GITypelib from a memory location.
+ *
+ * Return value: the new #GITypelib
+ **/
+GITypelib *
+g_typelib_new_from_const_memory (const guchar *memory, 
+                                gsize         len,
+                                GError      **error)
+{
+  GITypelib *meta;
+
+  if (!validate_header_basic (memory, len, error))
+    return NULL;
+
+  meta = g_slice_new0 (GITypelib);
+  meta->data = (guchar *) memory;
+  meta->len = len;
+  meta->owns_memory = FALSE;
+  meta->modules = NULL;
+
+  return meta;
+}
+
+/**
+ * g_typelib_new_from_mapped_file: (skip)
+ * @mfile: a #GMappedFile, that will be free'd when the repository is destroyed
+ * @error: a #GError
+ *
+ * Creates a new #GITypelib from a #GMappedFile.
+ *
+ * Return value: the new #GITypelib
+ **/
+GITypelib *
+g_typelib_new_from_mapped_file (GMappedFile  *mfile,
+                               GError      **error)
+{
+  GITypelib *meta;
+  guint8 *data = (guint8 *) g_mapped_file_get_contents (mfile);
+  gsize len = g_mapped_file_get_length (mfile);
+
+  if (!validate_header_basic (data, len, error))
+    return NULL;
+
+  meta = g_slice_new0 (GITypelib);
+  meta->mfile = mfile;
+  meta->owns_memory = FALSE;
+  meta->data = data; 
+  meta->len = len;
+
+  return meta;
+}
+
+/**
+ * g_typelib_free:
+ * @typelib: a #GITypelib
+ *
+ * Free a #GITypelib.
+ **/
+void
+g_typelib_free (GITypelib *typelib)
+{
+  if (typelib->mfile)
+    g_mapped_file_unref (typelib->mfile);
+  else
+    if (typelib->owns_memory)
+      g_free (typelib->data);
+  if (typelib->modules)
+    {
+      g_list_foreach (typelib->modules, (GFunc) g_module_close, NULL);
+      g_list_free (typelib->modules);
+    }
+  g_slice_free (GITypelib, typelib);
+}
+
+const gchar *
+g_typelib_get_namespace (GITypelib *typelib)
+{
+  return g_typelib_get_string (typelib, ((Header *) typelib->data)->namespace);
+}
+
+/**
+ * g_typelib_symbol:
+ * @typelib: the typelib
+ * @symbol_name: name of symbol to be loaded
+ * @symbol: returns a pointer to the symbol value
+ *
+ * Loads a symbol from #GITypelib.
+ *
+ * Return value: #TRUE on success
+ **/
+gboolean
+g_typelib_symbol (GITypelib *typelib, const char *symbol_name, gpointer *symbol)
+{
+  GList *l;
+
+  _g_typelib_ensure_open (typelib);
+
+  /*
+   * The reason for having multiple modules dates from gir-repository
+   * when it was desired to inject code (accessors, etc.) into an
+   * existing library.  In that situation, the first module listed
+   * will be the custom one, which overrides the main one.  A bit
+   * inefficient, but the problem will go away when gir-repository
+   * does.
+   *
+   * For modules with no shared library, we dlopen'd the current
+   * process above.
+   */
+  for (l = typelib->modules; l; l = l->next)
+    {
+      GModule *module = l->data;
+
+      if (g_module_symbol (module, symbol_name, symbol))
+        return TRUE;
+    }
+
+  return FALSE;
+}
diff --git a/girepository/gitypelib.h b/girepository/gitypelib.h
new file mode 100644 (file)
index 0000000..52c5c40
--- /dev/null
@@ -0,0 +1,55 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Public typelib API
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#ifndef __GITYPELIB_H__
+#define __GITYPELIB_H__
+
+#if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
+#error "Only <girepository.h> can be included directly."
+#endif
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+typedef struct _GITypelib GITypelib;
+
+GITypelib *    g_typelib_new_from_memory       (guint8        *memory,
+                                               gsize          len,
+                                              GError       **error);
+GITypelib *    g_typelib_new_from_const_memory (const guint8  *memory,
+                                               gsize          len,
+                                              GError       **error);
+GITypelib *    g_typelib_new_from_mapped_file  (GMappedFile   *mfile,
+                                              GError       **error);
+void          g_typelib_free                  (GITypelib     *typelib);
+
+gboolean      g_typelib_symbol                (GITypelib     *typelib,
+                                               const gchar  *symbol_name,
+                                               gpointer     *symbol);
+const gchar * g_typelib_get_namespace         (GITypelib     *typelib);
+
+
+G_END_DECLS
+
+#endif  /* __GITYPELIB_H__ */
+
diff --git a/girepository/gitypes.h b/girepository/gitypes.h
new file mode 100644 (file)
index 0000000..486f20a
--- /dev/null
@@ -0,0 +1,449 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: types
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#ifndef __GITYPES_H__
+#define __GITYPES_H__
+
+#if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
+#error "Only <girepository.h> can be included directly."
+#endif
+
+G_BEGIN_DECLS
+
+typedef struct _GIBaseInfoStub GIBaseInfo;
+
+/**
+ * GICallableInfo:
+ *
+ * Represents a callable, either #GIFunctionInfo, #GICallbackInfo or
+ * #GIVFuncInfo.
+ */
+typedef GIBaseInfo GICallableInfo;
+
+/**
+ * GIFunctionInfo:
+ *
+ * Represents a function, eg arguments and return value.
+ */
+typedef GIBaseInfo GIFunctionInfo;
+
+/**
+ * GICallbackInfo:
+ *
+ * Represents a callback, eg arguments and return value.
+ */
+typedef GIBaseInfo GICallbackInfo;
+
+/**
+ * GIRegisteredTypeInfo:
+ *
+ * Represent a registered type.
+ */
+typedef GIBaseInfo GIRegisteredTypeInfo;
+
+/**
+ * GIStructInfo:
+ *
+ * Represents a struct.
+ */
+typedef GIBaseInfo GIStructInfo;
+
+/**
+ * GIUnionInfo:
+ *
+ * Represents a union.
+ */
+typedef GIBaseInfo GIUnionInfo;
+
+/**
+ * GIEnumInfo:
+ *
+ * Represents an enum or a flag.
+ */
+typedef GIBaseInfo GIEnumInfo;
+
+/**
+ * GIObjectInfo:
+ *
+ * Represents an object.
+ */
+typedef GIBaseInfo GIObjectInfo;
+
+/**
+ * GIInterfaceInfo:
+ *
+ * Represents an interface.
+ */
+typedef GIBaseInfo GIInterfaceInfo;
+
+/**
+ * GIConstantInfo:
+ *
+ * Represents a constant.
+ */
+typedef GIBaseInfo GIConstantInfo;
+
+/**
+ * GIValueInfo:
+ *
+ * Represents a enum value of a #GIEnumInfo.
+ */
+typedef GIBaseInfo GIValueInfo;
+
+/**
+ * GISignalInfo:
+ *
+ * Represents a signal.
+ */
+typedef GIBaseInfo GISignalInfo;
+
+/**
+ * GIVFuncInfo
+ *
+ * Represents a virtual function.
+ */
+typedef GIBaseInfo GIVFuncInfo;
+
+/**
+ * GIPropertyInfo:
+ *
+ * Represents a property of a #GIObjectInfo or a #GIInterfaceInfo.
+ */
+typedef GIBaseInfo GIPropertyInfo;
+
+/**
+ * GIFieldInfo:
+ *
+ * Represents a field of a #GIStructInfo or a #GIUnionInfo.
+ */
+typedef GIBaseInfo GIFieldInfo;
+
+/**
+ * GIArgInfo:
+ *
+ * Represents an argument.
+ */
+typedef GIBaseInfo GIArgInfo;
+
+/**
+ * GITypeInfo:
+ *
+ * Represents type information, direction, transfer etc.
+ */
+typedef GIBaseInfo GITypeInfo;
+
+/**
+ * GIUnresolvedInfo:
+ *
+ * Represents a unresolved type in a typelib.
+ */
+typedef struct _GIUnresolvedInfo GIUnresolvedInfo;
+
+union _GIArgument
+{
+  gboolean v_boolean;
+  gint8    v_int8;
+  guint8   v_uint8;
+  gint16   v_int16;
+  guint16  v_uint16;
+  gint32   v_int32;
+  guint32  v_uint32;
+  gint64   v_int64;
+  guint64  v_uint64;
+  gfloat   v_float;
+  gdouble  v_double;
+  gshort   v_short;
+  gushort  v_ushort;
+  gint     v_int;
+  guint    v_uint;
+  glong    v_long;
+  gulong   v_ulong;
+  gssize   v_ssize;
+  gsize    v_size;
+  gchar *  v_string;
+  gpointer v_pointer;
+};
+typedef union _GIArgument GIArgument;
+
+/**
+ * GIInfoType:
+ * @GI_INFO_TYPE_INVALID: invalid type
+ * @GI_INFO_TYPE_FUNCTION: function, see #GIFunctionInfo
+ * @GI_INFO_TYPE_CALLBACK: callback, see #GIFunctionInfo
+ * @GI_INFO_TYPE_STRUCT: struct, see #GIStructInfo
+ * @GI_INFO_TYPE_BOXED: boxed, see #GIStructInfo or #GIUnionInfo
+ * @GI_INFO_TYPE_ENUM: enum, see #GIEnumInfo
+ * @GI_INFO_TYPE_FLAGS: flags, see #GIEnumInfo
+ * @GI_INFO_TYPE_OBJECT: object, see #GIObjectInfo
+ * @GI_INFO_TYPE_INTERFACE: interface, see #GIInterfaceInfo
+ * @GI_INFO_TYPE_CONSTANT: contant, see #GIConstantInfo
+ * @GI_INFO_TYPE_UNION: union, see #GIUnionInfo
+ * @GI_INFO_TYPE_VALUE: enum value, see #GIValueInfo
+ * @GI_INFO_TYPE_SIGNAL: signal, see #GISignalInfo
+ * @GI_INFO_TYPE_VFUNC: virtual function, see #GIVFuncInfo
+ * @GI_INFO_TYPE_PROPERTY: GObject property, see #GIPropertyInfo
+ * @GI_INFO_TYPE_FIELD: struct or union field, see #GIFieldInfo
+ * @GI_INFO_TYPE_ARG: argument of a function or callback, see #GIArgInfo
+ * @GI_INFO_TYPE_TYPE: type information, see #GITypeInfo
+ * @GI_INFO_TYPE_UNRESOLVED: unresolved type, a type which is not present in
+ * the typelib, or any of its dependencies.
+ *
+ * The type of a GIBaseInfo struct.
+ */
+typedef enum
+{
+  GI_INFO_TYPE_INVALID,
+  GI_INFO_TYPE_FUNCTION,
+  GI_INFO_TYPE_CALLBACK,
+  GI_INFO_TYPE_STRUCT,
+  GI_INFO_TYPE_BOXED,
+  GI_INFO_TYPE_ENUM,         /*  5 */
+  GI_INFO_TYPE_FLAGS,
+  GI_INFO_TYPE_OBJECT,
+  GI_INFO_TYPE_INTERFACE,
+  GI_INFO_TYPE_CONSTANT,
+  GI_INFO_TYPE_INVALID_0,    /* 10 */  /** DELETED - used to be ERROR_DOMAIN **/
+  GI_INFO_TYPE_UNION,
+  GI_INFO_TYPE_VALUE,
+  GI_INFO_TYPE_SIGNAL,
+  GI_INFO_TYPE_VFUNC,
+  GI_INFO_TYPE_PROPERTY,     /* 15 */
+  GI_INFO_TYPE_FIELD,
+  GI_INFO_TYPE_ARG,
+  GI_INFO_TYPE_TYPE,
+  GI_INFO_TYPE_UNRESOLVED
+} GIInfoType;
+
+/**
+ * GITransfer:
+ * @GI_TRANSFER_NOTHING: transfer nothing from the callee (function or the type
+ * instance the property belongs to) to the caller. The callee retains the
+ * ownership of the transfer and the caller doesn't need to do anything to free
+ * up the resources of this transfer.
+ * @GI_TRANSFER_CONTAINER: transfer the container (list, array, hash table) from
+ * the callee to the caller. The callee retains the ownership of the individual
+ * items in the container and the caller has to free up the container resources
+ * (g_list_free()/g_hash_table_destroy() etc) of this transfer.
+ * @GI_TRANSFER_EVERYTHING: transfer everything, eg the container and its
+ * contents from the callee to the caller. This is the case when the callee
+ * creates a copy of all the data it returns. The caller is responsible for
+ * cleaning up the container and item resources of this transfer.
+ *
+ * The transfer is the exchange of data between two parts, from the callee to
+ * the caller. The callee is either a function/method/signal or an
+ * object/interface where a property is defined. The caller is the side
+ * accessing a property or calling a function.
+ * #GITransfer specifies who's responsible for freeing the resources after the
+ * ownership transfer is complete. In case of a containing type such as a list,
+ * an array or a hash table the container itself is specified differently from
+ * the items within the container itself. Each container is freed differently,
+ * check the documentation for the types themselves for information on how to
+ * free them.
+ */
+typedef enum {
+  GI_TRANSFER_NOTHING,
+  GI_TRANSFER_CONTAINER,
+  GI_TRANSFER_EVERYTHING
+} GITransfer;
+
+/**
+ * GIDirection:
+ * @GI_DIRECTION_IN: in argument.
+ * @GI_DIRECTION_OUT: out argument.
+ * @GI_DIRECTION_INOUT: in and out argument.
+ *
+ * The direction of a #GIArgInfo.
+ */
+typedef enum  {
+  GI_DIRECTION_IN,
+  GI_DIRECTION_OUT,
+  GI_DIRECTION_INOUT
+} GIDirection;
+
+/**
+ * GIScopeType:
+ * @GI_SCOPE_TYPE_INVALID: The argument is not of callback type.
+ * @GI_SCOPE_TYPE_CALL: The callback and associated user_data is only
+ * used during the call to this function.
+ * @GI_SCOPE_TYPE_ASYNC: The callback and associated user_data is
+ * only used until the callback is invoked, and the callback.
+ * is invoked always exactly once.
+ * @GI_SCOPE_TYPE_NOTIFIED: The callback and and associated
+ * user_data is used until the caller is notfied via the destroy_notify.
+ *
+ * Scope type of a #GIArgInfo representing callback, determines how the
+ * callback is invoked and is used to decided when the invoke structs
+ * can be freed.
+ */
+typedef enum {
+  GI_SCOPE_TYPE_INVALID,
+  GI_SCOPE_TYPE_CALL,
+  GI_SCOPE_TYPE_ASYNC,
+  GI_SCOPE_TYPE_NOTIFIED
+} GIScopeType;
+
+/**
+ * GITypeTag:
+ * @GI_TYPE_TAG_VOID: void
+ * @GI_TYPE_TAG_BOOLEAN: boolean
+ * @GI_TYPE_TAG_INT8: 8-bit signed integer
+ * @GI_TYPE_TAG_UINT8: 8-bit unsigned integer
+ * @GI_TYPE_TAG_INT16: 16-bit signed integer
+ * @GI_TYPE_TAG_UINT16: 16-bit unsigned integer
+ * @GI_TYPE_TAG_INT32: 32-bit signed integer
+ * @GI_TYPE_TAG_UINT32: 32-bit unsigned integer
+ * @GI_TYPE_TAG_INT64: 64-bit signed integer
+ * @GI_TYPE_TAG_UINT64: 64-bit unsigned integer
+ * @GI_TYPE_TAG_FLOAT: float
+ * @GI_TYPE_TAG_DOUBLE: double floating point
+ * @GI_TYPE_TAG_UNICHAR: Unicode character
+ * @GI_TYPE_TAG_GTYPE: a #GType
+ * @GI_TYPE_TAG_UTF8: a UTF-8 encoded string
+ * @GI_TYPE_TAG_FILENAME: a filename, encoded in the same encoding
+ * as the native filesystem is using.
+ * @GI_TYPE_TAG_ARRAY: an array
+ * @GI_TYPE_TAG_INTERFACE: an extended interface object
+ * @GI_TYPE_TAG_GLIST: a #GList
+ * @GI_TYPE_TAG_GSLIST: a #GSList
+ * @GI_TYPE_TAG_GHASH: a #GHashTable
+ * @GI_TYPE_TAG_ERROR: a #GError
+ *
+ * The type tag of a #GITypeInfo.
+ */
+typedef enum {
+  /* Basic types */
+  GI_TYPE_TAG_VOID      =  0,
+  GI_TYPE_TAG_BOOLEAN   =  1,
+  GI_TYPE_TAG_INT8      =  2,
+  GI_TYPE_TAG_UINT8     =  3,
+  GI_TYPE_TAG_INT16     =  4,
+  GI_TYPE_TAG_UINT16    =  5,
+  GI_TYPE_TAG_INT32     =  6,
+  GI_TYPE_TAG_UINT32    =  7,
+  GI_TYPE_TAG_INT64     =  8,
+  GI_TYPE_TAG_UINT64    =  9,
+  GI_TYPE_TAG_FLOAT     = 10,
+  GI_TYPE_TAG_DOUBLE    = 11,
+  GI_TYPE_TAG_GTYPE     = 12,
+  GI_TYPE_TAG_UTF8      = 13,
+  GI_TYPE_TAG_FILENAME  = 14,
+  /* Non-basic types; compare with G_TYPE_TAG_IS_BASIC */
+  GI_TYPE_TAG_ARRAY     = 15,
+  GI_TYPE_TAG_INTERFACE = 16,
+  GI_TYPE_TAG_GLIST     = 17,
+  GI_TYPE_TAG_GSLIST    = 18,
+  GI_TYPE_TAG_GHASH     = 19,
+  GI_TYPE_TAG_ERROR     = 20,
+  /* Another basic type */
+  GI_TYPE_TAG_UNICHAR   = 21
+  /* Note - there is only room currently for 32 tags.
+   * See docs/typelib-format.txt SimpleTypeBlob definition */
+} GITypeTag;
+
+#define GI_TYPE_TAG_N_TYPES (GI_TYPE_TAG_UNICHAR+1)
+
+/* These were removed and no longer appear in the typelib;
+ * instead, the machine-specific versions like INT32 are
+ * always used.
+ */
+#define GI_TYPE_TAG_SHORT GI_TYPE_TAG_SHORT_WAS_REMOVED
+#define GI_TYPE_TAG_INT   GI_TYPE_TAG_INT_WAS_REMOVED
+#define GI_TYPE_TAG_LONG  GI_TYPE_TAG_LONG_WAS_REMOVED
+
+/**
+ * GIArrayType:
+ * @GI_ARRAY_TYPE_C: a C array, char[] for instance
+ * @GI_ARRAY_TYPE_ARRAY: a @GArray array
+ * @GI_ARRAY_TYPE_PTR_ARRAY: a #GPtrArray array
+ * @GI_ARRAY_TYPE_BYTE_ARRAY: a #GByteArray array
+ *
+ * The type of array in a #GITypeInfo.
+ */
+typedef enum {
+  GI_ARRAY_TYPE_C,
+  GI_ARRAY_TYPE_ARRAY,
+  GI_ARRAY_TYPE_PTR_ARRAY,
+  GI_ARRAY_TYPE_BYTE_ARRAY
+} GIArrayType;
+
+/**
+ * GIFieldInfoFlags:
+ * @GI_FIELD_IS_READABLE: field is readable.
+ * @GI_FIELD_IS_WRITABLE: field is writable.
+ *
+ * Flags for a #GIFieldInfo.
+ */
+
+typedef enum
+{
+  GI_FIELD_IS_READABLE = 1 << 0,
+  GI_FIELD_IS_WRITABLE = 1 << 1
+} GIFieldInfoFlags;
+
+/**
+ * GIVFuncInfoFlags:
+ * @GI_VFUNC_MUST_CHAIN_UP: chains up to the parent type
+ * @GI_VFUNC_MUST_OVERRIDE: overrides
+ * @GI_VFUNC_MUST_NOT_OVERRIDE: does not override
+ * @GI_VFUNC_THROWS: Includes a #GError
+ *
+ * Flags of a #GIVFuncInfo struct.
+ */
+typedef enum
+{
+  GI_VFUNC_MUST_CHAIN_UP     = 1 << 0,
+  GI_VFUNC_MUST_OVERRIDE     = 1 << 1,
+  GI_VFUNC_MUST_NOT_OVERRIDE = 1 << 2,
+  GI_VFUNC_THROWS =            1 << 3
+} GIVFuncInfoFlags;
+
+/**
+ * GIFunctionInfoFlags:
+ * @GI_FUNCTION_IS_METHOD: is a method.
+ * @GI_FUNCTION_IS_CONSTRUCTOR: is a constructor.
+ * @GI_FUNCTION_IS_GETTER: is a getter of a #GIPropertyInfo.
+ * @GI_FUNCTION_IS_SETTER: is a setter of a #GIPropertyInfo.
+ * @GI_FUNCTION_WRAPS_VFUNC: represents a virtual function.
+ * @GI_FUNCTION_THROWS: the function may throw an error.
+ *
+ * Flags for a #GIFunctionInfo struct.
+ */
+typedef enum
+{
+  GI_FUNCTION_IS_METHOD      = 1 << 0,
+  GI_FUNCTION_IS_CONSTRUCTOR = 1 << 1,
+  GI_FUNCTION_IS_GETTER      = 1 << 2,
+  GI_FUNCTION_IS_SETTER      = 1 << 3,
+  GI_FUNCTION_WRAPS_VFUNC    = 1 << 4,
+  GI_FUNCTION_THROWS         = 1 << 5
+} GIFunctionInfoFlags;
+
+#ifndef __GI_SCANNER__
+/* backwards compatibility */
+typedef union _GIArgument GArgument;
+typedef struct _GITypelib GTypelib;
+#endif
+
+G_END_DECLS
+
+#endif  /* __GITYPES_H__ */
+
diff --git a/girepository/giunioninfo.c b/girepository/giunioninfo.c
new file mode 100644 (file)
index 0000000..95b7112
--- /dev/null
@@ -0,0 +1,276 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Union implementation
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#include <glib.h>
+
+#include <girepository.h>
+#include "girepository-private.h"
+#include "gitypelib-internal.h"
+
+/**
+ * SECTION:giunioninfo
+ * @Short_description: Struct representing a union.
+ * @Title: GIUnionInfo
+ *
+ * GIUnionInfo represents a union type.
+ *
+ * A union has methods and fields.  Unions can optionally have a
+ * discriminator, which is a field deciding what type of real union
+ * fields is valid for specified instance.
+ *
+ * <refsect1 id="gi-giobjectinfo.struct-hierarchy" role="struct_hierarchy">
+ * <title role="struct_hierarchy.title">Struct hierarchy</title>
+ * <synopsis>
+ *   <link linkend="gi-GIBaseInfo">GIBaseInfo</link>
+ *    +----<link linkend="gi-GIRegisteredTypeInfo">GIRegisteredTypeInfo</link>
+ *          +----GIUnionInfo
+ * </synopsis>
+ * </refsect1>
+ */
+
+/**
+ * g_union_info_get_n_fields:
+ * @info: a #GIUnionInfo
+ *
+ * Obtain the number of fields this union has.
+ *
+ * Returns: number of fields
+ */
+gint
+g_union_info_get_n_fields  (GIUnionInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  UnionBlob *blob = (UnionBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->n_fields;
+}
+
+/**
+ * g_union_info_get_field:
+ * @info: a #GIUnionInfo
+ * @n: a field index
+ *
+ * Obtain the type information for field with specified index.
+ *
+ * Returns: (transfer full): the #GIFieldInfo, free it with g_base_info_unref()
+ * when done.
+ */
+GIFieldInfo *
+g_union_info_get_field (GIUnionInfo *info,
+                       gint         n)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  Header *header = (Header *)rinfo->typelib->data;
+
+  return (GIFieldInfo *) g_info_new (GI_INFO_TYPE_FIELD, (GIBaseInfo*)info, rinfo->typelib,
+                                    rinfo->offset + header->union_blob_size +
+                                    n * header->field_blob_size);
+}
+
+/**
+ * g_union_info_get_n_methods:
+ * @info: a #GIUnionInfo
+ *
+ * Obtain the number of methods this union has.
+ *
+ * Returns: number of methods
+ */
+gint
+g_union_info_get_n_methods (GIUnionInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  UnionBlob *blob = (UnionBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->n_functions;
+}
+
+/**
+ * g_union_info_get_method:
+ * @info: a #GIUnionInfo
+ * @n: a method index
+ *
+ * Obtain the type information for method with specified index.
+ *
+ * Returns: (transfer full): the #GIFunctionInfo, free it with g_base_info_unref()
+ * when done.
+ */
+GIFunctionInfo *
+g_union_info_get_method (GIUnionInfo *info,
+                        gint         n)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  UnionBlob *blob = (UnionBlob *)&rinfo->typelib->data[rinfo->offset];
+  Header *header = (Header *)rinfo->typelib->data;
+  gint offset;
+
+  offset = rinfo->offset + header->union_blob_size
+    + blob->n_fields * header->field_blob_size
+    + n * header->function_blob_size;
+  return (GIFunctionInfo *) g_info_new (GI_INFO_TYPE_FUNCTION, (GIBaseInfo*)info,
+                                       rinfo->typelib, offset);
+}
+
+/**
+ * g_union_info_is_discriminated:
+ * @info: a #GIUnionInfo
+ *
+ * Return true if this union contains discriminator field.
+ *
+ * Returns: %TRUE if this is a discriminated union, %FALSE otherwise
+ */
+gboolean
+g_union_info_is_discriminated (GIUnionInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  UnionBlob *blob = (UnionBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->discriminated;
+}
+
+/**
+ * g_union_info_get_discrimintor_offset:
+ * @info: a #GIUnionInfo
+ *
+ * Returns offset of the discriminator field in the structure.
+ *
+ * Returns: (transfer full): offset in bytes of the discriminator
+ */
+gint
+g_union_info_get_discriminator_offset (GIUnionInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  UnionBlob *blob = (UnionBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->discriminator_offset;
+}
+
+/**
+ * g_union_info_get_discriminator_type:
+ * @info: a #GIUnionInfo
+ *
+ * Obtain the type information of the union discriminator.
+ *
+ * Returns: (transfer full): the #GITypeInfo, free it with g_base_info_unref()
+ * when done.
+ */
+GITypeInfo *
+g_union_info_get_discriminator_type (GIUnionInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+
+  return _g_type_info_new ((GIBaseInfo*)info, rinfo->typelib, rinfo->offset + 24);
+}
+
+/**
+ * g_union_info_get_discriminator:
+ * @info: a #GIUnionInfo
+ * @n: a union field index
+ *
+ * Obtain discriminator value assigned for n-th union field, i.e. n-th
+ * union field is the active one if discriminator contains this
+ * constant.
+ *
+ * Returns: (transfer full): the #GIConstantInfo, free it with g_base_info_unref()
+ * when done.
+ */
+GIConstantInfo *
+g_union_info_get_discriminator (GIUnionInfo *info,
+                               gint         n)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  UnionBlob *blob = (UnionBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  if (blob->discriminated)
+    {
+      Header *header = (Header *)rinfo->typelib->data;
+      gint offset;
+
+      offset = rinfo->offset + header->union_blob_size
+       + blob->n_fields * header->field_blob_size
+       + blob->n_functions * header->function_blob_size
+       + n * header->constant_blob_size;
+
+      return (GIConstantInfo *) g_info_new (GI_INFO_TYPE_CONSTANT, (GIBaseInfo*)info,
+                                           rinfo->typelib, offset);
+    }
+
+  return NULL;
+}
+
+/**
+ * g_union_info_find_method:
+ * @info: a #GIUnionInfo
+ * @name: a method name
+ *
+ * Obtain the type information for method named @name.
+ *
+ * Returns: (transfer full): the #GIFunctionInfo, free it with g_base_info_unref()
+ * when done.
+ */
+GIFunctionInfo *
+g_union_info_find_method (GIUnionInfo *info,
+                          const gchar *name)
+{
+  gint offset;
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  Header *header = (Header *)rinfo->typelib->data;
+  UnionBlob *blob = (UnionBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  offset = rinfo->offset + header->union_blob_size
+    + blob->n_fields * header->field_blob_size;
+
+  return _g_base_info_find_method ((GIBaseInfo*)info, offset, blob->n_functions, name);
+}
+
+/**
+ * g_union_info_get_size:
+ * @info: a #GIUnionInfo
+ *
+ * Obtain the total size of the union.
+ *
+ * Returns: size of the union in bytes
+ */
+gsize
+g_union_info_get_size (GIUnionInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  UnionBlob *blob = (UnionBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->size;
+}
+
+/**
+ * g_union_info_get_alignment:
+ * @info: a #GIUnionInfo
+ *
+ * Obtain the required alignment of the union.
+ *
+ * Returns: required alignment in bytes
+ */
+gsize
+g_union_info_get_alignment (GIUnionInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  UnionBlob *blob = (UnionBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->alignment;
+}
diff --git a/girepository/giunioninfo.h b/girepository/giunioninfo.h
new file mode 100644 (file)
index 0000000..83696f7
--- /dev/null
@@ -0,0 +1,57 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Union
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#ifndef __GIUNIONINFO_H__
+#define __GIUNIONINFO_H__
+
+#if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
+#error "Only <girepository.h> can be included directly."
+#endif
+
+#include <gitypes.h>
+
+G_BEGIN_DECLS
+
+#define GI_IS_UNION_INFO(info) \
+    (g_base_info_get_type((GIBaseInfo*)info) ==  GI_INFO_TYPE_UNION)
+
+gint             g_union_info_get_n_fields             (GIUnionInfo *info);
+GIFieldInfo *    g_union_info_get_field                (GIUnionInfo *info,
+                                                       gint         n);
+gint             g_union_info_get_n_methods            (GIUnionInfo *info);
+GIFunctionInfo * g_union_info_get_method               (GIUnionInfo *info,
+                                                       gint         n);
+gboolean         g_union_info_is_discriminated         (GIUnionInfo *info);
+gint             g_union_info_get_discriminator_offset (GIUnionInfo *info);
+GITypeInfo *     g_union_info_get_discriminator_type   (GIUnionInfo *info);
+GIConstantInfo * g_union_info_get_discriminator        (GIUnionInfo *info,
+                                                       gint         n);
+GIFunctionInfo * g_union_info_find_method              (GIUnionInfo *info,
+                                                       const gchar *name);
+gsize            g_union_info_get_size                 (GIUnionInfo *info);
+gsize            g_union_info_get_alignment            (GIUnionInfo *info);
+
+G_END_DECLS
+
+
+#endif  /* __GIUNIONINFO_H__ */
+
diff --git a/girepository/givfuncinfo.c b/girepository/givfuncinfo.c
new file mode 100644 (file)
index 0000000..462521b
--- /dev/null
@@ -0,0 +1,321 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Virtual Function implementation
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#include <string.h>
+
+#include <glib.h>
+
+#include <girepository.h>
+#include "girepository-private.h"
+#include "gitypelib-internal.h"
+
+/**
+ * SECTION:givfuncinfo
+ * @Short_description: Struct representing a virtual function
+ * @Title: GIVFuncInfo
+ *
+ * GIVfuncInfo represents a virtual function. A property belongs to
+ * either a #GIObjectInfo or a #GIInterfaceInfo.
+ *
+ * <refsect1 id="gi-givfuncinfo.struct-hierarchy" role="struct_hierarchy">
+ * <title role="struct_hierarchy.title">Struct hierarchy</title>
+ * <synopsis>
+ *   <link linkend="gi-GIBaseInfo">GIBaseInfo</link>
+ *    +----<link linkend="gi-GICallableInfo">GICallableInfo</link>
+ *          +----<link linkend="gi-GIFunctionInfo">GIFunctionInfo</link>
+ *          +----<link linkend="gi-GISignalInfo">GISignalInfo</link>
+ *          +----GIVFuncInfo
+ * </synopsis>
+ * </refsect1>
+ */
+
+GIVFuncInfo *
+_g_base_info_find_vfunc (GIRealInfo   *rinfo,
+                        guint32       offset,
+                        gint          n_vfuncs,
+                        const gchar  *name)
+{
+  /* FIXME hash */
+  Header *header = (Header *)rinfo->typelib->data;
+  gint i;
+
+  for (i = 0; i < n_vfuncs; i++)
+    {
+      VFuncBlob *fblob = (VFuncBlob *)&rinfo->typelib->data[offset];
+      const gchar *fname = (const gchar *)&rinfo->typelib->data[fblob->name];
+
+      if (strcmp (name, fname) == 0)
+        return (GIVFuncInfo *) g_info_new (GI_INFO_TYPE_VFUNC, (GIBaseInfo*) rinfo,
+                                           rinfo->typelib, offset);
+
+      offset += header->vfunc_blob_size;
+    }
+
+  return NULL;
+}
+
+/**
+ * g_vfunc_info_get_flags:
+ * @info: a #GIVFuncInfo
+ *
+ * Obtain the flags for this virtual function info. See #GIVFuncInfoFlags for
+ * more information about possible flag values.
+ *
+ * Returns: the flags
+ */
+GIVFuncInfoFlags
+g_vfunc_info_get_flags (GIVFuncInfo *info)
+{
+  GIVFuncInfoFlags flags;
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  VFuncBlob *blob;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_VFUNC_INFO (info), 0);
+
+  blob = (VFuncBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  flags = 0;
+
+  if (blob->must_chain_up)
+    flags = flags | GI_VFUNC_MUST_CHAIN_UP;
+
+  if (blob->must_be_implemented)
+    flags = flags | GI_VFUNC_MUST_OVERRIDE;
+
+  if (blob->must_not_be_implemented)
+    flags = flags | GI_VFUNC_MUST_NOT_OVERRIDE;
+
+  if (blob->throws)
+    flags = flags | GI_VFUNC_THROWS;
+
+  return flags;
+}
+
+/**
+ * g_vfunc_info_get_offset:
+ * @info: a #GIVFuncInfo
+ *
+ * Obtain the offset of the function pointer in the class struct. The value
+ * 0xFFFF indicates that the struct offset is unknown.
+ *
+ * Returns: the struct offset or 0xFFFF if it's unknown
+ */
+gint
+g_vfunc_info_get_offset (GIVFuncInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  VFuncBlob *blob;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_VFUNC_INFO (info), 0);
+
+  blob = (VFuncBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  return blob->struct_offset;
+}
+
+/**
+ * g_vfunc_info_get_signal:
+ * @info: a #GIVFuncInfo
+ *
+ * Obtain the signal for the virtual function if one is set.
+ * The signal comes from the object or interface to which
+ * this virtual function belongs.
+ *
+ * Returns: (transfer full): the signal or %NULL if none set
+ */
+GISignalInfo *
+g_vfunc_info_get_signal (GIVFuncInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  VFuncBlob *blob;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_VFUNC_INFO (info), 0);
+
+  blob = (VFuncBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  if (blob->class_closure)
+    return g_interface_info_get_signal ((GIInterfaceInfo *)rinfo->container, blob->signal);
+
+  return NULL;
+}
+
+/**
+ * g_vfunc_info_get_invoker:
+ * @info: a #GIVFuncInfo
+ *
+ * If this virtual function has an associated invoker method, this
+ * method will return it.  An invoker method is a C entry point.
+ *
+ * Not all virtuals will have invokers.
+ *
+ * Returns: (transfer full): the #GIVFuncInfo or %NULL. Free it with
+ * g_base_info_unref() when done.
+ */
+GIFunctionInfo *
+g_vfunc_info_get_invoker (GIVFuncInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  VFuncBlob *blob;
+  GIBaseInfo *container;
+  GIInfoType parent_type;
+
+  g_return_val_if_fail (info != NULL, 0);
+  g_return_val_if_fail (GI_IS_VFUNC_INFO (info), 0);
+
+  blob = (VFuncBlob *)&rinfo->typelib->data[rinfo->offset];
+
+  /* 1023 = 0x3ff is the maximum of the 10 bits for invoker index */
+  if (blob->invoker == 1023)
+    return NULL;
+
+  container = rinfo->container;
+  parent_type = g_base_info_get_type (container);
+  if (parent_type == GI_INFO_TYPE_OBJECT)
+    return g_object_info_get_method ((GIObjectInfo*)container, blob->invoker);
+  else if (parent_type == GI_INFO_TYPE_INTERFACE)
+    return g_interface_info_get_method ((GIInterfaceInfo*)container, blob->invoker);
+  else
+    g_assert_not_reached ();
+}
+
+/**
+ * g_vfunc_info_get_address:
+ * @info: a #GIVFuncInfo
+ * @implementor_gtype: #GType implementing this virtual function
+ * @error: return location for a #GError
+ *
+ * This method will look up where inside the type struct of @implementor_gtype
+ * is the implementation for @info.
+ *
+ * Returns: address to a function or %NULL if an error happened
+ */
+gpointer
+g_vfunc_info_get_address (GIVFuncInfo      *vfunc_info,
+                          GType             implementor_gtype,
+                          GError          **error)
+{
+  GIObjectInfo *object_info;
+  GIStructInfo *struct_info;
+  GIFieldInfo *field_info = NULL;
+  int length, i, offset;
+  gpointer implementor_vtable, func;
+
+  object_info = (GIObjectInfo *) g_base_info_get_container (vfunc_info);
+  struct_info = g_object_info_get_class_struct (object_info);
+
+  length = g_struct_info_get_n_fields (struct_info);
+  for (i = 0; i < length; i++)
+    {
+      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);
+          field_info = NULL;
+          continue;
+      }
+
+      break;
+    }
+
+  if (field_info == NULL)
+    {
+      g_set_error (error,
+                   G_INVOKE_ERROR,
+                   G_INVOKE_ERROR_SYMBOL_NOT_FOUND,
+                   "Couldn't find struct field for this vfunc");
+      return NULL;
+    }
+
+  implementor_vtable = g_type_class_ref (implementor_gtype);
+  offset = g_field_info_get_offset (field_info);
+  func = *(gpointer*) G_STRUCT_MEMBER_P (implementor_vtable, offset);
+  g_type_class_unref (implementor_vtable);
+
+  if (func == NULL)
+    {
+      g_set_error (error,
+                   G_INVOKE_ERROR,
+                   G_INVOKE_ERROR_SYMBOL_NOT_FOUND,
+                   "Class %s doesn't implement %s",
+                   g_type_name (implementor_gtype),
+                   g_base_info_get_name ( (GIBaseInfo*) vfunc_info));
+      return NULL;
+    }
+
+  return func;
+}
+
+/**
+ * g_vfunc_info_invoke: (skip)
+ * @info: a #GIVFuncInfo describing the virtual function to invoke
+ * @implementor: #GType of the type that implements this virtual function
+ * @in_args: an array of #GIArgument<!-- -->s, one for each in
+ *    parameter of @info. If there are no in parameter, @in_args
+ *    can be %NULL
+ * @n_in_args: the length of the @in_args array
+ * @out_args: an array of #GIArgument<!-- -->s, one for each out
+ *    parameter of @info. If there are no out parameters, @out_args
+ *    may be %NULL
+ * @n_out_args: the length of the @out_args array
+ * @return_value: return location for the return value of the
+ *    function. If the function returns void, @return_value may be
+ *    %NULL
+ * @error: return location for detailed error information, or %NULL
+ *
+ * Invokes the function described in @info with the given
+ * arguments. Note that inout parameters must appear in both
+ * argument lists.
+ *
+ * Returns: %TRUE if the function has been invoked, %FALSE if an
+ *   error occurred.
+ */
+gboolean
+g_vfunc_info_invoke (GIVFuncInfo      *info,
+                     GType             implementor,
+                     const GIArgument *in_args,
+                     int               n_in_args,
+                     const GIArgument *out_args,
+                     int               n_out_args,
+                     GIArgument       *return_value,
+                     GError          **error)
+{
+  gpointer func;
+
+  func = g_vfunc_info_get_address (info, implementor, error);
+  if (*error != NULL)
+    return FALSE;
+
+  return g_callable_info_invoke ((GICallableInfo*) info,
+                                 func,
+                                 in_args,
+                                 n_in_args,
+                                 out_args,
+                                 n_out_args,
+                                 return_value,
+                                 TRUE,
+                                 FALSE,
+                                 error);
+}
diff --git a/girepository/givfuncinfo.h b/girepository/givfuncinfo.h
new file mode 100644 (file)
index 0000000..d8a8533
--- /dev/null
@@ -0,0 +1,56 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Virtual Functions
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#ifndef __GIVFUNCINFO_H__
+#define __GIVFUNCINFO_H__
+
+#if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
+#error "Only <girepository.h> can be included directly."
+#endif
+
+#include <gitypes.h>
+
+G_BEGIN_DECLS
+
+#define GI_IS_VFUNC_INFO(info) \
+    (g_base_info_get_type((GIBaseInfo*)info) ==  GI_INFO_TYPE_VFUNC)
+
+GIVFuncInfoFlags  g_vfunc_info_get_flags   (GIVFuncInfo *info);
+gint              g_vfunc_info_get_offset  (GIVFuncInfo *info);
+GISignalInfo *    g_vfunc_info_get_signal  (GIVFuncInfo *info);
+GIFunctionInfo *  g_vfunc_info_get_invoker (GIVFuncInfo *info);
+gpointer          g_vfunc_info_get_address (GIVFuncInfo *info,
+                                            GType        implementor_gtype,
+                                            GError     **error);
+gboolean          g_vfunc_info_invoke      (GIVFuncInfo      *info,
+                                            GType             implementor,
+                                            const GIArgument *in_args,
+                                            int               n_in_args,
+                                            const GIArgument *out_args,
+                                            int               n_out_args,
+                                            GIArgument       *return_value,
+                                            GError          **error);
+
+G_END_DECLS
+
+
+#endif  /* __GIVFUNCINFO_H__ */
diff --git a/girepository/glib-compat.h b/girepository/glib-compat.h
new file mode 100644 (file)
index 0000000..2518092
--- /dev/null
@@ -0,0 +1,25 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Compatibility definitions
+ *
+ * Copyright (C) 2009 Javier Jardón
+ *
+ * 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 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.
+ */
+
+
+#if !GLIB_CHECK_VERSION(2,22,0)
+#define g_mapped_file_unref(x) g_mapped_file_free(x)
+#endif
diff --git a/girepository/gthash-test.c b/girepository/gthash-test.c
new file mode 100644 (file)
index 0000000..7909a0c
--- /dev/null
@@ -0,0 +1,66 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Test typelib hashing
+ *
+ * Copyright (C) 2010 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#include <glib-object.h>
+#include "gitypelib-internal.h"
+
+static void
+test_build_retrieve (void)
+{
+  GITypelibHashBuilder *builder;
+  guint32 bufsize;
+  guint8* buf;
+
+  builder = _gi_typelib_hash_builder_new ();
+
+  _gi_typelib_hash_builder_add_string (builder, "Action", 0);
+  _gi_typelib_hash_builder_add_string (builder, "ZLibDecompressor", 42);
+  _gi_typelib_hash_builder_add_string (builder, "VolumeMonitor", 9);
+  _gi_typelib_hash_builder_add_string (builder, "FileMonitorFlags", 31);
+
+  if (!_gi_typelib_hash_builder_prepare (builder))
+    g_assert_not_reached ();
+
+  bufsize = _gi_typelib_hash_builder_get_buffer_size (builder);
+
+  buf = g_malloc (bufsize);
+
+  _gi_typelib_hash_builder_pack (builder, buf, bufsize);
+
+  _gi_typelib_hash_builder_destroy (builder);
+
+  g_assert (_gi_typelib_hash_search (buf, "Action") == 0);
+  g_assert (_gi_typelib_hash_search (buf, "ZLibDecompressor") == 42);
+  g_assert (_gi_typelib_hash_search (buf, "VolumeMonitor") == 9);
+  g_assert (_gi_typelib_hash_search (buf, "FileMonitorFlags") == 31);
+}
+
+int
+main(int argc, char **argv)
+{
+  g_type_init ();
+  g_test_init (&argc, &argv, NULL);
+
+  g_test_add_func ("/gthash/build-retrieve", test_build_retrieve);
+
+  return g_test_run ();
+}
+
diff --git a/girepository/gthash.c b/girepository/gthash.c
new file mode 100644 (file)
index 0000000..8a35295
--- /dev/null
@@ -0,0 +1,211 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Typelib hashing
+ *
+ * Copyright (C) 2010 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <string.h>
+
+#include "cmph/cmph.h"
+#include "gitypelib-internal.h"
+
+#define ALIGN_VALUE(this, boundary) \
+  (( ((unsigned long)(this)) + (((unsigned long)(boundary)) -1)) & (~(((unsigned long)(boundary))-1)))
+
+/**
+ * String hashing in the typelib.  We have a set of static (fixed) strings,
+ * and given one, we need to find its index number.  This problem is perfect
+ * hashing: http://en.wikipedia.org/wiki/Perfect_hashing
+ *
+ * I chose CMPH (http://cmph.sourceforge.net/) as it seemed high
+ * quality, well documented, and easy to embed.
+ *
+ * CMPH provides a number of algorithms; I chose BDZ, because while CHD
+ * appears to be the "best", the simplicitly of BDZ appealed, and really,
+ * we're only talking about thousands of strings here, not millions, so
+ * a few microseconds is no big deal.
+ *
+ * In memory, the format is:
+ * INT32 mph_size
+ * MPH (mph_size bytes)
+ * (padding for alignment to uint32 if necessary)
+ * INDEX (array of guint16)
+ *
+ * Because BDZ is not order preserving, we need a lookaside table which
+ * maps the hash value into the directory index.
+ */
+
+struct _GITypelibHashBuilder {
+  gboolean prepared;
+  gboolean buildable;
+  cmph_t *c;
+  GHashTable *strings;
+  guint32 dirmap_offset;
+  guint32 packed_size;
+};
+
+GITypelibHashBuilder *
+_gi_typelib_hash_builder_new (void)
+{
+  GITypelibHashBuilder *builder = g_slice_new0 (GITypelibHashBuilder);
+  builder->c = NULL;
+  builder->strings = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+  return builder;
+}
+
+void
+_gi_typelib_hash_builder_add_string (GITypelibHashBuilder *builder,
+                                    const char           *str,
+                                    guint16               value)
+{
+  g_return_if_fail (builder->c == NULL);
+  g_hash_table_insert (builder->strings, g_strdup (str), GUINT_TO_POINTER ((guint) value));
+}
+
+gboolean
+_gi_typelib_hash_builder_prepare (GITypelibHashBuilder *builder)
+{
+  char **strs;
+  GHashTableIter hashiter;
+  gpointer key, value;
+  cmph_io_adapter_t *io;
+  cmph_config_t *config;
+  guint32 num_elts;
+  guint32 offset;
+  guint i;
+
+  if (builder->prepared)
+    return builder->buildable;
+  g_assert (builder->c == NULL);
+
+  num_elts = g_hash_table_size (builder->strings);
+  g_assert (num_elts <= 65536);
+
+  strs = (char**) g_new (char *, num_elts + 1);
+
+  i = 0;
+  g_hash_table_iter_init (&hashiter, builder->strings);
+  while (g_hash_table_iter_next (&hashiter, &key, &value))
+    {
+      const char *str = key;
+
+      strs[i++] = g_strdup (str);
+    }
+  strs[i++] = NULL;
+
+  io = cmph_io_vector_adapter (strs, num_elts);
+  config = cmph_config_new (io);
+  cmph_config_set_algo (config, CMPH_BDZ);
+
+  builder->c = cmph_new (config);
+  builder->prepared = TRUE;
+  if (!builder->c)
+    {
+      builder->buildable = FALSE;
+      goto out;
+    }
+  builder->buildable = TRUE;
+  g_assert (cmph_size (builder->c) == num_elts);
+
+  /* Pack a size counter at front */
+  offset = sizeof(guint32) + cmph_packed_size (builder->c);
+  builder->dirmap_offset = ALIGN_VALUE (offset, 4);
+  builder->packed_size = builder->dirmap_offset + (num_elts * sizeof(guint16));
+ out:
+  return builder->buildable;
+}
+
+guint32
+_gi_typelib_hash_builder_get_buffer_size (GITypelibHashBuilder *builder)
+{
+  g_return_val_if_fail (builder != NULL, 0);
+  g_return_val_if_fail (builder->prepared, 0);
+  g_return_val_if_fail (builder->buildable, 0 );
+
+  return builder->packed_size;
+}
+
+void
+_gi_typelib_hash_builder_pack (GITypelibHashBuilder *builder, guint8* mem, guint32 len)
+{
+  guint16 *table;
+  GHashTableIter hashiter;
+  gpointer key, value;
+  guint32 num_elts;
+  guint8 *packed_mem;
+
+  g_return_if_fail (builder != NULL);
+  g_return_if_fail (builder->prepared);
+  g_return_if_fail (builder->buildable);
+
+  g_assert (len >= builder->packed_size);
+  g_assert ((((unsigned long)mem) & 0x3) == 0);
+
+  *((guint32*) mem) = builder->dirmap_offset;
+  packed_mem = (guint8*)(mem + sizeof(guint32));
+  cmph_pack (builder->c, packed_mem);
+
+  table = (guint16*) (mem + builder->dirmap_offset);
+
+  num_elts = g_hash_table_size (builder->strings);
+  g_hash_table_iter_init (&hashiter, builder->strings);
+  while (g_hash_table_iter_next (&hashiter, &key, &value))
+    {
+      const char *str = key;
+      guint16 strval = (guint16)GPOINTER_TO_UINT(value);
+      guint32 hashv;
+
+      hashv = cmph_search_packed (packed_mem, str, strlen (str));
+      g_assert (hashv >= 0 && hashv < num_elts);
+      table[hashv] = strval;
+    }
+}
+
+void
+_gi_typelib_hash_builder_destroy (GITypelibHashBuilder *builder)
+{
+  if (builder->c)
+    {
+      cmph_destroy (builder->c);
+      builder->c = NULL;
+    }
+  g_hash_table_destroy (builder->strings);
+  g_slice_free (GITypelibHashBuilder, builder);
+}
+
+guint16
+_gi_typelib_hash_search (guint8* memory, const char *str)
+{
+  guint32 *mph;
+  guint16 *table;
+  guint32 dirmap_offset;
+  guint32 offset;
+
+  g_assert ((((unsigned long)memory) & 0x3) == 0);
+  mph = ((guint32*)memory)+1;
+
+  offset = cmph_search_packed (mph, str, strlen (str));
+
+  dirmap_offset = *((guint32*)memory);
+  table = (guint16*) (memory + dirmap_offset);
+
+  return table[offset];
+}
+
diff --git a/giscanner/__init__.py b/giscanner/__init__.py
new file mode 100644 (file)
index 0000000..5ab7a95
--- /dev/null
@@ -0,0 +1,24 @@
+# -*- Mode: Python -*-
+# GObject-Introspection - a framework for introspecting GObject libraries
+# 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 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.
+#
+
+import os
+builddir = os.environ.get('UNINSTALLED_INTROSPECTION_BUILDDIR')
+if builddir is not None:
+    __path__.append(os.path.join(builddir, 'giscanner'))
diff --git a/giscanner/annotationmain.py b/giscanner/annotationmain.py
new file mode 100644 (file)
index 0000000..97897e7
--- /dev/null
@@ -0,0 +1,74 @@
+# -*- Mode: Python -*-
+# GObject-Introspection - a framework for introspecting GObject libraries
+# Copyright (C) 2010 Johan Dahlin
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+
+import optparse
+
+from giscanner import message
+from giscanner.annotationparser import AnnotationParser
+from giscanner.scannermain import (get_preprocessor_option_group,
+                                   create_source_scanner,
+                                   process_packages)
+
+def annotation_main(args):
+    parser = optparse.OptionParser('%prog [options] sources')
+
+    group = optparse.OptionGroup(parser, "Tool modes, one is required")
+    group.add_option("-e", "--extract",
+                     action="store_true", dest="extract",
+                     help="Extract annotations from the input files")
+    parser.add_option_group(group)
+
+    group = get_preprocessor_option_group(parser)
+    group.add_option("-L", "--library-path",
+                     action="append", dest="library_paths", default=[],
+                     help="directories to search for libraries")
+    group.add_option("", "--pkg",
+                     action="append", dest="packages", default=[],
+                     help="pkg-config packages to get cflags from")
+    parser.add_option_group(group)
+
+    options, args = parser.parse_args(args)
+
+    if not options.extract:
+        raise SystemExit("ERROR: Nothing to do")
+
+    if options.packages:
+        process_packages(options, options.packages)
+
+    logger = message.MessageLogger.get(namespace='')
+
+    ss = create_source_scanner(options, args)
+
+    if options.extract:
+        ap = AnnotationParser()
+        blocks = ap.parse(ss.get_comments())
+        print '/' + ('*' * 60) + '/'
+        print '/* THIS FILE IS GENERATED DO NOT EDIT */'
+        print '/' + ('*' * 60) + '/'
+        print
+        for block in sorted(blocks.values()):
+            print block.to_gtk_doc()
+            print
+        print
+        print '/' + ('*' * 60) + '/'
+        print '/* THIS FILE IS GENERATED DO NOT EDIT */'
+        print '/' + ('*' * 60) + '/'
+
+    return 0
diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py
new file mode 100644 (file)
index 0000000..e0a7cec
--- /dev/null
@@ -0,0 +1,641 @@
+# -*- Mode: Python -*-
+# GObject-Introspection - a framework for introspecting GObject libraries
+# Copyright (C) 2008-2010 Johan Dahlin
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+
+# AnnotationParser - extract annotations from gtk-doc comments
+
+import re
+
+from . import message
+from .odict import odict
+
+# Tags - annotations applied to comment blocks
+TAG_VFUNC = 'virtual'
+TAG_SINCE = 'since'
+TAG_STABILITY = 'stability'
+TAG_DEPRECATED = 'deprecated'
+TAG_RETURNS = 'returns'
+TAG_ATTRIBUTES = 'attributes'
+TAG_RENAME_TO = 'rename to'
+TAG_TYPE = 'type'
+TAG_UNREF_FUNC = 'unref func'
+TAG_REF_FUNC = 'ref func'
+TAG_SET_VALUE_FUNC = 'set value func'
+TAG_GET_VALUE_FUNC = 'get value func'
+TAG_TRANSFER = 'transfer'
+TAG_VALUE = 'value'
+_ALL_TAGS = [TAG_VFUNC,
+             TAG_SINCE,
+             TAG_STABILITY,
+             TAG_DEPRECATED,
+             TAG_RETURNS,
+             TAG_ATTRIBUTES,
+             TAG_RENAME_TO,
+             TAG_TYPE,
+             TAG_UNREF_FUNC,
+             TAG_REF_FUNC,
+             TAG_SET_VALUE_FUNC,
+             TAG_GET_VALUE_FUNC,
+             TAG_TRANSFER,
+             TAG_VALUE]
+
+# Options - annotations for parameters and return values
+OPT_ALLOW_NONE = 'allow-none'
+OPT_ARRAY = 'array'
+OPT_ATTRIBUTE = 'attribute'
+OPT_CLOSURE = 'closure'
+OPT_DESTROY = 'destroy'
+OPT_ELEMENT_TYPE = 'element-type'
+OPT_FOREIGN = 'foreign'
+OPT_IN = 'in'
+OPT_INOUT = 'inout'
+OPT_INOUT_ALT = 'in-out'
+OPT_OUT = 'out'
+OPT_SCOPE = 'scope'
+OPT_TRANSFER = 'transfer'
+OPT_TYPE = 'type'
+OPT_SKIP = 'skip'
+OPT_CONSTRUCTOR = 'constructor'
+OPT_METHOD = 'method'
+
+ALL_OPTIONS = [
+    OPT_ALLOW_NONE,
+    OPT_ARRAY,
+    OPT_ATTRIBUTE,
+    OPT_CLOSURE,
+    OPT_DESTROY,
+    OPT_ELEMENT_TYPE,
+    OPT_FOREIGN,
+    OPT_IN,
+    OPT_INOUT,
+    OPT_INOUT_ALT,
+    OPT_OUT,
+    OPT_SCOPE,
+    OPT_TRANSFER,
+    OPT_TYPE,
+    OPT_SKIP,
+    OPT_CONSTRUCTOR,
+    OPT_METHOD]
+
+# Array options - array specific annotations
+OPT_ARRAY_FIXED_SIZE = 'fixed-size'
+OPT_ARRAY_LENGTH = 'length'
+OPT_ARRAY_ZERO_TERMINATED = 'zero-terminated'
+
+# Out options
+OPT_OUT_CALLER_ALLOCATES = 'caller-allocates'
+OPT_OUT_CALLEE_ALLOCATES = 'callee-allocates'
+
+# Scope options
+OPT_SCOPE_ASYNC = 'async'
+OPT_SCOPE_CALL = 'call'
+OPT_SCOPE_NOTIFIED = 'notified'
+
+# Transfer options
+OPT_TRANSFER_NONE = 'none'
+OPT_TRANSFER_CONTAINER = 'container'
+OPT_TRANSFER_FULL = 'full'
+OPT_TRANSFER_FLOATING = 'floating'
+
+
+class DocBlock(object):
+
+    def __init__(self, name):
+        self.name = name
+        self.options = DocOptions()
+        self.value = None
+        self.tags = odict()
+        self.comment = None
+        self.params = []
+        self.position = None
+
+    def __cmp__(self, other):
+        return cmp(self.name, other.name)
+
+    def __repr__(self):
+        return '<DocBlock %r %r>' % (self.name, self.options)
+
+    def set_position(self, position):
+        self.position = position
+        self.options.position = position
+
+    def get(self, name):
+        return self.tags.get(name)
+
+    def to_gtk_doc(self):
+        options = ''
+        if self.options:
+            options += ' '
+            options += ' '.join('(%s)' % o for o in self.options)
+        lines = [self.name]
+        if 'SECTION' not in self.name:
+            lines[0] += ':'
+        lines[0] += options
+        tags = []
+        for name, tag in self.tags.iteritems():
+            if name in self.params:
+                lines.append(tag.to_gtk_doc_param())
+            else:
+                tags.append(tag)
+
+        lines.append('')
+        for l in self.comment.split('\n'):
+            lines.append(l)
+        if tags:
+            lines.append('')
+            for tag in tags:
+                lines.append(tag.to_gtk_doc_tag())
+
+        comment = ''
+        #comment += '# %d \"%s\"\n' % (
+        #    self.position.line,
+        #    self.position.filename)
+        comment += '/**\n'
+        for line in lines:
+            line = line.rstrip()
+            if line:
+                comment += ' * %s\n' % (line, )
+            else:
+                comment += ' *\n'
+        comment += ' */\n'
+        return comment
+
+    def validate(self):
+        for tag in self.tags.values():
+            tag.validate()
+
+
+class DocTag(object):
+
+    def __init__(self, block, name):
+        self.block = block
+        self.name = name
+        self.options = DocOptions()
+        self.comment = None
+        self.value = ''
+        self.position = None
+
+    def __repr__(self):
+        return '<DocTag %r %r>' % (self.name, self.options)
+
+    def _validate_option(self, name, value, required=False,
+                         n_params=None, choices=None):
+        if required and value is None:
+            message.warn('%s annotation needs a value' % (
+                name, ), self.position)
+            return
+
+        if n_params is not None:
+            if n_params == 0:
+                s = 'no value'
+            elif n_params == 1:
+                s = 'one value'
+            else:
+                s = '%d values' % (n_params, )
+            if ((n_params > 0 and (value is None or value.length() != n_params)) or
+                n_params == 0 and value is not None):
+                if value is None:
+                    length = 0
+                else:
+                    length = value.length()
+                message.warn('%s annotation needs %s, not %d' % (
+                    name, s, length), self.position)
+                return
+
+        if choices is not None:
+            valuestr = value.one()
+            if valuestr not in choices:
+                message.warn('invalid %s annotation value: %r' % (
+                    name, valuestr, ), self.position)
+                return
+
+    def set_position(self, position):
+        self.position = position
+        self.options.position = position
+
+    def _get_gtk_doc_value(self):
+        def serialize_one(option, value, fmt, fmt2):
+            if value:
+                if type(value) != str:
+                    value = ' '.join((serialize_one(k, v, '%s=%s', '%s')
+                                      for k, v in value.all().iteritems()))
+                return fmt % (option, value)
+            else:
+                return fmt2 % (option, )
+        annotations = []
+        for option, value in self.options.iteritems():
+            annotations.append(
+                serialize_one(option, value, '(%s %s)', '(%s)'))
+        if annotations:
+            return ' '.join(annotations) + ': '
+        else:
+            return self.value
+
+    def to_gtk_doc_param(self):
+        return '@%s: %s%s' % (self.name, self._get_gtk_doc_value(), self.comment)
+
+    def to_gtk_doc_tag(self):
+        return '%s: %s%s' % (self.name.capitalize(),
+                             self._get_gtk_doc_value(),
+                             self.comment or '')
+
+    def validate(self):
+        for option in self.options:
+            value = self.options[option]
+            if option == OPT_ALLOW_NONE:
+                self._validate_option('allow-none', value, n_params=0)
+            elif option == OPT_ARRAY:
+                if value is None:
+                    continue
+                for name, v in value.all().iteritems():
+                    if name in [OPT_ARRAY_ZERO_TERMINATED, OPT_ARRAY_FIXED_SIZE]:
+                        try:
+                            int(v)
+                        except (TypeError, ValueError):
+                            if v is None:
+                                message.warn(
+                                    'array option %s needs a value' % (
+                                    name, ),
+                                    positions=self.position)
+                            else:
+                                message.warn(
+                                    'invalid array %s option value %r, '
+                                    'must be an integer' % (name, v, ),
+                                    positions=self.position)
+                            continue
+                    elif name == OPT_ARRAY_LENGTH:
+                        if v is None:
+                            message.warn(
+                                'array option length needs a value',
+                                positions=self.position)
+                            continue
+                    else:
+                        message.warn(
+                            'invalid array annotation value: %r' % (
+                            name, ), self.position)
+
+            elif option == OPT_ATTRIBUTE:
+                self._validate_option('attribute', value, n_params=2)
+            elif option == OPT_CLOSURE:
+                if value is not None and value.length() > 1:
+                    message.warn(
+                        'closure takes at maximium 1 value, %d given' % (
+                        value.length()), self.position)
+                    continue
+            elif option == OPT_DESTROY:
+                self._validate_option('destroy', value, n_params=1)
+            elif option == OPT_ELEMENT_TYPE:
+                self._validate_option('element-type', value, required=True)
+                if value is None:
+                    message.warn(
+                        'element-type takes at least one value, none given',
+                        self.position)
+                    continue
+                if value.length() > 2:
+                    message.warn(
+                        'element-type takes at maximium 2 values, %d given' % (
+                        value.length()), self.position)
+                    continue
+            elif option == OPT_FOREIGN:
+                self._validate_option('foreign', value, n_params=0)
+            elif option == OPT_IN:
+                self._validate_option('in', value, n_params=0)
+            elif option in [OPT_INOUT, OPT_INOUT_ALT]:
+                self._validate_option('inout', value, n_params=0)
+            elif option == OPT_OUT:
+                if value is None:
+                    continue
+                if value.length() > 1:
+                    message.warn(
+                        'out annotation takes at maximium 1 value, %d given' % (
+                        value.length()), self.position)
+                    continue
+                value_str = value.one()
+                if value_str not in [OPT_OUT_CALLEE_ALLOCATES,
+                                     OPT_OUT_CALLER_ALLOCATES]:
+                    message.warn("out annotation value is invalid: %r" % (
+                        value_str), self.position)
+                    continue
+            elif option == OPT_SCOPE:
+                self._validate_option(
+                    'scope', value, required=True,
+                    n_params=1,
+                    choices=[OPT_SCOPE_ASYNC,
+                             OPT_SCOPE_CALL,
+                             OPT_SCOPE_NOTIFIED])
+            elif option == OPT_SKIP:
+                self._validate_option('skip', value, n_params=0)
+            elif option == OPT_TRANSFER:
+                self._validate_option(
+                    'transfer', value, required=True,
+                    n_params=1,
+                    choices=[OPT_TRANSFER_FULL,
+                             OPT_TRANSFER_CONTAINER,
+                             OPT_TRANSFER_NONE,
+                             OPT_TRANSFER_FLOATING])
+            elif option == OPT_TYPE:
+                self._validate_option('type', value, required=True,
+                                      n_params=1)
+            elif option == OPT_CONSTRUCTOR:
+                self._validate_option('constructor', value, n_params=0)
+            elif option == OPT_METHOD:
+                self._validate_option('method', value, n_params=0)
+            else:
+                message.warn('invalid annotation option: %s' % (option, ),
+                             self.position)
+
+
+class DocOptions(object):
+    def __init__(self):
+        self.values = []
+
+    def __getitem__(self, item):
+        for key, value in self.values:
+            if key == item:
+                return value
+        raise KeyError
+
+    def __nonzero__(self):
+        return bool(self.values)
+
+    def __iter__(self):
+        return (k for k, v in self.values)
+
+    def add(self, name, value):
+        self.values.append((name, value))
+
+    def get(self, item, default=None):
+        for key, value in self.values:
+            if key == item:
+                return value
+        return default
+
+    def getall(self, item):
+        for key, value in self.values:
+            if key == item:
+                yield value
+
+    def iteritems(self):
+        return iter(self.values)
+
+
+class DocOption(object):
+
+    def __init__(self, tag, option):
+        self.tag = tag
+        self._array = []
+        self._dict = {}
+        # (annotation option1=value1 option2=value2) etc
+        for p in option.split(' '):
+            if '=' in p:
+                name, value = p.split('=', 1)
+            else:
+                name = p
+                value = None
+            self._dict[name] = value
+            if value is None:
+                self._array.append(name)
+            else:
+                self._array.append((name, value))
+
+    def __repr__(self):
+        return '<DocOption %r>' % (self._array, )
+
+    def length(self):
+        return len(self._array)
+
+    def one(self):
+        assert len(self._array) == 1
+        return self._array[0]
+
+    def flat(self):
+        return self._array
+
+    def all(self):
+        return self._dict
+
+
+class AnnotationParser(object):
+    COMMENT_HEADER_RE = re.compile(r'^\*[ \t]*\n[\t ]')
+    COMMENT_HEADER_START_RE = re.compile(r'\n[\t ]')
+    WHITESPACE_RE = re.compile(r'^\s*$')
+    OPTION_RE = re.compile(r'\([A-Za-z]+[^(]*\)')
+    RETURNS_RE = re.compile(r'^return(s?)( value)?:', re.IGNORECASE)
+
+    def __init__(self):
+        self._blocks = {}
+
+    def parse(self, comments):
+        for comment in comments:
+            self._parse_comment(comment)
+        return self._blocks
+
+    def _parse_comment(self, cmt):
+        # We're looking for gtk-doc comments here, they look like this:
+        # /**
+        #   * symbol:
+        #
+        # Or, alternatively, with options:
+        # /**
+        #   * symbol: (name value) ...
+        #
+        # symbol is currently one of:
+        #  - function: gtk_widget_show
+        #  - signal:   GtkWidget::destroy
+        #  - property: GtkWidget:visible
+        #
+        comment, filename, lineno = cmt
+        comment = comment.lstrip()
+        if not self.COMMENT_HEADER_RE.search(comment):
+            return
+        comment = self.COMMENT_HEADER_RE.sub('', comment, count=1)
+        comment = comment.strip()
+        if not comment.startswith('* '):
+            return
+        comment = comment[2:]
+
+        match = self.COMMENT_HEADER_START_RE.search(comment)
+        if match is None:
+            return
+        pos = match.start()
+        block_header = comment[:pos]
+        block_header = block_header.strip()
+        cpos = block_header.find(': ')
+        block_name = block_header
+        raw_name = block_header
+        if cpos != -1:
+            block_name = block_name[:cpos].strip()
+        if block_name.endswith(':'):
+            block_name = block_name[:-1]
+        block = DocBlock(block_name)
+        block.set_position(message.Position(filename, lineno))
+
+        if cpos:
+            block.options = self.parse_options(block, block_header[cpos+2:])
+        comment_lines = []
+        parsing_parameters = True
+        last_param_tag = None
+
+        # Second phase: parse parameters, return values, Tag: format
+        # annotations.
+        #
+        # Valid lines look like:
+        # * @foo: some comment here
+        # * @baz: (inout): This has an annotation
+        # * @bar: (out) (allow-none): this is a long parameter comment
+        # *  that gets wrapped to the next line.
+        # *
+        # * Some documentation for the function.
+        # *
+        # * Returns: (transfer none): A value
+
+        # offset of the first doctag in relation to the start of
+        # the docblock, we parsed /** and the xxx: lines already
+        lineno = 2
+        for line in comment[pos+1:].split('\n'):
+            line = line.lstrip()
+            if not line.startswith('*'):
+                lineno += 1
+                continue
+            nostar_line = line[1:]
+            is_whitespace = self.WHITESPACE_RE.match(nostar_line) is not None
+            if parsing_parameters and is_whitespace:
+                # As soon as we find a line that's just whitespace,
+                # we're done parsing the parameters.
+                parsing_parameters = False
+                lineno += 1
+                continue
+            elif is_whitespace:
+                comment_lines.append('')
+                lineno += 1
+                continue
+
+            # Explicitly only accept parameters of the form "* @foo" with one space.
+            is_parameter = nostar_line.startswith(' @')
+
+            # Strip the rest of the leading whitespace for the rest of
+            # the code; may not actually be necessary, but still doing
+            # it to avoid regressions.
+            line = nostar_line.lstrip()
+
+            # Look for a parameter or return value.  Both of these can
+            # have parenthesized options.
+            first_colonspace_index = line.find(': ')
+            is_return_value = self.RETURNS_RE.search(line)
+            parse_options = True
+            if ((is_parameter or is_return_value)
+                and first_colonspace_index > 0):
+                # Skip lines which has non-whitespace before first (
+                first_paren = line[first_colonspace_index+1:].find('(')
+                if (first_paren != -1 and
+                    line[first_colonspace_index+1:first_paren].strip()):
+                    parse_options = False
+
+                if is_parameter:
+                    argname = line[1:first_colonspace_index]
+                else:
+                    argname = TAG_RETURNS
+                tag = DocTag(block, argname)
+                tag.set_position(block.position.offset(lineno))
+                line_after_first_colon_space = line[first_colonspace_index + 2:]
+                second_colon_index = line_after_first_colon_space.find(':')
+                if second_colon_index >= 0:
+                    second_colon_index += first_colonspace_index + 2
+                    assert line[second_colon_index] == ':'
+                found_options = False
+                if second_colon_index > first_colonspace_index:
+                    value_line = \
+                      line[first_colonspace_index+2:second_colon_index]
+                    if ')' in value_line:
+                        after_last_paren = value_line[value_line.rfind(')'):]
+                        if not after_last_paren.rstrip().endswith(')'):
+                            parse_options = False
+                    if parse_options and self.OPTION_RE.search(value_line):
+                        # The OPTION_RE is a little bit heuristic.  If
+                        # we found two colons, we scan inside for something
+                        # that looks like (foo).
+                        # *Ideally* we'd change the gtk-doc format to
+                        # require double colons, and then there'd be
+                        # no ambiguity.  I.e.:
+                        # @foo:: Some documentation here
+                        # But that'd be a rather incompatible change.
+                        found_options = True
+                        tag.comment = line[second_colon_index+1:].strip()
+                        tag.options = self.parse_options(tag, value_line)
+                if not found_options:
+                    # We didn't find any options, so just take the whole thing
+                    # as documentation.
+                    tag.comment = line[first_colonspace_index+2:].strip()
+                block.tags[argname] = tag
+                last_param_tag = tag
+                if is_parameter:
+                    block.params.append(argname)
+            elif (not is_parameter) and parsing_parameters and last_param_tag:
+                # We need to handle continuation lines on parameters.  The
+                # conditional above - if a line doesn't start with '@', we're
+                # not yet in the documentation block for the whole function,
+                # and we've seen at least one parameter.
+                last_param_tag.comment += (' ' + line.strip())
+            elif first_colonspace_index > 0:
+                # The line is of the form "Tag: some value here", like:
+                # Since: 0.8
+                tag_name = line[:first_colonspace_index]
+                if tag_name.lower() in _ALL_TAGS:
+                    tag_name = tag_name.lower()
+                    tag = DocTag(block, tag_name)
+                    tag.value = line[first_colonspace_index+2:]
+                    tag.position = block.position.offset(lineno)
+                    block.tags[tag_name] = tag
+                else:
+                    comment_lines.append(line)
+            elif not parsing_parameters:
+                comment_lines.append(line)
+            lineno += 1
+        block.comment = '\n'.join(comment_lines).strip()
+        block.validate()
+        self._blocks[block.name] = block
+
+    @classmethod
+    def parse_options(cls, tag, value):
+        # (foo)
+        # (bar opt1 opt2...)
+        opened = -1
+        options = DocOptions()
+        options.position = tag.position
+        last = None
+        for i, c in enumerate(value):
+            if c == '(' and opened == -1:
+                opened = i+1
+            if c == ')' and opened != -1:
+                segment = value[opened:i]
+                parts = segment.split(' ', 1)
+                if len(parts) == 2:
+                    name, option = parts
+                elif len(parts) == 1:
+                    name = parts[0]
+                    option = None
+                else:
+                    raise AssertionError
+                if option is not None:
+                    option = DocOption(tag, option)
+                options.add(name, option)
+                last = i + 2
+                opened = -1
+
+        return options
diff --git a/giscanner/ast.py b/giscanner/ast.py
new file mode 100644 (file)
index 0000000..a78a9f1
--- /dev/null
@@ -0,0 +1,1035 @@
+# -*- Mode: Python -*-
+# GObject-Introspection - a framework for introspecting GObject libraries
+# Copyright (C) 2008  Johan Dahlin
+# Copyright (C) 2008, 2009 Red Hat, Inc.
+#
+# 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 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.
+#
+
+import copy
+
+from . import message
+
+from .message import Position
+from .odict import odict
+from .utils import to_underscores
+
+class Type(object):
+    """A Type can be either:
+* A reference to a node (target_giname)
+* A reference to a "fundamental" type like 'utf8'
+* A "foreign" type - this can be any string."
+If none are specified, then it's in an "unresolved" state.  An
+unresolved type can have two data sources; a "ctype" which comes
+from a C type string, or a gtype_name (from g_type_name()).
+""" # '''
+
+    def __init__(self,
+                 ctype=None,
+                 gtype_name=None,
+                 target_fundamental=None,
+                 target_giname=None,
+                 target_foreign=None,
+                 _target_unknown=False,
+                 is_const=False,
+                 origin_symbol=None):
+        self.ctype = ctype
+        self.gtype_name = gtype_name
+        self.origin_symbol = origin_symbol
+        if _target_unknown:
+            assert isinstance(self, TypeUnknown)
+        elif target_fundamental:
+            assert target_giname is None
+            assert target_foreign is None
+        elif target_giname:
+            assert '.' in target_giname
+            assert target_fundamental is None
+            assert target_foreign is None
+        elif target_foreign:
+            assert ctype is not None
+            assert target_giname is None
+            assert target_fundamental is None
+        else:
+            assert (ctype is not None) or (gtype_name is not None)
+        self.target_fundamental = target_fundamental
+        self.target_giname = target_giname
+        self.target_foreign = target_foreign
+        self.is_const = is_const
+
+    @property
+    def resolved(self):
+        return (self.target_fundamental or
+                self.target_giname or
+                self.target_foreign)
+
+    @property
+    def unresolved_string(self):
+        if self.ctype:
+            return self.ctype
+        elif self.gtype_name:
+            return self.gtype_name
+        else:
+            assert False
+
+    @classmethod
+    def create_from_gtype_name(cls, gtype_name):
+        """Parse a GType name (as from g_type_name()), and return a
+Type instance.  Note that this function performs namespace lookup,
+in contrast to the other create_type() functions."""
+        # First, is it a fundamental?
+        fundamental = type_names.get(gtype_name)
+        if fundamental is not None:
+            return cls(target_fundamental=fundamental.target_fundamental)
+        if gtype_name == 'GHashTable':
+            return Map(TYPE_ANY, TYPE_ANY, gtype_name=gtype_name)
+        elif gtype_name in ('GArray', 'GPtrArray', 'GByteArray'):
+            return Array('GLib.' + gtype_name[1:], TYPE_ANY,
+                         gtype_name=gtype_name)
+        elif gtype_name == 'GStrv':
+            bare_utf8 = TYPE_STRING.clone()
+            bare_utf8.ctype = None
+            return Array(None, bare_utf8, ctype=None, gtype_name=gtype_name,
+                         is_const=False)
+
+        # Workaround for Gdk.Rectangle being boxed alias for
+        # cairo.RectangleInt.  G-I does not support boxing of aliases.
+        # See https://bugzilla.gnome.org/show_bug.cgi?id=655423
+        if gtype_name == 'GdkRectangle':
+            gtype_name = 'CairoRectangleInt'
+
+        return cls(gtype_name=gtype_name)
+
+    def get_giname(self):
+        assert self.target_giname is not None
+        return self.target_giname.split('.')[1]
+
+    def __cmp__(self, other):
+        if self.target_fundamental:
+            return cmp(self.target_fundamental, other.target_fundamental)
+        if self.target_giname:
+            return cmp(self.target_giname, other.target_giname)
+        if self.target_foreign:
+            return cmp(self.target_foreign, other.target_foreign)
+        return cmp(self.ctype, other.ctype)
+
+    def is_equiv(self, typeval):
+        """Return True if the specified types are compatible at
+        an introspection level, disregarding their C types.
+        A sequence may be given for typeval, in which case
+        this function returns True if the type is compatible with
+        any."""
+        if isinstance(typeval, (list, tuple)):
+            for val in typeval:
+                if self.is_equiv(val):
+                    return True
+            return False
+        return self == typeval
+
+    def clone(self):
+        return Type(target_fundamental=self.target_fundamental,
+                    target_giname=self.target_giname,
+                    target_foreign=self.target_foreign,
+                    ctype=self.ctype,
+                    is_const=self.is_const)
+
+    def __str__(self):
+        if self.target_fundamental:
+            return self.target_fundamental
+        elif self.target_giname:
+            return self.target_giname
+        elif self.target_foreign:
+            return self.target_foreign
+
+    def __repr__(self):
+        if self.target_fundamental:
+            data = 'target_fundamental=%s, ' % (self.target_fundamental, )
+        elif self.target_giname:
+            data = 'target_giname=%s, ' % (self.target_giname, )
+        elif self.target_foreign:
+            data = 'target_foreign=%s, ' % (self.target_foreign, )
+        else:
+            data = ''
+        return '%s(%sctype=%s)' % (self.__class__.__name__, data, self.ctype)
+
+class TypeUnknown(Type):
+    def __init__(self):
+        Type.__init__(self, _target_unknown=True)
+
+######
+## Fundamental types
+######
+# Two special ones
+TYPE_NONE = Type(target_fundamental='none', ctype='void')
+TYPE_ANY = Type(target_fundamental='gpointer', ctype='gpointer')
+# "Basic" types
+TYPE_BOOLEAN = Type(target_fundamental='gboolean', ctype='gboolean')
+TYPE_INT8 = Type(target_fundamental='gint8', ctype='gint8')
+TYPE_UINT8 = Type(target_fundamental='guint8', ctype='guint8')
+TYPE_INT16 = Type(target_fundamental='gint16', ctype='gint16')
+TYPE_UINT16 = Type(target_fundamental='guint16', ctype='guint16')
+TYPE_INT32 = Type(target_fundamental='gint32', ctype='gint32')
+TYPE_UINT32 = Type(target_fundamental='guint32', ctype='guint32')
+TYPE_INT64 = Type(target_fundamental='gint64', ctype='gint64')
+TYPE_UINT64 = Type(target_fundamental='guint64', ctype='guint64')
+TYPE_CHAR = Type(target_fundamental='gchar', ctype='gchar')
+TYPE_SHORT = Type(target_fundamental='gshort', ctype='gshort')
+TYPE_USHORT = Type(target_fundamental='gushort', ctype='gushort')
+TYPE_INT = Type(target_fundamental='gint', ctype='gint')
+TYPE_UINT = Type(target_fundamental='guint', ctype='guint')
+TYPE_LONG = Type(target_fundamental='glong', ctype='glong')
+TYPE_ULONG = Type(target_fundamental='gulong', ctype='gulong')
+TYPE_SIZE = Type(target_fundamental='gsize', ctype='gsize')
+TYPE_SSIZE = Type(target_fundamental='gssize', ctype='gssize')
+TYPE_INTPTR = Type(target_fundamental='gintptr', ctype='gintptr')
+TYPE_UINTPTR = Type(target_fundamental='guintptr', ctype='guintptr')
+# C99 types
+TYPE_LONG_LONG = Type(target_fundamental='long long', ctype='long long')
+TYPE_LONG_ULONG = Type(target_fundamental='unsigned long long',
+                       ctype='unsigned long long')
+TYPE_FLOAT = Type(target_fundamental='gfloat', ctype='gfloat')
+TYPE_DOUBLE = Type(target_fundamental='gdouble', ctype='gdouble')
+# ?
+TYPE_LONG_DOUBLE = Type(target_fundamental='long double',
+                        ctype='long double')
+TYPE_UNICHAR = Type(target_fundamental='gunichar', ctype='gunichar')
+
+# C types with semantics overlaid
+TYPE_GTYPE = Type(target_fundamental='GType', ctype='GType')
+TYPE_STRING = Type(target_fundamental='utf8', ctype='gchar*')
+TYPE_FILENAME = Type(target_fundamental='filename', ctype='gchar*')
+
+TYPE_VALIST = Type(target_fundamental='va_list', ctype='va_list')
+
+BASIC_GIR_TYPES = [TYPE_BOOLEAN, TYPE_INT8, TYPE_UINT8, TYPE_INT16,
+                   TYPE_UINT16, TYPE_INT32, TYPE_UINT32, TYPE_INT64,
+                   TYPE_UINT64, TYPE_CHAR, TYPE_SHORT, TYPE_USHORT, TYPE_INT,
+                   TYPE_UINT, TYPE_LONG, TYPE_ULONG, TYPE_SIZE, TYPE_SSIZE,
+                   TYPE_LONG_LONG, TYPE_LONG_ULONG, TYPE_INTPTR, TYPE_UINTPTR,
+                   TYPE_FLOAT, TYPE_DOUBLE,
+                   TYPE_LONG_DOUBLE, TYPE_UNICHAR, TYPE_GTYPE]
+GIR_TYPES = [TYPE_NONE, TYPE_ANY]
+GIR_TYPES.extend(BASIC_GIR_TYPES)
+GIR_TYPES.extend([TYPE_STRING, TYPE_FILENAME, TYPE_VALIST])
+
+# These are the only basic types that are guaranteed to
+# be as big as a pointer (and thus are allowed in GPtrArray)
+POINTER_TYPES = [TYPE_ANY, TYPE_INTPTR, TYPE_UINTPTR]
+
+INTROSPECTABLE_BASIC = list(GIR_TYPES)
+for v in [TYPE_NONE, TYPE_ANY,
+          TYPE_LONG_LONG, TYPE_LONG_ULONG,
+          TYPE_LONG_DOUBLE, TYPE_VALIST]:
+    INTROSPECTABLE_BASIC.remove(v)
+
+type_names = {}
+for typeval in GIR_TYPES:
+    type_names[typeval.target_fundamental] = typeval
+basic_type_names = {}
+for typeval in BASIC_GIR_TYPES:
+    basic_type_names[typeval.target_fundamental] = typeval
+
+# C builtin
+type_names['char'] = TYPE_CHAR
+type_names['signed char'] = TYPE_INT8
+type_names['unsigned char'] = TYPE_UINT8
+type_names['short'] = TYPE_SHORT
+type_names['signed short'] = TYPE_SHORT
+type_names['unsigned short'] = TYPE_USHORT
+type_names['int'] = TYPE_INT
+type_names['signed int'] = TYPE_INT
+type_names['unsigned short int'] = TYPE_USHORT
+type_names['signed'] = TYPE_INT
+type_names['unsigned int'] = TYPE_UINT
+type_names['unsigned'] = TYPE_UINT
+type_names['long'] = TYPE_LONG
+type_names['signed long'] = TYPE_LONG
+type_names['unsigned long'] = TYPE_ULONG
+type_names['unsigned long int'] = TYPE_ULONG
+type_names['float'] = TYPE_FLOAT
+type_names['double'] = TYPE_DOUBLE
+type_names['char*'] = TYPE_STRING
+type_names['void*'] = TYPE_ANY
+type_names['void'] = TYPE_NONE
+# Also alias the signed one here
+type_names['signed long long'] = TYPE_LONG_LONG
+
+# A few additional GLib type aliases
+type_names['guchar'] = TYPE_UINT8
+type_names['gchararray'] = TYPE_STRING
+type_names['gchar*'] = TYPE_STRING
+type_names['goffset'] = TYPE_INT64
+type_names['gunichar2'] = TYPE_UINT16
+type_names['gsize'] = TYPE_SIZE
+type_names['gssize'] = TYPE_SSIZE
+type_names['gintptr'] = TYPE_INTPTR
+type_names['guintptr'] = TYPE_UINTPTR
+type_names['gconstpointer'] = TYPE_ANY
+
+# We used to support these; continue to do so
+type_names['any'] = TYPE_ANY
+type_names['boolean'] = TYPE_BOOLEAN
+type_names['uint'] = TYPE_UINT
+type_names['ulong'] = TYPE_ULONG
+
+# C stdio, used in GLib public headers; squash this for now here
+# until we move scanning into GLib and can (skip)
+type_names['FILE*'] = TYPE_ANY
+
+# One off C unix type definitions; note some of these may be GNU Libc
+# specific.  If someone is actually bitten by this, feel free to do
+# the required configure goop to determine their size and replace
+# here.
+#
+# We don't want to encourage people to use these in their APIs because
+# they compromise the platform-independence that GLib gives you.
+# These are here mostly to avoid blowing when random platform-specific
+# methods are added under #ifdefs inside GLib itself.  We could just (skip)
+# the relevant methods, but on the other hand, since these types are just
+# integers it's easy enough to expand them.
+type_names['size_t'] = type_names['gsize']
+type_names['time_t'] = TYPE_LONG
+type_names['off_t'] = type_names['gsize']
+type_names['pid_t'] = TYPE_INT
+type_names['uid_t'] = TYPE_UINT
+type_names['gid_t'] = TYPE_UINT
+type_names['dev_t'] = TYPE_INT
+type_names['socklen_t'] = TYPE_INT32
+type_names['size_t'] = TYPE_ULONG
+type_names['ssize_t'] = TYPE_LONG
+
+# Obj-C
+type_names['id'] = TYPE_ANY
+
+##
+## Parameters
+##
+
+PARAM_DIRECTION_IN = 'in'
+PARAM_DIRECTION_OUT = 'out'
+PARAM_DIRECTION_INOUT = 'inout'
+
+PARAM_SCOPE_CALL = 'call'
+PARAM_SCOPE_ASYNC = 'async'
+PARAM_SCOPE_NOTIFIED = 'notified'
+
+PARAM_TRANSFER_NONE = 'none'
+PARAM_TRANSFER_CONTAINER = 'container'
+PARAM_TRANSFER_FULL = 'full'
+
+SIGNAL_FIRST = 'first'
+SIGNAL_LAST = 'last'
+SIGNAL_CLEANUP = 'cleanup'
+SIGNAL_MUST_COLLECT = 'must-collect'
+
+
+class Namespace(object):
+    def __init__(self, name, version,
+                 identifier_prefixes=None,
+                 symbol_prefixes=None):
+        self.name = name
+        self.version = version
+        if identifier_prefixes is not None:
+            self.identifier_prefixes = identifier_prefixes
+        else:
+            self.identifier_prefixes = [name]
+        if symbol_prefixes is not None:
+            self.symbol_prefixes = symbol_prefixes
+        else:
+            ps = self.identifier_prefixes
+            self.symbol_prefixes = [to_underscores(p).lower() for p in ps]
+        # cache upper-cased versions
+        self._ucase_symbol_prefixes = [p.upper() for p in self.symbol_prefixes]
+        self._names = odict() # Maps from GIName -> node
+        self._aliases = {} # Maps from GIName -> GIName
+        self._type_names = {} # Maps from GTName -> node
+        self._ctypes = {} # Maps from CType -> node
+        self._symbols = {} # Maps from function symbols -> Function
+
+    @property
+    def names(self):
+        return self._names
+
+    @property
+    def aliases(self):
+        return self._aliases
+
+    @property
+    def type_names(self):
+        return self._type_names
+
+    @property
+    def ctypes(self):
+        return self._ctypes
+
+    def type_from_name(self, name, ctype=None):
+        """Backwards compatibility method for older .gir files, which
+only use the 'name' attribute.  If name refers to a fundamental type,
+create a Type object referncing it.  If name is already a
+fully-qualified GIName like 'Foo.Bar', returns a Type targeting it .
+Otherwise a Type targeting name qualififed with the namespace name is
+returned."""
+        if name in type_names:
+            return Type(target_fundamental=name, ctype=ctype)
+        if '.' in name:
+            target = name
+        else:
+            target = '%s.%s' % (self.name, name)
+        return Type(target_giname=target, ctype=ctype)
+
+    def append(self, node, replace=False):
+        previous = self._names.get(node.name)
+        if previous is not None:
+            if not replace:
+                raise ValueError("Namespace conflict: %r" % (node, ))
+            self.remove(previous)
+        # A layering violation...but oh well.
+        if isinstance(node, Alias):
+            self._aliases[node.name] = node
+        elif isinstance(node, Registered) and node.gtype_name is not None:
+            self._type_names[node.gtype_name] = node
+        elif isinstance(node, Function):
+            self._symbols[node.symbol] = node
+        assert isinstance(node, Node)
+        assert node.namespace is None
+        node.namespace = self
+        self._names[node.name] = node
+        if hasattr(node, 'ctype'):
+            self._ctypes[node.ctype] = node
+        if hasattr(node, 'symbol'):
+            self._ctypes[node.symbol] = node
+
+    def remove(self, node):
+        if isinstance(node, Alias):
+            del self._aliases[node.name]
+        elif isinstance(node, Registered) and node.gtype_name is not None:
+            del self._type_names[node.gtype_name]
+        del self._names[node.name]
+        node.namespace = None
+        if hasattr(node, 'ctype'):
+            del self._ctypes[node.ctype]
+        if isinstance(node, Function):
+            del self._symbols[node.symbol]
+
+    def float(self, node):
+        """Like remove(), but doesn't unset the node's namespace
+back-reference, and it's still possible to look up
+functions via get_by_symbol()."""
+        if isinstance(node, Function):
+            symbol = node.symbol
+        self.remove(node)
+        self._symbols[symbol] = node
+        node.namespace = self
+
+    def __iter__(self):
+        return iter(self._names)
+
+    def iteritems(self):
+        return self._names.iteritems()
+
+    def itervalues(self):
+        return self._names.itervalues()
+
+    def get(self, name):
+        return self._names.get(name)
+
+    def get_by_ctype(self, ctype):
+        return self._ctypes.get(ctype)
+
+    def get_by_symbol(self, symbol):
+        return self._symbols.get(symbol)
+
+    def walk(self, callback):
+        for node in self.itervalues():
+            node.walk(callback, [])
+
+class Include(object):
+
+    def __init__(self, name, version):
+        self.name = name
+        self.version = version
+
+    @classmethod
+    def from_string(cls, string):
+        return cls(*string.split('-', 1))
+
+    def __cmp__(self, other):
+        namecmp = cmp(self.name, other.name)
+        if namecmp != 0:
+            return namecmp
+        return cmp(self.version, other.version)
+
+    def __hash__(self):
+        return hash(str(self))
+
+    def __str__(self):
+        return '%s-%s' % (self.name, self.version)
+
+class Annotated(object):
+    """An object which has a few generic metadata
+properties."""
+    def __init__(self):
+        self.version = None
+        self.skip = False
+        self.introspectable = True
+        self.attributes = [] # (key, value)*
+        self.deprecated = None
+        self.deprecated_version = None
+        self.doc = None
+
+class Node(Annotated):
+    """A node is a type of object which is uniquely identified by its
+(namespace, name) pair.  When combined with a ., this is called a
+GIName.  It's possible for nodes to contain or point to other nodes."""
+
+    c_name = property(lambda self: self.namespace.name + self.name)
+    gi_name = property(lambda self: '%s.%s' % (self.namespace.name, self.name))
+
+    def __init__(self, name=None):
+        Annotated.__init__(self)
+        self.namespace = None # Should be set later by Namespace.append()
+        self.name = name
+        self.foreign = False
+        self.file_positions = set()
+
+    def create_type(self):
+        """Create a Type object referencing this node."""
+        assert self.namespace is not None
+        return Type(target_giname=('%s.%s' % (self.namespace.name, self.name)))
+
+    def __cmp__(self, other):
+        nscmp = cmp(self.namespace, other.namespace)
+        if nscmp != 0:
+            return nscmp
+        return cmp(self.name, other.name)
+
+    def __repr__(self):
+        return '%s(%r)' % (self.__class__.__name__, self.name)
+
+    def inherit_file_positions(self, node):
+        self.file_positions.update(node.file_positions)
+
+    def add_file_position(self, position):
+        self.file_positions.add(position)
+
+    def add_symbol_reference(self, symbol):
+        if symbol.source_filename:
+            self.add_file_position(Position(symbol.source_filename, symbol.line))
+
+    def walk(self, callback, chain):
+        res = callback(self, chain)
+        assert res in (True, False), "Walk function must return boolean, not %r" % (res, )
+        if not res:
+            return False
+        chain.append(self)
+        self._walk(callback, chain)
+        chain.pop()
+
+    def _walk(self, callback, chain):
+        pass
+
+
+class Registered:
+    """A node that (possibly) has gtype_name and get_type."""
+    def __init__(self, gtype_name, get_type):
+        assert (gtype_name is None and get_type is None) or \
+               (gtype_name is not None and get_type is not None)
+        self.gtype_name = gtype_name
+        self.get_type = get_type
+
+
+class Callable(Node):
+
+    def __init__(self, name, retval, parameters, throws):
+        Node.__init__(self, name)
+        self.retval = retval
+        self.parameters = parameters
+        self.throws = not not throws
+        self.instance_parameter = None # Parameter
+        self.parent = None # A Class or Interface
+
+    def get_parameter_index(self, name):
+        for i, parameter in enumerate(self.parameters):
+            if parameter.argname == name:
+                return i
+        raise ValueError("Unknown argument %s" % (name, ))
+
+    def get_parameter(self, name):
+        for parameter in self.parameters:
+            if parameter.argname == name:
+                return parameter
+        raise ValueError("Unknown argument %s" % (name, ))
+
+
+class Function(Callable):
+
+    def __init__(self, name, retval, parameters, throws, symbol):
+        Callable.__init__(self, name, retval, parameters, throws)
+        self.symbol = symbol
+        self.is_method = False
+        self.is_constructor = False
+        self.shadowed_by = None # C symbol string
+        self.shadows = None # C symbol string
+        self.moved_to = None # namespaced function name string
+
+    def clone(self):
+        clone = copy.copy(self)
+        # copy the parameters array so a change to self.parameters does not
+        # influence clone.parameters.
+        clone.parameters = self.parameters[:]
+        return clone
+
+    def is_type_meta_function(self):
+        # Named correctly
+        if not (self.name.endswith('_get_type') or
+                self.name.endswith('_get_gtype')):
+                return False
+
+        # Doesn't have any parameters
+        if self.parameters:
+            return False
+
+        # Returns GType
+        rettype = self.retval.type
+        if (not rettype.is_equiv(TYPE_GTYPE) and
+           rettype.target_giname != 'Gtk.Type'):
+            message.warn("function '%s' returns '%r', not a GType" %
+                         (self.name, rettype))
+            return False
+
+        return True
+
+class ErrorQuarkFunction(Function):
+
+    def __init__(self, name, retval, parameters, throws, symbol, error_domain):
+        Function.__init__(self, name, retval, parameters, throws, symbol)
+        self.error_domain = error_domain
+
+
+class VFunction(Callable):
+
+    def __init__(self, name, retval, parameters, throws):
+        Callable.__init__(self, name, retval, parameters, throws)
+        self.invoker = None
+
+    @classmethod
+    def from_callback(cls, cb):
+        obj = cls(cb.name, cb.retval, cb.parameters[1:],
+                  cb.throws)
+        return obj
+
+
+
+class Varargs(Type):
+
+    def __init__(self):
+        Type.__init__(self, '<varargs>', target_fundamental='<varargs>')
+
+
+class Array(Type):
+    C = '<c>'
+    GLIB_ARRAY = 'GLib.Array'
+    GLIB_BYTEARRAY = 'GLib.ByteArray'
+    GLIB_PTRARRAY = 'GLib.PtrArray'
+
+    def __init__(self, array_type, element_type, **kwargs):
+        Type.__init__(self, target_fundamental='<array>',
+                      **kwargs)
+        if (array_type is None or array_type == self.C):
+            self.array_type = self.C
+        else:
+            assert array_type in (self.GLIB_ARRAY,
+                                  self.GLIB_BYTEARRAY,
+                                  self.GLIB_PTRARRAY), array_type
+            self.array_type = array_type
+        assert isinstance(element_type, Type)
+        self.element_type = element_type
+        self.zeroterminated = True
+        self.length_param_name = None
+        self.size = None
+
+    def clone(self):
+        arr = Array(self.array_type, self.element_type)
+        arr.zeroterminated = self.zeroterminated
+        arr.length_param_name = self.length_param_name
+        arr.size = self.size
+        return arr
+
+class List(Type):
+
+    def __init__(self, name, element_type, **kwargs):
+        Type.__init__(self, target_fundamental='<list>',
+                      **kwargs)
+        self.name = name
+        assert isinstance(element_type, Type)
+        self.element_type = element_type
+
+    def clone(self):
+        return List(self.name, self.element_type)
+
+class Map(Type):
+
+    def __init__(self, key_type, value_type, **kwargs):
+        Type.__init__(self, target_fundamental='<map>', **kwargs)
+        assert isinstance(key_type, Type)
+        self.key_type = key_type
+        assert isinstance(value_type, Type)
+        self.value_type = value_type
+
+    def clone(self):
+        return Map(self.key_type, self.value_type)
+
+class Alias(Node):
+
+    def __init__(self, name, target, ctype=None):
+        Node.__init__(self, name)
+        self.target = target
+        self.ctype = ctype
+
+
+class TypeContainer(Annotated):
+    """A fundamental base class for Return and Parameter."""
+
+    def __init__(self, typenode, transfer):
+        Annotated.__init__(self)
+        self.type = typenode
+        if transfer is not None:
+            self.transfer = transfer
+        elif typenode.is_const:
+            self.transfer = PARAM_TRANSFER_NONE
+        else:
+            self.transfer = None
+
+
+class Parameter(TypeContainer):
+    """An argument to a function."""
+
+    def __init__(self, argname, typenode, direction=None,
+                 transfer=None, allow_none=False, scope=None,
+                 caller_allocates=False):
+        TypeContainer.__init__(self, typenode, transfer)
+        self.argname = argname
+        self.direction = direction
+        self.allow_none = allow_none
+        self.scope = scope
+        self.caller_allocates = caller_allocates
+        self.closure_name = None
+        self.destroy_name = None
+
+
+class Return(TypeContainer):
+    """A return value from a function."""
+
+    def __init__(self, rtype, transfer=None):
+        TypeContainer.__init__(self, rtype, transfer)
+        self.direction = PARAM_DIRECTION_OUT
+
+
+class Enum(Node, Registered):
+
+    def __init__(self, name, ctype,
+                 gtype_name=None,
+                 get_type=None,
+                 c_symbol_prefix=None,
+                 members=None):
+        Node.__init__(self, name)
+        Registered.__init__(self, gtype_name, get_type)
+        self.c_symbol_prefix = c_symbol_prefix
+        self.ctype = ctype
+        self.members = members
+        # Associated error domain name
+        self.error_domain = None
+        self.static_methods = []
+
+    def _walk(self, callback, chain):
+        for meth in self.static_methods:
+            meth.walk(callback, chain)
+
+
+class Bitfield(Node, Registered):
+
+    def __init__(self, name, ctype,
+                 gtype_name=None,
+                 c_symbol_prefix=None,
+                 get_type=None,
+                 members=None):
+        Node.__init__(self, name)
+        Registered.__init__(self, gtype_name, get_type)
+        self.ctype = ctype
+        self.c_symbol_prefix = c_symbol_prefix
+        self.members = members
+        self.static_methods = []
+
+    def _walk(self, callback, chain):
+        for meth in self.static_methods:
+            meth.walk(callback, chain)
+
+
+class Member(Annotated):
+
+    def __init__(self, name, value, symbol, nick):
+        Annotated.__init__(self)
+        self.name = name
+        self.value = value
+        self.symbol = symbol
+        self.nick = nick
+
+    def __cmp__(self, other):
+        return cmp(self.name, other.name)
+
+
+
+class Compound(Node, Registered):
+    def __init__(self, name,
+                 ctype=None,
+                 gtype_name=None,
+                 get_type=None,
+                 c_symbol_prefix=None,
+                 disguised=False):
+        Node.__init__(self, name)
+        Registered.__init__(self, gtype_name, get_type)
+        self.ctype = ctype
+        self.methods = []
+        self.static_methods = []
+        self.fields = []
+        self.constructors = []
+        self.disguised = disguised
+        self.gtype_name = gtype_name
+        self.get_type = get_type
+        self.c_symbol_prefix = c_symbol_prefix
+
+    def add_gtype(self, gtype_name, get_type):
+        self.gtype_name = gtype_name
+        self.get_type = get_type
+
+    def _walk(self, callback, chain):
+        for ctor in self.constructors:
+            ctor.walk(callback, chain)
+        for func in self.methods:
+            func.walk(callback, chain)
+        for func in self.static_methods:
+            func.walk(callback, chain)
+        for field in self.fields:
+            if field.anonymous_node is not None:
+                field.anonymous_node.walk(callback, chain)
+
+class Field(Annotated):
+
+    def __init__(self, name, typenode, readable, writable, bits=None,
+                 anonymous_node=None):
+        Annotated.__init__(self)
+        assert (typenode or anonymous_node)
+        self.name = name
+        self.type = typenode
+        self.readable = readable
+        self.writable = writable
+        self.bits = bits
+        self.anonymous_node = anonymous_node
+        self.private = False
+
+    def __cmp__(self, other):
+        return cmp(self.name, other.name)
+
+
+class Record(Compound):
+
+    def __init__(self, name,
+                 ctype=None,
+                 gtype_name=None,
+                 get_type=None,
+                 c_symbol_prefix=None,
+                 disguised=False):
+        Compound.__init__(self, name,
+                          ctype=ctype,
+                          gtype_name=gtype_name,
+                          get_type=get_type,
+                          c_symbol_prefix=c_symbol_prefix,
+                          disguised=disguised)
+        # If non-None, this record defines the FooClass C structure
+        # for some Foo GObject (or similar for GInterface)
+        self.is_gtype_struct_for = None
+
+
+class Union(Compound):
+
+    def __init__(self, name,
+                 ctype=None,
+                 gtype_name=None,
+                 get_type=None,
+                 c_symbol_prefix=None,
+                 disguised=False):
+        Compound.__init__(self, name,
+                          ctype=ctype,
+                          gtype_name=gtype_name,
+                          get_type=get_type,
+                          c_symbol_prefix=c_symbol_prefix,
+                          disguised=disguised)
+
+
+class Boxed(Node, Registered):
+    """A boxed type with no known associated structure/union."""
+    def __init__(self, name,
+                 gtype_name=None,
+                 get_type=None,
+                 c_symbol_prefix=None):
+        assert gtype_name is not None
+        assert get_type is not None
+        Node.__init__(self, name)
+        Registered.__init__(self, gtype_name, get_type)
+        if get_type is not None:
+            assert c_symbol_prefix is not None
+        self.c_symbol_prefix = c_symbol_prefix
+        self.constructors = []
+        self.methods = []
+        self.static_methods = []
+
+    def _walk(self, callback, chain):
+        for ctor in self.constructors:
+            ctor.walk(callback, chain)
+        for meth in self.methods:
+            meth.walk(callback, chain)
+        for meth in self.static_methods:
+            meth.walk(callback, chain)
+
+
+class Signal(Callable):
+
+    def __init__(self, name, retval, parameters, when=None,
+                 no_recurse=False, detailed=False, action=False,
+                 no_hooks=False):
+        Callable.__init__(self, name, retval, parameters, False)
+        self.when = when
+        self.no_recurse = no_recurse
+        self.detailed = detailed
+        self.action = action
+        self.no_hooks = no_hooks
+
+
+class Class(Node, Registered):
+
+    def __init__(self, name, parent,
+                 ctype=None,
+                 gtype_name=None,
+                 get_type=None,
+                 c_symbol_prefix=None,
+                 is_abstract=False):
+        Node.__init__(self, name)
+        Registered.__init__(self, gtype_name, get_type)
+        self.ctype = ctype
+        self.c_symbol_prefix = c_symbol_prefix
+        self.parent = parent
+        self.fundamental = False
+        self.unref_func = None
+        self.ref_func = None
+        self.set_value_func = None
+        self.get_value_func = None
+        # When we're in the scanner, we keep around a list
+        # of parents so that we can transparently fall back
+        # if there are 'hidden' parents
+        self.parent_chain = []
+        self.glib_type_struct = None
+        self.is_abstract = is_abstract
+        self.methods = []
+        self.virtual_methods = []
+        self.static_methods = []
+        self.interfaces = []
+        self.constructors = []
+        self.properties = []
+        self.fields = []
+        self.signals = []
+
+    def _walk(self, callback, chain):
+        for meth in self.methods:
+            meth.walk(callback, chain)
+        for meth in self.virtual_methods:
+            meth.walk(callback, chain)
+        for meth in self.static_methods:
+            meth.walk(callback, chain)
+        for ctor in self.constructors:
+            ctor.walk(callback, chain)
+        for field in self.fields:
+            if field.anonymous_node:
+                field.anonymous_node.walk(callback, chain)
+        for sig in self.signals:
+            sig.walk(callback, chain)
+
+
+class Interface(Node, Registered):
+
+    def __init__(self, name, parent,
+                 ctype=None,
+                 gtype_name=None,
+                 get_type=None,
+                 c_symbol_prefix=None):
+        Node.__init__(self, name)
+        Registered.__init__(self, gtype_name, get_type)
+        self.ctype = ctype
+        self.c_symbol_prefix = c_symbol_prefix
+        self.parent = parent
+        self.parent_chain = []
+        self.methods = []
+        self.signals = []
+        self.static_methods = []
+        self.virtual_methods = []
+        self.glib_type_struct = None
+        self.properties = []
+        self.fields = []
+        self.prerequisites = []
+
+    def _walk(self, callback, chain):
+        for meth in self.methods:
+            meth.walk(callback, chain)
+        for meth in self.static_methods:
+            meth.walk(callback, chain)
+        for meth in self.virtual_methods:
+            meth.walk(callback, chain)
+        for field in self.fields:
+            if field.anonymous_node:
+                field.anonymous_node.walk(callback, chain)
+        for sig in self.signals:
+            sig.walk(callback, chain)
+
+
+class Constant(Node):
+
+    def __init__(self, name, value_type, value, ctype):
+        Node.__init__(self, name)
+        self.value_type = value_type
+        self.value = value
+        self.ctype = ctype
+
+
+class Property(Node):
+
+    def __init__(self, name, typeobj, readable, writable,
+                 construct, construct_only, transfer=None):
+        Node.__init__(self, name)
+        self.type = typeobj
+        self.readable = readable
+        self.writable = writable
+        self.construct = construct
+        self.construct_only = construct_only
+        if transfer is None:
+            self.transfer = PARAM_TRANSFER_NONE
+        else:
+            self.transfer = transfer
+        self.parent = None # A Class or Interface
+
+
+class Callback(Callable):
+
+    def __init__(self, name, retval, parameters, throws, ctype=None):
+        Callable.__init__(self, name, retval, parameters, throws)
+        self.ctype = ctype
diff --git a/giscanner/cachestore.py b/giscanner/cachestore.py
new file mode 100644 (file)
index 0000000..44e3b04
--- /dev/null
@@ -0,0 +1,196 @@
+# -*- Mode: Python -*-
+# GObject-Introspection - a framework for introspecting GObject libraries
+# Copyright (C) 2008-2010  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 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.
+#
+
+import errno
+import cPickle
+import glob
+import hashlib
+import os
+import shutil
+import sys
+import tempfile
+
+import giscanner
+
+_CACHE_VERSION_FILENAME = '.cache-version'
+
+def _get_versionhash():
+    toplevel = os.path.dirname(giscanner.__file__)
+    # Use pyc instead of py to avoid extra IO
+    sources = glob.glob(os.path.join(toplevel, '*.pyc'))
+    sources.append(sys.argv[0])
+    # Using mtimes is a bit (5x) faster than hashing the file contents
+    mtimes = (str(os.stat(source).st_mtime) for source in sources)
+    return hashlib.sha1(''.join(mtimes)).hexdigest()
+
+def _get_cachedir():
+    if 'GI_SCANNER_DISABLE_CACHE' in os.environ:
+        return None
+    homedir = os.environ.get('HOME')
+    if homedir is None:
+        return None
+    if not os.path.exists(homedir):
+        return None
+
+    cachedir = os.path.join(homedir, '.cache')
+    if not os.path.exists(cachedir):
+        try:
+            os.mkdir(cachedir, 0755)
+        except OSError:
+            return None
+
+    scannerdir = os.path.join(cachedir, 'g-ir-scanner')
+    if not os.path.exists(scannerdir):
+        try:
+            os.mkdir(scannerdir, 0755)
+        except OSError:
+            return None
+    # If it exists and is a file, don't cache at all
+    elif not os.path.isdir(scannerdir):
+        return None
+    return scannerdir
+
+
+class CacheStore(object):
+
+    def __init__(self):
+        try:
+            self._directory = _get_cachedir()
+        except OSError, e:
+            if e.errno != errno.EPERM:
+                raise
+            self._directory = None
+
+        self._check_cache_version()
+
+    def _check_cache_version(self):
+        if self._directory is None:
+            return
+
+        current_hash = _get_versionhash()
+        version = os.path.join(self._directory, _CACHE_VERSION_FILENAME)
+        try:
+            cache_hash = open(version).read()
+        except IOError, e:
+            # File does not exist
+            if e.errno == errno.ENOENT:
+                cache_hash = 0
+            else:
+                raise
+
+        if current_hash == cache_hash:
+            return
+
+        self._clean()
+        try:
+            fp = open(version, 'w')
+        except IOError, e:
+            # Permission denied
+            if e.errno == errno.EACCES:
+                return
+            else:
+                raise
+
+        fp.write(current_hash)
+
+    def _get_filename(self, filename):
+        # If we couldn't create the directory we're probably
+        # on a read only home directory where we just disable
+        # the cache all together.
+        if self._directory is None:
+            return
+        hexdigest = hashlib.sha1(filename).hexdigest()
+        return os.path.join(self._directory, hexdigest)
+
+    def _cache_is_valid(self, store_filename, filename):
+        return (os.stat(store_filename).st_mtime >=
+                os.stat(filename).st_mtime)
+
+    def _remove_filename(self, filename):
+        try:
+            os.unlink(filename)
+        except IOError, e:
+            # Permission denied
+            if e.errno == errno.EACCES:
+                return
+            else:
+                raise
+        except OSError, e:
+            # File does not exist
+            if e.errno == errno.ENOENT:
+                return
+            else:
+                raise
+
+    def _clean(self):
+        for filename in os.listdir(self._directory):
+            if filename == _CACHE_VERSION_FILENAME:
+                continue
+            self._remove_filename(os.path.join(self._directory, filename))
+
+    def store(self, filename, data):
+        store_filename = self._get_filename(filename)
+        if store_filename is None:
+            return
+
+        if (os.path.exists(store_filename) and
+            self._cache_is_valid(store_filename, filename)):
+            return None
+
+        tmp_fd, tmp_filename = tempfile.mkstemp(prefix='g-ir-scanner-cache-')
+        try:
+            cPickle.dump(data, os.fdopen(tmp_fd, 'w'))
+        except IOError, e:
+            # No space left on device
+            if e.errno == errno.ENOSPC:
+                self._remove_filename(tmp_filename)
+                return
+            else:
+                raise
+
+        try:
+            shutil.move(tmp_filename, store_filename)
+        except IOError, e:
+            # Permission denied
+            if e.errno == errno.EACCES:
+                self._remove_filename(tmp_filename)
+            else:
+                raise
+
+    def load(self, filename):
+        store_filename = self._get_filename(filename)
+        if store_filename is None:
+            return
+        try:
+            fd = open(store_filename)
+        except IOError, e:
+            if e.errno == errno.ENOENT:
+                return None
+            else:
+                raise
+        if not self._cache_is_valid(store_filename, filename):
+            return None
+        try:
+            data = cPickle.load(fd)
+        except (AttributeError, EOFError, ValueError, cPickle.BadPickleGet):
+            # Broken cache entry, remove it
+            self._remove_filename(store_filename)
+            data = None
+        return data
diff --git a/giscanner/codegen.py b/giscanner/codegen.py
new file mode 100644 (file)
index 0000000..b73a7da
--- /dev/null
@@ -0,0 +1,140 @@
+# -*- Mode: Python -*-
+# GObject-Introspection - a framework for introspecting GObject libraries
+# Copyright (C) 2010  Red Hat, Inc.
+#
+# 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 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.
+#
+
+from __future__ import with_statement
+
+from contextlib import contextmanager
+
+from . import ast
+
+class CCodeGenerator(object):
+    def __init__(self, namespace, out_h_filename, out_c_filename):
+        self.out_h_filename = out_h_filename
+        self.out_c_filename = out_c_filename
+        self._function_bodies = {}
+        self.namespace = namespace
+
+    def gen_symbol(self, name):
+        name = name.replace(' ', '_')
+        return '%s_%s' % (self.namespace.symbol_prefixes[0], name)
+
+    def _typecontainer_to_ctype(self, param):
+        if (isinstance(param, ast.Parameter) and
+            param.direction in (ast.PARAM_DIRECTION_OUT,
+                                ast.PARAM_DIRECTION_INOUT)):
+            suffix = '*'
+        else:
+            suffix = ''
+        if (param.type.is_equiv((ast.TYPE_STRING, ast.TYPE_FILENAME)) and
+            param.transfer == ast.PARAM_TRANSFER_NONE):
+            return "const gchar*" + suffix
+        return param.type.ctype + suffix
+
+    def _write_prelude(self, out, func):
+        out.write("""
+%s
+%s (""" % (self._typecontainer_to_ctype(func.retval), func.symbol))
+        l = len(func.parameters)
+        if func.parameters:
+            for i, param in enumerate(func.parameters):
+                ctype = self._typecontainer_to_ctype(param)
+                out.write('%s %s' % (ctype, param.argname))
+                if i < l - 1:
+                    out.write(", ")
+        else:
+            out.write('void')
+        out.write(")")
+
+    def _write_prototype(self, func):
+        self._write_prelude(self.out_h, func)
+        self.out_h.write(";\n\n")
+
+    def _write_annotation_transfer(self, transfer):
+        self.out_c.write("(transfer %s)" % (transfer, ))
+
+    def _write_docs(self, func):
+        self.out_c.write("/**\n * %s:\n" % (func.symbol, ))
+        for param in func.parameters:
+            self.out_c.write(" * @%s: " % (param.argname, ))
+            if param.direction in (ast.PARAM_DIRECTION_OUT,
+                                   ast.PARAM_DIRECTION_INOUT):
+                if param.caller_allocates:
+                    allocate_string = ' caller-allocates'
+                else:
+                    allocate_string = ''
+                self.out_c.write("(%s%s) " % (param.direction,
+                                              allocate_string))
+                self._write_annotation_transfer(param.transfer)
+            self.out_c.write(":\n")
+        self.out_c.write(' *\n')
+        self.out_c.write(' * Undocumented.\n')
+        self.out_c.write(' *\n')
+        self.out_c.write(' * Returns: ')
+        self._write_annotation_transfer(func.retval.transfer)
+        self.out_c.write('\n */')
+
+    @contextmanager
+    def _function(self, func):
+        self._write_prototype(func)
+        self._write_docs(func)
+        self._write_prelude(self.out_c, func)
+        self.out_c.write("\n{\n")
+        yield
+        self.out_c.write("}\n\n")
+
+    def _codegen_start(self):
+        warning = '/* GENERATED BY testcodegen.py; DO NOT EDIT */\n\n'
+        self.out_h.write(warning)
+        nsupper = self.namespace.name.upper()
+        self.out_h.write("""
+#ifndef __%s_H__
+#define __%s_H__
+
+#include <glib-object.h>
+""" % (nsupper, nsupper))
+
+        self.out_c.write(warning)
+        self.out_c.write("""#include "%s"\n\n""" % (self.out_h_filename, ))
+
+    def _codegen_end(self):
+        self.out_h.write("""#endif\n""")
+
+        self.out_h.close()
+        self.out_c.close()
+
+    def set_function_body(self, node, body):
+        assert isinstance(node, ast.Function)
+        self._function_bodies[node] = body
+
+    def codegen(self):
+        self.out_h = open(self.out_h_filename, 'w')
+        self.out_c = open(self.out_c_filename, 'w')
+
+        self._codegen_start()
+
+        for node in self.namespace.itervalues():
+            if isinstance(node, ast.Function):
+                with self._function(node):
+                    body = self._function_bodies.get(node)
+                    if not body:
+                        body = ''
+                    self.out_c.write(body)
+
+        self._codegen_end()
diff --git a/giscanner/docmain.py b/giscanner/docmain.py
new file mode 100644 (file)
index 0000000..1ca92a1
--- /dev/null
@@ -0,0 +1,58 @@
+# -*- Mode: Python -*-
+# GObject-Introspection - a framework for introspecting GObject libraries
+# Copyright (C) 2008-2011 Johan Dahlin
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+
+import os
+import optparse
+
+from .mallardwriter import MallardWriter
+from .transformer import Transformer
+
+def doc_main(args):
+    parser = optparse.OptionParser('%prog [options] GIR-file')
+
+    parser.add_option("-o", "--output",
+                      action="store", dest="output",
+                      help="Directory to write output to")
+    parser.add_option("-l", "--language",
+                      action="store", dest="language",
+                      default="Python",
+                      help="Output language")
+
+    options, args = parser.parse_args(args)
+    if not options.output:
+        raise SystemExit("missing output parameter")
+    if not os.path.isdir(options.output):
+        raise SystemExit("wrong output parameter: %s", options.output)
+
+    if len(args) < 2:
+        raise SystemExit("Need an input GIR filename")
+
+    if 'UNINSTALLED_INTROSPECTION_SRCDIR' in os.environ:
+        top_srcdir = os.environ['UNINSTALLED_INTROSPECTION_SRCDIR']
+        top_builddir = os.environ['UNINSTALLED_INTROSPECTION_BUILDDIR']
+        extra_include_dirs = [os.path.join(top_srcdir, 'gir'), top_builddir]
+    else:
+        extra_include_dirs = []
+    transformer = Transformer.parse_from_gir(args[1], extra_include_dirs)
+
+    writer = MallardWriter(transformer, options.language)
+    writer.write(options.output)
+
+    return 0
diff --git a/giscanner/dumper.py b/giscanner/dumper.py
new file mode 100644 (file)
index 0000000..baa51a9
--- /dev/null
@@ -0,0 +1,304 @@
+# -*- Mode: Python -*-
+# GObject-Introspection - a framework for introspecting GObject libraries
+# Copyright (C) 2008 Colin Walters
+# 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 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.
+#
+
+import os
+import sys
+import subprocess
+import shutil
+import tempfile
+
+from .gdumpparser import IntrospectionBinary
+from . import utils
+
+# bugzilla.gnome.org/558436
+# Compile a binary program which is then linked to a library
+# we want to introspect, in order to call its get_type functions.
+
+_PROGRAM_TEMPLATE = """/* This file is generated, do not edit */
+#include <glib.h>
+#include <string.h>
+#include <stdlib.h>
+
+%(gdump_include)s
+
+int
+main(int argc, char **argv)
+{
+  GError *error = NULL;
+  const char *introspect_dump_prefix = "--introspect-dump=";
+
+  g_type_init ();
+
+  %(init_sections)s
+
+  if (argc != 2 || !g_str_has_prefix (argv[1], introspect_dump_prefix))
+    {
+      g_printerr ("Usage: %%s --introspect-dump=input,output", argv[0]);
+      exit (1);
+    }
+
+  if (!dump_irepository (argv[1] + strlen(introspect_dump_prefix), &error))
+    {
+      g_printerr ("%%s\\n", error->message);
+      exit (1);
+    }
+  exit (0);
+}
+"""
+
+
+class CompilerError(Exception):
+    pass
+
+
+class LinkerError(Exception):
+    pass
+
+
+class DumpCompiler(object):
+
+    def __init__(self, options, get_type_functions, error_quark_functions):
+        self._options = options
+        self._get_type_functions = get_type_functions
+        self._error_quark_functions = error_quark_functions
+
+        self._compiler_cmd = os.environ.get('CC', 'gcc')
+        self._linker_cmd = os.environ.get('CC', self._compiler_cmd)
+        self._pkgconfig_cmd = os.environ.get('PKG_CONFIG', 'pkg-config')
+
+        self._uninst_srcdir = os.environ.get(
+            'UNINSTALLED_INTROSPECTION_SRCDIR')
+        self._packages = ['gio-2.0 gthread-2.0 gmodule-2.0']
+        self._packages.extend(options.packages)
+
+    # Public API
+
+    def run(self):
+        # We have to use the current directory to work around Unix
+        # sysadmins who mount /tmp noexec
+        tmpdir = tempfile.mkdtemp('', 'tmp-introspect', dir=os.getcwd())
+
+        tpl_args = {}
+        if self._uninst_srcdir is not None:
+            gdump_path = os.path.join(self._uninst_srcdir, 'girepository', 'gdump.c')
+        else:
+            gdump_path = os.path.join(os.path.join(DATADIR), 'gobject-introspection-1.0',
+                                      'gdump.c')
+        if not os.path.isfile(gdump_path):
+            raise SystemExit("Couldn't find %r" % (gdump_path, ))
+        gdump_file = open(gdump_path)
+        gdump_contents = gdump_file.read()
+        gdump_file.close()
+        tpl_args['gdump_include'] = gdump_contents
+        tpl_args['init_sections'] = "\n".join(self._options.init_sections)
+
+        c_path = self._generate_tempfile(tmpdir, '.c')
+        f = open(c_path, 'w')
+        f.write(_PROGRAM_TEMPLATE % tpl_args)
+
+        # We need to reference our get_type and error_quark functions
+        # to make sure they are pulled in at the linking stage if the
+        # library is a static library rather than a shared library.
+        if len(self._get_type_functions) > 0:
+            for func in self._get_type_functions:
+                f.write("extern GType " + func + "(void);\n")
+            f.write("GType (*GI_GET_TYPE_FUNCS_[])(void) = {\n")
+            first = True
+            for func in self._get_type_functions:
+                if first:
+                    first = False
+                else:
+                    f.write(",\n")
+                f.write("  " + func)
+            f.write("\n};\n")
+        if len(self._error_quark_functions) > 0:
+            for func in self._error_quark_functions:
+                f.write("extern GQuark " + func + "(void);\n")
+            f.write("GQuark (*GI_ERROR_QUARK_FUNCS_[])(void) = {\n")
+            first = True
+            for func in self._error_quark_functions:
+                if first:
+                    first = False
+                else:
+                    f.write(",\n")
+                f.write("  " + func)
+            f.write("\n};\n")
+        f.close()
+
+        o_path = self._generate_tempfile(tmpdir, '.o')
+
+        if os.name == 'nt':
+            ext = 'exe'
+        else:
+            ext = ''
+
+        bin_path = self._generate_tempfile(tmpdir, ext)
+
+        try:
+            self._compile(o_path, c_path)
+        except CompilerError, e:
+            if not utils.have_debug_flag('save-temps'):
+                shutil.rmtree(tmpdir)
+            raise SystemExit('compilation of temporary binary failed:' + str(e))
+
+        try:
+            self._link(bin_path, o_path)
+        except LinkerError, e:
+            if not utils.have_debug_flag('save-temps'):
+                shutil.rmtree(tmpdir)
+            raise SystemExit('linking of temporary binary failed: ' + str(e))
+
+        return IntrospectionBinary([bin_path], tmpdir)
+
+    # Private API
+
+    def _generate_tempfile(self, tmpdir, suffix=''):
+        tmpl = '%s-%s%s' % (self._options.namespace_name,
+                            self._options.namespace_version, suffix)
+        return os.path.join(tmpdir, tmpl)
+
+    def _run_pkgconfig(self, flag):
+        proc = subprocess.Popen(
+            [self._pkgconfig_cmd, flag] + self._packages,
+            stdout=subprocess.PIPE)
+        return proc.communicate()[0].split()
+
+    def _compile(self, output, *sources):
+        # Not strictly speaking correct, but easier than parsing shell
+        args = self._compiler_cmd.split()
+        # Do not add -Wall when using init code as we do not include any
+        # header of the library being introspected
+        if self._compiler_cmd == 'gcc' and not self._options.init_sections:
+            args.append('-Wall')
+        pkgconfig_flags = self._run_pkgconfig('--cflags')
+        args.extend(pkgconfig_flags)
+        cflags = os.environ.get('CFLAGS')
+        if (cflags):
+            for iflag in cflags.split():
+                args.append(iflag)
+        for include in self._options.cpp_includes:
+            args.append('-I' + include)
+        args.extend(['-c', '-o', output])
+        for source in sources:
+            if not os.path.exists(source):
+                raise CompilerError(
+                    "Could not find c source file: %s" % (source, ))
+        args.extend(list(sources))
+        if not self._options.quiet:
+            print "g-ir-scanner: compile: %s" % (
+                subprocess.list2cmdline(args), )
+            sys.stdout.flush()
+        try:
+            subprocess.check_call(args)
+        except subprocess.CalledProcessError, e:
+            raise CompilerError(e)
+
+    def _link(self, output, *sources):
+        args = []
+        libtool = utils.get_libtool_command(self._options)
+        if libtool:
+            args.extend(libtool)
+            args.append('--mode=link')
+            args.append('--tag=CC')
+            if self._options.quiet:
+                args.append('--silent')
+
+        args.extend(self._linker_cmd.split())
+        args.extend(['-o', output])
+        if libtool:
+            if os.name == 'nt':
+                args.append('-export-all-symbols')
+            else:
+                args.append('-export-dynamic')
+
+        cflags = os.environ.get('CFLAGS')
+        if (cflags):
+            for iflag in cflags.split():
+                args.append(iflag)
+
+        # Make sure to list the library to be introspected first since it's
+        # likely to be uninstalled yet and we want the uninstalled RPATHs have
+        # priority (or we might run with installed library that is older)
+
+        for source in sources:
+            if not os.path.exists(source):
+                raise CompilerError(
+                    "Could not find object file: %s" % (source, ))
+        args.extend(list(sources))
+
+        if not self._options.external_library:
+            self._add_link_internal_args(args, libtool)
+        else:
+            self._add_link_external_args(args)
+
+        if not self._options.quiet:
+            print "g-ir-scanner: link: %s" % (
+                subprocess.list2cmdline(args), )
+            sys.stdout.flush()
+        try:
+            subprocess.check_call(args)
+        except subprocess.CalledProcessError, e:
+            raise LinkerError(e)
+
+    def _add_link_internal_args(self, args, libtool):
+        # An "internal" link is where the library to be introspected
+        # is being built in the current directory.
+
+        # Search the current directory first
+        args.append('-L.')
+
+        # https://bugzilla.gnome.org/show_bug.cgi?id=625195
+        if not libtool:
+            args.append('-Wl,-rpath=.')
+
+        for library in self._options.libraries:
+            if library.endswith(".la"): # explicitly specified libtool library
+                args.append(library)
+            else:
+                args.append('-l' + library)
+
+        for library_path in self._options.library_paths:
+            args.append('-L' + library_path)
+            if os.path.isabs(library_path):
+                if libtool:
+                    args.append('-rpath')
+                    args.append(library_path)
+                else:
+                    args.append('-Wl,-rpath=' + library_path)
+
+        args.extend(self._run_pkgconfig('--libs'))
+
+    def _add_link_external_args(self, args):
+        # An "external" link is where the library to be introspected
+        # is installed on the system; this case is used for the scanning
+        # of GLib in gobject-introspection itself.
+
+        args.extend(self._run_pkgconfig('--libs'))
+        for library in self._options.libraries:
+            if library.endswith(".la"): # explicitly specified libtool library
+                args.append(library)
+            else:
+                args.append('-l' + library)
+
+def compile_introspection_binary(options, get_type_functions,
+                                 error_quark_functions):
+    dc = DumpCompiler(options, get_type_functions, error_quark_functions)
+    return dc.run()
diff --git a/giscanner/gdumpparser.py b/giscanner/gdumpparser.py
new file mode 100644 (file)
index 0000000..c0b13f4
--- /dev/null
@@ -0,0 +1,551 @@
+# -*- Mode: Python -*-
+# GObject-Introspection - a framework for introspecting GObject libraries
+# 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 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.
+#
+
+import os
+import sys
+import tempfile
+import shutil
+import subprocess
+from xml.etree.cElementTree import parse
+
+from . import ast
+from . import message
+from . import utils
+from .transformer import TransformerException
+from .utils import to_underscores
+
+# GParamFlags
+G_PARAM_READABLE = 1 << 0
+G_PARAM_WRITABLE = 1 << 1
+G_PARAM_CONSTRUCT = 1 << 2
+G_PARAM_CONSTRUCT_ONLY = 1 << 3
+G_PARAM_LAX_VALIDATION = 1 << 4
+G_PARAM_STATIC_NAME = 1 << 5
+G_PARAM_STATIC_NICK = 1 << 6
+G_PARAM_STATIC_BLURB = 1 << 7
+
+
+class IntrospectionBinary(object):
+
+    def __init__(self, args, tmpdir=None):
+        self.args = args
+        if tmpdir is None:
+            self.tmpdir = tempfile.mkdtemp('', 'tmp-introspect')
+        else:
+            self.tmpdir = tmpdir
+
+
+class Unresolved(object):
+
+    def __init__(self, target):
+        self.target = target
+
+
+class UnknownTypeError(Exception):
+    pass
+
+
+class GDumpParser(object):
+
+    def __init__(self, transformer):
+        self._transformer = transformer
+        self._namespace = transformer.namespace
+        self._binary = None
+        self._get_type_functions = []
+        self._error_quark_functions = []
+        self._error_domains = {}
+        self._boxed_types = {}
+        self._private_internal_types = {}
+
+    # Public API
+
+    def init_parse(self):
+        """Do parsing steps that don't involve the introspection binary
+
+        This does enough work that get_type_functions() can be called.
+
+        """
+
+        # First pass: parsing
+        for node in self._namespace.itervalues():
+            if isinstance(node, ast.Function):
+                self._initparse_function(node)
+
+        if self._namespace.name == 'GObject' or self._namespace.name == 'GLib':
+            for node in self._namespace.itervalues():
+                if isinstance(node, ast.Record):
+                    self._initparse_gobject_record(node)
+
+    def get_get_type_functions(self):
+        return self._get_type_functions
+
+    def get_error_quark_functions(self):
+        return self._error_quark_functions
+
+    def set_introspection_binary(self, binary):
+        self._binary = binary
+
+    def parse(self):
+        """Do remaining parsing steps requiring introspection binary"""
+
+        # Get all the GObject data by passing our list of get_type
+        # functions to the compiled binary, returning an XML blob.
+        tree = self._execute_binary_get_tree()
+        root = tree.getroot()
+        for child in root:
+            if child.tag == 'error-quark':
+                self._introspect_error_quark(child)
+            else:
+                self._introspect_type(child)
+
+        # Pair up boxed types and class records
+        for name, boxed in self._boxed_types.iteritems():
+            self._pair_boxed_type(boxed)
+        for node in self._namespace.itervalues():
+            if isinstance(node, (ast.Class, ast.Interface)):
+                self._find_class_record(node)
+
+        # Clear the _get_type functions out of the namespace;
+        # Anyone who wants them can get them from the ast.Class/Interface/Boxed
+        to_remove = []
+        for name, node in self._namespace.iteritems():
+            if isinstance(node, ast.Registered) and node.get_type is not None:
+                get_type_name = node.get_type
+                if get_type_name == 'intern':
+                    continue
+                assert get_type_name, node
+                (ns, name) = self._transformer.split_csymbol(get_type_name)
+                assert ns is self._namespace
+                get_type_func = self._namespace.get(name)
+                assert get_type_func, name
+                to_remove.append(get_type_func)
+        for node in to_remove:
+            self._namespace.remove(node)
+
+    # Helper functions
+
+    def _execute_binary_get_tree(self):
+        """Load the library (or executable), returning an XML
+blob containing data gleaned from GObject's primitive introspection."""
+        in_path = os.path.join(self._binary.tmpdir, 'functions.txt')
+        f = open(in_path, 'w')
+        for func in self._get_type_functions:
+            f.write('get-type:')
+            f.write(func)
+            f.write('\n')
+        for func in self._error_quark_functions:
+            f.write('error-quark:')
+            f.write(func)
+            f.write('\n')
+        f.close()
+        out_path = os.path.join(self._binary.tmpdir, 'dump.xml')
+
+        args = []
+        args.extend(self._binary.args)
+        args.append('--introspect-dump=%s,%s' % (in_path, out_path))
+
+        # Invoke the binary, having written our get_type functions to types.txt
+        try:
+            try:
+                subprocess.check_call(args, stdout=sys.stdout, stderr=sys.stderr)
+            except subprocess.CalledProcessError, e:
+                # Clean up temporaries
+                raise SystemExit(e)
+            return parse(out_path)
+        finally:
+            if not utils.have_debug_flag('save-temps'):
+                shutil.rmtree(self._binary.tmpdir)
+
+    # Parser
+
+    def _initparse_function(self, func):
+        symbol = func.symbol
+        if symbol.startswith('_'):
+            return
+        elif (symbol.endswith('_get_type') or symbol.endswith('_get_gtype')):
+            self._initparse_get_type_function(func)
+        elif symbol.endswith('_error_quark'):
+            self._initparse_error_quark_function(func)
+
+    def _initparse_get_type_function(self, func):
+        if func.symbol == 'g_variant_get_gtype':
+            # We handle variants internally, see _initparse_gobject_record
+            return True
+
+        if func.is_type_meta_function():
+            self._get_type_functions.append(func.symbol)
+            return True
+
+        return False
+
+    def _initparse_error_quark_function(self, func):
+        if (func.retval.type.ctype != 'GQuark'):
+            return False
+        self._error_quark_functions.append(func.symbol)
+        return True
+
+    def _initparse_gobject_record(self, record):
+        if (record.name.startswith('ParamSpec')
+              and not record.name in ('ParamSpecPool', 'ParamSpecClass',
+                                      'ParamSpecTypeInfo')):
+            parent = None
+            if record.name != 'ParamSpec':
+                parent = ast.Type(target_giname='GObject.ParamSpec')
+            prefix = to_underscores(record.name).lower()
+            node = ast.Class(record.name, parent,
+                             ctype=record.ctype,
+                             # GParamSpecXxx has g_type_name 'GParamXxx'
+                             gtype_name=record.ctype.replace('Spec', ''),
+                             get_type='intern',
+                             c_symbol_prefix=prefix)
+            node.fundamental = True
+            if record.name == 'ParamSpec':
+                node.is_abstract = True
+            self._add_record_fields(node)
+            self._namespace.append(node, replace=True)
+        elif record.name == 'Variant':
+            self._boxed_types['GVariant'] = ast.Boxed('Variant',
+                                                      gtype_name='GVariant',
+                                                      get_type='intern',
+                                                      c_symbol_prefix='variant')
+        elif record.name == 'InitiallyUnownedClass':
+            record.fields = self._namespace.get('ObjectClass').fields
+            record.disguised = False
+
+    # Introspection over the data we get from the dynamic
+    # GObject/GType system out of the binary
+
+    def _introspect_type(self, xmlnode):
+        if xmlnode.tag in ('enum', 'flags'):
+            self._introspect_enum(xmlnode)
+        elif xmlnode.tag == 'class':
+            self._introspect_object(xmlnode)
+        elif xmlnode.tag == 'interface':
+            self._introspect_interface(xmlnode)
+        elif xmlnode.tag == 'boxed':
+            self._introspect_boxed(xmlnode)
+        elif xmlnode.tag == 'fundamental':
+            self._introspect_fundamental(xmlnode)
+        else:
+            raise ValueError("Unhandled introspection XML tag %s", xmlnode.tag)
+
+    def _introspect_enum(self, xmlnode):
+        type_name = xmlnode.attrib['name']
+        (get_type, c_symbol_prefix) = self._split_type_and_symbol_prefix(xmlnode)
+        try:
+            enum_name = self._transformer.strip_identifier(type_name)
+        except TransformerException, e:
+            message.fatal(e)
+
+        # The scanned member values are more accurate than the values that the
+        # we dumped from GEnumValue.value because GEnumValue.value has the
+        # values as a 32-bit signed integer, even if they were unsigned
+        # in the source code.
+        previous_values = {}
+        previous = self._namespace.get(enum_name)
+        if isinstance(previous, (ast.Enum, ast.Bitfield)):
+            for member in previous.members:
+                previous_values[member.name] = member.value
+
+        members = []
+        for member in xmlnode.findall('member'):
+            # Keep the name closer to what we'd take from C by default;
+            # see http://bugzilla.gnome.org/show_bug.cgi?id=575613
+            name = member.attrib['nick'].replace('-', '_')
+
+            if name in previous_values:
+                value = previous_values[name]
+            else:
+                value = member.attrib['value']
+
+            members.append(ast.Member(name,
+                                      value,
+                                      member.attrib['name'],
+                                      member.attrib['nick']))
+
+
+        if xmlnode.tag == 'flags':
+            klass = ast.Bitfield
+        else:
+            klass = ast.Enum
+
+        node = klass(enum_name, type_name,
+                     gtype_name=type_name,
+                     c_symbol_prefix=c_symbol_prefix,
+                     members=members,
+                     get_type=xmlnode.attrib['get-type'])
+        self._namespace.append(node, replace=True)
+
+    def _split_type_and_symbol_prefix(self, xmlnode):
+        """Infer the C symbol prefix from the _get_type function."""
+        get_type = xmlnode.attrib['get-type']
+        (ns, name) = self._transformer.split_csymbol(get_type)
+        assert ns is self._namespace
+        if name in ('get_type', '_get_gtype'):
+            message.fatal("""The GObject name %r isn't compatibile
+with the configured identifier prefixes:
+  %r
+The class would have no name.  Most likely you want to specify a
+different --identifier-prefix.""" % (xmlnode.attrib['name'], self._namespace.identifier_prefixes))
+        if name.endswith('_get_type'):
+            type_suffix = '_get_type'
+        else:
+            type_suffix = '_get_gtype'
+        return (get_type, name[:-len(type_suffix)])
+
+    def _introspect_object(self, xmlnode):
+        type_name = xmlnode.attrib['name']
+        is_abstract = bool(xmlnode.attrib.get('abstract', False))
+        (get_type, c_symbol_prefix) = self._split_type_and_symbol_prefix(xmlnode)
+        try:
+            object_name = self._transformer.strip_identifier(type_name)
+        except TransformerException, e:
+            message.fatal(e)
+        node = ast.Class(object_name, None,
+                         gtype_name=type_name,
+                         get_type=get_type,
+                         c_symbol_prefix=c_symbol_prefix,
+                         is_abstract=is_abstract)
+        self._parse_parents(xmlnode, node)
+        self._introspect_properties(node, xmlnode)
+        self._introspect_signals(node, xmlnode)
+        self._introspect_implemented_interfaces(node, xmlnode)
+        self._add_record_fields(node)
+
+        if node.name == 'InitiallyUnowned':
+            # http://bugzilla.gnome.org/show_bug.cgi?id=569408
+            # GInitiallyUnowned is actually a typedef for GObject, but
+            # that's not reflected in the GIR, where it appears as a
+            # subclass (as it appears in the GType hierarchy).  So
+            # what we do here is copy all of the GObject fields into
+            # GInitiallyUnowned so that struct offset computation
+            # works correctly.
+            node.fields = self._namespace.get('Object').fields
+
+        self._namespace.append(node, replace=True)
+
+    def _introspect_interface(self, xmlnode):
+        type_name = xmlnode.attrib['name']
+        (get_type, c_symbol_prefix) = self._split_type_and_symbol_prefix(xmlnode)
+        try:
+            interface_name = self._transformer.strip_identifier(type_name)
+        except TransformerException, e:
+            message.fatal(e)
+        node = ast.Interface(interface_name, None,
+                             gtype_name=type_name,
+                             get_type=get_type,
+                             c_symbol_prefix=c_symbol_prefix)
+        self._introspect_properties(node, xmlnode)
+        self._introspect_signals(node, xmlnode)
+        for child in xmlnode.findall('prerequisite'):
+            name = child.attrib['name']
+            prereq = ast.Type.create_from_gtype_name(name)
+            node.prerequisites.append(prereq)
+
+        record = self._namespace.get(node.name)
+        if isinstance(record, ast.Record):
+            node.ctype = record.ctype
+        else:
+            message.warn_node(node, "Couldn't find associated structure for '%r'" % (node.name, ))
+
+        # GtkFileChooserEmbed is an example of a private interface, we
+        # just filter them out
+        if xmlnode.attrib['get-type'].startswith('_'):
+            self._private_internal_types[type_name] = node
+        else:
+            self._namespace.append(node, replace=True)
+
+    ## WORKAROUND ##
+    # https://bugzilla.gnome.org/show_bug.cgi?id=550616
+    def _introspect_boxed_gstreamer_workaround(self, xmlnode):
+        node = ast.Boxed('ParamSpecMiniObject', gtype_name='GParamSpecMiniObject',
+                         get_type='gst_param_spec_mini_object_get_type',
+                         c_symbol_prefix='param_spec_mini_object')
+        self._boxed_types[node.gtype_name] = node
+
+    def _introspect_boxed(self, xmlnode):
+        type_name = xmlnode.attrib['name']
+
+        # Work around GStreamer legacy naming issue
+        # https://bugzilla.gnome.org/show_bug.cgi?id=550616
+        if type_name == 'GParamSpecMiniObject':
+            self._introspect_boxed_gstreamer_workaround(xmlnode)
+            return
+
+        try:
+            name = self._transformer.strip_identifier(type_name)
+        except TransformerException, e:
+            message.fatal(e)
+        # This one doesn't go in the main namespace; we associate it with
+        # the struct or union
+        (get_type, c_symbol_prefix) = self._split_type_and_symbol_prefix(xmlnode)
+        node = ast.Boxed(name, gtype_name=type_name,
+                         get_type=get_type,
+                         c_symbol_prefix=c_symbol_prefix)
+        self._boxed_types[node.gtype_name] = node
+
+    def _introspect_implemented_interfaces(self, node, xmlnode):
+        gt_interfaces = []
+        for interface in xmlnode.findall('implements'):
+            gitype = ast.Type.create_from_gtype_name(interface.attrib['name'])
+            gt_interfaces.append(gitype)
+        node.interfaces = gt_interfaces
+
+    def _introspect_properties(self, node, xmlnode):
+        for pspec in xmlnode.findall('property'):
+            ctype = pspec.attrib['type']
+            flags = int(pspec.attrib['flags'])
+            readable = (flags & G_PARAM_READABLE) != 0
+            writable = (flags & G_PARAM_WRITABLE) != 0
+            construct = (flags & G_PARAM_CONSTRUCT) != 0
+            construct_only = (flags & G_PARAM_CONSTRUCT_ONLY) != 0
+            node.properties.append(ast.Property(
+                pspec.attrib['name'],
+                ast.Type.create_from_gtype_name(ctype),
+                readable, writable, construct, construct_only))
+        node.properties = node.properties
+
+    def _introspect_signals(self, node, xmlnode):
+        for signal_info in xmlnode.findall('signal'):
+            rctype = signal_info.attrib['return']
+            rtype = ast.Type.create_from_gtype_name(rctype)
+            return_ = ast.Return(rtype)
+            parameters = []
+            when = signal_info.attrib.get('when')
+            no_recurse = signal_info.attrib.get('no-recurse', '0') == '1'
+            detailed = signal_info.attrib.get('detailed', '0') == '1'
+            action = signal_info.attrib.get('action', '0') == '1'
+            no_hooks = signal_info.attrib.get('no-hooks', '0') == '1'
+            for i, parameter in enumerate(signal_info.findall('param')):
+                if i == 0:
+                    argname = 'object'
+                else:
+                    argname = 'p%s' % (i-1, )
+                pctype = parameter.attrib['type']
+                ptype = ast.Type.create_from_gtype_name(pctype)
+                param = ast.Parameter(argname, ptype)
+                param.transfer = ast.PARAM_TRANSFER_NONE
+                parameters.append(param)
+            signal = ast.Signal(signal_info.attrib['name'], return_, parameters,
+                                when=when, no_recurse=no_recurse, detailed=detailed,
+                                action=action, no_hooks=no_hooks)
+            node.signals.append(signal)
+        node.signals = node.signals
+
+    def _parse_parents(self, xmlnode, node):
+        parents_str = xmlnode.attrib.get('parents', '')
+        if parents_str != '':
+            parent_types = map(lambda s: ast.Type.create_from_gtype_name(s),
+                               parents_str.split(','))
+        else:
+            parent_types = []
+        node.parent_chain = parent_types
+
+    def _introspect_fundamental(self, xmlnode):
+        type_name = xmlnode.attrib['name']
+
+        is_abstract = bool(xmlnode.attrib.get('abstract', False))
+        (get_type, c_symbol_prefix) = self._split_type_and_symbol_prefix(xmlnode)
+        try:
+            fundamental_name = self._transformer.strip_identifier(type_name)
+        except TransformerException, e:
+            message.warn(e)
+            return
+
+        node = ast.Class(fundamental_name, None,
+                         gtype_name=type_name,
+                         get_type=get_type,
+                         c_symbol_prefix=c_symbol_prefix,
+                         is_abstract=is_abstract)
+        self._parse_parents(xmlnode, node)
+        node.fundamental = True
+        self._introspect_implemented_interfaces(node, xmlnode)
+
+        self._add_record_fields(node)
+        self._namespace.append(node, replace=True)
+
+    def _add_record_fields(self, node):
+        # add record fields
+        record = self._namespace.get(node.name)
+        if not isinstance(record, ast.Record):
+            return
+        node.ctype = record.ctype
+        node.fields = record.fields
+        for field in node.fields:
+            if isinstance(field, ast.Field):
+                # Object instance fields are assumed to be read-only
+                # (see also _find_class_record and transformer.py)
+                field.writable = False
+
+    def _introspect_error_quark(self, xmlnode):
+        symbol = xmlnode.attrib['function']
+        error_domain = xmlnode.attrib['domain']
+        function = self._namespace.get_by_symbol(symbol)
+        if function is None:
+            return
+
+        node = ast.ErrorQuarkFunction(function.name, function.retval,
+                                      function.parameters, function.throws,
+                                      function.symbol, error_domain)
+        self._namespace.append(node, replace=True)
+
+    def _pair_boxed_type(self, boxed):
+        try:
+            name = self._transformer.strip_identifier(boxed.gtype_name)
+        except TransformerException, e:
+            message.fatal(e)
+        pair_node = self._namespace.get(name)
+        if not pair_node:
+            # Keep the "bare" boxed instance
+            self._namespace.append(boxed)
+        elif isinstance(pair_node, (ast.Record, ast.Union)):
+            pair_node.add_gtype(boxed.gtype_name, boxed.get_type)
+            assert boxed.c_symbol_prefix is not None
+            pair_node.c_symbol_prefix = boxed.c_symbol_prefix
+            # Quick hack - reset the disguised flag; we're setting it
+            # incorrectly in the scanner
+            pair_node.disguised = False
+        else:
+            return False
+
+    def _strip_class_suffix(self, name):
+        if (name.endswith('Class') or
+            name.endswith('Iface')):
+            return name[:-5]
+        elif name.endswith('Interface'):
+            return name[:-9]
+        else:
+            return None
+
+    def _find_class_record(self, cls):
+        pair_record = None
+        if isinstance(cls, ast.Class):
+            pair_record = self._namespace.get(cls.name + 'Class')
+        else:
+            for suffix in ('Iface', 'Interface'):
+                pair_record = self._namespace.get(cls.name + suffix)
+                if pair_record:
+                    break
+        if not (pair_record and isinstance(pair_record, ast.Record)):
+            return
+
+        cls.glib_type_struct = pair_record.create_type()
+        cls.inherit_file_positions(pair_record)
+        pair_record.is_gtype_struct_for = cls.create_type()
diff --git a/giscanner/girparser.py b/giscanner/girparser.py
new file mode 100644 (file)
index 0000000..a59037d
--- /dev/null
@@ -0,0 +1,580 @@
+# -*- Mode: Python -*-
+# GObject-Introspection - a framework for introspecting GObject libraries
+# 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 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.
+#
+
+import os
+
+from xml.etree.cElementTree import parse
+
+from . import ast
+from .girwriter import COMPATIBLE_GIR_VERSION
+
+CORE_NS = "http://www.gtk.org/introspection/core/1.0"
+C_NS = "http://www.gtk.org/introspection/c/1.0"
+GLIB_NS = "http://www.gtk.org/introspection/glib/1.0"
+
+
+def _corens(tag):
+    return '{%s}%s' % (CORE_NS, tag)
+
+
+def _glibns(tag):
+    return '{%s}%s' % (GLIB_NS, tag)
+
+
+def _cns(tag):
+    return '{%s}%s' % (C_NS, tag)
+
+
+class GIRParser(object):
+
+    def __init__(self, types_only=False):
+        self._types_only = types_only
+        self._shared_libraries = []
+        self._includes = set()
+        self._pkgconfig_packages = set()
+        self._namespace = None
+        self._filename_stack = []
+
+    # Public API
+
+    def parse(self, filename):
+        filename = os.path.abspath(filename)
+        self._filename_stack.append(filename)
+        tree = parse(filename)
+        self.parse_tree(tree)
+        self._filename_stack.pop()
+
+    def parse_tree(self, tree):
+        self._includes.clear()
+        self._namespace = None
+        self._shared_libraries = []
+        self._pkgconfig_packages = set()
+        self._c_includes = set()
+        self._c_prefix = None
+        self._parse_api(tree.getroot())
+
+    def get_namespace(self):
+        return self._namespace
+
+    def get_shared_libraries(self):
+        return self._shared_libraries
+
+    def get_includes(self):
+        return self._includes
+
+    def get_c_includes(self):
+        return self._c_includes
+
+    def get_c_prefix(self):
+        return self._c_prefix
+
+    def get_pkgconfig_packages(self):
+        if not hasattr(self, '_pkgconfig_packages'):
+            self._pkgconfig_packages = []
+        return self._pkgconfig_packages
+
+    def get_doc(self):
+        return parse(self._filename)
+
+    # Private
+
+    def _find_first_child(self, node, name_or_names):
+        if isinstance(name_or_names, str):
+            for child in node.getchildren():
+                if child.tag == name_or_names:
+                    return child
+        else:
+            for child in node.getchildren():
+                if child.tag in name_or_names:
+                    return child
+        return None
+
+    def _find_children(self, node, name):
+        return [child for child in node.getchildren() if child.tag == name]
+
+    def _get_current_file(self):
+        if not self._filename_stack:
+            return None
+        cwd = os.getcwd() + os.sep
+        curfile = self._filename_stack[-1]
+        if curfile.startswith(cwd):
+            return curfile[len(cwd):]
+        return curfile
+
+    def _parse_api(self, root):
+        assert root.tag == _corens('repository')
+        version = root.attrib['version']
+        if version != COMPATIBLE_GIR_VERSION:
+            raise SystemExit("%s: Incompatible version %s (supported: %s)" \
+                             % (self._get_current_file(),
+                                version, COMPATIBLE_GIR_VERSION))
+
+        for node in root.getchildren():
+            if node.tag == _corens('include'):
+                self._parse_include(node)
+            elif node.tag == _corens('package'):
+                self._parse_pkgconfig_package(node)
+            elif node.tag == _cns('include'):
+                self._parse_c_include(node)
+
+        ns = root.find(_corens('namespace'))
+        assert ns is not None
+        identifier_prefixes = ns.attrib.get(_cns('identifier-prefixes'))
+        if identifier_prefixes:
+            identifier_prefixes = identifier_prefixes.split(',')
+        symbol_prefixes = ns.attrib.get(_cns('symbol-prefixes'))
+        if symbol_prefixes:
+            symbol_prefixes = symbol_prefixes.split(',')
+        self._namespace = ast.Namespace(ns.attrib['name'],
+                                    ns.attrib['version'],
+                                    identifier_prefixes=identifier_prefixes,
+                                    symbol_prefixes=symbol_prefixes)
+        if 'shared-library' in ns.attrib:
+            self._shared_libraries.extend(
+                ns.attrib['shared-library'].split(','))
+
+        parser_methods = {
+            _corens('alias'): self._parse_alias,
+            _corens('bitfield'): self._parse_enumeration_bitfield,
+            _corens('callback'): self._parse_callback,
+            _corens('class'): self._parse_object_interface,
+            _corens('enumeration'): self._parse_enumeration_bitfield,
+            _corens('interface'): self._parse_object_interface,
+            _corens('record'): self._parse_record,
+            _corens('union'): self._parse_union,
+            _glibns('boxed'): self._parse_boxed,
+            }
+
+        if not self._types_only:
+            parser_methods[_corens('constant')] = self._parse_constant
+            parser_methods[_corens('function')] = self._parse_function
+
+        for node in ns.getchildren():
+            method = parser_methods.get(node.tag)
+            if method is not None:
+                method(node)
+
+    def _parse_include(self, node):
+        include = ast.Include(node.attrib['name'],
+                          node.attrib['version'])
+        self._includes.add(include)
+
+    def _parse_pkgconfig_package(self, node):
+        self._pkgconfig_packages.add(node.attrib['name'])
+
+    def _parse_c_include(self, node):
+        self._c_includes.add(node.attrib['name'])
+
+    def _parse_alias(self, node):
+        typeval = self._parse_type(node)
+        alias = ast.Alias(node.attrib['name'],
+                      typeval,
+                      node.attrib.get(_cns('type')))
+        self._parse_generic_attribs(node, alias)
+        self._namespace.append(alias)
+
+    def _parse_generic_attribs(self, node, obj):
+        assert isinstance(obj, ast.Annotated)
+        introspectable = node.attrib.get('introspectable')
+        if introspectable:
+            obj.introspectable = int(introspectable) > 0
+        if self._types_only:
+            return
+        doc = node.find(_corens('doc'))
+        if doc is not None:
+            if doc.text:
+                obj.doc = doc.text
+        version = node.attrib.get('version')
+        if version:
+            obj.version = version
+        deprecated = node.attrib.get('deprecated')
+        if deprecated:
+            obj.deprecated = deprecated
+        deprecated_version = node.attrib.get('deprecated-version')
+        if deprecated_version:
+            obj.deprecated_version = deprecated_version
+
+    def _parse_object_interface(self, node):
+        parent = node.attrib.get('parent')
+        if parent:
+            parent_type = self._namespace.type_from_name(parent)
+        else:
+            parent_type = None
+
+        ctor_args = [node.attrib['name'],
+                     parent_type]
+        ctor_kwargs = {'gtype_name': node.attrib[_glibns('type-name')],
+                       'get_type': node.attrib[_glibns('get-type')],
+                       'c_symbol_prefix': node.attrib.get(_cns('symbol-prefix')),
+                       'ctype': node.attrib.get(_cns('type'))}
+        if node.tag == _corens('interface'):
+            klass = ast.Interface
+        elif node.tag == _corens('class'):
+            klass = ast.Class
+            is_abstract = node.attrib.get('abstract')
+            is_abstract = is_abstract and is_abstract != '0'
+            ctor_kwargs['is_abstract'] = is_abstract
+        else:
+            raise AssertionError(node)
+
+        obj = klass(*ctor_args, **ctor_kwargs)
+        self._parse_generic_attribs(node, obj)
+        type_struct = node.attrib.get(_glibns('type-struct'))
+        if type_struct:
+            obj.glib_type_struct = self._namespace.type_from_name(type_struct)
+        if klass == ast.Class:
+            is_fundamental = node.attrib.get(_glibns('fundamental'))
+            if is_fundamental and is_fundamental != '0':
+                obj.fundamental = True
+            for func_id in ['ref-func', 'unref-func',
+                            'set-value-func', 'get-value-func']:
+                func_name = node.attrib.get(_glibns(func_id))
+                obj.__dict__[func_id.replace('-', '_')] = func_name
+        self._namespace.append(obj)
+
+        if self._types_only:
+            return
+        for iface in self._find_children(node, _corens('implements')):
+            obj.interfaces.append(self._namespace.type_from_name(iface.attrib['name']))
+        for iface in self._find_children(node, _corens('prerequisite')):
+            obj.prerequisites.append(self._namespace.type_from_name(iface.attrib['name']))
+        for func_node in self._find_children(node, _corens('function')):
+            func = self._parse_function_common(func_node, ast.Function, obj)
+            obj.static_methods.append(func)
+        for method in self._find_children(node, _corens('method')):
+            func = self._parse_function_common(method, ast.Function, obj)
+            func.is_method = True
+            obj.methods.append(func)
+        for method in self._find_children(node, _corens('virtual-method')):
+            func = self._parse_function_common(method, ast.VFunction, obj)
+            self._parse_generic_attribs(method, func)
+            func.is_method = True
+            func.invoker = method.get('invoker')
+            obj.virtual_methods.append(func)
+        for ctor in self._find_children(node, _corens('constructor')):
+            func = self._parse_function_common(ctor, ast.Function, obj)
+            func.is_constructor = True
+            obj.constructors.append(func)
+        obj.fields.extend(self._parse_fields(node))
+        for prop in self._find_children(node, _corens('property')):
+            obj.properties.append(self._parse_property(prop, obj))
+        for signal in self._find_children(node, _glibns('signal')):
+            obj.signals.append(self._parse_function_common(signal, ast.Signal, obj))
+
+    def _parse_callback(self, node):
+        callback = self._parse_function_common(node, ast.Callback)
+        self._namespace.append(callback)
+
+    def _parse_function(self, node):
+        function = self._parse_function_common(node, ast.Function)
+        self._namespace.append(function)
+
+    def _parse_function_common(self, node, klass, parent=None):
+        name = node.attrib['name']
+        returnnode = node.find(_corens('return-value'))
+        if not returnnode:
+            raise ValueError('node %r has no return-value' % (name, ))
+        transfer = returnnode.attrib.get('transfer-ownership')
+        retval = ast.Return(self._parse_type(returnnode), transfer)
+        self._parse_generic_attribs(returnnode, retval)
+        parameters = []
+
+        throws = (node.attrib.get('throws') == '1')
+
+        if klass is ast.Callback:
+            func = klass(name, retval, parameters, throws,
+                         node.attrib.get(_cns('type')))
+        elif klass is ast.Function:
+            identifier = node.attrib.get(_cns('identifier'))
+            func = klass(name, retval, parameters, throws, identifier)
+        elif klass is ast.VFunction:
+            func = klass(name, retval, parameters, throws)
+        elif klass is ast.Signal:
+            func = klass(name, retval, parameters,
+                         when=node.attrib.get('when'),
+                         no_recurse=node.attrib.get('no-recurse', '0') == '1',
+                         detailed=node.attrib.get('detailed', '0') == '1',
+                         action=node.attrib.get('action', '0') == '1',
+                         no_hooks=node.attrib.get('no-hooks', '0') == '1')
+        else:
+            assert False
+
+        func.shadows = node.attrib.get('shadows', None)
+        func.shadowed_by = node.attrib.get('shadowed-by', None)
+        func.moved_to = node.attrib.get('moved-to', None)
+        func.parent = parent
+
+        parameters_node = node.find(_corens('parameters'))
+        if (parameters_node is not None):
+            for paramnode in self._find_children(parameters_node, _corens('parameter')):
+                typeval = self._parse_type(paramnode)
+                param = ast.Parameter(paramnode.attrib.get('name'),
+                                  typeval,
+                                  paramnode.attrib.get('direction') or ast.PARAM_DIRECTION_IN,
+                                  paramnode.attrib.get('transfer-ownership'),
+                                  paramnode.attrib.get('allow-none') == '1',
+                                  paramnode.attrib.get('scope'),
+                                  paramnode.attrib.get('caller-allocates') == '1')
+                self._parse_generic_attribs(paramnode, param)
+                parameters.append(param)
+            for i, paramnode in enumerate(self._find_children(parameters_node,
+                                                              _corens('parameter'))):
+                param = parameters[i]
+                self._parse_type_second_pass(func, paramnode, param.type)
+                closure = paramnode.attrib.get('closure')
+                if closure:
+                    idx = int(closure)
+                    assert idx < len(parameters), "%d >= %d" % (idx, len(parameters))
+                    param.closure_name = parameters[idx].argname
+                destroy = paramnode.attrib.get('destroy')
+                if destroy:
+                    idx = int(destroy)
+                    assert idx < len(parameters), "%d >= %d" % (idx, len(parameters))
+                    param.destroy_name = parameters[idx].argname
+
+        self._parse_type_second_pass(func, returnnode, retval.type)
+
+        self._parse_generic_attribs(node, func)
+
+        return func
+
+    def _parse_fields(self, node):
+        res = []
+        names = (_corens('field'), _corens('record'), _corens('union'), _corens('callback'))
+        for child in node.getchildren():
+            if child.tag in names:
+                fieldobj = self._parse_field(child)
+                res.append(fieldobj)
+        return res
+
+    def _parse_compound(self, cls, node):
+        compound = cls(node.attrib.get('name'),
+                       ctype=node.attrib.get(_cns('type')),
+                       disguised=node.attrib.get('disguised') == '1',
+                       gtype_name=node.attrib.get(_glibns('type-name')),
+                       get_type=node.attrib.get(_glibns('get-type')),
+                       c_symbol_prefix=node.attrib.get(_cns('symbol-prefix')))
+        if node.attrib.get('foreign') == '1':
+            compound.foreign = True
+        self._parse_generic_attribs(node, compound)
+        if not self._types_only:
+            compound.fields.extend(self._parse_fields(node))
+            for method in self._find_children(node, _corens('method')):
+                compound.methods.append(
+                    self._parse_function_common(method, ast.Function, compound))
+            for func in self._find_children(node, _corens('function')):
+                compound.static_methods.append(
+                    self._parse_function_common(func, ast.Function, compound))
+            for ctor in self._find_children(node, _corens('constructor')):
+                compound.constructors.append(
+                    self._parse_function_common(ctor, ast.Function, compound))
+        return compound
+
+    def _parse_record(self, node, anonymous=False):
+        struct = self._parse_compound(ast.Record, node)
+        is_gtype_struct_for = node.attrib.get(_glibns('is-gtype-struct-for'))
+        if is_gtype_struct_for is not None:
+            struct.is_gtype_struct_for = self._namespace.type_from_name(is_gtype_struct_for)
+        if not anonymous:
+            self._namespace.append(struct)
+        return struct
+
+    def _parse_union(self, node, anonymous=False):
+        union = self._parse_compound(ast.Union, node)
+        if not anonymous:
+            self._namespace.append(union)
+        return union
+
+    def _parse_type_simple(self, typenode):
+        # ast.Fields can contain inline callbacks
+        if typenode.tag == _corens('callback'):
+            typeval = self._namespace.type_from_name(typenode.attrib['name'])
+            typeval.ctype = typenode.attrib.get(_cns('type'))
+            return typeval
+        # ast.Arrays have their own toplevel XML
+        elif typenode.tag == _corens('array'):
+            array_type = typenode.attrib.get('name')
+            element_type = self._parse_type(typenode)
+            array_ctype = typenode.attrib.get(_cns('type'))
+            ret = ast.Array(array_type, element_type, ctype=array_ctype)
+            # zero-terminated defaults to true...
+            zero = typenode.attrib.get('zero-terminated')
+            if zero and zero == '0':
+                ret.zeroterminated = False
+            fixed_size = typenode.attrib.get('fixed-size')
+            if fixed_size:
+                ret.size = int(fixed_size)
+
+            return ret
+        elif typenode.tag == _corens('varargs'):
+            return ast.Varargs()
+        elif typenode.tag == _corens('type'):
+            name = typenode.attrib.get('name')
+            ctype = typenode.attrib.get(_cns('type'))
+            if name is None:
+                if ctype is None:
+                    return ast.TypeUnknown()
+                return ast.Type(ctype=ctype)
+            elif name in ['GLib.List', 'GLib.SList']:
+                subchild = self._find_first_child(typenode,
+                               map(_corens, ('callback', 'array', 'varargs', 'type')))
+                if subchild is not None:
+                    element_type = self._parse_type(typenode)
+                else:
+                    element_type = ast.TYPE_ANY
+                return ast.List(name, element_type, ctype=ctype)
+            elif name == 'GLib.HashTable':
+                subchildren = self._find_children(typenode, _corens('type'))
+                subchildren_types = map(self._parse_type_simple, subchildren)
+                while len(subchildren_types) < 2:
+                    subchildren_types.append(ast.TYPE_ANY)
+                return ast.Map(subchildren_types[0],
+                           subchildren_types[1],
+                           ctype=ctype)
+            else:
+                return self._namespace.type_from_name(name, ctype)
+        else:
+            assert False, "Failed to parse inner type"
+
+    def _parse_type(self, node):
+        for name in map(_corens, ('callback', 'array', 'varargs', 'type')):
+            typenode = node.find(name)
+            if typenode is not None:
+                return self._parse_type_simple(typenode)
+        assert False, "Failed to parse toplevel type"
+
+    def _parse_type_second_pass(self, parent, node, typeval):
+        """A hack necessary to handle the integer parameter indexes on
+           array types."""
+        typenode = node.find(_corens('array'))
+        if typenode is None:
+            return
+        lenidx = typenode.attrib.get('length')
+        if lenidx is not None:
+            idx = int(lenidx)
+            assert idx < len(parent.parameters), "%r %d >= %d" \
+                      % (parent, idx, len(parent.parameters))
+            typeval.length_param_name = parent.parameters[idx].argname
+
+    def _parse_boxed(self, node):
+        obj = ast.Boxed(node.attrib[_glibns('name')],
+                        gtype_name=node.attrib[_glibns('type-name')],
+                        get_type=node.attrib[_glibns('get-type')],
+                        c_symbol_prefix=node.attrib.get(_cns('symbol-prefix')))
+        self._parse_generic_attribs(node, obj)
+        self._namespace.append(obj)
+        if self._types_only:
+            return
+        for method in self._find_children(node, _corens('method')):
+            func = self._parse_function_common(method, ast.Function, obj)
+            func.is_method = True
+            obj.methods.append(func)
+        for ctor in self._find_children(node, _corens('constructor')):
+            obj.constructors.append(
+                self._parse_function_common(ctor, ast.Function, obj))
+        for callback in self._find_children(node, _corens('callback')):
+            obj.fields.append(
+                self._parse_function_common(callback, ast.Callback, obj))
+
+    def _parse_field(self, node):
+        type_node = None
+        anonymous_node = None
+        if node.tag in map(_corens, ('record', 'union')):
+            anonymous_elt = node
+        else:
+            anonymous_elt = self._find_first_child(node, _corens('callback'))
+        if anonymous_elt is not None:
+            if anonymous_elt.tag == _corens('callback'):
+                anonymous_node = self._parse_function_common(anonymous_elt, ast.Callback)
+            elif anonymous_elt.tag == _corens('record'):
+                anonymous_node = self._parse_record(anonymous_elt, anonymous=True)
+            elif anonymous_elt.tag == _corens('union'):
+                anonymous_node = self._parse_union(anonymous_elt, anonymous=True)
+            else:
+                assert False, anonymous_elt.tag
+        else:
+            assert node.tag == _corens('field'), node.tag
+            type_node = self._parse_type(node)
+        field = ast.Field(node.attrib.get('name'),
+                      type_node,
+                      node.attrib.get('readable') != '0',
+                      node.attrib.get('writable') == '1',
+                      node.attrib.get('bits'),
+                      anonymous_node=anonymous_node)
+        field.private = node.attrib.get('private') == '1'
+        self._parse_generic_attribs(node, field)
+        return field
+
+    def _parse_property(self, node, parent):
+        prop = ast.Property(node.attrib['name'],
+                        self._parse_type(node),
+                        node.attrib.get('readable') != '0',
+                        node.attrib.get('writable') == '1',
+                        node.attrib.get('construct') == '1',
+                        node.attrib.get('construct-only') == '1',
+                        node.attrib.get('transfer-ownership'))
+        self._parse_generic_attribs(node, prop)
+        prop.parent = parent
+        return prop
+
+    def _parse_member(self, node):
+        member = ast.Member(node.attrib['name'],
+                            node.attrib['value'],
+                            node.attrib.get(_cns('identifier')),
+                            node.attrib.get(_glibns('nick')))
+        self._parse_generic_attribs(node, member)
+        return member
+
+    def _parse_constant(self, node):
+        type_node = self._parse_type(node)
+        constant = ast.Constant(node.attrib['name'],
+                                type_node,
+                                node.attrib['value'],
+                                node.attrib.get(_cns('type')))
+        self._parse_generic_attribs(node, constant)
+        self._namespace.append(constant)
+
+    def _parse_enumeration_bitfield(self, node):
+        name = node.attrib.get('name')
+        ctype = node.attrib.get(_cns('type'))
+        get_type = node.attrib.get(_glibns('get-type'))
+        type_name = node.attrib.get(_glibns('type-name'))
+        glib_error_domain = node.attrib.get(_glibns('error-domain'))
+        if node.tag == _corens('bitfield'):
+            klass = ast.Bitfield
+        else:
+            klass = ast.Enum
+        members = []
+        obj = klass(name, ctype,
+                    members=members,
+                    gtype_name=type_name,
+                    get_type=get_type)
+        obj.error_domain = glib_error_domain
+        obj.ctype = ctype
+        self._parse_generic_attribs(node, obj)
+        self._namespace.append(obj)
+
+        if self._types_only:
+            return
+        for member in self._find_children(node, _corens('member')):
+            members.append(self._parse_member(member))
+        for func_node in self._find_children(node, _corens('function')):
+            func = self._parse_function_common(func_node, ast.Function)
+            obj.static_methods.append(func)
diff --git a/giscanner/girwriter.py b/giscanner/girwriter.py
new file mode 100644 (file)
index 0000000..bfe82a8
--- /dev/null
@@ -0,0 +1,580 @@
+# -*- Mode: Python -*-
+# GObject-Introspection - a framework for introspecting GObject libraries
+# Copyright (C) 2008  Johan Dahlin
+# Copyright (C) 2008, 2009 Red Hat, Inc.
+#
+# 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 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.
+#
+
+from __future__ import with_statement
+
+from . import ast
+from .xmlwriter import XMLWriter
+
+# Bump this for *incompatible* changes to the .gir.
+# Compatible changes we just make inline
+COMPATIBLE_GIR_VERSION = '1.2'
+
+class GIRWriter(XMLWriter):
+
+    def __init__(self, namespace, shlibs, includes, pkgs, c_includes):
+        super(GIRWriter, self).__init__()
+        self.write_comment(
+'''This file was automatically generated from C sources - DO NOT EDIT!
+To affect the contents of this file, edit the original C definitions,
+and/or use gtk-doc annotations. ''')
+        self._write_repository(namespace, shlibs, includes, pkgs,
+                               c_includes)
+
+    def _write_repository(self, namespace, shlibs, includes=None,
+                          packages=None, c_includes=None):
+        if includes is None:
+            includes = frozenset()
+        if packages is None:
+            packages = frozenset()
+        if c_includes is None:
+            c_includes = frozenset()
+        attrs = [
+            ('version', COMPATIBLE_GIR_VERSION),
+            ('xmlns', 'http://www.gtk.org/introspection/core/1.0'),
+            ('xmlns:c', 'http://www.gtk.org/introspection/c/1.0'),
+            ('xmlns:glib', 'http://www.gtk.org/introspection/glib/1.0'),
+            ]
+        with self.tagcontext('repository', attrs):
+            for include in sorted(includes):
+                self._write_include(include)
+            for pkg in sorted(set(packages)):
+                self._write_pkgconfig_pkg(pkg)
+            for c_include in sorted(set(c_includes)):
+                self._write_c_include(c_include)
+            self._namespace = namespace
+            self._write_namespace(namespace, shlibs)
+            self._namespace = None
+
+    def _write_include(self, include):
+        attrs = [('name', include.name), ('version', include.version)]
+        self.write_tag('include', attrs)
+
+    def _write_pkgconfig_pkg(self, package):
+        attrs = [('name', package)]
+        self.write_tag('package', attrs)
+
+    def _write_c_include(self, c_include):
+        attrs = [('name', c_include)]
+        self.write_tag('c:include', attrs)
+
+    def _write_namespace(self, namespace, shlibs):
+        attrs = [('name', namespace.name),
+                 ('version', namespace.version),
+                 ('shared-library', ','.join(shlibs)),
+                 ('c:identifier-prefixes', ','.join(namespace.identifier_prefixes)),
+                 ('c:symbol-prefixes', ','.join(namespace.symbol_prefixes))]
+        with self.tagcontext('namespace', attrs):
+            # We define a custom sorting function here because
+            # we want aliases to be first.  They're a bit
+            # special because the typelib compiler expands them.
+            def nscmp(a, b):
+                if isinstance(a, ast.Alias):
+                    if isinstance(b, ast.Alias):
+                        return cmp(a.name, b.name)
+                    else:
+                        return -1
+                elif isinstance(b, ast.Alias):
+                    return 1
+                else:
+                    return cmp(a, b)
+            for node in sorted(namespace.itervalues(), cmp=nscmp):
+                self._write_node(node)
+
+    def _write_node(self, node):
+        if isinstance(node, ast.Function):
+            self._write_function(node)
+        elif isinstance(node, ast.Enum):
+            self._write_enum(node)
+        elif isinstance(node, ast.Bitfield):
+            self._write_bitfield(node)
+        elif isinstance(node, (ast.Class, ast.Interface)):
+            self._write_class(node)
+        elif isinstance(node, ast.Callback):
+            self._write_callback(node)
+        elif isinstance(node, ast.Record):
+            self._write_record(node)
+        elif isinstance(node, ast.Union):
+            self._write_union(node)
+        elif isinstance(node, ast.Boxed):
+            self._write_boxed(node)
+        elif isinstance(node, ast.Member):
+            # FIXME: atk_misc_instance singleton
+            pass
+        elif isinstance(node, ast.Alias):
+            self._write_alias(node)
+        elif isinstance(node, ast.Constant):
+            self._write_constant(node)
+        else:
+            print 'WRITER: Unhandled node', node
+
+    def _append_version(self, node, attrs):
+        if node.version:
+            attrs.append(('version', node.version))
+
+    def _write_generic(self, node):
+        for key, value in node.attributes:
+            self.write_tag('attribute', [('name', key), ('value', value)])
+        if hasattr(node, 'doc') and node.doc:
+            self.write_tag('doc', [('xml:whitespace', 'preserve')],
+                           node.doc)
+
+    def _append_node_generic(self, node, attrs):
+        if node.skip or not node.introspectable:
+            attrs.append(('introspectable', '0'))
+        if node.deprecated:
+            attrs.append(('deprecated', node.deprecated))
+            if node.deprecated_version:
+                attrs.append(('deprecated-version',
+                              node.deprecated_version))
+
+    def _append_throws(self, func, attrs):
+        if func.throws:
+            attrs.append(('throws', '1'))
+
+    def _write_alias(self, alias):
+        attrs = [('name', alias.name)]
+        if alias.ctype is not None:
+            attrs.append(('c:type', alias.ctype))
+        self._append_node_generic(alias, attrs)
+        with self.tagcontext('alias', attrs):
+            self._write_generic(alias)
+            self._write_type_ref(alias.target)
+
+    def _write_callable(self, callable, tag_name, extra_attrs):
+        attrs = [('name', callable.name)]
+        attrs.extend(extra_attrs)
+        self._append_version(callable, attrs)
+        self._append_node_generic(callable, attrs)
+        self._append_throws(callable, attrs)
+        with self.tagcontext(tag_name, attrs):
+            self._write_generic(callable)
+            self._write_return_type(callable.retval, parent=callable)
+            self._write_parameters(callable, callable.parameters)
+
+    def _write_function(self, func, tag_name='function'):
+        attrs = []
+        if hasattr(func, 'symbol'):
+            attrs.append(('c:identifier', func.symbol))
+        if func.shadowed_by:
+            attrs.append(('shadowed-by', func.shadowed_by))
+        elif func.shadows:
+            attrs.append(('shadows', func.shadows))
+        if func.moved_to is not None:
+            attrs.append(('moved-to', func.moved_to))
+        self._write_callable(func, tag_name, attrs)
+
+    def _write_method(self, method):
+        self._write_function(method, tag_name='method')
+
+    def _write_static_method(self, method):
+        self._write_function(method, tag_name='function')
+
+    def _write_constructor(self, method):
+        self._write_function(method, tag_name='constructor')
+
+    def _write_return_type(self, return_, parent=None):
+        if not return_:
+            return
+
+        attrs = []
+        if return_.transfer:
+            attrs.append(('transfer-ownership', return_.transfer))
+        if return_.skip:
+            attrs.append(('skip', '1'))
+        with self.tagcontext('return-value', attrs):
+            self._write_generic(return_)
+            self._write_type(return_.type, function=parent)
+
+    def _write_parameters(self, parent, parameters):
+        if not parameters:
+            return
+        with self.tagcontext('parameters'):
+            for parameter in parameters:
+                self._write_parameter(parent, parameter)
+
+    def _write_parameter(self, parent, parameter):
+        attrs = []
+        if parameter.argname is not None:
+            attrs.append(('name', parameter.argname))
+        if (parameter.direction is not None) and (parameter.direction != 'in'):
+            attrs.append(('direction', parameter.direction))
+            attrs.append(('caller-allocates',
+                          '1' if parameter.caller_allocates else '0'))
+        if parameter.transfer:
+            attrs.append(('transfer-ownership',
+                          parameter.transfer))
+        if parameter.allow_none:
+            attrs.append(('allow-none', '1'))
+        if parameter.scope:
+            attrs.append(('scope', parameter.scope))
+        if parameter.closure_name is not None:
+            idx = parent.get_parameter_index(parameter.closure_name)
+            attrs.append(('closure', '%d' % (idx, )))
+        if parameter.destroy_name is not None:
+            idx = parent.get_parameter_index(parameter.destroy_name)
+            attrs.append(('destroy', '%d' % (idx, )))
+        if parameter.skip:
+            attrs.append(('skip', '1'))
+        with self.tagcontext('parameter', attrs):
+            self._write_generic(parameter)
+            self._write_type(parameter.type, function=parent)
+
+    def _type_to_name(self, typeval):
+        if not typeval.resolved:
+            raise AssertionError("Caught unresolved type %r (ctype=%r)" % (typeval, typeval.ctype))
+        assert typeval.target_giname is not None
+        prefix = self._namespace.name + '.'
+        if typeval.target_giname.startswith(prefix):
+            return typeval.target_giname[len(prefix):]
+        return typeval.target_giname
+
+    def _write_type_ref(self, ntype):
+        """ Like _write_type, but only writes the type name rather than the full details """
+        assert isinstance(ntype, ast.Type), ntype
+        attrs = []
+        if ntype.ctype:
+            attrs.append(('c:type', ntype.ctype))
+        if isinstance(ntype, ast.Array):
+            if ntype.array_type != ast.Array.C:
+                attrs.insert(0, ('name', ntype.array_type))
+        elif isinstance(ntype, ast.List):
+            if ntype.name:
+                attrs.insert(0, ('name', ntype.name))
+        elif isinstance(ntype, ast.Map):
+            attrs.insert(0, ('name', 'GLib.HashTable'))
+        else:
+            if ntype.target_giname:
+                attrs.insert(0, ('name', self._type_to_name(ntype)))
+            elif ntype.target_fundamental:
+                attrs.insert(0, ('name', ntype.target_fundamental))
+
+        self.write_tag('type', attrs)
+
+    def _write_type(self, ntype, relation=None, function=None):
+        assert isinstance(ntype, ast.Type), ntype
+        attrs = []
+        if ntype.ctype:
+            attrs.append(('c:type', ntype.ctype))
+        if isinstance(ntype, ast.Varargs):
+            with self.tagcontext('varargs', []):
+                pass
+        elif isinstance(ntype, ast.Array):
+            if ntype.array_type != ast.Array.C:
+                attrs.insert(0, ('name', ntype.array_type))
+            # we insert an explicit 'zero-terminated' attribute
+            # when it is false, or when it would not be implied
+            # by the absence of length and fixed-size
+            if not ntype.zeroterminated:
+                attrs.insert(0, ('zero-terminated', '0'))
+            elif (ntype.zeroterminated
+                  and (ntype.size is not None or ntype.length_param_name is not None)):
+                attrs.insert(0, ('zero-terminated', '1'))
+            if ntype.size is not None:
+                attrs.append(('fixed-size', '%d' % (ntype.size, )))
+            if ntype.length_param_name is not None:
+                assert function
+                attrs.insert(0, ('length', '%d'
+                            % (function.get_parameter_index(ntype.length_param_name, ))))
+
+            with self.tagcontext('array', attrs):
+                self._write_type(ntype.element_type)
+        elif isinstance(ntype, ast.List):
+            if ntype.name:
+                attrs.insert(0, ('name', ntype.name))
+            with self.tagcontext('type', attrs):
+                self._write_type(ntype.element_type)
+        elif isinstance(ntype, ast.Map):
+            attrs.insert(0, ('name', 'GLib.HashTable'))
+            with self.tagcontext('type', attrs):
+                self._write_type(ntype.key_type)
+                self._write_type(ntype.value_type)
+        else:
+            # REWRITEFIXME - enable this for 1.2
+            if ntype.target_giname:
+                attrs.insert(0, ('name', self._type_to_name(ntype)))
+            elif ntype.target_fundamental:
+                # attrs = [('fundamental', ntype.target_fundamental)]
+                attrs.insert(0, ('name', ntype.target_fundamental))
+            elif ntype.target_foreign:
+                attrs.insert(0, ('foreign', '1'))
+            self.write_tag('type', attrs)
+
+    def _append_registered(self, node, attrs):
+        assert isinstance(node, ast.Registered)
+        if node.get_type:
+            attrs.extend([('glib:type-name', node.gtype_name),
+                          ('glib:get-type', node.get_type)])
+
+    def _write_enum(self, enum):
+        attrs = [('name', enum.name)]
+        self._append_version(enum, attrs)
+        self._append_node_generic(enum, attrs)
+        self._append_registered(enum, attrs)
+        attrs.append(('c:type', enum.ctype))
+        if enum.error_domain:
+            attrs.append(('glib:error-domain', enum.error_domain))
+
+        with self.tagcontext('enumeration', attrs):
+            self._write_generic(enum)
+            for member in enum.members:
+                self._write_member(member)
+            for method in sorted(enum.static_methods):
+                self._write_static_method(method)
+
+    def _write_bitfield(self, bitfield):
+        attrs = [('name', bitfield.name)]
+        self._append_version(bitfield, attrs)
+        self._append_node_generic(bitfield, attrs)
+        self._append_registered(bitfield, attrs)
+        attrs.append(('c:type', bitfield.ctype))
+        with self.tagcontext('bitfield', attrs):
+            self._write_generic(bitfield)
+            for member in bitfield.members:
+                self._write_member(member)
+            for method in sorted(bitfield.static_methods):
+                self._write_static_method(method)
+
+    def _write_member(self, member):
+        attrs = [('name', member.name),
+                 ('value', str(member.value)),
+                 ('c:identifier', member.symbol)]
+        if member.nick is not None:
+            attrs.append(('glib:nick', member.nick))
+        self.write_tag('member', attrs)
+
+    def _write_constant(self, constant):
+        attrs = [('name', constant.name),
+                 ('value', constant.value),
+                 ('c:type', constant.ctype)]
+        with self.tagcontext('constant', attrs):
+            self._write_type(constant.value_type)
+
+    def _write_class(self, node):
+        attrs = [('name', node.name),
+                 ('c:symbol-prefix', node.c_symbol_prefix),
+                 ('c:type', node.ctype)]
+        self._append_version(node, attrs)
+        self._append_node_generic(node, attrs)
+        if isinstance(node, ast.Class):
+            tag_name = 'class'
+            if node.parent is not None:
+                attrs.append(('parent',
+                              self._type_to_name(node.parent)))
+            if node.is_abstract:
+                attrs.append(('abstract', '1'))
+        else:
+            assert isinstance(node, ast.Interface)
+            tag_name = 'interface'
+        attrs.append(('glib:type-name', node.gtype_name))
+        if node.get_type is not None:
+            attrs.append(('glib:get-type', node.get_type))
+        if node.glib_type_struct is not None:
+            attrs.append(('glib:type-struct',
+                          self._type_to_name(node.glib_type_struct)))
+        if isinstance(node, ast.Class):
+            if node.fundamental:
+                attrs.append(('glib:fundamental', '1'))
+            if node.ref_func:
+                attrs.append(('glib:ref-func', node.ref_func))
+            if node.unref_func:
+                attrs.append(('glib:unref-func', node.unref_func))
+            if node.set_value_func:
+                attrs.append(('glib:set-value-func', node.set_value_func))
+            if node.get_value_func:
+                attrs.append(('glib:get-value-func', node.get_value_func))
+        with self.tagcontext(tag_name, attrs):
+            self._write_generic(node)
+            if isinstance(node, ast.Class):
+                for iface in sorted(node.interfaces):
+                    self.write_tag('implements',
+                                   [('name', self._type_to_name(iface))])
+            if isinstance(node, ast.Interface):
+                for iface in sorted(node.prerequisites):
+                    self.write_tag('prerequisite',
+                                   [('name', self._type_to_name(iface))])
+            if isinstance(node, ast.Class):
+                for method in sorted(node.constructors):
+                    self._write_constructor(method)
+            if isinstance(node, (ast.Class, ast.Interface)):
+                for method in sorted(node.static_methods):
+                    self._write_static_method(method)
+            for vfunc in sorted(node.virtual_methods):
+                self._write_vfunc(vfunc)
+            for method in sorted(node.methods):
+                self._write_method(method)
+            for prop in sorted(node.properties):
+                self._write_property(prop)
+            for field in node.fields:
+                self._write_field(field)
+            for signal in sorted(node.signals):
+                self._write_signal(signal)
+
+    def _write_boxed(self, boxed):
+        attrs = [('glib:name', boxed.name)]
+        if boxed.c_symbol_prefix is not None:
+            attrs.append(('c:symbol-prefix', boxed.c_symbol_prefix))
+        self._append_registered(boxed, attrs)
+        with self.tagcontext('glib:boxed', attrs):
+            self._write_generic(boxed)
+            for method in sorted(boxed.constructors):
+                self._write_constructor(method)
+            for method in sorted(boxed.methods):
+                self._write_method(method)
+            for method in sorted(boxed.static_methods):
+                self._write_static_method(method)
+
+    def _write_property(self, prop):
+        attrs = [('name', prop.name)]
+        self._append_version(prop, attrs)
+        self._append_node_generic(prop, attrs)
+        # Properties are assumed to be readable (see also generate.c)
+        if not prop.readable:
+            attrs.append(('readable', '0'))
+        if prop.writable:
+            attrs.append(('writable', '1'))
+        if prop.construct:
+            attrs.append(('construct', '1'))
+        if prop.construct_only:
+            attrs.append(('construct-only', '1'))
+        if prop.transfer:
+            attrs.append(('transfer-ownership', prop.transfer))
+        with self.tagcontext('property', attrs):
+            self._write_generic(prop)
+            self._write_type(prop.type)
+
+    def _write_vfunc(self, vf):
+        attrs = []
+        if vf.invoker:
+            attrs.append(('invoker', vf.invoker))
+        self._write_callable(vf, 'virtual-method', attrs)
+
+    def _write_callback(self, callback):
+        attrs = []
+        if callback.namespace:
+            attrs.append(('c:type', callback.ctype or callback.c_name))
+        self._write_callable(callback, 'callback', attrs)
+
+    def _write_record(self, record, extra_attrs=[]):
+        is_gtype_struct = False
+        attrs = list(extra_attrs)
+        if record.name is not None:
+            attrs.append(('name', record.name))
+        if record.ctype is not None: # the record might be anonymous
+            attrs.append(('c:type', record.ctype))
+        if record.disguised:
+            attrs.append(('disguised', '1'))
+        if record.foreign:
+            attrs.append(('foreign', '1'))
+        if record.is_gtype_struct_for is not None:
+            is_gtype_struct = True
+            attrs.append(('glib:is-gtype-struct-for',
+                          self._type_to_name(record.is_gtype_struct_for)))
+        self._append_version(record, attrs)
+        self._append_node_generic(record, attrs)
+        self._append_registered(record, attrs)
+        if record.c_symbol_prefix:
+            attrs.append(('c:symbol-prefix', record.c_symbol_prefix))
+        with self.tagcontext('record', attrs):
+            self._write_generic(record)
+            if record.fields:
+                for field in record.fields:
+                    self._write_field(field, is_gtype_struct)
+            for method in sorted(record.constructors):
+                self._write_constructor(method)
+            for method in sorted(record.methods):
+                self._write_method(method)
+            for method in sorted(record.static_methods):
+                self._write_static_method(method)
+
+    def _write_union(self, union):
+        attrs = []
+        if union.name is not None:
+            attrs.append(('name', union.name))
+        if union.ctype is not None: # the union might be anonymous
+            attrs.append(('c:type', union.ctype))
+        self._append_version(union, attrs)
+        self._append_node_generic(union, attrs)
+        self._append_registered(union, attrs)
+        if union.c_symbol_prefix:
+            attrs.append(('c:symbol-prefix', union.c_symbol_prefix))
+        with self.tagcontext('union', attrs):
+            self._write_generic(union)
+            if union.fields:
+                for field in union.fields:
+                    self._write_field(field)
+            for method in sorted(union.constructors):
+                self._write_constructor(method)
+            for method in sorted(union.methods):
+                self._write_method(method)
+            for method in sorted(union.static_methods):
+                self._write_static_method(method)
+
+    def _write_field(self, field, is_gtype_struct=False):
+        if field.anonymous_node:
+            if isinstance(field.anonymous_node, ast.Callback):
+                attrs = [('name', field.name)]
+                self._append_node_generic(field, attrs)
+                with self.tagcontext('field', attrs):
+                    self._write_callback(field.anonymous_node)
+            elif isinstance(field.anonymous_node, ast.Record):
+                self._write_record(field.anonymous_node)
+            elif isinstance(field.anonymous_node, ast.Union):
+                self._write_union(field.anonymous_node)
+            else:
+                raise AssertionError("Unknown field anonymous: %r" \
+                                         % (field.anonymous_node, ))
+        else:
+            attrs = [('name', field.name)]
+            self._append_node_generic(field, attrs)
+            # Fields are assumed to be read-only
+            # (see also girparser.c and generate.c)
+            if not field.readable:
+                attrs.append(('readable', '0'))
+            if field.writable:
+                attrs.append(('writable', '1'))
+            if field.bits:
+                attrs.append(('bits', str(field.bits)))
+            if field.private:
+                attrs.append(('private', '1'))
+            with self.tagcontext('field', attrs):
+                self._write_generic(field)
+                self._write_type(field.type)
+
+    def _write_signal(self, signal):
+        attrs = [('name', signal.name)]
+        if signal.when:
+            attrs.append(('when', signal.when))
+        if signal.no_recurse:
+            attrs.append(('no-recurse', '1'))
+        if signal.detailed:
+            attrs.append(('detailed', '1'))
+        if signal.action:
+            attrs.append(('action', '1'))
+        if signal.no_hooks:
+            attrs.append(('no-hooks', '1'))
+
+        self._append_version(signal, attrs)
+        self._append_node_generic(signal, attrs)
+        with self.tagcontext('glib:signal', attrs):
+            self._write_generic(signal)
+            self._write_return_type(signal.retval)
+            self._write_parameters(signal, signal.parameters)
diff --git a/giscanner/giscannermodule.c b/giscanner/giscannermodule.c
new file mode 100644 (file)
index 0000000..81adbd8
--- /dev/null
@@ -0,0 +1,741 @@
+/* GObject introspection: scanner
+ *
+ * Copyright (C) 2008  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 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+#include <Python.h>
+#include "sourcescanner.h"
+
+#ifdef G_OS_WIN32
+#define USE_WINDOWS
+#endif
+#include "grealpath.h"
+
+#ifdef _WIN32
+#include <fcntl.h>
+#include <io.h>
+#define WIN32_LEAN_AND_MEAN
+#define STRICT
+#include <windows.h>
+#endif
+
+DL_EXPORT(void) init_giscanner(void);
+
+#define NEW_CLASS(ctype, name, cname)        \
+static const PyMethodDef _Py##cname##_methods[];    \
+PyTypeObject Py##cname##_Type = {             \
+    PyObject_HEAD_INIT(NULL)                  \
+    0,                                       \
+    "scanner." name,                          \
+    sizeof(ctype),                           \
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,            \
+    0, 0, 0, 0,        0, 0,                         \
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, \
+    NULL, 0, 0, 0,                           \
+    0,       \
+    0, 0,                                     \
+    0,                                        \
+    0, 0, NULL, NULL, 0, 0,                  \
+    0             \
+}
+
+#define REGISTER_TYPE(d, name, type)         \
+    type.ob_type = &PyType_Type;              \
+    type.tp_alloc = PyType_GenericAlloc;      \
+    type.tp_new = PyType_GenericNew;          \
+    if (PyType_Ready (&type))                 \
+       return;                               \
+    PyDict_SetItemString (d, name, (PyObject *)&type); \
+    Py_INCREF (&type);
+
+typedef struct {
+  PyObject_HEAD
+  GISourceType *type;
+} PyGISourceType;
+
+static PyObject * pygi_source_type_new (GISourceType *type);
+
+typedef struct {
+  PyObject_HEAD
+  GISourceSymbol *symbol;
+} PyGISourceSymbol;
+
+typedef struct {
+  PyObject_HEAD
+  GISourceScanner *scanner;
+} PyGISourceScanner;
+
+NEW_CLASS (PyGISourceSymbol, "SourceSymbol", GISourceSymbol);
+NEW_CLASS (PyGISourceType, "SourceType", GISourceType);
+NEW_CLASS (PyGISourceScanner, "SourceScanner", GISourceScanner);
+
+
+/* Symbol */
+
+static PyObject *
+pygi_source_symbol_new (GISourceSymbol *symbol)
+{
+  PyGISourceSymbol *self;
+
+  if (symbol == NULL)
+    {
+      Py_INCREF (Py_None);
+      return Py_None;
+    }
+
+  self = (PyGISourceSymbol *)PyObject_New (PyGISourceSymbol,
+                                          &PyGISourceSymbol_Type);
+  self->symbol = symbol;
+  return (PyObject*)self;
+}
+
+static PyObject *
+symbol_get_type (PyGISourceSymbol *self,
+                void             *context)
+{
+  return PyInt_FromLong (self->symbol->type);
+}
+
+static PyObject *
+symbol_get_line (PyGISourceSymbol *self,
+                void             *context)
+{
+  return PyInt_FromLong (self->symbol->line);
+}
+
+static PyObject *
+symbol_get_private (PyGISourceSymbol *self,
+                    void             *context)
+{
+  return PyBool_FromLong (self->symbol->private);
+}
+
+static PyObject *
+symbol_get_ident (PyGISourceSymbol *self,
+                 void            *context)
+{
+
+  if (!self->symbol->ident)
+    {
+      Py_INCREF(Py_None);
+      return Py_None;
+    }
+
+  return PyString_FromString (self->symbol->ident);
+}
+
+static PyObject *
+symbol_get_base_type (PyGISourceSymbol *self,
+                     void             *context)
+{
+  return pygi_source_type_new (self->symbol->base_type);
+}
+
+static PyObject *
+symbol_get_const_int (PyGISourceSymbol *self,
+                     void             *context)
+{
+  if (!self->symbol->const_int_set)
+    {
+      Py_INCREF(Py_None);
+      return Py_None;
+    }
+
+  return PyLong_FromLongLong ((long long)self->symbol->const_int);
+}
+
+static PyObject *
+symbol_get_const_double (PyGISourceSymbol *self,
+                         void             *context)
+{
+  if (!self->symbol->const_double_set)
+    {
+      Py_INCREF(Py_None);
+      return Py_None;
+    }
+  return PyFloat_FromDouble (self->symbol->const_double);
+}
+
+static PyObject *
+symbol_get_const_string (PyGISourceSymbol *self,
+                        void             *context)
+{
+  if (!self->symbol->const_string)
+    {
+      Py_INCREF(Py_None);
+      return Py_None;
+    }
+
+  return PyString_FromString (self->symbol->const_string);
+}
+
+static PyObject *
+symbol_get_source_filename (PyGISourceSymbol *self,
+                            void             *context)
+{
+  if (!self->symbol->source_filename)
+    {
+      Py_INCREF(Py_None);
+      return Py_None;
+    }
+
+  return PyString_FromString (self->symbol->source_filename);
+}
+
+static const PyGetSetDef _PyGISourceSymbol_getsets[] = {
+  /* int ref_count; */
+  { "type", (getter)symbol_get_type, NULL, NULL},
+  /* int id; */
+  { "ident", (getter)symbol_get_ident, NULL, NULL},
+  { "base_type", (getter)symbol_get_base_type, NULL, NULL},
+  /* gboolean const_int_set; */
+  { "const_int", (getter)symbol_get_const_int, NULL, NULL},
+  /* gboolean const_double_set; */
+  { "const_double", (getter)symbol_get_const_double, NULL, NULL},
+  { "const_string", (getter)symbol_get_const_string, NULL, NULL},
+  { "source_filename", (getter)symbol_get_source_filename, NULL, NULL},
+  { "line", (getter)symbol_get_line, NULL, NULL},
+  { "private", (getter)symbol_get_private, NULL, NULL},
+  { 0 }
+};
+
+
+
+/* Type */
+
+static PyObject *
+pygi_source_type_new (GISourceType *type)
+{
+  PyGISourceType *self;
+
+  if (type == NULL)
+    {
+      Py_INCREF (Py_None);
+      return Py_None;
+    }
+
+  self = (PyGISourceType *)PyObject_New (PyGISourceType,
+                                        &PyGISourceType_Type);
+  self->type = type;
+  return (PyObject*)self;
+}
+
+static PyObject *
+type_get_type (PyGISourceType *self,
+              void           *context)
+{
+  return PyInt_FromLong (self->type->type);
+}
+
+static PyObject *
+type_get_storage_class_specifier (PyGISourceType *self,
+                                 void           *context)
+{
+  return PyInt_FromLong (self->type->storage_class_specifier);
+}
+
+static PyObject *
+type_get_type_qualifier (PyGISourceType *self,
+                        void           *context)
+{
+  return PyInt_FromLong (self->type->type_qualifier);
+}
+
+static PyObject *
+type_get_function_specifier (PyGISourceType *self,
+                            void           *context)
+{
+  return PyInt_FromLong (self->type->function_specifier);
+}
+
+static PyObject *
+type_get_name (PyGISourceType *self,
+              void           *context)
+{
+  if (!self->type->name)
+    {
+      Py_INCREF (Py_None);
+      return Py_None;
+    }
+
+  return PyString_FromString (self->type->name);
+}
+
+static PyObject *
+type_get_base_type (PyGISourceType *self,
+                   void           *context)
+{
+  return pygi_source_type_new (self->type->base_type);
+}
+
+static PyObject *
+type_get_child_list (PyGISourceType *self,
+                    void           *context)
+{
+  GList *l;
+  PyObject *list;
+  int i = 0;
+
+  if (!self->type)
+    return Py_BuildValue("[]");
+
+  list = PyList_New (g_list_length (self->type->child_list));
+
+  for (l = self->type->child_list; l; l = l->next)
+    {
+      PyObject *item = pygi_source_symbol_new (l->data);
+      PyList_SetItem (list, i++, item);
+    }
+
+  Py_INCREF (list);
+  return list;
+}
+
+static PyObject *
+type_get_is_bitfield (PyGISourceType *self,
+                            void           *context)
+{
+  return PyInt_FromLong (self->type->is_bitfield);
+}
+
+static const PyGetSetDef _PyGISourceType_getsets[] = {
+  { "type", (getter)type_get_type, NULL, NULL},
+  { "storage_class_specifier", (getter)type_get_storage_class_specifier, NULL, NULL},
+  { "type_qualifier", (getter)type_get_type_qualifier, NULL, NULL},
+  { "function_specifier", (getter)type_get_function_specifier, NULL, NULL},
+  { "name", (getter)type_get_name, NULL, NULL},
+  { "base_type", (getter)type_get_base_type, NULL, NULL},
+  { "child_list", (getter)type_get_child_list, NULL, NULL},
+  { "is_bitfield", (getter)type_get_is_bitfield, NULL, NULL},
+  { 0 }
+};
+
+
+
+/* Scanner */
+
+static int
+pygi_source_scanner_init (PyGISourceScanner *self,
+                         PyObject          *args,
+                         PyObject          *kwargs)
+{
+  if (!PyArg_ParseTuple (args, ":SourceScanner.__init__"))
+    return -1;
+
+  self->scanner = gi_source_scanner_new ();
+
+  return 0;
+}
+
+static PyObject *
+pygi_source_scanner_append_filename (PyGISourceScanner *self,
+                                    PyObject          *args)
+{
+  char *filename;
+
+  if (!PyArg_ParseTuple (args, "s:SourceScanner.append_filename", &filename))
+    return NULL;
+
+  self->scanner->filenames = g_list_append (self->scanner->filenames,
+                                           g_realpath (filename));
+
+  Py_INCREF (Py_None);
+  return Py_None;
+}
+
+static PyObject *
+pygi_source_scanner_parse_macros (PyGISourceScanner *self,
+                                  PyObject          *args)
+{
+  GList *filenames;
+  int i;
+  PyObject *list;
+
+  list = PyTuple_GET_ITEM (args, 0);
+
+  if (!PyList_Check (list))
+    {
+      PyErr_SetString (PyExc_RuntimeError, "parse macro takes a list of filenames");
+      return NULL;
+    }
+
+  filenames = NULL;
+  for (i = 0; i < PyList_Size (list); ++i)
+    {
+      PyObject *obj;
+      char *filename;
+
+      obj = PyList_GetItem (list, i);
+      filename = PyString_AsString (obj);
+
+      filenames = g_list_append (filenames, filename);
+    }
+
+  gi_source_scanner_parse_macros (self->scanner, filenames);
+  g_list_free (filenames);
+
+  Py_INCREF (Py_None);
+  return Py_None;
+}
+
+static PyObject *
+pygi_source_scanner_parse_file (PyGISourceScanner *self,
+                               PyObject          *args)
+{
+  int fd;
+  FILE *fp;
+
+  if (!PyArg_ParseTuple (args, "i:SourceScanner.parse_file", &fd))
+    return NULL;
+
+#ifdef _WIN32
+  /* The file descriptor passed to us is from the C library Python
+   * uses. That is msvcr71.dll at least for Python 2.5. This code, at
+   * least if compiled with mingw, uses msvcrt.dll, so we cannot use
+   * the file descriptor directly. So perform appropriate magic.
+   */
+  {
+    HMODULE msvcr71;
+    int (*p__get_osfhandle) (int);
+    HANDLE handle;
+
+    msvcr71 = GetModuleHandle ("msvcr71.dll");
+    if (!msvcr71)
+      {
+       g_print ("No msvcr71.dll loaded.\n");
+       return NULL;
+      }
+
+    p__get_osfhandle = GetProcAddress (msvcr71, "_get_osfhandle");
+    if (!p__get_osfhandle)
+      {
+       g_print ("No _get_osfhandle found in msvcr71.dll.\n");
+       return NULL;
+      }
+
+    handle = p__get_osfhandle (fd);
+    if (!p__get_osfhandle)
+      {
+       g_print ("Could not get OS handle from msvcr71 fd.\n");
+       return NULL;
+      }
+
+    fd = _open_osfhandle (handle, _O_RDONLY);
+    if (fd == -1)
+      {
+       g_print ("Could not open C fd from OS handle.\n");
+       return NULL;
+      }
+  }
+#endif
+
+  fp = fdopen (fd, "r");
+  if (!fp)
+    {
+      PyErr_SetFromErrno (PyExc_OSError);
+      return NULL;
+    }
+
+  if (!gi_source_scanner_parse_file (self->scanner, fp))
+    {
+      g_print ("Something went wrong during parsing.\n");
+      return NULL;
+    }
+
+  Py_INCREF (Py_None);
+  return Py_None;
+}
+
+static PyObject *
+pygi_source_scanner_lex_filename (PyGISourceScanner *self,
+                                 PyObject          *args)
+{
+  char *filename;
+
+  if (!PyArg_ParseTuple (args, "s:SourceScanner.lex_filename", &filename))
+    return NULL;
+
+  self->scanner->current_filename = g_strdup (filename);
+  if (!gi_source_scanner_lex_filename (self->scanner, filename))
+    {
+      g_print ("Something went wrong during lexing.\n");
+      return NULL;
+    }
+  self->scanner->filenames =
+    g_list_append (self->scanner->filenames, g_strdup (filename));
+
+  Py_INCREF (Py_None);
+  return Py_None;
+}
+
+static PyObject *
+pygi_source_scanner_set_macro_scan (PyGISourceScanner *self,
+                                   PyObject          *args)
+{
+  int macro_scan;
+
+  if (!PyArg_ParseTuple (args, "b:SourceScanner.set_macro_scan", &macro_scan))
+    return NULL;
+
+  gi_source_scanner_set_macro_scan (self->scanner, macro_scan);
+
+  Py_INCREF (Py_None);
+  return Py_None;
+}
+
+static PyObject *
+pygi_source_scanner_get_symbols (PyGISourceScanner *self)
+{
+  GSList *l, *symbols;
+  PyObject *list;
+  int i = 0;
+
+  symbols = gi_source_scanner_get_symbols (self->scanner);
+  list = PyList_New (g_slist_length (symbols));
+
+  for (l = symbols; l; l = l->next)
+    {
+      PyObject *item = pygi_source_symbol_new (l->data);
+      PyList_SetItem (list, i++, item);
+    }
+
+  Py_INCREF (list);
+  return list;
+}
+
+static PyObject *
+pygi_source_scanner_get_comments (PyGISourceScanner *self)
+{
+  GSList *l, *comments;
+  PyObject *list;
+  int i = 0;
+
+  comments = gi_source_scanner_get_comments (self->scanner);
+  list = PyList_New (g_slist_length (comments));
+
+  for (l = comments; l; l = l->next)
+    {
+      GISourceComment *comment = l->data;
+      PyObject *item = Py_BuildValue ("(ssi)", comment->comment,
+                                      comment->filename,
+                                      comment->line);
+      PyList_SetItem (list, i++, item);
+    }
+
+  Py_INCREF (list);
+  return list;
+}
+
+static const PyMethodDef _PyGISourceScanner_methods[] = {
+  { "get_comments", (PyCFunction) pygi_source_scanner_get_comments, METH_NOARGS },
+  { "get_symbols", (PyCFunction) pygi_source_scanner_get_symbols, METH_NOARGS },
+  { "append_filename", (PyCFunction) pygi_source_scanner_append_filename, METH_VARARGS },
+  { "parse_file", (PyCFunction) pygi_source_scanner_parse_file, METH_VARARGS },
+  { "parse_macros", (PyCFunction) pygi_source_scanner_parse_macros, METH_VARARGS },
+  { "lex_filename", (PyCFunction) pygi_source_scanner_lex_filename, METH_VARARGS },
+  { "set_macro_scan", (PyCFunction) pygi_source_scanner_set_macro_scan, METH_VARARGS },
+  { NULL, NULL, 0 }
+};
+
+
+static int calc_attrs_length(PyObject *attributes, int indent,
+                            int self_indent)
+{
+  int attr_length = 0;
+  int i;
+
+  if (indent == -1)
+    return -1;
+
+  for (i = 0; i < PyList_Size (attributes); ++i)
+    {
+      PyObject *tuple, *pyvalue;
+      PyObject *s = NULL;
+      char *attr, *value;
+      char *escaped;
+
+      tuple = PyList_GetItem (attributes, i);
+      if (PyTuple_GetItem(tuple, 1) == Py_None)
+       continue;
+
+      if (!PyArg_ParseTuple(tuple, "sO", &attr, &pyvalue))
+        return -1;
+
+      if (PyUnicode_Check(pyvalue)) {
+        s = PyUnicode_AsUTF8String(pyvalue);
+        if (!s) {
+          return -1;
+        }
+        value = PyString_AsString(s);
+      } else if (PyString_Check(pyvalue)) {
+        value = PyString_AsString(pyvalue);
+      } else {
+        PyErr_SetString(PyExc_TypeError,
+                        "value must be string or unicode");
+        return -1;
+      }
+
+      escaped = g_markup_escape_text (value, -1);
+      attr_length += 2 + strlen(attr) + strlen(escaped) + 2;
+      g_free(escaped);
+      Py_XDECREF(s);
+    }
+
+  return attr_length + indent + self_indent;
+}
+
+/* Hall of shame, wasted time debugging the code below
+ * 20min - Johan 2009-02-19
+ */
+static PyObject *
+pygi_collect_attributes (PyObject *self,
+                        PyObject *args)
+{
+  char *tag_name;
+  PyObject *attributes;
+  int indent, indent_len, i, j, self_indent;
+  char *indent_char;
+  gboolean first;
+  GString *attr_value = NULL;
+  int len;
+  PyObject *result = NULL;
+
+  if (!PyArg_ParseTuple(args, "sO!isi",
+                       &tag_name, &PyList_Type, &attributes,
+                       &self_indent, &indent_char,
+                       &indent))
+    return NULL;
+
+  if (attributes == Py_None || !PyList_Size(attributes))
+    return PyUnicode_DecodeUTF8("", 0, "strict");
+
+  len = calc_attrs_length(attributes, indent, self_indent);
+  if (len < 0)
+    return NULL;
+  if (len > 79)
+    indent_len = self_indent + strlen(tag_name) + 1;
+  else
+    indent_len = 0;
+
+  first = TRUE;
+  attr_value = g_string_new ("");
+
+  for (i = 0; i < PyList_Size (attributes); ++i)
+    {
+      PyObject *tuple, *pyvalue;
+      PyObject *s = NULL;
+      char *attr, *value, *escaped;
+
+      tuple = PyList_GetItem (attributes, i);
+
+      if (!PyTuple_Check (tuple))
+        {
+          PyErr_SetString(PyExc_TypeError,
+                          "attribute item must be a tuple");
+         goto out;
+        }
+
+      if (!PyTuple_Size (tuple) == 2)
+        {
+          PyErr_SetString(PyExc_IndexError,
+                          "attribute item must be a tuple of length 2");
+         goto out;
+        }
+
+      if (PyTuple_GetItem(tuple, 1) == Py_None)
+       continue;
+
+      /* this leaks, but we exit after, so */
+      if (!PyArg_ParseTuple(tuple, "sO", &attr, &pyvalue))
+       goto out;
+
+      if (PyUnicode_Check(pyvalue)) {
+        s = PyUnicode_AsUTF8String(pyvalue);
+        if (!s)
+         goto out;
+        value = PyString_AsString(s);
+      } else if (PyString_Check(pyvalue)) {
+        value = PyString_AsString(pyvalue);
+      } else {
+        PyErr_SetString(PyExc_TypeError,
+                        "value must be string or unicode");
+       goto out;
+      }
+
+      if (indent_len && !first)
+       {
+         g_string_append_c (attr_value, '\n');
+         for (j = 0; j < indent_len; j++)
+           g_string_append_c (attr_value, ' ');
+       }
+      g_string_append_c (attr_value, ' ');
+      g_string_append (attr_value, attr);
+      g_string_append_c (attr_value, '=');
+      g_string_append_c (attr_value, '\"');
+      escaped = g_markup_escape_text (value, -1);
+      g_string_append (attr_value, escaped);
+      g_string_append_c (attr_value, '\"');
+      if (first)
+       first = FALSE;
+      Py_XDECREF(s);
+  }
+
+  result = PyUnicode_DecodeUTF8 (attr_value->str, attr_value->len, "strict");
+ out:
+  if (attr_value != NULL)
+    g_string_free (attr_value, TRUE);
+  return result;
+}
+
+/* Module */
+
+static const PyMethodDef pyscanner_functions[] = {
+  { "collect_attributes",
+    (PyCFunction) pygi_collect_attributes, METH_VARARGS },
+  { NULL, NULL, 0, NULL }
+};
+
+DL_EXPORT(void)
+init_giscanner(void)
+{
+    PyObject *m, *d;
+    gboolean is_uninstalled;
+
+    /* Hack to avoid having to create a fake directory structure; when
+     * running uninstalled, the module will be in the top builddir,
+     * with no _giscanner prefix.
+     */
+    is_uninstalled = g_getenv ("UNINSTALLED_INTROSPECTION_SRCDIR") != NULL;
+    m = Py_InitModule (is_uninstalled ? "_giscanner" : "giscanner._giscanner",
+                      (PyMethodDef*)pyscanner_functions);
+    d = PyModule_GetDict (m);
+
+    PyGISourceScanner_Type.tp_init = (initproc)pygi_source_scanner_init;
+    PyGISourceScanner_Type.tp_methods = (PyMethodDef*)_PyGISourceScanner_methods;
+    REGISTER_TYPE (d, "SourceScanner", PyGISourceScanner_Type);
+
+    PyGISourceSymbol_Type.tp_getset = (PyGetSetDef*)_PyGISourceSymbol_getsets;
+    REGISTER_TYPE (d, "SourceSymbol", PyGISourceSymbol_Type);
+
+    PyGISourceType_Type.tp_getset = (PyGetSetDef*)_PyGISourceType_getsets;
+    REGISTER_TYPE (d, "SourceType", PyGISourceType_Type);
+}
diff --git a/giscanner/grealpath.h b/giscanner/grealpath.h
new file mode 100644 (file)
index 0000000..176f57e
--- /dev/null
@@ -0,0 +1,64 @@
+#ifndef __G_REALPATH_H__
+#define __G_REALPATH_H__
+
+#include <stdlib.h>
+#ifdef USE_WINDOWS
+#include <windows.h>
+#endif
+
+/**
+ * g_realpath:
+ *
+ * this should be a) filled in for win32 and b) put in glib...
+ */
+       
+static inline gchar*
+g_realpath (const char *path)
+{
+#ifndef _WIN32
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+       char buffer [PATH_MAX];
+       if (realpath(path, buffer))
+               return g_strdup(buffer);
+       else
+               return NULL;
+#else
+       /* We don't want to include <windows.h> as it clashes horribly
+        * with token names from scannerparser.h. So just declare
+        * GetFullPathNameA() here unless we already defined it, like
+        * in giscanner.c.
+        */
+#ifndef USE_WINDOWS
+       extern __stdcall GetFullPathNameA(const char*, int, char*, char**);
+#endif
+       char *buffer;
+       char dummy;
+       int rc, len;
+
+       rc = GetFullPathNameA(path, 1, &dummy, NULL);
+
+       if (rc == 0)
+         {
+           /* Weird failure, so just return the input path as such */
+           return g_strdup(path);
+         }
+
+       len = rc + 1;
+       buffer = g_malloc(len);
+
+       rc = GetFullPathNameA(path, len, buffer, NULL);
+
+       if (rc == 0 || rc > len)
+         {
+           /* Weird failure again */
+           g_free(buffer);
+           return g_strdup(path);
+         }
+
+       return buffer;
+#endif
+}
+
+#endif
diff --git a/giscanner/introspectablepass.py b/giscanner/introspectablepass.py
new file mode 100644 (file)
index 0000000..77a0e4f
--- /dev/null
@@ -0,0 +1,236 @@
+# -*- Mode: Python -*-
+# Copyright (C) 2010 Red Hat, Inc.
+#
+# 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 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.
+#
+
+from . import ast
+from . import message
+from .annotationparser import TAG_RETURNS
+
+class IntrospectablePass(object):
+
+    def __init__(self, transformer, blocks):
+        self._transformer = transformer
+        self._namespace = transformer.namespace
+        self._blocks = blocks
+
+    # Public API
+
+    def validate(self):
+        self._namespace.walk(self._introspectable_alias_analysis)
+        self._namespace.walk(self._propagate_callable_skips)
+        self._namespace.walk(self._analyze_node)
+        self._namespace.walk(self._introspectable_callable_analysis)
+        self._namespace.walk(self._introspectable_callable_analysis)
+        self._namespace.walk(self._introspectable_pass3)
+        self._namespace.walk(self._remove_non_reachable_backcompat_copies)
+
+    def _parameter_warning(self, parent, param, text, position=None):
+        # Suppress VFunctions and Callbacks warnings for now
+        # they cause more problems then they are worth
+        if isinstance(parent, (ast.VFunction, ast.Callback)):
+            return
+
+        block = None
+        if hasattr(parent, 'symbol'):
+            prefix = '%s: ' % (parent.symbol, )
+            block = self._blocks.get(parent.symbol)
+            if block:
+                position = block.position
+        else:
+            prefix = ''
+        if isinstance(param, ast.Parameter):
+            context = "argument %s: " % (param.argname, )
+        else:
+            context = "return value: "
+            if block:
+                return_tag = block.get(TAG_RETURNS)
+                if return_tag:
+                    position = return_tag.position
+        message.warn_node(parent, prefix + context + text,
+                          positions=position)
+
+    def _introspectable_param_analysis(self, parent, node):
+        is_return = isinstance(node, ast.Return)
+        is_parameter = isinstance(node, ast.Parameter)
+        assert is_return or is_parameter
+
+        if node.type.target_giname is not None:
+            target = self._transformer.lookup_typenode(node.type)
+        else:
+            target = None
+
+        if node.skip:
+            return
+
+        if not node.type.resolved:
+            self._parameter_warning(parent, node,
+"Unresolved type: %r" % (node.type.unresolved_string, ))
+            parent.introspectable = False
+            return
+
+        if isinstance(node.type, ast.Varargs):
+            parent.introspectable = False
+            return
+
+        if (isinstance(node.type, ast.List)
+            and node.type.element_type == ast.TYPE_ANY):
+            self._parameter_warning(parent, node, "Missing (element-type) annotation")
+            parent.introspectable = False
+            return
+
+        if (is_parameter
+            and isinstance(target, ast.Callback)
+            and not node.type.target_giname in ('GLib.DestroyNotify',
+                                                'Gio.AsyncReadyCallback')
+            and node.scope is None):
+                self._parameter_warning(parent, node,
+                    ("Missing (scope) annotation for callback" +
+                     " without GDestroyNotify (valid: %s, %s)")
+                     % (ast.PARAM_SCOPE_CALL, ast.PARAM_SCOPE_ASYNC))
+                parent.introspectable = False
+                return
+
+        if is_return and isinstance(target, ast.Callback):
+            self._parameter_warning(parent, node, "Callbacks cannot be return values; use (skip)")
+            parent.introspectable = False
+            return
+
+        if (is_return
+            and isinstance(target, (ast.Record, ast.Union))
+            and target.get_type is None
+            and not target.foreign):
+            if node.transfer != ast.PARAM_TRANSFER_NONE:
+                self._parameter_warning(parent, node,
+"Invalid non-constant return of bare structure or union; register as boxed type or (skip)")
+                parent.introspectable = False
+            return
+
+        if node.transfer is None:
+            self._parameter_warning(parent, node, "Missing (transfer) annotation")
+            parent.introspectable = False
+            return
+
+    def _type_is_introspectable(self, typeval, warn=False):
+        if not typeval.resolved:
+            return False
+        if isinstance(typeval, ast.TypeUnknown):
+            return False
+        if isinstance(typeval, (ast.Array, ast.List)):
+            return self._type_is_introspectable(typeval.element_type)
+        elif isinstance(typeval, ast.Map):
+            return (self._type_is_introspectable(typeval.key_type)
+                    and self._type_is_introspectable(typeval.value_type))
+        if typeval.target_foreign:
+            return True
+        if typeval.target_fundamental:
+            if typeval.is_equiv(ast.TYPE_VALIST):
+                return False
+            # These are not introspectable pending us adding
+            # larger type tags to the typelib (in theory these could
+            # be 128 bit or larger)
+            if typeval.is_equiv((ast.TYPE_LONG_LONG, ast.TYPE_LONG_ULONG,
+                                 ast.TYPE_LONG_DOUBLE)):
+                return False
+            return True
+        target = self._transformer.lookup_typenode(typeval)
+        if not target:
+            return False
+        return target.introspectable and (not target.skip)
+
+    def _propagate_parameter_skip(self, parent, node):
+        if node.type.target_giname is not None:
+            target = self._transformer.lookup_typenode(node.type)
+            if target is None:
+                return
+        else:
+            return
+
+        if target.skip:
+            parent.skip = True
+
+    def _introspectable_alias_analysis(self, obj, stack):
+        if isinstance(obj, ast.Alias):
+            if not self._type_is_introspectable(obj.target):
+                obj.introspectable = False
+        return True
+
+    def _propagate_callable_skips(self, obj, stack):
+        if isinstance(obj, ast.Callable):
+            for param in obj.parameters:
+                self._propagate_parameter_skip(obj, param)
+            self._propagate_parameter_skip(obj, obj.retval)
+        return True
+
+    def _analyze_node(self, obj, stack):
+        if obj.skip:
+            return False
+        # Our first pass for scriptability
+        if isinstance(obj, ast.Callable):
+            for param in obj.parameters:
+                self._introspectable_param_analysis(obj, param)
+            self._introspectable_param_analysis(obj, obj.retval)
+        if isinstance(obj, (ast.Class, ast.Interface, ast.Record, ast.Union)):
+            for field in obj.fields:
+                if field.type:
+                    if not self._type_is_introspectable(field.type):
+                        field.introspectable = False
+        return True
+
+    def _introspectable_callable_analysis(self, obj, stack):
+        if obj.skip:
+            return False
+        # Propagate introspectability of parameters to entire functions
+        if isinstance(obj, ast.Callable):
+            for param in obj.parameters:
+                if not self._type_is_introspectable(param.type):
+                    obj.introspectable = False
+                    return True
+            if not self._type_is_introspectable(obj.retval.type):
+                obj.introspectable = False
+                return True
+        return True
+
+    def _introspectable_pass3(self, obj, stack):
+        if obj.skip:
+            return False
+        # Propagate introspectability for fields
+        if isinstance(obj, (ast.Class, ast.Interface, ast.Record, ast.Union)):
+            for field in obj.fields:
+                if field.anonymous_node:
+                    if not field.anonymous_node.introspectable:
+                        field.introspectable = False
+                else:
+                    if not self._type_is_introspectable(field.type):
+                        field.introspectable = False
+        # Propagate introspectability for properties
+        if isinstance(obj, (ast.Class, ast.Interface)):
+            for prop in obj.properties:
+                if not self._type_is_introspectable(prop.type):
+                    prop.introspectable = False
+            for sig in obj.signals:
+                self._introspectable_callable_analysis(sig, [obj])
+        return True
+
+    def _remove_non_reachable_backcompat_copies(self, obj, stack):
+        if obj.skip:
+            return False
+        if (isinstance(obj, ast.Function)
+            and not obj.introspectable
+            and obj.moved_to is not None):
+            self._namespace.remove(obj)
+        return True
diff --git a/giscanner/libtoolimporter.py b/giscanner/libtoolimporter.py
new file mode 100644 (file)
index 0000000..20bd005
--- /dev/null
@@ -0,0 +1,76 @@
+# -*- Mode: Python -*-
+# GObject-Introspection - a framework for introspecting GObject libraries
+# 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 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.
+#
+
+import imp
+import os
+import platform
+import sys
+
+from .utils import extract_libtool
+
+
+class LibtoolImporter(object):
+
+    def __init__(self, name, path):
+        self.name = name
+        self.path = path
+
+    @classmethod
+    def find_module(cls, name, packagepath=None):
+        modparts = name.split('.')
+        filename = modparts.pop() + '.la'
+
+        # Given some.package.module 'path' is where subpackages of some.package
+        # should be looked for. See if we can find a ".libs/module.la" relative
+        # to those directories and failing that look for file
+        # "some/package/.libs/module.la" relative to sys.path
+        if len(modparts) > 0:
+            modprefix = os.path.join(*modparts)
+            modprefix = os.path.join(modprefix, '.libs')
+        else:
+            modprefix = '.libs'
+
+        for path in sys.path:
+            full = os.path.join(path, modprefix, filename)
+            if os.path.exists(full):
+                return cls(name, full)
+
+    def load_module(self, name):
+        realpath = extract_libtool(self.path)
+        platform_system = platform.system()
+
+        if platform_system == 'Darwin':
+            extension = '.dylib'
+        elif platform_system == 'Windows':
+            extension = '.dll'
+        else:
+            extension = '.so'
+
+        mod = imp.load_module(name, open(realpath), realpath, (extension, 'rb', 3))
+        mod.__loader__ = self
+        return mod
+
+    @classmethod
+    def __enter__(cls):
+        sys.meta_path.append(cls)
+
+    @classmethod
+    def __exit__(cls, type, value, traceback):
+        sys.meta_path.remove(cls)
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
new file mode 100644 (file)
index 0000000..7d274b3
--- /dev/null
@@ -0,0 +1,1314 @@
+# -*- Mode: Python -*-
+# Copyright (C) 2010 Red Hat, Inc.
+#
+# 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 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.
+#
+
+import re
+
+from . import ast
+from . import message
+from .annotationparser import (TAG_VFUNC, TAG_SINCE, TAG_DEPRECATED, TAG_RETURNS,
+                               TAG_ATTRIBUTES, TAG_RENAME_TO, TAG_TYPE,
+                               TAG_UNREF_FUNC, TAG_REF_FUNC, TAG_SET_VALUE_FUNC,
+                               TAG_GET_VALUE_FUNC, TAG_VALUE)
+from .annotationparser import (OPT_ALLOW_NONE, OPT_ARRAY, OPT_ATTRIBUTE,
+                               OPT_ELEMENT_TYPE, OPT_IN, OPT_INOUT,
+                               OPT_INOUT_ALT, OPT_OUT, OPT_SCOPE,
+                               OPT_OUT_CALLER_ALLOCATES, OPT_OUT_CALLEE_ALLOCATES,
+                               OPT_TYPE, OPT_CLOSURE, OPT_DESTROY, OPT_TRANSFER, OPT_SKIP,
+                               OPT_FOREIGN, OPT_ARRAY_FIXED_SIZE,
+                               OPT_ARRAY_LENGTH, OPT_ARRAY_ZERO_TERMINATED,
+                               OPT_CONSTRUCTOR, OPT_METHOD,
+                               OPT_TRANSFER_NONE, OPT_TRANSFER_FLOATING)
+from .annotationparser import AnnotationParser
+from .transformer import TransformerException
+from .utils import to_underscores, to_underscores_noprefix
+
+class MainTransformer(object):
+
+    def __init__(self, transformer, blocks):
+        self._transformer = transformer
+        self._blocks = blocks
+        self._namespace = transformer.namespace
+        self._uscore_type_names = {}
+
+    # Public API
+
+    def transform(self):
+        contents = list(self._namespace.itervalues())
+        if len(contents) == 0:
+            message.fatal("""Namespace is empty; likely causes are:
+* Not including .h files to be scanned
+* Broken --identifier-prefix
+""")
+
+        # Some initial namespace surgery
+        self._namespace.walk(self._pass_fixup_hidden_fields)
+
+        # We have a rough tree which should have most of of the types
+        # we know about.  Let's attempt closure; walk over all of the
+        # Type() types and see if they match up with something.
+        self._namespace.walk(self._pass_type_resolution)
+
+        # Read in annotations needed early
+        self._namespace.walk(self._pass_read_annotations_early)
+
+        # Determine some default values for transfer etc.
+        # based on the current tree.
+        self._namespace.walk(self._pass_callable_defaults)
+
+        # Read in most annotations now.
+        self._namespace.walk(self._pass_read_annotations)
+
+        # Now that we've possibly seen more types from annotations,
+        # do another type resolution pass.
+        self._namespace.walk(self._pass_type_resolution)
+
+        # Generate a reverse mapping "bar_baz" -> BarBaz
+        for node in self._namespace.itervalues():
+            if isinstance(node, ast.Registered) and node.get_type is not None:
+                self._uscore_type_names[node.c_symbol_prefix] = node
+            elif isinstance(node, (ast.Record, ast.Union)):
+                uscored = to_underscores_noprefix(node.name).lower()
+                self._uscore_type_names[uscored] = node
+
+        for node in list(self._namespace.itervalues()):
+            if isinstance(node, ast.Function):
+                # Discover which toplevel functions are actually methods
+                self._pair_function(node)
+            if isinstance(node, (ast.Class, ast.Interface)):
+                self._pair_class_virtuals(node)
+
+        # Some annotations need to be post function pairing
+        self._namespace.walk(self._pass_read_annotations2)
+
+        # Another type resolution pass after we've parsed virtuals, etc.
+        self._namespace.walk(self._pass_type_resolution)
+
+        self._namespace.walk(self._pass3)
+
+        # TODO - merge into pass3
+        self._pair_quarks_with_enums()
+
+    # Private
+
+    def _pass_fixup_hidden_fields(self, node, chain):
+        """Hide all callbacks starting with _; the typical
+usage is void (*_gtk_reserved1)(void);"""
+        if not isinstance(node, (ast.Class, ast.Interface,
+                                 ast.Record, ast.Union)):
+            return True
+        for field in node.fields:
+            if field is None:
+                continue
+            if (field.name.startswith('_')
+                and field.anonymous_node is not None
+                and isinstance(field.anonymous_node, ast.Callback)):
+                field.introspectable = False
+        return True
+
+    def _get_validate_parameter_name(self, parent, param_name, origin):
+        try:
+            param = parent.get_parameter(param_name)
+        except ValueError, e:
+            param = None
+        if param is None:
+            if isinstance(origin, ast.Parameter):
+                origin_name = 'parameter %s' % (origin.argname, )
+            else:
+                origin_name = 'return value'
+            message.log_node(
+                message.FATAL, parent,
+                "can't find parameter %s referenced by %s of %r"
+                % (param_name, origin_name, parent.name))
+
+        return param.argname
+
+    def _apply_annotation_rename_to(self, node, chain, block):
+        if not block:
+            return
+        rename_to = block.get(TAG_RENAME_TO)
+        if not rename_to:
+            return
+        rename_to = rename_to.value
+        target = self._namespace.get_by_symbol(rename_to)
+        if not target:
+            message.warn_node(node,
+                "Can't find symbol %r referenced by Rename annotation" % (
+                rename_to, ))
+        elif target.shadowed_by:
+            message.warn_node(node,
+                "Function %r already shadowed by %r, can't overwrite with %r" % (
+                target.symbol,
+                target.shadowed_by,
+                rename_to))
+        elif target.shadows:
+            message.warn_node(node,
+                "Function %r already shadows %r, can't multiply shadow with %r" % (
+                target.symbol,
+                target.shadows,
+                rename_to))
+        else:
+            target.shadowed_by = node.name
+            node.shadows = target.name
+
+    def _apply_annotations_function(self, node, chain):
+        block = self._blocks.get(node.symbol)
+        self._apply_annotations_callable(node, chain, block)
+
+    def _pass_read_annotations_early(self, node, chain):
+        if isinstance(node, ast.Record):
+            if node.ctype is not None:
+                block = self._blocks.get(node.ctype)
+            else:
+                block = self._blocks.get(node.c_name)
+            self._apply_annotations_annotated(node, block)
+        return True
+
+    def _pass_callable_defaults(self, node, chain):
+        if isinstance(node, (ast.Callable, ast.Signal)):
+            for param in node.parameters:
+                if param.transfer is None:
+                    param.transfer = self._get_transfer_default(node, param)
+            if node.retval.transfer is None:
+                node.retval.transfer = self._get_transfer_default(node, node.retval)
+        return True
+
+    def _get_annotation_name(self, node):
+        if isinstance(node, (ast.Class, ast.Interface, ast.Record,
+                             ast.Union, ast.Enum, ast.Bitfield,
+                             ast.Callback, ast.Alias)):
+            if node.ctype is not None:
+                return node.ctype
+            elif isinstance(node, ast.Registered) and node.gtype_name is not None:
+                return node.gtype_name
+            return node.c_name
+        raise AssertionError("Unhandled node %r" % (node, ))
+
+    def _get_block(self, node):
+        return self._blocks.get(self._get_annotation_name(node))
+
+    def _pass_read_annotations(self, node, chain):
+        if not node.namespace:
+            return False
+        if isinstance(node, ast.Alias):
+            self._apply_annotations_alias(node, chain)
+        if isinstance(node, ast.Function):
+            self._apply_annotations_function(node, chain)
+        if isinstance(node, ast.Callback):
+            self._apply_annotations_callable(node, chain, block = self._get_block(node))
+        if isinstance(node, (ast.Class, ast.Interface, ast.Union, ast.Enum,
+                             ast.Bitfield, ast.Callback)):
+            self._apply_annotations_annotated(node, self._get_block(node))
+        if isinstance(node, (ast.Class, ast.Interface, ast.Record, ast.Union)):
+            block = self._get_block(node)
+            for field in node.fields:
+                self._apply_annotations_field(node, block, field)
+            name = self._get_annotation_name(node)
+            section_name = 'SECTION:' + name.lower()
+            block = self._blocks.get(section_name)
+            if block:
+                node.doc = block.comment
+        if isinstance(node, (ast.Class, ast.Interface)):
+            for prop in node.properties:
+                self._apply_annotations_property(node, prop)
+            for sig in node.signals:
+                self._apply_annotations_signal(node, sig)
+        if isinstance(node, ast.Class):
+            block = self._get_block(node)
+            if block:
+                tag = block.get(TAG_UNREF_FUNC)
+                node.unref_func = tag.value if tag else None
+                tag = block.get(TAG_REF_FUNC)
+                node.ref_func = tag.value if tag else None
+                tag = block.get(TAG_SET_VALUE_FUNC)
+                node.set_value_func = tag.value if tag else None
+                tag = block.get(TAG_GET_VALUE_FUNC)
+                node.get_value_func = tag.value if tag else None
+        if isinstance(node, ast.Constant):
+            self._apply_annotations_constant(node)
+        return True
+
+    def _adjust_container_type(self, parent, node, options):
+        has_element_type = OPT_ELEMENT_TYPE in options
+        has_array = OPT_ARRAY in options
+
+        if has_array:
+            self._apply_annotations_array(parent, node, options)
+        elif has_element_type:
+            self._apply_annotations_element_type(parent, node, options)
+
+        if isinstance(node.type, ast.Array):
+            self._check_array_element_type(node.type, options)
+
+    def _resolve(self, type_str, type_node=None, node=None, parent=None):
+        def grab_one(type_str, resolver, top_combiner, combiner):
+            """Return a complete type, and the trailing string part after it.
+            Use resolver() on each identifier, and combiner() on the parts of
+            each complete type. (top_combiner is used on the top-most type.)"""
+            bits = re.split(r'([,<>()])', type_str, 1)
+            first, sep, rest = [bits[0], '', ''] if (len(bits)==1) else bits
+            args = [resolver(first)]
+            if sep == '<' or sep == '(':
+                lastsep = '>' if (sep == '<') else ')'
+                while sep != lastsep:
+                    next, rest = grab_one(rest, resolver, combiner, combiner)
+                    args.append(next)
+                    sep, rest = rest[0], rest[1:]
+            else:
+                rest = sep + rest
+            return top_combiner(*args), rest
+        def resolver(ident):
+            res = self._transformer.create_type_from_user_string(ident)
+            return res
+        def combiner(base, *rest):
+            if not rest:
+                return base
+            if isinstance(base, ast.List) and len(rest) == 1:
+                return ast.List(base.name, *rest)
+            if isinstance(base, ast.Map) and len(rest) == 2:
+                return ast.Map(*rest)
+            message.warn(
+                "Too many parameters in type specification %r" % (type_str, ))
+            return base
+        def top_combiner(base, *rest):
+            if type_node is not None and isinstance(type_node, ast.Type):
+                base.is_const = type_node.is_const
+            return combiner(base, *rest)
+
+        result, rest = grab_one(type_str, resolver, top_combiner, combiner)
+        if rest:
+            message.warn("Trailing components in type specification %r" % (
+                type_str, ))
+
+        if not result.resolved:
+            position = None
+            if parent is not None and isinstance(parent, ast.Function):
+                text = parent.symbol
+                position = self._get_position(parent, node)
+            else:
+                text = type_str
+            message.warn_node(parent, "%s: Unknown type: %r" %
+                              (text, result.ctype), positions=position)
+        return result
+
+    def _resolve_toplevel(self, type_str, type_node=None, node=None, parent=None):
+        """Like _resolve(), but attempt to preserve more attributes of original type."""
+        result = self._resolve(type_str, type_node=type_node, node=node, parent=parent)
+        # If we replace a node with a new type (such as an annotated) we
+        # might lose the ctype from the original node.
+        if type_node is not None:
+            result.ctype = type_node.ctype
+        return result
+
+    def _get_position(self, func, param):
+        block = self._blocks.get(func.symbol)
+        if block:
+            if isinstance(param, ast.Parameter):
+                tag = block.tags.get(param.argname)
+            elif isinstance(param, ast.Return):
+                tag = block.tags.get(TAG_RETURNS)
+            else:
+                tag = None
+
+            if tag.position:
+                return tag.position
+
+        return block.position
+
+    def _check_array_element_type(self, array, options):
+        # GPtrArrays are allowed to contain non basic types
+        # (except enums and flags) or basic types that are
+        # as big as a gpointer
+        if array.array_type == ast.Array.GLIB_PTRARRAY and \
+           ((array.element_type in ast.BASIC_GIR_TYPES
+             and not array.element_type in ast.POINTER_TYPES) or
+            isinstance(array.element_type, ast.Enum) or
+            isinstance(array.element_type, ast.Bitfield)):
+            message.warn("invalid (element-type) for a GPtrArray, "
+                        "must be a pointer", options.position)
+
+        # GByteArrays have (element-type) guint8 by default
+        if array.array_type == ast.Array.GLIB_BYTEARRAY:
+            if array.element_type == ast.TYPE_ANY:
+                array.element_type = ast.TYPE_UINT8
+            elif not array.element_type in [ast.TYPE_UINT8,
+                                            ast.TYPE_INT8,
+                                            ast.TYPE_CHAR]:
+                message.warn("invalid (element-type) for a GByteArray, "
+                             "must be one of guint8, gint8 or gchar",
+                             options.position)
+
+    def _apply_annotations_array(self, parent, node, options):
+        array_opt = options.get(OPT_ARRAY)
+        if array_opt:
+            array_values = array_opt.all()
+        else:
+            array_values = {}
+
+        element_type = options.get(OPT_ELEMENT_TYPE)
+        if element_type is not None:
+            element_type_node = self._resolve(element_type.one(),
+                                              node.type, node, parent)
+        elif isinstance(node.type, ast.Array):
+            element_type_node = node.type.element_type
+        else:
+            # We're assuming here that Foo* with an (array) annotation
+            # and no (element-type) means array of Foo
+            element_type_node = node.type.clone()
+            # The element's ctype is the array's dereferenced
+            if element_type_node.ctype is not None and \
+                    element_type_node.ctype.endswith('*'):
+                element_type_node.ctype = element_type_node.ctype[:-1]
+
+        if isinstance(node.type, ast.Array):
+            array_type = node.type.array_type
+        else:
+            array_type = None
+        container_type = ast.Array(array_type, element_type_node,
+                               ctype=node.type.ctype,
+                               is_const=node.type.is_const)
+        if OPT_ARRAY_ZERO_TERMINATED in array_values:
+            container_type.zeroterminated = array_values.get(
+                OPT_ARRAY_ZERO_TERMINATED) == '1'
+        else:
+            container_type.zeroterminated = False
+        length = array_values.get(OPT_ARRAY_LENGTH)
+        if length is not None:
+            paramname = self._get_validate_parameter_name(parent, length, node)
+            if paramname:
+                param = parent.get_parameter(paramname)
+                param.direction = node.direction
+                if param.direction == ast.PARAM_DIRECTION_OUT:
+                    param.transfer = ast.PARAM_TRANSFER_FULL
+                container_type.length_param_name = param.argname
+        fixed = array_values.get(OPT_ARRAY_FIXED_SIZE)
+        if fixed:
+            try:
+                container_type.size = int(fixed)
+            except ValueError:
+                # Already warned in annotationparser.py
+                return
+        node.type = container_type
+
+    def _apply_annotations_element_type(self, parent, node, options):
+        element_type_opt = options.get(OPT_ELEMENT_TYPE)
+        if element_type_opt is None:
+            message.warn(
+                'element-type annotation takes at least one option, '
+                'none given',
+                options.position)
+            return
+
+        if isinstance(node.type, ast.List):
+            if element_type_opt.length() != 1:
+                message.warn(
+                    'element-type annotation for a list must have exactly '
+                    'one option, not %d options' % (element_type_opt.length(), ),
+                    options.position)
+                return
+            node.type.element_type = self._resolve(element_type_opt.one(),
+                                                   node.type, node, parent)
+        elif isinstance(node.type, ast.Map):
+            if element_type_opt.length() != 2:
+                message.warn(
+                    'element-type annotation for a hash table must have exactly '
+                    'two options, not %d option(s)' % (element_type_opt.length(), ),
+                    options.position)
+                return
+            element_type = element_type_opt.flat()
+            node.type.key_type = self._resolve(element_type[0],
+                                               node.type, node, parent)
+            node.type.value_type = self._resolve(element_type[1],
+                                                 node.type, node, parent)
+        elif isinstance(node.type, ast.Array):
+            if element_type_opt.length() != 1:
+                message.warn(
+                    'element-type annotation for an array must have exactly '
+                    'one option, not %d options' % (element_type_opt.length(), ),
+                    options.position)
+                return
+            node.type.element_type = self._resolve(element_type_opt.one(),
+                                                   node.type, node, parent)
+        else:
+            message.warn_node(parent,
+                "Unknown container %r for element-type annotation" % (node.type, ))
+
+    def _get_transfer_default_param(self, parent, node):
+        if node.direction in [ast.PARAM_DIRECTION_INOUT,
+                              ast.PARAM_DIRECTION_OUT]:
+            if node.caller_allocates:
+                return ast.PARAM_TRANSFER_NONE
+            return ast.PARAM_TRANSFER_FULL
+        return ast.PARAM_TRANSFER_NONE
+
+    def _get_transfer_default_returntype_basic(self, typeval):
+        if (typeval.is_equiv(ast.BASIC_GIR_TYPES)
+            or typeval.is_const
+            or typeval.is_equiv(ast.TYPE_NONE)):
+            return ast.PARAM_TRANSFER_NONE
+        elif typeval.is_equiv(ast.TYPE_STRING):
+            # Non-const strings default to FULL
+            return ast.PARAM_TRANSFER_FULL
+        elif typeval.target_fundamental:
+            # This looks like just GType right now
+            return None
+        return None
+
+    def _is_gi_subclass(self, typeval, supercls_type):
+        cls = self._transformer.lookup_typenode(typeval)
+        assert cls, str(typeval)
+        supercls = self._transformer.lookup_typenode(supercls_type)
+        assert supercls
+        if cls is supercls:
+            return True
+        if cls.parent and cls.parent.target_giname != 'GObject.Object':
+            return self._is_gi_subclass(cls.parent, supercls_type)
+        return False
+
+    def _get_transfer_default_return(self, parent, node):
+        typeval = node.type
+        basic = self._get_transfer_default_returntype_basic(typeval)
+        if basic:
+            return basic
+        if not typeval.target_giname:
+            return None
+        target = self._transformer.lookup_typenode(typeval)
+        if isinstance(target, ast.Alias):
+            return self._get_transfer_default_returntype_basic(target.target)
+        elif (isinstance(target, ast.Boxed)
+              or (isinstance(target, (ast.Record, ast.Union))
+                  and (target.gtype_name is not None or target.foreign))):
+            return ast.PARAM_TRANSFER_FULL
+        elif isinstance(target, (ast.Enum, ast.Bitfield)):
+            return ast.PARAM_TRANSFER_NONE
+        # Handle constructors specially here
+        elif isinstance(parent, ast.Function) and parent.is_constructor:
+            if isinstance(target, ast.Class):
+                initially_unowned_type = ast.Type(target_giname='GObject.InitiallyUnowned')
+                initially_unowned = self._transformer.lookup_typenode(initially_unowned_type)
+                if initially_unowned and self._is_gi_subclass(typeval, initially_unowned_type):
+                    return ast.PARAM_TRANSFER_NONE
+                else:
+                    return ast.PARAM_TRANSFER_FULL
+            elif isinstance(target, (ast.Record, ast.Union)):
+                return ast.PARAM_TRANSFER_FULL
+            else:
+                raise AssertionError("Invalid constructor")
+        elif isinstance(target, (ast.Class, ast.Record, ast.Union)):
+            # Explicitly no default for these
+            return None
+        else:
+            return None
+
+    def _get_transfer_default(self, parent, node):
+        if node.type.is_equiv(ast.TYPE_NONE) or isinstance(node.type, ast.Varargs):
+            return ast.PARAM_TRANSFER_NONE
+        elif isinstance(node, ast.Parameter):
+            return self._get_transfer_default_param(parent, node)
+        elif isinstance(node, ast.Return):
+            return self._get_transfer_default_return(parent, node)
+        elif isinstance(node, ast.Field):
+            return ast.PARAM_TRANSFER_NONE
+        elif isinstance(node, ast.Property):
+            return ast.PARAM_TRANSFER_NONE
+        else:
+            raise AssertionError(node)
+
+    def _apply_annotations_param_ret_common(self, parent, node, tag):
+        options = getattr(tag, 'options', {})
+
+        param_type = options.get(OPT_TYPE)
+        if param_type:
+            node.type = self._resolve_toplevel(param_type.one(),
+                                               node.type, node, parent)
+
+        caller_allocates = False
+        annotated_direction = None
+        if (OPT_INOUT in options or
+            OPT_INOUT_ALT in options):
+            annotated_direction = ast.PARAM_DIRECTION_INOUT
+        elif OPT_OUT in options:
+            subtype = options[OPT_OUT]
+            if subtype is not None:
+                subtype = subtype.one()
+            annotated_direction = ast.PARAM_DIRECTION_OUT
+            if subtype in (None, ''):
+                if node.type.target_giname and node.type.ctype:
+                    target = self._transformer.lookup_giname(node.type.target_giname)
+                    target = self._transformer.resolve_aliases(target)
+                    has_double_indirection = '**' in node.type.ctype
+                    is_structure_or_union = isinstance(target, (ast.Record, ast.Union))
+                    caller_allocates = (not has_double_indirection and is_structure_or_union)
+                else:
+                    caller_allocates = False
+            elif subtype == OPT_OUT_CALLER_ALLOCATES:
+                caller_allocates = True
+            elif subtype == OPT_OUT_CALLEE_ALLOCATES:
+                caller_allocates = False
+        elif OPT_IN in options:
+            annotated_direction = ast.PARAM_DIRECTION_IN
+
+        if (annotated_direction is not None) and (annotated_direction != node.direction):
+            node.direction = annotated_direction
+            node.caller_allocates = caller_allocates
+            # Also reset the transfer default if we're toggling direction
+            node.transfer = self._get_transfer_default(parent, node)
+
+        transfer_tag = options.get(OPT_TRANSFER)
+        if transfer_tag and transfer_tag.length() == 1:
+            transfer = transfer_tag.one()
+            if transfer == OPT_TRANSFER_FLOATING:
+                transfer = OPT_TRANSFER_NONE
+            node.transfer = transfer
+
+        self._adjust_container_type(parent, node, options)
+
+        if (OPT_ALLOW_NONE in options or
+            node.type.target_giname == 'Gio.AsyncReadyCallback' or
+            node.type.target_giname == 'Gio.Cancellable'):
+            node.allow_none = True
+
+        if tag is not None and tag.comment is not None:
+            node.doc = tag.comment
+
+        if OPT_SKIP in options:
+            node.skip = True
+
+        if options:
+            for attribute in options.getall(OPT_ATTRIBUTE):
+                node.attributes.append(attribute.flat())
+
+    def _apply_annotations_annotated(self, node, block):
+        if block is None:
+            return
+
+        node.doc = block.comment
+
+        since_tag = block.get(TAG_SINCE)
+        if since_tag is not None:
+            node.version = since_tag.value
+
+        deprecated_tag = block.get(TAG_DEPRECATED)
+        if deprecated_tag is not None:
+            value = deprecated_tag.value
+            if ': ' in value:
+                version, desc = value.split(': ')
+            else:
+                desc = value
+                version = None
+            node.deprecated = desc
+            if version is not None:
+                node.deprecated_version = version
+
+        annos_tag = block.get(TAG_ATTRIBUTES)
+        if annos_tag is not None:
+            options = AnnotationParser.parse_options(annos_tag, annos_tag.value)
+            for key, value in options.iteritems():
+                if value:
+                    node.attributes.append((key, value.one()))
+
+        if OPT_SKIP in block.options:
+            node.skip = True
+
+        if OPT_FOREIGN in block.options:
+            node.foreign = True
+
+        if OPT_CONSTRUCTOR in block.options and isinstance(node, ast.Function):
+            node.is_constructor = True
+
+        if OPT_METHOD in block.options:
+            node.is_method = True
+
+    def _apply_annotations_alias(self, node, chain):
+        block = self._get_block(node)
+        self._apply_annotations_annotated(node, block)
+
+    def _apply_annotations_param(self, parent, param, tag):
+        if tag:
+            options = tag.options
+        else:
+            options = {}
+        if isinstance(parent, (ast.Function, ast.VFunction)):
+            scope = options.get(OPT_SCOPE)
+            if scope and scope.length() == 1:
+                param.scope = scope.one()
+                param.transfer = ast.PARAM_TRANSFER_NONE
+
+            destroy = options.get(OPT_DESTROY)
+            if destroy:
+                param.destroy_name = self._get_validate_parameter_name(parent,
+                                                                       destroy.one(),
+                                                                       param)
+                if param.destroy_name is not None:
+                    param.scope = ast.PARAM_SCOPE_NOTIFIED
+                    destroy_param = parent.get_parameter(param.destroy_name)
+                    # This is technically bogus; we're setting the scope on the destroy
+                    # itself.  But this helps avoid tripping a warning from finaltransformer,
+                    # since we don't have a way right now to flag this callback a destroy.
+                    destroy_param.scope = ast.PARAM_SCOPE_NOTIFIED
+            closure = options.get(OPT_CLOSURE)
+            if closure and closure.length() == 1:
+                param.closure_name = self._get_validate_parameter_name(parent,
+                                                                       closure.one(),
+                                                                       param)
+        elif isinstance(parent, ast.Callback):
+            if OPT_CLOSURE in options:
+                # For callbacks, (closure) appears without an
+                # argument, and tags a parameter that is a closure. We
+                # represent it (weirdly) in the gir and typelib by
+                # setting param.closure_name to itself.
+                param.closure_name = param.argname
+
+        self._apply_annotations_param_ret_common(parent, param, tag)
+
+    def _apply_annotations_return(self, parent, return_, block):
+        if block:
+            tag = block.get(TAG_RETURNS)
+        else:
+            tag = None
+        self._apply_annotations_param_ret_common(parent, return_, tag)
+
+    def _apply_annotations_params(self, parent, params, block):
+        declparams = set([])
+        if parent.instance_parameter:
+            declparams.add(parent.instance_parameter.argname)
+        for param in params:
+            if block:
+                tag = block.get(param.argname)
+            else:
+                tag = None
+            self._apply_annotations_param(parent, param, tag)
+            declparams.add(param.argname)
+
+        if not block:
+            return
+        docparams = set(block.params)
+
+        unknown = docparams - declparams
+        unused = declparams - docparams
+
+        for doc_name in unknown:
+            # Skip varargs, see #629759
+            if doc_name.lower() in ['...', 'varargs', TAG_RETURNS]:
+                continue
+            if len(unused) == 0:
+                text = ''
+            elif len(unused) == 1:
+                (param, ) = unused
+                text = ', should be %r' % (param, )
+            else:
+                text = ', should be one of %s' % (
+                ', '.join(repr(p) for p in unused), )
+
+            tag = block.get(doc_name)
+            message.warn(
+                '%s: unknown parameter %r in documentation comment%s' % (
+                block.name, doc_name, text),
+                tag.position)
+
+    def _apply_annotations_callable(self, node, chain, block):
+        self._apply_annotations_annotated(node, block)
+        self._apply_annotations_params(node, node.parameters, block)
+        self._apply_annotations_return(node, node.retval, block)
+
+    def _check_arg_annotations(self, parent, params, block):
+        if block is None:
+            return
+        for tag in block.tags.keys():
+            if tag == TAG_RETURNS:
+                continue
+            for param in params:
+                if param.argname == tag:
+                    break
+            else:
+                message.warn(
+                    "Annotation for '%s' refers to unknown argument '%s'"
+                    % (parent.name, tag))
+
+    def _apply_annotations_field(self, parent, block, field):
+        if not block:
+            return
+        tag = block.get(field.name)
+        if not tag:
+            return
+        t = tag.options.get(OPT_TYPE)
+        if t:
+            field.type = self._transformer.create_type_from_user_string(t.one())
+
+        try:
+            self._adjust_container_type(parent, field, tag.options)
+        except AttributeError:
+            pass
+
+    def _apply_annotations_property(self, parent, prop):
+        prefix = self._get_annotation_name(parent)
+        block = self._blocks.get('%s:%s' % (prefix, prop.name))
+        self._apply_annotations_annotated(prop, block)
+        if not block:
+            return
+        transfer_tag = block.get(OPT_TRANSFER)
+        if transfer_tag is not None:
+            transfer = transfer_tag.value
+            if transfer == OPT_TRANSFER_FLOATING:
+                transfer = OPT_TRANSFER_NONE
+            prop.transfer = transfer
+        else:
+            prop.transfer = self._get_transfer_default(parent, prop)
+        type_tag = block.get(TAG_TYPE)
+        if type_tag:
+            prop.type = self._resolve_toplevel(type_tag.value, prop.type, prop, parent)
+
+    def _apply_annotations_signal(self, parent, signal):
+        prefix = self._get_annotation_name(parent)
+        block = self._blocks.get('%s::%s' % (prefix, signal.name))
+        self._apply_annotations_annotated(signal, block)
+        # We're only attempting to name the signal parameters if
+        # the number of parameter tags (@foo) is the same or greater
+        # than the number of signal parameters
+        if block and len(block.tags) > len(signal.parameters):
+            names = block.tags.items()
+            # Resolve real parameter names early, so that in later
+            # phase we can refer to them while resolving annotations.
+            for i, param in enumerate(signal.parameters):
+                param.argname, tag = names[i+1]
+        else:
+            names = []
+        for i, param in enumerate(signal.parameters):
+            if names:
+                name, tag = names[i+1]
+                options = getattr(tag, 'options', {})
+                param_type = options.get(OPT_TYPE)
+                if param_type:
+                    param.type = self._resolve_toplevel(param_type.one(), param.type,
+                                                        param, parent)
+            else:
+                tag = None
+            self._apply_annotations_param(signal, param, tag)
+        self._apply_annotations_return(signal, signal.retval, block)
+
+    def _apply_annotations_constant(self, node):
+        block = self._blocks.get(node.ctype)
+        if not block:
+            return
+        tag = block.get(TAG_VALUE)
+        if tag:
+            node.value = tag.value
+
+    def _pass_read_annotations2(self, node, chain):
+        if isinstance(node, ast.Function):
+            self._apply_annotations2_function(node, chain)
+        return True
+
+    def _apply_annotations2_function(self, node, chain):
+        block = self._blocks.get(node.symbol)
+
+        self._apply_annotation_rename_to(node, chain, block)
+
+        # Handle virtual invokers
+        parent = chain[-1] if chain else None
+        if not (block and parent):
+            return
+        virtual = block.get(TAG_VFUNC)
+        if not virtual:
+            return
+        invoker_name = virtual.value
+        matched = False
+        for vfunc in parent.virtual_methods:
+            if vfunc.name == invoker_name:
+                matched = True
+                vfunc.invoker = node.name
+                # Also merge in annotations
+                self._apply_annotations_callable(vfunc, [parent], block)
+                break
+        if not matched:
+            message.warn_node(node,
+                "Virtual slot %r not found for %r annotation" % (invoker_name, TAG_VFUNC))
+
+    def _resolve_and_filter_type_list(self, typelist):
+        """Given a list of Type instances, return a new list of types with
+the ones that failed to resolve removed."""
+        # Create a copy we'll modify
+        new_typelist = list(typelist)
+        for typeval in typelist:
+            resolved = self._transformer.resolve_type(typeval)
+            if not resolved:
+                new_typelist.remove(typeval)
+        return new_typelist
+
+    def _pass_type_resolution(self, node, chain):
+        if isinstance(node, ast.Alias):
+            self._transformer.resolve_type(node.target)
+        if isinstance(node, ast.Callable):
+            for parameter in node.parameters:
+                self._transformer.resolve_type(parameter.type)
+            self._transformer.resolve_type(node.retval.type)
+        if isinstance(node, ast.Constant):
+            self._transformer.resolve_type(node.value_type)
+        if isinstance(node, (ast.Class, ast.Interface, ast.Record, ast.Union)):
+            for field in node.fields:
+                if field.anonymous_node:
+                    pass
+                else:
+                    self._transformer.resolve_type(field.type)
+        if isinstance(node, (ast.Class, ast.Interface)):
+            resolved_parent = None
+            for parent in node.parent_chain:
+                try:
+                    self._transformer.resolve_type(parent)
+                except ValueError, e:
+                    continue
+                target = self._transformer.lookup_typenode(parent)
+                if target:
+                    node.parent = parent
+                    break
+            else:
+                if isinstance(node, ast.Interface):
+                    node.parent = ast.Type(target_giname='GObject.Object')
+            for prop in node.properties:
+                self._transformer.resolve_type(prop.type)
+            for sig in node.signals:
+                for param in sig.parameters:
+                    self._transformer.resolve_type(param.type)
+        if isinstance(node, ast.Class):
+            node.interfaces = self._resolve_and_filter_type_list(node.interfaces)
+        if isinstance(node, ast.Interface):
+            node.prerequisites = self._resolve_and_filter_type_list(node.prerequisites)
+        return True
+
+    def _pair_quarks_with_enums(self):
+        # self._uscore_type_names is an authoritative mapping of types
+        # to underscored versions, since it is based on get_type() methods;
+        # but only covers enums that are registered as GObject enums.
+        # Create a fallback mapping based on all known enums in this module.
+        uscore_enums = {}
+        for enum in self._namespace.itervalues():
+            if not isinstance(enum, ast.Enum):
+                continue
+            type_name = enum.ctype
+            uscored = to_underscores(type_name).lower()
+
+            uscore_enums[uscored] = enum
+
+            try:
+                no_uscore_prefixed = self._transformer.strip_identifier(type_name)
+            except TransformerException, e:
+                message.warn(e)
+                no_uscore_prefixed = None
+
+            if no_uscore_prefixed not in uscore_enums:
+                uscore_enums[no_uscore_prefixed] = enum
+
+        for node in self._namespace.itervalues():
+            if not isinstance(node, ast.ErrorQuarkFunction):
+                continue
+            short = node.symbol[:-len('_quark')]
+            if short == "g_io_error":
+                # Special case; GIOError was already taken forcing GIOErrorEnum
+                assert self._namespace.name == 'Gio'
+                enum = self._namespace.get('IOErrorEnum')
+            else:
+                enum = self._uscore_type_names.get(short)
+                if enum is None:
+                    enum = uscore_enums.get(short)
+            if enum is not None:
+                enum.error_domain = node.error_domain
+            else:
+                message.warn_node(node,
+                    """%s: Couldn't find corresponding enumeration""" % (node.symbol, ))
+
+    def _split_uscored_by_type(self, uscored):
+        """'uscored' should be an un-prefixed uscore string.  This
+function searches through the namespace for the longest type which
+prefixes uscored, and returns (type, suffix).  Example, assuming
+namespace Gtk, type is TextBuffer:
+
+_split_uscored_by_type(text_buffer_try_new) -> (ast.Class(TextBuffer), 'try_new')"""
+        node = None
+        count = 0
+        prev_split_count = -1
+        while True:
+            components = uscored.rsplit('_', count)
+            if len(components) == prev_split_count:
+                return None
+            prev_split_count = len(components)
+            type_string = components[0]
+            node = self._uscore_type_names.get(type_string)
+            if node:
+                return (node, '_'.join(components[1:]))
+            count += 1
+
+    def _pair_function(self, func):
+        """Check to see whether a toplevel function should be a
+method or constructor of some type."""
+
+        # Ignore internal symbols and type metadata functions
+        if func.symbol.startswith('_') or func.is_type_meta_function():
+            return
+
+        (ns, subsymbol) = self._transformer.split_csymbol(func.symbol)
+        assert ns == self._namespace
+        if self._is_constructor(func, subsymbol):
+            self._set_up_constructor(func, subsymbol)
+            return
+        elif self._is_method(func, subsymbol):
+            self._setup_method(func, subsymbol)
+            return
+        elif self._pair_static_method(func, subsymbol):
+            return
+
+    def _uscored_identifier_for_type(self, typeval):
+        """Given a Type(target_giname='Foo.BarBaz'), return 'bar_baz'."""
+        name = typeval.get_giname()
+        return to_underscores_noprefix(name).lower()
+
+    def _is_method(self, func, subsymbol):
+        if not func.parameters:
+            if func.is_method:
+                message.warn_node(func,
+                    '%s: Methods must have parameters' % (func.symbol, ))
+            return False
+        first = func.parameters[0]
+        target = self._transformer.lookup_typenode(first.type)
+        if not isinstance(target, (ast.Class, ast.Interface,
+                                   ast.Record, ast.Union,
+                                   ast.Boxed)):
+            if func.is_method:
+                message.warn_node(func,
+                    '%s: Methods must have a pointer as their first '
+                    'parameter' % (func.symbol, ))
+            return False
+        if target.namespace != self._namespace:
+            if func.is_method:
+                message.warn_node(func,
+                    '%s: Methods must belong to the same namespace as the '
+                    'class they belong to' % (func.symbol, ))
+            return False
+
+        # A quick hack here...in the future we should catch C signature/GI signature
+        # mismatches in a general way in finaltransformer
+        if first.type.ctype is not None and first.type.ctype.count('*') > 1:
+            return False
+
+        if not func.is_method:
+            uscored_prefix = self._get_uscored_prefix(func, subsymbol)
+            if not subsymbol.startswith(uscored_prefix):
+                return False
+
+        return True
+
+    def _setup_method(self, func, subsymbol):
+        uscored_prefix = self._get_uscored_prefix(func, subsymbol)
+        target = self._transformer.lookup_typenode(func.parameters[0].type)
+
+        func.instance_parameter = func.parameters.pop(0)
+        self._namespace.float(func)
+
+        if not func.is_method:
+            subsym_idx = func.symbol.find(subsymbol)
+            func.name = func.symbol[(subsym_idx + len(uscored_prefix) + 1):]
+            func.is_method = True
+
+        target.methods.append(func)
+
+    def _get_uscored_prefix(self, func, subsymbol):
+        # Here we check both the c_symbol_prefix and (if that fails),
+        # attempt to do a default uscoring of the type.  The reason we
+        # look at a default underscore transformation is for
+        # gdk_window_object_get_type(), which says to us that the
+        # prefix is "gdk_window_object", when really it's just
+        # "gdk_window".  Possibly need an annotation to override this.
+        prefix_matches = False
+        uscored_prefix = None
+        first_arg = func.parameters[0]
+        target = self._transformer.lookup_typenode(first_arg.type)
+        if hasattr(target, 'c_symbol_prefix') and target.c_symbol_prefix is not None:
+            prefix_matches = subsymbol.startswith(target.c_symbol_prefix)
+            if prefix_matches:
+                uscored_prefix = target.c_symbol_prefix
+        if not prefix_matches:
+            uscored_prefix = self._uscored_identifier_for_type(first_arg.type)
+
+        return uscored_prefix
+
+    def _pair_static_method(self, func, subsymbol):
+        split = self._split_uscored_by_type(subsymbol)
+        if split is None:
+            return False
+        (node, funcname) = split
+        if funcname == '':
+            return False
+
+        if isinstance(node, ast.Class):
+            self._namespace.float(func)
+            func.name = funcname
+            node.static_methods.append(func)
+            return True
+        elif isinstance(node, (ast.Interface, ast.Record, ast.Union,
+                               ast.Boxed, ast.Enum, ast.Bitfield)):
+            # prior to the introduction of this part of the code, only
+            # ast.Class could have static methods.  so for backwards
+            # compatibility, instead of removing the func from the namespace,
+            # leave it there and get a copy instead.  modify the copy and push
+            # it onto static_methods.  we need to copy the parameters list
+            # separately, because in the third pass functions are flagged as
+            # 'throws' depending on the presence of a GError parameter which is
+            # then removed from the parameters list.  without the explicit
+            # copy, only one of the two functions would thus get flagged as
+            # 'throws'.  clone() does this for us.
+            new_func = func.clone()
+            new_func.name = funcname
+            node.static_methods.append(new_func)
+            # flag the func as a backwards-comptability kludge (thus it will
+            # get pruned in the introspectable pass if introspectable=0).
+            func.moved_to = node.name + '.' + new_func.name
+            return True
+
+        return False
+
+    def _set_up_constructor(self, func, subsymbol):
+        self._namespace.float(func)
+
+        func.name = self._get_constructor_name(func, subsymbol)
+
+        origin_node = self._get_constructor_class(func, subsymbol)
+        origin_node.constructors.append(func)
+
+        func.is_constructor = True
+
+        # Constructors have default return semantics
+        if not func.retval.transfer:
+            func.retval.transfer = self._get_transfer_default_return(func,
+                    func.retval)
+
+    def _get_constructor_class(self, func, subsymbol):
+        origin_node = None
+        split = self._split_uscored_by_type(subsymbol)
+        if split is None:
+            if func.is_constructor:
+                origin_node = self._transformer.lookup_typenode(func.retval.type)
+        else:
+            origin_node, _ = split
+
+        return origin_node
+
+    def _get_constructor_name(self, func, subsymbol):
+        name = None
+        split = self._split_uscored_by_type(subsymbol)
+        if split is None:
+            if func.is_constructor:
+                name = func.name
+        else:
+            _, name = split
+
+        return name
+
+    def _guess_constructor_by_name(self, symbol):
+        # Normal constructors, gtk_button_new etc
+        if symbol.endswith('_new'):
+            return True
+        # Alternative constructor, gtk_button_new_with_label
+        if '_new_' in symbol:
+            return True
+        # gtk_list_store_newv,gtk_tree_store_newv etc
+        if symbol.endswith('_newv'):
+            return True
+        return False
+
+    def _is_constructor(self, func, subsymbol):
+        # func.is_constructor will be True if we have a (constructor) annotation
+        if not func.is_constructor:
+            if not self._guess_constructor_by_name(func.symbol):
+                return False
+        target = self._transformer.lookup_typenode(func.retval.type)
+        if not (isinstance(target, ast.Class)
+                or (isinstance(target, (ast.Record, ast.Union, ast.Boxed))
+                    and (target.get_type is not None or target.foreign))):
+            if func.is_constructor:
+                message.warn_node(func,
+                    '%s: Constructors must return an instance of their class'
+                    % (func.symbol, ))
+            return False
+
+        origin_node = self._get_constructor_class(func, subsymbol)
+        if origin_node is None:
+            message.warn_node(func,
+                "Can't find matching type for constructor; symbol=%r" \
+                % (func.symbol, ))
+            return False
+
+        # Some sanity checks; only objects and boxeds can have ctors
+        if not (isinstance(origin_node, ast.Class)
+                or (isinstance(origin_node, (ast.Record, ast.Union, ast.Boxed))
+                    and (origin_node.get_type is not None or origin_node.foreign))):
+            return False
+        # Verify the namespace - don't want to append to foreign namespaces!
+        if origin_node.namespace != self._namespace:
+            if func.is_constructor:
+                message.warn_node(func,
+                    '%s: Constructors must belong to the same namespace as the '
+                    'class they belong to' % (func.symbol, ))
+            return False
+        # If it takes the object as a first arg, guess it's not a constructor
+        if not func.is_constructor and len(func.parameters) > 0:
+            first_arg = self._transformer.lookup_typenode(func.parameters[0].type)
+            if (first_arg is not None) and first_arg.gi_name == origin_node.gi_name:
+                return False
+
+        if isinstance(target, ast.Class):
+            parent = origin_node
+            while parent and (not parent.gi_name == 'GObject.Object'):
+                if parent == target:
+                    break
+                if parent.parent:
+                    parent = self._transformer.lookup_typenode(parent.parent)
+                else:
+                    parent = None
+                if parent is None:
+                    message.warn_node(func,
+                        "Return value is not superclass for constructor; "
+                        "symbol=%r constructed=%r return=%r" % (
+                        func.symbol,
+                        str(origin_node.create_type()),
+                        str(func.retval.type)))
+                    return False
+        else:
+            if origin_node != target:
+                message.warn_node(func,
+                    "Constructor return type mismatch symbol=%r "
+                    "constructed=%r return=%r" % (
+                    func.symbol,
+                    str(origin_node.create_type()),
+                    str(func.retval.type)))
+                return False
+
+        return True
+
+    def _pair_class_virtuals(self, node):
+        """Look for virtual methods from the class structure."""
+        if not node.glib_type_struct:
+            # https://bugzilla.gnome.org/show_bug.cgi?id=629080
+            #message.warn_node(node,
+            #    "Failed to find class structure for %r" % (node.name, ))
+            return
+
+        node_type = node.create_type()
+        class_struct = self._transformer.lookup_typenode(node.glib_type_struct)
+
+        # Object class fields are assumed to be read-only
+        # (see also _introspect_object and transformer.py)
+        for field in class_struct.fields:
+            if isinstance(field, ast.Field):
+                field.writable = False
+
+        for field in class_struct.fields:
+            if not isinstance(field.anonymous_node, ast.Callback):
+                continue
+            callback = field.anonymous_node
+            # Check the first parameter is the object
+            if len(callback.parameters) == 0:
+                continue
+            firstparam_type = callback.parameters[0].type
+            if firstparam_type != node_type:
+                continue
+            vfunc = ast.VFunction.from_callback(callback)
+            vfunc.instance_parameter = callback.parameters[0]
+            vfunc.inherit_file_positions(callback)
+
+            prefix = self._get_annotation_name(class_struct)
+            block = self._blocks.get('%s::%s' % (prefix, vfunc.name))
+            self._apply_annotations_callable(vfunc, [node], block)
+            node.virtual_methods.append(vfunc)
+
+        # Take the set of virtual methods we found, and try
+        # to pair up with any matching methods using the
+        # name+signature.
+        for vfunc in node.virtual_methods:
+            for method in node.methods:
+                if method.name != vfunc.name:
+                    continue
+                if method.retval.type != vfunc.retval.type:
+                    continue
+                if len(method.parameters) != len(vfunc.parameters):
+                    continue
+                for i in xrange(len(method.parameters)):
+                    m_type = method.parameters[i].type
+                    v_type = vfunc.parameters[i].type
+                    if m_type != v_type:
+                        continue
+                vfunc.invoker = method.name
+                # Apply any annotations we have from the invoker to
+                # the vfunc
+                block = self._blocks.get(method.symbol)
+                self._apply_annotations_callable(vfunc, [], block)
+                break
+
+    def _pass3(self, node, chain):
+        """Pass 3 is after we've loaded GType data and performed type
+        closure."""
+        if isinstance(node, ast.Callable):
+            self._pass3_callable_callbacks(node)
+            self._pass3_callable_throws(node)
+        return True
+
+    def _pass3_callable_callbacks(self, node):
+        """Check to see if we have anything that looks like a
+        callback+user_data+GDestroyNotify set."""
+
+        params = node.parameters
+
+        # First, do defaults for well-known callback types
+        for i, param in enumerate(params):
+            argnode = self._transformer.lookup_typenode(param.type)
+            if isinstance(argnode, ast.Callback):
+                if param.type.target_giname in ('Gio.AsyncReadyCallback',
+                                                'GLib.DestroyNotify'):
+                    param.scope = ast.PARAM_SCOPE_ASYNC
+                    param.transfer = ast.PARAM_TRANSFER_NONE
+
+        callback_param = None
+        for i, param in enumerate(params):
+            argnode = self._transformer.lookup_typenode(param.type)
+            is_destroynotify = False
+            if isinstance(argnode, ast.Callback):
+                if param.type.target_giname == 'GLib.DestroyNotify':
+                    is_destroynotify = True
+                else:
+                    callback_param = param
+                    continue
+            if callback_param is None:
+                continue
+            if is_destroynotify:
+                callback_param.destroy_name = param.argname
+                callback_param.scope = ast.PARAM_SCOPE_NOTIFIED
+                callback_param.transfer = ast.PARAM_TRANSFER_NONE
+            elif (param.type.is_equiv(ast.TYPE_ANY) and
+                  param.argname is not None and
+                  param.argname.endswith('data')):
+                callback_param.closure_name = param.argname
+
+    def _pass3_callable_throws(self, node):
+        """Check to see if we have anything that looks like a
+        callback+user_data+GDestroyNotify set."""
+        if not node.parameters:
+            return
+        last_param = node.parameters[-1]
+        # Checking type.name=='GLib.Error' generates false positives
+        # on methods that take a 'GError *'
+        if last_param.type.ctype == 'GError**':
+            node.parameters.pop()
+            node.throws = True
diff --git a/giscanner/mallard-C-class.tmpl b/giscanner/mallard-C-class.tmpl
new file mode 100644 (file)
index 0000000..2d73904
--- /dev/null
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<page id="${node.namespace.name}.${node.name}"
+      type="guide"
+      style="class"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:api="http://projectmallard.org/experimental/api/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+    <link type="guide" xref="index" group="class"/>
+  </info>
+  <title>${node.ctype}</title>
+${formatter.format(node.doc)}
+% if node.version:
+<p>Since ${node.version}</p>
+% endif
+  <synopsis ui:expanded="no">
+    <title>Hierarchy</title>
+    <tree>
+      <item>
+        <code>GObjectObject</code>
+      </item>
+    </tree>
+  </synopsis>
+  <links type="topic" ui:expanded="yes"
+         api:type="function" api:mime="text/x-csrc"
+         groups="constructor" style="linklist">
+    <title>Constructors</title>
+  </links>
+  <links type="topic" ui:expanded="yes"
+         api:type="function" api:mime="text/x-csrc"
+         groups="method" style="linklist">
+    <title>Methods</title>
+  </links>
+  <links type="topic" ui:expanded="yes"
+         api:type="function" api:mime="text/x-csrc"
+         groups="function" style="linklist">
+    <title>Functions</title>
+  </links>
+  <links type="topic" ui:expanded="yes" groups="property" style="linklist">
+    <title>Properties</title>
+  </links>
+  <links type="topic" ui:expanded="yes" groups="signal" style="linklist">
+    <title>Signals</title>
+  </links>
+  <links type="topic" ui:expanded="yes" groups="#first #default #last" style="linklist">
+    <title>Other</title>
+  </links>
+</page>
diff --git a/giscanner/mallard-C-default.tmpl b/giscanner/mallard-C-default.tmpl
new file mode 100644 (file)
index 0000000..577fa56
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<page id="${namespace.name}.${node.name}"
+      type="topic"
+      style=""
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+  </info>
+  <title>${namespace.name}.${node.name}</title>
+${formatter.format(node.doc)}
+</page>
diff --git a/giscanner/mallard-C-enum.tmpl b/giscanner/mallard-C-enum.tmpl
new file mode 100644 (file)
index 0000000..20cd089
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<page id="${node.namespace.name}.${node.name}"
+      type="guide"
+      style="enum"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+    <link type="guide" xref="index"/>
+  </info>
+  <title>${node.namespace.name}.${node.name}</title>
+${formatter.format(node.doc)}
+</page>
diff --git a/giscanner/mallard-C-function.tmpl b/giscanner/mallard-C-function.tmpl
new file mode 100644 (file)
index 0000000..2da4710
--- /dev/null
@@ -0,0 +1,95 @@
+<?xml version="1.0"?>
+<%
+page_style = 'function'
+if node.is_constructor:
+    page_style = 'constructor'
+elif node.is_method:
+    page_style = 'method'
+%>
+<page id="${page_id}"
+      type="topic"
+      style="${page_style}"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:api="http://projectmallard.org/experimental/api/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+% if node.parent is not None:
+    <link type="guide" xref="${namespace.name}.${node.parent.name}" group="${page_style}"/>
+% else:
+    <link type="guide" xref="index" group="${page_style}"/>
+% endif
+    <api:function>
+      <api:returns>
+        <api:type>${formatter.format_type(node.retval.type) | x}</api:type>
+      </api:returns>
+      <api:name>${node.symbol}</api:name>
+% if node.is_method:
+      <api:arg>
+        <api:type>${node.parent.ctype} *</api:type>
+        <api:name>self</api:name>
+      </api:arg>
+% endif
+% for arg in node.parameters:
+% if arg.type.ctype == '<varargs>':
+      <api:varargs/>
+% else:
+      <api:arg>
+        <api:type>${formatter.format_type(arg.type) | x}</api:type>
+        <api:name>${arg.argname}</api:name>
+      </api:arg>
+% endif
+% endfor
+    </api:function>
+  </info>
+  <title>${node.symbol}</title>
+<synopsis><code mime="text/x-csrc">
+${node.retval.type.ctype} ${node.symbol} (\
+% if node.is_method:
+${node.parent.ctype} *self\
+%endif
+% if len(node.parameters) == 0:
+% if not node.is_method:
+void\
+%endif
+);
+% elif node.is_method:
+,
+% endif
+% for arg, ix in zip(node.parameters, range(len(node.parameters))):
+% if ix != 0:
+${' ' * (len(formatter.format_type(node.retval.type)) + len(node.symbol) + 3)}\
+% endif
+% if arg.type.ctype == '<varargs>':
+...\
+% else:
+${formatter.format_type(arg.type) | x} ${arg.argname}\
+% endif
+% if ix == len(node.parameters) - 1:
+);
+% else:
+,
+%endif
+% endfor
+</code></synopsis>
+${formatter.format(node.doc)}
+
+% if node.parameters or node.retval:
+<table>
+% for arg, ix in zip(node.parameters, range(len(node.parameters))):
+<tr>
+<td><p>${arg.argname} :</p></td>
+<td>${formatter.format(arg.doc)}</td>
+</tr>
+% endfor
+% if node.retval:
+<tr>
+<td><p>Returns :</p></td>
+<td>${formatter.format(node.retval.doc)}</td>
+</tr>
+% endif
+</table>
+% endif
+% if node.version:
+<p>Since ${node.version}</p>
+% endif
+</page>
diff --git a/giscanner/mallard-C-namespace.tmpl b/giscanner/mallard-C-namespace.tmpl
new file mode 100644 (file)
index 0000000..284ba23
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<page id="index"
+      type="guide"
+      style="namespace"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+  </info>
+  <title>${node.name} Documentation</title>
+  <links type="topic" ui:expanded="yes" groups="class" style="linklist">
+    <title>Classes</title>
+  </links>
+  <links type="topic" ui:expanded="yes" groups="function" style="linklist">
+    <title>Functions</title>
+  </links>
+  <links type="topic" ui:expanded="yes" groups="#first #default #last" style="linklist">
+    <title>Other</title>
+  </links>
+</page>
diff --git a/giscanner/mallard-C-property.tmpl b/giscanner/mallard-C-property.tmpl
new file mode 100644 (file)
index 0000000..2d37ba1
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<page id="${namespace.name}.${node.name}"
+      type="topic"
+      style="property"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+    <link type="guide" xref="${namespace.name}.${node.parent.name}" group="property"/>
+    <title type="link" role="topic">${node.name}</title>
+  </info>
+  <title>${node.parent.ctype}:${node.name}</title>
+${formatter.format(node.doc)}
+</page>
diff --git a/giscanner/mallard-C-record.tmpl b/giscanner/mallard-C-record.tmpl
new file mode 100644 (file)
index 0000000..a173e77
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<page id="${node.namespace.name}.${node.name}"
+      type="guide"
+      style="record"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+    <link type="guide" xref="index"/>
+  </info>
+  <title>${node.namespace.name}${node.name}</title>
+${formatter.format(node.doc)}
+</page>
diff --git a/giscanner/mallard-C-signal.tmpl b/giscanner/mallard-C-signal.tmpl
new file mode 100644 (file)
index 0000000..7aae3ae
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<page id="${namespace.name}.${node.name}"
+      type="topic"
+      style="signal"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+    <link type="guide" xref="${namespace.name}.${node.parent.name}" group="signal"/>
+    <title type="link" role="topic">${node.name}</title>
+  </info>
+  <title>${node.parent.ctype}::${node.name}</title>
+${formatter.format(node.doc)}
+</page>
diff --git a/giscanner/mallard-C-vfunc.tmpl b/giscanner/mallard-C-vfunc.tmpl
new file mode 100644 (file)
index 0000000..5b5bbfb
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<page id="${page_id}"
+      type="topic"
+      style="vfunc"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:api="http://projectmallard.org/experimental/api/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+    <link type="guide" xref="${namespace.name}.${node.parent.name}" group="vfunc"/>
+  </info>
+  <title>${node.name}</title>
+<synopsis><code mime="text/x-csrc">
+</code></synopsis>
+${formatter.format(node.doc)}
+
+% if node.parameters or node.retval:
+<table>
+% for arg, ix in zip(node.parameters, range(len(node.parameters))):
+<tr>
+<td><p>${arg.argname} :</p></td>
+<td>${formatter.format(arg.doc)}</td>
+</tr>
+% endfor
+% if node.retval:
+<tr>
+<td><p>Returns :</p></td>
+<td>${formatter.format(node.retval.doc)}</td>
+</tr>
+% endif
+</table>
+% endif
+% if node.version:
+<p>Since ${node.version}</p>
+% endif
+</page>
diff --git a/giscanner/mallard-Python-class.tmpl b/giscanner/mallard-Python-class.tmpl
new file mode 100644 (file)
index 0000000..04e5fc7
--- /dev/null
@@ -0,0 +1,66 @@
+<?xml version="1.0"?>
+<page id="${node.namespace.name}.${node.name}"
+      type="guide"
+      style="class"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:api="http://projectmallard.org/experimental/api/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+    <link type="guide" xref="index" group="class"/>
+  </info>
+  <title>${namespace.name}.${node.name}</title>
+${formatter.format(node.doc)}
+
+  <synopsis><code>
+from gi.repository import ${namespace.name}
+
+${formatter.to_underscores(node.name).lower()} = ${namespace.name}.${node.name}(\
+% for property_, ix in zip(node.properties, range(len(node.properties))):
+% if property_.construct or property_.construct_only or property_.writable:
+<link xref='${namespace.name}.${node.name}-${property_.name}'>${property_.name.replace('-', '_')}</link>=value\
+% if ix != len(node.properties) - 1:
+, \
+% endif
+% endif
+% endfor
+)\
+  </code></synopsis>
+
+% if node.version:
+<p>Since ${node.version}</p>
+% endif
+  <synopsis>
+    <title>Hierarchy</title>
+    <tree>
+% for class_ in formatter.get_class_hierarchy(node):
+      <item>
+        <code>${class_.namespace.name}.${class_.name}</code>
+% endfor
+% for class_ in formatter.get_class_hierarchy(node):
+      </item>
+% endfor
+    </tree>
+  </synopsis>
+  <links type="topic" ui:expanded="yes"
+         api:type="function" api:mime="text/x-python"
+         groups="method" style="linklist">
+    <title>Methods</title>
+  </links>
+  <links type="topic" ui:expanded="yes"
+         api:type="function" api:mime="text/x-python"
+         groups="function" style="linklist">
+    <title>Functions</title>
+  </links>
+  <links type="topic" ui:expanded="yes" groups="property" style="linklist">
+    <title>Properties</title>
+  </links>
+  <links type="topic" ui:expanded="yes" groups="signal" style="linklist">
+    <title>Signals</title>
+  </links>
+  <links type="topic" ui:expanded="yes" groups="vfunc" style="linklist">
+    <title>Virtual functions</title>
+  </links>
+  <links type="topic" ui:expanded="yes" groups="#first #default #last" style="linklist">
+    <title>Other</title>
+  </links>
+</page>
diff --git a/giscanner/mallard-Python-default.tmpl b/giscanner/mallard-Python-default.tmpl
new file mode 100644 (file)
index 0000000..683adf6
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<page id="${page_id}"
+      type="topic"
+      style=""
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+  </info>
+  <title>${namespace.name}.${node.name}</title>
+${formatter.format(node.doc)}
+</page>
diff --git a/giscanner/mallard-Python-enum.tmpl b/giscanner/mallard-Python-enum.tmpl
new file mode 100644 (file)
index 0000000..fd6ca0f
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<page id="${node.namespace.name}.${node.name}"
+      type="guide"
+      style="enum"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+    <link type="guide" xref="index"/>
+  </info>
+  <title>${node.namespace.name}.${node.name}</title>
+  ${formatter.format(node.doc)}
+% if node.members:
+<table>
+% for member, ix in zip(node.members, range(len(node.members))):
+<tr>
+<td><p>${node.name}.${member.name.upper()} :</p></td>
+<td>${formatter.format(member.doc)}</td>
+</tr>
+% endfor
+</table>
+% endif
+
+</page>
diff --git a/giscanner/mallard-Python-function.tmpl b/giscanner/mallard-Python-function.tmpl
new file mode 100644 (file)
index 0000000..7aa25e8
--- /dev/null
@@ -0,0 +1,88 @@
+<?xml version="1.0"?>
+<%
+page_style = 'function'
+if node.is_constructor:
+    page_style = 'constructor'
+elif node.is_method:
+    page_style = 'method'
+%>
+<page id="${page_id}"
+      type="topic"
+      style="${page_style}"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:api="http://projectmallard.org/experimental/api/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+% if node.parent is not None:
+    <link type="guide" xref="${namespace.name}.${node.parent.name}" group="${page_style}"/>
+% else:
+    <link type="guide" xref="index" group="${page_style}"/>
+% endif
+    <api:function>
+      <api:returns>
+        <api:type>${formatter.format_type(node.retval.type) | x}</api:type>
+      </api:returns>
+      <api:name>${node.symbol}</api:name>
+% if node.is_method:
+      <api:arg>
+        <api:type>${node.parent.ctype} *</api:type>
+        <api:name>self</api:name>
+      </api:arg>
+% endif
+% for arg in node.parameters:
+% if arg.type.ctype == '<varargs>':
+      <api:varargs/>
+% else:
+      <api:arg>
+        <api:type>${formatter.format_type(arg.type) | x}</api:type>
+        <api:name>${arg.argname}</api:name>
+      </api:arg>
+% endif
+% endfor
+    </api:function>
+  </info>
+  <title>${node.name}</title>
+<synopsis><code mime="text/x-python">
+% if len(node.parameters) != 0:
+@accepts(\
+% for arg, ix in zip(node.parameters, range(len(node.parameters))):
+${formatter.format_type(arg.type) | x}\
+% if ix != len(node.parameters) - 1:
+, \
+%endif
+% endfor
+)
+% endif
+@returns(${formatter.format_type(node.retval.type) | x})
+def \
+${node.name}(\
+% for arg, ix in zip(node.parameters, range(len(node.parameters))):
+${arg.argname}\
+% if ix != len(node.parameters) - 1:
+, \
+%endif
+% endfor
+)
+</code></synopsis>
+${formatter.format(node.doc)}
+
+% if node.parameters or node.retval:
+<table>
+% for arg, ix in zip(node.parameters, range(len(node.parameters))):
+<tr>
+<td><p>${arg.argname} :</p></td>
+<td>${formatter.format(arg.doc)}</td>
+</tr>
+% endfor
+% if node.retval and node.retval.type.ctype != 'void':
+<tr>
+<td><p>Returns :</p></td>
+<td>${formatter.format(node.retval.doc)}</td>
+</tr>
+% endif
+</table>
+% endif
+% if node.version:
+<p>Since ${node.version}</p>
+% endif
+</page>
diff --git a/giscanner/mallard-Python-namespace.tmpl b/giscanner/mallard-Python-namespace.tmpl
new file mode 100644 (file)
index 0000000..935cd44
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<page id="index"
+      type="guide"
+      style="namespace"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+  </info>
+  <title>${node.name} Documentation</title>
+  <links type="topic" ui:expanded="yes" groups="class">
+    <title>Classes</title>
+  </links>
+  <links type="topic" ui:expanded="yes" groups="function">
+    <title>Functions</title>
+  </links>
+  <links type="topic" ui:expanded="yes" groups="#first #default #last">
+    <title>Other</title>
+  </links>
+</page>
diff --git a/giscanner/mallard-Python-property.tmpl b/giscanner/mallard-Python-property.tmpl
new file mode 100644 (file)
index 0000000..c4d2229
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<page id="${namespace.name}.${node.parent.name}-${node.name}"
+      type="topic"
+      style="property"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+    <link type="guide" xref="${namespace.name}.${node.parent.name}" group="property"/>
+    <title type="link" role="topic">${node.name}</title>
+  </info>
+  <title>${namespace.name}.${node.parent.name}:${node.name}</title>
+<synopsis><code mime="text/x-python">
+"${node.name}"             ${formatter.format_type(node.type)}                : ${formatter.format_property_flags(node)}
+</code></synopsis>
+${formatter.format(node.doc)}
+</page>
diff --git a/giscanner/mallard-Python-record.tmpl b/giscanner/mallard-Python-record.tmpl
new file mode 100644 (file)
index 0000000..1b00e3b
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<page id="${node.namespace.name}.${node.name}"
+      type="guide"
+      style="record"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+    <link type="guide" xref="index"/>
+  </info>
+  <title>${node.namespace.name}${node.name}</title>
+  <p>${node.doc}</p>
+</page>
diff --git a/giscanner/mallard-Python-signal.tmpl b/giscanner/mallard-Python-signal.tmpl
new file mode 100644 (file)
index 0000000..fed0659
--- /dev/null
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<page id="${namespace.name}.${node.parent.name}-${node.name}"
+      type="topic"
+      style="signal"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+    <link type="guide" xref="${namespace.name}.${node.parent.name}" group="signal"/>
+    <title type="link" role="topic">${node.name}</title>
+  </info>
+  <title>${namespace.name}.${node.parent.name}::${node.name}</title>
+<synopsis><code mime="text/x-python">
+def callback(${formatter.to_underscores(node.parent.name).lower()}, \
+% for arg, ix in zip(node.parameters, range(len(node.parameters))):
+${arg.argname}, \
+% endfor
+user_param1, ...)
+</code></synopsis>
+${formatter.format(node.doc)}
+
+<table>
+<tr>
+<td><p>${formatter.to_underscores(node.parent.name).lower()} :</p></td>
+<td><p>instance of ${namespace.name}.${node.parent.name} that is emitting the signal</p></td>
+</tr>
+% for arg, ix in zip(node.parameters, range(len(node.parameters))):
+<tr>
+<td><p>${arg.argname} :</p></td>
+<td>${formatter.format(arg.doc)}</td>
+</tr>
+% endfor
+<tr>
+<td><p>user_param1 :</p></td>
+<td><p>first user parameter (if any) specified with the connect() method</p></td>
+</tr>
+<tr>
+<td><p>... :</p></td>
+<td><p>additional user parameters (if any)</p></td>
+</tr>
+% if node.retval and \
+     node.retval.type.ctype != 'void' and \
+     node.retval.type.ctype is not None:
+<tr>
+<td><p>Returns :</p></td>
+<td>${node.retval.type.ctype} ${formatter.format(node.retval.doc)}</td>
+</tr>
+% endif
+</table>
+% if node.version:
+<p>Since ${node.version}</p>
+% endif
+</page>
diff --git a/giscanner/mallard-Python-vfunc.tmpl b/giscanner/mallard-Python-vfunc.tmpl
new file mode 100644 (file)
index 0000000..7e95bc8
--- /dev/null
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<page id="${page_id}"
+      type="topic"
+      style="vfunc"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:api="http://projectmallard.org/experimental/api/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+    <link type="guide" xref="${namespace.name}.${node.parent.name}" group="vfunc"/>
+    <title type="link" role="topic">${node.name}</title>
+  </info>
+  <title>${namespace.name}.${node.parent.name}.${node.name}</title>
+<synopsis><code mime="text/x-python">
+% if len(node.parameters) != 0:
+@accepts(\
+% for arg, ix in zip(node.parameters, range(len(node.parameters))):
+${formatter.format_type(arg.type) | x}\
+% if ix != len(node.parameters) - 1:
+, \
+%endif
+% endfor
+)
+% endif
+@returns(${formatter.format_type(node.retval.type) | x})
+def \
+do_${node.name}(self, \
+% for arg, ix in zip(node.parameters, range(len(node.parameters))):
+${arg.argname}\
+% if ix != len(node.parameters) - 1:
+, \
+%endif
+% endfor
+):
+</code></synopsis>
+${formatter.format(node.doc)}
+
+% if node.parameters or node.retval:
+<table>
+% for arg, ix in zip(node.parameters, range(len(node.parameters))):
+<tr>
+<td><p>${arg.argname} :</p></td>
+<td>${formatter.format(arg.doc)}</td>
+</tr>
+% endfor
+% if node.retval and node.retval.type.ctype != 'void':
+<tr>
+<td><p>Returns :</p></td>
+<td>${formatter.format(node.retval.doc)}</td>
+</tr>
+% endif
+</table>
+% endif
+% if node.version:
+<p>Since ${node.version}</p>
+% endif
+</page>
diff --git a/giscanner/mallardwriter.py b/giscanner/mallardwriter.py
new file mode 100644 (file)
index 0000000..3b0b810
--- /dev/null
@@ -0,0 +1,253 @@
+#!/usr/bin/env python
+# -*- Mode: Python -*-
+# GObject-Introspection - a framework for introspecting GObject libraries
+# Copyright (C) 2010 Zach Goldberg
+# Copyright (C) 2011 Johan Dahlin
+# Copyright (C) 2011 Shaun McCance
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+
+import os
+import re
+import tempfile
+
+from xml.sax import saxutils
+from mako.template import Template
+from mako.runtime import supports_caller
+
+from . import ast
+from .utils import to_underscores
+
+def _space(num):
+    return " " * num
+
+class MallardFormatter(object):
+    def __init__(self, transformer):
+        self._transformer = transformer
+
+    def escape(self, text):
+        return saxutils.escape(text.encode('utf-8')).decode('utf-8')
+
+    def format(self, doc):
+        if doc is None:
+            return ''
+
+        result = ''
+        for para in doc.split('\n\n'):
+            result += '<p>'
+            result += self.format_inline(para)
+            result += '</p>'
+        return result
+
+    def format_inline(self, para):
+        result = ''
+
+        poss = []
+        poss.append((para.find('#'), '#'))
+        poss = [pos for pos in poss if pos[0] >= 0]
+        poss.sort(cmp=lambda x, y: cmp(x[0], y[0]))
+        if len(poss) == 0:
+            result += self.escape(para)
+        elif poss[0][1] == '#':
+            pos = poss[0][0]
+            result += self.escape(para[:pos])
+            rest = para[pos + 1:]
+            link = re.split('[^a-zA-Z_:-]', rest, maxsplit=1)[0]
+            if link.endswith(':'):
+                link = link[:-1]
+            namespace = self._transformer.namespace
+            if '::' in link:
+                type_name, signal_name = link.split('::')
+                if type_name in namespace.ctypes:
+                    type_ = namespace.get_by_ctype(type_name)
+                    xref = '%s.%s-%s' % (namespace.name, type_.name, signal_name)
+                    xref_name = '%s.%s::%s' % (namespace.name, type_.name, signal_name)
+                else:
+                    xref = link
+                    xref_name = link
+            elif ':' in link:
+                type_name, property_name = link.split(':')
+                if type_name in namespace.ctypes:
+                    type_ = namespace.get_by_ctype(type_name)
+                    xref = '%s.%s-%s' % (namespace.name, type_.name, property_name)
+                    xref_name = '%s.%s:%s' % (namespace.name, type_.name, property_name)
+                else:
+                    xref = link
+                    xref_name = link
+            elif link in namespace.ctypes:
+                type_ = namespace.get_by_ctype(link)
+                xref = '%s.%s' % (namespace.name, type_.name)
+                xref_name = xref
+            else:
+                xref = link
+                xref_name = link
+            result += '<link xref="%s">%s</link>' % (xref, xref_name)
+            if len(link) < len(rest):
+                result += self.format_inline(rest[len(link):])
+
+        return result
+
+    def format_type(self, type_):
+        raise NotImplementedError
+
+    def format_property_flags(self, property_):
+        flags = []
+        if property_.readable:
+            flags.append("Read")
+        if property_.writable:
+            flags.append("Write")
+        if property_.construct:
+            flags.append("Construct")
+        if property_.construct_only:
+            flags.append("Construct Only")
+
+        return " / ".join(flags)
+
+    def to_underscores(self, string):
+        return to_underscores(string)
+
+    def get_class_hierarchy(self, node):
+        parent_chain = [node]
+
+        while node.parent:
+            node = self._transformer.lookup_giname(str(node.parent))
+            parent_chain.append(node)
+
+        parent_chain.reverse()
+        return parent_chain
+
+class MallardFormatterC(MallardFormatter):
+
+    def format_type(self, type_):
+        if isinstance(type_, ast.Array):
+            try:
+                return self.format_type(type_.element_type) + '*'
+            except:
+                return type_.target_fundamental
+        elif type_.ctype is not None:
+            return type_.ctype
+        else:
+            return type_.target_fundamental
+
+class MallardFormatterPython(MallardFormatter):
+
+    def format_type(self, type_):
+        if isinstance(type_, ast.Array):
+            return '[' + self.format_type(type_.element_type) + ']'
+        elif isinstance(type_, ast.Map):
+            return '{%s: %s}' % (self.format_type(type_.key_type),
+                                 self.format_type(type_.value_type))
+        elif type_.target_giname is not None:
+            return type_.target_giname
+        else:
+            return type_.target_fundamental
+
+    def format(self, doc):
+        doc = MallardFormatter.format(self, doc)
+        doc = doc.replace('%NULL', 'None')
+        doc = doc.replace('%TRUE', 'True')
+        doc = doc.replace('%FALSE', 'False')
+        return doc
+
+class MallardWriter(object):
+    def __init__(self, transformer, language):
+        self._transformer = transformer
+        self._language = language
+
+        if self._language == 'C':
+            self._formatter = MallardFormatterC(self._transformer)
+        elif self._language == 'Python':
+            self._formatter = MallardFormatterPython(self._transformer)
+        else:
+            raise SystemExit("Unsupported language: %s" % language)
+
+    def write(self, output):
+        nodes = [self._transformer.namespace]
+        for node in self._transformer.namespace.itervalues():
+            if isinstance(node, ast.Function) and node.moved_to is not None:
+                continue
+            if getattr(node, 'disguised', False):
+                continue
+            if isinstance(node, ast.Record) and \
+               self._language == 'Python' and \
+               node.is_gtype_struct_for is not None:
+                continue
+            nodes.append(node)
+            if isinstance(node, (ast.Class, ast.Interface, ast.Record)):
+                nodes += getattr(node, 'methods', [])
+                nodes += getattr(node, 'static_methods', [])
+                nodes += getattr(node, 'virtual_methods', [])
+                nodes += getattr(node, 'properties', [])
+                nodes += getattr(node, 'signals', [])
+                if self._language == 'C':
+                    nodes += getattr(node, 'constructors', [])
+        for node in nodes:
+            self._render_node(node, output)
+
+    def _render_node(self, node, output):
+        namespace = self._transformer.namespace
+        if isinstance(node, ast.Namespace):
+            template_name = 'mallard-%s-namespace.tmpl' % self._language
+            page_id = 'index'
+        elif isinstance(node, (ast.Class, ast.Interface)):
+            template_name = 'mallard-%s-class.tmpl' % self._language
+            page_id = '%s.%s' % (namespace.name, node.name)
+        elif isinstance(node, ast.Record):
+            template_name = 'mallard-%s-record.tmpl' % self._language
+            page_id = '%s.%s' % (namespace.name, node.name)
+        elif isinstance(node, ast.Function):
+            template_name = 'mallard-%s-function.tmpl' % self._language
+            if node.parent is not None:
+                page_id = '%s.%s.%s' % (namespace.name, node.parent.name, node.name)
+            else:
+                page_id = '%s.%s' % (namespace.name, node.name)
+        elif isinstance(node, ast.Enum):
+            template_name = 'mallard-%s-enum.tmpl' % self._language
+            page_id = '%s.%s' % (namespace.name, node.name)
+        elif isinstance(node, ast.Property) and node.parent is not None:
+            template_name = 'mallard-%s-property.tmpl' % self._language
+            page_id = '%s.%s-%s' % (namespace.name, node.parent.name, node.name)
+        elif isinstance(node, ast.Signal) and node.parent is not None:
+            template_name = 'mallard-%s-signal.tmpl' % self._language
+            page_id = '%s.%s-%s' % (namespace.name, node.parent.name, node.name)
+        elif isinstance(node, ast.VFunction) and node.parent is not None:
+            template_name = 'mallard-%s-vfunc.tmpl' % self._language
+            page_id = '%s.%s-%s' % (namespace.name, node.parent.name, node.name)
+        else:
+            template_name = 'mallard-%s-default.tmpl' % self._language
+            page_id = '%s.%s' % (namespace.name, node.name)
+
+        if 'UNINSTALLED_INTROSPECTION_SRCDIR' in os.environ:
+            top_srcdir = os.environ['UNINSTALLED_INTROSPECTION_SRCDIR']
+            template_dir = os.path.join(top_srcdir, 'giscanner')
+        else:
+            template_dir = os.path.dirname(__file__)
+
+        file_name = os.path.join(template_dir, template_name)
+        file_name = os.path.abspath(file_name)
+        template = Template(filename=file_name, output_encoding='utf-8',
+                            module_directory=tempfile.gettempdir())
+        result = template.render(namespace=namespace,
+                                 node=node,
+                                 page_id=page_id,
+                                 formatter=self._formatter)
+
+        output_file_name = os.path.join(os.path.abspath(output),
+                                        page_id + '.page')
+        fp = open(output_file_name, 'w')
+        fp.write(result)
+        fp.close()
diff --git a/giscanner/message.py b/giscanner/message.py
new file mode 100644 (file)
index 0000000..1f7195d
--- /dev/null
@@ -0,0 +1,181 @@
+#!/usr/bin/env python
+# -*- Mode: Python -*-
+# GObject-Introspection - a framework for introspecting GObject libraries
+# Copyright (C) 2010 Red Hat, Inc.
+# Copyright (C) 2010 Johan Dahlin
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+
+import os
+import sys
+
+from . import utils
+
+(WARNING,
+ ERROR,
+ FATAL) = range(3)
+
+
+class Position(object):
+    """Represents a position in the source file which we
+    want to inform about.
+    """
+    def __init__(self, filename=None, line=None, column=None):
+        self.filename = filename
+        self.line = line
+        self.column = column
+
+    def __cmp__(self, other):
+        return cmp((self.filename, self.line, self.column),
+                   (other.filename, other.line, other.column))
+
+    def __repr__(self):
+        return '<Position %s:%d:%d>' % (
+            os.path.basename(self.filename),
+            self.line or -1,
+            self.column or -1)
+
+    def format(self, cwd):
+        filename = self.filename
+        if filename.startswith(cwd):
+            filename = filename[len(cwd):]
+        if self.column is not None:
+            return '%s:%d:%d' % (filename, self.line, self.column)
+        elif self.line is not None:
+            return '%s:%d' % (filename, self.line, )
+        else:
+            return '%s:' % (filename, )
+
+    def offset(self, offset):
+        return Position(self.filename, self.line+offset, self.column)
+
+
+class MessageLogger(object):
+    _instance = None
+
+    def __init__(self, namespace, output=None):
+        if output is None:
+            output = sys.stderr
+        self._cwd = os.getcwd() + os.sep
+        self._output = output
+        self._namespace = namespace
+        self._enable_warnings = False
+        self._warning_count = 0
+
+    @classmethod
+    def get(cls, *args, **kwargs):
+        if cls._instance is None:
+            cls._instance = cls(*args, **kwargs)
+        return cls._instance
+
+    def enable_warnings(self, enable):
+        self._enable_warnings = enable
+
+    def get_warning_count(self):
+        return self._warning_count
+
+    def log(self, log_type, text, positions=None, prefix=None):
+        """Log a warning, using optional file positioning information.
+If the warning is related to a ast.Node type, see log_node_warning()."""
+        utils.break_on_debug_flag('warning')
+
+        self._warning_count += 1
+
+        if not self._enable_warnings and log_type != FATAL:
+            return
+
+        # Always drop through on fatal
+
+        if type(positions) == set:
+            positions = list(positions)
+        if isinstance(positions, Position):
+            positions = [positions]
+
+        if not positions:
+            positions = [Position('<unknown>')]
+
+        for position in positions[:-1]:
+            self._output.write("%s:\n" % (position.format(cwd=self._cwd), ))
+        last_position = positions[-1].format(cwd=self._cwd)
+
+        if log_type == WARNING:
+            error_type = "Warning"
+        elif log_type == ERROR:
+            error_type = "Error"
+        elif log_type == FATAL:
+            error_type = "Fatal"
+        if prefix:
+            text = (
+'''%s: %s: %s: %s: %s\n''' % (last_position, error_type, self._namespace.name,
+                            prefix, text))
+        else:
+            text = (
+'''%s: %s: %s: %s\n''' % (last_position, error_type, self._namespace.name, text))
+
+        self._output.write(text)
+        if log_type == FATAL:
+            utils.break_on_debug_flag('fatal')
+            raise SystemExit(text)
+
+    def log_node(self, log_type, node, text, context=None, positions=None):
+        """Log a warning, using information about file positions from
+the given node.  The optional context argument, if given, should be
+another ast.Node type which will also be displayed.  If no file position
+information is available from the node, the position data from the
+context will be used."""
+        if positions:
+            pass
+        elif getattr(node, 'file_positions', None):
+            positions = node.file_positions
+        elif context and context.file_positions:
+            positions = context.file_positions
+        else:
+            positions = []
+            if not context:
+                text = "context=%r %s" % (node, text)
+
+        if context:
+            text = "%s: %s" % (getattr(context, 'symbol', context.name), text)
+        elif not positions and hasattr(node, 'name'):
+            text = "(%s)%s: %s" % (node.__class__.__name__, node.name, text)
+
+        self.log(log_type, text, positions)
+
+    def log_symbol(self, log_type, symbol, text):
+        """Log a warning in the context of the given symbol."""
+        self.log(log_type, text, symbol.position,
+                 prefix="symbol=%r" % (symbol.ident, ))
+
+
+def log_node(log_type, node, text, context=None, positions=None):
+    ml = MessageLogger.get()
+    ml.log_node(log_type, node, text, context=context, positions=positions)
+
+def warn(text, positions=None, prefix=None):
+    ml = MessageLogger.get()
+    ml.log(WARNING, text, positions, prefix)
+
+def warn_node(node, text, context=None, positions=None):
+    log_node(WARNING, node, text, context=context, positions=positions)
+
+def warn_symbol(symbol, text):
+    ml = MessageLogger.get()
+    ml.log_symbol(WARNING, symbol, text)
+
+def fatal(text, positions=None, prefix=None):
+    ml = MessageLogger.get()
+    ml.log(FATAL, text, positions, prefix)
diff --git a/giscanner/odict.py b/giscanner/odict.py
new file mode 100644 (file)
index 0000000..df703cb
--- /dev/null
@@ -0,0 +1,45 @@
+# -*- Mode: Python -*-
+# GObject-Introspection - a framework for introspecting GObject libraries
+# 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 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.
+#
+
+"""odict - an ordered dictionary"""
+
+from UserDict import DictMixin
+
+
+class odict(DictMixin):
+
+    def __init__(self):
+        self._items = {}
+        self._keys = []
+
+    def __setitem__(self, key, value):
+        if key not in self._items:
+            self._keys.append(key)
+        self._items[key] = value
+
+    def __getitem__(self, key):
+        return self._items[key]
+
+    def __delitem__(self, key):
+        del self._items[key]
+        self._keys.remove(key)
+
+    def keys(self):
+        return self._keys[:]
diff --git a/giscanner/scannerlexer.l b/giscanner/scannerlexer.l
new file mode 100644 (file)
index 0000000..6a40398
--- /dev/null
@@ -0,0 +1,359 @@
+/* -*- Mode: C -*-
+ * GObject introspection: C lexer
+ *
+ * Copyright (c) 1997 Sandro Sigala  <ssigala@globalnet.it>
+ * Copyright (c) 2007-2008 Jürg Billeter  <j@bitron.ch>
+ * Copyright (c) 2010 Andreas Rottmann <a.rottmann@gmx.at>
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+%{
+#include <ctype.h>
+#include <stdio.h>
+
+#include <glib.h>
+#include "sourcescanner.h"
+#include "scannerparser.h"
+#include "grealpath.h"
+
+int lineno;
+char linebuf[2000];
+
+#undef YY_BUF_SIZE
+#define YY_BUF_SIZE 1048576
+
+extern int yylex (GISourceScanner *scanner);
+#define YY_DECL int yylex (GISourceScanner *scanner)
+static int yywrap (void);
+static void parse_comment (GISourceScanner *scanner);
+static void parse_trigraph (GISourceScanner *scanner);
+static void process_linemarks (GISourceScanner *scanner);
+static int check_identifier (GISourceScanner *scanner, const char *);
+static int parse_ignored_macro (void);
+%}
+
+%option nounput
+
+intsuffix                              ([uU][lL]?[lL]?)|([lL][lL]?[uU]?)
+fracconst                              ([0-9]*\.[0-9]+)|([0-9]+\.)
+exppart                                        [eE][-+]?[0-9]+
+floatsuffix                            [fFlL]
+chartext                               ([^\\\'])|(\\.)
+stringtext                             ([^\\\"])|(\\.)
+
+%%
+
+\n.*                                   { strncpy(linebuf, yytext+1, sizeof(linebuf)); /* save the next line */
+                                               linebuf[sizeof(linebuf)-1]='\0';
+                                               /* printf("%4d:%s\n",lineno,linebuf); */
+                                               yyless(1);      /* give back all but the \n to rescan */
+                                               ++lineno;
+                                       }
+"\\\n"                                 { ++lineno; }
+[\t\f\v\r ]+                           { /* Ignore whitespace. */ }
+
+"/*"                                   { parse_comment(scanner); }
+"/*"[\t ]?<[\t ,=A-Za-z0-9_]+>[\t ]?"*/" { parse_trigraph(scanner); }
+"//".*                                 { }
+
+"#define "[a-zA-Z_][a-zA-Z_0-9]*"("    { yyless (yyleng - 1); return FUNCTION_MACRO; }
+"#define "[a-zA-Z_][a-zA-Z_0-9]*       { return OBJECT_MACRO; }
+"#pragma ".*"\n"                       { /* Ignore pragma. */ }
+
+"# "[0-9]+" ".*"\n"                    { process_linemarks(scanner); }
+"#"                                    { }
+"{"                                    { return '{'; }
+"<%"                                   { return '{'; }
+"}"                                    { return '}'; }
+"%>"                                   { return '}'; }
+"["                                    { return '['; }
+"<:"                                   { return '['; }
+"]"                                    { return ']'; }
+":>"                                   { return ']'; }
+"("                                    { return '('; }
+")"                                    { return ')'; }
+";"                                    { return ';'; }
+":"                                    { return ':'; }
+"..."                                  { return ELLIPSIS; }
+"?"                                    { return '?'; }
+"."                                    { return '.'; }
+"+"                                    { return '+'; }
+"-"                                    { return '-'; }
+"*"                                    { return '*'; }
+"/"                                    { return '/'; }
+"%"                                    { return '%'; }
+"^"                                    { return '^'; }
+"&"                                    { return '&'; }
+"|"                                    { return '|'; }
+"~"                                    { return '~'; }
+"!"                                    { return '!'; }
+"="                                    { return '='; }
+"<"                                    { return '<'; }
+">"                                    { return '>'; }
+"+="                                   { return ADDEQ; }
+"-="                                   { return SUBEQ; }
+"*="                                   { return MULEQ; }
+"/="                                   { return DIVEQ; }
+"%="                                   { return MODEQ; }
+"^="                                   { return XOREQ; }
+"&="                                   { return ANDEQ; }
+"|="                                   { return OREQ; }
+"<<"                                   { return SL; }
+">>"                                   { return SR; }
+"<<="                                  { return SLEQ; }
+">>="                                  { return SREQ; }
+"=="                                   { return EQ; }
+"!="                                   { return NOTEQ; }
+"<="                                   { return LTEQ; }
+">="                                   { return GTEQ; }
+"&&"                                   { return ANDAND; }
+"||"                                   { return OROR; }
+"++"                                   { return PLUSPLUS; }
+"--"                                   { return MINUSMINUS; }
+","                                    { return ','; }
+"->"                                   { return ARROW; }
+
+"__asm"                                { if (!parse_ignored_macro()) REJECT; }
+"__asm__"                              { if (!parse_ignored_macro()) REJECT; }
+"__attribute__"                        { if (!parse_ignored_macro()) REJECT; }
+"__attribute"                          { if (!parse_ignored_macro()) REJECT; }
+"__const"                               { return CONST; }
+"__extension__"                         { return EXTENSION; }
+"__inline"                             { return INLINE; }
+"__nonnull"                            { if (!parse_ignored_macro()) REJECT; }
+"__signed__"                           { return SIGNED; }
+"__restrict"                           { return RESTRICT; }
+"__typeof"                             { if (!parse_ignored_macro()) REJECT; }
+"_Bool"                                        { return BOOL; }
+
+[a-zA-Z_][a-zA-Z_0-9]*                 { if (scanner->macro_scan) return IDENTIFIER; else REJECT; }
+
+"asm"                                  { if (!parse_ignored_macro()) REJECT; }
+"auto"                                 { return AUTO; }
+"break"                                        { return BREAK; }
+"case"                                 { return CASE; }
+"char"                                 { return CHAR; }
+"const"                                        { return CONST; }
+"continue"                             { return CONTINUE; }
+"default"                              { return DEFAULT; }
+"do"                                   { return DO; }
+"double"                               { return DOUBLE; }
+"else"                                 { return ELSE; }
+"enum"                                 { return ENUM; }
+"extern"                               { return EXTERN; }
+"float"                                        { return FLOAT; }
+"for"                                  { return FOR; }
+"goto"                                 { return GOTO; }
+"if"                                   { return IF; }
+"inline"                               { return INLINE; }
+"int"                                  { return INT; }
+"long"                                 { return LONG; }
+"register"                             { return REGISTER; }
+"restrict"                             { return RESTRICT; }
+"return"                               { return RETURN; }
+"short"                                        { return SHORT; }
+"signed"                               { return SIGNED; }
+"sizeof"                               { return SIZEOF; }
+"static"                               { return STATIC; }
+"struct"                               { return STRUCT; }
+"switch"                               { return SWITCH; }
+"typedef"                              { return TYPEDEF; }
+"union"                                        { return UNION; }
+"unsigned"                             { return UNSIGNED; }
+"void"                                 { return VOID; }
+"volatile"                             { return VOLATILE; }
+"while"                                        { return WHILE; }
+
+[a-zA-Z_][a-zA-Z_0-9]*                 { return check_identifier(scanner, yytext); }
+
+"0"[xX][0-9a-fA-F]+{intsuffix}?                { return INTEGER; }
+"0"[0-7]+{intsuffix}?                  { return INTEGER; }
+[0-9]+{intsuffix}?                     { return INTEGER; }
+
+{fracconst}{exppart}?{floatsuffix}?    { return FLOATING; }
+[0-9]+{exppart}{floatsuffix}?          { return FLOATING; }
+
+"'"{chartext}*"'"                      { return CHARACTER; }
+"L'"{chartext}*"'"                     { return CHARACTER; }
+
+"\""{stringtext}*"\""                  { return STRING; }
+"L\""{stringtext}*"\""                 { return STRING; }
+
+.                                      { if (yytext[0]) fprintf(stderr, "%s:%d: unexpected character `%c'\n", scanner->current_filename, lineno, yytext[0]); }
+
+%%
+
+static int
+yywrap (void)
+{
+  return 1;
+}
+
+
+static void
+parse_comment (GISourceScanner *scanner)
+{
+  GString *string;
+  int c1, c2;
+  GISourceComment *comment;
+  int comment_lineno;
+
+  c1 = input();
+  c2 = input();
+
+  string = g_string_new ("");
+
+  comment_lineno = lineno;
+
+  while (c2 != EOF && !(c1 == '*' && c2 == '/'))
+    {
+      g_string_append_c (string, c1);
+
+      if (c1 == '\n')
+        lineno++;
+
+      c1 = c2;
+      c2 = input();
+
+    }
+
+  comment = g_slice_new (GISourceComment);
+  comment->comment = g_string_free (string, FALSE);
+  comment->line = comment_lineno;
+  comment->filename = g_strdup(scanner->current_filename);
+
+  scanner->comments = g_slist_prepend (scanner->comments,
+                                       comment);
+}
+
+static int
+check_identifier (GISourceScanner *scanner,
+                 const char  *s)
+{
+       /*
+        * This function checks if `s' is a type name or an
+        * identifier.
+        */
+
+       if (gi_source_scanner_is_typedef (scanner, s)) {
+               return TYPEDEF_NAME;
+       } else if (strcmp (s, "__builtin_va_list") == 0) {
+               return TYPEDEF_NAME;
+       }
+
+       return IDENTIFIER;
+}
+
+/*
+ * # linenum "filename" flags
+ *  See http://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html
+ **/
+
+static void
+process_linemarks (GISourceScanner *scanner)
+{
+        char filename[1025];
+        char *compress;
+        char *real;
+
+        sscanf(yytext, "# %d \"%1024[^\"]\"", &lineno, filename);
+
+       compress = g_strcompress (filename);
+        real = g_realpath (filename);
+        if (real) {
+                g_free (scanner->current_filename);
+                scanner->current_filename = real;
+        } else {
+                g_free (real);
+        }
+        g_free (compress);
+}
+
+/*
+ * This parses a macro which is ignored, such as
+ * __attribute__((x)) or __asm__ (x)
+ */
+static int
+parse_ignored_macro (void)
+{
+       int c;
+       int nest;
+
+       while ((c = input ()) != EOF && isspace (c))
+               ;
+       if (c != '(')
+               return FALSE;
+
+       nest = 0;
+       while ((c = input ()) != EOF && (nest > 0 || c != ')')) {
+               if (c == '(')
+                       nest++;
+               else if (c == ')')
+                       nest--;
+               else if (c == '"') {
+                       while ((c = input ()) != EOF && c != '"') {
+                               if (c == '\\')
+                                       c = input ();
+                       }
+               } else if (c == '\'') {
+                       c = input ();
+                       if (c == '\\')
+                               c = input ();
+                       else if (c == '\'')
+                               return FALSE;
+                       c = input ();
+                       if (c != '\'')
+                               return FALSE;
+               } else if (c == '\n')
+                       lineno++;
+       }
+
+       return TRUE;
+}
+
+static void
+parse_trigraph (GISourceScanner *scanner)
+{
+       char **items;
+       char *start, *end;
+       int i;
+
+       start = g_strstr_len (yytext, yyleng, "<");
+       g_assert (start != NULL);
+       end = g_strstr_len (yytext, yyleng, ">");
+       g_assert (end != NULL);
+       *end = '\0';
+       items = g_strsplit (start + 1, ",", 0);
+       for (i = 0; items[i] != NULL; i++) {
+               char *item = items[i];
+               g_strstrip (item);
+               if (strcmp (item, "public") == 0)
+                       scanner->private = FALSE;
+               else if (strcmp (item, "private") == 0)
+                       scanner->private = TRUE;
+               else if (strcmp (item, "flags") == 0)
+                       scanner->flags = TRUE;
+       }
+       g_strfreev (items);
+}
diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
new file mode 100755 (executable)
index 0000000..bcacd0f
--- /dev/null
@@ -0,0 +1,454 @@
+#!/usr/bin/env python
+# -*- Mode: Python -*-
+# GObject-Introspection - a framework for introspecting GObject libraries
+# Copyright (C) 2008-2010 Johan Dahlin
+# Copyright (C) 2009 Red Hat, 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
+# 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.
+#
+
+import errno
+import optparse
+import os
+import shutil
+import subprocess
+import sys
+import tempfile
+
+from giscanner import message
+from giscanner.annotationparser import AnnotationParser
+from giscanner.ast import Include, Namespace
+from giscanner.dumper import compile_introspection_binary
+from giscanner.gdumpparser import GDumpParser, IntrospectionBinary
+from giscanner.introspectablepass import IntrospectablePass
+from giscanner.girparser import GIRParser
+from giscanner.girwriter import GIRWriter
+from giscanner.maintransformer import MainTransformer
+from giscanner.shlibs import resolve_shlibs
+from giscanner.sourcescanner import SourceScanner
+from giscanner.transformer import Transformer
+from . import utils
+
+def get_preprocessor_option_group(parser):
+    group = optparse.OptionGroup(parser, "Preprocessor options")
+    group.add_option("-I", help="Pre-processor include file",
+                     action="append", dest="cpp_includes",
+                     default=[])
+    group.add_option("-D", help="Pre-processor define",
+                     action="append", dest="cpp_defines",
+                     default=[])
+    group.add_option("-U", help="Pre-processor undefine",
+                     action="append", dest="cpp_undefines",
+                     default=[])
+    group.add_option("-p", dest="", help="Ignored")
+    return group
+
+def get_windows_option_group(parser):
+    group = optparse.OptionGroup(parser, "Machine Dependent Options")
+    group.add_option("-m", help="some machine dependent option",
+                     action="append", dest='m_option',
+                     default=[])
+
+    return group
+
+def _get_option_parser():
+    parser = optparse.OptionParser('%prog [options] sources')
+    parser.add_option('', "--quiet",
+                      action="store_true", dest="quiet",
+                      default=False,
+                      help="If passed, do not print details of normal" \
+                          + " operation")
+    parser.add_option("", "--format",
+                      action="store", dest="format",
+                      default="gir",
+                      help="format to use, one of gidl, gir")
+    parser.add_option("-i", "--include",
+                      action="append", dest="includes", default=[],
+                      help="Add specified gir file as dependency")
+    parser.add_option("", "--include-uninstalled",
+                      action="append", dest="includes_uninstalled", default=[],
+                      help=("""A file path to a dependency; only use this "
+                            "when building multiple .gir files inside a "
+                            "single module."""))
+    parser.add_option("", "--add-include-path",
+                      action="append", dest="include_paths", default=[],
+                      help="include paths for other GIR files")
+    parser.add_option("", "--program",
+                      action="store", dest="program", default=None,
+                      help="program to execute")
+    parser.add_option("", "--program-arg",
+                      action="append", dest="program_args", default=[],
+                      help="extra arguments to program")
+    parser.add_option("", "--libtool",
+                      action="store", dest="libtool_path", default=None,
+                      help="full path to libtool")
+    parser.add_option("", "--no-libtool",
+                      action="store_true", dest="nolibtool", default=False,
+                      help="do not use libtool")
+    parser.add_option("", "--external-library",
+                      action="store_true", dest="external_library", default=False,
+                      help=("""If true, the library is located on the system,""" +
+                            """not in the current directory"""))
+    parser.add_option("-l", "--library",
+                      action="append", dest="libraries", default=[],
+                      help="libraries of this unit")
+    parser.add_option("-L", "--library-path",
+                      action="append", dest="library_paths", default=[],
+                      help="directories to search for libraries")
+    parser.add_option("", "--header-only",
+                      action="store_true", dest="header_only", default=[],
+                      help="If specified, just generate a GIR for the given header files")
+    parser.add_option("-n", "--namespace",
+                      action="store", dest="namespace_name",
+                      help=("name of namespace for this unit, also "
+                            "used to compute --identifier-prefix and --symbol-prefix"))
+    parser.add_option("", "--nsversion",
+                      action="store", dest="namespace_version",
+                      help="version of namespace for this unit")
+    parser.add_option("", "--strip-prefix",
+                      action="store", dest="strip_prefix",
+                      help="""Option --strip-prefix is deprecated, please see --identifier-prefix
+and --symbol-prefix.""")
+    parser.add_option("", "--identifier-prefix",
+                      action="append", dest="identifier_prefixes", default=[],
+                      help="""Remove this prefix from C identifiers (structure typedefs, etc.).
+May be specified multiple times.  This is also used as the default for --symbol-prefix if
+the latter is not specified.""")
+    parser.add_option("", "--symbol-prefix",
+                      action="append", dest="symbol_prefixes", default=[],
+                      help="Remove this prefix from C symbols (function names)")
+    parser.add_option("", "--accept-unprefixed",
+                      action="store_true", dest="accept_unprefixed", default=False,
+                      help="""If specified, accept symbols and identifiers that do not
+match the namespace prefix.""")
+    parser.add_option("", "--add-init-section",
+                      action="append", dest="init_sections", default=[],
+            help="add extra initialization code in the introspection program")
+    parser.add_option("-o", "--output",
+                      action="store", dest="output", default="-",
+                      help="output filename to write to, defaults to - (stdout)")
+    parser.add_option("", "--pkg",
+                      action="append", dest="packages", default=[],
+                      help="pkg-config packages to get cflags from")
+    parser.add_option("", "--pkg-export",
+                      action="append", dest="packages_export", default=[],
+                      help="Associated pkg-config packages for this library")
+    parser.add_option('', "--warn-all",
+                      action="store_true", dest="warn_all", default=False,
+                      help="If true, enable all warnings for introspection")
+    parser.add_option('', "--warn-error",
+                      action="store_true", dest="warn_fatal",
+                      help="Turn warnings into fatal errors")
+    parser.add_option("-v", "--verbose",
+                      action="store_true", dest="verbose",
+                      help="be verbose")
+    parser.add_option("", "--c-include",
+                      action="append", dest="c_includes", default=[],
+                      help="headers which should be included in C programs")
+
+    group = get_preprocessor_option_group(parser)
+    parser.add_option_group(group)
+
+    if os.environ.get('MSYSTEM') == 'MINGW32':
+        group = get_windows_option_group(parser)
+        parser.add_option_group(group)
+
+    # Private options
+    parser.add_option('', "--generate-typelib-tests",
+                      action="store", dest="test_codegen", default=None,
+                      help=optparse.SUPPRESS_HELP)
+    parser.add_option('', "--passthrough-gir",
+                      action="store", dest="passthrough_gir", default=None,
+                      help=optparse.SUPPRESS_HELP)
+    parser.add_option('', "--reparse-validate",
+                      action="store_true", dest="reparse_validate_gir", default=False,
+                      help=optparse.SUPPRESS_HELP)
+    parser.add_option("", "--typelib-xml",
+                      action="store_true", dest="typelib_xml",
+                      help=optparse.SUPPRESS_HELP)
+
+    return parser
+
+
+def _error(msg):
+    raise SystemExit('ERROR: %s' % (msg, ))
+
+def passthrough_gir(path, f):
+    parser = GIRParser()
+    parser.parse(path)
+
+    writer = GIRWriter(parser.get_namespace(),
+                       parser.get_shared_libraries(),
+                       parser.get_includes(),
+                       parser.get_pkgconfig_packages(),
+                       parser.get_c_includes())
+    f.write(writer.get_xml())
+
+def test_codegen(optstring):
+    (namespace, out_h_filename, out_c_filename) = optstring.split(',')
+    if namespace == 'Everything':
+        from .testcodegen import EverythingCodeGenerator
+        gen = EverythingCodeGenerator(out_h_filename, out_c_filename)
+        gen.write()
+    else:
+        _error("Invaild namespace %r" % (namespace, ))
+    return 0
+
+def process_options(output, allowed_flags):
+    for option in output.split():
+        for flag in allowed_flags:
+            if not option.startswith(flag):
+                continue
+            yield option
+            break
+
+def process_packages(options, packages):
+    args = ['pkg-config', '--cflags']
+    args.extend(packages)
+    output = subprocess.Popen(args,
+                              stdout=subprocess.PIPE).communicate()[0]
+    if output is None:
+        # the error output should have already appeared on our stderr,
+        # so we just exit
+        return 1
+    # Some pkg-config files on Windows have options we don't understand,
+    # so we explicitly filter to only the ones we need.
+    options_whitelist = ['-I', '-D', '-U', '-l', '-L']
+    filtered_output = list(process_options(output, options_whitelist))
+    parser = _get_option_parser()
+    pkg_options, unused = parser.parse_args(filtered_output)
+    options.cpp_includes.extend(pkg_options.cpp_includes)
+    options.cpp_defines.extend(pkg_options.cpp_defines)
+    options.cpp_undefines.extend(pkg_options.cpp_undefines)
+
+def extract_filenames(args):
+    filenames = []
+    for arg in args:
+        # We don't support real C++ parsing yet, but we should be able
+        # to understand C API implemented in C++ files.
+        if (arg.endswith('.c') or arg.endswith('.cpp') or
+            arg.endswith('.cc') or arg.endswith('.cxx') or
+            arg.endswith('.h') or arg.endswith('.hpp') or
+            arg.endswith('.hxx')):
+            if not os.path.exists(arg):
+                _error('%s: no such a file or directory' % (arg, ))
+            # Make absolute, because we do comparisons inside scannerparser.c
+            # against the absolute path that cpp will give us
+            filenames.append(os.path.abspath(arg))
+    return filenames
+
+def create_namespace(options):
+    if options.strip_prefix:
+        print """g-ir-scanner: warning: Option --strip-prefix has been deprecated;
+see --identifier-prefix and --symbol-prefix."""
+        options.identifier_prefixes.append(options.strip_prefix)
+
+    # We do this dance because the empty list has different semantics from
+    # None; if the user didn't specify the options, we want to use None so
+    # the Namespace constructor picks the defaults.
+    if options.identifier_prefixes:
+        identifier_prefixes = options.identifier_prefixes
+    else:
+        identifier_prefixes = None
+    if options.symbol_prefixes:
+        for prefix in options.symbol_prefixes:
+            # See Transformer._split_c_string_for_namespace_matches() for
+            # why this check is needed
+            if prefix.lower() != prefix:
+                _error("Values for --symbol-prefix must be entirely lowercase")
+        symbol_prefixes = options.symbol_prefixes
+    else:
+        symbol_prefixes = None
+
+    return Namespace(options.namespace_name,
+                     options.namespace_version,
+                     identifier_prefixes=identifier_prefixes,
+                     symbol_prefixes=symbol_prefixes)
+
+def create_transformer(namespace, options):
+    transformer = Transformer(namespace,
+                              accept_unprefixed=options.accept_unprefixed)
+    transformer.set_include_paths(options.include_paths)
+    if options.passthrough_gir:
+        transformer.disable_cache()
+        transformer.set_passthrough_mode()
+
+    shown_include_warning = False
+    for include in options.includes:
+        if os.sep in include:
+            _error("Invalid include path %r" % (include, ))
+        try:
+            include_obj = Include.from_string(include)
+        except:
+            _error("Malformed include %r\n" % (include, ))
+        transformer.register_include(include_obj)
+    for include_path in options.includes_uninstalled:
+        transformer.register_include_uninstalled(include_path)
+
+    return transformer
+
+def create_binary(transformer, options, args):
+    # Transform the C AST nodes into higher level
+    # GLib/GObject nodes
+    gdump_parser = GDumpParser(transformer)
+
+    # Do enough parsing that we have the get_type() functions to reference
+    # when creating the introspection binary
+    gdump_parser.init_parse()
+
+    if options.program:
+        args=[options.program]
+        args.extend(options.program_args)
+        binary = IntrospectionBinary(args)
+    else:
+        binary = compile_introspection_binary(options,
+                                              gdump_parser.get_get_type_functions(),
+                                              gdump_parser.get_error_quark_functions())
+
+    shlibs = resolve_shlibs(options, binary, options.libraries)
+    gdump_parser.set_introspection_binary(binary)
+    gdump_parser.parse()
+    return shlibs
+
+def create_source_scanner(options, args):
+    filenames = extract_filenames(args)
+
+    # Run the preprocessor, tokenize and construct simple
+    # objects representing the raw C symbols
+    ss = SourceScanner()
+    ss.set_cpp_options(options.cpp_includes,
+                       options.cpp_defines,
+                       options.cpp_undefines)
+    ss.parse_files(filenames)
+    ss.parse_macros(filenames)
+    return ss
+
+def write_output(data, options):
+    if options.output == "-":
+        output = sys.stdout
+    elif options.reparse_validate_gir:
+        main_f, main_f_name = tempfile.mkstemp(suffix='.gir')
+        main_f = os.fdopen(main_f, 'w')
+        main_f.write(data)
+        main_f.close()
+
+        temp_f, temp_f_name = tempfile.mkstemp(suffix='.gir')
+        temp_f = os.fdopen(temp_f, 'w')
+        passthrough_gir(main_f_name, temp_f)
+        temp_f.close()
+        if not utils.files_are_identical(main_f_name, temp_f_name):
+            _error("Failed to re-parse gir file; scanned=%r passthrough=%r" % (
+                main_f_name, temp_f_name))
+        os.unlink(temp_f_name)
+        try:
+            shutil.move(main_f_name, options.output)
+        except OSError, e:
+            if e.errno == errno.EPERM:
+                os.unlink(main_f_name)
+                return 0
+            raise
+        return 0
+    else:
+        try:
+            output = open(options.output, "w")
+        except IOError, e:
+            _error("opening output for writing: %s" % (e.strerror, ))
+
+    try:
+        output.write(data)
+    except IOError, e:
+        _error("while writing output: %s" % (e.strerror, ))
+
+def scanner_main(args):
+    parser = _get_option_parser()
+    (options, args) = parser.parse_args(args)
+
+    if options.passthrough_gir:
+        passthrough_gir(options.passthrough_gir, sys.stdout)
+    if options.test_codegen:
+        return test_codegen(options.test_codegen)
+
+    if len(args) <= 1:
+        _error('Need at least one filename')
+
+    if not options.namespace_name:
+        _error('Namespace name missing')
+
+    if options.format == 'gir':
+        from giscanner.girwriter import GIRWriter as Writer
+    else:
+        _error("Unknown format: %s" % (options.format, ))
+
+    if not (options.libraries
+            or options.program
+            or options.header_only):
+        _error("Must specify --program or --library")
+
+    namespace = create_namespace(options)
+    logger = message.MessageLogger.get(namespace=namespace)
+    if options.warn_all:
+        logger.enable_warnings(True)
+    transformer = create_transformer(namespace, options)
+
+    packages = set(options.packages)
+    packages.update(transformer.get_pkgconfig_packages())
+    exit_code = process_packages(options, packages)
+    if exit_code:
+        return exit_code
+
+    ss = create_source_scanner(options, args)
+
+    ap = AnnotationParser()
+    blocks = ap.parse(ss.get_comments())
+
+    # Transform the C symbols into AST nodes
+    transformer.set_annotations(blocks)
+    transformer.parse(ss.get_symbols())
+
+    if not options.header_only:
+        shlibs = create_binary(transformer, options, args)
+    else:
+        shlibs = []
+
+    main = MainTransformer(transformer, blocks)
+    main.transform()
+
+    utils.break_on_debug_flag('tree')
+
+    final = IntrospectablePass(transformer, blocks)
+    final.validate()
+
+    warning_count = logger.get_warning_count()
+    if options.warn_fatal and warning_count > 0:
+        message.fatal("warnings configured as fatal")
+        return 1
+    elif warning_count > 0 and options.warn_all is False:
+        print ("g-ir-scanner: %s: warning: %d warnings suppressed (use --warn-all to see them)"
+               % (transformer.namespace.name, warning_count, ))
+
+    # Write out AST
+    if options.packages_export:
+        exported_packages = options.packages_export
+    else:
+        exported_packages = options.packages
+
+    writer = Writer(transformer.namespace, shlibs, transformer.get_includes(),
+                    exported_packages, options.c_includes)
+    data = writer.get_xml()
+
+    write_output(data, options)
+
+    return 0
diff --git a/giscanner/scannerparser.y b/giscanner/scannerparser.y
new file mode 100644 (file)
index 0000000..65ac594
--- /dev/null
@@ -0,0 +1,1598 @@
+/* GObject introspection: C parser
+ *
+ * Copyright (c) 1997 Sandro Sigala  <ssigala@globalnet.it>
+ * Copyright (c) 2007-2008 Jürg Billeter  <j@bitron.ch>
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+%{
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <glib.h>
+#include <glib/gstdio.h>
+#include "sourcescanner.h"
+#include "scannerparser.h"
+
+extern FILE *yyin;
+extern int lineno;
+extern char linebuf[2000];
+extern char *yytext;
+
+extern int yylex (GISourceScanner *scanner);
+static void yyerror (GISourceScanner *scanner, const char *str);
+
+extern void ctype_free (GISourceType * type);
+
+static int last_enum_value = -1;
+static gboolean is_bitfield;
+static GHashTable *const_table = NULL;
+
+/**
+ * parse_c_string_literal:
+ * @str: A string containing a C string literal
+ *
+ * Based on g_strcompress(), but also handles
+ * hexadecimal escapes.
+ */
+static char *
+parse_c_string_literal (const char *str)
+{
+  const gchar *p = str, *num;
+  gchar *dest = g_malloc (strlen (str) + 1);
+  gchar *q = dest;
+
+  while (*p)
+    {
+      if (*p == '\\')
+        {
+          p++;
+          switch (*p)
+            {
+            case '\0':
+              g_warning ("parse_c_string_literal: trailing \\");
+              goto out;
+            case '0':  case '1':  case '2':  case '3':  case '4':
+            case '5':  case '6':  case '7':
+              *q = 0;
+              num = p;
+              while ((p < num + 3) && (*p >= '0') && (*p <= '7'))
+                {
+                  *q = (*q * 8) + (*p - '0');
+                  p++;
+                }
+              q++;
+              p--;
+              break;
+           case 'x':
+             *q = 0;
+             p++;
+             num = p;
+             while ((p < num + 2) && (g_ascii_isxdigit(*p)))
+               {
+                 *q = (*q * 16) + g_ascii_xdigit_value(*p);
+                 p++;
+               }
+              q++;
+              p--;
+             break;
+            case 'b':
+              *q++ = '\b';
+              break;
+            case 'f':
+              *q++ = '\f';
+              break;
+            case 'n':
+              *q++ = '\n';
+              break;
+            case 'r':
+              *q++ = '\r';
+              break;
+            case 't':
+              *q++ = '\t';
+              break;
+            default:            /* Also handles \" and \\ */
+              *q++ = *p;
+              break;
+            }
+        }
+      else
+        *q++ = *p;
+      p++;
+    }
+out:
+  *q = 0;
+
+  return dest;
+}
+
+%}
+
+%error-verbose
+%union {
+  char *str;
+  GList *list;
+  GISourceSymbol *symbol;
+  GISourceType *ctype;
+  StorageClassSpecifier storage_class_specifier;
+  TypeQualifier type_qualifier;
+  FunctionSpecifier function_specifier;
+  UnaryOperator unary_operator;
+}
+
+%parse-param { GISourceScanner* scanner }
+%lex-param { GISourceScanner* scanner }
+
+%token <str> IDENTIFIER "identifier"
+%token <str> TYPEDEF_NAME "typedef-name"
+
+%token INTEGER FLOATING CHARACTER STRING
+
+%token ELLIPSIS ADDEQ SUBEQ MULEQ DIVEQ MODEQ XOREQ ANDEQ OREQ SL SR
+%token SLEQ SREQ EQ NOTEQ LTEQ GTEQ ANDAND OROR PLUSPLUS MINUSMINUS ARROW
+
+%token AUTO BOOL BREAK CASE CHAR CONST CONTINUE DEFAULT DO DOUBLE ELSE ENUM
+%token EXTENSION EXTERN FLOAT FOR GOTO IF INLINE INT LONG REGISTER RESTRICT
+%token RETURN SHORT SIGNED SIZEOF STATIC STRUCT SWITCH TYPEDEF UNION UNSIGNED
+%token VOID VOLATILE WHILE
+
+%token FUNCTION_MACRO OBJECT_MACRO
+
+%start translation_unit
+
+%type <ctype> declaration_specifiers
+%type <ctype> enum_specifier
+%type <ctype> pointer
+%type <ctype> specifier_qualifier_list
+%type <ctype> type_name
+%type <ctype> struct_or_union
+%type <ctype> struct_or_union_specifier
+%type <ctype> type_specifier
+%type <str> identifier
+%type <str> typedef_name
+%type <str> identifier_or_typedef_name
+%type <symbol> abstract_declarator
+%type <symbol> init_declarator
+%type <symbol> declarator
+%type <symbol> enumerator
+%type <symbol> direct_abstract_declarator
+%type <symbol> direct_declarator
+%type <symbol> parameter_declaration
+%type <symbol> struct_declarator
+%type <list> enumerator_list
+%type <list> identifier_list
+%type <list> init_declarator_list
+%type <list> parameter_list
+%type <list> struct_declaration
+%type <list> struct_declaration_list
+%type <list> struct_declarator_list
+%type <storage_class_specifier> storage_class_specifier
+%type <type_qualifier> type_qualifier
+%type <type_qualifier> type_qualifier_list
+%type <function_specifier> function_specifier
+%type <symbol> expression
+%type <symbol> constant_expression
+%type <symbol> conditional_expression
+%type <symbol> logical_and_expression
+%type <symbol> logical_or_expression
+%type <symbol> inclusive_or_expression
+%type <symbol> exclusive_or_expression
+%type <symbol> multiplicative_expression
+%type <symbol> additive_expression
+%type <symbol> shift_expression
+%type <symbol> relational_expression
+%type <symbol> equality_expression
+%type <symbol> and_expression
+%type <symbol> cast_expression
+%type <symbol> assignment_expression
+%type <symbol> unary_expression
+%type <symbol> postfix_expression
+%type <symbol> primary_expression
+%type <unary_operator> unary_operator
+%type <str> function_macro
+%type <str> object_macro
+%type <symbol> strings
+
+%%
+
+/* A.2.1 Expressions. */
+
+primary_expression
+       : identifier
+         {
+               $$ = g_hash_table_lookup (const_table, $1);
+               if ($$ == NULL) {
+                       $$ = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+               } else {
+                       $$ = gi_source_symbol_ref ($$);
+               }
+         }
+       | INTEGER
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               $$->const_int_set = TRUE;
+               if (g_str_has_prefix (yytext, "0x") && strlen (yytext) > 2) {
+                       $$->const_int = g_ascii_strtoll (yytext + 2, NULL, 16);
+               } else if (g_str_has_prefix (yytext, "0") && strlen (yytext) > 1) {
+                       $$->const_int = g_ascii_strtoll (yytext + 1, NULL, 8);
+               } else {
+                       $$->const_int = g_ascii_strtoll (yytext, NULL, 10);
+               }
+         }
+       | CHARACTER
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               $$->const_int_set = TRUE;
+               $$->const_int = g_utf8_get_char(yytext + 1);
+         }
+       | FLOATING
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               $$->const_double_set = TRUE;
+               $$->const_double = 0.0;
+        sscanf (yytext, "%lf", &($$->const_double));
+         }
+       | strings
+       | '(' expression ')'
+         {
+               $$ = $2;
+         }
+       | EXTENSION '(' '{' block_item_list '}' ')'
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+       ;
+
+/* concatenate adjacent string literal tokens */
+strings
+       : STRING
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               yytext[strlen (yytext) - 1] = '\0';
+               $$->const_string = parse_c_string_literal (yytext + 1);
+                if (!g_utf8_validate ($$->const_string, -1, NULL))
+                  {
+#if 0
+                    g_warning ("Ignoring non-UTF-8 constant string \"%s\"", yytext + 1);
+#endif
+                    g_free($$->const_string);
+                    $$->const_string = NULL;
+                  }
+
+         }
+       | strings STRING
+         {
+               char *strings, *string2;
+               $$ = $1;
+               yytext[strlen (yytext) - 1] = '\0';
+               string2 = parse_c_string_literal (yytext + 1);
+               strings = g_strconcat ($$->const_string, string2, NULL);
+               g_free ($$->const_string);
+               g_free (string2);
+               $$->const_string = strings;
+         }
+       ;
+
+identifier
+       : IDENTIFIER
+         {
+               $$ = g_strdup (yytext);
+         }
+       ;
+
+identifier_or_typedef_name
+       : identifier
+       | typedef_name
+       ;
+
+postfix_expression
+       : primary_expression
+       | postfix_expression '[' expression ']'
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+       | postfix_expression '(' argument_expression_list ')'
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+       | postfix_expression '(' ')'
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+       | postfix_expression '.' identifier_or_typedef_name
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+       | postfix_expression ARROW identifier_or_typedef_name
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+       | postfix_expression PLUSPLUS
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+       | postfix_expression MINUSMINUS
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+       ;
+
+argument_expression_list
+       : assignment_expression
+       | argument_expression_list ',' assignment_expression
+       ;
+
+unary_expression
+       : postfix_expression
+       | PLUSPLUS unary_expression
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+       | MINUSMINUS unary_expression
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+       | unary_operator cast_expression
+         {
+               switch ($1) {
+               case UNARY_PLUS:
+                       $$ = $2;
+                       break;
+               case UNARY_MINUS:
+                       $$ = $2;
+                       $$->const_int = -$2->const_int;
+                       break;
+               case UNARY_BITWISE_COMPLEMENT:
+                       $$ = $2;
+                       $$->const_int = ~$2->const_int;
+                       break;
+               case UNARY_LOGICAL_NEGATION:
+                       $$ = $2;
+                       $$->const_int = !gi_source_symbol_get_const_boolean ($2);
+                       break;
+               default:
+                       $$ = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+                       break;
+               }
+         }
+       | SIZEOF unary_expression
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+       | SIZEOF '(' type_name ')'
+         {
+               ctype_free ($3);
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+       ;
+
+unary_operator
+       : '&'
+         {
+               $$ = UNARY_ADDRESS_OF;
+         }
+       | '*'
+         {
+               $$ = UNARY_POINTER_INDIRECTION;
+         }
+       | '+'
+         {
+               $$ = UNARY_PLUS;
+         }
+       | '-'
+         {
+               $$ = UNARY_MINUS;
+         }
+       | '~'
+         {
+               $$ = UNARY_BITWISE_COMPLEMENT;
+         }
+       | '!'
+         {
+               $$ = UNARY_LOGICAL_NEGATION;
+         }
+       ;
+
+cast_expression
+       : unary_expression
+       | '(' type_name ')' cast_expression
+         {
+               ctype_free ($2);
+               $$ = $4;
+         }
+       ;
+
+multiplicative_expression
+       : cast_expression
+       | multiplicative_expression '*' cast_expression
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               $$->const_int_set = TRUE;
+               $$->const_int = $1->const_int * $3->const_int;
+         }
+       | multiplicative_expression '/' cast_expression
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               $$->const_int_set = TRUE;
+               if ($3->const_int != 0) {
+                       $$->const_int = $1->const_int / $3->const_int;
+               }
+         }
+       | multiplicative_expression '%' cast_expression
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               $$->const_int_set = TRUE;
+               if ($3->const_int != 0) {
+                       $$->const_int = $1->const_int % $3->const_int;
+               }
+         }
+       ;
+
+additive_expression
+       : multiplicative_expression
+       | additive_expression '+' multiplicative_expression
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               $$->const_int_set = TRUE;
+               $$->const_int = $1->const_int + $3->const_int;
+         }
+       | additive_expression '-' multiplicative_expression
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               $$->const_int_set = TRUE;
+               $$->const_int = $1->const_int - $3->const_int;
+         }
+       ;
+
+shift_expression
+       : additive_expression
+       | shift_expression SL additive_expression
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               $$->const_int_set = TRUE;
+               $$->const_int = $1->const_int << $3->const_int;
+
+               /* assume this is a bitfield/flags declaration
+                * if a left shift operator is sued in an enum value
+                 * This mimics the glib-mkenum behavior.
+                */
+               is_bitfield = TRUE;
+         }
+       | shift_expression SR additive_expression
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               $$->const_int_set = TRUE;
+               $$->const_int = $1->const_int >> $3->const_int;
+         }
+       ;
+
+relational_expression
+       : shift_expression
+       | relational_expression '<' shift_expression
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               $$->const_int_set = TRUE;
+               $$->const_int = $1->const_int < $3->const_int;
+         }
+       | relational_expression '>' shift_expression
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               $$->const_int_set = TRUE;
+               $$->const_int = $1->const_int > $3->const_int;
+         }
+       | relational_expression LTEQ shift_expression
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               $$->const_int_set = TRUE;
+               $$->const_int = $1->const_int <= $3->const_int;
+         }
+       | relational_expression GTEQ shift_expression
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               $$->const_int_set = TRUE;
+               $$->const_int = $1->const_int >= $3->const_int;
+         }
+       ;
+
+equality_expression
+       : relational_expression
+       | equality_expression EQ relational_expression
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               $$->const_int_set = TRUE;
+               $$->const_int = $1->const_int == $3->const_int;
+         }
+       | equality_expression NOTEQ relational_expression
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               $$->const_int_set = TRUE;
+               $$->const_int = $1->const_int != $3->const_int;
+         }
+       ;
+
+and_expression
+       : equality_expression
+       | and_expression '&' equality_expression
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               $$->const_int_set = TRUE;
+               $$->const_int = $1->const_int & $3->const_int;
+         }
+       ;
+
+exclusive_or_expression
+       : and_expression
+       | exclusive_or_expression '^' and_expression
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               $$->const_int_set = TRUE;
+               $$->const_int = $1->const_int ^ $3->const_int;
+         }
+       ;
+
+inclusive_or_expression
+       : exclusive_or_expression
+       | inclusive_or_expression '|' exclusive_or_expression
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               $$->const_int_set = TRUE;
+               $$->const_int = $1->const_int | $3->const_int;
+         }
+       ;
+
+logical_and_expression
+       : inclusive_or_expression
+       | logical_and_expression ANDAND inclusive_or_expression
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               $$->const_int_set = TRUE;
+               $$->const_int =
+                 gi_source_symbol_get_const_boolean ($1) &&
+                 gi_source_symbol_get_const_boolean ($3);
+         }
+       ;
+
+logical_or_expression
+       : logical_and_expression
+       | logical_or_expression OROR logical_and_expression
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               $$->const_int_set = TRUE;
+               $$->const_int =
+                 gi_source_symbol_get_const_boolean ($1) ||
+                 gi_source_symbol_get_const_boolean ($3);
+         }
+       ;
+
+conditional_expression
+       : logical_or_expression
+       | logical_or_expression '?' expression ':' conditional_expression
+         {
+               $$ = gi_source_symbol_get_const_boolean ($1) ? $3 : $5;
+         }
+       ;
+
+assignment_expression
+       : conditional_expression
+       | unary_expression assignment_operator assignment_expression
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+       ;
+
+assignment_operator
+       : '='
+       | MULEQ
+       | DIVEQ
+       | MODEQ
+       | ADDEQ
+       | SUBEQ
+       | SLEQ
+       | SREQ
+       | ANDEQ
+       | XOREQ
+       | OREQ
+       ;
+
+expression
+       : assignment_expression
+       | expression ',' assignment_expression
+       | EXTENSION expression
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+       ;
+
+constant_expression
+       : conditional_expression
+       ;
+
+/* A.2.2 Declarations. */
+
+declaration
+       : declaration_specifiers init_declarator_list ';'
+         {
+               GList *l;
+               for (l = $2; l != NULL; l = l->next) {
+                       GISourceSymbol *sym = l->data;
+                       gi_source_symbol_merge_type (sym, gi_source_type_copy ($1));
+                       if ($1->storage_class_specifier & STORAGE_CLASS_TYPEDEF) {
+                               sym->type = CSYMBOL_TYPE_TYPEDEF;
+                       } else if (sym->base_type->type == CTYPE_FUNCTION) {
+                               sym->type = CSYMBOL_TYPE_FUNCTION;
+                       } else {
+                               sym->type = CSYMBOL_TYPE_OBJECT;
+                       }
+                       gi_source_scanner_add_symbol (scanner, sym);
+                       gi_source_symbol_unref (sym);
+               }
+               ctype_free ($1);
+         }
+       | declaration_specifiers ';'
+         {
+               ctype_free ($1);
+         }
+       ;
+
+declaration_specifiers
+       : storage_class_specifier declaration_specifiers
+         {
+               $$ = $2;
+               $$->storage_class_specifier |= $1;
+         }
+       | storage_class_specifier
+         {
+               $$ = gi_source_type_new (CTYPE_INVALID);
+               $$->storage_class_specifier |= $1;
+         }
+       | type_specifier declaration_specifiers
+         {
+               $$ = $1;
+               /* combine basic types like unsigned int and long long */
+               if ($$->type == CTYPE_BASIC_TYPE && $2->type == CTYPE_BASIC_TYPE) {
+                       char *name = g_strdup_printf ("%s %s", $$->name, $2->name);
+                       g_free ($$->name);
+                       $$->name = name;
+                       ctype_free ($2);
+               } else {
+                       $$->base_type = $2;
+               }
+         }
+       | type_specifier
+       | type_qualifier declaration_specifiers
+         {
+               $$ = $2;
+               $$->type_qualifier |= $1;
+         }
+       | type_qualifier
+         {
+               $$ = gi_source_type_new (CTYPE_INVALID);
+               $$->type_qualifier |= $1;
+         }
+       | function_specifier declaration_specifiers
+         {
+               $$ = $2;
+               $$->function_specifier |= $1;
+         }
+       | function_specifier
+         {
+               $$ = gi_source_type_new (CTYPE_INVALID);
+               $$->function_specifier |= $1;
+         }
+       ;
+
+init_declarator_list
+       : init_declarator
+         {
+               $$ = g_list_append (NULL, $1);
+         }
+       | init_declarator_list ',' init_declarator
+         {
+               $$ = g_list_append ($1, $3);
+         }
+       ;
+
+init_declarator
+       : declarator
+       | declarator '=' initializer
+       ;
+
+storage_class_specifier
+       : TYPEDEF
+         {
+               $$ = STORAGE_CLASS_TYPEDEF;
+         }
+       | EXTERN
+         {
+               $$ = STORAGE_CLASS_EXTERN;
+         }
+       | STATIC
+         {
+               $$ = STORAGE_CLASS_STATIC;
+         }
+       | AUTO
+         {
+               $$ = STORAGE_CLASS_AUTO;
+         }
+       | REGISTER
+         {
+               $$ = STORAGE_CLASS_REGISTER;
+         }
+       ;
+
+type_specifier
+       : VOID
+         {
+               $$ = gi_source_type_new (CTYPE_VOID);
+         }
+       | CHAR
+         {
+               $$ = gi_source_basic_type_new ("char");
+         }
+       | SHORT
+         {
+               $$ = gi_source_basic_type_new ("short");
+         }
+       | INT
+         {
+               $$ = gi_source_basic_type_new ("int");
+         }
+       | LONG
+         {
+               $$ = gi_source_basic_type_new ("long");
+         }
+       | FLOAT
+         {
+               $$ = gi_source_basic_type_new ("float");
+         }
+       | DOUBLE
+         {
+               $$ = gi_source_basic_type_new ("double");
+         }
+       | SIGNED
+         {
+               $$ = gi_source_basic_type_new ("signed");
+         }
+       | UNSIGNED
+         {
+               $$ = gi_source_basic_type_new ("unsigned");
+         }
+       | BOOL
+         {
+               $$ = gi_source_basic_type_new ("bool");
+         }
+       | struct_or_union_specifier
+       | enum_specifier
+       | typedef_name
+         {
+               $$ = gi_source_typedef_new ($1);
+               g_free ($1);
+         }
+       ;
+
+struct_or_union_specifier
+       : struct_or_union identifier_or_typedef_name '{' struct_declaration_list '}'
+         {
+               $$ = $1;
+               $$->name = $2;
+               $$->child_list = $4;
+
+               GISourceSymbol *sym = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+               if ($$->type == CTYPE_STRUCT) {
+                       sym->type = CSYMBOL_TYPE_STRUCT;
+               } else if ($$->type == CTYPE_UNION) {
+                       sym->type = CSYMBOL_TYPE_UNION;
+               } else {
+                       g_assert_not_reached ();
+               }
+               sym->ident = g_strdup ($$->name);
+               sym->base_type = gi_source_type_copy ($$);
+               gi_source_scanner_add_symbol (scanner, sym);
+               gi_source_symbol_unref (sym);
+         }
+       | struct_or_union '{' struct_declaration_list '}'
+         {
+               $$ = $1;
+               $$->child_list = $3;
+         }
+       | struct_or_union identifier_or_typedef_name
+         {
+               $$ = $1;
+               $$->name = $2;
+         }
+       ;
+
+struct_or_union
+       : STRUCT
+         {
+                scanner->private = FALSE;
+               $$ = gi_source_struct_new (NULL);
+         }
+       | UNION
+         {
+                scanner->private = FALSE;
+               $$ = gi_source_union_new (NULL);
+         }
+       ;
+
+struct_declaration_list
+       : struct_declaration
+       | struct_declaration_list struct_declaration
+         {
+               $$ = g_list_concat ($1, $2);
+         }
+       ;
+
+struct_declaration
+       : specifier_qualifier_list struct_declarator_list ';'
+         {
+           GList *l;
+           $$ = NULL;
+           for (l = $2; l != NULL; l = l->next)
+             {
+               GISourceSymbol *sym = l->data;
+               if ($1->storage_class_specifier & STORAGE_CLASS_TYPEDEF)
+                   sym->type = CSYMBOL_TYPE_TYPEDEF;
+               else
+                   sym->type = CSYMBOL_TYPE_MEMBER;
+               gi_source_symbol_merge_type (sym, gi_source_type_copy ($1));
+                sym->private = scanner->private;
+                $$ = g_list_append ($$, sym);
+             }
+           ctype_free ($1);
+         }
+       ;
+
+specifier_qualifier_list
+       : type_specifier specifier_qualifier_list
+         {
+               $$ = $1;
+               $$->base_type = $2;
+         }
+       | type_specifier
+       | type_qualifier specifier_qualifier_list
+         {
+               $$ = $2;
+               $$->type_qualifier |= $1;
+         }
+       | type_qualifier
+         {
+               $$ = gi_source_type_new (CTYPE_INVALID);
+               $$->type_qualifier |= $1;
+         }
+       ;
+
+struct_declarator_list
+       : struct_declarator
+         {
+               $$ = g_list_append (NULL, $1);
+         }
+       | struct_declarator_list ',' struct_declarator
+         {
+               $$ = g_list_append ($1, $3);
+         }
+       ;
+
+struct_declarator
+       : /* empty, support for anonymous structs and unions */
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+       | declarator
+       | ':' constant_expression
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+       | declarator ':' constant_expression
+         {
+               $$ = $1;
+               if ($3->const_int_set) {
+                 $$->const_int_set = TRUE;
+                 $$->const_int = $3->const_int;
+               }
+         }
+       ;
+
+enum_specifier
+       : enum_keyword identifier_or_typedef_name '{' enumerator_list '}'
+         {
+               $$ = gi_source_enum_new ($2);
+               $$->child_list = $4;
+               $$->is_bitfield = is_bitfield || scanner->flags;
+               last_enum_value = -1;
+         }
+       | enum_keyword '{' enumerator_list '}'
+         {
+               $$ = gi_source_enum_new (NULL);
+               $$->child_list = $3;
+               $$->is_bitfield = is_bitfield || scanner->flags;
+               last_enum_value = -1;
+         }
+       | enum_keyword identifier_or_typedef_name '{' enumerator_list ',' '}'
+         {
+               $$ = gi_source_enum_new ($2);
+               $$->child_list = $4;
+               $$->is_bitfield = is_bitfield || scanner->flags;
+               last_enum_value = -1;
+         }
+       | enum_keyword '{' enumerator_list ',' '}'
+         {
+               $$ = gi_source_enum_new (NULL);
+               $$->child_list = $3;
+               $$->is_bitfield = is_bitfield || scanner->flags;
+               last_enum_value = -1;
+         }
+       | enum_keyword identifier_or_typedef_name
+         {
+               $$ = gi_source_enum_new ($2);
+         }
+       ;
+
+enum_keyword
+        : ENUM
+          {
+                scanner->flags = FALSE;
+                scanner->private = FALSE;
+          }
+        ;
+
+enumerator_list
+       :
+         {
+               /* reset flag before the first enum value */
+               is_bitfield = FALSE;
+         }
+         enumerator
+         {
+            $2->private = scanner->private;
+            $$ = g_list_append (NULL, $2);
+         }
+       | enumerator_list ',' enumerator
+         {
+            $3->private = scanner->private;
+            $$ = g_list_append ($1, $3);
+         }
+       ;
+
+enumerator
+       : identifier
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_OBJECT, scanner->current_filename, lineno);
+               $$->ident = $1;
+               $$->const_int_set = TRUE;
+               $$->const_int = ++last_enum_value;
+               g_hash_table_insert (const_table, g_strdup ($$->ident), gi_source_symbol_ref ($$));
+         }
+       | identifier '=' constant_expression
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_OBJECT, scanner->current_filename, lineno);
+               $$->ident = $1;
+               $$->const_int_set = TRUE;
+               $$->const_int = $3->const_int;
+               last_enum_value = $$->const_int;
+               g_hash_table_insert (const_table, g_strdup ($$->ident), gi_source_symbol_ref ($$));
+         }
+       ;
+
+type_qualifier
+       : CONST
+         {
+               $$ = TYPE_QUALIFIER_CONST;
+         }
+       | RESTRICT
+         {
+               $$ = TYPE_QUALIFIER_RESTRICT;
+         }
+       | EXTENSION
+         {
+               $$ = TYPE_QUALIFIER_EXTENSION;
+         }
+       | VOLATILE
+         {
+               $$ = TYPE_QUALIFIER_VOLATILE;
+         }
+       ;
+
+function_specifier
+       : INLINE
+         {
+               $$ = FUNCTION_INLINE;
+         }
+       ;
+
+declarator
+       : pointer direct_declarator
+         {
+               $$ = $2;
+               gi_source_symbol_merge_type ($$, $1);
+         }
+       | direct_declarator
+       ;
+
+direct_declarator
+       : identifier
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+               $$->ident = $1;
+         }
+       | '(' declarator ')'
+         {
+               $$ = $2;
+         }
+       | direct_declarator '[' assignment_expression ']'
+         {
+               $$ = $1;
+               gi_source_symbol_merge_type ($$, gi_source_array_new ($3));
+         }
+       | direct_declarator '[' ']'
+         {
+               $$ = $1;
+               gi_source_symbol_merge_type ($$, gi_source_array_new (NULL));
+         }
+       | direct_declarator '(' parameter_list ')'
+         {
+               GISourceType *func = gi_source_function_new ();
+               // ignore (void) parameter list
+               if ($3 != NULL && ($3->next != NULL || ((GISourceSymbol *) $3->data)->base_type->type != CTYPE_VOID)) {
+                       func->child_list = $3;
+               }
+               $$ = $1;
+               gi_source_symbol_merge_type ($$, func);
+         }
+       | direct_declarator '(' identifier_list ')'
+         {
+               GISourceType *func = gi_source_function_new ();
+               func->child_list = $3;
+               $$ = $1;
+               gi_source_symbol_merge_type ($$, func);
+         }
+       | direct_declarator '(' ')'
+         {
+               GISourceType *func = gi_source_function_new ();
+               $$ = $1;
+               gi_source_symbol_merge_type ($$, func);
+         }
+       ;
+
+pointer
+       : '*' type_qualifier_list
+         {
+               $$ = gi_source_pointer_new (NULL);
+               $$->type_qualifier = $2;
+         }
+       | '*'
+         {
+               $$ = gi_source_pointer_new (NULL);
+         }
+       | '*' type_qualifier_list pointer
+         {
+               $$ = gi_source_pointer_new ($3);
+               $$->type_qualifier = $2;
+         }
+       | '*' pointer
+         {
+               $$ = gi_source_pointer_new ($2);
+         }
+       ;
+
+type_qualifier_list
+       : type_qualifier
+       | type_qualifier_list type_qualifier
+         {
+               $$ = $1 | $2;
+         }
+       ;
+
+parameter_list
+       : parameter_declaration
+         {
+               $$ = g_list_append (NULL, $1);
+         }
+       | parameter_list ',' parameter_declaration
+         {
+               $$ = g_list_append ($1, $3);
+         }
+       ;
+
+parameter_declaration
+       : declaration_specifiers declarator
+         {
+               $$ = $2;
+               gi_source_symbol_merge_type ($$, $1);
+         }
+       | declaration_specifiers abstract_declarator
+         {
+               $$ = $2;
+               gi_source_symbol_merge_type ($$, $1);
+         }
+       | declaration_specifiers
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+               $$->base_type = $1;
+         }
+       | ELLIPSIS
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_ELLIPSIS, scanner->current_filename, lineno);
+         }
+       ;
+
+identifier_list
+       : identifier
+         {
+               GISourceSymbol *sym = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+               sym->ident = $1;
+               $$ = g_list_append (NULL, sym);
+         }
+       | identifier_list ',' identifier
+         {
+               GISourceSymbol *sym = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+               sym->ident = $3;
+               $$ = g_list_append ($1, sym);
+         }
+       ;
+
+type_name
+       : specifier_qualifier_list
+       | specifier_qualifier_list abstract_declarator
+       ;
+
+abstract_declarator
+       : pointer
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+               gi_source_symbol_merge_type ($$, $1);
+         }
+       | direct_abstract_declarator
+       | pointer direct_abstract_declarator
+         {
+               $$ = $2;
+               gi_source_symbol_merge_type ($$, $1);
+         }
+       ;
+
+direct_abstract_declarator
+       : '(' abstract_declarator ')'
+         {
+               $$ = $2;
+         }
+       | '[' ']'
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+               gi_source_symbol_merge_type ($$, gi_source_array_new (NULL));
+         }
+       | '[' assignment_expression ']'
+         {
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+               gi_source_symbol_merge_type ($$, gi_source_array_new ($2));
+         }
+       | direct_abstract_declarator '[' ']'
+         {
+               $$ = $1;
+               gi_source_symbol_merge_type ($$, gi_source_array_new (NULL));
+         }
+       | direct_abstract_declarator '[' assignment_expression ']'
+         {
+               $$ = $1;
+               gi_source_symbol_merge_type ($$, gi_source_array_new ($3));
+         }
+       | '(' ')'
+         {
+               GISourceType *func = gi_source_function_new ();
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+               gi_source_symbol_merge_type ($$, func);
+         }
+       | '(' parameter_list ')'
+         {
+               GISourceType *func = gi_source_function_new ();
+               // ignore (void) parameter list
+               if ($2 != NULL && ($2->next != NULL || ((GISourceSymbol *) $2->data)->base_type->type != CTYPE_VOID)) {
+                       func->child_list = $2;
+               }
+               $$ = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+               gi_source_symbol_merge_type ($$, func);
+         }
+       | direct_abstract_declarator '(' ')'
+         {
+               GISourceType *func = gi_source_function_new ();
+               $$ = $1;
+               gi_source_symbol_merge_type ($$, func);
+         }
+       | direct_abstract_declarator '(' parameter_list ')'
+         {
+               GISourceType *func = gi_source_function_new ();
+               // ignore (void) parameter list
+               if ($3 != NULL && ($3->next != NULL || ((GISourceSymbol *) $3->data)->base_type->type != CTYPE_VOID)) {
+                       func->child_list = $3;
+               }
+               $$ = $1;
+               gi_source_symbol_merge_type ($$, func);
+         }
+       ;
+
+typedef_name
+       : TYPEDEF_NAME
+         {
+               $$ = g_strdup (yytext);
+         }
+       ;
+
+initializer
+       : assignment_expression
+       | '{' initializer_list '}'
+       | '{' initializer_list ',' '}'
+       ;
+
+initializer_list
+       : initializer
+       | initializer_list ',' initializer
+       ;
+
+/* A.2.3 Statements. */
+
+statement
+       : labeled_statement
+       | compound_statement
+       | expression_statement
+       | selection_statement
+       | iteration_statement
+       | jump_statement
+       ;
+
+labeled_statement
+       : identifier_or_typedef_name ':' statement
+       | CASE constant_expression ':' statement
+       | DEFAULT ':' statement
+       ;
+
+compound_statement
+       : '{' '}'
+       | '{' block_item_list '}'
+       ;
+
+block_item_list
+       : block_item
+       | block_item_list block_item
+       ;
+
+block_item
+       : declaration
+       | statement
+       ;
+
+expression_statement
+       : ';'
+       | expression ';'
+       ;
+
+selection_statement
+       : IF '(' expression ')' statement
+       | IF '(' expression ')' statement ELSE statement
+       | SWITCH '(' expression ')' statement
+       ;
+
+iteration_statement
+       : WHILE '(' expression ')' statement
+       | DO statement WHILE '(' expression ')' ';'
+       | FOR '(' ';' ';' ')' statement
+       | FOR '(' expression ';' ';' ')' statement
+       | FOR '(' ';' expression ';' ')' statement
+       | FOR '(' expression ';' expression ';' ')' statement
+       | FOR '(' ';' ';' expression ')' statement
+       | FOR '(' expression ';' ';' expression ')' statement
+       | FOR '(' ';' expression ';' expression ')' statement
+       | FOR '(' expression ';' expression ';' expression ')' statement
+       ;
+
+jump_statement
+       : GOTO identifier_or_typedef_name ';'
+       | CONTINUE ';'
+       | BREAK ';'
+       | RETURN ';'
+       | RETURN expression ';'
+       ;
+
+/* A.2.4 External definitions. */
+
+translation_unit
+       : external_declaration
+       | translation_unit external_declaration
+       ;
+
+external_declaration
+       : function_definition
+       | declaration
+       | macro
+       ;
+
+function_definition
+       : declaration_specifiers declarator declaration_list compound_statement
+       | declaration_specifiers declarator compound_statement
+       ;
+
+declaration_list
+       : declaration
+       | declaration_list declaration
+       ;
+
+/* Macros */
+
+function_macro
+       : FUNCTION_MACRO
+         {
+               $$ = g_strdup (yytext + strlen ("#define "));
+         }
+       ;
+
+object_macro
+       : OBJECT_MACRO
+         {
+               $$ = g_strdup (yytext + strlen ("#define "));
+         }
+       ;
+
+function_macro_define
+       : function_macro '(' identifier_list ')'
+       ;
+
+object_macro_define
+       : object_macro constant_expression
+         {
+               if ($2->const_int_set || $2->const_double_set || $2->const_string != NULL) {
+                       $2->ident = $1;
+                       gi_source_scanner_add_symbol (scanner, $2);
+                       gi_source_symbol_unref ($2);
+               }
+         }
+       ;
+
+macro
+       : function_macro_define
+       | object_macro_define
+       | error
+       ;
+
+%%
+static void
+yyerror (GISourceScanner *scanner, const char *s)
+{
+  /* ignore errors while doing a macro scan as not all object macros
+   * have valid expressions */
+  if (!scanner->macro_scan)
+    {
+      fprintf(stderr, "%s:%d: %s in '%s' at '%s'\n",
+             scanner->current_filename, lineno, s, linebuf, yytext);
+    }
+}
+
+static int
+eat_hspace (FILE * f)
+{
+  int c;
+  do
+    {
+      c = fgetc (f);
+    }
+  while (c == ' ' || c == '\t');
+  return c;
+}
+
+static int
+eat_line (FILE * f, int c)
+{
+  while (c != EOF && c != '\n')
+    {
+      c = fgetc (f);
+    }
+  if (c == '\n')
+    {
+      c = fgetc (f);
+      if (c == ' ' || c == '\t')
+        {
+          c = eat_hspace (f);
+        }
+    }
+  return c;
+}
+
+static int
+read_identifier (FILE * f, int c, char **identifier)
+{
+  GString *id = g_string_new ("");
+  while (g_ascii_isalnum (c) || c == '_')
+    {
+      g_string_append_c (id, c);
+      c = fgetc (f);
+    }
+  *identifier = g_string_free (id, FALSE);
+  return c;
+}
+
+void
+gi_source_scanner_parse_macros (GISourceScanner *scanner, GList *filenames)
+{
+  GError *error = NULL;
+  char *tmp_name = NULL;
+  FILE *fmacros =
+    fdopen (g_file_open_tmp ("gen-introspect-XXXXXX.h", &tmp_name, &error),
+            "w+");
+  g_unlink (tmp_name);
+
+  GList *l;
+  for (l = filenames; l != NULL; l = l->next)
+    {
+      FILE *f = fopen (l->data, "r");
+      int line = 1;
+
+      GString *define_line;
+      char *str;
+      gboolean error_line = FALSE;
+      int c = eat_hspace (f);
+      while (c != EOF)
+        {
+          if (c != '#')
+            {
+              /* ignore line */
+              c = eat_line (f, c);
+              line++;
+              continue;
+            }
+
+          /* print current location */
+          str = g_strescape (l->data, "");
+          fprintf (fmacros, "# %d \"%s\"\n", line, str);
+          g_free (str);
+
+          c = eat_hspace (f);
+          c = read_identifier (f, c, &str);
+          if (strcmp (str, "define") != 0 || (c != ' ' && c != '\t'))
+            {
+              g_free (str);
+              /* ignore line */
+              c = eat_line (f, c);
+              line++;
+              continue;
+            }
+          g_free (str);
+          c = eat_hspace (f);
+          c = read_identifier (f, c, &str);
+          if (strlen (str) == 0 || (c != ' ' && c != '\t' && c != '('))
+            {
+              g_free (str);
+              /* ignore line */
+              c = eat_line (f, c);
+              line++;
+              continue;
+            }
+          define_line = g_string_new ("#define ");
+          g_string_append (define_line, str);
+          g_free (str);
+          if (c == '(')
+            {
+              while (c != ')')
+                {
+                  g_string_append_c (define_line, c);
+                  c = fgetc (f);
+                  if (c == EOF || c == '\n')
+                    {
+                      error_line = TRUE;
+                      break;
+                    }
+                }
+              if (error_line)
+                {
+                  g_string_free (define_line, TRUE);
+                  /* ignore line */
+                  c = eat_line (f, c);
+                  line++;
+                  continue;
+                }
+
+              g_assert (c == ')');
+              g_string_append_c (define_line, c);
+              c = fgetc (f);
+
+              /* found function-like macro */
+              fprintf (fmacros, "%s\n", define_line->str);
+
+              g_string_free (define_line, TRUE);
+              /* ignore rest of line */
+              c = eat_line (f, c);
+              line++;
+              continue;
+            }
+          if (c != ' ' && c != '\t')
+            {
+              g_string_free (define_line, TRUE);
+              /* ignore line */
+              c = eat_line (f, c);
+              line++;
+              continue;
+            }
+          while (c != EOF && c != '\n')
+            {
+              g_string_append_c (define_line, c);
+              c = fgetc (f);
+              if (c == '\\')
+                {
+                  c = fgetc (f);
+                  if (c == '\n')
+                    {
+                      /* fold lines when seeing backslash new-line sequence */
+                      c = fgetc (f);
+                    }
+                  else
+                    {
+                      g_string_append_c (define_line, '\\');
+                    }
+                }
+            }
+
+          /* found object-like macro */
+          fprintf (fmacros, "%s\n", define_line->str);
+
+          c = eat_line (f, c);
+          line++;
+        }
+
+      fclose (f);
+    }
+
+  rewind (fmacros);
+  gi_source_scanner_parse_file (scanner, fmacros);
+}
+
+gboolean
+gi_source_scanner_parse_file (GISourceScanner *scanner, FILE *file)
+{
+  g_return_val_if_fail (file != NULL, FALSE);
+
+  const_table = g_hash_table_new_full (g_str_hash, g_str_equal,
+                                      g_free, (GDestroyNotify)gi_source_symbol_unref);
+
+  lineno = 1;
+  yyin = file;
+  yyparse (scanner);
+
+  g_hash_table_destroy (const_table);
+  const_table = NULL;
+
+  yyin = NULL;
+
+  return TRUE;
+}
+
+gboolean
+gi_source_scanner_lex_filename (GISourceScanner *scanner, const gchar *filename)
+{
+  lineno = 1;
+  yyin = fopen (filename, "r");
+
+  while (yylex (scanner) != YYEOF)
+    ;
+
+  fclose (yyin);
+
+  return TRUE;
+}
diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py
new file mode 100644 (file)
index 0000000..9579e7e
--- /dev/null
@@ -0,0 +1,133 @@
+#!/usr/bin/env python
+# -*- Mode: Python -*-
+# GObject-Introspection - a framework for introspecting GObject libraries
+# Copyright (C) 2009 Red Hat, 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
+# 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.
+#
+
+import os
+import re
+import platform
+import subprocess
+import os
+
+from .utils import get_libtool_command, extract_libtool_shlib
+
+# For .la files, the situation is easy.
+def _resolve_libtool(options, binary, libraries):
+    shlibs = []
+    for library in libraries:
+        shlib = extract_libtool_shlib(library)
+        if shlib:
+            shlibs.append(shlib)
+
+    return shlibs
+
+# Assume ldd output is something vaguely like
+#
+#  libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0x006c1000)
+#
+# We say that if something in the output looks like libpangoft2<blah>
+# then the *first* such in the output is the soname. We require <blah>
+# to start with [^A-Za-z0-9_-] to avoid problems with libpango vs libpangoft2
+#
+# The negative lookbehind at the start is to avoid problems if someone
+# is crazy enough to name a library liblib<foo> when lib<foo> exists.
+#
+def _ldd_library_pattern(library_name):
+    return re.compile("(?<![A-Za-z0-9_-])(lib*%s[^A-Za-z0-9_-][^\s\(\)]*)"
+                      % re.escape(library_name))
+
+# This is a what we do for non-la files. We assume that we are on an
+# ELF-like system where ldd exists and the soname extracted with ldd is
+# a filename that can be opened with dlopen().
+#
+# On OS X this will need a straightforward alternate implementation
+# in terms of otool.
+#
+# Windows is more difficult, since there isn't always a straightforward
+# translation between library name (.lib) and the name of the .dll, so
+# extracting the dll names from the compiled app may not be sufficient.
+# We might need to hunt down the .lib in the compile-time path and
+# use that to figure out the name of the DLL.
+#
+def _resolve_non_libtool(options, binary, libraries):
+    if not libraries:
+        return []
+
+    if os.uname()[0] == 'OpenBSD':
+        # Hack for OpenBSD when using the ports' libtool which uses slightly
+        # different directories to store the libraries in. So rewite binary.args[0]
+        # by inserting '.libs/'.
+        old_argdir = binary.args[0]
+        new_libsdir = os.path.join(os.path.dirname(binary.args[0]), '.libs/')
+        new_lib = new_libsdir + os.path.basename(binary.args[0])
+        if os.path.exists(new_lib):
+            binary.args[0] = new_lib
+            os.putenv('LD_LIBRARY_PATH', new_libsdir)
+        else:
+            binary.args[0] = old_argdir
+
+    if os.name == 'nt':
+        shlibs = []
+
+        for library in libraries:
+            shlibs.append(library + '.dll')
+    else:
+        args = []
+        libtool = get_libtool_command(options)
+        if libtool:
+            args.extend(libtool)
+            args.append('--mode=execute')
+        platform_system = platform.system()
+        if platform_system == 'Darwin':
+            args.extend(['otool', '-L', binary.args[0]])
+        else:
+            args.extend(['ldd', binary.args[0]])
+        proc = subprocess.Popen(args, stdout=subprocess.PIPE)
+        patterns = {}
+        for library in libraries:
+            patterns[library] = _ldd_library_pattern(library)
+
+        shlibs = []
+        for line in proc.stdout:
+            for library, pattern in patterns.iteritems():
+                m = pattern.search(line)
+                if m:
+                    del patterns[library]
+                    shlibs.append(m.group(1))
+                    break
+
+        if len(patterns) > 0:
+            raise SystemExit(
+                "ERROR: can't resolve libraries to shared libraries: " +
+                ", ".join(patterns.keys()))
+
+    return shlibs
+
+# We want to resolve a set of library names (the <foo> of -l<foo>)
+# against a library to find the shared library name. The shared
+# library name is suppose to be what you pass to dlopen() (or
+# equivalent). And we want to do this using the libraries that 'binary'
+# is linking against.
+#
+def resolve_shlibs(options, binary, libraries):
+    libtool = filter(lambda x: x.endswith(".la"), libraries)
+    non_libtool = filter(lambda x: not x.endswith(".la"), libraries)
+
+    return (_resolve_libtool(options, binary, libtool) +
+            _resolve_non_libtool(options, binary, non_libtool))
diff --git a/giscanner/sourcescanner.c b/giscanner/sourcescanner.c
new file mode 100644 (file)
index 0000000..1ae14bc
--- /dev/null
@@ -0,0 +1,290 @@
+/* GObject introspection: public scanner api
+ *
+ * Copyright (C) 2007 Jürg Billeter
+ * 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 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.
+ *
+ */
+
+#include "sourcescanner.h"
+#include <string.h>
+
+GISourceSymbol *
+gi_source_symbol_new (GISourceSymbolType type, const gchar *filename, int line)
+{
+  GISourceSymbol *s = g_slice_new0 (GISourceSymbol);
+  s->ref_count = 1;
+  s->source_filename = g_strdup (filename);
+  s->type = type;
+  s->line = line;
+  return s;
+}
+
+void
+ctype_free (GISourceType * type)
+{
+  g_free (type->name);
+  g_list_foreach (type->child_list, (GFunc)gi_source_symbol_unref, NULL);
+  g_list_free (type->child_list);
+  g_slice_free (GISourceType, type);
+}
+
+GISourceSymbol *
+gi_source_symbol_ref (GISourceSymbol * symbol)
+{
+  symbol->ref_count++;
+  return symbol;
+}
+
+void
+gi_source_symbol_unref (GISourceSymbol * symbol)
+{
+  if (!symbol)
+    return;
+  symbol->ref_count--;
+  if (symbol->ref_count == 0)
+    {
+      g_free (symbol->ident);
+      if (symbol->base_type)
+        ctype_free (symbol->base_type);
+      g_free (symbol->const_string);
+      g_free (symbol->source_filename);
+      g_slice_free (GISourceSymbol, symbol);
+    }
+}
+gboolean
+gi_source_symbol_get_const_boolean (GISourceSymbol * symbol)
+{
+  return (symbol->const_int_set && symbol->const_int) || symbol->const_string;
+}
+
+/* use specified type as base type of symbol */
+void
+gi_source_symbol_merge_type (GISourceSymbol *symbol,
+                            GISourceType   *type)
+{
+  GISourceType **foundation_type = &(symbol->base_type);
+
+  while (*foundation_type != NULL)
+    {
+      foundation_type = &((*foundation_type)->base_type);
+    }
+  *foundation_type = type;
+}
+
+
+GISourceType *
+gi_source_type_new (GISourceTypeType type)
+{
+  GISourceType *t = g_slice_new0 (GISourceType);
+  t->type = type;
+  return t;
+}
+
+GISourceType *
+gi_source_type_copy (GISourceType * type)
+{
+  GList *l;
+  GISourceType *result = g_slice_new0 (GISourceType);
+  result->type = type->type;
+  result->storage_class_specifier = type->storage_class_specifier;
+  result->type_qualifier = type->type_qualifier;
+  result->function_specifier = type->function_specifier;
+  if (type->name)
+    result->name = g_strdup (type->name);
+  if (type->base_type)
+    result->base_type = gi_source_type_copy (type->base_type);
+  for (l = type->child_list; l; l = l->next)
+    result->child_list = g_list_append (result->child_list, gi_source_symbol_ref (l->data));
+  result->is_bitfield = type->is_bitfield;
+  return result;
+}
+
+GISourceType *
+gi_source_basic_type_new (const char *name)
+{
+  GISourceType *basic_type = gi_source_type_new (CTYPE_BASIC_TYPE);
+  basic_type->name = g_strdup (name);
+  return basic_type;
+}
+
+GISourceType *
+gi_source_typedef_new (const char *name)
+{
+  GISourceType *typedef_ = gi_source_type_new (CTYPE_TYPEDEF);
+  typedef_->name = g_strdup (name);
+  return typedef_;
+}
+
+GISourceType *
+gi_source_struct_new (const char *name)
+{
+  GISourceType *struct_ = gi_source_type_new (CTYPE_STRUCT);
+  struct_->name = g_strdup (name);
+  return struct_;
+}
+
+GISourceType *
+gi_source_union_new (const char *name)
+{
+  GISourceType *union_ = gi_source_type_new (CTYPE_UNION);
+  union_->name = g_strdup (name);
+  return union_;
+}
+
+GISourceType *
+gi_source_enum_new (const char *name)
+{
+  GISourceType *enum_ = gi_source_type_new (CTYPE_ENUM);
+  enum_->name = g_strdup (name);
+  return enum_;
+}
+
+GISourceType *
+gi_source_pointer_new (GISourceType * base_type)
+{
+  GISourceType *pointer = gi_source_type_new (CTYPE_POINTER);
+  if (base_type != NULL)
+    pointer->base_type = gi_source_type_copy (base_type);
+  return pointer;
+}
+
+GISourceType *
+gi_source_array_new (GISourceSymbol *size)
+{
+  GISourceType *array = gi_source_type_new (CTYPE_ARRAY);
+  if (size != NULL && size->type == CSYMBOL_TYPE_CONST && size->const_int_set)
+      array->child_list = g_list_append (array->child_list, size);
+  return array;
+}
+
+GISourceType *
+gi_source_function_new (void)
+{
+  GISourceType *func = gi_source_type_new (CTYPE_FUNCTION);
+  return func;
+}
+
+GISourceScanner *
+gi_source_scanner_new (void)
+{
+  GISourceScanner * scanner;
+
+  scanner = g_slice_new0 (GISourceScanner);
+  scanner->typedef_table = g_hash_table_new_full (g_str_hash, g_str_equal,
+                                                 g_free, NULL);
+  scanner->struct_or_union_or_enum_table =
+    g_hash_table_new_full (g_str_hash, g_str_equal,
+                          g_free, (GDestroyNotify)gi_source_symbol_unref);
+
+  return scanner;
+}
+
+static void
+gi_source_comment_free (GISourceComment *comment)
+{
+  g_free (comment->comment);
+  g_free (comment->filename);
+  g_slice_free (GISourceComment, comment);
+}
+
+void
+gi_source_scanner_free (GISourceScanner *scanner)
+{
+  g_free (scanner->current_filename);
+
+  g_hash_table_destroy (scanner->typedef_table);
+  g_hash_table_destroy (scanner->struct_or_union_or_enum_table);
+
+  g_slist_foreach (scanner->comments, (GFunc)gi_source_comment_free, NULL);
+  g_slist_free (scanner->comments);
+  g_slist_foreach (scanner->symbols, (GFunc)gi_source_symbol_unref, NULL);
+  g_slist_free (scanner->symbols);
+
+  g_list_foreach (scanner->filenames, (GFunc)g_free, NULL);
+  g_list_free (scanner->filenames);
+
+}
+
+gboolean
+gi_source_scanner_is_typedef (GISourceScanner *scanner,
+                             const char      *name)
+{
+  gboolean b = g_hash_table_lookup (scanner->typedef_table, name) != NULL;
+  return b;
+}
+
+void
+gi_source_scanner_set_macro_scan (GISourceScanner  *scanner,
+                                 gboolean          macro_scan)
+{
+  scanner->macro_scan = macro_scan;
+}
+
+void
+gi_source_scanner_add_symbol (GISourceScanner  *scanner,
+                             GISourceSymbol   *symbol)
+{
+  gboolean found_filename = FALSE;
+  GList *l;
+
+  g_assert (scanner->current_filename);
+  for (l = scanner->filenames; l != NULL; l = l->next)
+    {
+      if (strcmp (l->data, scanner->current_filename) == 0)
+       {
+         found_filename = TRUE;
+         break;
+       }
+    }
+
+  if (found_filename || scanner->macro_scan)
+    scanner->symbols = g_slist_prepend (scanner->symbols,
+                                       gi_source_symbol_ref (symbol));
+  g_assert (symbol->source_filename != NULL);
+
+  switch (symbol->type)
+    {
+    case CSYMBOL_TYPE_TYPEDEF:
+      g_hash_table_insert (scanner->typedef_table,
+                          g_strdup (symbol->ident),
+                          GINT_TO_POINTER (TRUE));
+      break;
+    case CSYMBOL_TYPE_STRUCT:
+    case CSYMBOL_TYPE_UNION:
+    case CSYMBOL_TYPE_ENUM:
+      g_hash_table_insert (scanner->struct_or_union_or_enum_table,
+                          g_strdup (symbol->ident),
+                          gi_source_symbol_ref (symbol));
+      break;
+    default:
+      break;
+    }
+}
+
+GSList *
+gi_source_scanner_get_symbols (GISourceScanner  *scanner)
+{
+  return g_slist_reverse (scanner->symbols);
+}
+
+GSList *
+gi_source_scanner_get_comments(GISourceScanner  *scanner)
+{
+  return g_slist_reverse (scanner->comments);
+}
diff --git a/giscanner/sourcescanner.h b/giscanner/sourcescanner.h
new file mode 100644 (file)
index 0000000..df16cf6
--- /dev/null
@@ -0,0 +1,188 @@
+/* GObject introspection: public scanner api
+ *
+ * Copyright (C) 2007 Jürg Billeter
+ * 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 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.
+ *
+ */
+
+#ifndef __SOURCE_SCANNER_H__
+#define __SOURCE_SCANNER_H__
+
+#include <glib.h>
+#include <stdio.h>
+
+G_BEGIN_DECLS
+
+typedef struct _GISourceComment GISourceComment;
+typedef struct _GISourceScanner GISourceScanner;
+typedef struct _GISourceSymbol GISourceSymbol;
+typedef struct _GISourceType GISourceType;
+
+typedef enum
+{
+  CSYMBOL_TYPE_INVALID,
+  CSYMBOL_TYPE_ELLIPSIS,
+  CSYMBOL_TYPE_CONST,
+  CSYMBOL_TYPE_OBJECT,
+  CSYMBOL_TYPE_FUNCTION,
+  CSYMBOL_TYPE_STRUCT,
+  CSYMBOL_TYPE_UNION,
+  CSYMBOL_TYPE_ENUM,
+  CSYMBOL_TYPE_TYPEDEF,
+  CSYMBOL_TYPE_MEMBER
+} GISourceSymbolType;
+
+typedef enum
+{
+  CTYPE_INVALID,
+  CTYPE_VOID,
+  CTYPE_BASIC_TYPE,
+  CTYPE_TYPEDEF,
+  CTYPE_STRUCT,
+  CTYPE_UNION,
+  CTYPE_ENUM,
+  CTYPE_POINTER,
+  CTYPE_ARRAY,
+  CTYPE_FUNCTION
+} GISourceTypeType;
+
+typedef enum
+{
+  STORAGE_CLASS_NONE = 0,
+  STORAGE_CLASS_TYPEDEF = 1 << 1,
+  STORAGE_CLASS_EXTERN = 1 << 2,
+  STORAGE_CLASS_STATIC = 1 << 3,
+  STORAGE_CLASS_AUTO = 1 << 4,
+  STORAGE_CLASS_REGISTER = 1 << 5
+} StorageClassSpecifier;
+
+typedef enum
+{
+  TYPE_QUALIFIER_NONE = 0,
+  TYPE_QUALIFIER_CONST = 1 << 1,
+  TYPE_QUALIFIER_RESTRICT = 1 << 2,
+  TYPE_QUALIFIER_VOLATILE = 1 << 3,
+  TYPE_QUALIFIER_EXTENSION = 1 << 4
+} TypeQualifier;
+
+typedef enum
+{
+  FUNCTION_NONE = 0,
+  FUNCTION_INLINE = 1 << 1
+} FunctionSpecifier;
+
+typedef enum
+{
+  UNARY_ADDRESS_OF,
+  UNARY_POINTER_INDIRECTION,
+  UNARY_PLUS,
+  UNARY_MINUS,
+  UNARY_BITWISE_COMPLEMENT,
+  UNARY_LOGICAL_NEGATION
+} UnaryOperator;
+
+struct _GISourceComment
+{
+  char *comment;
+  char *filename;
+  int line;
+};
+
+struct _GISourceScanner
+{
+  char *current_filename;
+  gboolean macro_scan;
+  gboolean private; /* set by gtk-doc comment <private>/<public> */
+  gboolean flags; /* set by gtk-doc comment <flags> */
+  GSList *symbols;
+  GList *filenames;
+  GSList *comments; /* _GIComment */
+  GHashTable *typedef_table;
+  GHashTable *struct_or_union_or_enum_table;
+};
+
+struct _GISourceSymbol
+{
+  int ref_count;
+  GISourceSymbolType type;
+  int id;
+  char *ident;
+  GISourceType *base_type;
+  gboolean const_int_set;
+  gboolean private;
+  gint64 const_int; /* 64-bit we can handle signed and unsigned 32-bit values */
+  char *const_string;
+  gboolean const_double_set;
+  double const_double;
+  char *source_filename;
+  int line;
+};
+
+struct _GISourceType
+{
+  GISourceTypeType type;
+  StorageClassSpecifier storage_class_specifier;
+  TypeQualifier type_qualifier;
+  FunctionSpecifier function_specifier;
+  char *name;
+  GISourceType *base_type;
+  GList *child_list; /* list of GISourceSymbol */
+  gboolean is_bitfield;
+};
+
+GISourceScanner *   gi_source_scanner_new              (void);
+gboolean            gi_source_scanner_lex_filename     (GISourceScanner  *igenerator,
+                                                       const gchar      *filename);
+gboolean            gi_source_scanner_parse_file       (GISourceScanner  *igenerator,
+                                                       FILE             *file);
+void                gi_source_scanner_parse_macros     (GISourceScanner  *scanner,
+                                                       GList            *filenames);
+void                gi_source_scanner_set_macro_scan   (GISourceScanner  *scanner,
+                                                       gboolean          macro_scan);
+GSList *            gi_source_scanner_get_symbols      (GISourceScanner  *scanner);
+GSList *            gi_source_scanner_get_comments     (GISourceScanner  *scanner);
+void                gi_source_scanner_free             (GISourceScanner  *scanner);
+
+GISourceSymbol *    gi_source_symbol_new               (GISourceSymbolType  type, const gchar *filename, int line);
+gboolean            gi_source_symbol_get_const_boolean (GISourceSymbol     *symbol);
+GISourceSymbol *    gi_source_symbol_ref               (GISourceSymbol     *symbol);
+void                gi_source_symbol_unref             (GISourceSymbol     *symbol);
+
+/* Private */
+void                gi_source_scanner_add_symbol       (GISourceScanner  *scanner,
+                                                       GISourceSymbol   *symbol);
+gboolean            gi_source_scanner_is_typedef       (GISourceScanner  *scanner,
+                                                       const char       *name);
+void                gi_source_symbol_merge_type        (GISourceSymbol   *symbol,
+                                                       GISourceType     *type);
+GISourceType *      gi_source_type_new                 (GISourceTypeType  type);
+GISourceType *      gi_source_type_copy                (GISourceType     *type);
+GISourceType *      gi_source_basic_type_new           (const char       *name);
+GISourceType *      gi_source_typedef_new              (const char       *name);
+GISourceType *             gi_source_struct_new               (const char       *name);
+GISourceType *             gi_source_union_new                (const char       *name);
+GISourceType *             gi_source_enum_new                 (const char       *name);
+GISourceType *             gi_source_pointer_new              (GISourceType     *base_type);
+GISourceType *             gi_source_array_new                (GISourceSymbol   *size);
+GISourceType *             gi_source_function_new             (void);
+
+void ctype_free (GISourceType * type);
+
+G_END_DECLS
+
+#endif /* __SOURCE_SCANNER_H__ */
diff --git a/giscanner/sourcescanner.py b/giscanner/sourcescanner.py
new file mode 100644 (file)
index 0000000..1e61ecf
--- /dev/null
@@ -0,0 +1,314 @@
+# -*- Mode: Python -*-
+# GObject-Introspection - a framework for introspecting GObject libraries
+# 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 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.
+#
+
+from __future__ import with_statement
+import os
+import subprocess
+import tempfile
+
+from .libtoolimporter import LibtoolImporter
+from .message import Position
+
+with LibtoolImporter(None, None):
+    if 'UNINSTALLED_INTROSPECTION_SRCDIR' in os.environ:
+        from _giscanner import SourceScanner as CSourceScanner
+    else:
+        from giscanner._giscanner import SourceScanner as CSourceScanner
+
+(CSYMBOL_TYPE_INVALID,
+ CSYMBOL_TYPE_ELLIPSIS,
+ CSYMBOL_TYPE_CONST,
+ CSYMBOL_TYPE_OBJECT,
+ CSYMBOL_TYPE_FUNCTION,
+ CSYMBOL_TYPE_STRUCT,
+ CSYMBOL_TYPE_UNION,
+ CSYMBOL_TYPE_ENUM,
+ CSYMBOL_TYPE_TYPEDEF,
+ CSYMBOL_TYPE_MEMBER) = range(10)
+
+(CTYPE_INVALID,
+ CTYPE_VOID,
+ CTYPE_BASIC_TYPE,
+ CTYPE_TYPEDEF,
+ CTYPE_STRUCT,
+ CTYPE_UNION,
+ CTYPE_ENUM,
+ CTYPE_POINTER,
+ CTYPE_ARRAY,
+ CTYPE_FUNCTION) = range(10)
+
+STORAGE_CLASS_NONE = 0
+STORAGE_CLASS_TYPEDEF = 1 << 1
+STORAGE_CLASS_EXTERN = 1 << 2
+STORAGE_CLASS_STATIC = 1 << 3
+STORAGE_CLASS_AUTO = 1 << 4
+STORAGE_CLASS_REGISTER = 1 << 5
+
+TYPE_QUALIFIER_NONE = 0
+TYPE_QUALIFIER_CONST = 1 << 1
+TYPE_QUALIFIER_RESTRICT = 1 << 2
+TYPE_QUALIFIER_VOLATILE = 1 << 3
+TYPE_QUALIFIER_EXTENSION = 1 << 4
+
+FUNCTION_NONE = 0
+FUNCTION_INLINE = 1 << 1
+
+(UNARY_ADDRESS_OF,
+ UNARY_POINTER_INDIRECTION,
+ UNARY_PLUS,
+ UNARY_MINUS,
+ UNARY_BITWISE_COMPLEMENT,
+ UNARY_LOGICAL_NEGATION) = range(6)
+
+
+def symbol_type_name(symbol_type):
+    return {
+        CSYMBOL_TYPE_INVALID: 'invalid',
+        CSYMBOL_TYPE_ELLIPSIS: 'ellipsis',
+        CSYMBOL_TYPE_CONST: 'const',
+        CSYMBOL_TYPE_OBJECT: 'object',
+        CSYMBOL_TYPE_FUNCTION: 'function',
+        CSYMBOL_TYPE_STRUCT: 'struct',
+        CSYMBOL_TYPE_UNION: 'union',
+        CSYMBOL_TYPE_ENUM: 'enum',
+        CSYMBOL_TYPE_TYPEDEF: 'typedef',
+        CSYMBOL_TYPE_MEMBER: 'member',
+        }.get(symbol_type)
+
+
+def ctype_name(ctype):
+    return {
+        CTYPE_INVALID: 'invalid',
+        CTYPE_VOID: 'void',
+        CTYPE_BASIC_TYPE: 'basic',
+        CTYPE_TYPEDEF: 'typedef',
+        CTYPE_STRUCT: 'struct',
+        CTYPE_UNION: 'union',
+        CTYPE_ENUM: 'enum',
+        CTYPE_POINTER: 'pointer',
+        CTYPE_ARRAY: 'array',
+        CTYPE_FUNCTION: 'function',
+        }.get(ctype)
+
+
+class SourceType(object):
+    __members__ = ['type', 'base_type', 'name', 'type_qualifier',
+                   'child_list', 'is_bitfield']
+
+    def __init__(self, scanner, stype):
+        self._scanner = scanner
+        self._stype = stype
+
+    def __repr__(self):
+        return '<%s type=%r name=%r>' % (
+            self.__class__.__name__,
+            ctype_name(self.type),
+            self.name)
+
+    @property
+    def type(self):
+        return self._stype.type
+
+    @property
+    def base_type(self):
+        if self._stype.base_type is not None:
+            return SourceType(self._scanner, self._stype.base_type)
+
+    @property
+    def name(self):
+        return self._stype.name
+
+    @property
+    def type_qualifier(self):
+        return self._stype.type_qualifier
+
+    @property
+    def child_list(self):
+        for symbol in self._stype.child_list:
+            if symbol is None:
+                continue
+            yield SourceSymbol(self._scanner, symbol)
+
+    @property
+    def is_bitfield(self):
+        return self._stype.is_bitfield
+
+
+class SourceSymbol(object):
+    __members__ = ['const_int', 'const_double', 'const_string', 'ident',
+                   'type', 'base_type']
+
+    def __init__(self, scanner, symbol):
+        self._scanner = scanner
+        self._symbol = symbol
+
+    def __repr__(self):
+        src = self.source_filename
+        if src:
+            line = self.line
+            if line:
+                src += ':%r' % (line, )
+        return '<%s type=%r ident=%r src=%r>' % (
+            self.__class__.__name__,
+            symbol_type_name(self.type),
+            self.ident,
+            src)
+
+    @property
+    def const_int(self):
+        return self._symbol.const_int
+
+    @property
+    def const_double(self):
+        return self._symbol.const_double
+
+    @property
+    def const_string(self):
+        return self._symbol.const_string
+
+    @property
+    def ident(self):
+        return self._symbol.ident
+
+    @property
+    def type(self):
+        return self._symbol.type
+
+    @property
+    def base_type(self):
+        if self._symbol.base_type is not None:
+            return SourceType(self._scanner, self._symbol.base_type)
+
+    @property
+    def source_filename(self):
+        return self._symbol.source_filename
+
+    @property
+    def line(self):
+        return self._symbol.line
+
+    @property
+    def private(self):
+        return self._symbol.private
+
+    @property
+    def position(self):
+        return Position(self._symbol.source_filename,
+                        self._symbol.line)
+
+
+class SourceScanner(object):
+
+    def __init__(self):
+        self._scanner = CSourceScanner()
+        self._filenames = []
+        self._cpp_options = []
+
+    # Public API
+
+    def set_cpp_options(self, includes, defines, undefines):
+        for prefix, args in [('-I', includes),
+                             ('-D', defines),
+                             ('-U', undefines)]:
+            for arg in (args or []):
+                opt = prefix + arg
+                if not opt in self._cpp_options:
+                    self._cpp_options.append(opt)
+
+    def parse_files(self, filenames):
+        for filename in filenames:
+            filename = os.path.abspath(filename)
+            self._scanner.append_filename(filename)
+
+        headers = []
+        for filename in filenames:
+            if (filename.endswith('.c') or filename.endswith('.cpp') or
+                filename.endswith('.cc') or filename.endswith('.cxx')):
+                filename = os.path.abspath(filename)
+                self._scanner.lex_filename(filename)
+            else:
+                headers.append(filename)
+
+        self._parse(headers)
+        self._filenames.extend(headers)
+
+    def parse_macros(self, filenames):
+        self._scanner.set_macro_scan(True)
+        self._scanner.parse_macros(filenames)
+        self._scanner.set_macro_scan(False)
+
+    def get_symbols(self):
+        for symbol in self._scanner.get_symbols():
+            yield SourceSymbol(self._scanner, symbol)
+
+    def get_comments(self):
+        return self._scanner.get_comments()
+
+    def dump(self):
+        print '-'*30
+        for symbol in self._scanner.get_symbols():
+            print symbol.ident, symbol.base_type.name, symbol.type
+
+    # Private
+
+    def _parse(self, filenames):
+        if not filenames:
+            return
+
+        defines = ['__GI_SCANNER__']
+        undefs = []
+        cpp_args = os.environ.get('CC', 'cc').split()
+        cpp_args += ['-E', '-C', '-I.', '-']
+
+        cpp_args += self._cpp_options
+        proc = subprocess.Popen(cpp_args,
+                                stdin=subprocess.PIPE,
+                                stdout=subprocess.PIPE)
+
+        for define in defines:
+            proc.stdin.write('#ifndef %s\n' % (define, ))
+            proc.stdin.write('# define %s\n' % (define, ))
+            proc.stdin.write('#endif\n')
+        for undef in undefs:
+            proc.stdin.write('#undef %s\n' % (undef, ))
+        for filename in filenames:
+            filename = os.path.abspath(filename)
+            proc.stdin.write('#include <%s>\n' % (filename, ))
+        proc.stdin.close()
+
+        tmp = tempfile.mktemp()
+        fp = open(tmp, 'w+')
+        while True:
+            data = proc.stdout.read(4096)
+            if data is None:
+                break
+            fp.write(data)
+            if len(data) < 4096:
+                break
+        fp.seek(0, 0)
+
+        assert proc, 'Proc was none'
+        proc.wait()
+        if proc.returncode != 0:
+            raise SystemExit('Error while processing the source.')
+
+        self._scanner.parse_file(fp.fileno())
+        fp.close()
+        os.unlink(tmp)
diff --git a/giscanner/testcodegen.py b/giscanner/testcodegen.py
new file mode 100644 (file)
index 0000000..f304dc7
--- /dev/null
@@ -0,0 +1,119 @@
+# -*- Mode: Python -*-
+# GObject-Introspection - a framework for introspecting GObject libraries
+# Copyright (C) 2010  Red Hat, Inc.
+#
+# 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 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.
+#
+
+from StringIO import StringIO
+from . import ast
+from .codegen import CCodeGenerator
+
+DEFAULT_C_VALUES = {ast.TYPE_ANY: 'NULL',
+                    ast.TYPE_STRING: '""',
+                    ast.TYPE_FILENAME: '""',
+                    ast.TYPE_GTYPE: 'g_object_get_type ()'}
+
+def get_default_for_typeval(typeval):
+    default = DEFAULT_C_VALUES.get(typeval)
+    if default:
+        return default
+    return "0"
+
+def uscore_from_type(typeval):
+    if typeval.target_fundamental:
+        return typeval.target_fundamental.replace(' ', '_')
+    elif typeval.target_giname:
+        return typeval.target_giname.replace('.', '').lower()
+    else:
+        assert False, typeval
+
+class EverythingCodeGenerator(object):
+
+    def __init__(self, out_h_filename, out_c_filename):
+        self.namespace = ast.Namespace('Everything', '1.0')
+        self.gen = CCodeGenerator(self.namespace, out_h_filename, out_c_filename)
+
+    def write(self):
+        func = ast.Function('nullfunc',
+                            ast.Return(ast.TYPE_NONE, transfer=ast.PARAM_TRANSFER_NONE),
+                            [], False, self.gen.gen_symbol('nullfunc'))
+        self.namespace.append(func)
+        body = "  return;\n"
+        self.gen.set_function_body(func, body)
+
+        # First pass, generate constant returns
+        prefix = 'const return '
+        for typeval in ast.INTROSPECTABLE_BASIC:
+            name = prefix + uscore_from_type(typeval)
+            sym = self.gen.gen_symbol(name)
+            func = ast.Function(name,
+                                ast.Return(typeval, transfer=ast.PARAM_TRANSFER_NONE),
+                                [], False, sym)
+            self.namespace.append(func)
+            default = get_default_for_typeval(typeval)
+            body = "  return %s;\n" % (default, )
+            self.gen.set_function_body(func, body)
+
+        # Void return, one parameter
+        prefix = 'oneparam '
+        for typeval in ast.INTROSPECTABLE_BASIC:
+            if typeval is ast.TYPE_NONE:
+                continue
+            name = prefix + uscore_from_type(typeval)
+            sym = self.gen.gen_symbol(name)
+            func = ast.Function(name,
+                                ast.Return(ast.TYPE_NONE, transfer=ast.PARAM_TRANSFER_NONE),
+                                [ast.Parameter('arg0', typeval, transfer=ast.PARAM_TRANSFER_NONE,
+                                               direction=ast.PARAM_DIRECTION_IN)], False, sym)
+            self.namespace.append(func)
+            self.gen.set_function_body(func, "  return;\n")
+
+        # Void return, one (out) parameter
+        prefix = 'one_outparam '
+        for typeval in ast.INTROSPECTABLE_BASIC:
+            if typeval is ast.TYPE_NONE:
+                continue
+            name = prefix + uscore_from_type(typeval)
+            sym = self.gen.gen_symbol(name)
+            func = ast.Function(name,
+                                ast.Return(ast.TYPE_NONE, transfer=ast.PARAM_TRANSFER_NONE),
+                                [ast.Parameter('arg0', typeval, transfer=ast.PARAM_TRANSFER_NONE,
+                                               direction=ast.PARAM_DIRECTION_OUT)], False, sym)
+            self.namespace.append(func)
+            body = StringIO('w')
+            default = get_default_for_typeval(func.retval)
+            body.write("  *arg0 = %s;\n" % (default, ))
+            body.write("  return;\n")
+            self.gen.set_function_body(func, body.getvalue())
+
+        # Passthrough one parameter
+        prefix = 'passthrough_one '
+        for typeval in ast.INTROSPECTABLE_BASIC:
+            if typeval is ast.TYPE_NONE:
+                continue
+            name = prefix + uscore_from_type(typeval)
+            sym = self.gen.gen_symbol(name)
+            func = ast.Function(name, ast.Return(typeval, transfer=ast.PARAM_TRANSFER_NONE),
+                            [ast.Parameter('arg0', typeval, transfer=ast.PARAM_TRANSFER_NONE,
+                                       direction=ast.PARAM_DIRECTION_IN)], False, sym)
+            self.namespace.append(func)
+            body = StringIO('w')
+            default = get_default_for_typeval(func.retval)
+            body.write("  return arg0;\n")
+            self.gen.set_function_body(func, body.getvalue())
+
+        self.gen.codegen()
diff --git a/giscanner/transformer.py b/giscanner/transformer.py
new file mode 100644 (file)
index 0000000..cb785e7
--- /dev/null
@@ -0,0 +1,896 @@
+# -*- Mode: Python -*-
+# GObject-Introspection - a framework for introspecting GObject libraries
+# 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 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.
+#
+
+import os
+import sys
+
+from . import ast
+from . import message
+from .cachestore import CacheStore
+from .girparser import GIRParser
+from .sourcescanner import (
+    SourceSymbol, ctype_name, CTYPE_POINTER,
+    CTYPE_BASIC_TYPE, CTYPE_UNION, CTYPE_ARRAY, CTYPE_TYPEDEF,
+    CTYPE_VOID, CTYPE_ENUM, CTYPE_FUNCTION, CTYPE_STRUCT,
+    CSYMBOL_TYPE_FUNCTION, CSYMBOL_TYPE_TYPEDEF, CSYMBOL_TYPE_STRUCT,
+    CSYMBOL_TYPE_ENUM, CSYMBOL_TYPE_UNION, CSYMBOL_TYPE_OBJECT,
+    CSYMBOL_TYPE_MEMBER, CSYMBOL_TYPE_ELLIPSIS, CSYMBOL_TYPE_CONST,
+    TYPE_QUALIFIER_CONST)
+
+class TransformerException(Exception):
+    pass
+
+
+_xdg_data_dirs = [x for x in os.environ.get('XDG_DATA_DIRS', '').split(os.pathsep)]
+_xdg_data_dirs.append(DATADIR)
+
+if os.name != 'nt':
+    _xdg_data_dirs.append('/usr/share')
+
+
+class Transformer(object):
+    namespace = property(lambda self: self._namespace)
+
+    def __init__(self, namespace, accept_unprefixed=False):
+        self._cachestore = CacheStore()
+        self._accept_unprefixed = accept_unprefixed
+        self._namespace = namespace
+        self._pkg_config_packages = set()
+        self._typedefs_ns = {}
+        self._includes = {} # <string namespace -> Namespace>
+        self._include_names = set() # string namespace
+        self._includepaths = []
+        self._passthrough_mode = False
+        self._annotations = {}
+
+    def get_includes(self):
+        return self._include_names
+
+    def get_pkgconfig_packages(self):
+        return self._pkg_config_packages
+
+    def disable_cache(self):
+        self._cachestore = None
+
+    def set_passthrough_mode(self):
+        self._passthrough_mode = True
+
+    def set_annotations(self, annotations):
+        self._annotations = annotations
+
+    def _append_new_node(self, node):
+        original = self._namespace.get(node.name)
+        # Special case constants here; we allow duplication to sort-of
+        # handle #ifdef.  But this introduces an arch-dependency in the .gir
+        # file.  So far this has only come up scanning glib - in theory, other
+        # modules will just depend on that.
+        if isinstance(original, ast.Constant) and isinstance(node, ast.Constant):
+            pass
+        elif original:
+            positions = set()
+            positions.update(original.file_positions)
+            positions.update(node.file_positions)
+            message.fatal("Namespace conflict for '%s'" % (node.name, ),
+                          positions)
+        else:
+            self._namespace.append(node)
+
+    def parse(self, symbols):
+        for symbol in symbols:
+            ## WORKAROUND ##
+            # https://bugzilla.gnome.org/show_bug.cgi?id=550616
+            if symbol.ident in ['gst_g_error_get_type']:
+                continue
+            node = self._traverse_one(symbol)
+            if node:
+                self._append_new_node(node)
+
+        # Now look through the namespace for things like
+        # typedef struct _Foo Foo;
+        # where we've never seen the struct _Foo.  Just create
+        # an empty structure for these as "disguised"
+        # If we do have a class/interface, merge fields
+        for typedef, compound in self._typedefs_ns.iteritems():
+            ns_compound = self._namespace.get(compound.name)
+            if not ns_compound:
+                ns_compound = self._namespace.get('_' + compound.name)
+            if (not ns_compound and isinstance(compound, (ast.Record, ast.Union))
+                and len(compound.fields) == 0):
+                disguised = ast.Record(compound.name, typedef, disguised=True)
+                self._namespace.append(disguised)
+            elif not ns_compound:
+                self._namespace.append(compound)
+            elif isinstance(ns_compound, (ast.Record, ast.Union)) and len(ns_compound.fields) == 0:
+                ns_compound.fields = compound.fields
+        self._typedefs_ns = None
+
+    def set_include_paths(self, paths):
+        self._includepaths = list(paths)
+
+    def register_include(self, include):
+        if include in self._include_names:
+            return
+        filename = self._find_include(include)
+        self._parse_include(filename)
+        self._include_names.add(include)
+
+    def register_include_uninstalled(self, include_path):
+        basename = os.path.basename(include_path)
+        if not basename.endswith('.gir'):
+            raise SystemExit(
+"Include path %r must be a filename path ending in .gir" % (include_path, ))
+        girname = basename[:-4]
+        include = ast.Include.from_string(girname)
+        if include in self._include_names:
+            return
+        self._parse_include(include_path, uninstalled=True)
+        self._include_names.add(include)
+
+    def lookup_giname(self, name):
+        """Given a name of the form Foo or Bar.Foo,
+return the corresponding ast.Node, or None if none
+available.  Will throw KeyError however for unknown
+namespaces."""
+        if '.' not in name:
+            return self._namespace.get(name)
+        else:
+            (ns, name) = name.split('.', 1)
+            if ns == self._namespace.name:
+                return self._namespace.get(name)
+            include = self._includes[ns]
+            return include.get(name)
+
+    def lookup_typenode(self, typeobj):
+        """Given a Type object, if it points to a giname,
+calls lookup_giname() on the name.  Otherwise return
+None."""
+        if typeobj.target_giname:
+            return self.lookup_giname(typeobj.target_giname)
+        return None
+
+    # Private
+
+    def _find_include(self, include):
+        searchdirs = self._includepaths[:]
+        for path in _xdg_data_dirs:
+            searchdirs.append(os.path.join(path, 'gir-1.0'))
+        searchdirs.append(os.path.join(DATADIR, 'gir-1.0'))
+
+        girname = '%s-%s.gir' % (include.name, include.version)
+        for d in searchdirs:
+            path = os.path.join(d, girname)
+            if os.path.exists(path):
+                return path
+        sys.stderr.write("Couldn't find include %r (search path: %r)\n"\
+                         % (girname, searchdirs))
+        sys.exit(1)
+
+    @classmethod
+    def parse_from_gir(cls, filename, extra_include_dirs=None):
+        self = cls(None)
+        if extra_include_dirs is not None:
+            self.set_include_paths(extra_include_dirs)
+        self.set_passthrough_mode()
+        self._parse_include(filename)
+        parser = self._cachestore.load(filename)
+        self._namespace = parser.get_namespace()
+        del self._includes[self._namespace.name]
+        return self
+
+    def _parse_include(self, filename, uninstalled=False):
+        parser = None
+        if self._cachestore is not None:
+            parser = self._cachestore.load(filename)
+        if parser is None:
+            parser = GIRParser(types_only=not self._passthrough_mode)
+            parser.parse(filename)
+            if self._cachestore is not None:
+                self._cachestore.store(filename, parser)
+
+        for include in parser.get_includes():
+            self.register_include(include)
+
+        if not uninstalled:
+            for pkg in parser.get_pkgconfig_packages():
+                self._pkg_config_packages.add(pkg)
+        namespace = parser.get_namespace()
+        self._includes[namespace.name] = namespace
+
+    def _iter_namespaces(self):
+        """Return an iterator over all included namespaces; the
+currently-scanned namespace is first."""
+        yield self._namespace
+        for ns in self._includes.itervalues():
+            yield ns
+
+    def _sort_matches(self, x, y):
+        if x[0] is self._namespace:
+            return 1
+        elif y[0] is self._namespace:
+            return -1
+        return cmp(x[2], y[2])
+
+    def _split_c_string_for_namespace_matches(self, name, is_identifier=False):
+        matches = []  # Namespaces which might contain this name
+        unprefixed_namespaces = [] # Namespaces with no prefix, last resort
+        for ns in self._iter_namespaces():
+            if is_identifier:
+                prefixes = ns.identifier_prefixes
+            elif name[0].isupper():
+                prefixes = ns._ucase_symbol_prefixes
+            else:
+                prefixes = ns.symbol_prefixes
+            if prefixes:
+                for prefix in prefixes:
+                    if (not is_identifier) and (not prefix.endswith('_')):
+                        prefix = prefix + '_'
+                    if name.startswith(prefix):
+                        matches.append((ns, name[len(prefix):], len(prefix)))
+                        break
+            else:
+                unprefixed_namespaces.append(ns)
+        if matches:
+            matches.sort(self._sort_matches)
+            return map(lambda x: (x[0], x[1]), matches)
+        elif self._accept_unprefixed:
+            return [(self._namespace, name)]
+        elif unprefixed_namespaces:
+            # A bit of a hack; this function ideally shouldn't look through the
+            # contents of namespaces; but since we aren't scanning anything
+            # without a prefix, it's not too bad.
+            for ns in unprefixed_namespaces:
+                if name in ns:
+                    return [(ns, name)]
+        raise ValueError("Unknown namespace for %s %r"
+                         % ('identifier' if is_identifier else 'symbol', name, ))
+
+    def split_ctype_namespaces(self, ident):
+        """Given a StudlyCaps string identifier like FooBar, return a
+list of (namespace, stripped_identifier) sorted by namespace length,
+or raise ValueError.  As a special case, if the current namespace matches,
+it is always biggest (i.e. last)."""
+        return self._split_c_string_for_namespace_matches(ident, is_identifier=True)
+
+    def split_csymbol_namespaces(self, symbol):
+        """Given a C symbol like foo_bar_do_baz, return a list of
+(namespace, stripped_symbol) sorted by namespace match probablity, or
+raise ValueError."""
+        return self._split_c_string_for_namespace_matches(symbol, is_identifier=False)
+
+    def split_csymbol(self, symbol):
+        """Given a C symbol like foo_bar_do_baz, return the most probable
+(namespace, stripped_symbol) match, or raise ValueError."""
+        matches = self._split_c_string_for_namespace_matches(symbol, is_identifier=False)
+        return matches[-1]
+
+    def strip_identifier(self, ident):
+        hidden = ident.startswith('_')
+        if hidden:
+            ident = ident[1:]
+        try:
+            matches = self.split_ctype_namespaces(ident)
+        except ValueError, e:
+            raise TransformerException(str(e))
+        for ns, name in matches:
+            if ns is self._namespace:
+                if hidden:
+                    return '_' + name
+                return name
+        (ns, name) = matches[-1]
+        raise TransformerException(
+            "Skipping foreign identifier %r from namespace %s" % (
+            ident, ns.name, ))
+        return None
+
+    def _strip_symbol(self, symbol):
+        ident = symbol.ident
+        hidden = ident.startswith('_')
+        if hidden:
+            ident = ident[1:]
+        try:
+            (ns, name) = self.split_csymbol(ident)
+        except ValueError, e:
+            raise TransformerException(str(e))
+        if ns != self._namespace:
+            raise TransformerException(
+                "Skipping foreign symbol from namespace %s" % (ns.name, ))
+        if hidden:
+            return '_' + name
+        return name
+
+    def _traverse_one(self, symbol, stype=None, parent_symbol=None):
+        assert isinstance(symbol, SourceSymbol), symbol
+
+        if stype is None:
+            stype = symbol.type
+        if stype == CSYMBOL_TYPE_FUNCTION:
+            return self._create_function(symbol)
+        elif stype == CSYMBOL_TYPE_TYPEDEF:
+            return self._create_typedef(symbol)
+        elif stype == CSYMBOL_TYPE_STRUCT:
+            return self._create_struct(symbol)
+        elif stype == CSYMBOL_TYPE_ENUM:
+            return self._create_enum(symbol)
+        elif stype == CSYMBOL_TYPE_MEMBER:
+            return self._create_member(symbol, parent_symbol)
+        elif stype == CSYMBOL_TYPE_UNION:
+            return self._create_union(symbol)
+        elif stype == CSYMBOL_TYPE_CONST:
+            # Don't parse constants which are marked (skip)
+            docblock = self._annotations.get(symbol.ident)
+            if not docblock or not 'skip' in docblock.options:
+                return self._create_const(symbol)
+        # Ignore variable declarations in the header
+        elif stype == CSYMBOL_TYPE_OBJECT:
+            pass
+        else:
+            print 'transformer: unhandled symbol: %r' % (symbol, )
+
+    def _enum_common_prefix(self, symbol):
+        def common_prefix(a, b):
+            commonparts = []
+            for aword, bword in zip(a.split('_'), b.split('_')):
+                if aword != bword:
+                    return '_'.join(commonparts) + '_'
+                commonparts.append(aword)
+            return min(a, b)
+
+        # Nothing less than 2 has a common prefix
+        if len(list(symbol.base_type.child_list)) < 2:
+            return None
+        prefix = None
+        for child in symbol.base_type.child_list:
+            if prefix is None:
+                prefix = child.ident
+            else:
+                prefix = common_prefix(prefix, child.ident)
+                if prefix == '':
+                    return None
+        return prefix
+
+    def _create_enum(self, symbol):
+        prefix = self._enum_common_prefix(symbol)
+        if prefix:
+            prefixlen = len(prefix)
+        else:
+            prefixlen = 0
+        members = []
+        for child in symbol.base_type.child_list:
+            if child.private:
+                continue
+            if prefixlen > 0:
+                name = child.ident[prefixlen:]
+            else:
+                # Ok, the enum members don't have a consistent prefix
+                # among them, so let's just remove the global namespace
+                # prefix.
+                try:
+                    name = self._strip_symbol(child)
+                except TransformerException, e:
+                    message.warn_symbol(symbol, e)
+                    return None
+            members.append(ast.Member(name.lower(),
+                                      child.const_int,
+                                      child.ident,
+                                      None))
+
+        try:
+            enum_name = self.strip_identifier(symbol.ident)
+        except TransformerException, e:
+            message.warn_symbol(symbol, e)
+            return None
+        if symbol.base_type.is_bitfield:
+            klass = ast.Bitfield
+        else:
+            klass = ast.Enum
+        node = klass(enum_name, symbol.ident, members=members)
+        node.add_symbol_reference(symbol)
+        return node
+
+    def _create_function(self, symbol):
+        # Drop functions that start with _ very early on here
+        if symbol.ident.startswith('_'):
+            return None
+        parameters = list(self._create_parameters(symbol.base_type))
+        return_ = self._create_return(symbol.base_type.base_type)
+        try:
+            name = self._strip_symbol(symbol)
+        except TransformerException, e:
+            message.warn_symbol(symbol, e)
+            return None
+        func = ast.Function(name, return_, parameters, False, symbol.ident)
+        func.add_symbol_reference(symbol)
+        return func
+
+    def _create_source_type(self, source_type):
+        if source_type is None:
+            return 'None'
+        if source_type.type == CTYPE_VOID:
+            value = 'void'
+        elif source_type.type == CTYPE_BASIC_TYPE:
+            value = source_type.name
+        elif source_type.type == CTYPE_TYPEDEF:
+            value = source_type.name
+        elif source_type.type == CTYPE_ARRAY:
+            return self._create_source_type(source_type.base_type)
+        elif source_type.type == CTYPE_POINTER:
+            value = self._create_source_type(source_type.base_type) + '*'
+        else:
+            value = 'gpointer'
+        return value
+
+    def _create_parameters(self, base_type):
+        # warn if we see annotations for unknown parameters
+        param_names = set(child.ident for child in base_type.child_list)
+        for child in base_type.child_list:
+            yield self._create_parameter(child)
+
+    def _synthesize_union_type(self, symbol, parent_symbol):
+        # Synthesize a named union so that it can be referenced.
+        parent_ident = parent_symbol.ident
+        # FIXME: Should split_ctype_namespaces handle the hidden case?
+        hidden = parent_ident.startswith('_')
+        if hidden:
+            parent_ident = parent_ident[1:]
+        matches = self.split_ctype_namespaces(parent_ident)
+        (namespace, parent_name) = matches[-1]
+        assert namespace and parent_name
+        if hidden:
+            parent_name = '_' + parent_name
+        fake_union = ast.Union("%s__%s__union" % (parent_name, symbol.ident))
+        # _parse_fields accesses <type>.base_type.child_list, so we have to
+        # pass symbol.base_type even though that refers to the array, not the
+        # union.
+        self._parse_fields(symbol.base_type, fake_union)
+        self._append_new_node(fake_union)
+        fake_type = ast.Type(
+            target_giname="%s.%s" % (namespace.name, fake_union.name))
+        return fake_type
+
+    def _create_member(self, symbol, parent_symbol=None):
+        source_type = symbol.base_type
+        if (source_type.type == CTYPE_POINTER and
+            symbol.base_type.base_type.type == CTYPE_FUNCTION):
+            node = self._create_callback(symbol, member=True)
+        elif source_type.type == CTYPE_STRUCT and source_type.name is None:
+            node = self._create_struct(symbol, anonymous=True)
+        elif source_type.type == CTYPE_UNION and source_type.name is None:
+            node = self._create_union(symbol, anonymous=True)
+        else:
+            # Special handling for fields; we don't have annotations on them
+            # to apply later, yet.
+            if source_type.type == CTYPE_ARRAY:
+                # If the array contains anonymous unions, like in the GValue
+                # struct, we need to handle this specially.  This is necessary
+                # to be able to properly calculate the size of the compound
+                # type (e.g. GValue) that contains this array, see
+                # <https://bugzilla.gnome.org/show_bug.cgi?id=657040>.
+                if (source_type.base_type.type == CTYPE_UNION and
+                    source_type.base_type.name is None):
+                    synthesized_type = self._synthesize_union_type(symbol, parent_symbol)
+                    ftype = ast.Array(None, synthesized_type)
+                else:
+                    ctype = self._create_source_type(source_type)
+                    canonical_ctype = self._canonicalize_ctype(ctype)
+                    if canonical_ctype[-1] == '*':
+                        derefed_name = canonical_ctype[:-1]
+                    else:
+                        derefed_name = canonical_ctype
+                    ftype = ast.Array(None, self.create_type_from_ctype_string(ctype),
+                                      ctype=derefed_name)
+                child_list = list(symbol.base_type.child_list)
+                ftype.zeroterminated = False
+                if child_list:
+                    ftype.size = child_list[0].const_int
+            else:
+                ftype = self._create_type_from_base(symbol.base_type)
+            # ast.Fields are assumed to be read-write
+            # (except for Objects, see also glibtransformer.py)
+            node = ast.Field(symbol.ident, ftype,
+                             readable=True, writable=True,
+                             bits=symbol.const_int)
+            if symbol.private:
+                node.readable = False
+                node.writable = False
+                node.private = True
+        return node
+
+    def _create_typedef(self, symbol):
+        ctype = symbol.base_type.type
+        if (ctype == CTYPE_POINTER and
+            symbol.base_type.base_type.type == CTYPE_FUNCTION):
+            node = self._create_typedef_callback(symbol)
+        elif (ctype == CTYPE_POINTER and
+            symbol.base_type.base_type.type == CTYPE_STRUCT):
+            node = self._create_typedef_struct(symbol, disguised=True)
+        elif ctype == CTYPE_STRUCT:
+            node = self._create_typedef_struct(symbol)
+        elif ctype == CTYPE_UNION:
+            node = self._create_typedef_union(symbol)
+        elif ctype == CTYPE_ENUM:
+            return self._create_enum(symbol)
+        elif ctype in (CTYPE_TYPEDEF,
+                       CTYPE_POINTER,
+                       CTYPE_BASIC_TYPE,
+                       CTYPE_VOID):
+            try:
+                name = self.strip_identifier(symbol.ident)
+            except TransformerException, e:
+                message.warn(e)
+                return None
+            if symbol.base_type.name:
+                target = self.create_type_from_ctype_string(symbol.base_type.name)
+            else:
+                target = ast.TYPE_ANY
+            if name in ast.type_names:
+                return None
+            return ast.Alias(name, target, ctype=symbol.ident)
+        else:
+            raise NotImplementedError(
+                "symbol %r of type %s" % (symbol.ident, ctype_name(ctype)))
+        return node
+
+    def _canonicalize_ctype(self, ctype):
+        # First look up the ctype including any pointers;
+        # a few type names like 'char*' have their own aliases
+        # and we need pointer information for those.
+        firstpass = ast.type_names.get(ctype)
+
+        # If we have a particular alias for this, skip deep
+        # canonicalization to prevent changing
+        # e.g. char* -> int8*
+        if firstpass:
+            return firstpass.target_fundamental
+
+        if not ctype.endswith('*'):
+            return ctype
+
+        # We have a pointer type.
+        # Strip the end pointer, canonicalize our base type
+        base = ctype[:-1]
+        canonical_base = self._canonicalize_ctype(base)
+
+        # Append the pointer again
+        canonical = canonical_base + '*'
+
+        return canonical
+
+    def parse_ctype(self, ctype, is_member=False):
+        canonical = self._canonicalize_ctype(ctype)
+
+        # Remove all pointers - we require standard calling
+        # conventions.  For example, an 'int' is always passed by
+        # value (unless it's out or inout).
+        derefed_typename = canonical.replace('*', '')
+
+        # Preserve "pointerness" of struct/union members
+        if (is_member and canonical.endswith('*') and
+            derefed_typename in ast.basic_type_names):
+            return 'gpointer'
+        else:
+            return derefed_typename
+
+    def _create_type_from_base(self, source_type, is_parameter=False, is_return=False):
+        ctype = self._create_source_type(source_type)
+        const = ((source_type.type == CTYPE_POINTER) and
+                 (source_type.base_type.type_qualifier & TYPE_QUALIFIER_CONST))
+        return self.create_type_from_ctype_string(ctype, is_const=const,
+                                                  is_parameter=is_parameter, is_return=is_return)
+
+    def _create_bare_container_type(self, base, ctype=None,
+                                    is_const=False):
+        if base in ('GList', 'GSList', 'GLib.List', 'GLib.SList'):
+            if base in ('GList', 'GSList'):
+                name = 'GLib.' + base[1:]
+            else:
+                name = base
+            return ast.List(name, ast.TYPE_ANY, ctype=ctype,
+                        is_const=is_const)
+        elif base in ('GArray', 'GPtrArray', 'GByteArray',
+                      'GLib.Array', 'GLib.PtrArray', 'GLib.ByteArray',
+                      'GObject.Array', 'GObject.PtrArray', 'GObject.ByteArray'):
+            if '.' in base:
+                name = 'GLib.' + base.split('.', 1)[1]
+            else:
+                name = 'GLib.' + base[1:]
+            return ast.Array(name, ast.TYPE_ANY, ctype=ctype,
+                         is_const=is_const)
+        elif base in ('GHashTable', 'GLib.HashTable', 'GObject.HashTable'):
+            return ast.Map(ast.TYPE_ANY, ast.TYPE_ANY, ctype=ctype, is_const=is_const)
+        return None
+
+    def create_type_from_ctype_string(self, ctype, is_const=False,
+                                      is_parameter=False, is_return=False):
+        canonical = self._canonicalize_ctype(ctype)
+        base = canonical.replace('*', '')
+
+        # Special default: char ** -> ast.Array, same for GStrv
+        if (is_return and canonical == 'utf8*') or base == 'GStrv':
+            bare_utf8 = ast.TYPE_STRING.clone()
+            bare_utf8.ctype = None
+            return ast.Array(None, bare_utf8, ctype=ctype,
+                             is_const=is_const)
+
+        fundamental = ast.type_names.get(base)
+        if fundamental is not None:
+            return ast.Type(target_fundamental=fundamental.target_fundamental,
+                        ctype=ctype,
+                        is_const=is_const)
+        container = self._create_bare_container_type(base, ctype=ctype, is_const=is_const)
+        if container:
+            return container
+        return ast.Type(ctype=ctype, is_const=is_const)
+
+    def _create_parameter(self, symbol):
+        if symbol.type == CSYMBOL_TYPE_ELLIPSIS:
+            ptype = ast.Varargs()
+        else:
+            ptype = self._create_type_from_base(symbol.base_type, is_parameter=True)
+        return ast.Parameter(symbol.ident, ptype)
+
+    def _create_return(self, source_type):
+        typeval = self._create_type_from_base(source_type, is_return=True)
+        return ast.Return(typeval)
+
+    def _create_const(self, symbol):
+        # Don't create constants for non-public things
+        # http://bugzilla.gnome.org/show_bug.cgi?id=572790
+        if (symbol.source_filename is None or
+            not symbol.source_filename.endswith('.h')):
+            return None
+        try:
+            name = self._strip_symbol(symbol)
+        except TransformerException, e:
+            message.warn_symbol(symbol, e)
+            return None
+        if symbol.const_string is not None:
+            typeval = ast.TYPE_STRING
+            value = unicode(symbol.const_string, 'utf-8')
+        elif symbol.const_int is not None:
+            typeval = ast.TYPE_INT
+            value = '%d' % (symbol.const_int, )
+        elif symbol.const_double is not None:
+            typeval = ast.TYPE_DOUBLE
+            value = '%f' % (symbol.const_double, )
+        else:
+            raise AssertionError()
+
+        const = ast.Constant(name, typeval, value,
+                             symbol.ident)
+        const.add_symbol_reference(symbol)
+        return const
+
+    def _create_typedef_struct(self, symbol, disguised=False):
+        try:
+            name = self.strip_identifier(symbol.ident)
+        except TransformerException, e:
+            message.warn_symbol(symbol, e)
+            return None
+        struct = ast.Record(name, symbol.ident, disguised=disguised)
+        self._parse_fields(symbol, struct)
+        struct.add_symbol_reference(symbol)
+        self._typedefs_ns[symbol.ident] = struct
+        return None
+
+    def _create_typedef_union(self, symbol):
+        try:
+            name = self.strip_identifier(symbol.ident)
+        except TransformerException, e:
+            message.warn(e)
+            return None
+        union = ast.Union(name, symbol.ident)
+        self._parse_fields(symbol, union)
+        union.add_symbol_reference(symbol)
+        self._typedefs_ns[symbol.ident] = union
+        return None
+
+    def _create_typedef_callback(self, symbol):
+        callback = self._create_callback(symbol)
+        if not callback:
+            return None
+        self._typedefs_ns[callback.name] = callback
+        return callback
+
+    def _parse_fields(self, symbol, compound):
+        for child in symbol.base_type.child_list:
+            child_node = self._traverse_one(child, parent_symbol=symbol)
+            if not child_node:
+                continue
+            if isinstance(child_node, ast.Field):
+                field = child_node
+            else:
+                field = ast.Field(child.ident, None, True, False,
+                              anonymous_node=child_node)
+            compound.fields.append(field)
+
+    def _create_compound(self, klass, symbol, anonymous):
+        if symbol.ident is None:
+            # the compound is an anonymous member of another union or a struct
+            assert anonymous
+            compound = klass(None, None)
+        else:
+            compound = self._typedefs_ns.get(symbol.ident, None)
+
+        if compound is None:
+            # This is a bit of a hack; really we should try
+            # to resolve through the typedefs to find the real
+            # name
+            if symbol.ident.startswith('_'):
+                compound = self._typedefs_ns.get(symbol.ident[1:], None)
+            if compound is None:
+                if anonymous:
+                    name = symbol.ident
+                else:
+                    try:
+                        name = self.strip_identifier(symbol.ident)
+                    except TransformerException, e:
+                        message.warn(e)
+                        return None
+                compound = klass(name, symbol.ident)
+
+        self._parse_fields(symbol, compound)
+        compound.add_symbol_reference(symbol)
+        return compound
+
+    def _create_struct(self, symbol, anonymous=False):
+        return self._create_compound(ast.Record, symbol, anonymous)
+
+    def _create_union(self, symbol, anonymous=False):
+        return self._create_compound(ast.Union, symbol, anonymous)
+
+    def _create_callback(self, symbol, member=False):
+        parameters = list(self._create_parameters(symbol.base_type.base_type))
+        retval = self._create_return(symbol.base_type.base_type.base_type)
+
+        # Mark the 'user_data' arguments
+        for i, param in enumerate(parameters):
+            if (param.type.target_fundamental == 'gpointer' and
+                param.argname == 'user_data'):
+                param.closure_name = param.argname
+
+        if member:
+            name = symbol.ident
+        elif symbol.ident.find('_') > 0:
+            try:
+                name = self._strip_symbol(symbol)
+            except TransformerException, e:
+                message.warn_symbol(symbol, e)
+                return None
+        else:
+            try:
+                name = self.strip_identifier(symbol.ident)
+            except TransformerException, e:
+                message.warn(e)
+                return None
+        callback = ast.Callback(name, retval, parameters, False,
+                                ctype=symbol.ident)
+        callback.add_symbol_reference(symbol)
+
+        return callback
+
+    def create_type_from_user_string(self, typestr):
+        """Parse a C type string (as might be given from an
+        annotation) and resolve it.  For compatibility, we can consume
+both GI type string (utf8, Foo.Bar) style, as well as C (char *, FooBar) style.
+
+Note that type resolution may not succeed."""
+        if '.' in typestr:
+            container = self._create_bare_container_type(typestr)
+            if container:
+                return container
+            return self._namespace.type_from_name(typestr)
+        typeval = self.create_type_from_ctype_string(typestr)
+        self.resolve_type(typeval)
+        if typeval.resolved:
+            # Explicitly clear out the c_type; there isn't one in this case.
+            typeval.ctype = None
+        return typeval
+
+    def _resolve_type_from_ctype_all_namespaces(self, typeval, pointer_stripped):
+        # If we can't determine the namespace from the type name,
+        # fall back to trying all of our includes.  An example of this is mutter,
+        # which has nominal namespace of "Meta", but a few classes are
+        # "Mutter".  We don't export that data in introspection currently.
+        # Basically the library should be fixed, but we'll hack around it here.
+        for namespace in self._includes.itervalues():
+            target = namespace.get_by_ctype(pointer_stripped)
+            if target:
+                typeval.target_giname = '%s.%s' % (namespace.name, target.name)
+                return True
+        return False
+
+    def _resolve_type_from_ctype(self, typeval):
+        assert typeval.ctype is not None
+        pointer_stripped = typeval.ctype.replace('*', '')
+        try:
+            matches = self.split_ctype_namespaces(pointer_stripped)
+        except ValueError, e:
+            return self._resolve_type_from_ctype_all_namespaces(typeval, pointer_stripped)
+        target_giname = None
+        for namespace, name in matches:
+            target = namespace.get(name)
+            if not target:
+                target = namespace.get_by_ctype(pointer_stripped)
+            if target:
+                typeval.target_giname = '%s.%s' % (namespace.name, target.name)
+                return True
+        return False
+
+    def _resolve_type_from_gtype_name(self, typeval):
+        assert typeval.gtype_name is not None
+        for ns in self._iter_namespaces():
+            for node in ns.itervalues():
+                if not (isinstance(node, (ast.Class, ast.Interface))
+                        or (isinstance(node, ast.Registered) and node.get_type is not None)):
+                    continue
+                if node.gtype_name == typeval.gtype_name:
+                    typeval.target_giname = '%s.%s' % (ns.name, node.name)
+                    return True
+        return False
+
+    def resolve_type(self, typeval):
+        if isinstance(typeval, (ast.Array, ast.List)):
+            return self.resolve_type(typeval.element_type)
+        elif isinstance(typeval, ast.Map):
+            key_resolved = self.resolve_type(typeval.key_type)
+            value_resolved = self.resolve_type(typeval.value_type)
+            return key_resolved and value_resolved
+        elif typeval.resolved:
+            return True
+        elif typeval.ctype:
+            return self._resolve_type_from_ctype(typeval)
+        elif typeval.gtype_name:
+            return self._resolve_type_from_gtype_name(typeval)
+
+    def _typepair_to_str(self, item):
+        nsname, item = item
+        if nsname is None:
+            return item.name
+        return '%s.%s' % (nsname, item.name)
+
+    def gtypename_to_giname(self, gtname, names):
+        resolved = names.type_names.get(gtname)
+        if resolved:
+            return self._typepair_to_str(resolved)
+        resolved = self._names.type_names.get(gtname)
+        if resolved:
+            return self._typepair_to_str(resolved)
+        raise KeyError("Failed to resolve GType name: %r" % (gtname, ))
+
+    def ctype_of(self, obj):
+        if hasattr(obj, 'ctype'):
+            return obj.ctype
+        elif hasattr(obj, 'symbol'):
+            return obj.symbol
+        else:
+            return None
+
+    def resolve_aliases(self, typenode):
+        """Removes all aliases from typenode, returns first non-alias
+        in the typenode alias chain.  Returns typenode argument if it
+        is not an alias."""
+        while isinstance(typenode, ast.Alias):
+            if typenode.target.target_giname is not None:
+                typenode = self.lookup_giname(typenode.target.target_giname)
+            elif typenode.target.target_fundamental is not None:
+                typenode = ast.type_names[typenode.target.target_fundamental]
+            else:
+                break
+        return typenode
diff --git a/giscanner/utils.py b/giscanner/utils.py
new file mode 100644 (file)
index 0000000..2263b8c
--- /dev/null
@@ -0,0 +1,138 @@
+# -*- Mode: Python -*-
+# GObject-Introspection - a framework for introspecting GObject libraries
+# 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 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.
+#
+
+import re
+import os
+import subprocess
+
+_debugflags = None
+def have_debug_flag(flag):
+    """Check for whether a specific debugging feature is enabled.
+Well-known flags:
+ * start: Drop into debugger just after processing arguments
+ * exception: Drop into debugger on fatalexception
+ * warning: Drop into debugger on warning
+ * posttrans: Drop into debugger just before introspectable pass
+"""
+    global _debugflags
+    if _debugflags is None:
+        _debugflags = os.environ.get('GI_SCANNER_DEBUG', '').split(',')
+        if '' in _debugflags:
+            _debugflags.remove('')
+    return flag in _debugflags
+
+def break_on_debug_flag(flag):
+    if have_debug_flag(flag):
+        import pdb
+        pdb.set_trace()
+
+# Copied from h2defs.py
+_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_underscores(name):
+    """Converts a typename to the equivalent 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
+
+
+def to_underscores_noprefix(name):
+    """Like to_underscores, but designed for "unprefixed" names.
+    to_underscores("DBusFoo") => dbus_foo, not d_bus_foo."""
+    name = _upperstr_pat1.sub(r'\1_\2', name)
+    name = _upperstr_pat2.sub(r'\1_\2', name)
+    return name
+
+_libtool_pat = re.compile("dlname='([A-z0-9\.\-\+]+)'\n")
+
+def _extract_dlname_field(la_file):
+    f = open(la_file)
+    data = f.read()
+    f.close()
+    m = _libtool_pat.search(data)
+    if m:
+        return m.groups()[0]
+    else:
+        return None
+
+# Returns the name that we would pass to dlopen() the library
+# corresponding to this .la file
+def extract_libtool_shlib(la_file):
+    dlname = _extract_dlname_field(la_file)
+    if dlname is None:
+        return None
+
+    # From the comments in extract_libtool(), older libtools had
+    # a path rather than the raw dlname
+    return os.path.basename(dlname)
+
+def extract_libtool(la_file):
+    dlname = _extract_dlname_field(la_file)
+    if dlname is None:
+        raise ValueError("%s has no dlname. Not a shared library?" % la_file)
+    libname = os.path.join(os.path.dirname(la_file),
+                           '.libs', dlname)
+    # FIXME: This hackish, but I'm not sure how to do this
+    #        in a way which is compatible with both libtool 2.2
+    #        and pre-2.2. Johan 2008-10-21
+    libname = libname.replace('.libs/.libs', '.libs')
+    return libname
+
+# Returns arguments for invoking libtool, if applicable, otherwise None
+def get_libtool_command(options):
+    libtool_infection = not options.nolibtool
+    if not libtool_infection:
+        return None
+
+    libtool_path = options.libtool_path
+    if libtool_path:
+        # Automake by default sets:
+        # LIBTOOL = $(SHELL) $(top_builddir)/libtool
+        # To be strictly correct we would have to parse shell.  For now
+        # we simply split().
+        return libtool_path.split(' ')
+
+    try:
+        subprocess.check_call(['libtool', '--version'],
+                              stdout=open(os.devnull))
+    except (subprocess.CalledProcessError, OSError), e:
+        # If libtool's not installed, assume we don't need it
+        return None
+
+    return ['libtool']
+
+
+def files_are_identical(path1, path2):
+    f1 = open(path1)
+    f2 = open(path2)
+    buf1 = f1.read(8192)
+    buf2 = f2.read(8192)
+    while buf1 == buf2 and buf1 != '':
+        buf1 = f1.read(8192)
+        buf2 = f2.read(8192)
+    f1.close()
+    f2.close()
+    return buf1 == buf2
diff --git a/giscanner/xmlwriter.py b/giscanner/xmlwriter.py
new file mode 100755 (executable)
index 0000000..fb34adf
--- /dev/null
@@ -0,0 +1,193 @@
+# -*- Mode: Python -*-
+# GObject-Introspection - a framework for introspecting GObject libraries
+# 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 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.
+#
+
+from __future__ import with_statement
+
+import os
+
+from contextlib import contextmanager
+from cStringIO import StringIO
+from xml.sax.saxutils import escape, quoteattr
+
+from .libtoolimporter import LibtoolImporter
+
+
+def _calc_attrs_length(attributes, indent, self_indent):
+    if indent == -1:
+        return -1
+    attr_length = 0
+    for attr, value in attributes:
+        # FIXME: actually, if we have attributes with None as value this
+        # should be considered a bug and raise an error. We are just
+        # ignoring them here while we fix GIRParser to create the right
+        # ast with the correct attributes.
+        if value is None:
+            continue
+        attr_length += 2 + len(attr) + len(quoteattr(value))
+    return attr_length + indent + self_indent
+
+
+def collect_attributes(tag_name, attributes, self_indent,
+                       self_indent_char, indent=-1):
+    if not attributes:
+        return ''
+    if _calc_attrs_length(attributes, indent, self_indent) > 79:
+        indent_len = self_indent + len(tag_name) + 1
+    else:
+        indent_len = 0
+    first = True
+    attr_value = ''
+    for attr, value in attributes:
+        # FIXME: actually, if we have attributes with None as value this
+        # should be considered a bug and raise an error. We are just
+        # ignoring them here while we fix GIRParser to create the right
+        # ast with the correct attributes.
+        if value is None:
+            continue
+        if indent_len and not first:
+            attr_value += '\n%s' % (self_indent_char * indent_len)
+        attr_value += ' %s=%s' % (attr, quoteattr(value))
+        if first:
+            first = False
+    return attr_value
+
+
+with LibtoolImporter(None, None):
+    if 'UNINSTALLED_INTROSPECTION_SRCDIR' in os.environ:
+        from _giscanner import collect_attributes
+    else:
+        from giscanner._giscanner import collect_attributes
+
+
+class XMLWriter(object):
+
+    def __init__(self):
+        self._data = StringIO()
+        self._data.write('<?xml version="1.0"?>\n')
+        self._tag_stack = []
+        self._indent = 0
+        self._indent_unit = 2
+        self.enable_whitespace()
+
+    # Private
+
+    def _open_tag(self, tag_name, attributes=None):
+        if attributes is None:
+            attributes = []
+        attrs = collect_attributes(
+            tag_name, attributes, self._indent,
+            self._indent_char,
+            len(tag_name) + 2)
+        self.write_line(u'<%s%s>' % (tag_name, attrs))
+
+    def _close_tag(self, tag_name):
+        self.write_line(u'</%s>' % (tag_name, ))
+
+    # Public API
+
+    def enable_whitespace(self):
+        self._indent_char = ' '
+        self._newline_char = '\n'
+
+    def disable_whitespace(self):
+        self._indent_char = ''
+        self._newline_char = ''
+
+    def get_xml(self):
+        return self._data.getvalue()
+
+    def write_line(self, line=u'', indent=True, do_escape=False):
+        if isinstance(line, str):
+            line = line.decode('utf-8')
+        assert isinstance(line, unicode)
+        if do_escape:
+            line = escape(line.encode('utf-8')).decode('utf-8')
+        if indent:
+            self._data.write('%s%s%s' % (
+                    self._indent_char * self._indent,
+                    line.encode('utf-8'),
+                    self._newline_char))
+        else:
+            self._data.write('%s%s' % (line.encode('utf-8'), self._newline_char))
+
+    def write_comment(self, text):
+        self.write_line('<!-- %s -->' % (text, ))
+
+    def write_tag(self, tag_name, attributes, data=None):
+        if attributes is None:
+            attributes = []
+        prefix = u'<%s' % (tag_name, )
+        if data is not None:
+            if isinstance(data, str):
+                data = data.decode('UTF-8')
+            suffix = u'>%s</%s>' % (escape(data), tag_name)
+        else:
+            suffix = u'/>'
+        attrs = collect_attributes(
+            tag_name, attributes,
+            self._indent,
+            self._indent_char,
+            len(prefix) + len(suffix))
+        self.write_line(prefix + attrs + suffix)
+
+    def push_tag(self, tag_name, attributes=None):
+        if attributes is None:
+            attributes = []
+        self._open_tag(tag_name, attributes)
+        self._tag_stack.append(tag_name)
+        self._indent += self._indent_unit
+
+    def pop_tag(self):
+        self._indent -= self._indent_unit
+        tag_name = self._tag_stack.pop()
+        self._close_tag(tag_name)
+        return tag_name
+
+    @contextmanager
+    def tagcontext(self, tag_name, attributes=None):
+        self.push_tag(tag_name, attributes)
+        try:
+            yield
+        finally:
+            self.pop_tag()
+
+
+def test():
+    w = XMLWriter()
+    w.push_tag('repository')
+    w.push_tag('namespace')
+    w.push_tag('enumeration')
+    w.push_tag('member',
+               [('name', 'west'),
+                ('value', '7'),
+                ('c:identifier', 'GTK_ANCHOR_WEST'),
+                ('glib:nick', 'west')])
+
+    w.pop_tag()
+    w.pop_tag()
+    w.pop_tag()
+    x = w.get_xml()
+    lines = x.split('\n')
+    import pprint
+    pprint.pprint(lines)
+    assert len(lines[3]) < 80, len(lines[3])
+
+if __name__ == '__main__':
+    test()
diff --git a/gobject-introspection-1.0.pc b/gobject-introspection-1.0.pc
new file mode 100644 (file)
index 0000000..da5ad43
--- /dev/null
@@ -0,0 +1,22 @@
+prefix=/usr/local
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+bindir=${exec_prefix}/bin
+datarootdir=${prefix}/share
+datadir=${datarootdir}
+includedir=${prefix}/include
+
+g_ir_scanner=${bindir}/g-ir-scanner
+g_ir_compiler=${bindir}/g-ir-compiler
+g_ir_generate=${bindir}/g-ir-generate
+gidatadir=${datadir}/gobject-introspection-1.0
+girdir=${datadir}/gir-1.0
+typelibdir=${libdir}/girepository-1.0
+
+Cflags: -I${includedir}/gobject-introspection-1.0 
+Requires: glib-2.0 gobject-2.0 gmodule-2.0 gthread-2.0 libffi
+Libs: -L${libdir} -lgirepository-1.0 
+
+Name: gobject-introspection
+Description: GObject Introspection
+Version: 1.32.1
diff --git a/gobject-introspection-1.0.pc.in b/gobject-introspection-1.0.pc.in
new file mode 100644 (file)
index 0000000..32e7877
--- /dev/null
@@ -0,0 +1,22 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+bindir=@bindir@
+datarootdir=@datarootdir@
+datadir=@datadir@
+includedir=@includedir@
+
+g_ir_scanner=${bindir}/g-ir-scanner
+g_ir_compiler=${bindir}/g-ir-compiler
+g_ir_generate=${bindir}/g-ir-generate
+gidatadir=${datadir}/gobject-introspection-1.0
+girdir=${datadir}/gir-1.0
+typelibdir=${libdir}/girepository-1.0
+
+Cflags: -I${includedir}/gobject-introspection-1.0 @FFI_PC_CFLAGS@
+Requires: glib-2.0 gobject-2.0 gmodule-2.0 gthread-2.0 @FFI_PC_PACKAGES@
+Libs: -L${libdir} -lgirepository-1.0 @FFI_PC_LIBS@
+
+Name: gobject-introspection
+Description: GObject Introspection
+Version: @VERSION@
diff --git a/gobject-introspection-no-export-1.0.pc b/gobject-introspection-no-export-1.0.pc
new file mode 100644 (file)
index 0000000..e0b65c0
--- /dev/null
@@ -0,0 +1,21 @@
+prefix=/usr/local
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+bindir=${exec_prefix}/bin
+datarootdir=${prefix}/share
+datadir=${datarootdir}
+includedir=${prefix}/include
+
+g_ir_scanner=${bindir}/g-ir-scanner
+g_ir_compiler=${bindir}/g-ir-compiler
+g_ir_generate=${bindir}/g-ir-generate
+girdir=${datadir}/gir-1.0
+typelibdir=${libdir}/girepository-1.0
+
+Cflags: -I${includedir}/gobject-introspection-1.0 
+Requires: glib-2.0 gobject-2.0 gmodule-no-export-2.0 gthread-2.0 libffi
+Libs: -L${libdir} -lgirepository-1.0 
+
+Name: gobject-introspection
+Description: GObject Introspection
+Version: 1.32.1
diff --git a/gobject-introspection-no-export-1.0.pc.in b/gobject-introspection-no-export-1.0.pc.in
new file mode 100644 (file)
index 0000000..110cb75
--- /dev/null
@@ -0,0 +1,21 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+bindir=@bindir@
+datarootdir=@datarootdir@
+datadir=@datadir@
+includedir=@includedir@
+
+g_ir_scanner=${bindir}/g-ir-scanner
+g_ir_compiler=${bindir}/g-ir-compiler
+g_ir_generate=${bindir}/g-ir-generate
+girdir=${datadir}/gir-1.0
+typelibdir=${libdir}/girepository-1.0
+
+Cflags: -I${includedir}/gobject-introspection-1.0 @FFI_PC_CFLAGS@
+Requires: glib-2.0 gobject-2.0 gmodule-no-export-2.0 gthread-2.0 @FFI_PC_PACKAGES@
+Libs: -L${libdir} -lgirepository-1.0 @FFI_PC_LIBS@
+
+Name: gobject-introspection
+Description: GObject Introspection
+Version: @VERSION@
diff --git a/gtk-doc.make b/gtk-doc.make
new file mode 100644 (file)
index 0000000..8ff8f21
--- /dev/null
@@ -0,0 +1,256 @@
+# -*- mode: makefile -*-
+
+####################################
+# Everything below here is generic #
+####################################
+
+if GTK_DOC_USE_LIBTOOL
+GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+GTKDOC_RUN = $(LIBTOOL) --mode=execute
+else
+GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+GTKDOC_RUN =
+endif
+
+# We set GPATH here; this gives us semantics for GNU make
+# which are more like other make's VPATH, when it comes to
+# whether a source that is a target of one rule is then
+# searched for in VPATH/GPATH.
+#
+GPATH = $(srcdir)
+
+TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
+
+SETUP_FILES = \
+       $(content_files)                \
+       $(DOC_MAIN_SGML_FILE)           \
+       $(DOC_MODULE)-sections.txt      \
+       $(DOC_MODULE)-overrides.txt
+
+EXTRA_DIST =                           \
+       $(HTML_IMAGES)                  \
+       $(SETUP_FILES)
+
+DOC_STAMPS=setup-build.stamp scan-build.stamp sgml-build.stamp \
+       html-build.stamp pdf-build.stamp \
+       sgml.stamp html.stamp pdf.stamp
+
+SCANOBJ_FILES =                 \
+       $(DOC_MODULE).args       \
+       $(DOC_MODULE).hierarchy  \
+       $(DOC_MODULE).interfaces \
+       $(DOC_MODULE).prerequisites \
+       $(DOC_MODULE).signals
+
+REPORT_FILES = \
+       $(DOC_MODULE)-undocumented.txt \
+       $(DOC_MODULE)-undeclared.txt \
+       $(DOC_MODULE)-unused.txt
+
+CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
+
+if ENABLE_GTK_DOC
+if GTK_DOC_BUILD_HTML
+HTML_BUILD_STAMP=html-build.stamp
+else
+HTML_BUILD_STAMP=
+endif
+if GTK_DOC_BUILD_PDF
+PDF_BUILD_STAMP=pdf-build.stamp
+else
+PDF_BUILD_STAMP=
+endif
+
+all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)
+else
+all-local:
+endif
+
+docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)
+
+$(REPORT_FILES): sgml-build.stamp
+
+#### setup ####
+
+setup-build.stamp:
+       -@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
+           echo '  DOC   Preparing build'; \
+           files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \
+           if test "x$$files" != "x" ; then \
+               for file in $$files ; do \
+                   test -f $(abs_srcdir)/$$file && \
+                       cp -pu $(abs_srcdir)/$$file $(abs_builddir)/ || true; \
+               done; \
+           fi; \
+       fi
+       @touch setup-build.stamp
+
+
+#### scan ####
+
+scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
+       @echo '  DOC   Scanning header files'
+       @_source_dir='' ; \
+       for i in $(DOC_SOURCE_DIR) ; do \
+           _source_dir="$${_source_dir} --source-dir=$$i" ; \
+       done ; \
+       gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES)
+       @if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \
+           echo "  DOC   Introspecting gobjects"; \
+           scanobj_options=""; \
+           gtkdoc-scangobj 2>&1 --help | grep  >/dev/null "\-\-verbose"; \
+           if test "$(?)" = "0"; then \
+               if test "x$(V)" = "x1"; then \
+                   scanobj_options="--verbose"; \
+               fi; \
+           fi; \
+           CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \
+           gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \
+       else \
+           for i in $(SCANOBJ_FILES) ; do \
+               test -f $$i || touch $$i ; \
+           done \
+       fi
+       @touch scan-build.stamp
+
+$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
+       @true
+
+#### xml ####
+
+sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files)
+       @echo '  DOC   Building XML'
+       @_source_dir='' ; \
+       for i in $(DOC_SOURCE_DIR) ; do \
+           _source_dir="$${_source_dir} --source-dir=$$i" ; \
+       done ; \
+       gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS)
+       @touch sgml-build.stamp
+
+sgml.stamp: sgml-build.stamp
+       @true
+
+#### html ####
+
+html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
+       @echo '  DOC   Building HTML'
+       @rm -rf html
+       @mkdir html
+       @mkhtml_options=""; \
+       gtkdoc-mkhtml 2>&1 --help | grep  >/dev/null "\-\-verbose"; \
+       if test "$(?)" = "0"; then \
+         if test "x$(V)" = "x1"; then \
+           mkhtml_options="$$mkhtml_options --verbose"; \
+         fi; \
+       fi; \
+       gtkdoc-mkhtml 2>&1 --help | grep  >/dev/null "\-\-path"; \
+       if test "$(?)" = "0"; then \
+         mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \
+       fi; \
+       cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
+       -@test "x$(HTML_IMAGES)" = "x" || \
+       for file in $(HTML_IMAGES) ; do \
+         if test -f $(abs_srcdir)/$$file ; then \
+           cp $(abs_srcdir)/$$file $(abs_builddir)/html; \
+         fi; \
+         if test -f $(abs_builddir)/$$file ; then \
+           cp $(abs_builddir)/$$file $(abs_builddir)/html; \
+         fi; \
+       done;
+       @echo '  DOC   Fixing cross-references'
+       @gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
+       @touch html-build.stamp
+
+#### pdf ####
+
+pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
+       @echo '  DOC   Building PDF'
+       @rm -f $(DOC_MODULE).pdf
+       @mkpdf_options=""; \
+       gtkdoc-mkpdf 2>&1 --help | grep  >/dev/null "\-\-verbose"; \
+       if test "$(?)" = "0"; then \
+         if test "x$(V)" = "x1"; then \
+           mkpdf_options="$$mkpdf_options --verbose"; \
+         fi; \
+       fi; \
+       if test "x$(HTML_IMAGES)" != "x"; then \
+         for img in $(HTML_IMAGES); do \
+           part=`dirname $$img`; \
+           echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \
+           if test $$? != 0; then \
+             mkpdf_options="$$mkpdf_options --imgdir=$$part"; \
+           fi; \
+         done; \
+       fi; \
+       gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS)
+       @touch pdf-build.stamp
+
+##############
+
+clean-local:
+       @rm -f *~ *.bak
+       @rm -rf .libs
+
+distclean-local:
+       @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \
+           $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
+       @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
+           rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \
+       fi
+
+maintainer-clean-local:
+       @rm -rf xml html
+
+install-data-local:
+       @installfiles=`echo $(builddir)/html/*`; \
+       if test "$$installfiles" = '$(builddir)/html/*'; \
+       then echo 1>&2 'Nothing to install' ; \
+       else \
+         if test -n "$(DOC_MODULE_VERSION)"; then \
+           installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
+         else \
+           installdir="$(DESTDIR)$(TARGET_DIR)"; \
+         fi; \
+         $(mkinstalldirs) $${installdir} ; \
+         for i in $$installfiles; do \
+           echo ' $(INSTALL_DATA) '$$i ; \
+           $(INSTALL_DATA) $$i $${installdir}; \
+         done; \
+         if test -n "$(DOC_MODULE_VERSION)"; then \
+           mv -f $${installdir}/$(DOC_MODULE).devhelp2 \
+             $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \
+         fi; \
+         $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \
+       fi
+
+uninstall-local:
+       @if test -n "$(DOC_MODULE_VERSION)"; then \
+         installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
+       else \
+         installdir="$(DESTDIR)$(TARGET_DIR)"; \
+       fi; \
+       rm -rf $${installdir}
+
+#
+# Require gtk-doc when making dist
+#
+if ENABLE_GTK_DOC
+dist-check-gtkdoc: docs
+else
+dist-check-gtkdoc:
+       @echo "*** gtk-doc must be installed and enabled in order to make dist"
+       @false
+endif
+
+dist-hook: dist-check-gtkdoc dist-hook-local
+       @mkdir $(distdir)/html
+       @cp ./html/* $(distdir)/html
+       @-cp ./$(DOC_MODULE).pdf $(distdir)/
+       @-cp ./$(DOC_MODULE).types $(distdir)/
+       @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/
+       @cd $(distdir) && rm -f $(DISTCLEANFILES)
+       @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html
+
+.PHONY : dist-hook-local docs
diff --git a/m4/Makefile.am b/m4/Makefile.am
new file mode 100644 (file)
index 0000000..31484fa
--- /dev/null
@@ -0,0 +1 @@
+EXTRA_DIST=as-compiler-flag.m4
diff --git a/m4/Makefile.in b/m4/Makefile.in
new file mode 100644 (file)
index 0000000..0181ebc
--- /dev/null
@@ -0,0 +1,423 @@
+# 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 = m4
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.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)/acinclude.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@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_GIR_PACKAGE = @CAIRO_GIR_PACKAGE@
+CAIRO_GOBJECT_CFLAGS = @CAIRO_GOBJECT_CFLAGS@
+CAIRO_GOBJECT_LIBS = @CAIRO_GOBJECT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CAIRO_SHARED_LIBRARY = @CAIRO_SHARED_LIBRARY@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+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@
+EXPANDED_BINDIR = @EXPANDED_BINDIR@
+EXPANDED_DATADIR = @EXPANDED_DATADIR@
+EXPANDED_LIBDIR = @EXPANDED_LIBDIR@
+EXPANDED_LIBEXECDIR = @EXPANDED_LIBEXECDIR@
+EXPANDED_LOCALSTATEDIR = @EXPANDED_LOCALSTATEDIR@
+EXPANDED_SYSCONFDIR = @EXPANDED_SYSCONFDIR@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FFI_PC_CFLAGS = @FFI_PC_CFLAGS@
+FFI_PC_LIBS = @FFI_PC_LIBS@
+FFI_PC_PACKAGES = @FFI_PC_PACKAGES@
+FGREP = @FGREP@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
+GIREPO_CFLAGS = @GIREPO_CFLAGS@
+GIREPO_LIBS = @GIREPO_LIBS@
+GIR_DIR = @GIR_DIR@
+GIR_SUFFIX = @GIR_SUFFIX@
+GLIBSRC = @GLIBSRC@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMODULE_CFLAGS = @GMODULE_CFLAGS@
+GMODULE_LIBS = @GMODULE_LIBS@
+GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
+GOBJECT_INTROSPECTION_LIBDIR = @GOBJECT_INTROSPECTION_LIBDIR@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
+GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
+GTKDOC_MKPDF = @GTKDOC_MKPDF@
+GTKDOC_REBASE = @GTKDOC_REBASE@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+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@
+POW_LIB = @POW_LIB@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_LIB_LOC = @PYTHON_LIB_LOC@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SCANNER_CFLAGS = @SCANNER_CFLAGS@
+SCANNER_LIBS = @SCANNER_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+YACC = @YACC@
+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@
+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 = as-compiler-flag.m4
+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 m4/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign m4/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
+
+
+# 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/m4/as-compiler-flag.m4 b/m4/as-compiler-flag.m4
new file mode 100644 (file)
index 0000000..aba31b1
--- /dev/null
@@ -0,0 +1,33 @@
+dnl as-compiler-flag.m4 0.1.0
+
+dnl autostars m4 macro for detection of compiler flags
+
+dnl David Schleef <ds@schleef.org>
+
+dnl $Id: as-compiler-flag.m4,v 1.1 2004/06/01 09:33:45 thomasvs Exp $
+
+dnl AS_COMPILER_FLAG(CFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED])
+dnl Tries to compile with the given CFLAGS.
+dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags,
+dnl and ACTION-IF-NOT-ACCEPTED otherwise.
+
+AC_DEFUN([AS_COMPILER_FLAG],
+[
+  AC_MSG_CHECKING([to see if compiler understands $1])
+
+  save_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS $1"
+
+  AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no])
+  CFLAGS="$save_CFLAGS"
+
+  if test "X$flag_ok" = Xyes ; then
+    $2
+    true
+  else
+    $3
+    true
+  fi
+  AC_MSG_RESULT([$flag_ok])
+])
+
diff --git a/m4/gtk-doc.m4 b/m4/gtk-doc.m4
new file mode 100644 (file)
index 0000000..0ada151
--- /dev/null
@@ -0,0 +1,67 @@
+dnl -*- mode: autoconf -*-
+
+# serial 1
+
+dnl Usage:
+dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
+AC_DEFUN([GTK_DOC_CHECK],
+[
+  AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+  AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
+  AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
+
+  dnl check for tools we added during development
+  AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check])
+  AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
+  AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
+
+  dnl for overriding the documentation installation directory
+  AC_ARG_WITH([html-dir],
+    AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
+    [with_html_dir='${datadir}/gtk-doc/html'])
+  HTML_DIR="$with_html_dir"
+  AC_SUBST([HTML_DIR])
+
+  dnl enable/disable documentation building
+  AC_ARG_ENABLE([gtk-doc],
+    AS_HELP_STRING([--enable-gtk-doc],
+                   [use gtk-doc to build documentation [[default=no]]]),,
+    [enable_gtk_doc=no])
+
+  if test x$enable_gtk_doc = xyes; then
+    ifelse([$1],[],
+      [PKG_CHECK_EXISTS([gtk-doc],,
+                        AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
+      [PKG_CHECK_EXISTS([gtk-doc >= $1],,
+                        AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))])
+    dnl don't check for glib if we build glib
+    if test "x$PACKAGE_NAME" != "xglib"; then
+      dnl don't fail if someone does not have glib
+      PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0,,)
+    fi
+  fi
+
+  AC_MSG_CHECKING([whether to build gtk-doc documentation])
+  AC_MSG_RESULT($enable_gtk_doc)
+
+  dnl enable/disable output formats
+  AC_ARG_ENABLE([gtk-doc-html],
+    AS_HELP_STRING([--enable-gtk-doc-html],
+                   [build documentation in html format [[default=yes]]]),,
+    [enable_gtk_doc_html=yes])
+    AC_ARG_ENABLE([gtk-doc-pdf],
+      AS_HELP_STRING([--enable-gtk-doc-pdf],
+                     [build documentation in pdf format [[default=no]]]),,
+      [enable_gtk_doc_pdf=no])
+
+  if test -z "$GTKDOC_MKPDF"; then
+    enable_gtk_doc_pdf=no
+  fi
+
+
+  AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
+  AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
+  AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
+  AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
+  AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
+])
diff --git a/m4/introspection.m4 b/m4/introspection.m4
new file mode 100644 (file)
index 0000000..d89c3d9
--- /dev/null
@@ -0,0 +1,96 @@
+dnl -*- mode: autoconf -*-
+dnl Copyright 2009 Johan Dahlin
+dnl
+dnl This file is free software; the author(s) gives unlimited
+dnl permission to copy and/or distribute it, with or without
+dnl modifications, as long as this notice is preserved.
+dnl
+
+# serial 1
+
+m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
+[
+    AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
+    AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
+    AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
+
+    dnl enable/disable introspection
+    m4_if([$2], [require],
+    [dnl
+        enable_introspection=yes
+    ],[dnl
+        AC_ARG_ENABLE(introspection,
+                  AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
+                                 [Enable introspection for this build]),, 
+                                 [enable_introspection=auto])
+    ])dnl
+
+    AC_MSG_CHECKING([for gobject-introspection])
+
+    dnl presence/version checking
+    AS_CASE([$enable_introspection],
+    [no], [dnl
+        found_introspection="no (disabled, use --enable-introspection to enable)"
+    ],dnl
+    [yes],[dnl
+        PKG_CHECK_EXISTS([gobject-introspection-1.0],,
+                         AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
+        PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
+                         found_introspection=yes,
+                         AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
+    ],dnl
+    [auto],[dnl
+        PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
+       dnl Canonicalize enable_introspection
+       enable_introspection=$found_introspection
+    ],dnl
+    [dnl       
+        AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
+    ])dnl
+
+    AC_MSG_RESULT([$found_introspection])
+
+    INTROSPECTION_SCANNER=
+    INTROSPECTION_COMPILER=
+    INTROSPECTION_GENERATE=
+    INTROSPECTION_GIRDIR=
+    INTROSPECTION_TYPELIBDIR=
+    if test "x$found_introspection" = "xyes"; then
+       INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
+       INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
+       INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
+       INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
+       INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
+       INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
+       INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
+       INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
+    fi
+    AC_SUBST(INTROSPECTION_SCANNER)
+    AC_SUBST(INTROSPECTION_COMPILER)
+    AC_SUBST(INTROSPECTION_GENERATE)
+    AC_SUBST(INTROSPECTION_GIRDIR)
+    AC_SUBST(INTROSPECTION_TYPELIBDIR)
+    AC_SUBST(INTROSPECTION_CFLAGS)
+    AC_SUBST(INTROSPECTION_LIBS)
+    AC_SUBST(INTROSPECTION_MAKEFILE)
+
+    AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
+])
+
+
+dnl Usage:
+dnl   GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
+
+AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
+[
+  _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
+])
+
+dnl Usage:
+dnl   GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
+
+
+AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
+[
+  _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
+])
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..74ac6ee
--- /dev/null
@@ -0,0 +1,88 @@
+## 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; print sys.prefix"`
+py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
+if test "x$PYTHON_INCLUDES" == x; then
+  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"
+])
+
+dnl a macro to check for ability to link against libpython
+dnl  AM_CHECK_PYTHON_LIBS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
+dnl function also defines PYTHON_LIBS
+AC_DEFUN([AM_CHECK_PYTHON_LIBS],
+[AC_REQUIRE([AM_CHECK_PYTHON_HEADERS])
+AC_MSG_CHECKING(for libraries required to link against libpython)
+dnl deduce PYTHON_LIBS
+if test "x$PYTHON_LIBS" == x; then
+       PYTHON_LIBS="-L${py_prefix}/lib -lpython${PYTHON_VERSION}"
+fi
+if test "x$PYTHON_LIB_LOC" == x; then
+       PYTHON_LIB_LOC="${py_prefix}/lib"
+fi
+AC_SUBST(PYTHON_LIBS)
+AC_SUBST(PYTHON_LIB_LOC)
+dnl check if libpython exist:
+save_LIBS="$LIBS"
+LIBS="$LIBS $PYTHON_LIBS"
+AC_TRY_LINK_FUNC(Py_Initialize, dnl
+         [LIBS="$save_LIBS"; AC_MSG_RESULT(found); $1], dnl
+         [LIBS="$save_LIBS"; AC_MSG_RESULT(not found); $2])
+
+])
diff --git a/misc/pep8.py b/misc/pep8.py
new file mode 100644 (file)
index 0000000..3890629
--- /dev/null
@@ -0,0 +1,842 @@
+#!/usr/bin/python
+# pep8.py - Check Python source code formatting, according to PEP 8
+# Copyright (C) 2006 Johann C. Rocholl <johann@browsershots.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.
+
+"""
+Check Python source code formatting, according to PEP 8:
+http://www.python.org/dev/peps/pep-0008/
+
+For usage and a list of options, try this:
+$ python pep8.py -h
+
+This program and its regression test suite live here:
+http://svn.browsershots.org/trunk/devtools/pep8/
+http://trac.browsershots.org/browser/trunk/devtools/pep8/
+
+Groups of errors and warnings:
+E errors
+W warnings
+100 indentation
+200 whitespace
+300 blank lines
+400 imports
+500 line length
+600 deprecation
+700 statements
+
+You can add checks to this program by writing plugins. Each plugin is
+a simple function that is called for each line of source code, either
+physical or logical.
+
+Physical line:
+- Raw line of text from the input file.
+
+Logical line:
+- Multi-line statements converted to a single line.
+- Stripped left and right.
+- Contents of strings replaced with 'xxx' of same length.
+- Comments removed.
+
+The check function requests physical or logical lines by the name of
+the first argument:
+
+def maximum_line_length(physical_line)
+def extraneous_whitespace(logical_line)
+def blank_lines(logical_line, blank_lines, indent_level, line_number)
+
+The last example above demonstrates how check plugins can request
+additional information with extra arguments. All attributes of the
+Checker object are available. Some examples:
+
+lines: a list of the raw lines from the input file
+tokens: the tokens that contribute to this logical line
+line_number: line number in the input file
+blank_lines: blank lines before this one
+indent_char: first indentation character in this file (' ' or '\t')
+indent_level: indentation (with tabs expanded to multiples of 8)
+previous_indent_level: indentation on previous line
+previous_logical: previous logical line
+
+The docstring of each check function shall be the relevant part of
+text from PEP 8. It is printed if the user enables --show-pep8.
+
+"""
+
+import os
+import sys
+import re
+import time
+import inspect
+import tokenize
+from optparse import OptionParser
+from keyword import iskeyword
+from fnmatch import fnmatch
+
+__version__ = '0.2.0'
+__revision__ = '$Rev$'
+
+default_exclude = '.svn,CVS,*.pyc,*.pyo'
+
+indent_match = re.compile(r'([ \t]*)').match
+raise_comma_match = re.compile(r'raise\s+\w+\s*(,)').match
+
+operators = """
++  -  *  /  %  ^  &  |  =  <  >  >>  <<
++= -= *= /= %= ^= &= |= == <= >= >>= <<=
+!= <> :
+in is or not and
+""".split()
+
+options = None
+args = None
+
+
+##############################################################################
+# Plugins (check functions) for physical lines
+##############################################################################
+
+
+def tabs_or_spaces(physical_line, indent_char):
+    """
+    Never mix tabs and spaces.
+
+    The most popular way of indenting Python is with spaces only.  The
+    second-most popular way is with tabs only.  Code indented with a mixture
+    of tabs and spaces should be converted to using spaces exclusively.  When
+    invoking the Python command line interpreter with the -t option, it issues
+    warnings about code that illegally mixes tabs and spaces.  When using -tt
+    these warnings become errors.  These options are highly recommended!
+    """
+    indent = indent_match(physical_line).group(1)
+    for offset, char in enumerate(indent):
+        if char != indent_char:
+            return offset, "E101 indentation contains mixed spaces and tabs"
+
+
+def tabs_obsolete(physical_line):
+    """
+    For new projects, spaces-only are strongly recommended over tabs.  Most
+    editors have features that make this easy to do.
+    """
+    indent = indent_match(physical_line).group(1)
+    if indent.count('\t'):
+        return indent.index('\t'), "W191 indentation contains tabs"
+
+
+def trailing_whitespace(physical_line):
+    """
+    JCR: Trailing whitespace is superfluous.
+    """
+    physical_line = physical_line.rstrip('\n') # chr(10), newline
+    physical_line = physical_line.rstrip('\r') # chr(13), carriage return
+    physical_line = physical_line.rstrip('\x0c') # chr(12), form feed, ^L
+    stripped = physical_line.rstrip()
+    if physical_line != stripped:
+        return len(stripped), "W291 trailing whitespace"
+
+
+def trailing_blank_lines(physical_line, lines, line_number):
+    """
+    JCR: Trailing blank lines are superfluous.
+    """
+    if physical_line.strip() == '' and line_number == len(lines):
+        return 0, "W391 blank line at end of file"
+
+
+def missing_newline(physical_line):
+    """
+    JCR: The last line should have a newline.
+    """
+    if physical_line.rstrip() == physical_line:
+        return len(physical_line), "W292 no newline at end of file"
+
+
+def maximum_line_length(physical_line):
+    """
+    Limit all lines to a maximum of 79 characters.
+
+    There are still many devices around that are limited to 80 character
+    lines; plus, limiting windows to 80 characters makes it possible to have
+    several windows side-by-side.  The default wrapping on such devices looks
+    ugly.  Therefore, please limit all lines to a maximum of 79 characters.
+    For flowing long blocks of text (docstrings or comments), limiting the
+    length to 72 characters is recommended.
+    """
+    length = len(physical_line.rstrip())
+    if length > 99:
+        return 79, "E501 line too long (%d characters)" % length
+
+
+##############################################################################
+# Plugins (check functions) for logical lines
+##############################################################################
+
+
+def extraneous_whitespace(logical_line):
+    """
+    Avoid extraneous whitespace in the following situations:
+
+    - Immediately inside parentheses, brackets or braces.
+
+    - Immediately before a comma, semicolon, or colon.
+    """
+    line = logical_line
+    for char in '([{':
+        found = line.find(char + ' ')
+        if found > -1:
+            return found + 1, "E201 whitespace after '%s'" % char
+    for char in '}])':
+        found = line.find(' ' + char)
+        if found > -1 and line[found - 1] != ',':
+            return found, "E202 whitespace before '%s'" % char
+    for char in ',;:':
+        found = line.find(' ' + char)
+        if found > -1:
+            return found, "E203 whitespace before '%s'" % char
+
+
+def missing_whitespace(logical_line):
+    """
+    JCR: Each comma, semicolon or colon should be followed by whitespace.
+    """
+    line = logical_line
+    for index in range(len(line) - 1):
+        char = line[index]
+        if char in ',;:' and line[index + 1] != ' ':
+            before = line[:index]
+            if char == ':' and before.count('[') > before.count(']'):
+                continue # Slice syntax, no space required
+            return index, "E231 missing whitespace after '%s'" % char
+
+
+def indentation(logical_line, previous_logical, indent_char,
+                indent_level, previous_indent_level):
+    """
+    Use 4 spaces per indentation level.
+
+    For really old code that you don't want to mess up, you can continue to
+    use 8-space tabs.
+    """
+    if indent_char == ' ' and indent_level % 4:
+        return 0, "E111 indentation is not a multiple of four"
+    indent_expect = previous_logical.endswith(':')
+    if indent_expect and indent_level <= previous_indent_level:
+        return 0, "E112 expected an indented block"
+    if indent_level > previous_indent_level and not indent_expect:
+        return 0, "E113 unexpected indentation"
+
+
+def whitespace_before_parameters(logical_line, tokens):
+    """
+    Avoid extraneous whitespace in the following situations:
+
+    - Immediately before the open parenthesis that starts the argument
+      list of a function call.
+
+    - Immediately before the open parenthesis that starts an indexing or
+      slicing.
+    """
+    prev_type = tokens[0][0]
+    prev_text = tokens[0][1]
+    prev_end = tokens[0][3]
+    for index in range(1, len(tokens)):
+        token_type, text, start, end, line = tokens[index]
+        if (token_type == tokenize.OP and
+            text in '([' and
+            start != prev_end and
+            prev_type == tokenize.NAME and
+            (index < 2 or tokens[index - 2][1] != 'class') and
+            (not iskeyword(prev_text))):
+            return prev_end, "E211 whitespace before '%s'" % text
+        prev_type = token_type
+        prev_text = text
+        prev_end = end
+
+
+def whitespace_around_operator(logical_line):
+    """
+    Avoid extraneous whitespace in the following situations:
+
+    - More than one space around an assignment (or other) operator to
+      align it with another.
+    """
+    line = logical_line
+    for operator in operators:
+        found = line.find('  ' + operator)
+        if found > -1:
+            return found, "E221 multiple spaces before operator"
+        found = line.find(operator + '  ')
+        if found > -1:
+            return found, "E222 multiple spaces after operator"
+        found = line.find('\t' + operator)
+        if found > -1:
+            return found, "E223 tab before operator"
+        found = line.find(operator + '\t')
+        if found > -1:
+            return found, "E224 tab after operator"
+
+
+def whitespace_around_comma(logical_line):
+    """
+    Avoid extraneous whitespace in the following situations:
+
+    - More than one space around an assignment (or other) operator to
+      align it with another.
+
+    JCR: This should also be applied around comma etc.
+    """
+    line = logical_line
+    for separator in ',;:':
+        found = line.find(separator + '  ')
+        if found > -1:
+            return found + 1, "E241 multiple spaces after '%s'" % separator
+        found = line.find(separator + '\t')
+        if found > -1:
+            return found + 1, "E242 tab after '%s'" % separator
+
+
+def imports_on_separate_lines(logical_line):
+    """
+    Imports should usually be on separate lines.
+    """
+    line = logical_line
+    if line.startswith('import '):
+        found = line.find(',')
+        if found > -1:
+            return found, "E401 multiple imports on one line"
+
+
+def compound_statements(logical_line):
+    """
+    Compound statements (multiple statements on the same line) are
+    generally discouraged.
+    """
+    line = logical_line
+    found = line.find(':')
+    if -1 < found < len(line) - 1:
+        before = line[:found]
+        if (before.count('{') <= before.count('}') and # {'a': 1} (dict)
+            before.count('[') <= before.count(']') and # [1:2] (slice)
+            not re.search(r'\blambda\b', before)):     # lambda x: x
+            return found, "E701 multiple statements on one line (colon)"
+    found = line.find(';')
+    if -1 < found:
+        return found, "E702 multiple statements on one line (semicolon)"
+
+
+def python_3000_has_key(logical_line):
+    """
+    The {}.has_key() method will be removed in the future version of
+    Python. Use the 'in' operation instead, like:
+    d = {"a": 1, "b": 2}
+    if "b" in d:
+        print d["b"]
+    """
+    pos = logical_line.find('.has_key(')
+    if pos > -1:
+        return pos, "W601 .has_key() is deprecated, use 'in'"
+
+
+def python_3000_raise_comma(logical_line):
+    """
+    When raising an exception, use "raise ValueError('message')"
+    instead of the older form "raise ValueError, 'message'".
+
+    The paren-using form is preferred because when the exception arguments
+    are long or include string formatting, you don't need to use line
+    continuation characters thanks to the containing parentheses.  The older
+    form will be removed in Python 3000.
+    """
+    match = raise_comma_match(logical_line)
+    if match:
+        return match.start(1), "W602 deprecated form of raising exception"
+
+
+##############################################################################
+# Helper functions
+##############################################################################
+
+
+def expand_indent(line):
+    """
+    Return the amount of indentation.
+    Tabs are expanded to the next multiple of 8.
+
+    >>> expand_indent('    ')
+    4
+    >>> expand_indent('\\t')
+    8
+    >>> expand_indent('    \\t')
+    8
+    >>> expand_indent('       \\t')
+    8
+    >>> expand_indent('        \\t')
+    16
+    """
+    result = 0
+    for char in line:
+        if char == '\t':
+            result = result / 8 * 8 + 8
+        elif char == ' ':
+            result += 1
+        else:
+            break
+    return result
+
+
+##############################################################################
+# Framework to run all checks
+##############################################################################
+
+
+def message(text):
+    """Print a message."""
+    # print >> sys.stderr, options.prog + ': ' + text
+    # print >> sys.stderr, text
+    print text
+
+
+def find_checks(argument_name):
+    """
+    Find all globally visible functions where the first argument name
+    starts with argument_name.
+    """
+    checks = []
+    function_type = type(find_checks)
+    for name, function in globals().iteritems():
+        if type(function) is function_type:
+            args = inspect.getargspec(function)[0]
+            if len(args) >= 1 and args[0].startswith(argument_name):
+                checks.append((name, function, args))
+    checks.sort()
+    return checks
+
+
+def mute_string(text):
+    """
+    Replace contents with 'xxx' to prevent syntax matching.
+
+    >>> mute_string('"abc"')
+    '"xxx"'
+    >>> mute_string("'''abc'''")
+    "'''xxx'''"
+    >>> mute_string("r'abc'")
+    "r'xxx'"
+    """
+    start = 1
+    end = len(text) - 1
+    # String modifiers (e.g. u or r)
+    if text.endswith('"'):
+        start += text.index('"')
+    elif text.endswith("'"):
+        start += text.index("'")
+    # Triple quotes
+    if text.endswith('"""') or text.endswith("'''"):
+        start += 2
+        end -= 2
+    return text[:start] + 'x' * (end - start) + text[end:]
+
+
+class Checker:
+    """
+    Load a Python source file, tokenize it, check coding style.
+    """
+
+    def __init__(self, filename):
+        self.filename = filename
+        self.lines = file(filename).readlines()
+        self.physical_checks = find_checks('physical_line')
+        self.logical_checks = find_checks('logical_line')
+        options.counters['physical lines'] = \
+            options.counters.get('physical lines', 0) + len(self.lines)
+
+    def readline(self):
+        """
+        Get the next line from the input buffer.
+        """
+        self.line_number += 1
+        if self.line_number > len(self.lines):
+            return ''
+        return self.lines[self.line_number - 1]
+
+    def readline_check_physical(self):
+        """
+        Check and return the next physical line. This method can be
+        used to feed tokenize.generate_tokens.
+        """
+        line = self.readline()
+        if line:
+            self.check_physical(line)
+        return line
+
+    def run_check(self, check, argument_names):
+        """
+        Run a check plugin.
+        """
+        arguments = []
+        for name in argument_names:
+            arguments.append(getattr(self, name))
+        return check(*arguments)
+
+    def check_physical(self, line):
+        """
+        Run all physical checks on a raw input line.
+        """
+        self.physical_line = line
+        if self.indent_char is None and len(line) and line[0] in ' \t':
+            self.indent_char = line[0]
+        for name, check, argument_names in self.physical_checks:
+            result = self.run_check(check, argument_names)
+            if result is not None:
+                offset, text = result
+                self.report_error(self.line_number, offset, text, check)
+
+    def build_tokens_line(self):
+        """
+        Build a logical line from tokens.
+        """
+        self.mapping = []
+        logical = []
+        length = 0
+        previous = None
+        for token in self.tokens:
+            token_type, text = token[0:2]
+            if token_type in (tokenize.COMMENT, tokenize.NL,
+                              tokenize.INDENT, tokenize.DEDENT,
+                              tokenize.NEWLINE):
+                continue
+            if token_type == tokenize.STRING:
+                text = mute_string(text)
+            if previous:
+                end_line, end = previous[3]
+                start_line, start = token[2]
+                if end_line != start_line: # different row
+                    if self.lines[end_line - 1][end - 1] not in '{[(':
+                        logical.append(' ')
+                        length += 1
+                elif end != start: # different column
+                    fill = self.lines[end_line - 1][end:start]
+                    logical.append(fill)
+                    length += len(fill)
+            self.mapping.append((length, token))
+            logical.append(text)
+            length += len(text)
+            previous = token
+        self.logical_line = ''.join(logical)
+        assert self.logical_line.lstrip() == self.logical_line
+        assert self.logical_line.rstrip() == self.logical_line
+
+    def check_logical(self):
+        """
+        Build a line from tokens and run all logical checks on it.
+        """
+        options.counters['logical lines'] = \
+            options.counters.get('logical lines', 0) + 1
+        self.build_tokens_line()
+        first_line = self.lines[self.mapping[0][1][2][0] - 1]
+        indent = first_line[:self.mapping[0][1][2][1]]
+        self.previous_indent_level = self.indent_level
+        self.indent_level = expand_indent(indent)
+        if options.verbose >= 2:
+            print self.logical_line[:80].rstrip()
+        for name, check, argument_names in self.logical_checks:
+            if options.verbose >= 3:
+                print '   ', name
+            result = self.run_check(check, argument_names)
+            if result is not None:
+                offset, text = result
+                if type(offset) is tuple:
+                    original_number, original_offset = offset
+                else:
+                    for token_offset, token in self.mapping:
+                        if offset >= token_offset:
+                            original_number = token[2][0]
+                            original_offset = (token[2][1]
+                                               + offset - token_offset)
+                self.report_error(original_number, original_offset,
+                                  text, check)
+        self.previous_logical = self.logical_line
+
+    def check_all(self):
+        """
+        Run all checks on the input file.
+        """
+        self.file_errors = 0
+        self.line_number = 0
+        self.indent_char = None
+        self.indent_level = 0
+        self.previous_logical = ''
+        self.blank_lines = 0
+        self.tokens = []
+        parens = 0
+        for token in tokenize.generate_tokens(self.readline_check_physical):
+            # print tokenize.tok_name[token[0]], repr(token)
+            self.tokens.append(token)
+            token_type, text = token[0:2]
+            if token_type == tokenize.OP and text in '([{':
+                parens += 1
+            if token_type == tokenize.OP and text in '}])':
+                parens -= 1
+            if token_type == tokenize.NEWLINE and not parens:
+                self.check_logical()
+                self.blank_lines = 0
+                self.tokens = []
+            if token_type == tokenize.NL and not parens:
+                self.blank_lines += 1
+                self.tokens = []
+            if token_type == tokenize.COMMENT:
+                source_line = token[4]
+                token_start = token[2][1]
+                if source_line[:token_start].strip() == '':
+                    self.blank_lines = 0
+        return self.file_errors
+
+    def report_error(self, line_number, offset, text, check):
+        """
+        Report an error, according to options.
+        """
+        if options.quiet == 1 and not self.file_errors:
+            message(self.filename)
+        self.file_errors += 1
+        code = text[:4]
+        options.counters[code] = options.counters.get(code, 0) + 1
+        options.messages[code] = text[5:]
+        if options.quiet:
+            return
+        if options.testsuite:
+            base = os.path.basename(self.filename)[:4]
+            if base == code:
+                return
+            if base[0] == 'E' and code[0] == 'W':
+                return
+        if ignore_code(code):
+            return
+        if options.counters[code] == 1 or options.repeat:
+            message("%s:%s:%d: %s" %
+                    (self.filename, line_number, offset + 1, text))
+            if options.show_source:
+                line = self.lines[line_number - 1]
+                message(line.rstrip())
+                message(' ' * offset + '^')
+            if options.show_pep8:
+                message(check.__doc__.lstrip('\n').rstrip())
+
+
+def input_file(filename):
+    """
+    Run all checks on a Python source file.
+    """
+    if excluded(filename) or not filename_match(filename):
+        return 0
+    if options.verbose:
+        message('checking ' + filename)
+    options.counters['files'] = options.counters.get('files', 0) + 1
+    errors = Checker(filename).check_all()
+    if options.testsuite and not errors:
+        message("%s: %s" % (filename, "no errors found"))
+    return errors
+
+
+def input_dir(dirname):
+    """
+    Check all Python source files in this directory and all subdirectories.
+    """
+    dirname = dirname.rstrip('/')
+    if excluded(dirname):
+        return 0
+    errors = 0
+    for root, dirs, files in os.walk(dirname):
+        if options.verbose:
+            message('directory ' + root)
+        options.counters['directories'] = \
+            options.counters.get('directories', 0) + 1
+        dirs.sort()
+        for subdir in dirs:
+            if excluded(subdir):
+                dirs.remove(subdir)
+        files.sort()
+        for filename in files:
+            errors += input_file(os.path.join(root, filename))
+    return errors
+
+
+def excluded(filename):
+    """
+    Check if options.exclude contains a pattern that matches filename.
+    """
+    basename = os.path.basename(filename)
+    for pattern in options.exclude:
+        if fnmatch(basename, pattern):
+            # print basename, 'excluded because it matches', pattern
+            return True
+
+
+def filename_match(filename):
+    """
+    Check if options.filename contains a pattern that matches filename.
+    If options.filename is unspecified, this always returns True.
+    """
+    if not options.filename:
+        return True
+    for pattern in options.filename:
+        if fnmatch(filename, pattern):
+            return True
+
+
+def ignore_code(code):
+    """
+    Check if options.ignore contains a prefix of the error code.
+    """
+    for ignore in options.ignore:
+        if code.startswith(ignore):
+            return True
+
+
+def get_error_statistics():
+    """Get error statistics."""
+    return get_statistics("E")
+
+
+def get_warning_statistics():
+    """Get warning statistics."""
+    return get_statistics("W")
+
+
+def get_statistics(prefix=''):
+    """
+    Get statistics for message codes that start with the prefix.
+
+    prefix='' matches all errors and warnings
+    prefix='E' matches all errors
+    prefix='W' matches all warnings
+    prefix='E4' matches all errors that have to do with imports
+    """
+    stats = []
+    keys = options.messages.keys()
+    keys.sort()
+    for key in keys:
+        if key.startswith(prefix):
+            stats.append('%-7s %s %s' %
+                         (options.counters[key], key, options.messages[key]))
+    return stats
+
+
+def print_statistics(prefix=''):
+    """Print overall statistics (number of errors and warnings)."""
+    for line in get_statistics(prefix):
+        print line
+
+
+def print_benchmark(elapsed):
+    """
+    Print benchmark numbers.
+    """
+    print '%-7.2f %s' % (elapsed, 'seconds elapsed')
+    keys = ['directories', 'files',
+            'logical lines', 'physical lines']
+    for key in keys:
+        if key in options.counters:
+            print '%-7d %s per second (%d total)' % (
+                options.counters[key] / elapsed, key,
+                options.counters[key])
+
+
+def process_options(arglist=None):
+    """
+    Process options passed either via arglist or via command line args.
+    """
+    global options, args
+    usage = "%prog [options] input ..."
+    parser = OptionParser(usage)
+    parser.add_option('-v', '--verbose', default=0, action='count',
+                      help="print status messages, or debug with -vv")
+    parser.add_option('-q', '--quiet', default=0, action='count',
+                      help="report only file names, or nothing with -qq")
+    parser.add_option('--exclude', metavar='patterns', default=default_exclude,
+                      help="skip matches (default %s)" % default_exclude)
+    parser.add_option('--filename', metavar='patterns',
+                      help="only check matching files (e.g. *.py)")
+    parser.add_option('--ignore', metavar='errors', default='',
+                      help="skip errors and warnings (e.g. E4,W)")
+    parser.add_option('--repeat', action='store_true',
+                      help="show all occurrences of the same error")
+    parser.add_option('--show-source', action='store_true',
+                      help="show source code for each error")
+    parser.add_option('--show-pep8', action='store_true',
+                      help="show text of PEP 8 for each error")
+    parser.add_option('--statistics', action='store_true',
+                      help="count errors and warnings")
+    parser.add_option('--benchmark', action='store_true',
+                      help="measure processing speed")
+    parser.add_option('--testsuite', metavar='dir',
+                      help="run regression tests from dir")
+    parser.add_option('--doctest', action='store_true',
+                      help="run doctest on myself")
+    options, args = parser.parse_args(arglist)
+    if options.testsuite:
+        args.append(options.testsuite)
+    if len(args) == 0:
+        parser.error('input not specified')
+    options.prog = os.path.basename(sys.argv[0])
+    options.exclude = options.exclude.split(',')
+    for index in range(len(options.exclude)):
+        options.exclude[index] = options.exclude[index].rstrip('/')
+    if options.filename:
+        options.filename = options.filename.split(',')
+    if options.ignore:
+        options.ignore = options.ignore.split(',')
+    else:
+        options.ignore = []
+    options.counters = {}
+    options.messages = {}
+
+    return options, args
+
+
+def _main():
+    """
+    Parse options and run checks on Python source.
+    """
+    options, args = process_options()
+    if options.doctest:
+        import doctest
+        return doctest.testmod()
+    start_time = time.time()
+    errors = 0
+    for path in args:
+        # skip emacs backups
+        if path.startswith(".#"):
+            continue
+        if os.path.isdir(path):
+            errors += input_dir(path)
+        else:
+            errors += input_file(path)
+    elapsed = time.time() - start_time
+    if options.statistics:
+        print_statistics()
+    if options.benchmark:
+        print_benchmark(elapsed)
+    return errors > 0
+
+if __name__ == '__main__':
+    sys.exit(_main())
diff --git a/misc/pre-commit b/misc/pre-commit
new file mode 100755 (executable)
index 0000000..1f37d86
--- /dev/null
@@ -0,0 +1,86 @@
+#!/bin/sh
+#
+# An example hook script to verify what is about to be committed.
+# Called by git-commit with no arguments.  The hook should
+# exit with non-zero status after issuing an appropriate message if
+# it wants to stop the commit.
+#
+# To enable this hook, make this file executable.
+
+# This is slightly modified from Andrew Morton's Perfect Patch.
+# Lines you introduce should not have trailing whitespace.
+# Also check for an indentation that has SP before a TAB.
+
+if git-rev-parse --verify HEAD 2>/dev/null
+then
+       git-diff-index -p -M --cached HEAD --
+else
+       # NEEDSWORK: we should produce a diff with an empty tree here
+       # if we want to do the same verification for the initial import.
+       :
+fi |
+perl -e '
+    my $found_bad = 0;
+    my $filename;
+    my $reported_filename = "";
+    my $lineno;
+    sub bad_line {
+       my ($why, $line) = @_;
+       if (!$found_bad) {
+           print STDERR "*\n";
+           print STDERR "* You have some suspicious patch lines:\n";
+           print STDERR "*\n";
+           $found_bad = 1;
+       }
+       if ($reported_filename ne $filename) {
+           print STDERR "* In $filename\n";
+           $reported_filename = $filename;
+       }
+       print STDERR "* $why (line $lineno)\n";
+       print STDERR "$filename:$lineno:$line\n";
+    }
+    while (<>) {
+       if (m|^diff --git a/(.*) b/\1$|) {
+           $filename = $1;
+           next;
+       }
+       if (/^@@ -\S+ \+(\d+)/) {
+           $lineno = $1 - 1;
+           next;
+       }
+       if (/^ /) {
+           $lineno++;
+           next;
+       }
+       if (s/^\+//) {
+           $lineno++;
+           chomp;
+           if (/\s$/) {
+               bad_line("trailing whitespace", $_);
+           }
+           if (/^\s* \t/) {
+               bad_line("indent SP followed by a TAB", $_);
+           }
+           if (/^([<>])\1{6} |^={7}$/) {
+               bad_line("unresolved merge conflict", $_);
+           }
+       }
+    }
+    exit($found_bad);
+'
+
+CHECK_FILE=.make-check-passed
+if ! test -f $CHECK_FILE; then
+    echo "You need to run make check before committing"
+    exit 1
+fi
+
+# Need to run make check at least once every 20 minutes
+MODIFIED=`stat -c %Y $CHECK_FILE`
+NOW=`date +%s`
+DELTA=$(($NOW-MODIFIED))
+if test "$DELTA" -ge "1200"; then
+    echo "You haven't ran make check in $((DELTA / 60)) minutes."
+    exit 1
+fi
+
diff --git a/misc/pyflakes.py b/misc/pyflakes.py
new file mode 100644 (file)
index 0000000..fa818b1
--- /dev/null
@@ -0,0 +1,542 @@
+# -*- test-case-name: pyflakes -*-
+# (c) 2005-2008 Divmod, Inc.
+# See LICENSE file for details
+
+import __builtin__
+import compiler
+import sys
+import os
+
+from compiler import ast
+
+
+class Message(object):
+    message = ''
+    message_args = ()
+
+    def __init__(self, filename, lineno):
+        self.filename = filename
+        self.lineno = lineno
+
+    def __str__(self):
+        return '%s:%s: %s' % (self.filename,
+                              self.lineno,
+                              self.message % self.message_args)
+
+
+class UnusedImport(Message):
+    message = '%r imported but unused'
+
+    def __init__(self, filename, lineno, name):
+        Message.__init__(self, filename, lineno)
+        self.message_args = (name, )
+
+
+class RedefinedWhileUnused(Message):
+    message = 'redefinition of unused %r from line %r'
+
+    def __init__(self, filename, lineno, name, orig_lineno):
+        Message.__init__(self, filename, lineno)
+        self.message_args = (name, orig_lineno)
+
+
+class ImportShadowedByLoopVar(Message):
+    message = 'import %r from line %r shadowed by loop variable'
+
+    def __init__(self, filename, lineno, name, orig_lineno):
+        Message.__init__(self, filename, lineno)
+        self.message_args = (name, orig_lineno)
+
+
+class ImportStarUsed(Message):
+    message = "'from %s import *' used; unable to detect undefined names"
+
+    def __init__(self, filename, lineno, modname):
+        Message.__init__(self, filename, lineno)
+        self.message_args = (modname, )
+
+
+class UndefinedName(Message):
+    message = 'undefined name %r'
+
+    def __init__(self, filename, lineno, name):
+        Message.__init__(self, filename, lineno)
+        self.message_args = (name, )
+
+
+class UndefinedLocal(Message):
+    message = ("local variable %r (defined in enclosing scope on line %r) "
+               "referenced before assignment")
+
+    def __init__(self, filename, lineno, name, orig_lineno):
+        Message.__init__(self, filename, lineno)
+        self.message_args = (name, orig_lineno)
+
+
+class DuplicateArgument(Message):
+    message = 'duplicate argument %r in function definition'
+
+    def __init__(self, filename, lineno, name):
+        Message.__init__(self, filename, lineno)
+        self.message_args = (name, )
+
+
+class RedefinedFunction(Message):
+    message = 'redefinition of function %r from line %r'
+
+    def __init__(self, filename, lineno, name, orig_lineno):
+        Message.__init__(self, filename, lineno)
+        self.message_args = (name, orig_lineno)
+
+
+class LateFutureImport(Message):
+    message = 'future import(s) %r after other statements'
+
+    def __init__(self, filename, lineno, names):
+        Message.__init__(self, filename, lineno)
+        self.message_args = (names, )
+
+
+class Binding(object):
+    """
+    @ivar used: pair of (L{Scope}, line-number) indicating the scope and
+                line number that this binding was last used
+    """
+
+    def __init__(self, name, source):
+        self.name = name
+        self.source = source
+        self.used = False
+
+    def __str__(self):
+        return self.name
+
+    def __repr__(self):
+        return '<%s object %r from line %r at 0x%x>' % (
+            self.__class__.__name__,
+            self.name,
+            self.source.lineno,
+            id(self))
+
+
+class UnBinding(Binding):
+    '''Created by the 'del' operator.'''
+
+
+class Importation(Binding):
+
+    def __init__(self, name, source):
+        name = name.split('.')[0]
+        super(Importation, self).__init__(name, source)
+
+
+class Assignment(Binding):
+    pass
+
+
+class FunctionDefinition(Binding):
+    pass
+
+
+class Scope(dict):
+    importStarred = False       # set to True when import * is found
+
+    def __repr__(self):
+        return '<%s at 0x%x %s>' % (self.__class__.__name__, id(self),
+                                    dict.__repr__(self))
+
+    def __init__(self):
+        super(Scope, self).__init__()
+
+
+class ClassScope(Scope):
+    pass
+
+
+class FunctionScope(Scope):
+    """
+    I represent a name scope for a function.
+
+    @ivar globals: Names declared 'global' in this function.
+    """
+
+    def __init__(self):
+        super(FunctionScope, self).__init__()
+        self.globals = {}
+
+
+class ModuleScope(Scope):
+    pass
+
+
+class Checker(object):
+    nodeDepth = 0
+    traceTree = False
+
+    def __init__(self, tree, filename='(none)'):
+        self.deferred = []
+        self.dead_scopes = []
+        self.messages = []
+        self.filename = filename
+        self.scopeStack = [ModuleScope()]
+        self.futuresAllowed = True
+
+        self.handleChildren(tree)
+        for handler, scope in self.deferred:
+            self.scopeStack = scope
+            handler()
+        del self.scopeStack[1:]
+        self.popScope()
+        self.check_dead_scopes()
+
+    def defer(self, callable):
+        '''Schedule something to be called after just before completion.
+
+        This is used for handling function bodies, which must be deferred
+        because code later in the file might modify the global scope. When
+        `callable` is called, the scope at the time this is called will be
+        restored, however it will contain any new bindings added to it.
+        '''
+        self.deferred.append((callable, self.scopeStack[:]))
+
+    def scope(self):
+        return self.scopeStack[-1]
+    scope = property(scope)
+
+    def popScope(self):
+        self.dead_scopes.append(self.scopeStack.pop())
+
+    def check_dead_scopes(self):
+        for scope in self.dead_scopes:
+            for importation in scope.itervalues():
+                if (isinstance(importation, Importation) and
+                    not importation.used):
+                    self.report(UnusedImport,
+                                importation.source.lineno, importation.name)
+
+    def pushFunctionScope(self):
+        self.scopeStack.append(FunctionScope())
+
+    def pushClassScope(self):
+        self.scopeStack.append(ClassScope())
+
+    def report(self, messageClass, *args, **kwargs):
+        self.messages.append(messageClass(self.filename, *args, **kwargs))
+
+    def handleChildren(self, tree):
+        for node in tree.getChildNodes():
+            self.handleNode(node)
+
+    def handleNode(self, node):
+        if self.traceTree:
+            print '  ' * self.nodeDepth + node.__class__.__name__
+        self.nodeDepth += 1
+        nodeType = node.__class__.__name__.upper()
+        if nodeType not in ('STMT', 'FROM'):
+            self.futuresAllowed = False
+        try:
+            handler = getattr(self, nodeType)
+            handler(node)
+        finally:
+            self.nodeDepth -= 1
+        if self.traceTree:
+            print '  ' * self.nodeDepth + 'end ' + node.__class__.__name__
+
+    def ignore(self, node):
+        pass
+
+    STMT = PRINT = PRINTNL = TUPLE = LIST = ASSTUPLE = ASSATTR = \
+    ASSLIST = GETATTR = SLICE = SLICEOBJ = IF = CALLFUNC = DISCARD = \
+    RETURN = ADD = MOD = SUB = NOT = UNARYSUB = INVERT = ASSERT = COMPARE = \
+    SUBSCRIPT = AND = OR = TRYEXCEPT = RAISE = YIELD = DICT = LEFTSHIFT = \
+    RIGHTSHIFT = KEYWORD = TRYFINALLY = WHILE = EXEC = MUL = DIV = POWER = \
+    FLOORDIV = BITAND = BITOR = BITXOR = LISTCOMPFOR = LISTCOMPIF = \
+    AUGASSIGN = BACKQUOTE = UNARYADD = GENEXPR = GENEXPRFOR = GENEXPRIF = \
+    IFEXP = handleChildren
+
+    CONST = PASS = CONTINUE = BREAK = ELLIPSIS = ignore
+
+    def addBinding(self, lineno, value, reportRedef=True):
+        '''Called when a binding is altered.
+
+        - `lineno` is the line of the statement responsible for the change
+        - `value` is the optional new value, a Binding instance, associated
+          with the binding; if None, the binding is deleted if it exists.
+        - if `reportRedef` is True (default), rebinding while unused will be
+          reported.
+        '''
+        if (isinstance(self.scope.get(value.name), FunctionDefinition)
+                    and isinstance(value, FunctionDefinition)):
+            self.report(RedefinedFunction,
+                        lineno, value.name,
+                        self.scope[value.name].source.lineno)
+
+        if not isinstance(self.scope, ClassScope):
+            for scope in self.scopeStack[::-1]:
+                if (isinstance(scope.get(value.name), Importation)
+                        and not scope[value.name].used
+                        and reportRedef):
+
+                    self.report(RedefinedWhileUnused,
+                                lineno, value.name,
+                                scope[value.name].source.lineno)
+
+        if isinstance(value, UnBinding):
+            try:
+                del self.scope[value.name]
+            except KeyError:
+                self.report(UndefinedName, lineno, value.name)
+        else:
+            self.scope[value.name] = value
+
+    def WITH(self, node):
+        """
+        Handle C{with} by adding bindings for the name or tuple of names it
+        puts into scope and by continuing to process the suite within the
+        statement.
+        """
+        # for "with foo as bar", there is no AssName node for "bar".
+        # Instead, there is a Name node. If the "as" expression assigns to
+        # a tuple, it will instead be a AssTuple node of Name nodes.
+        #
+        # Of course these are assignments, not references, so we have to
+        # handle them as a special case here.
+
+        self.handleNode(node.expr)
+
+        if isinstance(node.vars, ast.AssTuple):
+            varNodes = node.vars.nodes
+        elif node.vars is not None:
+            varNodes = [node.vars]
+        else:
+            varNodes = []
+
+        for varNode in varNodes:
+            self.addBinding(varNode.lineno, Assignment(varNode.name, varNode))
+
+        self.handleChildren(node.body)
+
+    def GLOBAL(self, node):
+        """
+        Keep track of globals declarations.
+        """
+        if isinstance(self.scope, FunctionScope):
+            self.scope.globals.update(dict.fromkeys(node.names))
+
+    def LISTCOMP(self, node):
+        for qual in node.quals:
+            self.handleNode(qual)
+        self.handleNode(node.expr)
+
+    GENEXPRINNER = LISTCOMP
+
+    def FOR(self, node):
+        """
+        Process bindings for loop variables.
+        """
+        vars = []
+
+        def collectLoopVars(n):
+            if hasattr(n, 'name'):
+                vars.append(n.name)
+            else:
+                for c in n.getChildNodes():
+                    collectLoopVars(c)
+
+        collectLoopVars(node.assign)
+        for varn in vars:
+            if (isinstance(self.scope.get(varn), Importation)
+                    # unused ones will get an unused import warning
+                    and self.scope[varn].used):
+                self.report(ImportShadowedByLoopVar,
+                            node.lineno, varn, self.scope[varn].source.lineno)
+
+        self.handleChildren(node)
+
+    def NAME(self, node):
+        """
+        Locate the name in locals / function / globals scopes.
+        """
+        # try local scope
+        importStarred = self.scope.importStarred
+        try:
+            self.scope[node.name].used = (self.scope, node.lineno)
+        except KeyError:
+            pass
+        else:
+            return
+
+        # try enclosing function scopes
+
+        for scope in self.scopeStack[-2:0:-1]:
+            importStarred = importStarred or scope.importStarred
+            if not isinstance(scope, FunctionScope):
+                continue
+            try:
+                scope[node.name].used = (self.scope, node.lineno)
+            except KeyError:
+                pass
+            else:
+                return
+
+        # try global scope
+
+        importStarred = importStarred or self.scopeStack[0].importStarred
+        try:
+            self.scopeStack[0][node.name].used = (self.scope, node.lineno)
+        except KeyError:
+            if ((not hasattr(__builtin__, node.name))
+                    and node.name not in ['__file__']
+                    and not importStarred):
+                self.report(UndefinedName, node.lineno, node.name)
+
+    def FUNCTION(self, node):
+        if getattr(node, "decorators", None) is not None:
+            self.handleChildren(node.decorators)
+        self.addBinding(node.lineno, FunctionDefinition(node.name, node))
+        self.LAMBDA(node)
+
+    def LAMBDA(self, node):
+        for default in node.defaults:
+            self.handleNode(default)
+
+        def runFunction():
+            args = []
+
+            def addArgs(arglist):
+                for arg in arglist:
+                    if isinstance(arg, tuple):
+                        addArgs(arg)
+                    else:
+                        if arg in args:
+                            self.report(DuplicateArgument, node.lineno, arg)
+                        args.append(arg)
+
+            self.pushFunctionScope()
+            addArgs(node.argnames)
+            for name in args:
+                self.addBinding(node.lineno, Assignment(name, node),
+                                reportRedef=False)
+            self.handleNode(node.code)
+            self.popScope()
+
+        self.defer(runFunction)
+
+    def CLASS(self, node):
+        self.addBinding(node.lineno, Assignment(node.name, node))
+        for baseNode in node.bases:
+            self.handleNode(baseNode)
+        self.pushClassScope()
+        self.handleChildren(node.code)
+        self.popScope()
+
+    def ASSNAME(self, node):
+        if node.flags == 'OP_DELETE':
+            if (isinstance(self.scope, FunctionScope) and
+                node.name in self.scope.globals):
+                del self.scope.globals[node.name]
+            else:
+                self.addBinding(node.lineno, UnBinding(node.name, node))
+        else:
+            # if the name hasn't already been defined in the current scope
+            if (isinstance(self.scope, FunctionScope) and
+                node.name not in self.scope):
+                # for each function or module scope above us
+                for scope in self.scopeStack[:-1]:
+                    if not isinstance(scope, (FunctionScope, ModuleScope)):
+                        continue
+                    # if the name was defined in that scope, and the name has
+                    # been accessed already in the current scope, and hasn't
+                    # been declared global
+                    if (node.name in scope
+                            and scope[node.name].used
+                            and scope[node.name].used[0] is self.scope
+                            and node.name not in self.scope.globals):
+                        # then it's probably a mistake
+                        self.report(UndefinedLocal,
+                                    scope[node.name].used[1],
+                                    node.name,
+                                    scope[node.name].source.lineno)
+                        break
+
+            self.addBinding(node.lineno, Assignment(node.name, node))
+
+    def ASSIGN(self, node):
+        self.handleNode(node.expr)
+        for subnode in node.nodes[::-1]:
+            self.handleNode(subnode)
+
+    def IMPORT(self, node):
+        for name, alias in node.names:
+            name = alias or name
+            importation = Importation(name, node)
+            self.addBinding(node.lineno, importation)
+
+    def FROM(self, node):
+        if node.modname == '__future__':
+            if not self.futuresAllowed:
+                self.report(LateFutureImport,
+                            node.lineno, [n[0] for n in node.names])
+        else:
+            self.futuresAllowed = False
+
+        for name, alias in node.names:
+            if name == '*':
+                self.scope.importStarred = True
+                self.report(ImportStarUsed, node.lineno, node.modname)
+                continue
+            name = alias or name
+            importation = Importation(name, node)
+            if node.modname == '__future__':
+                importation.used = (self.scope, node.lineno)
+            self.addBinding(node.lineno, importation)
+
+
+def check(codeString, filename):
+    try:
+        tree = compiler.parse(codeString)
+    except (SyntaxError, IndentationError):
+        value = sys.exc_info()[1]
+        try:
+            (lineno, offset, line) = value[1][1:]
+        except IndexError:
+            print >> sys.stderr, 'could not compile %r' % (filename, )
+            return 1
+        if line.endswith("\n"):
+            line = line[:-1]
+        print >> sys.stderr, '%s:%d: could not compile' % (filename, lineno)
+        print >> sys.stderr, line
+        print >> sys.stderr, " " * (offset-2), "^"
+        return 1
+    else:
+        w = Checker(tree, filename)
+        w.messages.sort(lambda a, b: cmp(a.lineno, b.lineno))
+        for warning in w.messages:
+            print warning
+        return len(w.messages)
+
+
+def checkPath(filename):
+    if os.path.exists(filename):
+        return check(file(filename, 'U').read(), filename)
+
+
+def main(args):
+    warnings = 0
+    if args:
+        for arg in args:
+            if os.path.isdir(arg):
+                for dirpath, dirnames, filenames in os.walk(arg):
+                    for filename in filenames:
+                        if filename.endswith('.py'):
+                            warnings += checkPath(
+                                os.path.join(dirpath, filename))
+            else:
+                warnings += checkPath(arg)
+    else:
+        warnings += check(sys.stdin.read(), '<stdin>')
+
+    return warnings > 0
+
+if __name__ == '__main__':
+    sys.exit(main(sys.argv[1:]))
diff --git a/packaging/gobject-introspection.spec b/packaging/gobject-introspection.spec
new file mode 100644 (file)
index 0000000..2ae868c
--- /dev/null
@@ -0,0 +1,293 @@
+%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+
+Name:           gobject-introspection
+Version:        1.32.1
+Release:        1%{?dist}
+Summary:        Introspection system for GObject-based libraries
+
+Group:      Development/Libraries
+License:        GPLv2+, LGPLv2+, MIT
+URL:            http://live.gnome.org/GObjectIntrospection
+#VCS:           git:git://git.gnome.org/gobject-introspection
+Source0:        http://download.gnome.org/sources/gobject-introspection/1.32/%{name}-%{version}.tar.xz
+
+Obsoletes:      gir-repository
+
+BuildRequires:  glib2-devel
+BuildRequires:  python-devel >= 2.5
+BuildRequires:  gettext
+BuildRequires:  flex
+BuildRequires:  bison
+BuildRequires:  libffi-devel
+BuildRequires:  mesa-libGL-devel
+BuildRequires:  cairo-gobject-devel
+BuildRequires:  libxml2-devel
+BuildRequires:  libXfixes-devel
+BuildRequires:  libX11-devel
+BuildRequires:  fontconfig-devel
+BuildRequires:  libXft-devel
+BuildRequires:  freetype-devel
+# Bootstrap requirements
+BuildRequires:  gnome-common
+BuildRequires:  intltool
+BuildRequires:  gtk-doc
+
+%description
+GObject Introspection can scan C header and source files in order to
+generate introspection "typelib" files.  It also provides an API to examine
+typelib files, useful for creating language bindings among other
+things.
+
+%package devel
+Summary: Libraries and headers for gobject-introspection
+Group: Development/Libraries
+Requires: %name = %{version}-%{release}
+Requires: glib2-devel
+Requires: pkgconfig
+# Not always, but whatever, it's a tiny dep to pull in
+Requires: libtool
+Obsoletes: gir-repository-devel
+
+%description devel
+Libraries and headers for gobject-introspection
+
+%prep
+%setup -q
+
+%build
+(if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; CONFIGFLAGS=--enable-gtk-doc; fi;
+ %configure $CONFIGFLAGS)
+make V=1 %{?_smp_mflags}
+
+%install
+make install DESTDIR=$RPM_BUILD_ROOT
+
+# Die libtool, die.
+find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
+find $RPM_BUILD_ROOT -type f -name "*.a" -exec rm -f {} ';'
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%doc COPYING
+
+%{_libdir}/lib*.so.*
+%dir %{_libdir}/girepository-1.0
+%{_libdir}/girepository-1.0/*.typelib
+
+%files devel
+%{_libdir}/lib*.so
+%dir %{_libdir}/gobject-introspection
+%{_libdir}/gobject-introspection/*
+%{_libdir}/pkgconfig/*
+%{_includedir}/*
+%{_bindir}/g-ir-*
+%{_datadir}/gir-1.0
+%dir %{_datadir}/gobject-introspection-1.0
+%{_datadir}/gobject-introspection-1.0/*
+%{_datadir}/aclocal/introspection.m4
+%{_mandir}/man1/*.gz
+%dir %{_datadir}/gtk-doc/html/gi
+%{_datadir}/gtk-doc/html/gi/*
+
+%changelog
+* Fri Apr 20 2012 Kalev Lember <kalevlember@gmail.com> - 1.32.1-1
+- Update to 1.32.1
+
+* Tue Mar 27 2012 Matthias Clasen <mclasen@redhat.com> 0 1.32.0-1
+- Update to 1.32.0
+
+* Wed Mar 21 2012 Matthias Clasen <mclasen@redhat.com> 0 1.31.22-1
+- Update to 1.31.22
+
+* Mon Mar  5 2012 Matthias Clasen <mclasen@redhat.com> 0 1.31.20-1
+- Update to 1.31.20
+
+* Thu Jan 19 2012 Matthias Clasen <mclasen@redhat.com> 0 1.31.10-1
+- Update to 1.31.10
+
+* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.31.6-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
+* Tue Dec 20 2011 Matthias Clasen <mclasen@redha.com> - 1.31.6-1
+- Update to 1.31.6
+
+* Mon Dec 05 2011 Karsten Hopp <karsten@redhat.com> 1.31.0-2
+- add fix for PPC failure, bugzilla 749604
+
+* Wed Nov 16 2011 Colin Walters <walters@verbum.org> - 1.31.0-2
+- -devel package requires libtool
+  https://bugzilla.redhat.com/show_bug.cgi?id=613466
+
+* Wed Nov  2 2011 Matthias Clasen <mclasen@redhat.com> - 1.31.0-1
+- Update to 1.31.0
+
+* Mon Sep 26 2011 Ray <rstrode@redhat.com> - 1.30.0-1
+- Update to 1.30.0
+
+* Tue Sep 20 2011 Matthias Clasen <mclasen@redhat.com> - 1.30.0-1
+- Update to 1.30.0
+
+* Fri Jun 17 2011 Tomas Bzatek <tbzatek@redhat.com> - 1.29.0-1
+- Update to 1.29.0
+
+* Thu Apr 21 2011 John (J5) Palmieri <johnp@redhat.com> - 0.10.8-1
+- Update to 0.10.8
+
+* Mon Apr  4 2011 Matthias Clasen <mclasen@redhat.com> - 0.10.7-1
+- Update to 0.10.7
+
+* Fri Mar 25 2011 Owen Taylor <otaylor@redhat.com> - 0.10.6-1
+- New upstream release to fix missing cairo typelib
+
+* Fri Mar 25 2011 Colin Walters <walters@verbum.org> - 0.10.5-1
+- New upstream release, fixes cairo.gir
+  Necessary to avoid gnome-shell having a cairo-devel dependency.
+- Also add cairo-gobject-devel dependency, since we really want
+  the cairo typelib to link to GObject, since anyone using
+  introspection has it anyways.
+
+* Thu Mar 10 2011 Colin Walters <walters@verbum.org> - 0.10.4-1
+- Update to 0.10.4
+
+* Wed Feb 23 2011 Colin Walters <walters@verbum.org> - 0.10.3-1
+- Update to 0.10.3
+
+* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.2-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Mon Feb  7 2011 Colin Walters <walters@verbum.org> - 0.10.2-1
+- Update to 0.10.2
+
+* Wed Jan 12 2011 Colin Walters <walters@verbum.org> - 0.10.1-1
+- Update to 0.10.1
+
+* Mon Jan 10 2011 Owen Taylor <otaylor@redhat.com> - 0.10.0-1
+- Update to 0.10.0
+
+* Thu Sep 30 2010 Colin Walters <walters@verbum.org> - 0.9.10-1
+- Update to 0.9.10
+
+* Thu Sep 30 2010 Colin Walters <walters@verbum.org> - 0.9.9-1
+- Update to 0.9.9
+
+* Wed Sep 29 2010 Matthias Clasen <mclasen@redhat.com> - 0.9.8-1
+- Update to 0.9.8
+
+* Tue Sep 28 2010 Colin Walters <walters@verbum.org> - 0.9.7-1
+- Update to 0.9.7
+
+* Tue Sep 21 2010 Owen Taylor <otaylor@redhat.com> - 0.9.6-1
+- Update to 0.9.6
+
+* Thu Sep  2 2010 Colin Walters <walters@verbum.org> - 0.9.3-6
+- Strip out test libraries; they're gone in upstream git, and
+  create a dependency on cairo (which requires libX11, which makes
+  server operating system builders freak out).
+
+* Tue Aug  3 2010 Matthias Clasen <mclasen@redhat.com> - 0.9.3-1
+- Update to 0.9.3
+
+* Mon Jul 26 2010 David Malcolm <dmalcolm@redhat.com> - 0.9.2-5
+- Cherrypick patch for python 2.7 compatibility (patch 1; rhbz#617782)
+
+* Wed Jul 14 2010 Colin Walters <walters@verbum.org> - 0.9.2-4
+- Backport patch from upstream for better errors
+
+* Mon Jul 12 2010 Colin Walters <walters@verbum.org> - 0.9.2-1
+- New upstream (unstable series) release; requires rebuilds
+
+* Tue Jun 29 2010 Colin Walters <walters@verbum.org> - 0.9.0-1.4.20100629gitf0599b0a
+- Add gtk-doc to files
+
+* Tue Jun 29 2010 Colin Walters <walters@verbum.org>
+- Switch to git snapshot; I forgot to enable gtk-doc in the last
+  tarball.
+
+* Tue Jun 29 2010 Colin Walters <walters@verbum.org> - 0.9.0-1
+- New upstream development release
+- Update to support building git snapshot directly
+
+* Thu Jun 24 2010 Colin Walters <walters@pocket> - 0.6.14-3
+- rebuild to pick up new glib changes
+
+* Thu Jun 10 2010 Colin Walters <walters@pocket> - 0.6.14-2
+- Obsolete gir-repository{,-devel}
+
+* Tue Jun  8 2010 Matthias Clasen <mclasen@redhat.com> - 0.6.14-1
+- Update to 0.6.14
+
+* Wed May 24 2010 Colin Walters <walters@verbum.org> - 0.6.12-1
+- Update to latest upstream release 0.6.12
+
+* Thu Mar 25 2010 Colin Walters <walters@verbum.org> - 0.6.9-3
+- Move python library back into /usr/lib/gobject-introspection.  I put
+  it there upstream for a reason, namely that apps need to avoid
+  polluting the global Python site-packages with bits of their internals.
+  It's not a public API.
+  
+  Possibly resolves bug #569885
+
+* Wed Mar 24 2010 Adam Miller <maxamillion@fedoraproject.org> - 0.6.9-2
+- Added newly owned files (gobject-introspection-1.0 directory)
+
+* Wed Mar 24 2010 Adam Miller <maxamillion@fedoraproject.org> - 0.6.9-1
+- Update to latest upstream release 0.6.9
+
+* Thu Mar 11 2010 Colin Walters <walters@verbum.org> - 0.6.8-0.3.20100311git2cc97351
+- rebuilt
+
+* Thu Mar 11 2010 Colin Walters <walters@verbum.org>
+- New upstream snapshot
+- rm unneeded rm
+
+* Thu Jan 28 2010 Adam Miller <maxamillion@fedoraproject.org> - 0.6.8-0.1.20100128git
+- Update to new git snapshot
+- Fix Version tag to comply with correct naming use with alphatag
+
+* Thu Jan 15 2010 Adam Miller <maxamillion@fedoraproject.org> - 0.6.7.20100115git-1
+- Update to git snapshot for rawhide 
+
+* Tue Dec 22 2009 Matthias Clasen <mclasen@redhat.com> - 0.6.7-1
+- Update to 0.6.7
+
+* Fri Sep 11 2009 Colin Walters <walters@verbum.org> - 0.6.5-1
+- New upstream
+- Drop libtool dep 
+
+* Fri Aug 28 2009 Colin Walters <walters@verbum.org> - 0.6.4-2
+- Add dep on libtool temporarily
+
+* Mon Aug 26 2009 Colin Walters <walters@verbum.org> - 0.6.4-1
+- New upstream 0.6.4
+- Drop upstreamed build fix patch 
+
+* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.3-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
+* Mon Jul  6 2009 Peter Robinson <pbrobinson@gmail.com> - 0.6.3-4
+- Add upstream patch to fix a build crash
+
+* Thu Jul  2 2009 Peter Robinson <pbrobinson@gmail.com> - 0.6.3-3
+- Add -ggdb temporarily so it compiles on ppc64
+
+* Thu Jul  2 2009 Peter Robinson <pbrobinson@gmail.com> - 0.6.3-2
+- Add the new source file
+
+* Thu Jul  2 2009 Peter Robinson <pbrobinson@gmail.com> - 0.6.3-1
+- Update to 0.6.3
+
+* Mon Jun  1 2009 Dan Williams <dcbw@redhat.com> - 0.6.2-1
+- Update to 0.6.2
+
+* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Thu Dec 11 2008 Colin Walters <walters@verbum.org> - 0.6.1-1
+- Update to 0.6.1
+
+* Fri Oct 31 2008 Colin Walters <walters@verbum.org> - 0.6.0-1
+- Create spec goo
diff --git a/scannerlexer.c b/scannerlexer.c
new file mode 100644 (file)
index 0000000..2f99ebf
--- /dev/null
@@ -0,0 +1,2840 @@
+
+#line 3 "scannerlexer.c"
+
+#define  YY_INT_ALIGNED short int
+
+/* A lexical scanner generated by flex */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+#define YY_FLEX_SUBMINOR_VERSION 36
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+/* First, we deal with  platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* end standard C headers. */
+
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types. 
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t; 
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN               (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN              (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN              (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX               (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX              (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX              (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX              (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX             (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX             (4294967295U)
+#endif
+
+#endif /* ! C99 */
+
+#endif /* ! FLEXINT_H */
+
+#ifdef __cplusplus
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else  /* ! __cplusplus */
+
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
+
+#define YY_USE_CONST
+
+#endif /* defined (__STDC__) */
+#endif /* ! __cplusplus */
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index.  If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* Enter a start condition.  This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN (yy_start) = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state.  The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START (((yy_start) - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart(yyin  )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#define YY_BUF_SIZE 16384
+#endif
+
+/* The state buf must be large enough to hold one state per character in the main buffer.
+ */
+#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+extern yy_size_t yyleng;
+
+extern FILE *yyin, *yyout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+    #define YY_LESS_LINENO(n)
+    
+/* Return all but the first "n" matched characters back to the input stream. */
+#define yyless(n) \
+       do \
+               { \
+               /* Undo effects of setting up yytext. */ \
+        int yyless_macro_arg = (n); \
+        YY_LESS_LINENO(yyless_macro_arg);\
+               *yy_cp = (yy_hold_char); \
+               YY_RESTORE_YY_MORE_OFFSET \
+               (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
+               YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+               } \
+       while ( 0 )
+
+#define unput(c) yyunput( c, (yytext_ptr)  )
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct yy_buffer_state
+       {
+       FILE *yy_input_file;
+
+       char *yy_ch_buf;                /* input buffer */
+       char *yy_buf_pos;               /* current position in input buffer */
+
+       /* Size of input buffer in bytes, not including room for EOB
+        * characters.
+        */
+       yy_size_t yy_buf_size;
+
+       /* Number of characters read into yy_ch_buf, not including EOB
+        * characters.
+        */
+       yy_size_t yy_n_chars;
+
+       /* Whether we "own" the buffer - i.e., we know we created it,
+        * and can realloc() it to grow it, and should free() it to
+        * delete it.
+        */
+       int yy_is_our_buffer;
+
+       /* Whether this is an "interactive" input source; if so, and
+        * if we're using stdio for input, then we want to use getc()
+        * instead of fread(), to make sure we stop fetching input after
+        * each newline.
+        */
+       int yy_is_interactive;
+
+       /* Whether we're considered to be at the beginning of a line.
+        * If so, '^' rules will be active on the next match, otherwise
+        * not.
+        */
+       int yy_at_bol;
+
+    int yy_bs_lineno; /**< The line count. */
+    int yy_bs_column; /**< The column count. */
+    
+       /* Whether to try to fill the input buffer when we reach the
+        * end of it.
+        */
+       int yy_fill_buffer;
+
+       int yy_buffer_status;
+
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+       /* When an EOF's been seen but there's still some text to process
+        * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+        * shouldn't try reading from the input source any more.  We might
+        * still have a bunch of tokens to match, though, because of
+        * possible backing-up.
+        *
+        * When we actually see the EOF, we change the status to "new"
+        * (via yyrestart()), so that the user can continue scanning by
+        * just pointing yyin at a new input file.
+        */
+#define YY_BUFFER_EOF_PENDING 2
+
+       };
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+/* Stack of input buffers. */
+static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
+static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
+static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ *
+ * Returns the top of the stack, or NULL.
+ */
+#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
+                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
+                          : NULL)
+
+/* Same as previous macro, but useful when we know that the buffer stack is not
+ * NULL or when we need an lvalue. For internal use only.
+ */
+#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
+
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+static yy_size_t yy_n_chars;           /* number of characters read into yy_ch_buf */
+yy_size_t yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = (char *) 0;
+static int yy_init = 0;                /* whether we need to initialize */
+static int yy_start = 0;       /* start state number */
+
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin.  A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void yyrestart (FILE *input_file  );
+void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
+YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  );
+void yy_delete_buffer (YY_BUFFER_STATE b  );
+void yy_flush_buffer (YY_BUFFER_STATE b  );
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer  );
+void yypop_buffer_state (void );
+
+static void yyensure_buffer_stack (void );
+static void yy_load_buffer_state (void );
+static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file  );
+
+#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
+
+YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  );
+YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  );
+YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len  );
+
+void *yyalloc (yy_size_t  );
+void *yyrealloc (void *,yy_size_t  );
+void yyfree (void *  );
+
+#define yy_new_buffer yy_create_buffer
+
+#define yy_set_interactive(is_interactive) \
+       { \
+       if ( ! YY_CURRENT_BUFFER ){ \
+        yyensure_buffer_stack (); \
+               YY_CURRENT_BUFFER_LVALUE =    \
+            yy_create_buffer(yyin,YY_BUF_SIZE ); \
+       } \
+       YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
+       }
+
+#define yy_set_bol(at_bol) \
+       { \
+       if ( ! YY_CURRENT_BUFFER ){\
+        yyensure_buffer_stack (); \
+               YY_CURRENT_BUFFER_LVALUE =    \
+            yy_create_buffer(yyin,YY_BUF_SIZE ); \
+       } \
+       YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
+       }
+
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+
+/* Begin user sect3 */
+
+typedef unsigned char YY_CHAR;
+
+FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+
+typedef int yy_state_type;
+
+extern int yylineno;
+
+int yylineno = 1;
+
+extern char *yytext;
+#define yytext_ptr yytext
+
+static yy_state_type yy_get_previous_state (void );
+static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
+static int yy_get_next_buffer (void );
+static void yy_fatal_error (yyconst char msg[]  );
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+       (yytext_ptr) = yy_bp; \
+       yyleng = (size_t) (yy_cp - yy_bp); \
+       (yy_hold_char) = *yy_cp; \
+       *yy_cp = '\0'; \
+       (yy_c_buf_p) = yy_cp;
+
+#define YY_NUM_RULES 121
+#define YY_END_OF_BUFFER 122
+/* This struct is not used in this scanner,
+   but its presence is necessary. */
+struct yy_trans_info
+       {
+       flex_int32_t yy_verify;
+       flex_int32_t yy_nxt;
+       };
+static yyconst flex_int16_t yy_acclist[711] =
+    {   0,
+      122,  120,  121,    3,  120,  121,    1,  121,   36,  120,
+      121,  120,  121,   11,  120,  121,   31,  120,  121,   33,
+      120,  121,  120,  121,   20,  120,  121,   21,  120,  121,
+       29,  120,  121,   27,  120,  121,   60,  120,  121,   28,
+      120,  121,   26,  120,  121,   30,  120,  121,  113,  120,
+      121,  113,  120,  121,   23,  120,  121,   22,  120,  121,
+       38,  120,  121,   37,  120,  121,   39,  120,  121,   25,
+      120,  121,   74,  110,  120,  121,   74,  110,  120,  121,
+       16,  120,  121,  120,  121,   18,  120,  121,   32,  120,
+      121,   74,  110,  120,  121,   74,  110,  120,  121,   74,
+
+      110,  120,  121,   74,  110,  120,  121,   74,  110,  120,
+      121,   74,  110,  120,  121,   74,  110,  120,  121,   74,
+      110,  120,  121,   74,  110,  120,  121,   74,  110,  120,
+      121,   74,  110,  120,  121,   74,  110,  120,  121,   74,
+      110,  120,  121,   74,  110,  120,  121,   74,  110,  120,
+      121,   74,  110,  120,  121,   12,  120,  121,   34,  120,
+      121,   14,  120,  121,   35,  120,  121,    3,    1,   53,
+      118,   44,   15,   56,   46,  116,   42,   58,   40,   59,
+       41,   61,  114,    4,    6,   43,  114,  112,  113,  113,
+      113,  113,   19,   13,   17,   48,   54,   52,   55,   49,
+
+       74,  110,    2,   45,   74,  110,   74,  110,   74,  110,
+       74,  110,   74,  110,   74,  110,   74,  110,   74,  110,
+       74,  110,   74,   83,  110,   74,  110,   74,  110,   74,
+      110,   74,  110,   74,  110,   74,  110,   74,   91,  110,
+       74,  110,   74,  110,   74,  110,   74,  110,   74,  110,
+       74,  110,   74,  110,   74,  110,   74,  110,   74,  110,
+       74,  110,   47,   57,   24,  114,    6,  112,  113,  112,
+      113,  115,  113,  113,  113,  111,   50,   51,  119,  117,
+       74,  110,   74,  110,   74,  110,   74,  110,   74,  110,
+       74,  110,   74,  110,   74,  110,   74,  110,   74,   75,
+
+      110,   74,  110,   74,  110,   74,  110,   74,  110,   74,
+      110,   74,  110,   74,  110,   74,  110,   74,  110,   74,
+      110,   74,  110,   74,   89,  110,   74,  110,   74,  110,
+       74,   93,  110,   74,  110,   74,  110,   74,  110,   74,
+      110,   74,  110,   74,  110,   74,  110,   74,  110,   74,
+      110,   74,  110,   74,  110,   74,  110,   74,  110,   74,
+      110,   74,  110,   74,  110,  114,  112,  113,  112,  113,
+      112,  113,  115,  113,  111,  111,   74,  110,   74,  110,
+       74,  110,   74,  110,   74,  110,   74,  110,   74,  110,
+       74,  110,   74,  110,   74,  110,   74,   76,  110,   74,
+
+      110,   74,   78,  110,   74,   79,  110,   74,  110,   74,
+      110,   74,  110,   74,  110,   74,   85,  110,   74,   86,
+      110,   74,  110,   74,  110,   74,   90,  110,   74,  110,
+       74,   94,  110,   74,  110,   74,  110,   74,  110,   74,
+      110,   74,  110,   74,  110,   74,  110,   74,  110,   74,
+      110,   74,  110,   74,  110,   74,  110,   74,  107,  110,
+       74,  110,   74,  110,   10,  112,  113,  111,  111,  111,
+       73,   74,  110,   62,   74,  110,   74,  110,   74,  110,
+       74,  110,   74,  110,   74,  110,   74,  110,   74,  110,
+       74,  110,   74,   77,  110,   74,   80,  110,   74,  110,
+
+       74,  110,   74,  110,   74,  110,   74,   88,  110,   74,
+      110,   74,  110,   74,  110,   74,  110,   74,   98,  110,
+       74,  110,   74,  110,   74,  110,   74,  110,   74,  110,
+       74,  110,   74,  105,  110,   74,  110,   74,  110,   74,
+      109,  110,  111,   74,  110,   74,  110,   74,  110,   74,
+      110,   74,  110,   74,  110,   74,  110,   74,  110,   74,
+      110,   74,  110,   74,  110,   74,   84,  110,   74,   87,
+      110,   74,   92,  110,   74,  110,   74,  110,   74,   97,
+      110,   74,   99,  110,   74,  100,  110,   74,  101,  110,
+       74,  102,  110,   74,  103,  110,   74,  110,   74,  110,
+
+       74,  110,    5,   63,   74,  110,   74,  110,   66,   74,
+      110,   74,  110,   74,  110,   74,  110,   74,  110,   74,
+      110,   74,  110,   74,  110,   74,   82,  110,   74,  110,
+       74,  110,   74,  104,  110,   74,  110,   74,  110,   74,
+      110,   74,  110,   68,   74,  110,   74,  110,   74,  110,
+       74,  110,   72,   74,  110,   74,   81,  110,   74,   95,
+      110,   74,   96,  110,   74,  106,  110,   74,  108,  110,
+        8,    9,   74,  110,   74,  110,   69,   74,  110,   74,
+      110,   74,  110,    7,    8,   74,  110,   74,  110,   71,
+       74,  110,   70,   74,  110,   65,   74,  110,   74,  110,
+
+       74,  110,   74,  110,   64,   74,  110,   67,   74,  110
+    } ;
+
+static yyconst flex_int16_t yy_accept[377] =
+    {   0,
+        1,    1,    1,    2,    4,    7,    9,   12,   14,   17,
+       20,   23,   25,   28,   31,   34,   37,   40,   43,   46,
+       49,   52,   55,   58,   61,   64,   67,   70,   73,   77,
+       81,   84,   86,   89,   92,   96,  100,  104,  108,  112,
+      116,  120,  124,  128,  132,  136,  140,  144,  148,  152,
+      156,  159,  162,  165,  168,  169,  170,  171,  171,  172,
+      172,  172,  172,  172,  173,  174,  175,  176,  176,  177,
+      177,  178,  179,  180,  181,  182,  183,  183,  184,  185,
+      186,  187,  188,  190,  191,  191,  192,  193,  193,  194,
+      195,  196,  197,  198,  199,  200,  201,  203,  203,  203,
+
+      204,  205,  207,  209,  211,  213,  215,  217,  219,  221,
+      223,  226,  228,  230,  232,  234,  236,  238,  241,  243,
+      245,  247,  249,  251,  253,  255,  257,  259,  261,  263,
+      264,  265,  265,  265,  265,  266,  266,  267,  267,  267,
+      268,  270,  272,  272,  273,  274,  275,  276,  277,  278,
+      279,  279,  280,  280,  280,  281,  281,  283,  285,  287,
+      289,  291,  293,  295,  297,  299,  302,  304,  306,  308,
+      310,  312,  314,  316,  318,  320,  322,  324,  327,  329,
+      331,  334,  336,  338,  340,  342,  344,  346,  348,  350,
+      352,  354,  356,  358,  360,  362,  364,  366,  366,  366,
+
+      366,  366,  367,  367,  369,  371,  373,  374,  375,  376,
+      377,  379,  381,  383,  385,  387,  389,  391,  393,  395,
+      397,  400,  402,  405,  408,  410,  412,  414,  416,  419,
+      422,  424,  426,  429,  431,  434,  436,  438,  440,  442,
+      444,  446,  448,  450,  452,  454,  456,  458,  461,  463,
+      465,  465,  466,  466,  466,  466,  468,  469,  470,  471,
+      474,  477,  479,  481,  483,  485,  487,  489,  491,  493,
+      496,  499,  501,  503,  505,  507,  510,  512,  514,  516,
+      518,  521,  523,  525,  527,  529,  531,  533,  536,  538,
+      540,  543,  543,  543,  543,  543,  544,  546,  548,  550,
+
+      552,  554,  556,  558,  560,  562,  564,  566,  569,  572,
+      575,  577,  579,  582,  585,  588,  591,  594,  597,  599,
+      601,  603,  603,  603,  604,  607,  609,  612,  614,  616,
+      618,  620,  622,  624,  626,  629,  631,  633,  636,  638,
+      640,  640,  640,  642,  644,  647,  649,  651,  653,  656,
+      659,  662,  665,  668,  671,  672,  672,  673,  675,  677,
+      680,  682,  684,  685,  686,  688,  690,  693,  696,  699,
+      701,  703,  705,  708,  711,  711
+    } ;
+
+static yyconst flex_int32_t yy_ec[256] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
+        4,    4,    4,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    5,    6,    7,    8,    1,    9,   10,   11,   12,
+       13,   14,   15,   16,   17,   18,   19,   20,   21,   21,
+       21,   21,   21,   21,   21,   22,   22,   23,   24,   25,
+       26,   27,   28,    1,   29,   30,   29,   29,   31,   32,
+       33,   33,   33,   33,   33,   34,   33,   33,   33,   33,
+       33,   33,   33,   33,   35,   33,   33,   36,   33,   33,
+       37,   38,   39,   40,   41,    1,   42,   43,   44,   45,
+
+       46,   47,   48,   49,   50,   33,   51,   52,   53,   54,
+       55,   56,   33,   57,   58,   59,   60,   61,   62,   63,
+       64,   65,   66,   67,   68,   69,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1
+    } ;
+
+static yyconst flex_int32_t yy_meta[70] =
+    {   0,
+        1,    2,    3,    1,    2,    1,    1,    1,    1,    1,
+        1,    4,    1,    1,    1,    2,    1,    1,    1,    5,
+        5,    5,    1,    1,    1,    2,    1,    1,    6,    6,
+        6,    6,    7,    7,    7,    7,    1,    1,    1,    1,
+        7,    6,    6,    6,    6,    6,    6,    7,    7,    7,
+        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
+        7,    7,    7,    7,    7,    1,    1,    1,    1
+    } ;
+
+static yyconst flex_int16_t yy_base[389] =
+    {   0,
+        0,    0,  571,  572,   68,    0,  544,   64,   69,   49,
+       67,   67,  572,  572,  543,   64,  572,   65,   63,   75,
+      108,   86,  541,  572,   86,  541,   60,  572,    0,   89,
+      572,  563,  572,  539,   58,   55,  507,   61,   72,   70,
+       79,  508,   93,  507,  515,   86,  496,  505,  503,  508,
+      572,   97,  572,  572,  147,    0,  572,  112,  572,  553,
+      135,  509,  497,  572,  572,  572,  572,  142,  572,  550,
+      572,  572,  572,  572,  572,  572,  534,  141,  164,    0,
+      572,  163,  182,  201,  209,  147,   46,    0,  572,  572,
+      572,  525,  572,  572,  572,  524,    0,  152,  154,  572,
+
+      572,  494,  206,  495,  488,  500,  487,  502,  489,  495,
+      481,  482,  479,  479,  482,  479,  476,    0,  115,  480,
+      153,  478,   93,  134,  482,  475,  120,  127,  480,  572,
+      572,  246,  482,  486,  572,  223,  572,  502,    0,    0,
+      220,  162,  237,  249,  173,  572,  239,  240,  572,  572,
+      199,  572,  523,  187,  572,  522,  469,  218,  468,  459,
+      467,  465,  473,  468,  453,    0,  461,  473,  468,  456,
+      220,  470,  468,  464,  456,  462,  465,    0,  451,  455,
+        0,  456,  453,  443,  441,  443,  445,  452,  438,  436,
+      436,  448,  438,  442,  446,  448,  437,  485,  437,  438,
+
+      264,  273,  458,  227,  572,  254,  572,  572,  263,  256,
+      432,  430,  423,  427,  421,  427,  424,  419,  428,  419,
+        0,  423,    0,    0,  414,  422,  411,  418,    0,    0,
+      412,  409,    0,  413,    0,  408,  408,  407,  404,  416,
+      406,  410,  415,  414,  412,  402,  407,    0,  395,  407,
+      449,  572,  397,  397,  297,  572,  254,  572,  269,    0,
+      408,  391,  389,  400,  395,  390,  384,  388,  395,    0,
+        0,  386,  387,  392,  383,    0,  390,  376,  384,  379,
+        0,  387,  384,  386,  370,  379,  381,    0,  372,  375,
+        0,  378,  381,  408,  402,  572,  379,  369,  359,  363,
+
+      362,  355,  357,  367,  357,  351,  351,    0,    0,    0,
+      363,  364,    0,    0,    0,    0,    0,    0,  360,  360,
+      353,  399,  398,  572,    0,  359,    0,  343,  354,  347,
+      325,  329,  305,  282,    0,  267,  263,    0,  274,  272,
+        0,  314,  256,  263,    0,  260,  266,  268,    0,    0,
+        0,    0,    0,    0,  292,  279,  572,  190,  191,    0,
+      182,  198,  572,  215,  174,  164,    0,    0,  164,  145,
+       96,   56,    0,    0,  572,  325,  332,  339,  342,  349,
+      352,  358,  365,  371,  378,  380,  387,  391
+    } ;
+
+static yyconst flex_int16_t yy_def[389] =
+    {   0,
+      375,    1,  375,  375,  375,  376,  375,  377,  375,  375,
+      375,  378,  375,  375,  375,  375,  375,  375,  375,  375,
+      375,  375,  375,  375,  375,  375,  375,  375,  379,  379,
+      375,  375,  375,  375,  379,  379,  379,  379,  379,  379,
+      379,  379,  379,  379,  379,  379,  379,  379,  379,  379,
+      375,  375,  375,  375,  375,  376,  375,  377,  375,  377,
+      375,  375,  375,  375,  375,  375,  375,  378,  375,  378,
+      375,  375,  375,  375,  375,  375,  375,  375,  375,  380,
+      375,  375,  375,  375,  375,  375,  375,  381,  375,  375,
+      375,  375,  375,  375,  375,  375,  379,  382,  383,  375,
+
+      375,  379,  379,  379,  379,  379,  379,  379,  379,  379,
+      379,  379,  379,  379,  379,  379,  379,  379,  379,  379,
+      379,  379,  379,  379,  379,  379,  379,  379,  379,  375,
+      375,  375,  375,  375,  375,  375,  375,  375,  384,  380,
+      375,  375,  375,  375,  375,  375,  375,  381,  375,  375,
+      382,  375,  382,  383,  375,  383,  379,  379,  379,  379,
+      379,  379,  379,  379,  379,  379,  379,  379,  379,  379,
+      379,  379,  379,  379,  379,  379,  379,  379,  379,  379,
+      379,  379,  379,  379,  379,  379,  379,  379,  379,  379,
+      379,  379,  379,  379,  379,  379,  379,  385,  375,  375,
+
+      375,  375,  384,  375,  375,  375,  375,  375,  375,  375,
+      379,  379,  379,  379,  379,  379,  379,  379,  379,  379,
+      379,  379,  379,  379,  379,  379,  379,  379,  379,  379,
+      379,  379,  379,  379,  379,  379,  379,  379,  379,  379,
+      379,  379,  379,  379,  379,  379,  379,  379,  379,  379,
+      385,  375,  375,  375,  375,  375,  375,  375,  375,  379,
+      379,  379,  379,  379,  379,  379,  379,  379,  379,  379,
+      379,  379,  379,  379,  379,  379,  379,  379,  379,  379,
+      379,  379,  379,  379,  379,  379,  379,  379,  379,  379,
+      379,  375,  375,  375,  375,  375,  379,  379,  379,  379,
+
+      379,  379,  379,  379,  379,  379,  379,  379,  379,  379,
+      379,  379,  379,  379,  379,  379,  379,  379,  379,  379,
+      379,  375,  375,  375,  379,  379,  379,  379,  379,  379,
+      379,  379,  379,  379,  379,  379,  379,  379,  379,  379,
+      386,  387,  379,  379,  379,  379,  379,  379,  379,  379,
+      379,  379,  379,  379,  388,  387,  375,  379,  379,  379,
+      379,  379,  375,  388,  379,  379,  379,  379,  379,  379,
+      379,  379,  379,  379,    0,  375,  375,  375,  375,  375,
+      375,  375,  375,  375,  375,  375,  375,  375
+    } ;
+
+static yyconst flex_int16_t yy_nxt[642] =
+    {   0,
+        4,    5,    6,    5,    5,    7,    8,    9,   10,   11,
+       12,   13,   14,   15,   16,   17,   18,   19,   20,   21,
+       22,   22,   23,   24,   25,   26,   27,   28,   29,   29,
+       29,   29,   29,   30,   29,   29,   31,   32,   33,   34,
+       35,   36,   37,   38,   39,   40,   41,   42,   29,   43,
+       29,   44,   29,   29,   29,   29,   45,   46,   47,   48,
+       49,   50,   29,   29,   29,   51,   52,   53,   54,   55,
+       59,   55,   55,   61,   64,   65,   66,   69,   72,  147,
+       77,   74,   78,   78,   78,   95,   96,  102,   79,   73,
+       75,   76,   67,   80,   90,   98,  374,  147,  103,   99,
+
+       81,   60,  107,   82,   70,   84,   84,   84,   91,  108,
+       92,   93,  104,   62,  105,  109,   85,  110,   59,   86,
+       87,  112,  130,  113,   63,   82,  111,   83,   83,   84,
+      115,   85,  114,  116,  122,  123,  373,   86,   85,  118,
+      187,   86,   87,   88,  124,   87,  119,  125,   55,   60,
+       55,   55,   69,   85,  132,  132,  132,  188,  152,   86,
+       78,   78,   78,  131,  155,  138,  180,   87,  138,  193,
+       88,  136,  137,  181,  137,  189,  195,  194,  196,   70,
+      145,  146,   78,   78,   78,  372,  136,  137,  139,  153,
+      190,  156,  137,  136,  137,  206,  137,  155,  145,   82,
+
+      183,   83,   83,   84,  371,  152,  146,  146,  136,  137,
+      184,  185,   85,  206,  137,  141,  142,  370,   82,  369,
+       84,   84,   84,  143,  156,  143,  363,   85,  144,  144,
+      144,   85,  146,  141,   86,   87,  153,  201,  368,  201,
+      367,  142,  202,  202,  202,  366,   85,  158,  365,  159,
+      198,  160,   86,  204,  205,  161,  144,  144,  144,  162,
+       87,  205,  163,  164,  165,  132,  132,  132,  144,  144,
+      144,  204,  208,  209,  210,  212,  213,  225,  226,  205,
+      207,  357,  207,  202,  202,  202,  205,  256,  258,  259,
+      208,  209,  202,  202,  202,  207,  257,  258,  294,  210,
+
+      207,  294,  296,  363,  137,  256,  137,  259,  362,  361,
+      295,  360,  359,  258,  257,  358,  357,  354,  353,  137,
+      296,  352,  258,  351,  137,   56,   56,  350,   56,   56,
+       56,   56,   58,   58,   58,   58,   58,   58,   58,   68,
+       68,   68,   68,   68,   68,   68,   97,   97,   97,  140,
+      140,  349,  140,  140,  140,  140,  148,  148,  151,  151,
+      151,  151,  151,  151,  151,  154,  154,  154,  154,  154,
+      154,  154,  203,  348,  347,  203,  203,  203,  251,  251,
+      251,  251,  251,  251,  251,  355,  355,  356,  356,  356,
+      356,  356,  356,  356,  364,  364,  364,  364,  346,  345,
+
+      344,  343,  342,  341,  340,  339,  338,  337,  336,  335,
+      334,  333,  332,  331,  330,  329,  328,  327,  326,  325,
+      324,  295,  323,  322,  321,  320,  319,  318,  317,  316,
+      315,  314,  313,  312,  311,  310,  309,  308,  307,  306,
+      305,  304,  303,  302,  301,  300,  299,  298,  297,  293,
+      292,  252,  291,  290,  289,  288,  287,  286,  285,  284,
+      283,  282,  281,  280,  279,  278,  277,  276,  275,  274,
+      273,  272,  271,  270,  269,  268,  267,  266,  265,  264,
+      263,  262,  261,  260,  255,  254,  253,  252,  250,  249,
+      248,  247,  246,  245,  244,  243,  242,  241,  240,  239,
+
+      238,  237,  236,  235,  234,  233,  232,  231,  230,  229,
+      228,  227,  224,  223,  222,  221,  220,  219,  218,  217,
+      216,  215,  214,  211,  375,  375,  139,  200,  199,  197,
+      192,  191,  186,  182,  179,  178,  177,  176,  175,  174,
+      173,  172,  171,  170,  169,  168,  167,  166,  157,  150,
+      149,  135,  375,  134,  133,  375,  129,  128,  127,  126,
+      121,  120,  117,  106,  101,  100,   94,   89,   71,   57,
+      375,    3,  375,  375,  375,  375,  375,  375,  375,  375,
+      375,  375,  375,  375,  375,  375,  375,  375,  375,  375,
+      375,  375,  375,  375,  375,  375,  375,  375,  375,  375,
+
+      375,  375,  375,  375,  375,  375,  375,  375,  375,  375,
+      375,  375,  375,  375,  375,  375,  375,  375,  375,  375,
+      375,  375,  375,  375,  375,  375,  375,  375,  375,  375,
+      375,  375,  375,  375,  375,  375,  375,  375,  375,  375,
+      375
+    } ;
+
+static yyconst flex_int16_t yy_chk[642] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    5,
+        8,    5,    5,    9,   10,   10,   11,   12,   16,   87,
+       19,   18,   19,   19,   19,   27,   27,   35,   20,   16,
+       18,   18,   11,   20,   25,   30,  372,   87,   35,   30,
+
+       20,    8,   38,   22,   12,   22,   22,   22,   25,   38,
+       25,   25,   36,    9,   36,   38,   22,   39,   58,   22,
+       22,   40,   52,   40,    9,   21,   39,   21,   21,   21,
+       41,   22,   40,   41,   46,   46,  371,   22,   21,   43,
+      123,   21,   21,   21,   46,   22,   43,   46,   55,   58,
+       55,   55,   68,   21,   61,   61,   61,  123,   98,   21,
+       78,   78,   78,   52,   99,   79,  119,   21,   79,  127,
+       21,   78,   78,  119,   78,  124,  128,  127,  128,   68,
+       86,   86,   82,   82,   82,  370,   78,   78,   79,   98,
+      124,   99,   78,   82,   82,  142,   82,  154,   86,   83,
+
+      121,   83,   83,   83,  369,  151,   86,  145,   82,   82,
+      121,  121,   83,  142,   82,   83,   83,  366,   84,  365,
+       84,   84,   84,   85,  154,   85,  364,   83,   85,   85,
+       85,   84,  145,   83,   84,   84,  151,  136,  362,  136,
+      361,   83,  136,  136,  136,  359,   84,  103,  358,  103,
+      132,  103,   84,  141,  141,  103,  143,  143,  143,  103,
+       84,  204,  103,  103,  103,  132,  132,  132,  144,  144,
+      144,  141,  147,  148,  148,  158,  158,  171,  171,  141,
+      144,  356,  144,  201,  201,  201,  204,  206,  257,  210,
+      147,  148,  202,  202,  202,  144,  209,  209,  255,  148,
+
+      144,  255,  259,  355,  202,  206,  202,  210,  348,  347,
+      255,  346,  344,  257,  209,  343,  342,  340,  339,  202,
+      259,  337,  209,  336,  202,  376,  376,  334,  376,  376,
+      376,  376,  377,  377,  377,  377,  377,  377,  377,  378,
+      378,  378,  378,  378,  378,  378,  379,  379,  379,  380,
+      380,  333,  380,  380,  380,  380,  381,  381,  382,  382,
+      382,  382,  382,  382,  382,  383,  383,  383,  383,  383,
+      383,  383,  384,  332,  331,  384,  384,  384,  385,  385,
+      385,  385,  385,  385,  385,  386,  386,  387,  387,  387,
+      387,  387,  387,  387,  388,  388,  388,  388,  330,  329,
+
+      328,  326,  323,  322,  321,  320,  319,  312,  311,  307,
+      306,  305,  304,  303,  302,  301,  300,  299,  298,  297,
+      295,  294,  293,  292,  290,  289,  287,  286,  285,  284,
+      283,  282,  280,  279,  278,  277,  275,  274,  273,  272,
+      269,  268,  267,  266,  265,  264,  263,  262,  261,  254,
+      253,  251,  250,  249,  247,  246,  245,  244,  243,  242,
+      241,  240,  239,  238,  237,  236,  234,  232,  231,  228,
+      227,  226,  225,  222,  220,  219,  218,  217,  216,  215,
+      214,  213,  212,  211,  203,  200,  199,  198,  197,  196,
+      195,  194,  193,  192,  191,  190,  189,  188,  187,  186,
+
+      185,  184,  183,  182,  180,  179,  177,  176,  175,  174,
+      173,  172,  170,  169,  168,  167,  165,  164,  163,  162,
+      161,  160,  159,  157,  156,  153,  138,  134,  133,  129,
+      126,  125,  122,  120,  117,  116,  115,  114,  113,  112,
+      111,  110,  109,  108,  107,  106,  105,  104,  102,   96,
+       92,   77,   70,   63,   62,   60,   50,   49,   48,   47,
+       45,   44,   42,   37,   34,   32,   26,   23,   15,    7,
+        3,  375,  375,  375,  375,  375,  375,  375,  375,  375,
+      375,  375,  375,  375,  375,  375,  375,  375,  375,  375,
+      375,  375,  375,  375,  375,  375,  375,  375,  375,  375,
+
+      375,  375,  375,  375,  375,  375,  375,  375,  375,  375,
+      375,  375,  375,  375,  375,  375,  375,  375,  375,  375,
+      375,  375,  375,  375,  375,  375,  375,  375,  375,  375,
+      375,  375,  375,  375,  375,  375,  375,  375,  375,  375,
+      375
+    } ;
+
+extern int yy_flex_debug;
+int yy_flex_debug = 0;
+
+static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
+static char *yy_full_match;
+static int yy_lp;
+#define REJECT \
+{ \
+*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \
+yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
+++(yy_lp); \
+goto find_rule; \
+}
+
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+char *yytext;
+#line 1 "scannerlexer.l"
+/* -*- Mode: C -*-
+ * GObject introspection: C lexer
+ *
+ * Copyright (c) 1997 Sandro Sigala  <ssigala@globalnet.it>
+ * Copyright (c) 2007-2008 Jürg Billeter  <j@bitron.ch>
+ * Copyright (c) 2010 Andreas Rottmann <a.rottmann@gmx.at>
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#line 32 "scannerlexer.l"
+#include <ctype.h>
+#include <stdio.h>
+
+#include <glib.h>
+#include "sourcescanner.h"
+#include "scannerparser.h"
+#include "grealpath.h"
+
+int lineno;
+char linebuf[2000];
+
+#undef YY_BUF_SIZE
+#define YY_BUF_SIZE 1048576
+
+extern int yylex (GISourceScanner *scanner);
+#define YY_DECL int yylex (GISourceScanner *scanner)
+static int yywrap (void);
+static void parse_comment (GISourceScanner *scanner);
+static void parse_trigraph (GISourceScanner *scanner);
+static void process_linemarks (GISourceScanner *scanner);
+static int check_identifier (GISourceScanner *scanner, const char *);
+static int parse_ignored_macro (void);
+#line 856 "scannerlexer.c"
+
+#define INITIAL 0
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
+#endif
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+static int yy_init_globals (void );
+
+/* Accessor methods to globals.
+   These are made visible to non-reentrant scanners for convenience. */
+
+int yylex_destroy (void );
+
+int yyget_debug (void );
+
+void yyset_debug (int debug_flag  );
+
+YY_EXTRA_TYPE yyget_extra (void );
+
+void yyset_extra (YY_EXTRA_TYPE user_defined  );
+
+FILE *yyget_in (void );
+
+void yyset_in  (FILE * in_str  );
+
+FILE *yyget_out (void );
+
+void yyset_out  (FILE * out_str  );
+
+yy_size_t yyget_leng (void );
+
+char *yyget_text (void );
+
+int yyget_lineno (void );
+
+void yyset_lineno (int line_number  );
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap (void );
+#else
+extern int yywrap (void );
+#endif
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char *,yyconst char *,int );
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (yyconst char * );
+#endif
+
+#ifndef YY_NO_INPUT
+
+#ifdef __cplusplus
+static int yyinput (void );
+#else
+static int input (void );
+#endif
+
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO fwrite( yytext, yyleng, 1, yyout )
+#endif
+
+/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+       if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
+               { \
+               int c = '*'; \
+               size_t n; \
+               for ( n = 0; n < max_size && \
+                            (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+                       buf[n] = (char) c; \
+               if ( c == '\n' ) \
+                       buf[n++] = (char) c; \
+               if ( c == EOF && ferror( yyin ) ) \
+                       YY_FATAL_ERROR( "input in flex scanner failed" ); \
+               result = n; \
+               } \
+       else \
+               { \
+               errno=0; \
+               while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
+                       { \
+                       if( errno != EINTR) \
+                               { \
+                               YY_FATAL_ERROR( "input in flex scanner failed" ); \
+                               break; \
+                               } \
+                       errno=0; \
+                       clearerr(yyin); \
+                       } \
+               }\
+\
+
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+#endif
+
+/* end tables serialization structures and prototypes */
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+
+extern int yylex (void);
+
+#define YY_DECL int yylex (void)
+#endif /* !YY_DECL */
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+#define YY_RULE_SETUP \
+       YY_USER_ACTION
+
+/** The main scanner function which does all the work.
+ */
+YY_DECL
+{
+       register yy_state_type yy_current_state;
+       register char *yy_cp, *yy_bp;
+       register int yy_act;
+    
+#line 65 "scannerlexer.l"
+
+
+#line 1039 "scannerlexer.c"
+
+       if ( !(yy_init) )
+               {
+               (yy_init) = 1;
+
+#ifdef YY_USER_INIT
+               YY_USER_INIT;
+#endif
+
+        /* Create the reject buffer large enough to save one state per allowed character. */
+        if ( ! (yy_state_buf) )
+            (yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE  );
+            if ( ! (yy_state_buf) )
+                YY_FATAL_ERROR( "out of dynamic memory in yylex()" );
+
+               if ( ! (yy_start) )
+                       (yy_start) = 1; /* first start state */
+
+               if ( ! yyin )
+                       yyin = stdin;
+
+               if ( ! yyout )
+                       yyout = stdout;
+
+               if ( ! YY_CURRENT_BUFFER ) {
+                       yyensure_buffer_stack ();
+                       YY_CURRENT_BUFFER_LVALUE =
+                               yy_create_buffer(yyin,YY_BUF_SIZE );
+               }
+
+               yy_load_buffer_state( );
+               }
+
+       while ( 1 )             /* loops until end-of-file is reached */
+               {
+               yy_cp = (yy_c_buf_p);
+
+               /* Support of yytext. */
+               *yy_cp = (yy_hold_char);
+
+               /* yy_bp points to the position in yy_ch_buf of the start of
+                * the current run.
+                */
+               yy_bp = yy_cp;
+
+               yy_current_state = (yy_start);
+
+               (yy_state_ptr) = (yy_state_buf);
+               *(yy_state_ptr)++ = yy_current_state;
+
+yy_match:
+               do
+                       {
+                       register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+                       while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+                               {
+                               yy_current_state = (int) yy_def[yy_current_state];
+                               if ( yy_current_state >= 376 )
+                                       yy_c = yy_meta[(unsigned int) yy_c];
+                               }
+                       yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+                       *(yy_state_ptr)++ = yy_current_state;
+                       ++yy_cp;
+                       }
+               while ( yy_base[yy_current_state] != 572 );
+
+yy_find_action:
+               yy_current_state = *--(yy_state_ptr);
+               (yy_lp) = yy_accept[yy_current_state];
+find_rule: /* we branch to this label when backing up */
+               for ( ; ; ) /* until we find what rule we matched */
+                       {
+                       if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
+                               {
+                               yy_act = yy_acclist[(yy_lp)];
+                                       {
+                                       (yy_full_match) = yy_cp;
+                                       break;
+                                       }
+                               }
+                       --yy_cp;
+                       yy_current_state = *--(yy_state_ptr);
+                       (yy_lp) = yy_accept[yy_current_state];
+                       }
+
+               YY_DO_BEFORE_ACTION;
+
+do_action:     /* This label is used only to access EOF actions. */
+
+               switch ( yy_act )
+       { /* beginning of action switch */
+case 1:
+/* rule 1 can match eol */
+YY_RULE_SETUP
+#line 67 "scannerlexer.l"
+{ strncpy(linebuf, yytext+1, sizeof(linebuf)); /* save the next line */
+                                               linebuf[sizeof(linebuf)-1]='\0';
+                                               /* printf("%4d:%s\n",lineno,linebuf); */
+                                               yyless(1);      /* give back all but the \n to rescan */
+                                               ++lineno;
+                                       }
+       YY_BREAK
+case 2:
+/* rule 2 can match eol */
+YY_RULE_SETUP
+#line 73 "scannerlexer.l"
+{ ++lineno; }
+       YY_BREAK
+case 3:
+YY_RULE_SETUP
+#line 74 "scannerlexer.l"
+{ /* Ignore whitespace. */ }
+       YY_BREAK
+case 4:
+YY_RULE_SETUP
+#line 76 "scannerlexer.l"
+{ parse_comment(scanner); }
+       YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 77 "scannerlexer.l"
+{ parse_trigraph(scanner); }
+       YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 78 "scannerlexer.l"
+{ }
+       YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 80 "scannerlexer.l"
+{ yyless (yyleng - 1); return FUNCTION_MACRO; }
+       YY_BREAK
+case 8:
+YY_RULE_SETUP
+#line 81 "scannerlexer.l"
+{ return OBJECT_MACRO; }
+       YY_BREAK
+case 9:
+/* rule 9 can match eol */
+YY_RULE_SETUP
+#line 82 "scannerlexer.l"
+{ /* Ignore pragma. */ }
+       YY_BREAK
+case 10:
+/* rule 10 can match eol */
+YY_RULE_SETUP
+#line 84 "scannerlexer.l"
+{ process_linemarks(scanner); }
+       YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 85 "scannerlexer.l"
+{ }
+       YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 86 "scannerlexer.l"
+{ return '{'; }
+       YY_BREAK
+case 13:
+YY_RULE_SETUP
+#line 87 "scannerlexer.l"
+{ return '{'; }
+       YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 88 "scannerlexer.l"
+{ return '}'; }
+       YY_BREAK
+case 15:
+YY_RULE_SETUP
+#line 89 "scannerlexer.l"
+{ return '}'; }
+       YY_BREAK
+case 16:
+YY_RULE_SETUP
+#line 90 "scannerlexer.l"
+{ return '['; }
+       YY_BREAK
+case 17:
+YY_RULE_SETUP
+#line 91 "scannerlexer.l"
+{ return '['; }
+       YY_BREAK
+case 18:
+YY_RULE_SETUP
+#line 92 "scannerlexer.l"
+{ return ']'; }
+       YY_BREAK
+case 19:
+YY_RULE_SETUP
+#line 93 "scannerlexer.l"
+{ return ']'; }
+       YY_BREAK
+case 20:
+YY_RULE_SETUP
+#line 94 "scannerlexer.l"
+{ return '('; }
+       YY_BREAK
+case 21:
+YY_RULE_SETUP
+#line 95 "scannerlexer.l"
+{ return ')'; }
+       YY_BREAK
+case 22:
+YY_RULE_SETUP
+#line 96 "scannerlexer.l"
+{ return ';'; }
+       YY_BREAK
+case 23:
+YY_RULE_SETUP
+#line 97 "scannerlexer.l"
+{ return ':'; }
+       YY_BREAK
+case 24:
+YY_RULE_SETUP
+#line 98 "scannerlexer.l"
+{ return ELLIPSIS; }
+       YY_BREAK
+case 25:
+YY_RULE_SETUP
+#line 99 "scannerlexer.l"
+{ return '?'; }
+       YY_BREAK
+case 26:
+YY_RULE_SETUP
+#line 100 "scannerlexer.l"
+{ return '.'; }
+       YY_BREAK
+case 27:
+YY_RULE_SETUP
+#line 101 "scannerlexer.l"
+{ return '+'; }
+       YY_BREAK
+case 28:
+YY_RULE_SETUP
+#line 102 "scannerlexer.l"
+{ return '-'; }
+       YY_BREAK
+case 29:
+YY_RULE_SETUP
+#line 103 "scannerlexer.l"
+{ return '*'; }
+       YY_BREAK
+case 30:
+YY_RULE_SETUP
+#line 104 "scannerlexer.l"
+{ return '/'; }
+       YY_BREAK
+case 31:
+YY_RULE_SETUP
+#line 105 "scannerlexer.l"
+{ return '%'; }
+       YY_BREAK
+case 32:
+YY_RULE_SETUP
+#line 106 "scannerlexer.l"
+{ return '^'; }
+       YY_BREAK
+case 33:
+YY_RULE_SETUP
+#line 107 "scannerlexer.l"
+{ return '&'; }
+       YY_BREAK
+case 34:
+YY_RULE_SETUP
+#line 108 "scannerlexer.l"
+{ return '|'; }
+       YY_BREAK
+case 35:
+YY_RULE_SETUP
+#line 109 "scannerlexer.l"
+{ return '~'; }
+       YY_BREAK
+case 36:
+YY_RULE_SETUP
+#line 110 "scannerlexer.l"
+{ return '!'; }
+       YY_BREAK
+case 37:
+YY_RULE_SETUP
+#line 111 "scannerlexer.l"
+{ return '='; }
+       YY_BREAK
+case 38:
+YY_RULE_SETUP
+#line 112 "scannerlexer.l"
+{ return '<'; }
+       YY_BREAK
+case 39:
+YY_RULE_SETUP
+#line 113 "scannerlexer.l"
+{ return '>'; }
+       YY_BREAK
+case 40:
+YY_RULE_SETUP
+#line 114 "scannerlexer.l"
+{ return ADDEQ; }
+       YY_BREAK
+case 41:
+YY_RULE_SETUP
+#line 115 "scannerlexer.l"
+{ return SUBEQ; }
+       YY_BREAK
+case 42:
+YY_RULE_SETUP
+#line 116 "scannerlexer.l"
+{ return MULEQ; }
+       YY_BREAK
+case 43:
+YY_RULE_SETUP
+#line 117 "scannerlexer.l"
+{ return DIVEQ; }
+       YY_BREAK
+case 44:
+YY_RULE_SETUP
+#line 118 "scannerlexer.l"
+{ return MODEQ; }
+       YY_BREAK
+case 45:
+YY_RULE_SETUP
+#line 119 "scannerlexer.l"
+{ return XOREQ; }
+       YY_BREAK
+case 46:
+YY_RULE_SETUP
+#line 120 "scannerlexer.l"
+{ return ANDEQ; }
+       YY_BREAK
+case 47:
+YY_RULE_SETUP
+#line 121 "scannerlexer.l"
+{ return OREQ; }
+       YY_BREAK
+case 48:
+YY_RULE_SETUP
+#line 122 "scannerlexer.l"
+{ return SL; }
+       YY_BREAK
+case 49:
+YY_RULE_SETUP
+#line 123 "scannerlexer.l"
+{ return SR; }
+       YY_BREAK
+case 50:
+YY_RULE_SETUP
+#line 124 "scannerlexer.l"
+{ return SLEQ; }
+       YY_BREAK
+case 51:
+YY_RULE_SETUP
+#line 125 "scannerlexer.l"
+{ return SREQ; }
+       YY_BREAK
+case 52:
+YY_RULE_SETUP
+#line 126 "scannerlexer.l"
+{ return EQ; }
+       YY_BREAK
+case 53:
+YY_RULE_SETUP
+#line 127 "scannerlexer.l"
+{ return NOTEQ; }
+       YY_BREAK
+case 54:
+YY_RULE_SETUP
+#line 128 "scannerlexer.l"
+{ return LTEQ; }
+       YY_BREAK
+case 55:
+YY_RULE_SETUP
+#line 129 "scannerlexer.l"
+{ return GTEQ; }
+       YY_BREAK
+case 56:
+YY_RULE_SETUP
+#line 130 "scannerlexer.l"
+{ return ANDAND; }
+       YY_BREAK
+case 57:
+YY_RULE_SETUP
+#line 131 "scannerlexer.l"
+{ return OROR; }
+       YY_BREAK
+case 58:
+YY_RULE_SETUP
+#line 132 "scannerlexer.l"
+{ return PLUSPLUS; }
+       YY_BREAK
+case 59:
+YY_RULE_SETUP
+#line 133 "scannerlexer.l"
+{ return MINUSMINUS; }
+       YY_BREAK
+case 60:
+YY_RULE_SETUP
+#line 134 "scannerlexer.l"
+{ return ','; }
+       YY_BREAK
+case 61:
+YY_RULE_SETUP
+#line 135 "scannerlexer.l"
+{ return ARROW; }
+       YY_BREAK
+case 62:
+YY_RULE_SETUP
+#line 137 "scannerlexer.l"
+{ if (!parse_ignored_macro()) REJECT; }
+       YY_BREAK
+case 63:
+YY_RULE_SETUP
+#line 138 "scannerlexer.l"
+{ if (!parse_ignored_macro()) REJECT; }
+       YY_BREAK
+case 64:
+YY_RULE_SETUP
+#line 139 "scannerlexer.l"
+{ if (!parse_ignored_macro()) REJECT; }
+       YY_BREAK
+case 65:
+YY_RULE_SETUP
+#line 140 "scannerlexer.l"
+{ if (!parse_ignored_macro()) REJECT; }
+       YY_BREAK
+case 66:
+YY_RULE_SETUP
+#line 141 "scannerlexer.l"
+{ return CONST; }
+       YY_BREAK
+case 67:
+YY_RULE_SETUP
+#line 142 "scannerlexer.l"
+{ return EXTENSION; }
+       YY_BREAK
+case 68:
+YY_RULE_SETUP
+#line 143 "scannerlexer.l"
+{ return INLINE; }
+       YY_BREAK
+case 69:
+YY_RULE_SETUP
+#line 144 "scannerlexer.l"
+{ if (!parse_ignored_macro()) REJECT; }
+       YY_BREAK
+case 70:
+YY_RULE_SETUP
+#line 145 "scannerlexer.l"
+{ return SIGNED; }
+       YY_BREAK
+case 71:
+YY_RULE_SETUP
+#line 146 "scannerlexer.l"
+{ return RESTRICT; }
+       YY_BREAK
+case 72:
+YY_RULE_SETUP
+#line 147 "scannerlexer.l"
+{ if (!parse_ignored_macro()) REJECT; }
+       YY_BREAK
+case 73:
+YY_RULE_SETUP
+#line 148 "scannerlexer.l"
+{ return BOOL; }
+       YY_BREAK
+case 74:
+YY_RULE_SETUP
+#line 150 "scannerlexer.l"
+{ if (scanner->macro_scan) return IDENTIFIER; else REJECT; }
+       YY_BREAK
+case 75:
+YY_RULE_SETUP
+#line 152 "scannerlexer.l"
+{ if (!parse_ignored_macro()) REJECT; }
+       YY_BREAK
+case 76:
+YY_RULE_SETUP
+#line 153 "scannerlexer.l"
+{ return AUTO; }
+       YY_BREAK
+case 77:
+YY_RULE_SETUP
+#line 154 "scannerlexer.l"
+{ return BREAK; }
+       YY_BREAK
+case 78:
+YY_RULE_SETUP
+#line 155 "scannerlexer.l"
+{ return CASE; }
+       YY_BREAK
+case 79:
+YY_RULE_SETUP
+#line 156 "scannerlexer.l"
+{ return CHAR; }
+       YY_BREAK
+case 80:
+YY_RULE_SETUP
+#line 157 "scannerlexer.l"
+{ return CONST; }
+       YY_BREAK
+case 81:
+YY_RULE_SETUP
+#line 158 "scannerlexer.l"
+{ return CONTINUE; }
+       YY_BREAK
+case 82:
+YY_RULE_SETUP
+#line 159 "scannerlexer.l"
+{ return DEFAULT; }
+       YY_BREAK
+case 83:
+YY_RULE_SETUP
+#line 160 "scannerlexer.l"
+{ return DO; }
+       YY_BREAK
+case 84:
+YY_RULE_SETUP
+#line 161 "scannerlexer.l"
+{ return DOUBLE; }
+       YY_BREAK
+case 85:
+YY_RULE_SETUP
+#line 162 "scannerlexer.l"
+{ return ELSE; }
+       YY_BREAK
+case 86:
+YY_RULE_SETUP
+#line 163 "scannerlexer.l"
+{ return ENUM; }
+       YY_BREAK
+case 87:
+YY_RULE_SETUP
+#line 164 "scannerlexer.l"
+{ return EXTERN; }
+       YY_BREAK
+case 88:
+YY_RULE_SETUP
+#line 165 "scannerlexer.l"
+{ return FLOAT; }
+       YY_BREAK
+case 89:
+YY_RULE_SETUP
+#line 166 "scannerlexer.l"
+{ return FOR; }
+       YY_BREAK
+case 90:
+YY_RULE_SETUP
+#line 167 "scannerlexer.l"
+{ return GOTO; }
+       YY_BREAK
+case 91:
+YY_RULE_SETUP
+#line 168 "scannerlexer.l"
+{ return IF; }
+       YY_BREAK
+case 92:
+YY_RULE_SETUP
+#line 169 "scannerlexer.l"
+{ return INLINE; }
+       YY_BREAK
+case 93:
+YY_RULE_SETUP
+#line 170 "scannerlexer.l"
+{ return INT; }
+       YY_BREAK
+case 94:
+YY_RULE_SETUP
+#line 171 "scannerlexer.l"
+{ return LONG; }
+       YY_BREAK
+case 95:
+YY_RULE_SETUP
+#line 172 "scannerlexer.l"
+{ return REGISTER; }
+       YY_BREAK
+case 96:
+YY_RULE_SETUP
+#line 173 "scannerlexer.l"
+{ return RESTRICT; }
+       YY_BREAK
+case 97:
+YY_RULE_SETUP
+#line 174 "scannerlexer.l"
+{ return RETURN; }
+       YY_BREAK
+case 98:
+YY_RULE_SETUP
+#line 175 "scannerlexer.l"
+{ return SHORT; }
+       YY_BREAK
+case 99:
+YY_RULE_SETUP
+#line 176 "scannerlexer.l"
+{ return SIGNED; }
+       YY_BREAK
+case 100:
+YY_RULE_SETUP
+#line 177 "scannerlexer.l"
+{ return SIZEOF; }
+       YY_BREAK
+case 101:
+YY_RULE_SETUP
+#line 178 "scannerlexer.l"
+{ return STATIC; }
+       YY_BREAK
+case 102:
+YY_RULE_SETUP
+#line 179 "scannerlexer.l"
+{ return STRUCT; }
+       YY_BREAK
+case 103:
+YY_RULE_SETUP
+#line 180 "scannerlexer.l"
+{ return SWITCH; }
+       YY_BREAK
+case 104:
+YY_RULE_SETUP
+#line 181 "scannerlexer.l"
+{ return TYPEDEF; }
+       YY_BREAK
+case 105:
+YY_RULE_SETUP
+#line 182 "scannerlexer.l"
+{ return UNION; }
+       YY_BREAK
+case 106:
+YY_RULE_SETUP
+#line 183 "scannerlexer.l"
+{ return UNSIGNED; }
+       YY_BREAK
+case 107:
+YY_RULE_SETUP
+#line 184 "scannerlexer.l"
+{ return VOID; }
+       YY_BREAK
+case 108:
+YY_RULE_SETUP
+#line 185 "scannerlexer.l"
+{ return VOLATILE; }
+       YY_BREAK
+case 109:
+YY_RULE_SETUP
+#line 186 "scannerlexer.l"
+{ return WHILE; }
+       YY_BREAK
+case 110:
+YY_RULE_SETUP
+#line 188 "scannerlexer.l"
+{ return check_identifier(scanner, yytext); }
+       YY_BREAK
+case 111:
+YY_RULE_SETUP
+#line 190 "scannerlexer.l"
+{ return INTEGER; }
+       YY_BREAK
+case 112:
+YY_RULE_SETUP
+#line 191 "scannerlexer.l"
+{ return INTEGER; }
+       YY_BREAK
+case 113:
+YY_RULE_SETUP
+#line 192 "scannerlexer.l"
+{ return INTEGER; }
+       YY_BREAK
+case 114:
+YY_RULE_SETUP
+#line 194 "scannerlexer.l"
+{ return FLOATING; }
+       YY_BREAK
+case 115:
+YY_RULE_SETUP
+#line 195 "scannerlexer.l"
+{ return FLOATING; }
+       YY_BREAK
+case 116:
+/* rule 116 can match eol */
+YY_RULE_SETUP
+#line 197 "scannerlexer.l"
+{ return CHARACTER; }
+       YY_BREAK
+case 117:
+/* rule 117 can match eol */
+YY_RULE_SETUP
+#line 198 "scannerlexer.l"
+{ return CHARACTER; }
+       YY_BREAK
+case 118:
+/* rule 118 can match eol */
+YY_RULE_SETUP
+#line 200 "scannerlexer.l"
+{ return STRING; }
+       YY_BREAK
+case 119:
+/* rule 119 can match eol */
+YY_RULE_SETUP
+#line 201 "scannerlexer.l"
+{ return STRING; }
+       YY_BREAK
+case 120:
+YY_RULE_SETUP
+#line 203 "scannerlexer.l"
+{ if (yytext[0]) fprintf(stderr, "%s:%d: unexpected character `%c'\n", scanner->current_filename, lineno, yytext[0]); }
+       YY_BREAK
+case 121:
+YY_RULE_SETUP
+#line 205 "scannerlexer.l"
+ECHO;
+       YY_BREAK
+#line 1749 "scannerlexer.c"
+                       case YY_STATE_EOF(INITIAL):
+                               yyterminate();
+
+       case YY_END_OF_BUFFER:
+               {
+               /* Amount of text matched not including the EOB char. */
+               int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
+
+               /* Undo the effects of YY_DO_BEFORE_ACTION. */
+               *yy_cp = (yy_hold_char);
+               YY_RESTORE_YY_MORE_OFFSET
+
+               if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
+                       {
+                       /* We're scanning a new file or input source.  It's
+                        * possible that this happened because the user
+                        * just pointed yyin at a new source and called
+                        * yylex().  If so, then we have to assure
+                        * consistency between YY_CURRENT_BUFFER and our
+                        * globals.  Here is the right place to do so, because
+                        * this is the first action (other than possibly a
+                        * back-up) that will match for the new input source.
+                        */
+                       (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+                       YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
+                       YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
+                       }
+
+               /* Note that here we test for yy_c_buf_p "<=" to the position
+                * of the first EOB in the buffer, since yy_c_buf_p will
+                * already have been incremented past the NUL character
+                * (since all states make transitions on EOB to the
+                * end-of-buffer state).  Contrast this with the test
+                * in input().
+                */
+               if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+                       { /* This was really a NUL. */
+                       yy_state_type yy_next_state;
+
+                       (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
+
+                       yy_current_state = yy_get_previous_state(  );
+
+                       /* Okay, we're now positioned to make the NUL
+                        * transition.  We couldn't have
+                        * yy_get_previous_state() go ahead and do it
+                        * for us because it doesn't know how to deal
+                        * with the possibility of jamming (and we don't
+                        * want to build jamming into it because then it
+                        * will run more slowly).
+                        */
+
+                       yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+                       yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+
+                       if ( yy_next_state )
+                               {
+                               /* Consume the NUL. */
+                               yy_cp = ++(yy_c_buf_p);
+                               yy_current_state = yy_next_state;
+                               goto yy_match;
+                               }
+
+                       else
+                               {
+                               yy_cp = (yy_c_buf_p);
+                               goto yy_find_action;
+                               }
+                       }
+
+               else switch ( yy_get_next_buffer(  ) )
+                       {
+                       case EOB_ACT_END_OF_FILE:
+                               {
+                               (yy_did_buffer_switch_on_eof) = 0;
+
+                               if ( yywrap( ) )
+                                       {
+                                       /* Note: because we've taken care in
+                                        * yy_get_next_buffer() to have set up
+                                        * yytext, we can now set up
+                                        * yy_c_buf_p so that if some total
+                                        * hoser (like flex itself) wants to
+                                        * call the scanner after we return the
+                                        * YY_NULL, it'll still work - another
+                                        * YY_NULL will get returned.
+                                        */
+                                       (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
+
+                                       yy_act = YY_STATE_EOF(YY_START);
+                                       goto do_action;
+                                       }
+
+                               else
+                                       {
+                                       if ( ! (yy_did_buffer_switch_on_eof) )
+                                               YY_NEW_FILE;
+                                       }
+                               break;
+                               }
+
+                       case EOB_ACT_CONTINUE_SCAN:
+                               (yy_c_buf_p) =
+                                       (yytext_ptr) + yy_amount_of_matched_text;
+
+                               yy_current_state = yy_get_previous_state(  );
+
+                               yy_cp = (yy_c_buf_p);
+                               yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+                               goto yy_match;
+
+                       case EOB_ACT_LAST_MATCH:
+                               (yy_c_buf_p) =
+                               &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
+
+                               yy_current_state = yy_get_previous_state(  );
+
+                               yy_cp = (yy_c_buf_p);
+                               yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+                               goto yy_find_action;
+                       }
+               break;
+               }
+
+       default:
+               YY_FATAL_ERROR(
+                       "fatal flex scanner internal error--no action found" );
+       } /* end of action switch */
+               } /* end of scanning one token */
+} /* end of yylex */
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ *     EOB_ACT_LAST_MATCH -
+ *     EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ *     EOB_ACT_END_OF_FILE - end of file
+ */
+static int yy_get_next_buffer (void)
+{
+       register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+       register char *source = (yytext_ptr);
+       register int number_to_move, i;
+       int ret_val;
+
+       if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
+               YY_FATAL_ERROR(
+               "fatal flex scanner internal error--end of buffer missed" );
+
+       if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
+               { /* Don't try to fill the buffer, so this is an EOF. */
+               if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
+                       {
+                       /* We matched a single character, the EOB, so
+                        * treat this as a final EOF.
+                        */
+                       return EOB_ACT_END_OF_FILE;
+                       }
+
+               else
+                       {
+                       /* We matched some text prior to the EOB, first
+                        * process it.
+                        */
+                       return EOB_ACT_LAST_MATCH;
+                       }
+               }
+
+       /* Try to read more data. */
+
+       /* First move last chars to start of buffer. */
+       number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+
+       for ( i = 0; i < number_to_move; ++i )
+               *(dest++) = *(source++);
+
+       if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+               /* don't do the read, it's not guaranteed to return an EOF,
+                * just force an EOF
+                */
+               YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
+
+       else
+               {
+                       yy_size_t num_to_read =
+                       YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+
+               while ( num_to_read <= 0 )
+                       { /* Not enough room in the buffer - grow it. */
+
+                       YY_FATAL_ERROR(
+"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+
+                       }
+
+               if ( num_to_read > YY_READ_BUF_SIZE )
+                       num_to_read = YY_READ_BUF_SIZE;
+
+               /* Read in more data. */
+               YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+                       (yy_n_chars), num_to_read );
+
+               YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+               }
+
+       if ( (yy_n_chars) == 0 )
+               {
+               if ( number_to_move == YY_MORE_ADJ )
+                       {
+                       ret_val = EOB_ACT_END_OF_FILE;
+                       yyrestart(yyin  );
+                       }
+
+               else
+                       {
+                       ret_val = EOB_ACT_LAST_MATCH;
+                       YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
+                               YY_BUFFER_EOF_PENDING;
+                       }
+               }
+
+       else
+               ret_val = EOB_ACT_CONTINUE_SCAN;
+
+       if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+               /* Extend the array by 50%, plus the number we really need. */
+               yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+               YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
+               if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+                       YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+       }
+
+       (yy_n_chars) += number_to_move;
+       YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
+       YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
+
+       (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
+
+       return ret_val;
+}
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+    static yy_state_type yy_get_previous_state (void)
+{
+       register yy_state_type yy_current_state;
+       register char *yy_cp;
+    
+       yy_current_state = (yy_start);
+
+       (yy_state_ptr) = (yy_state_buf);
+       *(yy_state_ptr)++ = yy_current_state;
+
+       for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
+               {
+               register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+               while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+                       {
+                       yy_current_state = (int) yy_def[yy_current_state];
+                       if ( yy_current_state >= 376 )
+                               yy_c = yy_meta[(unsigned int) yy_c];
+                       }
+               yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+               *(yy_state_ptr)++ = yy_current_state;
+               }
+
+       return yy_current_state;
+}
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ *     next_state = yy_try_NUL_trans( current_state );
+ */
+    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
+{
+       register int yy_is_jam;
+    
+       register YY_CHAR yy_c = 1;
+       while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+               {
+               yy_current_state = (int) yy_def[yy_current_state];
+               if ( yy_current_state >= 376 )
+                       yy_c = yy_meta[(unsigned int) yy_c];
+               }
+       yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+       yy_is_jam = (yy_current_state == 375);
+       if ( ! yy_is_jam )
+               *(yy_state_ptr)++ = yy_current_state;
+
+       return yy_is_jam ? 0 : yy_current_state;
+}
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+    static int yyinput (void)
+#else
+    static int input  (void)
+#endif
+
+{
+       int c;
+    
+       *(yy_c_buf_p) = (yy_hold_char);
+
+       if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
+               {
+               /* yy_c_buf_p now points to the character we want to return.
+                * If this occurs *before* the EOB characters, then it's a
+                * valid NUL; if not, then we've hit the end of the buffer.
+                */
+               if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+                       /* This was really a NUL. */
+                       *(yy_c_buf_p) = '\0';
+
+               else
+                       { /* need more input */
+                       yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
+                       ++(yy_c_buf_p);
+
+                       switch ( yy_get_next_buffer(  ) )
+                               {
+                               case EOB_ACT_LAST_MATCH:
+                                       /* This happens because yy_g_n_b()
+                                        * sees that we've accumulated a
+                                        * token and flags that we need to
+                                        * try matching the token before
+                                        * proceeding.  But for input(),
+                                        * there's no matching to consider.
+                                        * So convert the EOB_ACT_LAST_MATCH
+                                        * to EOB_ACT_END_OF_FILE.
+                                        */
+
+                                       /* Reset buffer status. */
+                                       yyrestart(yyin );
+
+                                       /*FALLTHROUGH*/
+
+                               case EOB_ACT_END_OF_FILE:
+                                       {
+                                       if ( yywrap( ) )
+                                               return EOF;
+
+                                       if ( ! (yy_did_buffer_switch_on_eof) )
+                                               YY_NEW_FILE;
+#ifdef __cplusplus
+                                       return yyinput();
+#else
+                                       return input();
+#endif
+                                       }
+
+                               case EOB_ACT_CONTINUE_SCAN:
+                                       (yy_c_buf_p) = (yytext_ptr) + offset;
+                                       break;
+                               }
+                       }
+               }
+
+       c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
+       *(yy_c_buf_p) = '\0';   /* preserve yytext */
+       (yy_hold_char) = *++(yy_c_buf_p);
+
+       return c;
+}
+#endif /* ifndef YY_NO_INPUT */
+
+/** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+ * 
+ * @note This function does not reset the start condition to @c INITIAL .
+ */
+    void yyrestart  (FILE * input_file )
+{
+    
+       if ( ! YY_CURRENT_BUFFER ){
+        yyensure_buffer_stack ();
+               YY_CURRENT_BUFFER_LVALUE =
+            yy_create_buffer(yyin,YY_BUF_SIZE );
+       }
+
+       yy_init_buffer(YY_CURRENT_BUFFER,input_file );
+       yy_load_buffer_state( );
+}
+
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ * 
+ */
+    void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
+{
+    
+       /* TODO. We should be able to replace this entire function body
+        * with
+        *              yypop_buffer_state();
+        *              yypush_buffer_state(new_buffer);
+     */
+       yyensure_buffer_stack ();
+       if ( YY_CURRENT_BUFFER == new_buffer )
+               return;
+
+       if ( YY_CURRENT_BUFFER )
+               {
+               /* Flush out information for old buffer. */
+               *(yy_c_buf_p) = (yy_hold_char);
+               YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+               YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+               }
+
+       YY_CURRENT_BUFFER_LVALUE = new_buffer;
+       yy_load_buffer_state( );
+
+       /* We don't actually know whether we did this switch during
+        * EOF (yywrap()) processing, but the only time this flag
+        * is looked at is after yywrap() is called, so it's safe
+        * to go ahead and always set it.
+        */
+       (yy_did_buffer_switch_on_eof) = 1;
+}
+
+static void yy_load_buffer_state  (void)
+{
+       (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+       (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
+       yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+       (yy_hold_char) = *(yy_c_buf_p);
+}
+
+/** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+ * 
+ * @return the allocated buffer state.
+ */
+    YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
+{
+       YY_BUFFER_STATE b;
+    
+       b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
+       if ( ! b )
+               YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+       b->yy_buf_size = size;
+
+       /* yy_ch_buf has to be 2 characters longer than the size given because
+        * we need to put in 2 end-of-buffer characters.
+        */
+       b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  );
+       if ( ! b->yy_ch_buf )
+               YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+       b->yy_is_our_buffer = 1;
+
+       yy_init_buffer(b,file );
+
+       return b;
+}
+
+/** Destroy the buffer.
+ * @param b a buffer created with yy_create_buffer()
+ * 
+ */
+    void yy_delete_buffer (YY_BUFFER_STATE  b )
+{
+    
+       if ( ! b )
+               return;
+
+       if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+               YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+
+       if ( b->yy_is_our_buffer )
+               yyfree((void *) b->yy_ch_buf  );
+
+       yyfree((void *) b  );
+}
+
+#ifndef __cplusplus
+extern int isatty (int );
+#endif /* __cplusplus */
+    
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a yyrestart() or at EOF.
+ */
+    static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
+
+{
+       int oerrno = errno;
+    
+       yy_flush_buffer(b );
+
+       b->yy_input_file = file;
+       b->yy_fill_buffer = 1;
+
+    /* If b is the current buffer, then yy_init_buffer was _probably_
+     * called from yyrestart() or through yy_get_next_buffer.
+     * In that case, we don't want to reset the lineno or column.
+     */
+    if (b != YY_CURRENT_BUFFER){
+        b->yy_bs_lineno = 1;
+        b->yy_bs_column = 0;
+    }
+
+        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+    
+       errno = oerrno;
+}
+
+/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ * 
+ */
+    void yy_flush_buffer (YY_BUFFER_STATE  b )
+{
+       if ( ! b )
+               return;
+
+       b->yy_n_chars = 0;
+
+       /* We always need two end-of-buffer characters.  The first causes
+        * a transition to the end-of-buffer state.  The second causes
+        * a jam in that state.
+        */
+       b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+       b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+       b->yy_buf_pos = &b->yy_ch_buf[0];
+
+       b->yy_at_bol = 1;
+       b->yy_buffer_status = YY_BUFFER_NEW;
+
+       if ( b == YY_CURRENT_BUFFER )
+               yy_load_buffer_state( );
+}
+
+/** Pushes the new state onto the stack. The new state becomes
+ *  the current state. This function will allocate the stack
+ *  if necessary.
+ *  @param new_buffer The new state.
+ *  
+ */
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
+{
+       if (new_buffer == NULL)
+               return;
+
+       yyensure_buffer_stack();
+
+       /* This block is copied from yy_switch_to_buffer. */
+       if ( YY_CURRENT_BUFFER )
+               {
+               /* Flush out information for old buffer. */
+               *(yy_c_buf_p) = (yy_hold_char);
+               YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+               YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+               }
+
+       /* Only push if top exists. Otherwise, replace top. */
+       if (YY_CURRENT_BUFFER)
+               (yy_buffer_stack_top)++;
+       YY_CURRENT_BUFFER_LVALUE = new_buffer;
+
+       /* copied from yy_switch_to_buffer. */
+       yy_load_buffer_state( );
+       (yy_did_buffer_switch_on_eof) = 1;
+}
+
+/** Removes and deletes the top of the stack, if present.
+ *  The next element becomes the new top.
+ *  
+ */
+void yypop_buffer_state (void)
+{
+       if (!YY_CURRENT_BUFFER)
+               return;
+
+       yy_delete_buffer(YY_CURRENT_BUFFER );
+       YY_CURRENT_BUFFER_LVALUE = NULL;
+       if ((yy_buffer_stack_top) > 0)
+               --(yy_buffer_stack_top);
+
+       if (YY_CURRENT_BUFFER) {
+               yy_load_buffer_state( );
+               (yy_did_buffer_switch_on_eof) = 1;
+       }
+}
+
+/* Allocates the stack if it does not exist.
+ *  Guarantees space for at least one push.
+ */
+static void yyensure_buffer_stack (void)
+{
+       yy_size_t num_to_alloc;
+    
+       if (!(yy_buffer_stack)) {
+
+               /* First allocation is just for 2 elements, since we don't know if this
+                * scanner will even need a stack. We use 2 instead of 1 to avoid an
+                * immediate realloc on the next call.
+         */
+               num_to_alloc = 1;
+               (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
+                                                               (num_to_alloc * sizeof(struct yy_buffer_state*)
+                                                               );
+               if ( ! (yy_buffer_stack) )
+                       YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+                                                                 
+               memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
+                               
+               (yy_buffer_stack_max) = num_to_alloc;
+               (yy_buffer_stack_top) = 0;
+               return;
+       }
+
+       if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
+
+               /* Increase the buffer to prepare for a possible push. */
+               int grow_size = 8 /* arbitrary grow size */;
+
+               num_to_alloc = (yy_buffer_stack_max) + grow_size;
+               (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
+                                                               ((yy_buffer_stack),
+                                                               num_to_alloc * sizeof(struct yy_buffer_state*)
+                                                               );
+               if ( ! (yy_buffer_stack) )
+                       YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+
+               /* zero only the new slots.*/
+               memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
+               (yy_buffer_stack_max) = num_to_alloc;
+       }
+}
+
+/** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+ * 
+ * @return the newly allocated buffer state object. 
+ */
+YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
+{
+       YY_BUFFER_STATE b;
+    
+       if ( size < 2 ||
+            base[size-2] != YY_END_OF_BUFFER_CHAR ||
+            base[size-1] != YY_END_OF_BUFFER_CHAR )
+               /* They forgot to leave room for the EOB's. */
+               return 0;
+
+       b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
+       if ( ! b )
+               YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+
+       b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
+       b->yy_buf_pos = b->yy_ch_buf = base;
+       b->yy_is_our_buffer = 0;
+       b->yy_input_file = 0;
+       b->yy_n_chars = b->yy_buf_size;
+       b->yy_is_interactive = 0;
+       b->yy_at_bol = 1;
+       b->yy_fill_buffer = 0;
+       b->yy_buffer_status = YY_BUFFER_NEW;
+
+       yy_switch_to_buffer(b  );
+
+       return b;
+}
+
+/** Setup the input buffer state to scan a string. The next call to yylex() will
+ * scan from a @e copy of @a str.
+ * @param yystr a NUL-terminated string to scan
+ * 
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+ *       yy_scan_bytes() instead.
+ */
+YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
+{
+    
+       return yy_scan_bytes(yystr,strlen(yystr) );
+}
+
+/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
+ * scan from a @e copy of @a bytes.
+ * @param bytes the byte buffer to scan
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * 
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len )
+{
+       YY_BUFFER_STATE b;
+       char *buf;
+       yy_size_t n;
+       int i;
+    
+       /* Get memory for full buffer, including space for trailing EOB's. */
+       n = _yybytes_len + 2;
+       buf = (char *) yyalloc(n  );
+       if ( ! buf )
+               YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+
+       for ( i = 0; i < _yybytes_len; ++i )
+               buf[i] = yybytes[i];
+
+       buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
+
+       b = yy_scan_buffer(buf,n );
+       if ( ! b )
+               YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+
+       /* It's okay to grow etc. this buffer, and we should throw it
+        * away when we're done.
+        */
+       b->yy_is_our_buffer = 1;
+
+       return b;
+}
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+static void yy_fatal_error (yyconst char* msg )
+{
+       (void) fprintf( stderr, "%s\n", msg );
+       exit( YY_EXIT_FAILURE );
+}
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+       do \
+               { \
+               /* Undo effects of setting up yytext. */ \
+        int yyless_macro_arg = (n); \
+        YY_LESS_LINENO(yyless_macro_arg);\
+               yytext[yyleng] = (yy_hold_char); \
+               (yy_c_buf_p) = yytext + yyless_macro_arg; \
+               (yy_hold_char) = *(yy_c_buf_p); \
+               *(yy_c_buf_p) = '\0'; \
+               yyleng = yyless_macro_arg; \
+               } \
+       while ( 0 )
+
+/* Accessor  methods (get/set functions) to struct members. */
+
+/** Get the current line number.
+ * 
+ */
+int yyget_lineno  (void)
+{
+        
+    return yylineno;
+}
+
+/** Get the input stream.
+ * 
+ */
+FILE *yyget_in  (void)
+{
+        return yyin;
+}
+
+/** Get the output stream.
+ * 
+ */
+FILE *yyget_out  (void)
+{
+        return yyout;
+}
+
+/** Get the length of the current token.
+ * 
+ */
+yy_size_t yyget_leng  (void)
+{
+        return yyleng;
+}
+
+/** Get the current token.
+ * 
+ */
+
+char *yyget_text  (void)
+{
+        return yytext;
+}
+
+/** Set the current line number.
+ * @param line_number
+ * 
+ */
+void yyset_lineno (int  line_number )
+{
+    
+    yylineno = line_number;
+}
+
+/** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param in_str A readable stream.
+ * 
+ * @see yy_switch_to_buffer
+ */
+void yyset_in (FILE *  in_str )
+{
+        yyin = in_str ;
+}
+
+void yyset_out (FILE *  out_str )
+{
+        yyout = out_str ;
+}
+
+int yyget_debug  (void)
+{
+        return yy_flex_debug;
+}
+
+void yyset_debug (int  bdebug )
+{
+        yy_flex_debug = bdebug ;
+}
+
+static int yy_init_globals (void)
+{
+        /* Initialization is the same as for the non-reentrant scanner.
+     * This function is called from yylex_destroy(), so don't allocate here.
+     */
+
+    (yy_buffer_stack) = 0;
+    (yy_buffer_stack_top) = 0;
+    (yy_buffer_stack_max) = 0;
+    (yy_c_buf_p) = (char *) 0;
+    (yy_init) = 0;
+    (yy_start) = 0;
+
+    (yy_state_buf) = 0;
+    (yy_state_ptr) = 0;
+    (yy_full_match) = 0;
+    (yy_lp) = 0;
+
+/* Defined in main.c */
+#ifdef YY_STDINIT
+    yyin = stdin;
+    yyout = stdout;
+#else
+    yyin = (FILE *) 0;
+    yyout = (FILE *) 0;
+#endif
+
+    /* For future reference: Set errno on error, since we are called by
+     * yylex_init()
+     */
+    return 0;
+}
+
+/* yylex_destroy is for both reentrant and non-reentrant scanners. */
+int yylex_destroy  (void)
+{
+    
+    /* Pop the buffer stack, destroying each element. */
+       while(YY_CURRENT_BUFFER){
+               yy_delete_buffer(YY_CURRENT_BUFFER  );
+               YY_CURRENT_BUFFER_LVALUE = NULL;
+               yypop_buffer_state();
+       }
+
+       /* Destroy the stack itself. */
+       yyfree((yy_buffer_stack) );
+       (yy_buffer_stack) = NULL;
+
+    yyfree ( (yy_state_buf) );
+    (yy_state_buf)  = NULL;
+
+    /* Reset the globals. This is important in a non-reentrant scanner so the next time
+     * yylex() is called, initialization will occur. */
+    yy_init_globals( );
+
+    return 0;
+}
+
+/*
+ * Internal utility routines.
+ */
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
+{
+       register int i;
+       for ( i = 0; i < n; ++i )
+               s1[i] = s2[i];
+}
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (yyconst char * s )
+{
+       register int n;
+       for ( n = 0; s[n]; ++n )
+               ;
+
+       return n;
+}
+#endif
+
+void *yyalloc (yy_size_t  size )
+{
+       return (void *) malloc( size );
+}
+
+void *yyrealloc  (void * ptr, yy_size_t  size )
+{
+       /* The cast to (char *) in the following accommodates both
+        * implementations that use char* generic pointers, and those
+        * that use void* generic pointers.  It works with the latter
+        * because both ANSI C and C++ allow castless assignment from
+        * any pointer type to void*, and deal with argument conversions
+        * as though doing an assignment.
+        */
+       return (void *) realloc( (char *) ptr, size );
+}
+
+void yyfree (void * ptr )
+{
+       free( (char *) ptr );   /* see yyrealloc() for (char *) cast */
+}
+
+#define YYTABLES_NAME "yytables"
+
+#line 205 "scannerlexer.l"
+
+
+
+static int
+yywrap (void)
+{
+  return 1;
+}
+
+
+static void
+parse_comment (GISourceScanner *scanner)
+{
+  GString *string;
+  int c1, c2;
+  GISourceComment *comment;
+  int comment_lineno;
+
+  c1 = input();
+  c2 = input();
+
+  string = g_string_new ("");
+
+  comment_lineno = lineno;
+
+  while (c2 != EOF && !(c1 == '*' && c2 == '/'))
+    {
+      g_string_append_c (string, c1);
+
+      if (c1 == '\n')
+        lineno++;
+
+      c1 = c2;
+      c2 = input();
+
+    }
+
+  comment = g_slice_new (GISourceComment);
+  comment->comment = g_string_free (string, FALSE);
+  comment->line = comment_lineno;
+  comment->filename = g_strdup(scanner->current_filename);
+
+  scanner->comments = g_slist_prepend (scanner->comments,
+                                       comment);
+}
+
+static int
+check_identifier (GISourceScanner *scanner,
+                 const char  *s)
+{
+       /*
+        * This function checks if `s' is a type name or an
+        * identifier.
+        */
+
+       if (gi_source_scanner_is_typedef (scanner, s)) {
+               return TYPEDEF_NAME;
+       } else if (strcmp (s, "__builtin_va_list") == 0) {
+               return TYPEDEF_NAME;
+       }
+
+       return IDENTIFIER;
+}
+
+/*
+ * # linenum "filename" flags
+ *  See http://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html
+ **/
+
+static void
+process_linemarks (GISourceScanner *scanner)
+{
+        char filename[1025];
+        char *compress;
+        char *real;
+
+        sscanf(yytext, "# %d \"%1024[^\"]\"", &lineno, filename);
+
+       compress = g_strcompress (filename);
+        real = g_realpath (filename);
+        if (real) {
+                g_free (scanner->current_filename);
+                scanner->current_filename = real;
+        } else {
+                g_free (real);
+        }
+        g_free (compress);
+}
+
+/*
+ * This parses a macro which is ignored, such as
+ * __attribute__((x)) or __asm__ (x)
+ */
+static int
+parse_ignored_macro (void)
+{
+       int c;
+       int nest;
+
+       while ((c = input ()) != EOF && isspace (c))
+               ;
+       if (c != '(')
+               return FALSE;
+
+       nest = 0;
+       while ((c = input ()) != EOF && (nest > 0 || c != ')')) {
+               if (c == '(')
+                       nest++;
+               else if (c == ')')
+                       nest--;
+               else if (c == '"') {
+                       while ((c = input ()) != EOF && c != '"') {
+                               if (c == '\\')
+                                       c = input ();
+                       }
+               } else if (c == '\'') {
+                       c = input ();
+                       if (c == '\\')
+                               c = input ();
+                       else if (c == '\'')
+                               return FALSE;
+                       c = input ();
+                       if (c != '\'')
+                               return FALSE;
+               } else if (c == '\n')
+                       lineno++;
+       }
+
+       return TRUE;
+}
+
+static void
+parse_trigraph (GISourceScanner *scanner)
+{
+       char **items;
+       char *start, *end;
+       int i;
+
+       start = g_strstr_len (yytext, yyleng, "<");
+       g_assert (start != NULL);
+       end = g_strstr_len (yytext, yyleng, ">");
+       g_assert (end != NULL);
+       *end = '\0';
+       items = g_strsplit (start + 1, ",", 0);
+       for (i = 0; items[i] != NULL; i++) {
+               char *item = items[i];
+               g_strstrip (item);
+               if (strcmp (item, "public") == 0)
+                       scanner->private = FALSE;
+               else if (strcmp (item, "private") == 0)
+                       scanner->private = TRUE;
+               else if (strcmp (item, "flags") == 0)
+                       scanner->flags = TRUE;
+       }
+       g_strfreev (items);
+}
+
diff --git a/scannerparser.c b/scannerparser.c
new file mode 100644 (file)
index 0000000..57cadf8
--- /dev/null
@@ -0,0 +1,4370 @@
+/* A Bison parser, made by GNU Bison 2.5.  */
+
+/* Bison implementation for Yacc-like parsers in C
+   
+      Copyright (C) 1984, 1989-1990, 2000-2011 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 3 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, see <http://www.gnu.org/licenses/>.  */
+
+/* As a special exception, you may create a larger work that contains
+   part or all of the Bison parser skeleton and distribute that work
+   under terms of your choice, so long as that work isn't itself a
+   parser generator using the skeleton or a modified version thereof
+   as a parser skeleton.  Alternatively, if you modify or redistribute
+   the parser skeleton itself, you may (at your option) remove this
+   special exception, which will cause the skeleton and the resulting
+   Bison output files to be licensed under the GNU General Public
+   License without this special exception.
+   
+   This special exception was added by the Free Software Foundation in
+   version 2.2 of Bison.  */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+   simplifying the original so-called "semantic" parser.  */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+   infringing on user name space.  This should be done even for local
+   variables, as they might otherwise be expanded by user macros.
+   There are some unavoidable exceptions within include files to
+   define necessary library symbols; they are noted "INFRINGES ON
+   USER NAME SPACE" below.  */
+
+/* Identify Bison output.  */
+#define YYBISON 1
+
+/* Bison version.  */
+#define YYBISON_VERSION "2.5"
+
+/* Skeleton name.  */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers.  */
+#define YYPURE 0
+
+/* Push parsers.  */
+#define YYPUSH 0
+
+/* Pull parsers.  */
+#define YYPULL 1
+
+/* Using locations.  */
+#define YYLSP_NEEDED 0
+
+
+
+/* Copy the first part of user declarations.  */
+
+/* Line 268 of yacc.c  */
+#line 29 "scannerparser.y"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <glib.h>
+#include <glib/gstdio.h>
+#include "sourcescanner.h"
+#include "scannerparser.h"
+
+extern FILE *yyin;
+extern int lineno;
+extern char linebuf[2000];
+extern char *yytext;
+
+extern int yylex (GISourceScanner *scanner);
+static void yyerror (GISourceScanner *scanner, const char *str);
+
+extern void ctype_free (GISourceType * type);
+
+static int last_enum_value = -1;
+static gboolean is_bitfield;
+static GHashTable *const_table = NULL;
+
+/**
+ * parse_c_string_literal:
+ * @str: A string containing a C string literal
+ *
+ * Based on g_strcompress(), but also handles
+ * hexadecimal escapes.
+ */
+static char *
+parse_c_string_literal (const char *str)
+{
+  const gchar *p = str, *num;
+  gchar *dest = g_malloc (strlen (str) + 1);
+  gchar *q = dest;
+
+  while (*p)
+    {
+      if (*p == '\\')
+        {
+          p++;
+          switch (*p)
+            {
+            case '\0':
+              g_warning ("parse_c_string_literal: trailing \\");
+              goto out;
+            case '0':  case '1':  case '2':  case '3':  case '4':
+            case '5':  case '6':  case '7':
+              *q = 0;
+              num = p;
+              while ((p < num + 3) && (*p >= '0') && (*p <= '7'))
+                {
+                  *q = (*q * 8) + (*p - '0');
+                  p++;
+                }
+              q++;
+              p--;
+              break;
+           case 'x':
+             *q = 0;
+             p++;
+             num = p;
+             while ((p < num + 2) && (g_ascii_isxdigit(*p)))
+               {
+                 *q = (*q * 16) + g_ascii_xdigit_value(*p);
+                 p++;
+               }
+              q++;
+              p--;
+             break;
+            case 'b':
+              *q++ = '\b';
+              break;
+            case 'f':
+              *q++ = '\f';
+              break;
+            case 'n':
+              *q++ = '\n';
+              break;
+            case 'r':
+              *q++ = '\r';
+              break;
+            case 't':
+              *q++ = '\t';
+              break;
+            default:            /* Also handles \" and \\ */
+              *q++ = *p;
+              break;
+            }
+        }
+      else
+        *q++ = *p;
+      p++;
+    }
+out:
+  *q = 0;
+
+  return dest;
+}
+
+
+
+/* Line 268 of yacc.c  */
+#line 176 "scannerparser.c"
+
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 1
+#endif
+
+/* Enabling verbose error messages.  */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 1
+#endif
+
+/* Enabling the token table.  */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     IDENTIFIER = 258,
+     TYPEDEF_NAME = 259,
+     INTEGER = 260,
+     FLOATING = 261,
+     CHARACTER = 262,
+     STRING = 263,
+     ELLIPSIS = 264,
+     ADDEQ = 265,
+     SUBEQ = 266,
+     MULEQ = 267,
+     DIVEQ = 268,
+     MODEQ = 269,
+     XOREQ = 270,
+     ANDEQ = 271,
+     OREQ = 272,
+     SL = 273,
+     SR = 274,
+     SLEQ = 275,
+     SREQ = 276,
+     EQ = 277,
+     NOTEQ = 278,
+     LTEQ = 279,
+     GTEQ = 280,
+     ANDAND = 281,
+     OROR = 282,
+     PLUSPLUS = 283,
+     MINUSMINUS = 284,
+     ARROW = 285,
+     AUTO = 286,
+     BOOL = 287,
+     BREAK = 288,
+     CASE = 289,
+     CHAR = 290,
+     CONST = 291,
+     CONTINUE = 292,
+     DEFAULT = 293,
+     DO = 294,
+     DOUBLE = 295,
+     ELSE = 296,
+     ENUM = 297,
+     EXTENSION = 298,
+     EXTERN = 299,
+     FLOAT = 300,
+     FOR = 301,
+     GOTO = 302,
+     IF = 303,
+     INLINE = 304,
+     INT = 305,
+     LONG = 306,
+     REGISTER = 307,
+     RESTRICT = 308,
+     RETURN = 309,
+     SHORT = 310,
+     SIGNED = 311,
+     SIZEOF = 312,
+     STATIC = 313,
+     STRUCT = 314,
+     SWITCH = 315,
+     TYPEDEF = 316,
+     UNION = 317,
+     UNSIGNED = 318,
+     VOID = 319,
+     VOLATILE = 320,
+     WHILE = 321,
+     FUNCTION_MACRO = 322,
+     OBJECT_MACRO = 323
+   };
+#endif
+/* Tokens.  */
+#define IDENTIFIER 258
+#define TYPEDEF_NAME 259
+#define INTEGER 260
+#define FLOATING 261
+#define CHARACTER 262
+#define STRING 263
+#define ELLIPSIS 264
+#define ADDEQ 265
+#define SUBEQ 266
+#define MULEQ 267
+#define DIVEQ 268
+#define MODEQ 269
+#define XOREQ 270
+#define ANDEQ 271
+#define OREQ 272
+#define SL 273
+#define SR 274
+#define SLEQ 275
+#define SREQ 276
+#define EQ 277
+#define NOTEQ 278
+#define LTEQ 279
+#define GTEQ 280
+#define ANDAND 281
+#define OROR 282
+#define PLUSPLUS 283
+#define MINUSMINUS 284
+#define ARROW 285
+#define AUTO 286
+#define BOOL 287
+#define BREAK 288
+#define CASE 289
+#define CHAR 290
+#define CONST 291
+#define CONTINUE 292
+#define DEFAULT 293
+#define DO 294
+#define DOUBLE 295
+#define ELSE 296
+#define ENUM 297
+#define EXTENSION 298
+#define EXTERN 299
+#define FLOAT 300
+#define FOR 301
+#define GOTO 302
+#define IF 303
+#define INLINE 304
+#define INT 305
+#define LONG 306
+#define REGISTER 307
+#define RESTRICT 308
+#define RETURN 309
+#define SHORT 310
+#define SIGNED 311
+#define SIZEOF 312
+#define STATIC 313
+#define STRUCT 314
+#define SWITCH 315
+#define TYPEDEF 316
+#define UNION 317
+#define UNSIGNED 318
+#define VOID 319
+#define VOLATILE 320
+#define WHILE 321
+#define FUNCTION_MACRO 322
+#define OBJECT_MACRO 323
+
+
+
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
+{
+
+/* Line 293 of yacc.c  */
+#line 134 "scannerparser.y"
+
+  char *str;
+  GList *list;
+  GISourceSymbol *symbol;
+  GISourceType *ctype;
+  StorageClassSpecifier storage_class_specifier;
+  TypeQualifier type_qualifier;
+  FunctionSpecifier function_specifier;
+  UnaryOperator unary_operator;
+
+
+
+/* Line 293 of yacc.c  */
+#line 361 "scannerparser.c"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+/* Copy the second part of user declarations.  */
+
+
+/* Line 343 of yacc.c  */
+#line 373 "scannerparser.c"
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+typedef signed char yytype_int8;
+#else
+typedef short int yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+#  define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+#  define YYSIZE_T size_t
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYSIZE_T size_t
+# else
+#  define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if defined YYENABLE_NLS && YYENABLE_NLS
+#  if ENABLE_NLS
+#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+#   define YY_(msgid) dgettext ("bison-runtime", msgid)
+#  endif
+# endif
+# ifndef YY_
+#  define YY_(msgid) msgid
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E.  */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
+
+/* Identity function, used to suppress warnings about constant conditions.  */
+#ifndef lint
+# define YYID(n) (n)
+#else
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int yyi)
+#else
+static int
+YYID (yyi)
+    int yyi;
+#endif
+{
+  return yyi;
+}
+#endif
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols.  */
+
+# ifdef YYSTACK_USE_ALLOCA
+#  if YYSTACK_USE_ALLOCA
+#   ifdef __GNUC__
+#    define YYSTACK_ALLOC __builtin_alloca
+#   elif defined __BUILTIN_VA_ARG_INCR
+#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+#   elif defined _AIX
+#    define YYSTACK_ALLOC __alloca
+#   elif defined _MSC_VER
+#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+#    define alloca _alloca
+#   else
+#    define YYSTACK_ALLOC alloca
+#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#     ifndef EXIT_SUCCESS
+#      define EXIT_SUCCESS 0
+#     endif
+#    endif
+#   endif
+#  endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+   /* Pacify GCC's `empty if-body' warning.  */
+#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+    /* The OS might guarantee only one guard page at the bottom of the stack,
+       and a page size can be as small as 4096 bytes.  So we cannot safely
+       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
+       to allow for a few compiler-allocated temporary stack slots.  */
+#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+#  endif
+# else
+#  define YYSTACK_ALLOC YYMALLOC
+#  define YYSTACK_FREE YYFREE
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+#  endif
+#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
+       && ! ((defined YYMALLOC || defined malloc) \
+            && (defined YYFREE || defined free)))
+#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#   ifndef EXIT_SUCCESS
+#    define EXIT_SUCCESS 0
+#   endif
+#  endif
+#  ifndef YYMALLOC
+#   define YYMALLOC malloc
+#   if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+#  ifndef YYFREE
+#   define YYFREE free
+#   if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+     && (! defined __cplusplus \
+        || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member.  */
+union yyalloc
+{
+  yytype_int16 yyss_alloc;
+  YYSTYPE yyvs_alloc;
+};
+
+/* The size of the maximum gap between one aligned stack and the next.  */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+   N elements.  */
+# define YYSTACK_BYTES(N) \
+     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+      + YYSTACK_GAP_MAXIMUM)
+
+# define YYCOPY_NEEDED 1
+
+/* Relocate STACK from its old location to the new one.  The
+   local variables YYSIZE and YYSTACKSIZE give the old and new number of
+   elements in the stack, and YYPTR gives the new location of the
+   stack.  Advance YYPTR to a properly aligned location for the next
+   stack.  */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack)                          \
+    do                                                                 \
+      {                                                                        \
+       YYSIZE_T yynewbytes;                                            \
+       YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
+       Stack = &yyptr->Stack_alloc;                                    \
+       yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+       yyptr += yynewbytes / sizeof (*yyptr);                          \
+      }                                                                        \
+    while (YYID (0))
+
+#endif
+
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from FROM to TO.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(To, From, Count) \
+      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#  else
+#   define YYCOPY(To, From, Count)             \
+      do                                       \
+       {                                       \
+         YYSIZE_T yyi;                         \
+         for (yyi = 0; yyi < (Count); yyi++)   \
+           (To)[yyi] = (From)[yyi];            \
+       }                                       \
+      while (YYID (0))
+#  endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
+/* YYFINAL -- State number of the termination state.  */
+#define YYFINAL  67
+/* YYLAST -- Last index in YYTABLE.  */
+#define YYLAST   2168
+
+/* YYNTOKENS -- Number of terminals.  */
+#define YYNTOKENS  93
+/* YYNNTS -- Number of nonterminals.  */
+#define YYNNTS  76
+/* YYNRULES -- Number of rules.  */
+#define YYNRULES  244
+/* YYNRULES -- Number of states.  */
+#define YYNSTATES  408
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
+#define YYUNDEFTOK  2
+#define YYMAXUTOK   323
+
+#define YYTRANSLATE(YYX)                                               \
+  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
+static const yytype_uint8 yytranslate[] =
+{
+       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,    82,     2,     2,     2,    84,    77,     2,
+      69,    70,    78,    79,    76,    80,    75,    83,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,    90,    92,
+      85,    91,    86,    89,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,    73,     2,    74,    87,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,    71,    88,    72,    81,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
+       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
+      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
+      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
+      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
+      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
+      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
+      65,    66,    67,    68
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+   YYRHS.  */
+static const yytype_uint16 yyprhs[] =
+{
+       0,     0,     3,     5,     7,     9,    11,    13,    17,    24,
+      26,    29,    31,    33,    35,    37,    42,    47,    51,    55,
+      59,    62,    65,    67,    71,    73,    76,    79,    82,    85,
+      90,    92,    94,    96,    98,   100,   102,   104,   109,   111,
+     115,   119,   123,   125,   129,   133,   135,   139,   143,   145,
+     149,   153,   157,   161,   163,   167,   171,   173,   177,   179,
+     183,   185,   189,   191,   195,   197,   201,   203,   209,   211,
+     215,   217,   219,   221,   223,   225,   227,   229,   231,   233,
+     235,   237,   239,   243,   246,   248,   252,   255,   258,   260,
+     263,   265,   268,   270,   273,   275,   277,   281,   283,   287,
+     289,   291,   293,   295,   297,   299,   301,   303,   305,   307,
+     309,   311,   313,   315,   317,   319,   321,   323,   329,   334,
+     337,   339,   341,   343,   346,   350,   353,   355,   358,   360,
+     362,   366,   367,   369,   372,   376,   382,   387,   394,   400,
+     403,   405,   406,   409,   413,   415,   419,   421,   423,   425,
+     427,   429,   432,   434,   436,   440,   445,   449,   454,   459,
+     463,   466,   468,   472,   475,   477,   480,   482,   486,   489,
+     492,   494,   496,   498,   502,   504,   507,   509,   511,   514,
+     518,   521,   525,   529,   534,   537,   541,   545,   550,   552,
+     554,   558,   563,   565,   569,   571,   573,   575,   577,   579,
+     581,   585,   590,   594,   597,   601,   603,   606,   608,   610,
+     612,   615,   621,   629,   635,   641,   649,   656,   664,   672,
+     681,   689,   698,   707,   717,   721,   724,   727,   730,   734,
+     736,   739,   741,   743,   745,   750,   754,   756,   759,   761,
+     763,   768,   771,   773,   775
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
+static const yytype_int16 yyrhs[] =
+{
+     160,     0,    -1,    96,    -1,     5,    -1,     7,    -1,     6,
+      -1,    95,    -1,    69,   116,    70,    -1,    43,    69,    71,
+     154,    72,    70,    -1,     8,    -1,    95,     8,    -1,     3,
+      -1,    96,    -1,   148,    -1,    94,    -1,    98,    73,   116,
+      74,    -1,    98,    69,    99,    70,    -1,    98,    69,    70,
+      -1,    98,    75,    97,    -1,    98,    30,    97,    -1,    98,
+      28,    -1,    98,    29,    -1,   114,    -1,    99,    76,   114,
+      -1,    98,    -1,    28,   100,    -1,    29,   100,    -1,   101,
+     102,    -1,    57,   100,    -1,    57,    69,   145,    70,    -1,
+      77,    -1,    78,    -1,    79,    -1,    80,    -1,    81,    -1,
+      82,    -1,   100,    -1,    69,   145,    70,   102,    -1,   102,
+      -1,   103,    78,   102,    -1,   103,    83,   102,    -1,   103,
+      84,   102,    -1,   103,    -1,   104,    79,   103,    -1,   104,
+      80,   103,    -1,   104,    -1,   105,    18,   104,    -1,   105,
+      19,   104,    -1,   105,    -1,   106,    85,   105,    -1,   106,
+      86,   105,    -1,   106,    24,   105,    -1,   106,    25,   105,
+      -1,   106,    -1,   107,    22,   106,    -1,   107,    23,   106,
+      -1,   107,    -1,   108,    77,   107,    -1,   108,    -1,   109,
+      87,   108,    -1,   109,    -1,   110,    88,   109,    -1,   110,
+      -1,   111,    26,   110,    -1,   111,    -1,   112,    27,   111,
+      -1,   112,    -1,   112,    89,   116,    90,   113,    -1,   113,
+      -1,   100,   115,   114,    -1,    91,    -1,    12,    -1,    13,
+      -1,    14,    -1,    10,    -1,    11,    -1,    20,    -1,    21,
+      -1,    16,    -1,    15,    -1,    17,    -1,   114,    -1,   116,
+      76,   114,    -1,    43,   116,    -1,   113,    -1,   119,   120,
+      92,    -1,   119,    92,    -1,   122,   119,    -1,   122,    -1,
+     123,   119,    -1,   123,    -1,   136,   119,    -1,   136,    -1,
+     137,   119,    -1,   137,    -1,   121,    -1,   120,    76,   121,
+      -1,   138,    -1,   138,    91,   149,    -1,    61,    -1,    44,
+      -1,    58,    -1,    31,    -1,    52,    -1,    64,    -1,    35,
+      -1,    55,    -1,    50,    -1,    51,    -1,    45,    -1,    40,
+      -1,    56,    -1,    63,    -1,    32,    -1,   124,    -1,   131,
+      -1,   148,    -1,   125,    97,    71,   126,    72,    -1,   125,
+      71,   126,    72,    -1,   125,    97,    -1,    59,    -1,    62,
+      -1,   127,    -1,   126,   127,    -1,   128,   129,    92,    -1,
+     123,   128,    -1,   123,    -1,   136,   128,    -1,   136,    -1,
+     130,    -1,   129,    76,   130,    -1,    -1,   138,    -1,    90,
+     117,    -1,   138,    90,   117,    -1,   132,    97,    71,   133,
+      72,    -1,   132,    71,   133,    72,    -1,   132,    97,    71,
+     133,    76,    72,    -1,   132,    71,   133,    76,    72,    -1,
+     132,    97,    -1,    42,    -1,    -1,   134,   135,    -1,   133,
+      76,   135,    -1,    96,    -1,    96,    91,   117,    -1,    36,
+      -1,    53,    -1,    43,    -1,    65,    -1,    49,    -1,   140,
+     139,    -1,   139,    -1,    96,    -1,    69,   138,    70,    -1,
+     139,    73,   114,    74,    -1,   139,    73,    74,    -1,   139,
+      69,   142,    70,    -1,   139,    69,   144,    70,    -1,   139,
+      69,    70,    -1,    78,   141,    -1,    78,    -1,    78,   141,
+     140,    -1,    78,   140,    -1,   136,    -1,   141,   136,    -1,
+     143,    -1,   142,    76,   143,    -1,   119,   138,    -1,   119,
+     146,    -1,   119,    -1,     9,    -1,    96,    -1,   144,    76,
+      96,    -1,   128,    -1,   128,   146,    -1,   140,    -1,   147,
+      -1,   140,   147,    -1,    69,   146,    70,    -1,    73,    74,
+      -1,    73,   114,    74,    -1,   147,    73,    74,    -1,   147,
+      73,   114,    74,    -1,    69,    70,    -1,    69,   142,    70,
+      -1,   147,    69,    70,    -1,   147,    69,   142,    70,    -1,
+       4,    -1,   114,    -1,    71,   150,    72,    -1,    71,   150,
+      76,    72,    -1,   149,    -1,   150,    76,   149,    -1,   152,
+      -1,   153,    -1,   156,    -1,   157,    -1,   158,    -1,   159,
+      -1,    97,    90,   151,    -1,    34,   117,    90,   151,    -1,
+      38,    90,   151,    -1,    71,    72,    -1,    71,   154,    72,
+      -1,   155,    -1,   154,   155,    -1,   118,    -1,   151,    -1,
+      92,    -1,   116,    92,    -1,    48,    69,   116,    70,   151,
+      -1,    48,    69,   116,    70,   151,    41,   151,    -1,    60,
+      69,   116,    70,   151,    -1,    66,    69,   116,    70,   151,
+      -1,    39,   151,    66,    69,   116,    70,    92,    -1,    46,
+      69,    92,    92,    70,   151,    -1,    46,    69,   116,    92,
+      92,    70,   151,    -1,    46,    69,    92,   116,    92,    70,
+     151,    -1,    46,    69,   116,    92,   116,    92,    70,   151,
+      -1,    46,    69,    92,    92,   116,    70,   151,    -1,    46,
+      69,   116,    92,    92,   116,    70,   151,    -1,    46,    69,
+      92,   116,    92,   116,    70,   151,    -1,    46,    69,   116,
+      92,   116,    92,   116,    70,   151,    -1,    47,    97,    92,
+      -1,    37,    92,    -1,    33,    92,    -1,    54,    92,    -1,
+      54,   116,    92,    -1,   161,    -1,   160,   161,    -1,   162,
+      -1,   118,    -1,   168,    -1,   119,   138,   163,   153,    -1,
+     119,   138,   153,    -1,   118,    -1,   163,   118,    -1,    67,
+      -1,    68,    -1,   164,    69,   144,    70,    -1,   165,   117,
+      -1,   166,    -1,   167,    -1,     1,    -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
+static const yytype_uint16 yyrline[] =
+{
+       0,   223,   223,   232,   244,   250,   257,   258,   262,   270,
+     285,   299,   306,   307,   311,   312,   316,   320,   324,   328,
+     332,   336,   343,   344,   348,   349,   353,   357,   380,   384,
+     392,   396,   400,   404,   408,   412,   419,   420,   428,   429,
+     435,   443,   454,   455,   461,   470,   471,   483,   492,   493,
+     499,   505,   511,   520,   521,   527,   536,   537,   546,   547,
+     556,   557,   566,   567,   578,   579,   590,   591,   598,   599,
+     606,   607,   608,   609,   610,   611,   612,   613,   614,   615,
+     616,   620,   621,   622,   629,   635,   653,   660,   665,   670,
+     683,   684,   689,   694,   699,   707,   711,   718,   719,   723,
+     727,   731,   735,   739,   746,   750,   754,   758,   762,   766,
+     770,   774,   778,   782,   786,   787,   788,   796,   815,   820,
+     828,   833,   841,   842,   849,   869,   874,   875,   880,   888,
+     892,   900,   903,   904,   908,   919,   926,   933,   940,   947,
+     954,   963,   963,   972,   980,   988,  1000,  1004,  1008,  1012,
+    1019,  1026,  1031,  1035,  1040,  1044,  1049,  1054,  1064,  1071,
+    1080,  1085,  1089,  1094,  1101,  1102,  1109,  1113,  1120,  1125,
+    1130,  1135,  1142,  1148,  1157,  1158,  1162,  1167,  1168,  1176,
+    1180,  1185,  1190,  1195,  1200,  1206,  1216,  1222,  1235,  1242,
+    1243,  1244,  1248,  1249,  1255,  1256,  1257,  1258,  1259,  1260,
+    1264,  1265,  1266,  1270,  1271,  1275,  1276,  1280,  1281,  1285,
+    1286,  1290,  1291,  1292,  1296,  1297,  1298,  1299,  1300,  1301,
+    1302,  1303,  1304,  1305,  1309,  1310,  1311,  1312,  1313,  1319,
+    1320,  1324,  1325,  1326,  1330,  1331,  1335,  1336,  1342,  1349,
+    1356,  1360,  1371,  1372,  1373
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
+static const char *const yytname[] =
+{
+  "$end", "error", "$undefined", "\"identifier\"", "\"typedef-name\"",
+  "INTEGER", "FLOATING", "CHARACTER", "STRING", "ELLIPSIS", "ADDEQ",
+  "SUBEQ", "MULEQ", "DIVEQ", "MODEQ", "XOREQ", "ANDEQ", "OREQ", "SL", "SR",
+  "SLEQ", "SREQ", "EQ", "NOTEQ", "LTEQ", "GTEQ", "ANDAND", "OROR",
+  "PLUSPLUS", "MINUSMINUS", "ARROW", "AUTO", "BOOL", "BREAK", "CASE",
+  "CHAR", "CONST", "CONTINUE", "DEFAULT", "DO", "DOUBLE", "ELSE", "ENUM",
+  "EXTENSION", "EXTERN", "FLOAT", "FOR", "GOTO", "IF", "INLINE", "INT",
+  "LONG", "REGISTER", "RESTRICT", "RETURN", "SHORT", "SIGNED", "SIZEOF",
+  "STATIC", "STRUCT", "SWITCH", "TYPEDEF", "UNION", "UNSIGNED", "VOID",
+  "VOLATILE", "WHILE", "FUNCTION_MACRO", "OBJECT_MACRO", "'('", "')'",
+  "'{'", "'}'", "'['", "']'", "'.'", "','", "'&'", "'*'", "'+'", "'-'",
+  "'~'", "'!'", "'/'", "'%'", "'<'", "'>'", "'^'", "'|'", "'?'", "':'",
+  "'='", "';'", "$accept", "primary_expression", "strings", "identifier",
+  "identifier_or_typedef_name", "postfix_expression",
+  "argument_expression_list", "unary_expression", "unary_operator",
+  "cast_expression", "multiplicative_expression", "additive_expression",
+  "shift_expression", "relational_expression", "equality_expression",
+  "and_expression", "exclusive_or_expression", "inclusive_or_expression",
+  "logical_and_expression", "logical_or_expression",
+  "conditional_expression", "assignment_expression", "assignment_operator",
+  "expression", "constant_expression", "declaration",
+  "declaration_specifiers", "init_declarator_list", "init_declarator",
+  "storage_class_specifier", "type_specifier", "struct_or_union_specifier",
+  "struct_or_union", "struct_declaration_list", "struct_declaration",
+  "specifier_qualifier_list", "struct_declarator_list",
+  "struct_declarator", "enum_specifier", "enum_keyword", "enumerator_list",
+  "$@1", "enumerator", "type_qualifier", "function_specifier",
+  "declarator", "direct_declarator", "pointer", "type_qualifier_list",
+  "parameter_list", "parameter_declaration", "identifier_list",
+  "type_name", "abstract_declarator", "direct_abstract_declarator",
+  "typedef_name", "initializer", "initializer_list", "statement",
+  "labeled_statement", "compound_statement", "block_item_list",
+  "block_item", "expression_statement", "selection_statement",
+  "iteration_statement", "jump_statement", "translation_unit",
+  "external_declaration", "function_definition", "declaration_list",
+  "function_macro", "object_macro", "function_macro_define",
+  "object_macro_define", "macro", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+   token YYLEX-NUM.  */
+static const yytype_uint16 yytoknum[] =
+{
+       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
+     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
+     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
+     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
+     295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
+     305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
+     315,   316,   317,   318,   319,   320,   321,   322,   323,    40,
+      41,   123,   125,    91,    93,    46,    44,    38,    42,    43,
+      45,   126,    33,    47,    37,    60,    62,    94,   124,    63,
+      58,    61,    59
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
+static const yytype_uint8 yyr1[] =
+{
+       0,    93,    94,    94,    94,    94,    94,    94,    94,    95,
+      95,    96,    97,    97,    98,    98,    98,    98,    98,    98,
+      98,    98,    99,    99,   100,   100,   100,   100,   100,   100,
+     101,   101,   101,   101,   101,   101,   102,   102,   103,   103,
+     103,   103,   104,   104,   104,   105,   105,   105,   106,   106,
+     106,   106,   106,   107,   107,   107,   108,   108,   109,   109,
+     110,   110,   111,   111,   112,   112,   113,   113,   114,   114,
+     115,   115,   115,   115,   115,   115,   115,   115,   115,   115,
+     115,   116,   116,   116,   117,   118,   118,   119,   119,   119,
+     119,   119,   119,   119,   119,   120,   120,   121,   121,   122,
+     122,   122,   122,   122,   123,   123,   123,   123,   123,   123,
+     123,   123,   123,   123,   123,   123,   123,   124,   124,   124,
+     125,   125,   126,   126,   127,   128,   128,   128,   128,   129,
+     129,   130,   130,   130,   130,   131,   131,   131,   131,   131,
+     132,   134,   133,   133,   135,   135,   136,   136,   136,   136,
+     137,   138,   138,   139,   139,   139,   139,   139,   139,   139,
+     140,   140,   140,   140,   141,   141,   142,   142,   143,   143,
+     143,   143,   144,   144,   145,   145,   146,   146,   146,   147,
+     147,   147,   147,   147,   147,   147,   147,   147,   148,   149,
+     149,   149,   150,   150,   151,   151,   151,   151,   151,   151,
+     152,   152,   152,   153,   153,   154,   154,   155,   155,   156,
+     156,   157,   157,   157,   158,   158,   158,   158,   158,   158,
+     158,   158,   158,   158,   159,   159,   159,   159,   159,   160,
+     160,   161,   161,   161,   162,   162,   163,   163,   164,   165,
+     166,   167,   168,   168,   168
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
+static const yytype_uint8 yyr2[] =
+{
+       0,     2,     1,     1,     1,     1,     1,     3,     6,     1,
+       2,     1,     1,     1,     1,     4,     4,     3,     3,     3,
+       2,     2,     1,     3,     1,     2,     2,     2,     2,     4,
+       1,     1,     1,     1,     1,     1,     1,     4,     1,     3,
+       3,     3,     1,     3,     3,     1,     3,     3,     1,     3,
+       3,     3,     3,     1,     3,     3,     1,     3,     1,     3,
+       1,     3,     1,     3,     1,     3,     1,     5,     1,     3,
+       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+       1,     1,     3,     2,     1,     3,     2,     2,     1,     2,
+       1,     2,     1,     2,     1,     1,     3,     1,     3,     1,
+       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+       1,     1,     1,     1,     1,     1,     1,     5,     4,     2,
+       1,     1,     1,     2,     3,     2,     1,     2,     1,     1,
+       3,     0,     1,     2,     3,     5,     4,     6,     5,     2,
+       1,     0,     2,     3,     1,     3,     1,     1,     1,     1,
+       1,     2,     1,     1,     3,     4,     3,     4,     4,     3,
+       2,     1,     3,     2,     1,     2,     1,     3,     2,     2,
+       1,     1,     1,     3,     1,     2,     1,     1,     2,     3,
+       2,     3,     3,     4,     2,     3,     3,     4,     1,     1,
+       3,     4,     1,     3,     1,     1,     1,     1,     1,     1,
+       3,     4,     3,     2,     3,     1,     2,     1,     1,     1,
+       2,     5,     7,     5,     5,     7,     6,     7,     7,     8,
+       7,     8,     8,     9,     3,     2,     2,     2,     3,     1,
+       2,     1,     1,     1,     4,     3,     1,     2,     1,     1,
+       4,     2,     1,     1,     1
+};
+
+/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
+   Performed when YYTABLE doesn't specify something else to do.  Zero
+   means the default is an error.  */
+static const yytype_uint8 yydefact[] =
+{
+       0,   244,   188,   102,   113,   105,   146,   110,   140,   148,
+     100,   109,   150,   107,   108,   103,   147,   106,   111,   101,
+     120,    99,   121,   112,   104,   149,   238,   239,   232,     0,
+      88,    90,   114,     0,   115,     0,    92,    94,   116,     0,
+     229,   231,     0,     0,   242,   243,   233,    11,     0,   161,
+      86,   153,     0,    95,    97,   152,     0,    87,    89,     0,
+      12,   119,    13,   141,   139,    91,    93,     1,   230,     0,
+       3,     5,     4,     9,     0,     0,     0,     0,     0,    30,
+      31,    32,    33,    34,    35,    14,     6,     2,    24,    36,
+       0,    38,    42,    45,    48,    53,    56,    58,    60,    62,
+      64,    66,    84,   241,     0,   164,   163,   160,     0,    85,
+       0,     0,   236,     0,   235,     0,     0,     0,   151,   126,
+       0,   122,   131,   128,     0,     0,     0,   141,   172,     0,
+       0,    25,    26,     0,     0,    28,   148,    36,    68,    81,
+       0,   174,     0,    10,    20,    21,     0,     0,     0,     0,
+      27,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     154,   165,   162,    96,    97,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   203,   209,     2,     0,
+       0,   207,   116,   208,   194,   195,     0,   205,   196,   197,
+     198,   199,     0,   189,    98,   237,   234,   171,   159,   170,
+       0,   166,     0,   156,     0,   125,   118,   123,     0,     0,
+     129,   132,   127,     0,   136,     0,   144,   142,     0,   240,
+       0,     0,     0,     0,     0,    83,    74,    75,    71,    72,
+      73,    79,    78,    80,    76,    77,    70,     0,     7,     0,
+       0,     0,   176,   175,   177,     0,    19,    17,     0,    22,
+       0,    18,    39,    40,    41,    43,    44,    46,    47,    51,
+      52,    49,    50,    54,    55,    57,    59,    61,    63,    65,
+       0,   226,     0,   225,     0,     0,     0,     0,     0,   227,
+       0,     0,     0,     0,   210,   204,   206,   192,     0,     0,
+     168,   176,   169,   157,     0,   158,   155,   133,   131,   124,
+       0,   117,   138,   143,     0,   135,     0,   173,     0,    29,
+      69,    82,   184,     0,     0,   180,     0,   178,     0,     0,
+      37,    16,     0,    15,     0,     0,   202,     0,     0,     0,
+     224,     0,   228,     0,     0,   200,   190,     0,   167,   130,
+     134,   145,   137,     0,   185,   179,   181,   186,     0,   182,
+       0,    23,    67,   201,     0,     0,     0,     0,     0,     0,
+       0,   191,   193,     8,   187,   183,     0,     0,     0,     0,
+       0,     0,   211,   213,   214,     0,   216,     0,     0,     0,
+       0,     0,     0,     0,   215,   220,   218,     0,   217,     0,
+       0,     0,   212,   222,   221,   219,     0,   223
+};
+
+/* YYDEFGOTO[NTERM-NUM].  */
+static const yytype_int16 yydefgoto[] =
+{
+      -1,    85,    86,    87,   189,    88,   258,   137,    90,    91,
+      92,    93,    94,    95,    96,    97,    98,    99,   100,   101,
+     138,   139,   247,   190,   103,   191,   113,    52,    53,    30,
+      31,    32,    33,   120,   121,   122,   219,   220,    34,    35,
+     125,   126,   313,    36,    37,   104,    55,    56,   107,   323,
+     211,   129,   142,   324,   254,    38,   204,   298,   193,   194,
+     195,   196,   197,   198,   199,   200,   201,    39,    40,    41,
+     115,    42,    43,    44,    45,    46
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+   STATE-NUM.  */
+#define YYPACT_NINF -224
+static const yytype_int16 yypact[] =
+{
+    1857,  -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,
+    -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,
+    -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,    20,
+    2069,  2069,  -224,    59,  -224,    66,  2069,  2069,  -224,  1746,
+    -224,  -224,   -38,  1451,  -224,  -224,  -224,  -224,    23,   151,
+    -224,  -224,   -43,  -224,   970,   -17,    22,  -224,  -224,  2103,
+    -224,   -16,  -224,  -224,    12,  -224,  -224,  -224,  -224,    39,
+    -224,  -224,  -224,  -224,  1478,  1478,    40,  1508,  1119,  -224,
+    -224,  -224,  -224,  -224,  -224,  -224,   108,  -224,   161,  -224,
+    1451,  -224,   129,    68,   255,    29,   198,    49,    42,    51,
+     130,     1,  -224,  -224,   165,  -224,  -224,   151,    23,  -224,
+     473,  1184,  -224,    20,  -224,  1960,  1923,  1217,   -17,  2103,
+    1780,  -224,    71,  2103,  2103,     4,    39,  -224,  -224,    87,
+    1535,  -224,  -224,   157,  1119,  -224,  1565,   472,  -224,  -224,
+      95,   137,   167,  -224,  -224,  -224,   196,  1244,  1535,   196,
+    -224,  1451,  1451,  1451,  1451,  1451,  1451,  1451,  1451,  1451,
+    1451,  1451,  1451,  1451,  1451,  1451,  1451,  1451,  1451,  1535,
+    -224,  -224,  -224,  -224,   117,   160,  1451,   162,   159,   803,
+     194,   196,   197,   819,   215,   217,  -224,  -224,   205,   214,
+     -42,  -224,   218,  -224,  -224,  -224,   563,  -224,  -224,  -224,
+    -224,  -224,  1184,  -224,  -224,  -224,  -224,  -224,  -224,   124,
+     106,  -224,   109,  -224,   231,  -224,  -224,  -224,  1451,   -25,
+    -224,   219,  -224,  1814,  -224,    32,   220,  -224,   133,  -224,
+      39,  1565,   723,   240,  1039,   237,  -224,  -224,  -224,  -224,
+    -224,  -224,  -224,  -224,  -224,  -224,  -224,  1451,  -224,  1451,
+    1679,  1274,   158,  -224,   202,  1451,  -224,  -224,   122,  -224,
+      -3,  -224,  -224,  -224,  -224,   129,   129,    68,    68,   255,
+     255,   255,   255,    29,    29,   198,    49,    42,    51,   130,
+     -44,  -224,   224,  -224,   803,   249,   884,   226,  1535,  -224,
+      62,  1535,  1535,   803,  -224,  -224,  -224,  -224,   209,  1617,
+    -224,    34,  -224,  -224,  2034,  -224,  -224,  -224,    71,  -224,
+    1451,  -224,  -224,  -224,  1451,  -224,    33,  -224,   643,  -224,
+    -224,  -224,  -224,   148,   251,  -224,   250,   202,  1997,  1301,
+    -224,  -224,  1451,  -224,  1451,   803,  -224,   257,   900,    70,
+    -224,   149,  -224,   169,   172,  -224,  -224,  1137,  -224,  -224,
+    -224,  -224,  -224,   258,  -224,  -224,  -224,  -224,   177,  -224,
+     253,  -224,  -224,  -224,  1535,  1331,    77,   916,   803,   803,
+     803,  -224,  -224,  -224,  -224,  -224,   180,   803,   181,  1361,
+    1391,    83,   288,  -224,  -224,   238,  -224,   803,   803,   189,
+     803,   191,  1421,   803,  -224,  -224,  -224,   803,  -224,   803,
+     803,   192,  -224,  -224,  -224,  -224,   803,  -224
+};
+
+/* YYPGOTO[NTERM-NUM].  */
+static const yytype_int16 yypgoto[] =
+{
+    -224,  -224,  -224,   -29,   -21,  -224,  -224,   248,  -224,   -87,
+     128,   136,   138,   139,   170,   168,   176,   178,   175,  -224,
+     -34,  -106,  -224,   -48,  -159,    21,     8,  -224,   227,  -224,
+      54,  -224,  -224,   223,  -113,   -62,  -224,    41,  -224,  -224,
+     225,  -224,   230,    -1,  -224,   -14,   -55,   -39,  -224,  -114,
+      46,   235,   229,   -98,  -223,   -15,  -189,  -224,    53,  -224,
+     -30,   125,  -174,  -224,  -224,  -224,  -224,  -224,   321,  -224,
+    -224,  -224,  -224,  -224,  -224,  -224
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
+   positive, shift that token.  If negative, reduce the rule which
+   number is the opposite.  If YYTABLE_NINF, syntax error.  */
+#define YYTABLE_NINF -14
+static const yytype_int16 yytable[] =
+{
+      51,   118,   210,   150,    60,   203,    60,   217,    29,   102,
+     106,   214,    61,   297,    64,    54,   141,   282,    62,    51,
+      62,    28,   296,    47,   114,    47,    47,    51,   168,   327,
+     140,    69,   249,   108,   249,    47,    47,    47,    57,    58,
+     128,   259,    47,   253,    65,    66,   334,    29,   105,   109,
+     294,   308,   116,   158,   159,   124,   117,   215,   123,   307,
+      28,   222,    47,     2,   262,   263,   264,   309,   172,    47,
+       2,   333,   141,   249,    47,   112,   224,   123,   327,    51,
+     225,   188,   140,   127,    51,   206,   140,   128,   235,    48,
+     169,    48,    48,    51,   174,   192,   203,   226,    49,   174,
+     260,    49,   252,   299,   312,   352,   171,   251,   221,   133,
+     217,   302,    50,   119,   160,   161,   143,    60,   123,   123,
+      60,   280,   123,   123,   209,   256,   164,    47,   261,   165,
+      59,    62,   119,   123,    62,   290,   205,    63,   249,   166,
+      48,   320,   102,   321,   296,   326,   249,   154,   155,    49,
+     188,   350,    60,   249,   342,   351,   167,   229,   372,   249,
+     287,   218,   367,   230,    62,   248,    62,   188,   330,   379,
+     301,   249,   141,   119,   119,   392,   303,   119,   119,   305,
+      51,   192,   304,   235,   102,   230,   140,     6,   119,   144,
+     145,   146,   331,   299,     9,   300,   226,   251,   332,    47,
+       2,   317,    49,   188,    16,   315,   250,   151,   111,   316,
+     251,   252,   152,   153,   358,    49,    25,   192,   354,   368,
+     162,   163,   123,   360,   304,   249,   361,   250,   232,    49,
+     147,   251,   285,   123,   148,   170,   149,   255,   339,   369,
+     341,   203,   370,   343,   344,   249,   118,   374,   249,   284,
+     385,   387,   281,   304,   283,   188,   249,   249,   209,   397,
+     301,   399,   406,   286,   188,   249,   288,   249,   249,    62,
+      51,   328,    51,   156,   157,   329,   102,   119,    62,    51,
+     102,   346,   265,   266,   291,   347,   292,   226,   119,   188,
+     366,    89,   267,   268,   221,   -12,   269,   270,   271,   272,
+     362,   273,   274,   192,   293,   306,   188,   209,   -13,   310,
+     319,   314,   209,   249,   335,   337,   376,   378,   340,   381,
+      62,   355,   131,   132,   356,   135,   364,   375,   373,   393,
+     394,   389,   391,   276,   275,   173,   209,   336,    89,   188,
+     188,   188,   277,   279,   401,   278,   345,   223,   188,   349,
+     348,   212,   228,    62,    62,    62,   227,   318,   188,   188,
+      68,   188,    62,   233,   188,     0,     0,     0,   188,     0,
+     188,   188,    62,    62,     0,    62,     0,   188,    62,     0,
+       0,     0,    62,     0,    62,    62,     0,     0,   363,     0,
+       0,    62,     0,     0,     0,     0,     0,     0,     0,    89,
+      89,    89,    89,    89,    89,    89,    89,    89,    89,    89,
+      89,    89,    89,    89,    89,    89,    89,     0,     0,     0,
+       0,   382,   383,   384,    89,     0,     0,     0,     0,     0,
+     386,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     395,   396,     0,   398,     0,     0,   402,     0,     0,     0,
+     403,     0,   404,   405,     0,     0,     0,     0,     0,   407,
+       0,     0,     0,     0,     0,     0,    89,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    47,     2,    70,    71,
+      72,    73,   236,   237,   238,   239,   240,   241,   242,   243,
+       0,     0,   244,   245,     0,     0,     0,     0,     0,     0,
+       0,    74,    75,    89,     3,     4,   175,   176,     5,     6,
+     177,   178,   179,     7,     0,     8,   136,    10,    11,   180,
+     181,   182,    12,    13,    14,    15,    16,   183,    17,    18,
+      77,    19,    20,   184,    21,    22,    23,    24,    25,   185,
+       0,     0,    78,     0,   110,   186,     0,     0,     0,     0,
+      79,    80,    81,    82,    83,    84,     0,     0,    89,     0,
+       0,     0,    89,   246,     0,   187,    47,     2,    70,    71,
+      72,    73,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,    89,     0,     0,     0,     0,     0,     0,     0,
+       0,    74,    75,     0,     3,     4,   175,   176,     5,     6,
+     177,   178,   179,     7,     0,     8,   136,    10,    11,   180,
+     181,   182,    12,    13,    14,    15,    16,   183,    17,    18,
+      77,    19,    20,   184,    21,    22,    23,    24,    25,   185,
+       0,     0,    78,     0,   110,   295,     0,     0,     0,     0,
+      79,    80,    81,    82,    83,    84,    47,     2,    70,    71,
+      72,    73,     0,     0,     0,   187,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,    74,    75,     0,     3,     4,   175,   176,     5,     6,
+     177,   178,   179,     7,     0,     8,   136,    10,    11,   180,
+     181,   182,    12,    13,    14,    15,    16,   183,    17,    18,
+      77,    19,    20,   184,    21,    22,    23,    24,    25,   185,
+       0,     0,    78,     0,   110,   353,     0,     0,     0,     0,
+      79,    80,    81,    82,    83,    84,    47,     2,    70,    71,
+      72,    73,     0,     0,     0,   187,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,    74,    75,     0,     3,     4,   175,   176,     5,     6,
+     177,   178,   179,     7,     0,     8,   136,    10,    11,   180,
+     181,   182,    12,    13,    14,    15,    16,   183,    17,    18,
+      77,    19,    20,   184,    21,    22,    23,    24,    25,   185,
+       0,     0,    78,     0,   110,     0,     0,     0,     0,     0,
+      79,    80,    81,    82,    83,    84,    47,     2,    70,    71,
+      72,    73,     0,     0,     0,   187,     0,     0,     0,     0,
+       0,     0,    47,     0,    70,    71,    72,    73,     0,     0,
+       0,    74,    75,     0,     0,     0,   175,   176,     0,     0,
+     177,   178,   179,     0,     0,     0,   231,    74,    75,   180,
+     181,   182,     0,     0,     0,     0,     0,   183,     0,     0,
+      77,     0,   231,   184,     0,     0,     0,     0,     0,   185,
+       0,     0,    78,     0,   110,     0,    77,     0,     0,     0,
+      79,    80,    81,    82,    83,    84,     0,    47,    78,    70,
+      71,    72,    73,     0,     0,   187,    79,    80,    81,    82,
+      83,    84,     0,    47,     0,    70,    71,    72,    73,     0,
+       0,   289,    74,    75,     0,     0,     0,     0,     0,    47,
+       0,    70,    71,    72,    73,     0,     0,   231,    74,    75,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,    77,     0,   231,    74,    75,     0,     0,     0,     0,
+       0,     0,     0,    78,     0,     0,     0,    77,     0,   231,
+       0,    79,    80,    81,    82,    83,    84,     0,     0,    78,
+       0,     0,     0,    77,     2,     0,   338,    79,    80,    81,
+      82,    83,    84,     0,     0,    78,     0,     0,     0,     0,
+       0,     0,   365,    79,    80,    81,    82,    83,    84,     0,
+       0,     3,     4,     0,     0,     5,     6,     0,   380,     0,
+       7,     0,     8,     9,    10,    11,     0,     0,     0,    12,
+      13,    14,    15,    16,     0,    17,    18,     0,    19,    20,
+       0,    21,    22,    23,    24,    25,     0,     0,     0,     0,
+       0,   110,    47,     2,    70,    71,    72,    73,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   111,     0,     0,     0,     0,     0,    74,    75,     0,
+       0,     4,     0,     0,     5,     6,     0,     0,     0,     7,
+       0,     8,   136,     0,    11,     0,     0,     0,     0,    13,
+      14,     0,    16,     0,    17,    18,    77,     0,    20,     0,
+       0,    22,    23,    24,    25,     0,     0,     0,    78,     0,
+     232,     0,     0,     0,     0,     0,    79,    80,    81,    82,
+      83,    84,    47,     2,    70,    71,    72,    73,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+      47,     0,    70,    71,    72,    73,     0,    74,    75,     0,
+       0,     4,     0,     0,     5,     6,     0,     0,     0,     7,
+       0,     8,   136,     0,    11,    74,    75,     0,     0,    13,
+      14,     0,    16,     0,    17,    18,    77,     0,    20,     0,
+      76,    22,    23,    24,    25,     0,     0,    47,    78,    70,
+      71,    72,    73,     0,    77,     0,    79,    80,    81,    82,
+      83,    84,     0,     0,     0,     0,    78,     0,   202,   371,
+       0,     0,    74,    75,    79,    80,    81,    82,    83,    84,
+      47,     0,    70,    71,    72,    73,     0,    76,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,    77,     0,     0,     0,    74,    75,    47,     0,    70,
+      71,    72,    73,    78,     0,   202,     0,     0,     0,     0,
+      76,    79,    80,    81,    82,    83,    84,     0,     0,     0,
+       0,     0,    74,    75,    77,     0,     0,    47,     0,    70,
+      71,    72,    73,     0,     0,     0,    78,    76,     0,     0,
+       0,   213,     0,     0,    79,    80,    81,    82,    83,    84,
+       0,    77,    74,    75,    47,     0,    70,    71,    72,    73,
+       0,     0,     0,    78,   257,     0,     0,    76,     0,     0,
+       0,    79,    80,    81,    82,    83,    84,     0,     0,    74,
+      75,    77,     0,     0,    47,     0,    70,    71,    72,    73,
+       0,     0,     0,    78,    76,     0,     0,     0,   325,     0,
+       0,    79,    80,    81,    82,    83,    84,     0,    77,    74,
+      75,     0,     0,     0,    47,     0,    70,    71,    72,    73,
+      78,     0,     0,     0,   231,   359,     0,     0,    79,    80,
+      81,    82,    83,    84,     0,     0,     0,     0,    77,    74,
+      75,     0,     0,     0,    47,     0,    70,    71,    72,    73,
+      78,   377,     0,     0,   231,     0,     0,     0,    79,    80,
+      81,    82,    83,    84,     0,     0,     0,     0,    77,    74,
+      75,     0,     0,     0,    47,     0,    70,    71,    72,    73,
+      78,   388,     0,     0,   231,     0,     0,     0,    79,    80,
+      81,    82,    83,    84,     0,     0,     0,     0,    77,    74,
+      75,     0,     0,     0,    47,     0,    70,    71,    72,    73,
+      78,   390,     0,     0,   231,     0,     0,     0,    79,    80,
+      81,    82,    83,    84,     0,     0,     0,     0,    77,    74,
+      75,    47,     0,    70,    71,    72,    73,     0,     0,     0,
+      78,   400,     0,     0,    76,     0,     0,     0,    79,    80,
+      81,    82,    83,    84,     0,     0,    74,    75,    77,     0,
+       0,    47,     0,    70,    71,    72,    73,     0,     0,     0,
+      78,    76,     0,     0,     0,     0,     0,     0,    79,    80,
+      81,    82,    83,    84,     0,    77,    74,    75,    47,     0,
+      70,    71,    72,    73,     0,     0,     0,   130,     0,     0,
+       0,    76,     0,     0,     0,    79,    80,    81,    82,    83,
+      84,     0,     0,    74,    75,    77,     0,     0,    47,     0,
+      70,    71,    72,    73,     0,     0,     0,   134,   231,     0,
+       0,     0,     0,     0,     0,    79,    80,    81,    82,    83,
+      84,     0,    77,    74,    75,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    78,     0,     0,     0,   231,     0,
+       0,     0,    79,    80,    81,    82,    83,    84,     0,     0,
+      47,     2,    77,     0,     0,     0,   207,     0,     0,     0,
+       0,     0,     0,     0,   234,     0,     0,     0,     0,     0,
+       0,     0,    79,    80,    81,    82,    83,    84,     3,     4,
+       0,     0,     5,     6,     0,     0,     0,     7,     0,     8,
+       9,    10,    11,     0,     0,     0,    12,    13,    14,    15,
+      16,     0,    17,    18,     0,    19,    20,     0,    21,    22,
+      23,    24,    25,     2,     0,     0,   299,   322,   207,     0,
+     251,     0,     0,     0,     0,    49,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       3,     4,     0,     0,     5,     6,     0,     0,     0,     7,
+       0,     8,     9,    10,    11,     0,     0,     0,    12,    13,
+      14,    15,    16,     0,    17,    18,     0,    19,    20,     0,
+      21,    22,    23,    24,    25,     0,    67,     1,   250,   322,
+       2,     0,   251,     0,     0,     0,     0,    49,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     3,     4,     0,
+       0,     5,     6,     0,     2,     0,     7,     0,     8,     9,
+      10,    11,     0,     0,     0,    12,    13,    14,    15,    16,
+       0,    17,    18,     0,    19,    20,     0,    21,    22,    23,
+      24,    25,     4,    26,    27,     5,     6,     0,     2,     0,
+       7,     0,     8,     9,     0,    11,     0,     0,     0,     0,
+      13,    14,     0,    16,     0,    17,    18,     0,     0,    20,
+       0,     0,    22,    23,    24,    25,     4,     0,     0,     5,
+       6,     0,   216,     0,     7,     0,     8,     9,     1,    11,
+       0,     2,     0,     0,    13,    14,     0,    16,     0,    17,
+      18,     0,     0,    20,     0,     0,    22,    23,    24,    25,
+       0,     0,     0,     0,     0,     0,   311,     0,     3,     4,
+       0,     0,     5,     6,     0,     0,     0,     7,     0,     8,
+       9,    10,    11,     0,     0,     0,    12,    13,    14,    15,
+      16,     0,    17,    18,     0,    19,    20,     0,    21,    22,
+      23,    24,    25,     0,    26,    27,    47,     2,     0,     0,
+       0,     0,   207,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     3,     4,     0,     0,     5,     6,
+       0,     0,     0,     7,     2,     8,     9,    10,    11,     0,
+       0,     0,    12,    13,    14,    15,    16,     0,    17,    18,
+       0,    19,    20,     0,    21,    22,    23,    24,    25,     0,
+       0,     3,     4,   208,     0,     5,     6,     0,     0,     0,
+       7,     2,     8,     9,    10,    11,   207,     0,     0,    12,
+      13,    14,    15,    16,     0,    17,    18,     0,    19,    20,
+       0,    21,    22,    23,    24,    25,     0,     0,     3,     4,
+       0,   110,     5,     6,     0,     0,     0,     7,     2,     8,
+       9,    10,    11,   207,     0,     0,    12,    13,    14,    15,
+      16,     0,    17,    18,     0,    19,    20,     0,    21,    22,
+      23,    24,    25,     0,     0,     3,     4,   357,     0,     5,
+       6,     0,     0,     2,     7,     0,     8,     9,    10,    11,
+       0,     0,     0,    12,    13,    14,    15,    16,     0,    17,
+      18,     0,    19,    20,     0,    21,    22,    23,    24,    25,
+       3,     4,     0,     0,     5,     6,     0,     2,     0,     7,
+       0,     8,     9,    10,    11,     0,     0,     0,    12,    13,
+      14,    15,    16,     0,    17,    18,     0,    19,    20,     0,
+      21,    22,    23,    24,    25,     4,     0,     0,     5,     6,
+       0,     0,     0,     7,     0,     8,     9,     0,    11,     0,
+       0,     0,     0,    13,    14,     0,    16,     0,    17,    18,
+       0,     0,    20,     0,     0,    22,    23,    24,    25
+};
+
+#define yypact_value_is_default(yystate) \
+  ((yystate) == (-224))
+
+#define yytable_value_is_error(yytable_value) \
+  YYID (0)
+
+static const yytype_int16 yycheck[] =
+{
+      29,    56,   116,    90,    33,   111,    35,   120,     0,    43,
+      49,   117,    33,   202,    35,    29,    78,   176,    33,    48,
+      35,     0,   196,     3,    54,     3,     3,    56,    27,   252,
+      78,    69,    76,    76,    76,     3,     3,     3,    30,    31,
+      69,   147,     3,   141,    36,    37,    90,    39,    49,    92,
+      92,    76,    69,    24,    25,    71,    73,   119,    59,   218,
+      39,   123,     3,     4,   151,   152,   153,    92,   107,     3,
+       4,    74,   134,    76,     3,    54,    72,    78,   301,   108,
+      76,   110,   130,    71,   113,   115,   134,   116,   136,    69,
+      89,    69,    69,   122,   108,   110,   202,   126,    78,   113,
+     148,    78,   141,    69,    72,    72,   107,    73,   122,    69,
+     223,   209,    92,    59,    85,    86,     8,   146,   119,   120,
+     149,   169,   123,   124,   116,   146,    77,     3,   149,    87,
+      71,   146,    78,   134,   149,   183,   115,    71,    76,    88,
+      69,   247,   176,   249,   318,   251,    76,    79,    80,    78,
+     179,   310,   181,    76,    92,   314,    26,    70,   347,    76,
+     181,    90,    92,    76,   179,    70,   181,   196,   255,    92,
+     209,    76,   234,   119,   120,    92,    70,   123,   124,    70,
+     209,   196,    76,   231,   218,    76,   234,    36,   134,    28,
+      29,    30,    70,    69,    43,   209,   225,    73,    76,     3,
+       4,   230,    78,   232,    53,    72,    69,    78,    91,    76,
+      73,   250,    83,    84,   328,    78,    65,   232,    70,    70,
+      22,    23,   223,   329,    76,    76,   332,    69,    71,    78,
+      69,    73,   179,   234,    73,    70,    75,    70,   286,    70,
+     288,   347,    70,   291,   292,    76,   301,    70,    76,    90,
+      70,    70,    92,    76,    92,   284,    76,    76,   250,    70,
+     299,    70,    70,    69,   293,    76,    69,    76,    76,   284,
+     299,    69,   301,    18,    19,    73,   310,   223,   293,   308,
+     314,    72,   154,   155,    69,    76,    69,   316,   234,   318,
+     338,    43,   156,   157,   308,    90,   158,   159,   160,   161,
+     334,   162,   163,   318,    90,    74,   335,   299,    90,    90,
+      70,    91,   304,    76,    90,    66,   364,   365,    92,   367,
+     335,    70,    74,    75,    74,    77,    69,    74,    70,    41,
+      92,   379,   380,   165,   164,   108,   328,   284,    90,   368,
+     369,   370,   166,   168,   392,   167,   293,   124,   377,   308,
+     304,   116,   127,   368,   369,   370,   126,   232,   387,   388,
+      39,   390,   377,   134,   393,    -1,    -1,    -1,   397,    -1,
+     399,   400,   387,   388,    -1,   390,    -1,   406,   393,    -1,
+      -1,    -1,   397,    -1,   399,   400,    -1,    -1,   335,    -1,
+      -1,   406,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   151,
+     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
+     162,   163,   164,   165,   166,   167,   168,    -1,    -1,    -1,
+      -1,   368,   369,   370,   176,    -1,    -1,    -1,    -1,    -1,
+     377,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     387,   388,    -1,   390,    -1,    -1,   393,    -1,    -1,    -1,
+     397,    -1,   399,   400,    -1,    -1,    -1,    -1,    -1,   406,
+      -1,    -1,    -1,    -1,    -1,    -1,   218,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,     3,     4,     5,     6,
+       7,     8,    10,    11,    12,    13,    14,    15,    16,    17,
+      -1,    -1,    20,    21,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    28,    29,   255,    31,    32,    33,    34,    35,    36,
+      37,    38,    39,    40,    -1,    42,    43,    44,    45,    46,
+      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
+      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
+      -1,    -1,    69,    -1,    71,    72,    -1,    -1,    -1,    -1,
+      77,    78,    79,    80,    81,    82,    -1,    -1,   310,    -1,
+      -1,    -1,   314,    91,    -1,    92,     3,     4,     5,     6,
+       7,     8,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   334,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    28,    29,    -1,    31,    32,    33,    34,    35,    36,
+      37,    38,    39,    40,    -1,    42,    43,    44,    45,    46,
+      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
+      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
+      -1,    -1,    69,    -1,    71,    72,    -1,    -1,    -1,    -1,
+      77,    78,    79,    80,    81,    82,     3,     4,     5,     6,
+       7,     8,    -1,    -1,    -1,    92,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    28,    29,    -1,    31,    32,    33,    34,    35,    36,
+      37,    38,    39,    40,    -1,    42,    43,    44,    45,    46,
+      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
+      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
+      -1,    -1,    69,    -1,    71,    72,    -1,    -1,    -1,    -1,
+      77,    78,    79,    80,    81,    82,     3,     4,     5,     6,
+       7,     8,    -1,    -1,    -1,    92,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    28,    29,    -1,    31,    32,    33,    34,    35,    36,
+      37,    38,    39,    40,    -1,    42,    43,    44,    45,    46,
+      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
+      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
+      -1,    -1,    69,    -1,    71,    -1,    -1,    -1,    -1,    -1,
+      77,    78,    79,    80,    81,    82,     3,     4,     5,     6,
+       7,     8,    -1,    -1,    -1,    92,    -1,    -1,    -1,    -1,
+      -1,    -1,     3,    -1,     5,     6,     7,     8,    -1,    -1,
+      -1,    28,    29,    -1,    -1,    -1,    33,    34,    -1,    -1,
+      37,    38,    39,    -1,    -1,    -1,    43,    28,    29,    46,
+      47,    48,    -1,    -1,    -1,    -1,    -1,    54,    -1,    -1,
+      57,    -1,    43,    60,    -1,    -1,    -1,    -1,    -1,    66,
+      -1,    -1,    69,    -1,    71,    -1,    57,    -1,    -1,    -1,
+      77,    78,    79,    80,    81,    82,    -1,     3,    69,     5,
+       6,     7,     8,    -1,    -1,    92,    77,    78,    79,    80,
+      81,    82,    -1,     3,    -1,     5,     6,     7,     8,    -1,
+      -1,    92,    28,    29,    -1,    -1,    -1,    -1,    -1,     3,
+      -1,     5,     6,     7,     8,    -1,    -1,    43,    28,    29,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    57,    -1,    43,    28,    29,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    69,    -1,    -1,    -1,    57,    -1,    43,
+      -1,    77,    78,    79,    80,    81,    82,    -1,    -1,    69,
+      -1,    -1,    -1,    57,     4,    -1,    92,    77,    78,    79,
+      80,    81,    82,    -1,    -1,    69,    -1,    -1,    -1,    -1,
+      -1,    -1,    92,    77,    78,    79,    80,    81,    82,    -1,
+      -1,    31,    32,    -1,    -1,    35,    36,    -1,    92,    -1,
+      40,    -1,    42,    43,    44,    45,    -1,    -1,    -1,    49,
+      50,    51,    52,    53,    -1,    55,    56,    -1,    58,    59,
+      -1,    61,    62,    63,    64,    65,    -1,    -1,    -1,    -1,
+      -1,    71,     3,     4,     5,     6,     7,     8,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    91,    -1,    -1,    -1,    -1,    -1,    28,    29,    -1,
+      -1,    32,    -1,    -1,    35,    36,    -1,    -1,    -1,    40,
+      -1,    42,    43,    -1,    45,    -1,    -1,    -1,    -1,    50,
+      51,    -1,    53,    -1,    55,    56,    57,    -1,    59,    -1,
+      -1,    62,    63,    64,    65,    -1,    -1,    -1,    69,    -1,
+      71,    -1,    -1,    -1,    -1,    -1,    77,    78,    79,    80,
+      81,    82,     3,     4,     5,     6,     7,     8,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+       3,    -1,     5,     6,     7,     8,    -1,    28,    29,    -1,
+      -1,    32,    -1,    -1,    35,    36,    -1,    -1,    -1,    40,
+      -1,    42,    43,    -1,    45,    28,    29,    -1,    -1,    50,
+      51,    -1,    53,    -1,    55,    56,    57,    -1,    59,    -1,
+      43,    62,    63,    64,    65,    -1,    -1,     3,    69,     5,
+       6,     7,     8,    -1,    57,    -1,    77,    78,    79,    80,
+      81,    82,    -1,    -1,    -1,    -1,    69,    -1,    71,    72,
+      -1,    -1,    28,    29,    77,    78,    79,    80,    81,    82,
+       3,    -1,     5,     6,     7,     8,    -1,    43,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    57,    -1,    -1,    -1,    28,    29,     3,    -1,     5,
+       6,     7,     8,    69,    -1,    71,    -1,    -1,    -1,    -1,
+      43,    77,    78,    79,    80,    81,    82,    -1,    -1,    -1,
+      -1,    -1,    28,    29,    57,    -1,    -1,     3,    -1,     5,
+       6,     7,     8,    -1,    -1,    -1,    69,    43,    -1,    -1,
+      -1,    74,    -1,    -1,    77,    78,    79,    80,    81,    82,
+      -1,    57,    28,    29,     3,    -1,     5,     6,     7,     8,
+      -1,    -1,    -1,    69,    70,    -1,    -1,    43,    -1,    -1,
+      -1,    77,    78,    79,    80,    81,    82,    -1,    -1,    28,
+      29,    57,    -1,    -1,     3,    -1,     5,     6,     7,     8,
+      -1,    -1,    -1,    69,    43,    -1,    -1,    -1,    74,    -1,
+      -1,    77,    78,    79,    80,    81,    82,    -1,    57,    28,
+      29,    -1,    -1,    -1,     3,    -1,     5,     6,     7,     8,
+      69,    -1,    -1,    -1,    43,    74,    -1,    -1,    77,    78,
+      79,    80,    81,    82,    -1,    -1,    -1,    -1,    57,    28,
+      29,    -1,    -1,    -1,     3,    -1,     5,     6,     7,     8,
+      69,    70,    -1,    -1,    43,    -1,    -1,    -1,    77,    78,
+      79,    80,    81,    82,    -1,    -1,    -1,    -1,    57,    28,
+      29,    -1,    -1,    -1,     3,    -1,     5,     6,     7,     8,
+      69,    70,    -1,    -1,    43,    -1,    -1,    -1,    77,    78,
+      79,    80,    81,    82,    -1,    -1,    -1,    -1,    57,    28,
+      29,    -1,    -1,    -1,     3,    -1,     5,     6,     7,     8,
+      69,    70,    -1,    -1,    43,    -1,    -1,    -1,    77,    78,
+      79,    80,    81,    82,    -1,    -1,    -1,    -1,    57,    28,
+      29,     3,    -1,     5,     6,     7,     8,    -1,    -1,    -1,
+      69,    70,    -1,    -1,    43,    -1,    -1,    -1,    77,    78,
+      79,    80,    81,    82,    -1,    -1,    28,    29,    57,    -1,
+      -1,     3,    -1,     5,     6,     7,     8,    -1,    -1,    -1,
+      69,    43,    -1,    -1,    -1,    -1,    -1,    -1,    77,    78,
+      79,    80,    81,    82,    -1,    57,    28,    29,     3,    -1,
+       5,     6,     7,     8,    -1,    -1,    -1,    69,    -1,    -1,
+      -1,    43,    -1,    -1,    -1,    77,    78,    79,    80,    81,
+      82,    -1,    -1,    28,    29,    57,    -1,    -1,     3,    -1,
+       5,     6,     7,     8,    -1,    -1,    -1,    69,    43,    -1,
+      -1,    -1,    -1,    -1,    -1,    77,    78,    79,    80,    81,
+      82,    -1,    57,    28,    29,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    69,    -1,    -1,    -1,    43,    -1,
+      -1,    -1,    77,    78,    79,    80,    81,    82,    -1,    -1,
+       3,     4,    57,    -1,    -1,    -1,     9,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    69,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    77,    78,    79,    80,    81,    82,    31,    32,
+      -1,    -1,    35,    36,    -1,    -1,    -1,    40,    -1,    42,
+      43,    44,    45,    -1,    -1,    -1,    49,    50,    51,    52,
+      53,    -1,    55,    56,    -1,    58,    59,    -1,    61,    62,
+      63,    64,    65,     4,    -1,    -1,    69,    70,     9,    -1,
+      73,    -1,    -1,    -1,    -1,    78,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      31,    32,    -1,    -1,    35,    36,    -1,    -1,    -1,    40,
+      -1,    42,    43,    44,    45,    -1,    -1,    -1,    49,    50,
+      51,    52,    53,    -1,    55,    56,    -1,    58,    59,    -1,
+      61,    62,    63,    64,    65,    -1,     0,     1,    69,    70,
+       4,    -1,    73,    -1,    -1,    -1,    -1,    78,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    31,    32,    -1,
+      -1,    35,    36,    -1,     4,    -1,    40,    -1,    42,    43,
+      44,    45,    -1,    -1,    -1,    49,    50,    51,    52,    53,
+      -1,    55,    56,    -1,    58,    59,    -1,    61,    62,    63,
+      64,    65,    32,    67,    68,    35,    36,    -1,     4,    -1,
+      40,    -1,    42,    43,    -1,    45,    -1,    -1,    -1,    -1,
+      50,    51,    -1,    53,    -1,    55,    56,    -1,    -1,    59,
+      -1,    -1,    62,    63,    64,    65,    32,    -1,    -1,    35,
+      36,    -1,    72,    -1,    40,    -1,    42,    43,     1,    45,
+      -1,     4,    -1,    -1,    50,    51,    -1,    53,    -1,    55,
+      56,    -1,    -1,    59,    -1,    -1,    62,    63,    64,    65,
+      -1,    -1,    -1,    -1,    -1,    -1,    72,    -1,    31,    32,
+      -1,    -1,    35,    36,    -1,    -1,    -1,    40,    -1,    42,
+      43,    44,    45,    -1,    -1,    -1,    49,    50,    51,    52,
+      53,    -1,    55,    56,    -1,    58,    59,    -1,    61,    62,
+      63,    64,    65,    -1,    67,    68,     3,     4,    -1,    -1,
+      -1,    -1,     9,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    31,    32,    -1,    -1,    35,    36,
+      -1,    -1,    -1,    40,     4,    42,    43,    44,    45,    -1,
+      -1,    -1,    49,    50,    51,    52,    53,    -1,    55,    56,
+      -1,    58,    59,    -1,    61,    62,    63,    64,    65,    -1,
+      -1,    31,    32,    70,    -1,    35,    36,    -1,    -1,    -1,
+      40,     4,    42,    43,    44,    45,     9,    -1,    -1,    49,
+      50,    51,    52,    53,    -1,    55,    56,    -1,    58,    59,
+      -1,    61,    62,    63,    64,    65,    -1,    -1,    31,    32,
+      -1,    71,    35,    36,    -1,    -1,    -1,    40,     4,    42,
+      43,    44,    45,     9,    -1,    -1,    49,    50,    51,    52,
+      53,    -1,    55,    56,    -1,    58,    59,    -1,    61,    62,
+      63,    64,    65,    -1,    -1,    31,    32,    70,    -1,    35,
+      36,    -1,    -1,     4,    40,    -1,    42,    43,    44,    45,
+      -1,    -1,    -1,    49,    50,    51,    52,    53,    -1,    55,
+      56,    -1,    58,    59,    -1,    61,    62,    63,    64,    65,
+      31,    32,    -1,    -1,    35,    36,    -1,     4,    -1,    40,
+      -1,    42,    43,    44,    45,    -1,    -1,    -1,    49,    50,
+      51,    52,    53,    -1,    55,    56,    -1,    58,    59,    -1,
+      61,    62,    63,    64,    65,    32,    -1,    -1,    35,    36,
+      -1,    -1,    -1,    40,    -1,    42,    43,    -1,    45,    -1,
+      -1,    -1,    -1,    50,    51,    -1,    53,    -1,    55,    56,
+      -1,    -1,    59,    -1,    -1,    62,    63,    64,    65
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+   symbol of state STATE-NUM.  */
+static const yytype_uint8 yystos[] =
+{
+       0,     1,     4,    31,    32,    35,    36,    40,    42,    43,
+      44,    45,    49,    50,    51,    52,    53,    55,    56,    58,
+      59,    61,    62,    63,    64,    65,    67,    68,   118,   119,
+     122,   123,   124,   125,   131,   132,   136,   137,   148,   160,
+     161,   162,   164,   165,   166,   167,   168,     3,    69,    78,
+      92,    96,   120,   121,   138,   139,   140,   119,   119,    71,
+      96,    97,   148,    71,    97,   119,   119,     0,   161,    69,
+       5,     6,     7,     8,    28,    29,    43,    57,    69,    77,
+      78,    79,    80,    81,    82,    94,    95,    96,    98,   100,
+     101,   102,   103,   104,   105,   106,   107,   108,   109,   110,
+     111,   112,   113,   117,   138,   136,   140,   141,    76,    92,
+      71,    91,   118,   119,   153,   163,    69,    73,   139,   123,
+     126,   127,   128,   136,    71,   133,   134,    71,    96,   144,
+      69,   100,   100,    69,    69,   100,    43,   100,   113,   114,
+     116,   128,   145,     8,    28,    29,    30,    69,    73,    75,
+     102,    78,    83,    84,    79,    80,    18,    19,    24,    25,
+      85,    86,    22,    23,    77,    87,    88,    26,    27,    89,
+      70,   136,   140,   121,   138,    33,    34,    37,    38,    39,
+      46,    47,    48,    54,    60,    66,    72,    92,    96,    97,
+     116,   118,   148,   151,   152,   153,   154,   155,   156,   157,
+     158,   159,    71,   114,   149,   118,   153,     9,    70,   119,
+     142,   143,   144,    74,   114,   128,    72,   127,    90,   129,
+     130,   138,   128,   126,    72,    76,    96,   135,   133,    70,
+      76,    43,    71,   145,    69,   116,    10,    11,    12,    13,
+      14,    15,    16,    17,    20,    21,    91,   115,    70,    76,
+      69,    73,   140,   146,   147,    70,    97,    70,    99,   114,
+     116,    97,   102,   102,   102,   103,   103,   104,   104,   105,
+     105,   105,   105,   106,   106,   107,   108,   109,   110,   111,
+     116,    92,   117,    92,    90,   151,    69,    97,    69,    92,
+     116,    69,    69,    90,    92,    72,   155,   149,   150,    69,
+     138,   140,   146,    70,    76,    70,    74,   117,    76,    92,
+      90,    72,    72,   135,    91,    72,    76,    96,   154,    70,
+     114,   114,    70,   142,   146,    74,   114,   147,    69,    73,
+     102,    70,    76,    74,    90,    90,   151,    66,    92,   116,
+      92,   116,    92,   116,   116,   151,    72,    76,   143,   130,
+     117,   117,    72,    72,    70,    70,    74,    70,   142,    74,
+     114,   114,   113,   151,    69,    92,   116,    92,    70,    70,
+      70,    72,   149,    70,    70,    74,   116,    70,   116,    92,
+      92,   116,   151,   151,   151,    70,   151,    70,    70,   116,
+      70,   116,    92,    41,    92,   151,   151,    70,   151,    70,
+      70,   116,   151,   151,   151,   151,    70,   151
+};
+
+#define yyerrok                (yyerrstatus = 0)
+#define yyclearin      (yychar = YYEMPTY)
+#define YYEMPTY                (-2)
+#define YYEOF          0
+
+#define YYACCEPT       goto yyacceptlab
+#define YYABORT                goto yyabortlab
+#define YYERROR                goto yyerrorlab
+
+
+/* Like YYERROR except do call yyerror.  This remains here temporarily
+   to ease the transition to the new meaning of YYERROR, for GCC.
+   Once GCC version 2 has supplanted version 1, this can go.  However,
+   YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
+   in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+   discussed.  */
+
+#define YYFAIL         goto yyerrlab
+#if defined YYFAIL
+  /* This is here to suppress warnings from the GCC cpp's
+     -Wunused-macros.  Normally we don't worry about that warning, but
+     some users do, and we want to make it easy for users to remove
+     YYFAIL uses, which will produce warnings from Bison 2.5.  */
+#endif
+
+#define YYRECOVERING()  (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value)                                 \
+do                                                             \
+  if (yychar == YYEMPTY && yylen == 1)                         \
+    {                                                          \
+      yychar = (Token);                                                \
+      yylval = (Value);                                                \
+      YYPOPSTACK (1);                                          \
+      goto yybackup;                                           \
+    }                                                          \
+  else                                                         \
+    {                                                          \
+      yyerror (scanner, YY_("syntax error: cannot back up")); \
+      YYERROR;                                                 \
+    }                                                          \
+while (YYID (0))
+
+
+#define YYTERROR       1
+#define YYERRCODE      256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+   If N is 0, then set CURRENT to the empty location which ends
+   the previous symbol: RHS[0] (always defined).  */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N)                               \
+    do                                                                 \
+      if (YYID (N))                                                    \
+       {                                                               \
+         (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
+         (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
+         (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
+         (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
+       }                                                               \
+      else                                                             \
+       {                                                               \
+         (Current).first_line   = (Current).last_line   =              \
+           YYRHSLOC (Rhs, 0).last_line;                                \
+         (Current).first_column = (Current).last_column =              \
+           YYRHSLOC (Rhs, 0).last_column;                              \
+       }                                                               \
+    while (YYID (0))
+#endif
+
+
+/* This macro is provided for backward compatibility. */
+
+#ifndef YY_LOCATION_PRINT
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments.  */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (YYLEX_PARAM)
+#else
+# define YYLEX yylex (scanner)
+#endif
+
+/* Enable debugging if requested.  */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args)                       \
+do {                                           \
+  if (yydebug)                                 \
+    YYFPRINTF Args;                            \
+} while (YYID (0))
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                   \
+do {                                                                     \
+  if (yydebug)                                                           \
+    {                                                                    \
+      YYFPRINTF (stderr, "%s ", Title);                                          \
+      yy_symbol_print (stderr,                                           \
+                 Type, Value, scanner); \
+      YYFPRINTF (stderr, "\n");                                                  \
+    }                                                                    \
+} while (YYID (0))
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, GISourceScanner* scanner)
+#else
+static void
+yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner)
+    FILE *yyoutput;
+    int yytype;
+    YYSTYPE const * const yyvaluep;
+    GISourceScanner* scanner;
+#endif
+{
+  if (!yyvaluep)
+    return;
+  YYUSE (scanner);
+# ifdef YYPRINT
+  if (yytype < YYNTOKENS)
+    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# else
+  YYUSE (yyoutput);
+# endif
+  switch (yytype)
+    {
+      default:
+       break;
+    }
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, GISourceScanner* scanner)
+#else
+static void
+yy_symbol_print (yyoutput, yytype, yyvaluep, scanner)
+    FILE *yyoutput;
+    int yytype;
+    YYSTYPE const * const yyvaluep;
+    GISourceScanner* scanner;
+#endif
+{
+  if (yytype < YYNTOKENS)
+    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+  else
+    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+  yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner);
+  YYFPRINTF (yyoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included).                                                   |
+`------------------------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+#else
+static void
+yy_stack_print (yybottom, yytop)
+    yytype_int16 *yybottom;
+    yytype_int16 *yytop;
+#endif
+{
+  YYFPRINTF (stderr, "Stack now");
+  for (; yybottom <= yytop; yybottom++)
+    {
+      int yybot = *yybottom;
+      YYFPRINTF (stderr, " %d", yybot);
+    }
+  YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top)                           \
+do {                                                           \
+  if (yydebug)                                                 \
+    yy_stack_print ((Bottom), (Top));                          \
+} while (YYID (0))
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced.  |
+`------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule, GISourceScanner* scanner)
+#else
+static void
+yy_reduce_print (yyvsp, yyrule, scanner)
+    YYSTYPE *yyvsp;
+    int yyrule;
+    GISourceScanner* scanner;
+#endif
+{
+  int yynrhs = yyr2[yyrule];
+  int yyi;
+  unsigned long int yylno = yyrline[yyrule];
+  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+            yyrule - 1, yylno);
+  /* The symbols being reduced.  */
+  for (yyi = 0; yyi < yynrhs; yyi++)
+    {
+      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
+      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+                      &(yyvsp[(yyi + 1) - (yynrhs)])
+                                      , scanner);
+      YYFPRINTF (stderr, "\n");
+    }
+}
+
+# define YY_REDUCE_PRINT(Rule)         \
+do {                                   \
+  if (yydebug)                         \
+    yy_reduce_print (yyvsp, Rule, scanner); \
+} while (YYID (0))
+
+/* Nonzero means print parse trace.  It is left uninitialized so that
+   multiple parsers can coexist.  */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks.  */
+#ifndef        YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+   if the built-in stack extension method is used).
+
+   Do not make this value too large; the results are undefined if
+   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+   evaluated with infinite-precision integer arithmetic.  */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+#  if defined __GLIBC__ && defined _STRING_H
+#   define yystrlen strlen
+#  else
+/* Return the length of YYSTR.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static YYSIZE_T
+yystrlen (const char *yystr)
+#else
+static YYSIZE_T
+yystrlen (yystr)
+    const char *yystr;
+#endif
+{
+  YYSIZE_T yylen;
+  for (yylen = 0; yystr[yylen]; yylen++)
+    continue;
+  return yylen;
+}
+#  endif
+# endif
+
+# ifndef yystpcpy
+#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+#   define yystpcpy stpcpy
+#  else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+   YYDEST.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+#else
+static char *
+yystpcpy (yydest, yysrc)
+    char *yydest;
+    const char *yysrc;
+#endif
+{
+  char *yyd = yydest;
+  const char *yys = yysrc;
+
+  while ((*yyd++ = *yys++) != '\0')
+    continue;
+
+  return yyd - 1;
+}
+#  endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+   quotes and backslashes, so that it's suitable for yyerror.  The
+   heuristic is that double-quoting is unnecessary unless the string
+   contains an apostrophe, a comma, or backslash (other than
+   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
+   null, do not copy; instead, return the length of what the result
+   would have been.  */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+  if (*yystr == '"')
+    {
+      YYSIZE_T yyn = 0;
+      char const *yyp = yystr;
+
+      for (;;)
+       switch (*++yyp)
+         {
+         case '\'':
+         case ',':
+           goto do_not_strip_quotes;
+
+         case '\\':
+           if (*++yyp != '\\')
+             goto do_not_strip_quotes;
+           /* Fall through.  */
+         default:
+           if (yyres)
+             yyres[yyn] = *yyp;
+           yyn++;
+           break;
+
+         case '"':
+           if (yyres)
+             yyres[yyn] = '\0';
+           return yyn;
+         }
+    do_not_strip_quotes: ;
+    }
+
+  if (! yyres)
+    return yystrlen (yystr);
+
+  return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+   about the unexpected token YYTOKEN for the state stack whose top is
+   YYSSP.
+
+   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
+   not large enough to hold the message.  In that case, also set
+   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
+   required number of bytes is too large to store.  */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+                yytype_int16 *yyssp, int yytoken)
+{
+  YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
+  YYSIZE_T yysize = yysize0;
+  YYSIZE_T yysize1;
+  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+  /* Internationalized format string. */
+  const char *yyformat = 0;
+  /* Arguments of yyformat. */
+  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+  /* Number of reported tokens (one for the "unexpected", one per
+     "expected"). */
+  int yycount = 0;
+
+  /* There are many possibilities here to consider:
+     - Assume YYFAIL is not used.  It's too flawed to consider.  See
+       <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
+       for details.  YYERROR is fine as it does not invoke this
+       function.
+     - If this state is a consistent state with a default action, then
+       the only way this function was invoked is if the default action
+       is an error action.  In that case, don't check for expected
+       tokens because there are none.
+     - The only way there can be no lookahead present (in yychar) is if
+       this state is a consistent state with a default action.  Thus,
+       detecting the absence of a lookahead is sufficient to determine
+       that there is no unexpected or expected token to report.  In that
+       case, just report a simple "syntax error".
+     - Don't assume there isn't a lookahead just because this state is a
+       consistent state with a default action.  There might have been a
+       previous inconsistent state, consistent state with a non-default
+       action, or user semantic action that manipulated yychar.
+     - Of course, the expected token list depends on states to have
+       correct lookahead information, and it depends on the parser not
+       to perform extra reductions after fetching a lookahead from the
+       scanner and before detecting a syntax error.  Thus, state merging
+       (from LALR or IELR) and default reductions corrupt the expected
+       token list.  However, the list is correct for canonical LR with
+       one exception: it will still contain any token that will not be
+       accepted due to an error action in a later state.
+  */
+  if (yytoken != YYEMPTY)
+    {
+      int yyn = yypact[*yyssp];
+      yyarg[yycount++] = yytname[yytoken];
+      if (!yypact_value_is_default (yyn))
+        {
+          /* Start YYX at -YYN if negative to avoid negative indexes in
+             YYCHECK.  In other words, skip the first -YYN actions for
+             this state because they are default actions.  */
+          int yyxbegin = yyn < 0 ? -yyn : 0;
+          /* Stay within bounds of both yycheck and yytname.  */
+          int yychecklim = YYLAST - yyn + 1;
+          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+          int yyx;
+
+          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+                && !yytable_value_is_error (yytable[yyx + yyn]))
+              {
+                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+                  {
+                    yycount = 1;
+                    yysize = yysize0;
+                    break;
+                  }
+                yyarg[yycount++] = yytname[yyx];
+                yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+                if (! (yysize <= yysize1
+                       && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+                  return 2;
+                yysize = yysize1;
+              }
+        }
+    }
+
+  switch (yycount)
+    {
+# define YYCASE_(N, S)                      \
+      case N:                               \
+        yyformat = S;                       \
+      break
+      YYCASE_(0, YY_("syntax error"));
+      YYCASE_(1, YY_("syntax error, unexpected %s"));
+      YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+      YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+      YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+      YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+    }
+
+  yysize1 = yysize + yystrlen (yyformat);
+  if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+    return 2;
+  yysize = yysize1;
+
+  if (*yymsg_alloc < yysize)
+    {
+      *yymsg_alloc = 2 * yysize;
+      if (! (yysize <= *yymsg_alloc
+             && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+        *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+      return 1;
+    }
+
+  /* Avoid sprintf, as that infringes on the user's name space.
+     Don't have undefined behavior even if the translation
+     produced a string with the wrong number of "%s"s.  */
+  {
+    char *yyp = *yymsg;
+    int yyi = 0;
+    while ((*yyp = *yyformat) != '\0')
+      if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+        {
+          yyp += yytnamerr (yyp, yyarg[yyi++]);
+          yyformat += 2;
+        }
+      else
+        {
+          yyp++;
+          yyformat++;
+        }
+  }
+  return 0;
+}
+#endif /* YYERROR_VERBOSE */
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol.  |
+`-----------------------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, GISourceScanner* scanner)
+#else
+static void
+yydestruct (yymsg, yytype, yyvaluep, scanner)
+    const char *yymsg;
+    int yytype;
+    YYSTYPE *yyvaluep;
+    GISourceScanner* scanner;
+#endif
+{
+  YYUSE (yyvaluep);
+  YYUSE (scanner);
+
+  if (!yymsg)
+    yymsg = "Deleting";
+  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+  switch (yytype)
+    {
+
+      default:
+       break;
+    }
+}
+
+
+/* Prevent warnings from -Wmissing-prototypes.  */
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void *YYPARSE_PARAM);
+#else
+int yyparse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int yyparse (GISourceScanner* scanner);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+/* The lookahead symbol.  */
+int yychar;
+
+/* The semantic value of the lookahead symbol.  */
+YYSTYPE yylval;
+
+/* Number of syntax errors so far.  */
+int yynerrs;
+
+
+/*----------.
+| yyparse.  |
+`----------*/
+
+#ifdef YYPARSE_PARAM
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void *YYPARSE_PARAM)
+#else
+int
+yyparse (YYPARSE_PARAM)
+    void *YYPARSE_PARAM;
+#endif
+#else /* ! YYPARSE_PARAM */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (GISourceScanner* scanner)
+#else
+int
+yyparse (scanner)
+    GISourceScanner* scanner;
+#endif
+#endif
+{
+    int yystate;
+    /* Number of tokens to shift before error messages enabled.  */
+    int yyerrstatus;
+
+    /* The stacks and their tools:
+       `yyss': related to states.
+       `yyvs': related to semantic values.
+
+       Refer to the stacks thru separate pointers, to allow yyoverflow
+       to reallocate them elsewhere.  */
+
+    /* The state stack.  */
+    yytype_int16 yyssa[YYINITDEPTH];
+    yytype_int16 *yyss;
+    yytype_int16 *yyssp;
+
+    /* The semantic value stack.  */
+    YYSTYPE yyvsa[YYINITDEPTH];
+    YYSTYPE *yyvs;
+    YYSTYPE *yyvsp;
+
+    YYSIZE_T yystacksize;
+
+  int yyn;
+  int yyresult;
+  /* Lookahead token as an internal (translated) token number.  */
+  int yytoken;
+  /* The variables used to return semantic value and location from the
+     action routines.  */
+  YYSTYPE yyval;
+
+#if YYERROR_VERBOSE
+  /* Buffer for error messages, and its allocated size.  */
+  char yymsgbuf[128];
+  char *yymsg = yymsgbuf;
+  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
+
+  /* The number of symbols on the RHS of the reduced rule.
+     Keep to zero when no symbol should be popped.  */
+  int yylen = 0;
+
+  yytoken = 0;
+  yyss = yyssa;
+  yyvs = yyvsa;
+  yystacksize = YYINITDEPTH;
+
+  YYDPRINTF ((stderr, "Starting parse\n"));
+
+  yystate = 0;
+  yyerrstatus = 0;
+  yynerrs = 0;
+  yychar = YYEMPTY; /* Cause a token to be read.  */
+
+  /* Initialize stack pointers.
+     Waste one element of value and location stack
+     so that they stay on the same level as the state stack.
+     The wasted elements are never initialized.  */
+  yyssp = yyss;
+  yyvsp = yyvs;
+
+  goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate.  |
+`------------------------------------------------------------*/
+ yynewstate:
+  /* In all cases, when you get here, the value and location stacks
+     have just been pushed.  So pushing a state here evens the stacks.  */
+  yyssp++;
+
+ yysetstate:
+  *yyssp = yystate;
+
+  if (yyss + yystacksize - 1 <= yyssp)
+    {
+      /* Get the current used size of the three stacks, in elements.  */
+      YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+      {
+       /* Give user a chance to reallocate the stack.  Use copies of
+          these so that the &'s don't force the real ones into
+          memory.  */
+       YYSTYPE *yyvs1 = yyvs;
+       yytype_int16 *yyss1 = yyss;
+
+       /* Each stack pointer address is followed by the size of the
+          data in use in that stack, in bytes.  This used to be a
+          conditional around just the two extra args, but that might
+          be undefined if yyoverflow is a macro.  */
+       yyoverflow (YY_("memory exhausted"),
+                   &yyss1, yysize * sizeof (*yyssp),
+                   &yyvs1, yysize * sizeof (*yyvsp),
+                   &yystacksize);
+
+       yyss = yyss1;
+       yyvs = yyvs1;
+      }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+      goto yyexhaustedlab;
+# else
+      /* Extend the stack our own way.  */
+      if (YYMAXDEPTH <= yystacksize)
+       goto yyexhaustedlab;
+      yystacksize *= 2;
+      if (YYMAXDEPTH < yystacksize)
+       yystacksize = YYMAXDEPTH;
+
+      {
+       yytype_int16 *yyss1 = yyss;
+       union yyalloc *yyptr =
+         (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+       if (! yyptr)
+         goto yyexhaustedlab;
+       YYSTACK_RELOCATE (yyss_alloc, yyss);
+       YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+#  undef YYSTACK_RELOCATE
+       if (yyss1 != yyssa)
+         YYSTACK_FREE (yyss1);
+      }
+# endif
+#endif /* no yyoverflow */
+
+      yyssp = yyss + yysize - 1;
+      yyvsp = yyvs + yysize - 1;
+
+      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+                 (unsigned long int) yystacksize));
+
+      if (yyss + yystacksize - 1 <= yyssp)
+       YYABORT;
+    }
+
+  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+  if (yystate == YYFINAL)
+    YYACCEPT;
+
+  goto yybackup;
+
+/*-----------.
+| yybackup.  |
+`-----------*/
+yybackup:
+
+  /* Do appropriate processing given the current state.  Read a
+     lookahead token if we need one and don't already have one.  */
+
+  /* First try to decide what to do without reference to lookahead token.  */
+  yyn = yypact[yystate];
+  if (yypact_value_is_default (yyn))
+    goto yydefault;
+
+  /* Not known => get a lookahead token if don't already have one.  */
+
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
+  if (yychar == YYEMPTY)
+    {
+      YYDPRINTF ((stderr, "Reading a token: "));
+      yychar = YYLEX;
+    }
+
+  if (yychar <= YYEOF)
+    {
+      yychar = yytoken = YYEOF;
+      YYDPRINTF ((stderr, "Now at end of input.\n"));
+    }
+  else
+    {
+      yytoken = YYTRANSLATE (yychar);
+      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+    }
+
+  /* If the proper action on seeing token YYTOKEN is to reduce or to
+     detect an error, take that action.  */
+  yyn += yytoken;
+  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+    goto yydefault;
+  yyn = yytable[yyn];
+  if (yyn <= 0)
+    {
+      if (yytable_value_is_error (yyn))
+        goto yyerrlab;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+
+  /* Count tokens shifted since error; after three, turn off error
+     status.  */
+  if (yyerrstatus)
+    yyerrstatus--;
+
+  /* Shift the lookahead token.  */
+  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+  /* Discard the shifted token.  */
+  yychar = YYEMPTY;
+
+  yystate = yyn;
+  *++yyvsp = yylval;
+
+  goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state.  |
+`-----------------------------------------------------------*/
+yydefault:
+  yyn = yydefact[yystate];
+  if (yyn == 0)
+    goto yyerrlab;
+  goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction.  |
+`-----------------------------*/
+yyreduce:
+  /* yyn is the number of a rule to reduce with.  */
+  yylen = yyr2[yyn];
+
+  /* If YYLEN is nonzero, implement the default value of the action:
+     `$$ = $1'.
+
+     Otherwise, the following line sets YYVAL to garbage.
+     This behavior is undocumented and Bison
+     users should not rely upon it.  Assigning to YYVAL
+     unconditionally makes the parser a bit smaller, and it avoids a
+     GCC warning that YYVAL may be used uninitialized.  */
+  yyval = yyvsp[1-yylen];
+
+
+  YY_REDUCE_PRINT (yyn);
+  switch (yyn)
+    {
+        case 2:
+
+/* Line 1806 of yacc.c  */
+#line 224 "scannerparser.y"
+    {
+               (yyval.symbol) = g_hash_table_lookup (const_table, (yyvsp[(1) - (1)].str));
+               if ((yyval.symbol) == NULL) {
+                       (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+               } else {
+                       (yyval.symbol) = gi_source_symbol_ref ((yyval.symbol));
+               }
+         }
+    break;
+
+  case 3:
+
+/* Line 1806 of yacc.c  */
+#line 233 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               (yyval.symbol)->const_int_set = TRUE;
+               if (g_str_has_prefix (yytext, "0x") && strlen (yytext) > 2) {
+                       (yyval.symbol)->const_int = g_ascii_strtoll (yytext + 2, NULL, 16);
+               } else if (g_str_has_prefix (yytext, "0") && strlen (yytext) > 1) {
+                       (yyval.symbol)->const_int = g_ascii_strtoll (yytext + 1, NULL, 8);
+               } else {
+                       (yyval.symbol)->const_int = g_ascii_strtoll (yytext, NULL, 10);
+               }
+         }
+    break;
+
+  case 4:
+
+/* Line 1806 of yacc.c  */
+#line 245 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               (yyval.symbol)->const_int_set = TRUE;
+               (yyval.symbol)->const_int = g_utf8_get_char(yytext + 1);
+         }
+    break;
+
+  case 5:
+
+/* Line 1806 of yacc.c  */
+#line 251 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               (yyval.symbol)->const_double_set = TRUE;
+               (yyval.symbol)->const_double = 0.0;
+        sscanf (yytext, "%lf", &((yyval.symbol)->const_double));
+         }
+    break;
+
+  case 7:
+
+/* Line 1806 of yacc.c  */
+#line 259 "scannerparser.y"
+    {
+               (yyval.symbol) = (yyvsp[(2) - (3)].symbol);
+         }
+    break;
+
+  case 8:
+
+/* Line 1806 of yacc.c  */
+#line 263 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+    break;
+
+  case 9:
+
+/* Line 1806 of yacc.c  */
+#line 271 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               yytext[strlen (yytext) - 1] = '\0';
+               (yyval.symbol)->const_string = parse_c_string_literal (yytext + 1);
+                if (!g_utf8_validate ((yyval.symbol)->const_string, -1, NULL))
+                  {
+#if 0
+                    g_warning ("Ignoring non-UTF-8 constant string \"%s\"", yytext + 1);
+#endif
+                    g_free((yyval.symbol)->const_string);
+                    (yyval.symbol)->const_string = NULL;
+                  }
+
+         }
+    break;
+
+  case 10:
+
+/* Line 1806 of yacc.c  */
+#line 286 "scannerparser.y"
+    {
+               char *strings, *string2;
+               (yyval.symbol) = (yyvsp[(1) - (2)].symbol);
+               yytext[strlen (yytext) - 1] = '\0';
+               string2 = parse_c_string_literal (yytext + 1);
+               strings = g_strconcat ((yyval.symbol)->const_string, string2, NULL);
+               g_free ((yyval.symbol)->const_string);
+               g_free (string2);
+               (yyval.symbol)->const_string = strings;
+         }
+    break;
+
+  case 11:
+
+/* Line 1806 of yacc.c  */
+#line 300 "scannerparser.y"
+    {
+               (yyval.str) = g_strdup (yytext);
+         }
+    break;
+
+  case 15:
+
+/* Line 1806 of yacc.c  */
+#line 313 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+    break;
+
+  case 16:
+
+/* Line 1806 of yacc.c  */
+#line 317 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+    break;
+
+  case 17:
+
+/* Line 1806 of yacc.c  */
+#line 321 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+    break;
+
+  case 18:
+
+/* Line 1806 of yacc.c  */
+#line 325 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+    break;
+
+  case 19:
+
+/* Line 1806 of yacc.c  */
+#line 329 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+    break;
+
+  case 20:
+
+/* Line 1806 of yacc.c  */
+#line 333 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+    break;
+
+  case 21:
+
+/* Line 1806 of yacc.c  */
+#line 337 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+    break;
+
+  case 25:
+
+/* Line 1806 of yacc.c  */
+#line 350 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+    break;
+
+  case 26:
+
+/* Line 1806 of yacc.c  */
+#line 354 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+    break;
+
+  case 27:
+
+/* Line 1806 of yacc.c  */
+#line 358 "scannerparser.y"
+    {
+               switch ((yyvsp[(1) - (2)].unary_operator)) {
+               case UNARY_PLUS:
+                       (yyval.symbol) = (yyvsp[(2) - (2)].symbol);
+                       break;
+               case UNARY_MINUS:
+                       (yyval.symbol) = (yyvsp[(2) - (2)].symbol);
+                       (yyval.symbol)->const_int = -(yyvsp[(2) - (2)].symbol)->const_int;
+                       break;
+               case UNARY_BITWISE_COMPLEMENT:
+                       (yyval.symbol) = (yyvsp[(2) - (2)].symbol);
+                       (yyval.symbol)->const_int = ~(yyvsp[(2) - (2)].symbol)->const_int;
+                       break;
+               case UNARY_LOGICAL_NEGATION:
+                       (yyval.symbol) = (yyvsp[(2) - (2)].symbol);
+                       (yyval.symbol)->const_int = !gi_source_symbol_get_const_boolean ((yyvsp[(2) - (2)].symbol));
+                       break;
+               default:
+                       (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+                       break;
+               }
+         }
+    break;
+
+  case 28:
+
+/* Line 1806 of yacc.c  */
+#line 381 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+    break;
+
+  case 29:
+
+/* Line 1806 of yacc.c  */
+#line 385 "scannerparser.y"
+    {
+               ctype_free ((yyvsp[(3) - (4)].ctype));
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+    break;
+
+  case 30:
+
+/* Line 1806 of yacc.c  */
+#line 393 "scannerparser.y"
+    {
+               (yyval.unary_operator) = UNARY_ADDRESS_OF;
+         }
+    break;
+
+  case 31:
+
+/* Line 1806 of yacc.c  */
+#line 397 "scannerparser.y"
+    {
+               (yyval.unary_operator) = UNARY_POINTER_INDIRECTION;
+         }
+    break;
+
+  case 32:
+
+/* Line 1806 of yacc.c  */
+#line 401 "scannerparser.y"
+    {
+               (yyval.unary_operator) = UNARY_PLUS;
+         }
+    break;
+
+  case 33:
+
+/* Line 1806 of yacc.c  */
+#line 405 "scannerparser.y"
+    {
+               (yyval.unary_operator) = UNARY_MINUS;
+         }
+    break;
+
+  case 34:
+
+/* Line 1806 of yacc.c  */
+#line 409 "scannerparser.y"
+    {
+               (yyval.unary_operator) = UNARY_BITWISE_COMPLEMENT;
+         }
+    break;
+
+  case 35:
+
+/* Line 1806 of yacc.c  */
+#line 413 "scannerparser.y"
+    {
+               (yyval.unary_operator) = UNARY_LOGICAL_NEGATION;
+         }
+    break;
+
+  case 37:
+
+/* Line 1806 of yacc.c  */
+#line 421 "scannerparser.y"
+    {
+               ctype_free ((yyvsp[(2) - (4)].ctype));
+               (yyval.symbol) = (yyvsp[(4) - (4)].symbol);
+         }
+    break;
+
+  case 39:
+
+/* Line 1806 of yacc.c  */
+#line 430 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               (yyval.symbol)->const_int_set = TRUE;
+               (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int * (yyvsp[(3) - (3)].symbol)->const_int;
+         }
+    break;
+
+  case 40:
+
+/* Line 1806 of yacc.c  */
+#line 436 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               (yyval.symbol)->const_int_set = TRUE;
+               if ((yyvsp[(3) - (3)].symbol)->const_int != 0) {
+                       (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int / (yyvsp[(3) - (3)].symbol)->const_int;
+               }
+         }
+    break;
+
+  case 41:
+
+/* Line 1806 of yacc.c  */
+#line 444 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               (yyval.symbol)->const_int_set = TRUE;
+               if ((yyvsp[(3) - (3)].symbol)->const_int != 0) {
+                       (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int % (yyvsp[(3) - (3)].symbol)->const_int;
+               }
+         }
+    break;
+
+  case 43:
+
+/* Line 1806 of yacc.c  */
+#line 456 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               (yyval.symbol)->const_int_set = TRUE;
+               (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int + (yyvsp[(3) - (3)].symbol)->const_int;
+         }
+    break;
+
+  case 44:
+
+/* Line 1806 of yacc.c  */
+#line 462 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               (yyval.symbol)->const_int_set = TRUE;
+               (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int - (yyvsp[(3) - (3)].symbol)->const_int;
+         }
+    break;
+
+  case 46:
+
+/* Line 1806 of yacc.c  */
+#line 472 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               (yyval.symbol)->const_int_set = TRUE;
+               (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int << (yyvsp[(3) - (3)].symbol)->const_int;
+
+               /* assume this is a bitfield/flags declaration
+                * if a left shift operator is sued in an enum value
+                 * This mimics the glib-mkenum behavior.
+                */
+               is_bitfield = TRUE;
+         }
+    break;
+
+  case 47:
+
+/* Line 1806 of yacc.c  */
+#line 484 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               (yyval.symbol)->const_int_set = TRUE;
+               (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int >> (yyvsp[(3) - (3)].symbol)->const_int;
+         }
+    break;
+
+  case 49:
+
+/* Line 1806 of yacc.c  */
+#line 494 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               (yyval.symbol)->const_int_set = TRUE;
+               (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int < (yyvsp[(3) - (3)].symbol)->const_int;
+         }
+    break;
+
+  case 50:
+
+/* Line 1806 of yacc.c  */
+#line 500 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               (yyval.symbol)->const_int_set = TRUE;
+               (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int > (yyvsp[(3) - (3)].symbol)->const_int;
+         }
+    break;
+
+  case 51:
+
+/* Line 1806 of yacc.c  */
+#line 506 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               (yyval.symbol)->const_int_set = TRUE;
+               (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int <= (yyvsp[(3) - (3)].symbol)->const_int;
+         }
+    break;
+
+  case 52:
+
+/* Line 1806 of yacc.c  */
+#line 512 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               (yyval.symbol)->const_int_set = TRUE;
+               (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int >= (yyvsp[(3) - (3)].symbol)->const_int;
+         }
+    break;
+
+  case 54:
+
+/* Line 1806 of yacc.c  */
+#line 522 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               (yyval.symbol)->const_int_set = TRUE;
+               (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int == (yyvsp[(3) - (3)].symbol)->const_int;
+         }
+    break;
+
+  case 55:
+
+/* Line 1806 of yacc.c  */
+#line 528 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               (yyval.symbol)->const_int_set = TRUE;
+               (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int != (yyvsp[(3) - (3)].symbol)->const_int;
+         }
+    break;
+
+  case 57:
+
+/* Line 1806 of yacc.c  */
+#line 538 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               (yyval.symbol)->const_int_set = TRUE;
+               (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int & (yyvsp[(3) - (3)].symbol)->const_int;
+         }
+    break;
+
+  case 59:
+
+/* Line 1806 of yacc.c  */
+#line 548 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               (yyval.symbol)->const_int_set = TRUE;
+               (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int ^ (yyvsp[(3) - (3)].symbol)->const_int;
+         }
+    break;
+
+  case 61:
+
+/* Line 1806 of yacc.c  */
+#line 558 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               (yyval.symbol)->const_int_set = TRUE;
+               (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int | (yyvsp[(3) - (3)].symbol)->const_int;
+         }
+    break;
+
+  case 63:
+
+/* Line 1806 of yacc.c  */
+#line 568 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               (yyval.symbol)->const_int_set = TRUE;
+               (yyval.symbol)->const_int =
+                 gi_source_symbol_get_const_boolean ((yyvsp[(1) - (3)].symbol)) &&
+                 gi_source_symbol_get_const_boolean ((yyvsp[(3) - (3)].symbol));
+         }
+    break;
+
+  case 65:
+
+/* Line 1806 of yacc.c  */
+#line 580 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
+               (yyval.symbol)->const_int_set = TRUE;
+               (yyval.symbol)->const_int =
+                 gi_source_symbol_get_const_boolean ((yyvsp[(1) - (3)].symbol)) ||
+                 gi_source_symbol_get_const_boolean ((yyvsp[(3) - (3)].symbol));
+         }
+    break;
+
+  case 67:
+
+/* Line 1806 of yacc.c  */
+#line 592 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_get_const_boolean ((yyvsp[(1) - (5)].symbol)) ? (yyvsp[(3) - (5)].symbol) : (yyvsp[(5) - (5)].symbol);
+         }
+    break;
+
+  case 69:
+
+/* Line 1806 of yacc.c  */
+#line 600 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+    break;
+
+  case 83:
+
+/* Line 1806 of yacc.c  */
+#line 623 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+    break;
+
+  case 85:
+
+/* Line 1806 of yacc.c  */
+#line 636 "scannerparser.y"
+    {
+               GList *l;
+               for (l = (yyvsp[(2) - (3)].list); l != NULL; l = l->next) {
+                       GISourceSymbol *sym = l->data;
+                       gi_source_symbol_merge_type (sym, gi_source_type_copy ((yyvsp[(1) - (3)].ctype)));
+                       if ((yyvsp[(1) - (3)].ctype)->storage_class_specifier & STORAGE_CLASS_TYPEDEF) {
+                               sym->type = CSYMBOL_TYPE_TYPEDEF;
+                       } else if (sym->base_type->type == CTYPE_FUNCTION) {
+                               sym->type = CSYMBOL_TYPE_FUNCTION;
+                       } else {
+                               sym->type = CSYMBOL_TYPE_OBJECT;
+                       }
+                       gi_source_scanner_add_symbol (scanner, sym);
+                       gi_source_symbol_unref (sym);
+               }
+               ctype_free ((yyvsp[(1) - (3)].ctype));
+         }
+    break;
+
+  case 86:
+
+/* Line 1806 of yacc.c  */
+#line 654 "scannerparser.y"
+    {
+               ctype_free ((yyvsp[(1) - (2)].ctype));
+         }
+    break;
+
+  case 87:
+
+/* Line 1806 of yacc.c  */
+#line 661 "scannerparser.y"
+    {
+               (yyval.ctype) = (yyvsp[(2) - (2)].ctype);
+               (yyval.ctype)->storage_class_specifier |= (yyvsp[(1) - (2)].storage_class_specifier);
+         }
+    break;
+
+  case 88:
+
+/* Line 1806 of yacc.c  */
+#line 666 "scannerparser.y"
+    {
+               (yyval.ctype) = gi_source_type_new (CTYPE_INVALID);
+               (yyval.ctype)->storage_class_specifier |= (yyvsp[(1) - (1)].storage_class_specifier);
+         }
+    break;
+
+  case 89:
+
+/* Line 1806 of yacc.c  */
+#line 671 "scannerparser.y"
+    {
+               (yyval.ctype) = (yyvsp[(1) - (2)].ctype);
+               /* combine basic types like unsigned int and long long */
+               if ((yyval.ctype)->type == CTYPE_BASIC_TYPE && (yyvsp[(2) - (2)].ctype)->type == CTYPE_BASIC_TYPE) {
+                       char *name = g_strdup_printf ("%s %s", (yyval.ctype)->name, (yyvsp[(2) - (2)].ctype)->name);
+                       g_free ((yyval.ctype)->name);
+                       (yyval.ctype)->name = name;
+                       ctype_free ((yyvsp[(2) - (2)].ctype));
+               } else {
+                       (yyval.ctype)->base_type = (yyvsp[(2) - (2)].ctype);
+               }
+         }
+    break;
+
+  case 91:
+
+/* Line 1806 of yacc.c  */
+#line 685 "scannerparser.y"
+    {
+               (yyval.ctype) = (yyvsp[(2) - (2)].ctype);
+               (yyval.ctype)->type_qualifier |= (yyvsp[(1) - (2)].type_qualifier);
+         }
+    break;
+
+  case 92:
+
+/* Line 1806 of yacc.c  */
+#line 690 "scannerparser.y"
+    {
+               (yyval.ctype) = gi_source_type_new (CTYPE_INVALID);
+               (yyval.ctype)->type_qualifier |= (yyvsp[(1) - (1)].type_qualifier);
+         }
+    break;
+
+  case 93:
+
+/* Line 1806 of yacc.c  */
+#line 695 "scannerparser.y"
+    {
+               (yyval.ctype) = (yyvsp[(2) - (2)].ctype);
+               (yyval.ctype)->function_specifier |= (yyvsp[(1) - (2)].function_specifier);
+         }
+    break;
+
+  case 94:
+
+/* Line 1806 of yacc.c  */
+#line 700 "scannerparser.y"
+    {
+               (yyval.ctype) = gi_source_type_new (CTYPE_INVALID);
+               (yyval.ctype)->function_specifier |= (yyvsp[(1) - (1)].function_specifier);
+         }
+    break;
+
+  case 95:
+
+/* Line 1806 of yacc.c  */
+#line 708 "scannerparser.y"
+    {
+               (yyval.list) = g_list_append (NULL, (yyvsp[(1) - (1)].symbol));
+         }
+    break;
+
+  case 96:
+
+/* Line 1806 of yacc.c  */
+#line 712 "scannerparser.y"
+    {
+               (yyval.list) = g_list_append ((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].symbol));
+         }
+    break;
+
+  case 99:
+
+/* Line 1806 of yacc.c  */
+#line 724 "scannerparser.y"
+    {
+               (yyval.storage_class_specifier) = STORAGE_CLASS_TYPEDEF;
+         }
+    break;
+
+  case 100:
+
+/* Line 1806 of yacc.c  */
+#line 728 "scannerparser.y"
+    {
+               (yyval.storage_class_specifier) = STORAGE_CLASS_EXTERN;
+         }
+    break;
+
+  case 101:
+
+/* Line 1806 of yacc.c  */
+#line 732 "scannerparser.y"
+    {
+               (yyval.storage_class_specifier) = STORAGE_CLASS_STATIC;
+         }
+    break;
+
+  case 102:
+
+/* Line 1806 of yacc.c  */
+#line 736 "scannerparser.y"
+    {
+               (yyval.storage_class_specifier) = STORAGE_CLASS_AUTO;
+         }
+    break;
+
+  case 103:
+
+/* Line 1806 of yacc.c  */
+#line 740 "scannerparser.y"
+    {
+               (yyval.storage_class_specifier) = STORAGE_CLASS_REGISTER;
+         }
+    break;
+
+  case 104:
+
+/* Line 1806 of yacc.c  */
+#line 747 "scannerparser.y"
+    {
+               (yyval.ctype) = gi_source_type_new (CTYPE_VOID);
+         }
+    break;
+
+  case 105:
+
+/* Line 1806 of yacc.c  */
+#line 751 "scannerparser.y"
+    {
+               (yyval.ctype) = gi_source_basic_type_new ("char");
+         }
+    break;
+
+  case 106:
+
+/* Line 1806 of yacc.c  */
+#line 755 "scannerparser.y"
+    {
+               (yyval.ctype) = gi_source_basic_type_new ("short");
+         }
+    break;
+
+  case 107:
+
+/* Line 1806 of yacc.c  */
+#line 759 "scannerparser.y"
+    {
+               (yyval.ctype) = gi_source_basic_type_new ("int");
+         }
+    break;
+
+  case 108:
+
+/* Line 1806 of yacc.c  */
+#line 763 "scannerparser.y"
+    {
+               (yyval.ctype) = gi_source_basic_type_new ("long");
+         }
+    break;
+
+  case 109:
+
+/* Line 1806 of yacc.c  */
+#line 767 "scannerparser.y"
+    {
+               (yyval.ctype) = gi_source_basic_type_new ("float");
+         }
+    break;
+
+  case 110:
+
+/* Line 1806 of yacc.c  */
+#line 771 "scannerparser.y"
+    {
+               (yyval.ctype) = gi_source_basic_type_new ("double");
+         }
+    break;
+
+  case 111:
+
+/* Line 1806 of yacc.c  */
+#line 775 "scannerparser.y"
+    {
+               (yyval.ctype) = gi_source_basic_type_new ("signed");
+         }
+    break;
+
+  case 112:
+
+/* Line 1806 of yacc.c  */
+#line 779 "scannerparser.y"
+    {
+               (yyval.ctype) = gi_source_basic_type_new ("unsigned");
+         }
+    break;
+
+  case 113:
+
+/* Line 1806 of yacc.c  */
+#line 783 "scannerparser.y"
+    {
+               (yyval.ctype) = gi_source_basic_type_new ("bool");
+         }
+    break;
+
+  case 116:
+
+/* Line 1806 of yacc.c  */
+#line 789 "scannerparser.y"
+    {
+               (yyval.ctype) = gi_source_typedef_new ((yyvsp[(1) - (1)].str));
+               g_free ((yyvsp[(1) - (1)].str));
+         }
+    break;
+
+  case 117:
+
+/* Line 1806 of yacc.c  */
+#line 797 "scannerparser.y"
+    {
+               (yyval.ctype) = (yyvsp[(1) - (5)].ctype);
+               (yyval.ctype)->name = (yyvsp[(2) - (5)].str);
+               (yyval.ctype)->child_list = (yyvsp[(4) - (5)].list);
+
+               GISourceSymbol *sym = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+               if ((yyval.ctype)->type == CTYPE_STRUCT) {
+                       sym->type = CSYMBOL_TYPE_STRUCT;
+               } else if ((yyval.ctype)->type == CTYPE_UNION) {
+                       sym->type = CSYMBOL_TYPE_UNION;
+               } else {
+                       g_assert_not_reached ();
+               }
+               sym->ident = g_strdup ((yyval.ctype)->name);
+               sym->base_type = gi_source_type_copy ((yyval.ctype));
+               gi_source_scanner_add_symbol (scanner, sym);
+               gi_source_symbol_unref (sym);
+         }
+    break;
+
+  case 118:
+
+/* Line 1806 of yacc.c  */
+#line 816 "scannerparser.y"
+    {
+               (yyval.ctype) = (yyvsp[(1) - (4)].ctype);
+               (yyval.ctype)->child_list = (yyvsp[(3) - (4)].list);
+         }
+    break;
+
+  case 119:
+
+/* Line 1806 of yacc.c  */
+#line 821 "scannerparser.y"
+    {
+               (yyval.ctype) = (yyvsp[(1) - (2)].ctype);
+               (yyval.ctype)->name = (yyvsp[(2) - (2)].str);
+         }
+    break;
+
+  case 120:
+
+/* Line 1806 of yacc.c  */
+#line 829 "scannerparser.y"
+    {
+                scanner->private = FALSE;
+               (yyval.ctype) = gi_source_struct_new (NULL);
+         }
+    break;
+
+  case 121:
+
+/* Line 1806 of yacc.c  */
+#line 834 "scannerparser.y"
+    {
+                scanner->private = FALSE;
+               (yyval.ctype) = gi_source_union_new (NULL);
+         }
+    break;
+
+  case 123:
+
+/* Line 1806 of yacc.c  */
+#line 843 "scannerparser.y"
+    {
+               (yyval.list) = g_list_concat ((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].list));
+         }
+    break;
+
+  case 124:
+
+/* Line 1806 of yacc.c  */
+#line 850 "scannerparser.y"
+    {
+           GList *l;
+           (yyval.list) = NULL;
+           for (l = (yyvsp[(2) - (3)].list); l != NULL; l = l->next)
+             {
+               GISourceSymbol *sym = l->data;
+               if ((yyvsp[(1) - (3)].ctype)->storage_class_specifier & STORAGE_CLASS_TYPEDEF)
+                   sym->type = CSYMBOL_TYPE_TYPEDEF;
+               else
+                   sym->type = CSYMBOL_TYPE_MEMBER;
+               gi_source_symbol_merge_type (sym, gi_source_type_copy ((yyvsp[(1) - (3)].ctype)));
+                sym->private = scanner->private;
+                (yyval.list) = g_list_append ((yyval.list), sym);
+             }
+           ctype_free ((yyvsp[(1) - (3)].ctype));
+         }
+    break;
+
+  case 125:
+
+/* Line 1806 of yacc.c  */
+#line 870 "scannerparser.y"
+    {
+               (yyval.ctype) = (yyvsp[(1) - (2)].ctype);
+               (yyval.ctype)->base_type = (yyvsp[(2) - (2)].ctype);
+         }
+    break;
+
+  case 127:
+
+/* Line 1806 of yacc.c  */
+#line 876 "scannerparser.y"
+    {
+               (yyval.ctype) = (yyvsp[(2) - (2)].ctype);
+               (yyval.ctype)->type_qualifier |= (yyvsp[(1) - (2)].type_qualifier);
+         }
+    break;
+
+  case 128:
+
+/* Line 1806 of yacc.c  */
+#line 881 "scannerparser.y"
+    {
+               (yyval.ctype) = gi_source_type_new (CTYPE_INVALID);
+               (yyval.ctype)->type_qualifier |= (yyvsp[(1) - (1)].type_qualifier);
+         }
+    break;
+
+  case 129:
+
+/* Line 1806 of yacc.c  */
+#line 889 "scannerparser.y"
+    {
+               (yyval.list) = g_list_append (NULL, (yyvsp[(1) - (1)].symbol));
+         }
+    break;
+
+  case 130:
+
+/* Line 1806 of yacc.c  */
+#line 893 "scannerparser.y"
+    {
+               (yyval.list) = g_list_append ((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].symbol));
+         }
+    break;
+
+  case 131:
+
+/* Line 1806 of yacc.c  */
+#line 900 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+    break;
+
+  case 133:
+
+/* Line 1806 of yacc.c  */
+#line 905 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+         }
+    break;
+
+  case 134:
+
+/* Line 1806 of yacc.c  */
+#line 909 "scannerparser.y"
+    {
+               (yyval.symbol) = (yyvsp[(1) - (3)].symbol);
+               if ((yyvsp[(3) - (3)].symbol)->const_int_set) {
+                 (yyval.symbol)->const_int_set = TRUE;
+                 (yyval.symbol)->const_int = (yyvsp[(3) - (3)].symbol)->const_int;
+               }
+         }
+    break;
+
+  case 135:
+
+/* Line 1806 of yacc.c  */
+#line 920 "scannerparser.y"
+    {
+               (yyval.ctype) = gi_source_enum_new ((yyvsp[(2) - (5)].str));
+               (yyval.ctype)->child_list = (yyvsp[(4) - (5)].list);
+               (yyval.ctype)->is_bitfield = is_bitfield || scanner->flags;
+               last_enum_value = -1;
+         }
+    break;
+
+  case 136:
+
+/* Line 1806 of yacc.c  */
+#line 927 "scannerparser.y"
+    {
+               (yyval.ctype) = gi_source_enum_new (NULL);
+               (yyval.ctype)->child_list = (yyvsp[(3) - (4)].list);
+               (yyval.ctype)->is_bitfield = is_bitfield || scanner->flags;
+               last_enum_value = -1;
+         }
+    break;
+
+  case 137:
+
+/* Line 1806 of yacc.c  */
+#line 934 "scannerparser.y"
+    {
+               (yyval.ctype) = gi_source_enum_new ((yyvsp[(2) - (6)].str));
+               (yyval.ctype)->child_list = (yyvsp[(4) - (6)].list);
+               (yyval.ctype)->is_bitfield = is_bitfield || scanner->flags;
+               last_enum_value = -1;
+         }
+    break;
+
+  case 138:
+
+/* Line 1806 of yacc.c  */
+#line 941 "scannerparser.y"
+    {
+               (yyval.ctype) = gi_source_enum_new (NULL);
+               (yyval.ctype)->child_list = (yyvsp[(3) - (5)].list);
+               (yyval.ctype)->is_bitfield = is_bitfield || scanner->flags;
+               last_enum_value = -1;
+         }
+    break;
+
+  case 139:
+
+/* Line 1806 of yacc.c  */
+#line 948 "scannerparser.y"
+    {
+               (yyval.ctype) = gi_source_enum_new ((yyvsp[(2) - (2)].str));
+         }
+    break;
+
+  case 140:
+
+/* Line 1806 of yacc.c  */
+#line 955 "scannerparser.y"
+    {
+                scanner->flags = FALSE;
+                scanner->private = FALSE;
+          }
+    break;
+
+  case 141:
+
+/* Line 1806 of yacc.c  */
+#line 963 "scannerparser.y"
+    {
+               /* reset flag before the first enum value */
+               is_bitfield = FALSE;
+         }
+    break;
+
+  case 142:
+
+/* Line 1806 of yacc.c  */
+#line 968 "scannerparser.y"
+    {
+            (yyvsp[(2) - (2)].symbol)->private = scanner->private;
+            (yyval.list) = g_list_append (NULL, (yyvsp[(2) - (2)].symbol));
+         }
+    break;
+
+  case 143:
+
+/* Line 1806 of yacc.c  */
+#line 973 "scannerparser.y"
+    {
+            (yyvsp[(3) - (3)].symbol)->private = scanner->private;
+            (yyval.list) = g_list_append ((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].symbol));
+         }
+    break;
+
+  case 144:
+
+/* Line 1806 of yacc.c  */
+#line 981 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_OBJECT, scanner->current_filename, lineno);
+               (yyval.symbol)->ident = (yyvsp[(1) - (1)].str);
+               (yyval.symbol)->const_int_set = TRUE;
+               (yyval.symbol)->const_int = ++last_enum_value;
+               g_hash_table_insert (const_table, g_strdup ((yyval.symbol)->ident), gi_source_symbol_ref ((yyval.symbol)));
+         }
+    break;
+
+  case 145:
+
+/* Line 1806 of yacc.c  */
+#line 989 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_OBJECT, scanner->current_filename, lineno);
+               (yyval.symbol)->ident = (yyvsp[(1) - (3)].str);
+               (yyval.symbol)->const_int_set = TRUE;
+               (yyval.symbol)->const_int = (yyvsp[(3) - (3)].symbol)->const_int;
+               last_enum_value = (yyval.symbol)->const_int;
+               g_hash_table_insert (const_table, g_strdup ((yyval.symbol)->ident), gi_source_symbol_ref ((yyval.symbol)));
+         }
+    break;
+
+  case 146:
+
+/* Line 1806 of yacc.c  */
+#line 1001 "scannerparser.y"
+    {
+               (yyval.type_qualifier) = TYPE_QUALIFIER_CONST;
+         }
+    break;
+
+  case 147:
+
+/* Line 1806 of yacc.c  */
+#line 1005 "scannerparser.y"
+    {
+               (yyval.type_qualifier) = TYPE_QUALIFIER_RESTRICT;
+         }
+    break;
+
+  case 148:
+
+/* Line 1806 of yacc.c  */
+#line 1009 "scannerparser.y"
+    {
+               (yyval.type_qualifier) = TYPE_QUALIFIER_EXTENSION;
+         }
+    break;
+
+  case 149:
+
+/* Line 1806 of yacc.c  */
+#line 1013 "scannerparser.y"
+    {
+               (yyval.type_qualifier) = TYPE_QUALIFIER_VOLATILE;
+         }
+    break;
+
+  case 150:
+
+/* Line 1806 of yacc.c  */
+#line 1020 "scannerparser.y"
+    {
+               (yyval.function_specifier) = FUNCTION_INLINE;
+         }
+    break;
+
+  case 151:
+
+/* Line 1806 of yacc.c  */
+#line 1027 "scannerparser.y"
+    {
+               (yyval.symbol) = (yyvsp[(2) - (2)].symbol);
+               gi_source_symbol_merge_type ((yyval.symbol), (yyvsp[(1) - (2)].ctype));
+         }
+    break;
+
+  case 153:
+
+/* Line 1806 of yacc.c  */
+#line 1036 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+               (yyval.symbol)->ident = (yyvsp[(1) - (1)].str);
+         }
+    break;
+
+  case 154:
+
+/* Line 1806 of yacc.c  */
+#line 1041 "scannerparser.y"
+    {
+               (yyval.symbol) = (yyvsp[(2) - (3)].symbol);
+         }
+    break;
+
+  case 155:
+
+/* Line 1806 of yacc.c  */
+#line 1045 "scannerparser.y"
+    {
+               (yyval.symbol) = (yyvsp[(1) - (4)].symbol);
+               gi_source_symbol_merge_type ((yyval.symbol), gi_source_array_new ((yyvsp[(3) - (4)].symbol)));
+         }
+    break;
+
+  case 156:
+
+/* Line 1806 of yacc.c  */
+#line 1050 "scannerparser.y"
+    {
+               (yyval.symbol) = (yyvsp[(1) - (3)].symbol);
+               gi_source_symbol_merge_type ((yyval.symbol), gi_source_array_new (NULL));
+         }
+    break;
+
+  case 157:
+
+/* Line 1806 of yacc.c  */
+#line 1055 "scannerparser.y"
+    {
+               GISourceType *func = gi_source_function_new ();
+               // ignore (void) parameter list
+               if ((yyvsp[(3) - (4)].list) != NULL && ((yyvsp[(3) - (4)].list)->next != NULL || ((GISourceSymbol *) (yyvsp[(3) - (4)].list)->data)->base_type->type != CTYPE_VOID)) {
+                       func->child_list = (yyvsp[(3) - (4)].list);
+               }
+               (yyval.symbol) = (yyvsp[(1) - (4)].symbol);
+               gi_source_symbol_merge_type ((yyval.symbol), func);
+         }
+    break;
+
+  case 158:
+
+/* Line 1806 of yacc.c  */
+#line 1065 "scannerparser.y"
+    {
+               GISourceType *func = gi_source_function_new ();
+               func->child_list = (yyvsp[(3) - (4)].list);
+               (yyval.symbol) = (yyvsp[(1) - (4)].symbol);
+               gi_source_symbol_merge_type ((yyval.symbol), func);
+         }
+    break;
+
+  case 159:
+
+/* Line 1806 of yacc.c  */
+#line 1072 "scannerparser.y"
+    {
+               GISourceType *func = gi_source_function_new ();
+               (yyval.symbol) = (yyvsp[(1) - (3)].symbol);
+               gi_source_symbol_merge_type ((yyval.symbol), func);
+         }
+    break;
+
+  case 160:
+
+/* Line 1806 of yacc.c  */
+#line 1081 "scannerparser.y"
+    {
+               (yyval.ctype) = gi_source_pointer_new (NULL);
+               (yyval.ctype)->type_qualifier = (yyvsp[(2) - (2)].type_qualifier);
+         }
+    break;
+
+  case 161:
+
+/* Line 1806 of yacc.c  */
+#line 1086 "scannerparser.y"
+    {
+               (yyval.ctype) = gi_source_pointer_new (NULL);
+         }
+    break;
+
+  case 162:
+
+/* Line 1806 of yacc.c  */
+#line 1090 "scannerparser.y"
+    {
+               (yyval.ctype) = gi_source_pointer_new ((yyvsp[(3) - (3)].ctype));
+               (yyval.ctype)->type_qualifier = (yyvsp[(2) - (3)].type_qualifier);
+         }
+    break;
+
+  case 163:
+
+/* Line 1806 of yacc.c  */
+#line 1095 "scannerparser.y"
+    {
+               (yyval.ctype) = gi_source_pointer_new ((yyvsp[(2) - (2)].ctype));
+         }
+    break;
+
+  case 165:
+
+/* Line 1806 of yacc.c  */
+#line 1103 "scannerparser.y"
+    {
+               (yyval.type_qualifier) = (yyvsp[(1) - (2)].type_qualifier) | (yyvsp[(2) - (2)].type_qualifier);
+         }
+    break;
+
+  case 166:
+
+/* Line 1806 of yacc.c  */
+#line 1110 "scannerparser.y"
+    {
+               (yyval.list) = g_list_append (NULL, (yyvsp[(1) - (1)].symbol));
+         }
+    break;
+
+  case 167:
+
+/* Line 1806 of yacc.c  */
+#line 1114 "scannerparser.y"
+    {
+               (yyval.list) = g_list_append ((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].symbol));
+         }
+    break;
+
+  case 168:
+
+/* Line 1806 of yacc.c  */
+#line 1121 "scannerparser.y"
+    {
+               (yyval.symbol) = (yyvsp[(2) - (2)].symbol);
+               gi_source_symbol_merge_type ((yyval.symbol), (yyvsp[(1) - (2)].ctype));
+         }
+    break;
+
+  case 169:
+
+/* Line 1806 of yacc.c  */
+#line 1126 "scannerparser.y"
+    {
+               (yyval.symbol) = (yyvsp[(2) - (2)].symbol);
+               gi_source_symbol_merge_type ((yyval.symbol), (yyvsp[(1) - (2)].ctype));
+         }
+    break;
+
+  case 170:
+
+/* Line 1806 of yacc.c  */
+#line 1131 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+               (yyval.symbol)->base_type = (yyvsp[(1) - (1)].ctype);
+         }
+    break;
+
+  case 171:
+
+/* Line 1806 of yacc.c  */
+#line 1136 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_ELLIPSIS, scanner->current_filename, lineno);
+         }
+    break;
+
+  case 172:
+
+/* Line 1806 of yacc.c  */
+#line 1143 "scannerparser.y"
+    {
+               GISourceSymbol *sym = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+               sym->ident = (yyvsp[(1) - (1)].str);
+               (yyval.list) = g_list_append (NULL, sym);
+         }
+    break;
+
+  case 173:
+
+/* Line 1806 of yacc.c  */
+#line 1149 "scannerparser.y"
+    {
+               GISourceSymbol *sym = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+               sym->ident = (yyvsp[(3) - (3)].str);
+               (yyval.list) = g_list_append ((yyvsp[(1) - (3)].list), sym);
+         }
+    break;
+
+  case 176:
+
+/* Line 1806 of yacc.c  */
+#line 1163 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+               gi_source_symbol_merge_type ((yyval.symbol), (yyvsp[(1) - (1)].ctype));
+         }
+    break;
+
+  case 178:
+
+/* Line 1806 of yacc.c  */
+#line 1169 "scannerparser.y"
+    {
+               (yyval.symbol) = (yyvsp[(2) - (2)].symbol);
+               gi_source_symbol_merge_type ((yyval.symbol), (yyvsp[(1) - (2)].ctype));
+         }
+    break;
+
+  case 179:
+
+/* Line 1806 of yacc.c  */
+#line 1177 "scannerparser.y"
+    {
+               (yyval.symbol) = (yyvsp[(2) - (3)].symbol);
+         }
+    break;
+
+  case 180:
+
+/* Line 1806 of yacc.c  */
+#line 1181 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+               gi_source_symbol_merge_type ((yyval.symbol), gi_source_array_new (NULL));
+         }
+    break;
+
+  case 181:
+
+/* Line 1806 of yacc.c  */
+#line 1186 "scannerparser.y"
+    {
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+               gi_source_symbol_merge_type ((yyval.symbol), gi_source_array_new ((yyvsp[(2) - (3)].symbol)));
+         }
+    break;
+
+  case 182:
+
+/* Line 1806 of yacc.c  */
+#line 1191 "scannerparser.y"
+    {
+               (yyval.symbol) = (yyvsp[(1) - (3)].symbol);
+               gi_source_symbol_merge_type ((yyval.symbol), gi_source_array_new (NULL));
+         }
+    break;
+
+  case 183:
+
+/* Line 1806 of yacc.c  */
+#line 1196 "scannerparser.y"
+    {
+               (yyval.symbol) = (yyvsp[(1) - (4)].symbol);
+               gi_source_symbol_merge_type ((yyval.symbol), gi_source_array_new ((yyvsp[(3) - (4)].symbol)));
+         }
+    break;
+
+  case 184:
+
+/* Line 1806 of yacc.c  */
+#line 1201 "scannerparser.y"
+    {
+               GISourceType *func = gi_source_function_new ();
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+               gi_source_symbol_merge_type ((yyval.symbol), func);
+         }
+    break;
+
+  case 185:
+
+/* Line 1806 of yacc.c  */
+#line 1207 "scannerparser.y"
+    {
+               GISourceType *func = gi_source_function_new ();
+               // ignore (void) parameter list
+               if ((yyvsp[(2) - (3)].list) != NULL && ((yyvsp[(2) - (3)].list)->next != NULL || ((GISourceSymbol *) (yyvsp[(2) - (3)].list)->data)->base_type->type != CTYPE_VOID)) {
+                       func->child_list = (yyvsp[(2) - (3)].list);
+               }
+               (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
+               gi_source_symbol_merge_type ((yyval.symbol), func);
+         }
+    break;
+
+  case 186:
+
+/* Line 1806 of yacc.c  */
+#line 1217 "scannerparser.y"
+    {
+               GISourceType *func = gi_source_function_new ();
+               (yyval.symbol) = (yyvsp[(1) - (3)].symbol);
+               gi_source_symbol_merge_type ((yyval.symbol), func);
+         }
+    break;
+
+  case 187:
+
+/* Line 1806 of yacc.c  */
+#line 1223 "scannerparser.y"
+    {
+               GISourceType *func = gi_source_function_new ();
+               // ignore (void) parameter list
+               if ((yyvsp[(3) - (4)].list) != NULL && ((yyvsp[(3) - (4)].list)->next != NULL || ((GISourceSymbol *) (yyvsp[(3) - (4)].list)->data)->base_type->type != CTYPE_VOID)) {
+                       func->child_list = (yyvsp[(3) - (4)].list);
+               }
+               (yyval.symbol) = (yyvsp[(1) - (4)].symbol);
+               gi_source_symbol_merge_type ((yyval.symbol), func);
+         }
+    break;
+
+  case 188:
+
+/* Line 1806 of yacc.c  */
+#line 1236 "scannerparser.y"
+    {
+               (yyval.str) = g_strdup (yytext);
+         }
+    break;
+
+  case 238:
+
+/* Line 1806 of yacc.c  */
+#line 1343 "scannerparser.y"
+    {
+               (yyval.str) = g_strdup (yytext + strlen ("#define "));
+         }
+    break;
+
+  case 239:
+
+/* Line 1806 of yacc.c  */
+#line 1350 "scannerparser.y"
+    {
+               (yyval.str) = g_strdup (yytext + strlen ("#define "));
+         }
+    break;
+
+  case 241:
+
+/* Line 1806 of yacc.c  */
+#line 1361 "scannerparser.y"
+    {
+               if ((yyvsp[(2) - (2)].symbol)->const_int_set || (yyvsp[(2) - (2)].symbol)->const_double_set || (yyvsp[(2) - (2)].symbol)->const_string != NULL) {
+                       (yyvsp[(2) - (2)].symbol)->ident = (yyvsp[(1) - (2)].str);
+                       gi_source_scanner_add_symbol (scanner, (yyvsp[(2) - (2)].symbol));
+                       gi_source_symbol_unref ((yyvsp[(2) - (2)].symbol));
+               }
+         }
+    break;
+
+
+
+/* Line 1806 of yacc.c  */
+#line 3916 "scannerparser.c"
+      default: break;
+    }
+  /* User semantic actions sometimes alter yychar, and that requires
+     that yytoken be updated with the new translation.  We take the
+     approach of translating immediately before every use of yytoken.
+     One alternative is translating here after every semantic action,
+     but that translation would be missed if the semantic action invokes
+     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
+     incorrect destructor might then be invoked immediately.  In the
+     case of YYERROR or YYBACKUP, subsequent parser actions might lead
+     to an incorrect destructor call or verbose syntax error message
+     before the lookahead is translated.  */
+  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+
+  *++yyvsp = yyval;
+
+  /* Now `shift' the result of the reduction.  Determine what state
+     that goes to, based on the state we popped back to and the rule
+     number reduced by.  */
+
+  yyn = yyr1[yyn];
+
+  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+    yystate = yytable[yystate];
+  else
+    yystate = yydefgoto[yyn - YYNTOKENS];
+
+  goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+  /* Make sure we have latest lookahead translation.  See comments at
+     user semantic actions for why this is necessary.  */
+  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
+  /* If not already recovering from an error, report this error.  */
+  if (!yyerrstatus)
+    {
+      ++yynerrs;
+#if ! YYERROR_VERBOSE
+      yyerror (scanner, YY_("syntax error"));
+#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+                                        yyssp, yytoken)
+      {
+        char const *yymsgp = YY_("syntax error");
+        int yysyntax_error_status;
+        yysyntax_error_status = YYSYNTAX_ERROR;
+        if (yysyntax_error_status == 0)
+          yymsgp = yymsg;
+        else if (yysyntax_error_status == 1)
+          {
+            if (yymsg != yymsgbuf)
+              YYSTACK_FREE (yymsg);
+            yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+            if (!yymsg)
+              {
+                yymsg = yymsgbuf;
+                yymsg_alloc = sizeof yymsgbuf;
+                yysyntax_error_status = 2;
+              }
+            else
+              {
+                yysyntax_error_status = YYSYNTAX_ERROR;
+                yymsgp = yymsg;
+              }
+          }
+        yyerror (scanner, yymsgp);
+        if (yysyntax_error_status == 2)
+          goto yyexhaustedlab;
+      }
+# undef YYSYNTAX_ERROR
+#endif
+    }
+
+
+
+  if (yyerrstatus == 3)
+    {
+      /* If just tried and failed to reuse lookahead token after an
+        error, discard it.  */
+
+      if (yychar <= YYEOF)
+       {
+         /* Return failure if at end of input.  */
+         if (yychar == YYEOF)
+           YYABORT;
+       }
+      else
+       {
+         yydestruct ("Error: discarding",
+                     yytoken, &yylval, scanner);
+         yychar = YYEMPTY;
+       }
+    }
+
+  /* Else will try to reuse lookahead token after shifting the error
+     token.  */
+  goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR.  |
+`---------------------------------------------------*/
+yyerrorlab:
+
+  /* Pacify compilers like GCC when the user code never invokes
+     YYERROR and the label yyerrorlab therefore never appears in user
+     code.  */
+  if (/*CONSTCOND*/ 0)
+     goto yyerrorlab;
+
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYERROR.  */
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+  yystate = *yyssp;
+  goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR.  |
+`-------------------------------------------------------------*/
+yyerrlab1:
+  yyerrstatus = 3;     /* Each real token shifted decrements this.  */
+
+  for (;;)
+    {
+      yyn = yypact[yystate];
+      if (!yypact_value_is_default (yyn))
+       {
+         yyn += YYTERROR;
+         if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+           {
+             yyn = yytable[yyn];
+             if (0 < yyn)
+               break;
+           }
+       }
+
+      /* Pop the current state because it cannot handle the error token.  */
+      if (yyssp == yyss)
+       YYABORT;
+
+
+      yydestruct ("Error: popping",
+                 yystos[yystate], yyvsp, scanner);
+      YYPOPSTACK (1);
+      yystate = *yyssp;
+      YY_STACK_PRINT (yyss, yyssp);
+    }
+
+  *++yyvsp = yylval;
+
+
+  /* Shift the error token.  */
+  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+  yystate = yyn;
+  goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here.  |
+`-------------------------------------*/
+yyacceptlab:
+  yyresult = 0;
+  goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here.  |
+`-----------------------------------*/
+yyabortlab:
+  yyresult = 1;
+  goto yyreturn;
+
+#if !defined(yyoverflow) || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here.  |
+`-------------------------------------------------*/
+yyexhaustedlab:
+  yyerror (scanner, YY_("memory exhausted"));
+  yyresult = 2;
+  /* Fall through.  */
+#endif
+
+yyreturn:
+  if (yychar != YYEMPTY)
+    {
+      /* Make sure we have latest lookahead translation.  See comments at
+         user semantic actions for why this is necessary.  */
+      yytoken = YYTRANSLATE (yychar);
+      yydestruct ("Cleanup: discarding lookahead",
+                  yytoken, &yylval, scanner);
+    }
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYABORT or YYACCEPT.  */
+  YYPOPSTACK (yylen);
+  YY_STACK_PRINT (yyss, yyssp);
+  while (yyssp != yyss)
+    {
+      yydestruct ("Cleanup: popping",
+                 yystos[*yyssp], yyvsp, scanner);
+      YYPOPSTACK (1);
+    }
+#ifndef yyoverflow
+  if (yyss != yyssa)
+    YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+  if (yymsg != yymsgbuf)
+    YYSTACK_FREE (yymsg);
+#endif
+  /* Make sure YYID is used.  */
+  return YYID (yyresult);
+}
+
+
+
+/* Line 2067 of yacc.c  */
+#line 1376 "scannerparser.y"
+
+static void
+yyerror (GISourceScanner *scanner, const char *s)
+{
+  /* ignore errors while doing a macro scan as not all object macros
+   * have valid expressions */
+  if (!scanner->macro_scan)
+    {
+      fprintf(stderr, "%s:%d: %s in '%s' at '%s'\n",
+             scanner->current_filename, lineno, s, linebuf, yytext);
+    }
+}
+
+static int
+eat_hspace (FILE * f)
+{
+  int c;
+  do
+    {
+      c = fgetc (f);
+    }
+  while (c == ' ' || c == '\t');
+  return c;
+}
+
+static int
+eat_line (FILE * f, int c)
+{
+  while (c != EOF && c != '\n')
+    {
+      c = fgetc (f);
+    }
+  if (c == '\n')
+    {
+      c = fgetc (f);
+      if (c == ' ' || c == '\t')
+        {
+          c = eat_hspace (f);
+        }
+    }
+  return c;
+}
+
+static int
+read_identifier (FILE * f, int c, char **identifier)
+{
+  GString *id = g_string_new ("");
+  while (g_ascii_isalnum (c) || c == '_')
+    {
+      g_string_append_c (id, c);
+      c = fgetc (f);
+    }
+  *identifier = g_string_free (id, FALSE);
+  return c;
+}
+
+void
+gi_source_scanner_parse_macros (GISourceScanner *scanner, GList *filenames)
+{
+  GError *error = NULL;
+  char *tmp_name = NULL;
+  FILE *fmacros =
+    fdopen (g_file_open_tmp ("gen-introspect-XXXXXX.h", &tmp_name, &error),
+            "w+");
+  g_unlink (tmp_name);
+
+  GList *l;
+  for (l = filenames; l != NULL; l = l->next)
+    {
+      FILE *f = fopen (l->data, "r");
+      int line = 1;
+
+      GString *define_line;
+      char *str;
+      gboolean error_line = FALSE;
+      int c = eat_hspace (f);
+      while (c != EOF)
+        {
+          if (c != '#')
+            {
+              /* ignore line */
+              c = eat_line (f, c);
+              line++;
+              continue;
+            }
+
+          /* print current location */
+          str = g_strescape (l->data, "");
+          fprintf (fmacros, "# %d \"%s\"\n", line, str);
+          g_free (str);
+
+          c = eat_hspace (f);
+          c = read_identifier (f, c, &str);
+          if (strcmp (str, "define") != 0 || (c != ' ' && c != '\t'))
+            {
+              g_free (str);
+              /* ignore line */
+              c = eat_line (f, c);
+              line++;
+              continue;
+            }
+          g_free (str);
+          c = eat_hspace (f);
+          c = read_identifier (f, c, &str);
+          if (strlen (str) == 0 || (c != ' ' && c != '\t' && c != '('))
+            {
+              g_free (str);
+              /* ignore line */
+              c = eat_line (f, c);
+              line++;
+              continue;
+            }
+          define_line = g_string_new ("#define ");
+          g_string_append (define_line, str);
+          g_free (str);
+          if (c == '(')
+            {
+              while (c != ')')
+                {
+                  g_string_append_c (define_line, c);
+                  c = fgetc (f);
+                  if (c == EOF || c == '\n')
+                    {
+                      error_line = TRUE;
+                      break;
+                    }
+                }
+              if (error_line)
+                {
+                  g_string_free (define_line, TRUE);
+                  /* ignore line */
+                  c = eat_line (f, c);
+                  line++;
+                  continue;
+                }
+
+              g_assert (c == ')');
+              g_string_append_c (define_line, c);
+              c = fgetc (f);
+
+              /* found function-like macro */
+              fprintf (fmacros, "%s\n", define_line->str);
+
+              g_string_free (define_line, TRUE);
+              /* ignore rest of line */
+              c = eat_line (f, c);
+              line++;
+              continue;
+            }
+          if (c != ' ' && c != '\t')
+            {
+              g_string_free (define_line, TRUE);
+              /* ignore line */
+              c = eat_line (f, c);
+              line++;
+              continue;
+            }
+          while (c != EOF && c != '\n')
+            {
+              g_string_append_c (define_line, c);
+              c = fgetc (f);
+              if (c == '\\')
+                {
+                  c = fgetc (f);
+                  if (c == '\n')
+                    {
+                      /* fold lines when seeing backslash new-line sequence */
+                      c = fgetc (f);
+                    }
+                  else
+                    {
+                      g_string_append_c (define_line, '\\');
+                    }
+                }
+            }
+
+          /* found object-like macro */
+          fprintf (fmacros, "%s\n", define_line->str);
+
+          c = eat_line (f, c);
+          line++;
+        }
+
+      fclose (f);
+    }
+
+  rewind (fmacros);
+  gi_source_scanner_parse_file (scanner, fmacros);
+}
+
+gboolean
+gi_source_scanner_parse_file (GISourceScanner *scanner, FILE *file)
+{
+  g_return_val_if_fail (file != NULL, FALSE);
+
+  const_table = g_hash_table_new_full (g_str_hash, g_str_equal,
+                                      g_free, (GDestroyNotify)gi_source_symbol_unref);
+
+  lineno = 1;
+  yyin = file;
+  yyparse (scanner);
+
+  g_hash_table_destroy (const_table);
+  const_table = NULL;
+
+  yyin = NULL;
+
+  return TRUE;
+}
+
+gboolean
+gi_source_scanner_lex_filename (GISourceScanner *scanner, const gchar *filename)
+{
+  lineno = 1;
+  yyin = fopen (filename, "r");
+
+  while (yylex (scanner) != YYEOF)
+    ;
+
+  fclose (yyin);
+
+  return TRUE;
+}
+
diff --git a/scannerparser.h b/scannerparser.h
new file mode 100644 (file)
index 0000000..3bf30ba
--- /dev/null
@@ -0,0 +1,207 @@
+/* A Bison parser, made by GNU Bison 2.5.  */
+
+/* Bison interface for Yacc-like parsers in C
+   
+      Copyright (C) 1984, 1989-1990, 2000-2011 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 3 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, see <http://www.gnu.org/licenses/>.  */
+
+/* As a special exception, you may create a larger work that contains
+   part or all of the Bison parser skeleton and distribute that work
+   under terms of your choice, so long as that work isn't itself a
+   parser generator using the skeleton or a modified version thereof
+   as a parser skeleton.  Alternatively, if you modify or redistribute
+   the parser skeleton itself, you may (at your option) remove this
+   special exception, which will cause the skeleton and the resulting
+   Bison output files to be licensed under the GNU General Public
+   License without this special exception.
+   
+   This special exception was added by the Free Software Foundation in
+   version 2.2 of Bison.  */
+
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     IDENTIFIER = 258,
+     TYPEDEF_NAME = 259,
+     INTEGER = 260,
+     FLOATING = 261,
+     CHARACTER = 262,
+     STRING = 263,
+     ELLIPSIS = 264,
+     ADDEQ = 265,
+     SUBEQ = 266,
+     MULEQ = 267,
+     DIVEQ = 268,
+     MODEQ = 269,
+     XOREQ = 270,
+     ANDEQ = 271,
+     OREQ = 272,
+     SL = 273,
+     SR = 274,
+     SLEQ = 275,
+     SREQ = 276,
+     EQ = 277,
+     NOTEQ = 278,
+     LTEQ = 279,
+     GTEQ = 280,
+     ANDAND = 281,
+     OROR = 282,
+     PLUSPLUS = 283,
+     MINUSMINUS = 284,
+     ARROW = 285,
+     AUTO = 286,
+     BOOL = 287,
+     BREAK = 288,
+     CASE = 289,
+     CHAR = 290,
+     CONST = 291,
+     CONTINUE = 292,
+     DEFAULT = 293,
+     DO = 294,
+     DOUBLE = 295,
+     ELSE = 296,
+     ENUM = 297,
+     EXTENSION = 298,
+     EXTERN = 299,
+     FLOAT = 300,
+     FOR = 301,
+     GOTO = 302,
+     IF = 303,
+     INLINE = 304,
+     INT = 305,
+     LONG = 306,
+     REGISTER = 307,
+     RESTRICT = 308,
+     RETURN = 309,
+     SHORT = 310,
+     SIGNED = 311,
+     SIZEOF = 312,
+     STATIC = 313,
+     STRUCT = 314,
+     SWITCH = 315,
+     TYPEDEF = 316,
+     UNION = 317,
+     UNSIGNED = 318,
+     VOID = 319,
+     VOLATILE = 320,
+     WHILE = 321,
+     FUNCTION_MACRO = 322,
+     OBJECT_MACRO = 323
+   };
+#endif
+/* Tokens.  */
+#define IDENTIFIER 258
+#define TYPEDEF_NAME 259
+#define INTEGER 260
+#define FLOATING 261
+#define CHARACTER 262
+#define STRING 263
+#define ELLIPSIS 264
+#define ADDEQ 265
+#define SUBEQ 266
+#define MULEQ 267
+#define DIVEQ 268
+#define MODEQ 269
+#define XOREQ 270
+#define ANDEQ 271
+#define OREQ 272
+#define SL 273
+#define SR 274
+#define SLEQ 275
+#define SREQ 276
+#define EQ 277
+#define NOTEQ 278
+#define LTEQ 279
+#define GTEQ 280
+#define ANDAND 281
+#define OROR 282
+#define PLUSPLUS 283
+#define MINUSMINUS 284
+#define ARROW 285
+#define AUTO 286
+#define BOOL 287
+#define BREAK 288
+#define CASE 289
+#define CHAR 290
+#define CONST 291
+#define CONTINUE 292
+#define DEFAULT 293
+#define DO 294
+#define DOUBLE 295
+#define ELSE 296
+#define ENUM 297
+#define EXTENSION 298
+#define EXTERN 299
+#define FLOAT 300
+#define FOR 301
+#define GOTO 302
+#define IF 303
+#define INLINE 304
+#define INT 305
+#define LONG 306
+#define REGISTER 307
+#define RESTRICT 308
+#define RETURN 309
+#define SHORT 310
+#define SIGNED 311
+#define SIZEOF 312
+#define STATIC 313
+#define STRUCT 314
+#define SWITCH 315
+#define TYPEDEF 316
+#define UNION 317
+#define UNSIGNED 318
+#define VOID 319
+#define VOLATILE 320
+#define WHILE 321
+#define FUNCTION_MACRO 322
+#define OBJECT_MACRO 323
+
+
+
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
+{
+
+/* Line 2068 of yacc.c  */
+#line 134 "scannerparser.y"
+
+  char *str;
+  GList *list;
+  GISourceSymbol *symbol;
+  GISourceType *ctype;
+  StorageClassSpecifier storage_class_specifier;
+  TypeQualifier type_qualifier;
+  FunctionSpecifier function_specifier;
+  UnaryOperator unary_operator;
+
+
+
+/* Line 2068 of yacc.c  */
+#line 199 "scannerparser.h"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+extern YYSTYPE yylval;
+
+
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644 (file)
index 0000000..b6d6ebd
--- /dev/null
@@ -0,0 +1,71 @@
+include $(top_srcdir)/common.mk
+
+SUBDIRS = . scanner repository offsets warn
+DIST_SUBDIRS = $(SUBDIRS)
+if BUILD_DOCTOOL
+SUBDIRS += doctool
+else
+DIST_SUBDIRS += doctool
+endif
+
+EXTRA_DIST=
+BUILT_SOURCES=
+CLEANFILES=
+
+INCLUDES = $(GOBJECT_CFLAGS)
+LIBADD = $(GOBJECT_LIBS)
+
+testsdir = $(datadir)/gobject-introspection-1.0/tests
+tests_DATA =               \
+    everything.c           \
+    everything.h           \
+    gimarshallingtests.c    \
+    gimarshallingtests.h
+
+check_LTLIBRARIES = libeverything-1.0.la libgimarshallingtests-1.0.la
+
+libeverything_1_0_la_SOURCES = everything.c
+libgimarshallingtests_1_0_la_SOURCES = gimarshallingtests.c
+
+EXTRA_DIST += gimarshallingtests.h
+
+BUILT_SOURCES += everything.c everything.h
+
+CLEANFILES += \
+    $(BUILT_SOURCES) \
+    everything-stamp.h \
+    Everything-1.0.typelib \
+    GIMarshallingTests-1.0.typelib
+
+everything-stamp.h: Makefile
+       $(AM_V_GEN) $(INTROSPECTION_SCANNER) $(INTROSPECTION_SCANNER_ARGS) --generate-typelib-tests=Everything,everything.h,everything.c
+       touch $@
+
+everything.c: everything-stamp.h
+       @true
+
+everything.h: everything-stamp.h
+       @true
+
+Everything-1.0.gir: libeverything-1.0.la Makefile
+       $(AM_V_GEN) $(INTROSPECTION_SCANNER) $(INTROSPECTION_SCANNER_ARGS) --warn-all --warn-error --reparse-validate \
+       --namespace=Everything --nsversion=1.0 \
+       --libtool="$(LIBTOOL)" \
+       --add-include-path=$(top_builddir) --include=Gio-2.0 \
+       --library=libeverything-1.0.la --output=$@ \
+       everything.h everything.c
+
+GIMarshallingTests-1.0.gir: libgimarshallingtests-1.0.la Makefile
+       $(AM_V_GEN) $(INTROSPECTION_SCANNER) $(INTROSPECTION_SCANNER_ARGS) --warn-all --warn-error --reparse-validate \
+       --namespace=GIMarshallingTests --symbol-prefix=gi_marshalling_tests --nsversion=1.0 \
+       --libtool="$(LIBTOOL)" \
+       --add-include-path=$(top_builddir) --include=Gio-2.0 \
+       --library=libgimarshallingtests-1.0.la  --output=$@ \
+       --c-include="tests/gimarshallingtests.h" \
+       $(srcdir)/gimarshallingtests.h $(srcdir)/gimarshallingtests.c
+
+%.typelib: %.gir
+       $(AM_V_GEN) $(INTROSPECTION_COMPILER) $(INTROSPECTION_COMPILER_ARGS) $< -o $@
+
+check: Everything-1.0.typelib GIMarshallingTests-1.0.typelib
+
diff --git a/tests/Makefile.in b/tests/Makefile.in
new file mode 100644 (file)
index 0000000..034d97b
--- /dev/null
@@ -0,0 +1,857 @@
+# 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@
+
+# -*- Mode: make -*-
+# Copyright 2009-2010 Johan Dahlin
+#
+# This file defines variables that are compatible with
+# Makefile.introspection, but for use within the gobject-introspection
+# module itself.
+#
+
+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@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+       $(top_srcdir)/common.mk
+@BUILD_DOCTOOL_TRUE@am__append_1 = doctool
+@BUILD_DOCTOOL_FALSE@am__append_2 = doctool
+subdir = tests
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.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)/acinclude.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 =
+libeverything_1_0_la_LIBADD =
+am_libeverything_1_0_la_OBJECTS = everything.lo
+libeverything_1_0_la_OBJECTS = $(am_libeverything_1_0_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+libgimarshallingtests_1_0_la_LIBADD =
+am_libgimarshallingtests_1_0_la_OBJECTS = gimarshallingtests.lo
+libgimarshallingtests_1_0_la_OBJECTS =  \
+       $(am_libgimarshallingtests_1_0_la_OBJECTS)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/build-aux/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 = $(libeverything_1_0_la_SOURCES) \
+       $(libgimarshallingtests_1_0_la_SOURCES)
+DIST_SOURCES = $(libeverything_1_0_la_SOURCES) \
+       $(libgimarshallingtests_1_0_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
+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)$(testsdir)"
+DATA = $(tests_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
+ETAGS = etags
+CTAGS = ctags
+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"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_GIR_PACKAGE = @CAIRO_GIR_PACKAGE@
+CAIRO_GOBJECT_CFLAGS = @CAIRO_GOBJECT_CFLAGS@
+CAIRO_GOBJECT_LIBS = @CAIRO_GOBJECT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CAIRO_SHARED_LIBRARY = @CAIRO_SHARED_LIBRARY@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+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@
+EXPANDED_BINDIR = @EXPANDED_BINDIR@
+EXPANDED_DATADIR = @EXPANDED_DATADIR@
+EXPANDED_LIBDIR = @EXPANDED_LIBDIR@
+EXPANDED_LIBEXECDIR = @EXPANDED_LIBEXECDIR@
+EXPANDED_LOCALSTATEDIR = @EXPANDED_LOCALSTATEDIR@
+EXPANDED_SYSCONFDIR = @EXPANDED_SYSCONFDIR@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FFI_PC_CFLAGS = @FFI_PC_CFLAGS@
+FFI_PC_LIBS = @FFI_PC_LIBS@
+FFI_PC_PACKAGES = @FFI_PC_PACKAGES@
+FGREP = @FGREP@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
+GIREPO_CFLAGS = @GIREPO_CFLAGS@
+GIREPO_LIBS = @GIREPO_LIBS@
+GIR_DIR = @GIR_DIR@
+GIR_SUFFIX = @GIR_SUFFIX@
+GLIBSRC = @GLIBSRC@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMODULE_CFLAGS = @GMODULE_CFLAGS@
+GMODULE_LIBS = @GMODULE_LIBS@
+GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
+GOBJECT_INTROSPECTION_LIBDIR = @GOBJECT_INTROSPECTION_LIBDIR@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
+GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
+GTKDOC_MKPDF = @GTKDOC_MKPDF@
+GTKDOC_REBASE = @GTKDOC_REBASE@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+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@
+POW_LIB = @POW_LIB@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_LIB_LOC = @PYTHON_LIB_LOC@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SCANNER_CFLAGS = @SCANNER_CFLAGS@
+SCANNER_LIBS = @SCANNER_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+YACC = @YACC@
+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@
+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@
+INTROSPECTION_SCANNER = \
+    env PATH=.libs:$(PATH) \
+        LPATH=.libs \
+        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
+        UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
+        $(top_builddir)/g-ir-scanner
+
+INTROSPECTION_SCANNER_ARGS = \
+    --verbose \
+    -I$(top_srcdir) \
+    --add-include-path=$(srcdir) \
+    --add-include-path=$(top_srcdir)/gir \
+    --add-include-path=$(builddir) \
+    --add-include-path=$(top_builddir)
+
+INTROSPECTION_COMPILER = \
+    env PATH=.libs:$(PATH) \
+        $(top_builddir)/g-ir-compiler$(EXEEXT)
+
+INTROSPECTION_COMPILER_ARGS = \
+    --includedir=$(srcdir) \
+    --includedir=$(top_srcdir)/gir \
+    --includedir=$(builddir) \
+    --includedir=$(top_builddir)
+
+INTROSPECTION_DOCTOOL = \
+    env PATH=.libs:$(PATH) \
+        LPATH=.libs \
+        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
+        UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
+        $(top_builddir)/g-ir-doc-tool
+
+SUBDIRS = . scanner repository offsets warn $(am__append_1)
+DIST_SUBDIRS = $(SUBDIRS) $(am__append_2)
+EXTRA_DIST = gimarshallingtests.h
+BUILT_SOURCES = everything.c everything.h
+CLEANFILES = $(BUILT_SOURCES) everything-stamp.h \
+       Everything-1.0.typelib GIMarshallingTests-1.0.typelib
+INCLUDES = $(GOBJECT_CFLAGS)
+LIBADD = $(GOBJECT_LIBS)
+testsdir = $(datadir)/gobject-introspection-1.0/tests
+tests_DATA = \
+    everything.c           \
+    everything.h           \
+    gimarshallingtests.c    \
+    gimarshallingtests.h
+
+check_LTLIBRARIES = libeverything-1.0.la libgimarshallingtests-1.0.la
+libeverything_1_0_la_SOURCES = everything.c
+libgimarshallingtests_1_0_la_SOURCES = gimarshallingtests.c
+all: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/common.mk $(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-checkLTLIBRARIES:
+       -test -z "$(check_LTLIBRARIES)" || rm -f $(check_LTLIBRARIES)
+       @list='$(check_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
+libeverything-1.0.la: $(libeverything_1_0_la_OBJECTS) $(libeverything_1_0_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK)  $(libeverything_1_0_la_OBJECTS) $(libeverything_1_0_la_LIBADD) $(LIBS)
+libgimarshallingtests-1.0.la: $(libgimarshallingtests_1_0_la_OBJECTS) $(libgimarshallingtests_1_0_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK)  $(libgimarshallingtests_1_0_la_OBJECTS) $(libgimarshallingtests_1_0_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/everything.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gimarshallingtests.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 $@ $<
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+install-testsDATA: $(tests_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(testsdir)" || $(MKDIR_P) "$(DESTDIR)$(testsdir)"
+       @list='$(tests_DATA)'; test -n "$(testsdir)" || 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)$(testsdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(testsdir)" || exit $$?; \
+       done
+
+uninstall-testsDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(tests_DATA)'; test -n "$(testsdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(testsdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(testsdir)" && 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)  $(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_LTLIBRARIES)
+check: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) check-recursive
+all-am: Makefile $(DATA)
+installdirs: installdirs-recursive
+installdirs-am:
+       for dir in "$(DESTDIR)$(testsdir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
+install: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) 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 "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-recursive
+
+clean-am: clean-checkLTLIBRARIES clean-generic clean-libtool \
+       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-testsDATA
+
+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-testsDATA
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
+       check-am ctags-recursive install install-am install-strip \
+       tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+       all all-am check check-am clean clean-checkLTLIBRARIES \
+       clean-generic clean-libtool 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-strip install-testsDATA 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-testsDATA
+
+
+everything-stamp.h: Makefile
+       $(AM_V_GEN) $(INTROSPECTION_SCANNER) $(INTROSPECTION_SCANNER_ARGS) --generate-typelib-tests=Everything,everything.h,everything.c
+       touch $@
+
+everything.c: everything-stamp.h
+       @true
+
+everything.h: everything-stamp.h
+       @true
+
+Everything-1.0.gir: libeverything-1.0.la Makefile
+       $(AM_V_GEN) $(INTROSPECTION_SCANNER) $(INTROSPECTION_SCANNER_ARGS) --warn-all --warn-error --reparse-validate \
+       --namespace=Everything --nsversion=1.0 \
+       --libtool="$(LIBTOOL)" \
+       --add-include-path=$(top_builddir) --include=Gio-2.0 \
+       --library=libeverything-1.0.la --output=$@ \
+       everything.h everything.c
+
+GIMarshallingTests-1.0.gir: libgimarshallingtests-1.0.la Makefile
+       $(AM_V_GEN) $(INTROSPECTION_SCANNER) $(INTROSPECTION_SCANNER_ARGS) --warn-all --warn-error --reparse-validate \
+       --namespace=GIMarshallingTests --symbol-prefix=gi_marshalling_tests --nsversion=1.0 \
+       --libtool="$(LIBTOOL)" \
+       --add-include-path=$(top_builddir) --include=Gio-2.0 \
+       --library=libgimarshallingtests-1.0.la  --output=$@ \
+       --c-include="tests/gimarshallingtests.h" \
+       $(srcdir)/gimarshallingtests.h $(srcdir)/gimarshallingtests.c
+
+%.typelib: %.gir
+       $(AM_V_GEN) $(INTROSPECTION_COMPILER) $(INTROSPECTION_COMPILER_ARGS) $< -o $@
+
+check: Everything-1.0.typelib GIMarshallingTests-1.0.typelib
+
+# 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/doctool/DocExamples-1.0-C-expected/DocExamples.Obj-property-example.page b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj-property-example.page
new file mode 100644 (file)
index 0000000..e7702a2
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<page id="DocExamples.property-example"
+      type="topic"
+      style="property"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+    <link type="guide" xref="DocExamples.Obj" group="property"/>
+    <title type="link" role="topic">property-example</title>
+  </info>
+  <title>DocExamplesObj:property-example</title>
+<p>This is an example of how to document a property.</p>
+</page>
diff --git a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj-signal-example.page b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj-signal-example.page
new file mode 100644 (file)
index 0000000..548588c
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<page id="DocExamples.signal-example"
+      type="topic"
+      style="signal"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+    <link type="guide" xref="DocExamples.Obj" group="signal"/>
+    <title type="link" role="topic">signal-example</title>
+  </info>
+  <title>DocExamplesObj::signal-example</title>
+<p>This is an example of how to document a signal.</p>
+</page>
diff --git a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj-vfunc.page b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj-vfunc.page
new file mode 100644 (file)
index 0000000..345d64b
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<page id="DocExamples.Obj-vfunc"
+      type="topic"
+      style="vfunc"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:api="http://projectmallard.org/experimental/api/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+    <link type="guide" xref="DocExamples.Obj" group="vfunc"/>
+  </info>
+  <title>vfunc</title>
+<synopsis><code mime="text/x-csrc">
+</code></synopsis>
+<p>This is an example of how to document a vfunc.</p>
+
+<table>
+<tr>
+<td><p>first_arg :</p></td>
+<td><p>first argument</p></td>
+</tr>
+<tr>
+<td><p>Returns :</p></td>
+<td></td>
+</tr>
+</table>
+<p>Since 0.99</p>
+</page>
diff --git a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.method.page b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.method.page
new file mode 100644 (file)
index 0000000..f6c2eba
--- /dev/null
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+
+<page id="DocExamples.Obj.method"
+      type="topic"
+      style="method"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:api="http://projectmallard.org/experimental/api/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+    <link type="guide" xref="DocExamples.Obj" group="method"/>
+    <api:function>
+      <api:returns>
+        <api:type>void</api:type>
+      </api:returns>
+      <api:name>doc_examples_obj_method</api:name>
+      <api:arg>
+        <api:type>DocExamplesObj *</api:type>
+        <api:name>self</api:name>
+      </api:arg>
+      <api:arg>
+        <api:type>gint</api:type>
+        <api:name>first_arg</api:name>
+      </api:arg>
+      <api:arg>
+        <api:type>gfloat</api:type>
+        <api:name>second_arg</api:name>
+      </api:arg>
+    </api:function>
+  </info>
+  <title>doc_examples_obj_method</title>
+<synopsis><code mime="text/x-csrc">
+void doc_examples_obj_method (DocExamplesObj *self,
+gint first_arg,
+                              gfloat second_arg);
+</code></synopsis>
+<p>This is an example of how to document a method.</p>
+
+<table>
+<tr>
+<td><p>first_arg :</p></td>
+<td><p>first argument</p></td>
+</tr>
+<tr>
+<td><p>second_arg :</p></td>
+<td><p>second argument</p></td>
+</tr>
+<tr>
+<td><p>Returns :</p></td>
+<td></td>
+</tr>
+</table>
+<p>Since 0.99</p>
+</page>
diff --git a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.new.page b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.new.page
new file mode 100644 (file)
index 0000000..c20d8c5
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+
+<page id="DocExamples.Obj.new"
+      type="topic"
+      style="constructor"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:api="http://projectmallard.org/experimental/api/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+    <link type="guide" xref="DocExamples.Obj" group="constructor"/>
+    <api:function>
+      <api:returns>
+        <api:type>DocExamplesObj*</api:type>
+      </api:returns>
+      <api:name>doc_examples_obj_new</api:name>
+    </api:function>
+  </info>
+  <title>doc_examples_obj_new</title>
+<synopsis><code mime="text/x-csrc">
+DocExamplesObj* doc_examples_obj_new (void);
+</code></synopsis>
+
+
+<table>
+<tr>
+<td><p>Returns :</p></td>
+<td></td>
+</tr>
+</table>
+</page>
diff --git a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.page b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.page
new file mode 100644 (file)
index 0000000..0a46bd2
--- /dev/null
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<page id="DocExamples.Obj"
+      type="guide"
+      style="class"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:api="http://projectmallard.org/experimental/api/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+    <link type="guide" xref="index" group="class"/>
+  </info>
+  <title>DocExamplesObj</title>
+<p>This is an example of how to document a class</p><p>This class has a signal: <link xref="DocExamples.Obj-signal-example">DocExamples.Obj::signal-example</link>.</p><p>And also has a property: <link xref="DocExamples.Obj-property-example">DocExamples.Obj:property-example</link>.</p>
+<p>Since 0.99</p>
+  <synopsis ui:expanded="no">
+    <title>Hierarchy</title>
+    <tree>
+      <item>
+        <code>GObjectObject</code>
+      </item>
+    </tree>
+  </synopsis>
+  <links type="topic" ui:expanded="yes"
+         api:type="function" api:mime="text/x-csrc"
+         groups="constructor" style="linklist">
+    <title>Constructors</title>
+  </links>
+  <links type="topic" ui:expanded="yes"
+         api:type="function" api:mime="text/x-csrc"
+         groups="method" style="linklist">
+    <title>Methods</title>
+  </links>
+  <links type="topic" ui:expanded="yes"
+         api:type="function" api:mime="text/x-csrc"
+         groups="function" style="linklist">
+    <title>Functions</title>
+  </links>
+  <links type="topic" ui:expanded="yes" groups="property" style="linklist">
+    <title>Properties</title>
+  </links>
+  <links type="topic" ui:expanded="yes" groups="signal" style="linklist">
+    <title>Signals</title>
+  </links>
+  <links type="topic" ui:expanded="yes" groups="#first #default #last" style="linklist">
+    <title>Other</title>
+  </links>
+</page>
diff --git a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.ObjClass.page b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.ObjClass.page
new file mode 100644 (file)
index 0000000..c3a958d
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<page id="DocExamples.ObjClass"
+      type="guide"
+      style="record"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+    <link type="guide" xref="index"/>
+  </info>
+  <title>DocExamplesObjClass</title>
+
+</page>
diff --git a/tests/doctool/DocExamples-1.0-C-expected/index.page b/tests/doctool/DocExamples-1.0-C-expected/index.page
new file mode 100644 (file)
index 0000000..a61ea75
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<page id="index"
+      type="guide"
+      style="namespace"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+  </info>
+  <title>DocExamples Documentation</title>
+  <links type="topic" ui:expanded="yes" groups="class" style="linklist">
+    <title>Classes</title>
+  </links>
+  <links type="topic" ui:expanded="yes" groups="function" style="linklist">
+    <title>Functions</title>
+  </links>
+  <links type="topic" ui:expanded="yes" groups="#first #default #last" style="linklist">
+    <title>Other</title>
+  </links>
+</page>
diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-property-example.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-property-example.page
new file mode 100644 (file)
index 0000000..be1e239
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<page id="DocExamples.Obj-property-example"
+      type="topic"
+      style="property"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+    <link type="guide" xref="DocExamples.Obj" group="property"/>
+    <title type="link" role="topic">property-example</title>
+  </info>
+  <title>DocExamples.Obj:property-example</title>
+<synopsis><code mime="text/x-python">
+"property-example"             {utf8: gint8}                : Read / Write
+</code></synopsis>
+<p>This is an example of how to document a property.</p>
+</page>
diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-signal-example.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-signal-example.page
new file mode 100644 (file)
index 0000000..9b09665
--- /dev/null
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<page id="DocExamples.Obj-signal-example"
+      type="topic"
+      style="signal"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+    <link type="guide" xref="DocExamples.Obj" group="signal"/>
+    <title type="link" role="topic">signal-example</title>
+  </info>
+  <title>DocExamples.Obj::signal-example</title>
+<synopsis><code mime="text/x-python">
+def callback(obj, float_param, since, user_param1, ...)
+</code></synopsis>
+<p>This is an example of how to document a signal.</p>
+
+<table>
+<tr>
+<td><p>obj :</p></td>
+<td><p>instance of DocExamples.Obj that is emitting the signal</p></td>
+</tr>
+<tr>
+<td><p>float_param :</p></td>
+<td><p>a parameter of type float</p></td>
+</tr>
+<tr>
+<td><p>since :</p></td>
+<td></td>
+</tr>
+<tr>
+<td><p>user_param1 :</p></td>
+<td><p>first user parameter (if any) specified with the connect() method</p></td>
+</tr>
+<tr>
+<td><p>... :</p></td>
+<td><p>additional user parameters (if any)</p></td>
+</tr>
+</table>
+<p>Since 0.99</p>
+</page>
diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-vfunc.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-vfunc.page
new file mode 100644 (file)
index 0000000..4e394d2
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<page id="DocExamples.Obj-vfunc"
+      type="topic"
+      style="vfunc"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:api="http://projectmallard.org/experimental/api/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+    <link type="guide" xref="DocExamples.Obj" group="vfunc"/>
+    <title type="link" role="topic">vfunc</title>
+  </info>
+  <title>DocExamples.Obj.vfunc</title>
+<synopsis><code mime="text/x-python">
+@accepts(gint)
+@returns(none)
+def do_vfunc(self, first_arg):
+</code></synopsis>
+<p>This is an example of how to document a vfunc.</p>
+
+<table>
+<tr>
+<td><p>first_arg :</p></td>
+<td><p>first argument</p></td>
+</tr>
+</table>
+<p>Since 0.99</p>
+</page>
diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.method.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.method.page
new file mode 100644 (file)
index 0000000..9f7e496
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+
+<page id="DocExamples.Obj.method"
+      type="topic"
+      style="method"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:api="http://projectmallard.org/experimental/api/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+    <link type="guide" xref="DocExamples.Obj" group="method"/>
+    <api:function>
+      <api:returns>
+        <api:type>none</api:type>
+      </api:returns>
+      <api:name>doc_examples_obj_method</api:name>
+      <api:arg>
+        <api:type>DocExamplesObj *</api:type>
+        <api:name>self</api:name>
+      </api:arg>
+      <api:arg>
+        <api:type>gint</api:type>
+        <api:name>first_arg</api:name>
+      </api:arg>
+      <api:arg>
+        <api:type>gfloat</api:type>
+        <api:name>second_arg</api:name>
+      </api:arg>
+    </api:function>
+  </info>
+  <title>method</title>
+<synopsis><code mime="text/x-python">
+@accepts(gint, gfloat)
+@returns(none)
+def method(first_arg, second_arg)
+</code></synopsis>
+<p>This is an example of how to document a method.</p>
+
+<table>
+<tr>
+<td><p>first_arg :</p></td>
+<td><p>first argument</p></td>
+</tr>
+<tr>
+<td><p>second_arg :</p></td>
+<td><p>second argument</p></td>
+</tr>
+</table>
+<p>Since 0.99</p>
+</page>
diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.page
new file mode 100644 (file)
index 0000000..071abf1
--- /dev/null
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<page id="DocExamples.Obj"
+      type="guide"
+      style="class"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:api="http://projectmallard.org/experimental/api/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+    <link type="guide" xref="index" group="class"/>
+  </info>
+  <title>DocExamples.Obj</title>
+<p>This is an example of how to document a class</p><p>This class has a signal: <link xref="DocExamples.Obj-signal-example">DocExamples.Obj::signal-example</link>.</p><p>And also has a property: <link xref="DocExamples.Obj-property-example">DocExamples.Obj:property-example</link>.</p>
+
+  <synopsis><code>
+from gi.repository import DocExamples
+
+obj = DocExamples.Obj(<link xref='DocExamples.Obj-property-example'>property_example</link>=value)  </code></synopsis>
+
+<p>Since 0.99</p>
+  <synopsis>
+    <title>Hierarchy</title>
+    <tree>
+      <item>
+        <code>GObject.Object</code>
+      <item>
+        <code>DocExamples.Obj</code>
+      </item>
+      </item>
+    </tree>
+  </synopsis>
+  <links type="topic" ui:expanded="yes"
+         api:type="function" api:mime="text/x-python"
+         groups="method" style="linklist">
+    <title>Methods</title>
+  </links>
+  <links type="topic" ui:expanded="yes"
+         api:type="function" api:mime="text/x-python"
+         groups="function" style="linklist">
+    <title>Functions</title>
+  </links>
+  <links type="topic" ui:expanded="yes" groups="property" style="linklist">
+    <title>Properties</title>
+  </links>
+  <links type="topic" ui:expanded="yes" groups="signal" style="linklist">
+    <title>Signals</title>
+  </links>
+  <links type="topic" ui:expanded="yes" groups="vfunc" style="linklist">
+    <title>Virtual functions</title>
+  </links>
+  <links type="topic" ui:expanded="yes" groups="#first #default #last" style="linklist">
+    <title>Other</title>
+  </links>
+</page>
diff --git a/tests/doctool/DocExamples-1.0-Python-expected/index.page b/tests/doctool/DocExamples-1.0-Python-expected/index.page
new file mode 100644 (file)
index 0000000..fc6a9b7
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<page id="index"
+      type="guide"
+      style="namespace"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:ui="http://projectmallard.org/experimental/ui/">
+  <info>
+  </info>
+  <title>DocExamples Documentation</title>
+  <links type="topic" ui:expanded="yes" groups="class">
+    <title>Classes</title>
+  </links>
+  <links type="topic" ui:expanded="yes" groups="function">
+    <title>Functions</title>
+  </links>
+  <links type="topic" ui:expanded="yes" groups="#first #default #last">
+    <title>Other</title>
+  </links>
+</page>
diff --git a/tests/doctool/Makefile.am b/tests/doctool/Makefile.am
new file mode 100644 (file)
index 0000000..ba8b555
--- /dev/null
@@ -0,0 +1,45 @@
+include $(top_srcdir)/common.mk
+include $(top_srcdir)/Makefile.introspection
+
+INTROSPECTION_SCANNER_ARGS += --warn-all --warn-error -I.
+
+check_LTLIBRARIES = \
+       libdocexamples.la
+
+AM_CFLAGS = $(GOBJECT_CFLAGS)
+LIBS = $(GOBJECT_LIBS)
+
+libdocexamples_la_SOURCES = $(srcdir)/doc-examples-obj.c $(srcdir)/doc-examples-obj.h
+
+GIRS = 
+TYPELIBS = $(GIRS:.gir=.typelib)
+INTROSPECTION_GIRS = $(GIRS)
+CHECK_TARGETS = $(GIRS:.gir=-C.page.check) $(GIRS:.gir=-Python.page.check)
+MALLARD_DIRS = $(GIRS:.gir=-C) $(GIRS:.gir=-Python)
+EXPECTED_MALLARD_DIRS = $(MALLARD_DIRS:=-expected)
+CLEANFILES = $(TYPELIBS) $(GIRS)
+BUILT_SOURCES = $(MALLARD_DIRS)
+EXTRA_DIST = $(EXPECTED_MALLARD_DIRS)
+
+DocExamples-1.0.gir: $(top_builddir)/Gio-2.0.gir libdocexamples.la
+DocExamples_1_0_gir_LIBS = libdocexamples.la
+DocExamples_1_0_gir_INCLUDES = cairo-1.0 Gio-2.0
+DocExamples_1_0_gir_FILES = $(libdocexamples_la_SOURCES)
+#DocExamples_1_0_gir_SCANNERFLAGS = --c-include="regress.h"
+GIRS += DocExamples-1.0.gir
+
+%-C: %.gir
+       mkdir $*-C ; rm $*-C/*.page ; $(INTROSPECTION_DOCTOOL) --language C $*.gir -o $*-C/ && echo "  GEN  $*-C/index.page"
+
+%-Python: %.gir
+       mkdir $*-Python ; rm $*-Python/*.page ; $(INTROSPECTION_DOCTOOL) --language Python $*.gir -o $*-Python/ && echo "  GEN  $*-Python/index.page"
+
+%-C.page.check: %-C
+       @diff -u -U 10 $(srcdir)/$*-C-expected $*-C && echo "  TEST  $*-C" && rm -rf $*-C
+
+%-Python.page.check: %-Python
+       @diff -u -U 10 $(srcdir)/$*-Python-expected $*-Python && echo "  TEST  $*-Python" && rm -rf $*-Python
+
+check-local: $(CHECK_TARGETS) $(TYPELIBS)
+clean-local:
+       @rm -rf $(MALLARD_DIRS)
diff --git a/tests/doctool/Makefile.in b/tests/doctool/Makefile.in
new file mode 100644 (file)
index 0000000..2e92f4e
--- /dev/null
@@ -0,0 +1,798 @@
+# 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@
+
+# -*- Mode: make -*-
+# Copyright 2009-2010 Johan Dahlin
+#
+# This file defines variables that are compatible with
+# Makefile.introspection, but for use within the gobject-introspection
+# module itself.
+#
+
+# -*- Mode: make -*-
+# Copyright 2009-2010 Johan Dahlin
+#
+# This file is free software; the author(s) gives unlimited
+# permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# * Input variables:
+#
+#   INTROSPECTION_GIRS - List of GIRS that should be generated
+#   INTROSPECTION_SCANNER - Command to invoke scanner, normally set by
+#      GOBJECT_INTROSPECTION_REQUIRE/CHECK() in introspection.m4
+#   INTROSPECTION_SCANNER_ARGS - Additional args to pass in to the scanner
+#   INTROSPECTION_SCANNER_ENV - Environment variables to set before running
+#      the scanner
+#   INTROSPECTION_COMPILER - Command to invoke compiler, normally set by
+#      GOBJECT_INTROSPECTION_REQUIRE/CHECK() in introspection.m4
+#   INTROSPECTION_COMPILER_ARGS - Additional args to pass in to the compiler
+#
+# * Simple tutorial
+#
+# Add this to configure.ac:
+#   -Wno-portability to AM_INIT_AUTOMAKE
+#   GOBJECT_INTROSPECTION_CHECK([0.6.7])
+#
+# Add this to Makefile.am where your library/program is built:
+#   include $(INTROSPECTION_MAKEFILE)
+#   INTROSPECTION_GIRS = YourLib-1.0.gir
+#   YourLib_1_0_gir_NAMESPACE = YourLib
+#   YourLib_1_0_gir_VERSION = 1.0
+#   YourLib_1_0_gir_LIBS = libyourlib.la
+#   YourLib_1_0_gir_FILES = $(libyourlib_1_0_SOURCES)
+#   girdir = $(datadir)/gir-1.0
+#   dist_gir_DATA = YourLib-1.0.gir
+#   typelibdir = $(libdir)/girepository-1.0
+#   typelib_DATA = YourLib-1.0.typelib
+#   CLEANFILES = $(dist_gir_DATA) $(typelib_DATA)
+#
+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@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+       $(top_srcdir)/Makefile.introspection $(top_srcdir)/common.mk
+subdir = tests/doctool
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.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)/acinclude.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 =
+libdocexamples_la_LIBADD =
+am_libdocexamples_la_OBJECTS = doc-examples-obj.lo
+libdocexamples_la_OBJECTS = $(am_libdocexamples_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/build-aux/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 = $(libdocexamples_la_SOURCES)
+DIST_SOURCES = $(libdocexamples_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_GIR_PACKAGE = @CAIRO_GIR_PACKAGE@
+CAIRO_GOBJECT_CFLAGS = @CAIRO_GOBJECT_CFLAGS@
+CAIRO_GOBJECT_LIBS = @CAIRO_GOBJECT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CAIRO_SHARED_LIBRARY = @CAIRO_SHARED_LIBRARY@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+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@
+EXPANDED_BINDIR = @EXPANDED_BINDIR@
+EXPANDED_DATADIR = @EXPANDED_DATADIR@
+EXPANDED_LIBDIR = @EXPANDED_LIBDIR@
+EXPANDED_LIBEXECDIR = @EXPANDED_LIBEXECDIR@
+EXPANDED_LOCALSTATEDIR = @EXPANDED_LOCALSTATEDIR@
+EXPANDED_SYSCONFDIR = @EXPANDED_SYSCONFDIR@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FFI_PC_CFLAGS = @FFI_PC_CFLAGS@
+FFI_PC_LIBS = @FFI_PC_LIBS@
+FFI_PC_PACKAGES = @FFI_PC_PACKAGES@
+FGREP = @FGREP@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
+GIREPO_CFLAGS = @GIREPO_CFLAGS@
+GIREPO_LIBS = @GIREPO_LIBS@
+GIR_DIR = @GIR_DIR@
+GIR_SUFFIX = @GIR_SUFFIX@
+GLIBSRC = @GLIBSRC@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMODULE_CFLAGS = @GMODULE_CFLAGS@
+GMODULE_LIBS = @GMODULE_LIBS@
+GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
+GOBJECT_INTROSPECTION_LIBDIR = @GOBJECT_INTROSPECTION_LIBDIR@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
+GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
+GTKDOC_MKPDF = @GTKDOC_MKPDF@
+GTKDOC_REBASE = @GTKDOC_REBASE@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = $(GOBJECT_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@
+POW_LIB = @POW_LIB@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_LIB_LOC = @PYTHON_LIB_LOC@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SCANNER_CFLAGS = @SCANNER_CFLAGS@
+SCANNER_LIBS = @SCANNER_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+YACC = @YACC@
+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@
+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@
+INTROSPECTION_SCANNER = \
+    env PATH=.libs:$(PATH) \
+        LPATH=.libs \
+        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
+        UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
+        $(top_builddir)/g-ir-scanner
+
+INTROSPECTION_SCANNER_ARGS = --verbose -I$(top_srcdir) \
+       --add-include-path=$(srcdir) \
+       --add-include-path=$(top_srcdir)/gir \
+       --add-include-path=$(builddir) \
+       --add-include-path=$(top_builddir) --warn-all --warn-error -I.
+INTROSPECTION_COMPILER = \
+    env PATH=.libs:$(PATH) \
+        $(top_builddir)/g-ir-compiler$(EXEEXT)
+
+INTROSPECTION_COMPILER_ARGS = \
+    --includedir=$(srcdir) \
+    --includedir=$(top_srcdir)/gir \
+    --includedir=$(builddir) \
+    --includedir=$(top_builddir)
+
+INTROSPECTION_DOCTOOL = \
+    env PATH=.libs:$(PATH) \
+        LPATH=.libs \
+        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
+        UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
+        $(top_builddir)/g-ir-doc-tool
+
+
+# Private functions
+_gir_name = $(subst /,_,$(subst -,_,$(subst .,_,$(1))))
+
+# Namespace and Version is either fetched from the gir filename
+# or the _NAMESPACE/_VERSION variable combo
+_gir_namespace = $(or $($(_gir_name)_NAMESPACE),$(firstword $(subst -, ,$(notdir $(1)))))
+_gir_version = $(or $($(_gir_name)_VERSION),$(lastword $(subst -, ,$(1:.gir=))))
+
+# _PROGRAM is an optional variable which needs it's own --program argument
+_gir_program = $(if $($(_gir_name)_PROGRAM),--program=$($(_gir_name)_PROGRAM))
+
+# Variables which provides a list of things
+_gir_libraries = $(foreach lib,$($(_gir_name)_LIBS),--library=$(lib))
+_gir_packages = $(foreach pkg,$($(_gir_name)_PACKAGES),--pkg=$(pkg))
+_gir_includes = $(foreach include,$($(_gir_name)_INCLUDES),--include=$(include))
+_gir_export_packages = $(foreach pkg,$($(_gir_name)_EXPORT_PACKAGES),--pkg-export=$(pkg))
+
+# Reuse the LIBTOOL variable from automake if it's set, but
+# work around MSYS weirdness: When running g-ir-scanner, MSYS changes
+# a command-line argument --libtool="/bin/sh ../../libtool" into
+# --libtool=c:/opt/msys/1.0/bin/libtool. So just use sh.exe without path
+# because we already "know" where the libtool configure produced is.
+_gir_libtool = $(if $(findstring MINGW32,$(shell uname -s)),--libtool="$(top_builddir)/libtool",$(if $(LIBTOOL),--libtool="$(LIBTOOL)"))
+
+# Macros for AM_SILENT_RULES prettiness
+_gir_verbosity = $(if $(AM_DEFAULT_VERBOSITY),$(AM_DEFAULT_VERBOSITY),1)
+_gir_silent_scanner_prefix = $(_gir_silent_scanner_prefix_$(V))
+_gir_silent_scanner_prefix_ = $(_gir_silent_scanner_prefix_$(_gir_verbosity))
+_gir_silent_scanner_prefix_0 = @echo "  GISCAN $(1)";
+_gir_silent_scanner_opts = $(_gir_silent_scanner_opts_$(V))
+_gir_silent_scanner_opts_ = $(_gir_silent_scanner_opts_$(_gir_verbosity))
+_gir_silent_scanner_opts_0 = --quiet
+_gir_silent_compiler = $(_gir_silent_compiler_$(V))
+_gir_silent_compiler_ = $(_gir_silent_compiler_$(_gir_verbosity))
+_gir_silent_compiler_0 = @echo "  GICOMP $(1)";
+check_LTLIBRARIES = \
+       libdocexamples.la
+
+AM_CFLAGS = $(GOBJECT_CFLAGS)
+libdocexamples_la_SOURCES = $(srcdir)/doc-examples-obj.c $(srcdir)/doc-examples-obj.h
+#DocExamples_1_0_gir_SCANNERFLAGS = --c-include="regress.h"
+GIRS = DocExamples-1.0.gir
+TYPELIBS = $(GIRS:.gir=.typelib)
+INTROSPECTION_GIRS = $(GIRS)
+CHECK_TARGETS = $(GIRS:.gir=-C.page.check) $(GIRS:.gir=-Python.page.check)
+MALLARD_DIRS = $(GIRS:.gir=-C) $(GIRS:.gir=-Python)
+EXPECTED_MALLARD_DIRS = $(MALLARD_DIRS:=-expected)
+CLEANFILES = $(TYPELIBS) $(GIRS)
+BUILT_SOURCES = $(MALLARD_DIRS)
+EXTRA_DIST = $(EXPECTED_MALLARD_DIRS)
+DocExamples_1_0_gir_LIBS = libdocexamples.la
+DocExamples_1_0_gir_INCLUDES = cairo-1.0 Gio-2.0
+DocExamples_1_0_gir_FILES = $(libdocexamples_la_SOURCES)
+all: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/common.mk $(top_srcdir)/Makefile.introspection $(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/doctool/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign tests/doctool/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-checkLTLIBRARIES:
+       -test -z "$(check_LTLIBRARIES)" || rm -f $(check_LTLIBRARIES)
+       @list='$(check_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
+libdocexamples.la: $(libdocexamples_la_OBJECTS) $(libdocexamples_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK)  $(libdocexamples_la_OBJECTS) $(libdocexamples_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/doc-examples-obj.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 $@ $<
+
+doc-examples-obj.lo: $(srcdir)/doc-examples-obj.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) $(AM_CFLAGS) $(CFLAGS) -MT doc-examples-obj.lo -MD -MP -MF $(DEPDIR)/doc-examples-obj.Tpo -c -o doc-examples-obj.lo `test -f '$(srcdir)/doc-examples-obj.c' || echo '$(srcdir)/'`$(srcdir)/doc-examples-obj.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/doc-examples-obj.Tpo $(DEPDIR)/doc-examples-obj.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(srcdir)/doc-examples-obj.c' object='doc-examples-obj.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) $(AM_CFLAGS) $(CFLAGS) -c -o doc-examples-obj.lo `test -f '$(srcdir)/doc-examples-obj.c' || echo '$(srcdir)/'`$(srcdir)/doc-examples-obj.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_LTLIBRARIES)
+       $(MAKE) $(AM_MAKEFLAGS) check-local
+check: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile
+installdirs:
+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-checkLTLIBRARIES clean-generic clean-libtool \
+       clean-local 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: all check check-am install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am check-local clean \
+       clean-checkLTLIBRARIES clean-generic clean-libtool clean-local \
+       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
+
+
+# Make sure the required variables are set, these should under normal
+# circumstances come from introspection.m4
+$(if $(INTROSPECTION_SCANNER),,$(error Need to define INTROSPECTION_SCANNER))
+$(if $(INTROSPECTION_COMPILER),,$(error Need to define INTROSPECTION_COMPILER))
+
+#
+# Creates a GIR by scanning C headers/sources
+# $(1) - Name of the gir file (output)
+#
+# If output is Gtk-2.0.gir then you should name the variables like
+# Gtk_2_0_gir_NAMESPACE, Gtk_2_0_gir_VERSION etc.
+# Required variables:
+# FILES - C sources and headers which should be scanned
+#
+# One of these variables are required:
+# LIBS - Library where the symbol represented in the gir can be found
+# PROGRAM - Program where the symbol represented in the gir can be found
+#
+# Optional variables
+# NAMESPACE - Namespace of the gir, first letter capital,
+#   rest should be lower case, for instance: 'Gtk', 'Clutter', 'ClutterGtk'.
+#   If not present the namespace will be fetched from the gir filename,
+#   the part before the first dash. For 'Gtk-2.0', namespace will be 'Gtk'.
+# VERSION - Version of the gir, if not present, will be fetched from gir
+# filename, the part after the first dash. For 'Gtk-2.0', version will be '2.0'.
+# LIBTOOL - Command to invoke libtool, usually set by automake
+# SCANNERFLAGS - Flags to pass in to the scanner, see g-ir-scanner(1) for a list
+# CFLAGS - Flags to pass in to the parser when scanning headers
+# LDFLAGS - Linker flags used by the scanner
+# PACKAGES - list of pkg-config names which cflags are required to parse
+#   the headers of this gir
+# INCLUDES - Gir files to include without the .gir suffix, for instance
+#   GLib-2.0, Gtk-2.0. This is needed for all libraries which you depend on that
+#   provides introspection information.
+# EXPORT_PACKAGES - list of pkg-config names that are provided by this gir.
+#   By default the names in the PACKAGES variable will be used.
+#
+
+define introspection-scanner
+
+# Basic sanity check, to make sure required variables are set
+$(if $($(_gir_name)_FILES),,$(error Need to define $(_gir_name)_FILES))
+$(if $(or $(findstring --header-only,$($(_gir_name)_SCANNERFLAGS)),
+          $($(_gir_name)_LIBS),
+          $($(_gir_name)_PROGRAM)),,
+    $(error Need to define $(_gir_name)_LIBS or $(_gir_name)_PROGRAM))
+
+# Only dependencies we know are actually filenames goes into _FILES, make
+# sure these are built before running the scanner. Libraries and programs
+# needs to be added manually.
+$(1): $$($(_gir_name)_FILES)
+       @ $(MKDIR_P) $(dir $(1))
+       $(_gir_silent_scanner_prefix) $(INTROSPECTION_SCANNER_ENV) $(INTROSPECTION_SCANNER) $(_gir_silent_scanner_opts) \
+       $(INTROSPECTION_SCANNER_ARGS) \
+         --namespace=$(_gir_namespace) \
+         --nsversion=$(_gir_version) \
+         $(_gir_libtool) \
+         $(_gir_packages) \
+         $(_gir_includes) \
+         $(_gir_export_packages) \
+         $(_gir_program) \
+         $(_gir_libraries) \
+         $($(_gir_name)_SCANNERFLAGS) \
+         $($(_gir_name)_CFLAGS) \
+         $($(_gir_name)_LDFLAGS) \
+         $$^ \
+         --output $(1)
+endef
+
+$(foreach gir,$(INTROSPECTION_GIRS),$(eval $(call introspection-scanner,$(gir))))
+
+#
+# Compiles a gir into a typelib
+# $(1): gir filename (input)
+# $(2): typelib filename (output)
+#
+define introspection-compiler
+$(_gir_silent_compiler) $(INTROSPECTION_COMPILER) $(INTROSPECTION_COMPILER_ARGS) --includedir=. $(1) -o $(2)
+endef
+
+# Simple rule to compile a typelib.
+%.typelib: %.gir
+       $(call introspection-compiler,$<,$@)
+
+DocExamples-1.0.gir: $(top_builddir)/Gio-2.0.gir libdocexamples.la
+
+%-C: %.gir
+       mkdir $*-C ; rm $*-C/*.page ; $(INTROSPECTION_DOCTOOL) --language C $*.gir -o $*-C/ && echo "  GEN  $*-C/index.page"
+
+%-Python: %.gir
+       mkdir $*-Python ; rm $*-Python/*.page ; $(INTROSPECTION_DOCTOOL) --language Python $*.gir -o $*-Python/ && echo "  GEN  $*-Python/index.page"
+
+%-C.page.check: %-C
+       @diff -u -U 10 $(srcdir)/$*-C-expected $*-C && echo "  TEST  $*-C" && rm -rf $*-C
+
+%-Python.page.check: %-Python
+       @diff -u -U 10 $(srcdir)/$*-Python-expected $*-Python && echo "  TEST  $*-Python" && rm -rf $*-Python
+
+check-local: $(CHECK_TARGETS) $(TYPELIBS)
+clean-local:
+       @rm -rf $(MALLARD_DIRS)
+
+# 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/doctool/doc-examples-obj.c b/tests/doctool/doc-examples-obj.c
new file mode 100644 (file)
index 0000000..0839f1c
--- /dev/null
@@ -0,0 +1,116 @@
+/* doc-examples-obj.c */
+
+#include "doc-examples-obj.h"
+
+/**
+ * DocExamplesObj:
+ *
+ * This is an example of how to document a class
+ *
+ * This class has a signal: #DocExamplesObj::signal-example.
+ *
+ * And also has a property: #DocExamplesObj:property-example.
+ *
+ * Since: 0.99
+ */
+
+G_DEFINE_TYPE (DocExamplesObj, doc_examples_obj, G_TYPE_OBJECT)
+
+static void
+doc_examples_obj_get_property (GObject    *object,
+                               guint       property_id,
+                               GValue     *value,
+                               GParamSpec *pspec)
+{
+  switch (property_id)
+    {
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+    }
+}
+
+static void
+doc_examples_obj_set_property (GObject      *object,
+                               guint         property_id,
+                               const GValue *value,
+                               GParamSpec   *pspec)
+{
+  switch (property_id)
+    {
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+    }
+}
+
+static void
+doc_examples_obj_class_init (DocExamplesObjClass *klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+  GParamSpec *pspec;
+
+  gobject_class->get_property = doc_examples_obj_get_property;
+  gobject_class->set_property = doc_examples_obj_set_property;
+
+  /**
+   * DocExamplesObj::signal-example:
+   * @obj:
+   * @int_param: a parameter of type int
+   * @float_param: a parameter of type float
+   *
+   * This is an example of how to document a signal.
+   *
+   * Since: 0.99
+   */
+  g_signal_new ("signal-example",
+      G_TYPE_FROM_CLASS (gobject_class),
+      G_SIGNAL_RUN_LAST,
+      0, NULL, NULL,
+      NULL,
+      G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
+
+  /**
+   * DocExamplesObj:property-example:
+   *
+   * This is an example of how to document a property.
+   *
+   * Type: GLib.HashTable(utf8,gint8)
+   * Transfer: container
+   *
+   * Since: 0.99
+   */
+  pspec = g_param_spec_boxed ("property-example",
+                              "Example property",
+                              "A contained GHashTable",
+                              G_TYPE_HASH_TABLE,
+                              G_PARAM_READWRITE);
+  g_object_class_install_property (gobject_class,
+                                   1,
+                                   pspec);
+}
+
+static void
+doc_examples_obj_init (DocExamplesObj *self)
+{
+
+}
+
+DocExamplesObj *
+doc_examples_obj_new (void)
+{
+  return g_object_new (DOC_EXAMPLES_TYPE_OBJ, NULL);
+}
+
+/**
+ * doc_examples_obj_method:
+ * @first_arg: first argument
+ * @second_arg: second argument
+ *
+ * This is an example of how to document a method.
+ *
+ * Since: 0.99
+ */
+void
+doc_examples_obj_method (DocExamplesObj *self, gint first_arg, gfloat second_arg)
+{
+
+}
diff --git a/tests/doctool/doc-examples-obj.h b/tests/doctool/doc-examples-obj.h
new file mode 100644 (file)
index 0000000..7bc9e1d
--- /dev/null
@@ -0,0 +1,63 @@
+/* doc-examples-obj.h */
+
+#ifndef _DOC_EXAMPLES_OBJ_H
+#define _DOC_EXAMPLES_OBJ_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define DOC_EXAMPLES_TYPE_OBJ doc_examples_obj_get_type()
+
+#define DOC_EXAMPLES_OBJ(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
+  DOC_EXAMPLES_TYPE_OBJ, DocExamplesObj))
+
+#define DOC_EXAMPLES_OBJ_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST ((klass), \
+  DOC_EXAMPLES_TYPE_OBJ, DocExamplesObjClass))
+
+#define DOC_EXAMPLES_IS_OBJ(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
+  DOC_EXAMPLES_TYPE_OBJ))
+
+#define DOC_EXAMPLES_IS_OBJ_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE ((klass), \
+  DOC_EXAMPLES_TYPE_OBJ))
+
+#define DOC_EXAMPLES_OBJ_GET_CLASS(obj) \
+  (G_TYPE_INSTANCE_GET_CLASS ((obj), \
+  DOC_EXAMPLES_TYPE_OBJ, DocExamplesObjClass))
+
+typedef struct _DocExamplesObj DocExamplesObj;
+typedef struct _DocExamplesObjClass DocExamplesObjClass;
+
+struct _DocExamplesObj
+{
+  GObject parent;
+};
+
+struct _DocExamplesObjClass
+{
+  GObjectClass parent_class;
+
+  /**
+   * DocExamplesObjClass::vfunc:
+   * @self:
+   * @first_arg: first argument
+   *
+   * This is an example of how to document a vfunc.
+   *
+   * Since: 0.99
+   */
+  void (*vfunc) (DocExamplesObj *self, gint first_arg);
+};
+
+GType doc_examples_obj_get_type (void) G_GNUC_CONST;
+
+DocExamplesObj *doc_examples_obj_new (void);
+void doc_examples_obj_method (DocExamplesObj *self, gint first_arg, gfloat second_arg);
+
+G_END_DECLS
+
+#endif /* _DOC_EXAMPLES_OBJ_H */
diff --git a/tests/everything.c b/tests/everything.c
new file mode 100644 (file)
index 0000000..f60d963
--- /dev/null
@@ -0,0 +1,1473 @@
+/* GENERATED BY testcodegen.py; DO NOT EDIT */
+
+#include "everything.h"
+
+/**
+ * everything_nullfunc:
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_nullfunc (void)
+{
+  return;
+}
+
+/**
+ * everything_const_return_gboolean:
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gboolean
+everything_const_return_gboolean (void)
+{
+  return 0;
+}
+
+/**
+ * everything_const_return_gint8:
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gint8
+everything_const_return_gint8 (void)
+{
+  return 0;
+}
+
+/**
+ * everything_const_return_guint8:
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+guint8
+everything_const_return_guint8 (void)
+{
+  return 0;
+}
+
+/**
+ * everything_const_return_gint16:
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gint16
+everything_const_return_gint16 (void)
+{
+  return 0;
+}
+
+/**
+ * everything_const_return_guint16:
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+guint16
+everything_const_return_guint16 (void)
+{
+  return 0;
+}
+
+/**
+ * everything_const_return_gint32:
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gint32
+everything_const_return_gint32 (void)
+{
+  return 0;
+}
+
+/**
+ * everything_const_return_guint32:
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+guint32
+everything_const_return_guint32 (void)
+{
+  return 0;
+}
+
+/**
+ * everything_const_return_gint64:
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gint64
+everything_const_return_gint64 (void)
+{
+  return 0;
+}
+
+/**
+ * everything_const_return_guint64:
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+guint64
+everything_const_return_guint64 (void)
+{
+  return 0;
+}
+
+/**
+ * everything_const_return_gchar:
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gchar
+everything_const_return_gchar (void)
+{
+  return 0;
+}
+
+/**
+ * everything_const_return_gshort:
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gshort
+everything_const_return_gshort (void)
+{
+  return 0;
+}
+
+/**
+ * everything_const_return_gushort:
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gushort
+everything_const_return_gushort (void)
+{
+  return 0;
+}
+
+/**
+ * everything_const_return_gint:
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gint
+everything_const_return_gint (void)
+{
+  return 0;
+}
+
+/**
+ * everything_const_return_guint:
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+guint
+everything_const_return_guint (void)
+{
+  return 0;
+}
+
+/**
+ * everything_const_return_glong:
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+glong
+everything_const_return_glong (void)
+{
+  return 0;
+}
+
+/**
+ * everything_const_return_gulong:
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gulong
+everything_const_return_gulong (void)
+{
+  return 0;
+}
+
+/**
+ * everything_const_return_gsize:
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gsize
+everything_const_return_gsize (void)
+{
+  return 0;
+}
+
+/**
+ * everything_const_return_gssize:
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gssize
+everything_const_return_gssize (void)
+{
+  return 0;
+}
+
+/**
+ * everything_const_return_gintptr:
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gintptr
+everything_const_return_gintptr (void)
+{
+  return 0;
+}
+
+/**
+ * everything_const_return_guintptr:
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+guintptr
+everything_const_return_guintptr (void)
+{
+  return 0;
+}
+
+/**
+ * everything_const_return_gfloat:
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gfloat
+everything_const_return_gfloat (void)
+{
+  return 0;
+}
+
+/**
+ * everything_const_return_gdouble:
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gdouble
+everything_const_return_gdouble (void)
+{
+  return 0;
+}
+
+/**
+ * everything_const_return_gunichar:
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gunichar
+everything_const_return_gunichar (void)
+{
+  return 0;
+}
+
+/**
+ * everything_const_return_GType:
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+GType
+everything_const_return_GType (void)
+{
+  return g_object_get_type ();
+}
+
+/**
+ * everything_const_return_utf8:
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+const gchar*
+everything_const_return_utf8 (void)
+{
+  return "";
+}
+
+/**
+ * everything_const_return_filename:
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+const gchar*
+everything_const_return_filename (void)
+{
+  return "";
+}
+
+/**
+ * everything_oneparam_gboolean:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_oneparam_gboolean (gboolean arg0)
+{
+  return;
+}
+
+/**
+ * everything_oneparam_gint8:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_oneparam_gint8 (gint8 arg0)
+{
+  return;
+}
+
+/**
+ * everything_oneparam_guint8:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_oneparam_guint8 (guint8 arg0)
+{
+  return;
+}
+
+/**
+ * everything_oneparam_gint16:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_oneparam_gint16 (gint16 arg0)
+{
+  return;
+}
+
+/**
+ * everything_oneparam_guint16:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_oneparam_guint16 (guint16 arg0)
+{
+  return;
+}
+
+/**
+ * everything_oneparam_gint32:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_oneparam_gint32 (gint32 arg0)
+{
+  return;
+}
+
+/**
+ * everything_oneparam_guint32:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_oneparam_guint32 (guint32 arg0)
+{
+  return;
+}
+
+/**
+ * everything_oneparam_gint64:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_oneparam_gint64 (gint64 arg0)
+{
+  return;
+}
+
+/**
+ * everything_oneparam_guint64:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_oneparam_guint64 (guint64 arg0)
+{
+  return;
+}
+
+/**
+ * everything_oneparam_gchar:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_oneparam_gchar (gchar arg0)
+{
+  return;
+}
+
+/**
+ * everything_oneparam_gshort:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_oneparam_gshort (gshort arg0)
+{
+  return;
+}
+
+/**
+ * everything_oneparam_gushort:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_oneparam_gushort (gushort arg0)
+{
+  return;
+}
+
+/**
+ * everything_oneparam_gint:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_oneparam_gint (gint arg0)
+{
+  return;
+}
+
+/**
+ * everything_oneparam_guint:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_oneparam_guint (guint arg0)
+{
+  return;
+}
+
+/**
+ * everything_oneparam_glong:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_oneparam_glong (glong arg0)
+{
+  return;
+}
+
+/**
+ * everything_oneparam_gulong:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_oneparam_gulong (gulong arg0)
+{
+  return;
+}
+
+/**
+ * everything_oneparam_gsize:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_oneparam_gsize (gsize arg0)
+{
+  return;
+}
+
+/**
+ * everything_oneparam_gssize:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_oneparam_gssize (gssize arg0)
+{
+  return;
+}
+
+/**
+ * everything_oneparam_gintptr:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_oneparam_gintptr (gintptr arg0)
+{
+  return;
+}
+
+/**
+ * everything_oneparam_guintptr:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_oneparam_guintptr (guintptr arg0)
+{
+  return;
+}
+
+/**
+ * everything_oneparam_gfloat:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_oneparam_gfloat (gfloat arg0)
+{
+  return;
+}
+
+/**
+ * everything_oneparam_gdouble:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_oneparam_gdouble (gdouble arg0)
+{
+  return;
+}
+
+/**
+ * everything_oneparam_gunichar:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_oneparam_gunichar (gunichar arg0)
+{
+  return;
+}
+
+/**
+ * everything_oneparam_GType:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_oneparam_GType (GType arg0)
+{
+  return;
+}
+
+/**
+ * everything_oneparam_utf8:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_oneparam_utf8 (const gchar* arg0)
+{
+  return;
+}
+
+/**
+ * everything_oneparam_filename:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_oneparam_filename (const gchar* arg0)
+{
+  return;
+}
+
+/**
+ * everything_one_outparam_gboolean:
+ * @arg0: (out) (transfer none):
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_one_outparam_gboolean (gboolean* arg0)
+{
+  *arg0 = 0;
+  return;
+}
+
+/**
+ * everything_one_outparam_gint8:
+ * @arg0: (out) (transfer none):
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_one_outparam_gint8 (gint8* arg0)
+{
+  *arg0 = 0;
+  return;
+}
+
+/**
+ * everything_one_outparam_guint8:
+ * @arg0: (out) (transfer none):
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_one_outparam_guint8 (guint8* arg0)
+{
+  *arg0 = 0;
+  return;
+}
+
+/**
+ * everything_one_outparam_gint16:
+ * @arg0: (out) (transfer none):
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_one_outparam_gint16 (gint16* arg0)
+{
+  *arg0 = 0;
+  return;
+}
+
+/**
+ * everything_one_outparam_guint16:
+ * @arg0: (out) (transfer none):
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_one_outparam_guint16 (guint16* arg0)
+{
+  *arg0 = 0;
+  return;
+}
+
+/**
+ * everything_one_outparam_gint32:
+ * @arg0: (out) (transfer none):
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_one_outparam_gint32 (gint32* arg0)
+{
+  *arg0 = 0;
+  return;
+}
+
+/**
+ * everything_one_outparam_guint32:
+ * @arg0: (out) (transfer none):
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_one_outparam_guint32 (guint32* arg0)
+{
+  *arg0 = 0;
+  return;
+}
+
+/**
+ * everything_one_outparam_gint64:
+ * @arg0: (out) (transfer none):
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_one_outparam_gint64 (gint64* arg0)
+{
+  *arg0 = 0;
+  return;
+}
+
+/**
+ * everything_one_outparam_guint64:
+ * @arg0: (out) (transfer none):
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_one_outparam_guint64 (guint64* arg0)
+{
+  *arg0 = 0;
+  return;
+}
+
+/**
+ * everything_one_outparam_gchar:
+ * @arg0: (out) (transfer none):
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_one_outparam_gchar (gchar* arg0)
+{
+  *arg0 = 0;
+  return;
+}
+
+/**
+ * everything_one_outparam_gshort:
+ * @arg0: (out) (transfer none):
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_one_outparam_gshort (gshort* arg0)
+{
+  *arg0 = 0;
+  return;
+}
+
+/**
+ * everything_one_outparam_gushort:
+ * @arg0: (out) (transfer none):
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_one_outparam_gushort (gushort* arg0)
+{
+  *arg0 = 0;
+  return;
+}
+
+/**
+ * everything_one_outparam_gint:
+ * @arg0: (out) (transfer none):
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_one_outparam_gint (gint* arg0)
+{
+  *arg0 = 0;
+  return;
+}
+
+/**
+ * everything_one_outparam_guint:
+ * @arg0: (out) (transfer none):
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_one_outparam_guint (guint* arg0)
+{
+  *arg0 = 0;
+  return;
+}
+
+/**
+ * everything_one_outparam_glong:
+ * @arg0: (out) (transfer none):
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_one_outparam_glong (glong* arg0)
+{
+  *arg0 = 0;
+  return;
+}
+
+/**
+ * everything_one_outparam_gulong:
+ * @arg0: (out) (transfer none):
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_one_outparam_gulong (gulong* arg0)
+{
+  *arg0 = 0;
+  return;
+}
+
+/**
+ * everything_one_outparam_gsize:
+ * @arg0: (out) (transfer none):
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_one_outparam_gsize (gsize* arg0)
+{
+  *arg0 = 0;
+  return;
+}
+
+/**
+ * everything_one_outparam_gssize:
+ * @arg0: (out) (transfer none):
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_one_outparam_gssize (gssize* arg0)
+{
+  *arg0 = 0;
+  return;
+}
+
+/**
+ * everything_one_outparam_gintptr:
+ * @arg0: (out) (transfer none):
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_one_outparam_gintptr (gintptr* arg0)
+{
+  *arg0 = 0;
+  return;
+}
+
+/**
+ * everything_one_outparam_guintptr:
+ * @arg0: (out) (transfer none):
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_one_outparam_guintptr (guintptr* arg0)
+{
+  *arg0 = 0;
+  return;
+}
+
+/**
+ * everything_one_outparam_gfloat:
+ * @arg0: (out) (transfer none):
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_one_outparam_gfloat (gfloat* arg0)
+{
+  *arg0 = 0;
+  return;
+}
+
+/**
+ * everything_one_outparam_gdouble:
+ * @arg0: (out) (transfer none):
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_one_outparam_gdouble (gdouble* arg0)
+{
+  *arg0 = 0;
+  return;
+}
+
+/**
+ * everything_one_outparam_gunichar:
+ * @arg0: (out) (transfer none):
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_one_outparam_gunichar (gunichar* arg0)
+{
+  *arg0 = 0;
+  return;
+}
+
+/**
+ * everything_one_outparam_GType:
+ * @arg0: (out) (transfer none):
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_one_outparam_GType (GType* arg0)
+{
+  *arg0 = 0;
+  return;
+}
+
+/**
+ * everything_one_outparam_utf8:
+ * @arg0: (out) (transfer none):
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_one_outparam_utf8 (const gchar** arg0)
+{
+  *arg0 = 0;
+  return;
+}
+
+/**
+ * everything_one_outparam_filename:
+ * @arg0: (out) (transfer none):
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+void
+everything_one_outparam_filename (const gchar** arg0)
+{
+  *arg0 = 0;
+  return;
+}
+
+/**
+ * everything_passthrough_one_gboolean:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gboolean
+everything_passthrough_one_gboolean (gboolean arg0)
+{
+  return arg0;
+}
+
+/**
+ * everything_passthrough_one_gint8:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gint8
+everything_passthrough_one_gint8 (gint8 arg0)
+{
+  return arg0;
+}
+
+/**
+ * everything_passthrough_one_guint8:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+guint8
+everything_passthrough_one_guint8 (guint8 arg0)
+{
+  return arg0;
+}
+
+/**
+ * everything_passthrough_one_gint16:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gint16
+everything_passthrough_one_gint16 (gint16 arg0)
+{
+  return arg0;
+}
+
+/**
+ * everything_passthrough_one_guint16:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+guint16
+everything_passthrough_one_guint16 (guint16 arg0)
+{
+  return arg0;
+}
+
+/**
+ * everything_passthrough_one_gint32:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gint32
+everything_passthrough_one_gint32 (gint32 arg0)
+{
+  return arg0;
+}
+
+/**
+ * everything_passthrough_one_guint32:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+guint32
+everything_passthrough_one_guint32 (guint32 arg0)
+{
+  return arg0;
+}
+
+/**
+ * everything_passthrough_one_gint64:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gint64
+everything_passthrough_one_gint64 (gint64 arg0)
+{
+  return arg0;
+}
+
+/**
+ * everything_passthrough_one_guint64:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+guint64
+everything_passthrough_one_guint64 (guint64 arg0)
+{
+  return arg0;
+}
+
+/**
+ * everything_passthrough_one_gchar:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gchar
+everything_passthrough_one_gchar (gchar arg0)
+{
+  return arg0;
+}
+
+/**
+ * everything_passthrough_one_gshort:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gshort
+everything_passthrough_one_gshort (gshort arg0)
+{
+  return arg0;
+}
+
+/**
+ * everything_passthrough_one_gushort:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gushort
+everything_passthrough_one_gushort (gushort arg0)
+{
+  return arg0;
+}
+
+/**
+ * everything_passthrough_one_gint:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gint
+everything_passthrough_one_gint (gint arg0)
+{
+  return arg0;
+}
+
+/**
+ * everything_passthrough_one_guint:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+guint
+everything_passthrough_one_guint (guint arg0)
+{
+  return arg0;
+}
+
+/**
+ * everything_passthrough_one_glong:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+glong
+everything_passthrough_one_glong (glong arg0)
+{
+  return arg0;
+}
+
+/**
+ * everything_passthrough_one_gulong:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gulong
+everything_passthrough_one_gulong (gulong arg0)
+{
+  return arg0;
+}
+
+/**
+ * everything_passthrough_one_gsize:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gsize
+everything_passthrough_one_gsize (gsize arg0)
+{
+  return arg0;
+}
+
+/**
+ * everything_passthrough_one_gssize:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gssize
+everything_passthrough_one_gssize (gssize arg0)
+{
+  return arg0;
+}
+
+/**
+ * everything_passthrough_one_gintptr:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gintptr
+everything_passthrough_one_gintptr (gintptr arg0)
+{
+  return arg0;
+}
+
+/**
+ * everything_passthrough_one_guintptr:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+guintptr
+everything_passthrough_one_guintptr (guintptr arg0)
+{
+  return arg0;
+}
+
+/**
+ * everything_passthrough_one_gfloat:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gfloat
+everything_passthrough_one_gfloat (gfloat arg0)
+{
+  return arg0;
+}
+
+/**
+ * everything_passthrough_one_gdouble:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gdouble
+everything_passthrough_one_gdouble (gdouble arg0)
+{
+  return arg0;
+}
+
+/**
+ * everything_passthrough_one_gunichar:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+gunichar
+everything_passthrough_one_gunichar (gunichar arg0)
+{
+  return arg0;
+}
+
+/**
+ * everything_passthrough_one_GType:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+GType
+everything_passthrough_one_GType (GType arg0)
+{
+  return arg0;
+}
+
+/**
+ * everything_passthrough_one_utf8:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+const gchar*
+everything_passthrough_one_utf8 (const gchar* arg0)
+{
+  return arg0;
+}
+
+/**
+ * everything_passthrough_one_filename:
+ * @arg0: :
+ *
+ * Undocumented.
+ *
+ * Returns: (transfer none)
+ */
+const gchar*
+everything_passthrough_one_filename (const gchar* arg0)
+{
+  return arg0;
+}
+
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c
new file mode 100644 (file)
index 0000000..e42233f
--- /dev/null
@@ -0,0 +1,4533 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ */
+
+#include "gimarshallingtests.h"
+
+#include <string.h>
+
+static void gi_marshalling_tests_boxed_struct_free (GIMarshallingTestsBoxedStruct *struct_);
+
+/* Booleans */
+
+gboolean
+gi_marshalling_tests_boolean_return_true (void)
+{
+    return TRUE;
+}
+
+gboolean
+gi_marshalling_tests_boolean_return_false (void)
+{
+    return FALSE;
+}
+
+void
+gi_marshalling_tests_boolean_in_true (gboolean bool_)
+{
+    g_assert (bool_ == TRUE);
+}
+
+void
+gi_marshalling_tests_boolean_in_false (gboolean bool_)
+{
+    g_assert (bool_ == FALSE);
+}
+
+/**
+ * gi_marshalling_tests_boolean_out_true:
+ * @bool_: (out):
+ */
+void
+gi_marshalling_tests_boolean_out_true (gboolean *bool_)
+{
+    *bool_ = TRUE;
+}
+
+/**
+ * gi_marshalling_tests_boolean_out_false:
+ * @bool_: (out):
+ */
+void
+gi_marshalling_tests_boolean_out_false (gboolean *bool_)
+{
+    *bool_ = FALSE;
+}
+
+/**
+ * gi_marshalling_tests_boolean_inout_true_false:
+ * @bool_: (inout):
+ */
+void
+gi_marshalling_tests_boolean_inout_true_false (gboolean *bool_)
+{
+    g_assert (*bool_ == TRUE);
+    *bool_ = FALSE;
+}
+
+/**
+ * gi_marshalling_tests_boolean_inout_false_true:
+ * @bool_: (inout):
+ */
+void
+gi_marshalling_tests_boolean_inout_false_true (gboolean *bool_)
+{
+    g_assert (*bool_ == FALSE);
+    *bool_ = TRUE;
+}
+
+
+/* Integers */
+
+gint8
+gi_marshalling_tests_int8_return_max (void)
+{
+    return G_MAXINT8;
+}
+
+gint8
+gi_marshalling_tests_int8_return_min (void)
+{
+    return G_MININT8;
+}
+
+void
+gi_marshalling_tests_int8_in_max (gint8 int8)
+{
+    g_assert(int8 == G_MAXINT8);
+}
+
+void
+gi_marshalling_tests_int8_in_min (gint8 int8)
+{
+    g_assert(int8 == G_MININT8);
+}
+
+/**
+ * gi_marshalling_tests_int8_out_max:
+ * @int8: (out):
+ */
+void
+gi_marshalling_tests_int8_out_max (gint8 *int8)
+{
+    *int8 = G_MAXINT8;
+}
+
+/**
+ * gi_marshalling_tests_int8_out_min:
+ * @int8: (out):
+ */
+void
+gi_marshalling_tests_int8_out_min (gint8 *int8)
+{
+    *int8 = G_MININT8;
+}
+
+/**
+ * gi_marshalling_tests_int8_inout_max_min:
+ * @int8: (inout):
+ */
+void
+gi_marshalling_tests_int8_inout_max_min (gint8 *int8)
+{
+    g_assert(*int8 == G_MAXINT8);
+    *int8 = G_MININT8;
+}
+
+/**
+ * gi_marshalling_tests_int8_inout_min_max:
+ * @int8: (inout):
+ */
+void
+gi_marshalling_tests_int8_inout_min_max (gint8 *int8)
+{
+    g_assert(*int8 == G_MININT8);
+    *int8 = G_MAXINT8;
+}
+
+
+guint8
+gi_marshalling_tests_uint8_return (void)
+{
+    return G_MAXUINT8;
+}
+
+void
+gi_marshalling_tests_uint8_in (guint8 uint8)
+{
+    g_assert(uint8 == G_MAXUINT8);
+}
+
+/**
+ * gi_marshalling_tests_uint8_out:
+ * @uint8: (out):
+ */
+void
+gi_marshalling_tests_uint8_out (guint8 *uint8)
+{
+    *uint8 = G_MAXUINT8;
+}
+
+/**
+ * gi_marshalling_tests_uint8_inout:
+ * @uint8: (inout):
+ */
+void
+gi_marshalling_tests_uint8_inout (guint8 *uint8)
+{
+    g_assert(*uint8 == G_MAXUINT8);
+    *uint8 = 0;
+}
+
+
+gint16
+gi_marshalling_tests_int16_return_max (void)
+{
+    return G_MAXINT16;
+}
+
+gint16
+gi_marshalling_tests_int16_return_min (void)
+{
+    return G_MININT16;
+}
+
+void
+gi_marshalling_tests_int16_in_max (gint16 int16)
+{
+    g_assert(int16 == G_MAXINT16);
+}
+
+void
+gi_marshalling_tests_int16_in_min (gint16 int16)
+{
+    g_assert(int16 == G_MININT16);
+}
+
+/**
+ * gi_marshalling_tests_int16_out_max:
+ * @int16: (out):
+ */
+void
+gi_marshalling_tests_int16_out_max (gint16 *int16)
+{
+    *int16 = G_MAXINT16;
+}
+
+/**
+ * gi_marshalling_tests_int16_out_min:
+ * @int16: (out):
+ */
+void
+gi_marshalling_tests_int16_out_min (gint16 *int16)
+{
+    *int16 = G_MININT16;
+}
+
+/**
+ * gi_marshalling_tests_int16_inout_max_min:
+ * @int16: (inout):
+ */
+void
+gi_marshalling_tests_int16_inout_max_min (gint16 *int16)
+{
+    g_assert(*int16 == G_MAXINT16);
+    *int16 = G_MININT16;
+}
+
+/**
+ * gi_marshalling_tests_int16_inout_min_max:
+ * @int16: (inout):
+ */
+void
+gi_marshalling_tests_int16_inout_min_max (gint16 *int16)
+{
+    g_assert(*int16 == G_MININT16);
+    *int16 = G_MAXINT16;
+}
+
+
+guint16
+gi_marshalling_tests_uint16_return (void)
+{
+    return G_MAXUINT16;
+}
+
+void
+gi_marshalling_tests_uint16_in (guint16 uint16)
+{
+    g_assert(uint16 == G_MAXUINT16);
+}
+
+/**
+ * gi_marshalling_tests_uint16_out:
+ * @uint16: (out):
+ */
+void
+gi_marshalling_tests_uint16_out (guint16 *uint16)
+{
+    *uint16 = G_MAXUINT16;
+}
+
+/**
+ * gi_marshalling_tests_uint16_inout:
+ * @uint16: (inout):
+ */
+void
+gi_marshalling_tests_uint16_inout (guint16 *uint16)
+{
+    g_assert(*uint16 == G_MAXUINT16);
+    *uint16 = 0;
+}
+
+
+gint32
+gi_marshalling_tests_int32_return_max (void)
+{
+    return G_MAXINT32;
+}
+
+gint32
+gi_marshalling_tests_int32_return_min (void)
+{
+    return G_MININT32;
+}
+
+void
+gi_marshalling_tests_int32_in_max (gint32 int32)
+{
+    g_assert(int32 == G_MAXINT32);
+}
+
+void
+gi_marshalling_tests_int32_in_min (gint32 int32)
+{
+    g_assert(int32 == G_MININT32);
+}
+
+/**
+ * gi_marshalling_tests_int32_out_max:
+ * @int32: (out):
+ */
+void
+gi_marshalling_tests_int32_out_max (gint32 *int32)
+{
+    *int32 = G_MAXINT32;
+}
+
+/**
+ * gi_marshalling_tests_int32_out_min:
+ * @int32: (out):
+ */
+void
+gi_marshalling_tests_int32_out_min (gint32 *int32)
+{
+    *int32 = G_MININT32;
+}
+
+/**
+ * gi_marshalling_tests_int32_inout_max_min:
+ * @int32: (inout):
+ */
+void
+gi_marshalling_tests_int32_inout_max_min (gint32 *int32)
+{
+    g_assert(*int32 == G_MAXINT32);
+    *int32 = G_MININT32;
+}
+
+/**
+ * gi_marshalling_tests_int32_inout_min_max:
+ * @int32: (inout):
+ */
+void
+gi_marshalling_tests_int32_inout_min_max (gint32 *int32)
+{
+    g_assert(*int32 == G_MININT32);
+    *int32 = G_MAXINT32;
+}
+
+
+guint32
+gi_marshalling_tests_uint32_return (void)
+{
+    return G_MAXUINT32;
+}
+
+void
+gi_marshalling_tests_uint32_in (guint32 uint32)
+{
+    g_assert(uint32 == G_MAXUINT32);
+}
+
+/**
+ * gi_marshalling_tests_uint32_out:
+ * @uint32: (out):
+ */
+void
+gi_marshalling_tests_uint32_out (guint32 *uint32)
+{
+    *uint32 = G_MAXUINT32;
+}
+
+/**
+ * gi_marshalling_tests_uint32_inout:
+ * @uint32: (inout):
+ */
+void
+gi_marshalling_tests_uint32_inout (guint32 *uint32)
+{
+    g_assert(*uint32 == G_MAXUINT32);
+    *uint32 = 0;
+}
+
+
+gint64
+gi_marshalling_tests_int64_return_max (void)
+{
+    return G_MAXINT64;
+}
+
+gint64
+gi_marshalling_tests_int64_return_min (void)
+{
+    return G_MININT64;
+}
+
+void
+gi_marshalling_tests_int64_in_max (gint64 int64)
+{
+    g_assert(int64 == G_MAXINT64);
+}
+
+void
+gi_marshalling_tests_int64_in_min (gint64 int64)
+{
+    g_assert(int64 == G_MININT64);
+}
+
+/**
+ * gi_marshalling_tests_int64_out_max:
+ * @int64: (out):
+ */
+void
+gi_marshalling_tests_int64_out_max (gint64 *int64)
+{
+    *int64 = G_MAXINT64;
+}
+
+/**
+ * gi_marshalling_tests_int64_out_min:
+ * @int64: (out):
+ */
+void
+gi_marshalling_tests_int64_out_min (gint64 *int64)
+{
+    *int64 = G_MININT64;
+}
+
+/**
+ * gi_marshalling_tests_int64_inout_max_min:
+ * @int64: (inout):
+ */
+void
+gi_marshalling_tests_int64_inout_max_min (gint64 *int64)
+{
+    g_assert(*int64 == G_MAXINT64);
+    *int64 = G_MININT64;
+}
+
+/**
+ * gi_marshalling_tests_int64_inout_min_max:
+ * @int64: (inout):
+ */
+void
+gi_marshalling_tests_int64_inout_min_max (gint64 *int64)
+{
+    g_assert(*int64 == G_MININT64);
+    *int64 = G_MAXINT64;
+}
+
+
+guint64
+gi_marshalling_tests_uint64_return (void)
+{
+    return G_MAXUINT64;
+}
+
+void
+gi_marshalling_tests_uint64_in (guint64 uint64)
+{
+    g_assert(uint64 == G_MAXUINT64);
+}
+
+/**
+ * gi_marshalling_tests_uint64_out:
+ * @uint64: (out):
+ */
+void
+gi_marshalling_tests_uint64_out (guint64 *uint64)
+{
+    *uint64 = G_MAXUINT64;
+}
+
+/**
+ * gi_marshalling_tests_uint64_inout:
+ * @uint64: (inout):
+ */
+void
+gi_marshalling_tests_uint64_inout (guint64 *uint64)
+{
+    g_assert(*uint64 == G_MAXUINT64);
+    *uint64 = 0;
+}
+
+
+gshort
+gi_marshalling_tests_short_return_max (void)
+{
+    return G_MAXSHORT;
+}
+
+gshort
+gi_marshalling_tests_short_return_min (void)
+{
+    return G_MINSHORT;
+}
+
+void
+gi_marshalling_tests_short_in_max (gshort short_)
+{
+    g_assert(short_ == G_MAXSHORT);
+}
+
+void
+gi_marshalling_tests_short_in_min (gshort short_)
+{
+    g_assert(short_ == G_MINSHORT);
+}
+
+/**
+ * gi_marshalling_tests_short_out_max:
+ * @short_: (out):
+ */
+void
+gi_marshalling_tests_short_out_max (gshort *short_)
+{
+    *short_ = G_MAXSHORT;
+}
+
+/**
+ * gi_marshalling_tests_short_out_min:
+ * @short_: (out):
+ */
+void
+gi_marshalling_tests_short_out_min (gshort *short_)
+{
+    *short_ = G_MINSHORT;
+}
+
+/**
+ * gi_marshalling_tests_short_inout_max_min:
+ * @short_: (inout):
+ */
+void
+gi_marshalling_tests_short_inout_max_min (gshort *short_)
+{
+    g_assert(*short_ == G_MAXSHORT);
+    *short_ = G_MINSHORT;
+}
+
+/**
+ * gi_marshalling_tests_short_inout_min_max:
+ * @short_: (inout):
+ */
+void
+gi_marshalling_tests_short_inout_min_max (gshort *short_)
+{
+    g_assert(*short_ == G_MINSHORT);
+    *short_ = G_MAXSHORT;
+}
+
+
+gushort
+gi_marshalling_tests_ushort_return (void)
+{
+    return G_MAXUSHORT;
+}
+
+void
+gi_marshalling_tests_ushort_in (gushort ushort_)
+{
+    g_assert(ushort_ == G_MAXUSHORT);
+}
+
+/**
+ * gi_marshalling_tests_ushort_out:
+ * @ushort_: (out):
+ */
+void
+gi_marshalling_tests_ushort_out (gushort *ushort_)
+{
+    *ushort_ = G_MAXUSHORT;
+}
+
+/**
+ * gi_marshalling_tests_ushort_inout:
+ * @ushort_: (inout):
+ */
+void
+gi_marshalling_tests_ushort_inout (gushort *ushort_)
+{
+    g_assert(*ushort_ == G_MAXUSHORT);
+    *ushort_ = 0;
+}
+
+
+gint
+gi_marshalling_tests_int_return_max (void)
+{
+    return G_MAXINT;
+}
+
+gint
+gi_marshalling_tests_int_return_min (void)
+{
+    return G_MININT;
+}
+
+void
+gi_marshalling_tests_int_in_max (gint int_)
+{
+    g_assert(int_ == G_MAXINT);
+}
+
+void
+gi_marshalling_tests_int_in_min (gint int_)
+{
+    g_assert(int_ == G_MININT);
+}
+
+/**
+ * gi_marshalling_tests_int_out_max:
+ * @int_: (out):
+ */
+void
+gi_marshalling_tests_int_out_max (gint *int_)
+{
+    *int_ = G_MAXINT;
+}
+
+/**
+ * gi_marshalling_tests_int_out_min:
+ * @int_: (out):
+ */
+void
+gi_marshalling_tests_int_out_min (gint *int_)
+{
+    *int_ = G_MININT;
+}
+
+/**
+ * gi_marshalling_tests_int_inout_max_min:
+ * @int_: (inout):
+ */
+void
+gi_marshalling_tests_int_inout_max_min (gint *int_)
+{
+    g_assert(*int_ == G_MAXINT);
+    *int_ = G_MININT;
+}
+
+/**
+ * gi_marshalling_tests_int_inout_min_max:
+ * @int_: (inout):
+ */
+void
+gi_marshalling_tests_int_inout_min_max (gint *int_)
+{
+    g_assert(*int_ == G_MININT);
+    *int_ = G_MAXINT;
+}
+
+
+guint
+gi_marshalling_tests_uint_return (void)
+{
+    return G_MAXUINT;
+}
+
+void
+gi_marshalling_tests_uint_in (guint uint_)
+{
+    g_assert(uint_ == G_MAXUINT);
+}
+
+/**
+ * gi_marshalling_tests_uint_out:
+ * @uint_: (out):
+ */
+void
+gi_marshalling_tests_uint_out (guint *uint_)
+{
+    *uint_ = G_MAXUINT;
+}
+
+/**
+ * gi_marshalling_tests_uint_inout:
+ * @uint_: (inout):
+ */
+void
+gi_marshalling_tests_uint_inout (guint *uint_)
+{
+    g_assert(*uint_ == G_MAXUINT);
+    *uint_ = 0;
+}
+
+
+glong
+gi_marshalling_tests_long_return_max (void)
+{
+    return G_MAXLONG;
+}
+
+glong
+gi_marshalling_tests_long_return_min (void)
+{
+    return G_MINLONG;
+}
+
+void
+gi_marshalling_tests_long_in_max (glong long_)
+{
+    g_assert(long_ == G_MAXLONG);
+}
+
+void
+gi_marshalling_tests_long_in_min (glong long_)
+{
+    g_assert(long_ == G_MINLONG);
+}
+
+/**
+ * gi_marshalling_tests_long_out_max:
+ * @long_: (out):
+ */
+void
+gi_marshalling_tests_long_out_max (glong *long_)
+{
+    *long_ = G_MAXLONG;
+}
+
+/**
+ * gi_marshalling_tests_long_out_min:
+ * @long_: (out):
+ */
+void
+gi_marshalling_tests_long_out_min (glong *long_)
+{
+    *long_ = G_MINLONG;
+}
+
+/**
+ * gi_marshalling_tests_long_inout_max_min:
+ * @long_: (inout):
+ */
+void
+gi_marshalling_tests_long_inout_max_min (glong *long_)
+{
+    g_assert(*long_ == G_MAXLONG);
+    *long_ = G_MINLONG;
+}
+
+/**
+ * gi_marshalling_tests_long_inout_min_max:
+ * @long_: (inout):
+ */
+void
+gi_marshalling_tests_long_inout_min_max (glong *long_)
+{
+    g_assert(*long_ == G_MINLONG);
+    *long_ = G_MAXLONG;
+}
+
+
+gulong
+gi_marshalling_tests_ulong_return (void)
+{
+    return G_MAXULONG;
+}
+
+void
+gi_marshalling_tests_ulong_in (gulong ulong_)
+{
+    g_assert(ulong_ == G_MAXULONG);
+}
+
+/**
+ * gi_marshalling_tests_ulong_out:
+ * @ulong_: (out):
+ */
+void
+gi_marshalling_tests_ulong_out (gulong *ulong_)
+{
+    *ulong_ = G_MAXULONG;
+}
+
+/**
+ * gi_marshalling_tests_ulong_inout:
+ * @ulong_: (inout):
+ */
+void
+gi_marshalling_tests_ulong_inout (gulong *ulong_)
+{
+    g_assert(*ulong_ == G_MAXULONG);
+    *ulong_ = 0;
+}
+
+
+gssize
+gi_marshalling_tests_ssize_return_max (void)
+{
+    return G_MAXSSIZE;
+}
+
+gssize
+gi_marshalling_tests_ssize_return_min (void)
+{
+    return G_MINSSIZE;
+}
+
+void
+gi_marshalling_tests_ssize_in_max (gssize ssize)
+{
+    g_assert(ssize == G_MAXSSIZE);
+}
+
+void
+gi_marshalling_tests_ssize_in_min (gssize ssize)
+{
+    g_assert(ssize == G_MINSSIZE);
+}
+
+/**
+ * gi_marshalling_tests_ssize_out_max:
+ * @ssize: (out):
+ */
+void
+gi_marshalling_tests_ssize_out_max (gssize *ssize)
+{
+    *ssize = G_MAXSSIZE;
+}
+
+/**
+ * gi_marshalling_tests_ssize_out_min:
+ * @ssize: (out):
+ */
+void
+gi_marshalling_tests_ssize_out_min (gssize *ssize)
+{
+    *ssize = G_MINSSIZE;
+}
+
+/**
+ * gi_marshalling_tests_ssize_inout_max_min:
+ * @ssize: (inout):
+ */
+void
+gi_marshalling_tests_ssize_inout_max_min (gssize *ssize)
+{
+    g_assert(*ssize == G_MAXSSIZE);
+    *ssize = G_MINSSIZE;
+}
+
+/**
+ * gi_marshalling_tests_ssize_inout_min_max:
+ * @ssize: (inout):
+ */
+void
+gi_marshalling_tests_ssize_inout_min_max (gssize *ssize)
+{
+    g_assert(*ssize == G_MINSSIZE);
+    *ssize = G_MAXSSIZE;
+}
+
+
+gsize
+gi_marshalling_tests_size_return (void)
+{
+    return G_MAXSIZE;
+}
+
+void
+gi_marshalling_tests_size_in (gsize size)
+{
+    g_assert(size == G_MAXSIZE);
+}
+
+/**
+ * gi_marshalling_tests_size_out:
+ * @size: (out):
+ */
+void
+gi_marshalling_tests_size_out (gsize *size)
+{
+    *size = G_MAXSIZE;
+}
+
+/**
+ * gi_marshalling_tests_size_inout:
+ * @size: (inout):
+ */
+void
+gi_marshalling_tests_size_inout (gsize *size)
+{
+    g_assert(*size == G_MAXSIZE);
+    *size = 0;
+}
+
+
+gfloat
+gi_marshalling_tests_float_return (void)
+{
+    return G_MAXFLOAT;
+}
+
+void
+gi_marshalling_tests_float_in (gfloat float_)
+{
+    g_assert(float_ == G_MAXFLOAT);
+}
+
+/**
+ * gi_marshalling_tests_float_out:
+ * @float_: (out):
+ */
+void
+gi_marshalling_tests_float_out (gfloat *float_)
+{
+    *float_ = G_MAXFLOAT;
+}
+
+/**
+ * gi_marshalling_tests_float_inout:
+ * @float_: (inout):
+ */
+void
+gi_marshalling_tests_float_inout (gfloat *float_)
+{
+    g_assert(*float_ == G_MAXFLOAT);
+    *float_ = G_MINFLOAT;
+}
+
+
+gdouble
+gi_marshalling_tests_double_return (void)
+{
+    return G_MAXDOUBLE;
+}
+
+void
+gi_marshalling_tests_double_in (gdouble double_)
+{
+    g_assert(double_ == G_MAXDOUBLE);
+}
+
+/**
+ * gi_marshalling_tests_double_out:
+ * @double_: (out):
+ */
+void
+gi_marshalling_tests_double_out (gdouble *double_)
+{
+    *double_ = G_MAXDOUBLE;
+}
+
+/**
+ * gi_marshalling_tests_double_inout:
+ * @double_: (inout):
+ */
+void
+gi_marshalling_tests_double_inout (gdouble *double_)
+{
+    g_assert(*double_ == G_MAXDOUBLE);
+    *double_ = G_MINDOUBLE;
+}
+
+
+time_t
+gi_marshalling_tests_time_t_return (void)
+{
+    return 1234567890;
+}
+
+void
+gi_marshalling_tests_time_t_in (time_t time_t_)
+{
+    g_assert(time_t_ == 1234567890);
+}
+
+/**
+ * gi_marshalling_tests_time_t_out:
+ * @time_t_: (out):
+ */
+void
+gi_marshalling_tests_time_t_out (time_t *time_t_)
+{
+    *time_t_ = 1234567890;
+}
+
+/**
+ * gi_marshalling_tests_time_t_inout:
+ * @time_t_: (inout):
+ */
+void
+gi_marshalling_tests_time_t_inout (time_t *time_t_)
+{
+    g_assert(*time_t_ == 1234567890);
+    *time_t_ = 0;
+}
+
+
+GType
+gi_marshalling_tests_gtype_return (void)
+{
+    return G_TYPE_NONE;
+}
+
+GType
+gi_marshalling_tests_gtype_string_return (void)
+{
+    return G_TYPE_STRING;
+}
+
+void
+gi_marshalling_tests_gtype_in (GType gtype)
+{
+    g_assert(gtype == G_TYPE_NONE);
+}
+
+void
+gi_marshalling_tests_gtype_string_in (GType gtype)
+{
+    g_assert(gtype == G_TYPE_STRING);
+}
+
+
+/**
+ * gi_marshalling_tests_gtype_out:
+ * @gtype: (out):
+ */
+void
+gi_marshalling_tests_gtype_out (GType *gtype)
+{
+    *gtype = G_TYPE_NONE;
+}
+
+/**
+ * gi_marshalling_tests_gtype_string_out:
+ * @gtype: (out):
+ */
+void
+gi_marshalling_tests_gtype_string_out (GType *gtype)
+{
+    *gtype = G_TYPE_STRING;
+}
+
+/**
+ * gi_marshalling_tests_gtype_inout:
+ * @gtype: (inout):
+ */
+void
+gi_marshalling_tests_gtype_inout (GType *gtype)
+{
+    g_assert(*gtype == G_TYPE_NONE);
+    *gtype = G_TYPE_INT;
+}
+
+
+const gchar *
+gi_marshalling_tests_utf8_none_return (void)
+{
+    return GI_MARSHALLING_TESTS_CONSTANT_UTF8;
+}
+
+gchar *
+gi_marshalling_tests_utf8_full_return (void)
+{
+    return g_strdup(GI_MARSHALLING_TESTS_CONSTANT_UTF8);
+}
+
+void
+gi_marshalling_tests_utf8_none_in (const gchar *utf8)
+{
+    g_assert(strcmp(GI_MARSHALLING_TESTS_CONSTANT_UTF8, utf8) == 0);
+}
+
+/**
+ * gi_marshalling_tests_utf8_none_out:
+ * @utf8: (out) (transfer none):
+ */
+void
+gi_marshalling_tests_utf8_none_out (gchar **utf8)
+{
+    *utf8 = GI_MARSHALLING_TESTS_CONSTANT_UTF8;
+}
+
+/**
+ * gi_marshalling_tests_utf8_full_out:
+ * @utf8: (out) (transfer full):
+ */
+void
+gi_marshalling_tests_utf8_full_out (gchar **utf8)
+{
+    *utf8 = g_strdup(GI_MARSHALLING_TESTS_CONSTANT_UTF8);
+}
+
+/**
+ * gi_marshalling_tests_utf8_dangling_out:
+ * @utf8: (out) (transfer full):
+ */
+void
+gi_marshalling_tests_utf8_dangling_out (gchar **utf8)
+{
+    /* Intentionally don't touch the pointer to see how
+       the bindings handle this case.  Bindings should be
+       robust against broken C functions and can initialize
+       even OUT vlues to NULL.
+    */
+}
+
+/**
+ * gi_marshalling_tests_utf8_none_inout:
+ * @utf8: (inout) (transfer none):
+ */
+void
+gi_marshalling_tests_utf8_none_inout (gchar **utf8)
+{
+    g_assert(strcmp(GI_MARSHALLING_TESTS_CONSTANT_UTF8, *utf8) == 0);
+    *utf8 = "";
+}
+
+/**
+ * gi_marshalling_tests_utf8_full_inout:
+ * @utf8: (inout) (transfer full):
+ */
+void
+gi_marshalling_tests_utf8_full_inout (gchar **utf8)
+{
+    g_assert(strcmp(GI_MARSHALLING_TESTS_CONSTANT_UTF8, *utf8) == 0);
+    g_free(*utf8);
+    *utf8 = g_strdup("");
+}
+
+
+/**
+ * gi_marshalling_tests_init_function:
+ * @n_args: (inout) (allow-none): number of args
+ * @argv: (inout) (array length=n_args) (allow-none): args
+ *
+ * This is like gtk_init().
+ */
+gboolean
+gi_marshalling_tests_init_function (gint *n_args, char ***argv)
+{
+    if (n_args == NULL)
+       return TRUE;
+
+    if (*n_args == 0)
+       return TRUE;
+    (*n_args)--;
+    g_assert (argv != NULL);
+    (*argv)[*n_args] = NULL;
+    return TRUE;
+}
+
+/**
+ * gi_marshalling_tests_array_fixed_int_return:
+ * Returns: (array fixed-size=4):
+ */
+const gint *
+gi_marshalling_tests_array_fixed_int_return (void)
+{
+    static gint ints[] = {-1, 0, 1, 2};
+    return ints;
+}
+
+/**
+ * gi_marshalling_tests_array_fixed_short_return:
+ * Returns: (array fixed-size=4):
+ */
+const gshort *
+gi_marshalling_tests_array_fixed_short_return (void)
+{
+    static gshort shorts[] = {-1, 0, 1, 2};
+    return shorts;
+}
+
+/**
+ * gi_marshalling_tests_array_fixed_int_in:
+ * @ints: (array fixed-size=4):
+ */
+void
+gi_marshalling_tests_array_fixed_int_in (const gint *ints)
+{
+    g_assert(ints[0] == -1);
+    g_assert(ints[1] == 0);
+    g_assert(ints[2] == 1);
+    g_assert(ints[3] == 2);
+}
+
+/**
+ * gi_marshalling_tests_array_fixed_short_in:
+ * @shorts: (array fixed-size=4):
+ */
+void
+gi_marshalling_tests_array_fixed_short_in (const gshort *shorts)
+{
+    g_assert(shorts[0] == -1);
+    g_assert(shorts[1] == 0);
+    g_assert(shorts[2] == 1);
+    g_assert(shorts[3] == 2);
+}
+
+/**
+ * gi_marshalling_tests_array_fixed_out:
+ * @ints: (out) (array fixed-size=4) (transfer none):
+ */
+void
+gi_marshalling_tests_array_fixed_out (gint **ints)
+{
+    static gint values[] = {-1, 0, 1, 2};
+    *ints = values;
+}
+
+/**
+ * gi_marshalling_tests_array_fixed_out_struct:
+ * @structs: (out) (array fixed-size=2) (transfer none):
+ */
+void
+gi_marshalling_tests_array_fixed_out_struct (GIMarshallingTestsSimpleStruct **structs)
+{
+    static GIMarshallingTestsSimpleStruct *values;
+
+    if (values == NULL) {
+        values = g_new(GIMarshallingTestsSimpleStruct, 2);
+
+        values[0].long_ = 7;
+        values[0].int8 = 6;
+
+        values[1].long_ = 6;
+        values[1].int8 = 7;
+    }
+
+    *structs = values;
+}
+
+/**
+ * gi_marshalling_tests_array_fixed_inout:
+ * @ints: (inout) (array fixed-size=4) (transfer none):
+ */
+void
+gi_marshalling_tests_array_fixed_inout (gint **ints)
+{
+    static gint values[] = {2, 1, 0, -1};
+
+    g_assert((*ints)[0] == -1);
+    g_assert((*ints)[1] == 0);
+    g_assert((*ints)[2] == 1);
+    g_assert((*ints)[3] == 2);
+
+    *ints = values;
+}
+
+
+/**
+ * gi_marshalling_tests_array_return:
+ * Returns: (array length=length):
+ */
+const gint *
+gi_marshalling_tests_array_return (gint *length)
+{
+    static gint ints[] = {-1, 0, 1, 2};
+
+    *length = 4;
+    return ints;
+}
+
+/**
+ * gi_marshalling_tests_array_return_etc:
+ * @first:
+ * @length: (out):
+ * @last:
+ * @sum: (out):
+ * Returns: (array length=length):
+ */
+const gint *
+gi_marshalling_tests_array_return_etc (gint first, gint *length, gint last, gint *sum)
+{
+    static gint ints[] = {-1, 0, 1, 2};
+
+    ints[0] = first;
+    ints[3] = last;
+    *sum = first + last;
+    *length = 4;
+    return ints;
+}
+
+/**
+ * gi_marshalling_tests_array_in:
+ * @ints: (array length=length):
+ * @length:
+ */
+void
+gi_marshalling_tests_array_in (const gint *ints, gint length)
+{
+    g_assert(length == 4);
+    g_assert(ints[0] == -1);
+    g_assert(ints[1] == 0);
+    g_assert(ints[2] == 1);
+    g_assert(ints[3] == 2);
+}
+
+/**
+ * gi_marshalling_tests_array_in_len_before:
+ * @length:
+ * @ints: (array length=length):
+ */
+void
+gi_marshalling_tests_array_in_len_before (gint length, const gint *ints)
+{
+    gi_marshalling_tests_array_in (ints, length);
+}
+
+/**
+ * gi_marshalling_tests_array_in_len_zero_terminated:
+ * @ints: (array length=length zero-terminated=1):
+ * @length:
+ */
+void
+gi_marshalling_tests_array_in_len_zero_terminated (const gint *ints, gint length)
+{
+    g_assert (length == 4);
+
+    g_assert (ints[0] == -1);
+    g_assert (ints[1] == 0);
+    g_assert (ints[2] == 1);
+    g_assert (ints[3] == 2);
+
+    /* One past the end, null terminator */
+    g_assert (ints[4] == 0);
+}
+
+/**
+ * gi_marshalling_tests_array_string_in:
+ * @strings: (array length=length):
+ */
+void
+gi_marshalling_tests_array_string_in (const gchar **strings, gint length)
+{
+    g_assert(length == 2);
+    g_assert(g_strcmp0(strings[0], "foo") == 0);
+    g_assert(g_strcmp0(strings[1], "bar") == 0);
+}
+
+/**
+ * gi_marshalling_tests_array_uint8_in:
+ * @chars: (array length=length):
+ */
+void
+gi_marshalling_tests_array_uint8_in (const guint8 *chars, gint length)
+{
+    g_assert(length == 4);
+    g_assert(chars[0] == 'a');
+    g_assert(chars[1] == 'b');
+    g_assert(chars[2] == 'c');
+    g_assert(chars[3] == 'd');
+}
+
+/**
+ * gi_marshalling_tests_array_struct_in:
+ * @structs: (array length=length):
+ */
+void
+gi_marshalling_tests_array_struct_in (GIMarshallingTestsBoxedStruct **structs, gint length)
+{
+    g_assert(length == 3);
+    g_assert(structs[0]->long_ == 1);
+    g_assert(structs[1]->long_ == 2);
+    g_assert(structs[2]->long_ == 3);
+}
+
+/**
+ * gi_marshalling_tests_array_simple_struct_in:
+ * @structs: (array length=length):
+ */
+void
+gi_marshalling_tests_array_simple_struct_in (GIMarshallingTestsSimpleStruct *structs, gint length)
+{
+    g_assert(length == 3);
+    g_assert(structs[0].long_ == 1);
+    g_assert(structs[1].long_ == 2);
+    g_assert(structs[2].long_ == 3);
+}
+
+/**
+ * gi_marshalling_tests_multi_array_key_value_in:
+ * @keys: (array length=length):
+ * @values: (array length=length):
+ */
+void
+gi_marshalling_tests_multi_array_key_value_in (gint length, const gchar **keys, const GValue *values)
+{
+    g_assert(length == 3);
+    g_assert(g_strcmp0("one", keys[0]) == 0);
+    g_assert(g_value_get_int(&values[0]) == 1);
+    g_assert(g_strcmp0("two", keys[1]) == 0);
+    g_assert(g_value_get_int(&values[1]) == 2);
+    g_assert(g_strcmp0("three", keys[2]) == 0);
+    g_assert(g_value_get_int(&values[2]) == 3);
+
+}
+
+/**
+ * gi_marshalling_tests_array_struct_take_in:
+ * @structs: (array length=length) (transfer full):
+ */
+void
+gi_marshalling_tests_array_struct_take_in (GIMarshallingTestsBoxedStruct **structs, gint length)
+{
+    gi_marshalling_tests_array_struct_in (structs, length);
+
+    /* only really useful if run in valgrind actually */
+    gi_marshalling_tests_boxed_struct_free (structs[0]);
+    gi_marshalling_tests_boxed_struct_free (structs[1]);
+    gi_marshalling_tests_boxed_struct_free (structs[2]);
+    g_free (structs);
+}
+
+/**
+ * gi_marshalling_tests_array_enum_in:
+ * @_enum: (array length=length) (transfer none):
+ * @length:
+ */
+void
+gi_marshalling_tests_array_enum_in (GIMarshallingTestsEnum *_enum, gint length)
+{
+    g_assert (length == 3);
+    g_assert (_enum[0] == GI_MARSHALLING_TESTS_ENUM_VALUE1);
+    g_assert (_enum[1] == GI_MARSHALLING_TESTS_ENUM_VALUE2);
+    g_assert (_enum[2] == GI_MARSHALLING_TESTS_ENUM_VALUE3);
+}
+
+/**
+ * gi_marshalling_tests_array_in_guint64_len:
+ * @ints: (array length=length) (transfer none):
+ * @length:
+ */
+void
+gi_marshalling_tests_array_in_guint64_len (const gint *ints, guint64 length)
+{
+    g_assert (length == 4);
+
+    gi_marshalling_tests_array_in (ints, length);
+}
+
+/**
+ * gi_marshalling_tests_array_in_guint8_len:
+ * @ints: (array length=length) (transfer none):
+ * @length:
+ */
+void
+gi_marshalling_tests_array_in_guint8_len (const gint *ints, guint8 length)
+{
+    g_assert (length == 4);
+
+    gi_marshalling_tests_array_in (ints, length);
+}
+
+/**
+ * gi_marshalling_tests_array_out:
+ * @ints: (out) (array length=length) (transfer none):
+ */
+void
+gi_marshalling_tests_array_out (gint **ints, gint *length)
+{
+    static gint values[] = {-1, 0, 1, 2};
+
+    *length = 4;
+    *ints = values;
+}
+
+/**
+ * gi_marshalling_tests_array_out_etc:
+ * @first:
+ * @ints: (out) (array length=length) (transfer none):
+ * @length: (out):
+ * @last:
+ * @sum: (out):
+ */
+void
+gi_marshalling_tests_array_out_etc (gint first, gint **ints, gint *length, gint last, gint *sum)
+{
+    static gint values[] = {-1, 0, 1, 2};
+
+    values[0] = first;
+    values[3] = last;
+    *sum = first + last;
+    *length = 4;
+    *ints = values;
+}
+
+/**
+ * gi_marshalling_tests_array_inout:
+ * @ints: (inout) (array length=length) (transfer none):
+ * @length: (inout):
+ */
+void
+gi_marshalling_tests_array_inout (gint **ints, gint *length)
+{
+    static gint values[] = {-2, -1, 0, 1, 2};
+
+    g_assert(*length == 4);
+    g_assert((*ints)[0] == -1);
+    g_assert((*ints)[1] == 0);
+    g_assert((*ints)[2] == 1);
+    g_assert((*ints)[3] == 2);
+
+    *length = 5;
+    *ints = values;
+}
+
+/**
+ * gi_marshalling_tests_array_inout_etc:
+ * @first:
+ * @ints: (inout) (array length=length) (transfer none):
+ * @length: (inout):
+ * @last:
+ * @sum: (out):
+ */
+void
+gi_marshalling_tests_array_inout_etc (gint first, gint **ints, gint *length, gint last, gint *sum)
+{
+    static gint values[] = {-2, -1, 0, 1, 2};
+
+    g_assert(*length == 4);
+    g_assert((*ints)[0] == -1);
+    g_assert((*ints)[1] == 0);
+    g_assert((*ints)[2] == 1);
+    g_assert((*ints)[3] == 2);
+
+    values[0] = first;
+    values[4] = last;
+    *sum = first + last;
+    *length = 5;
+    *ints = values;
+}
+
+/**
+ * gi_marshalling_tests_array_zero_terminated_return:
+ * Returns: (array zero-terminated=1) (transfer none):
+ */
+gchar **
+gi_marshalling_tests_array_zero_terminated_return (void)
+{
+    static gchar *values[] = {"0", "1", "2", NULL};
+    return values;
+}
+
+/**
+ * gi_marshalling_tests_array_zero_terminated_return_null:
+ * Returns: (array zero-terminated=1) (transfer none):
+ */
+gchar **
+gi_marshalling_tests_array_zero_terminated_return_null (void)
+{
+    return NULL;
+}
+
+/**
+ * gi_marshalling_tests_array_zero_terminated_return_struct:
+ * Returns: (array zero-terminated=1) (transfer full):
+ */
+GIMarshallingTestsBoxedStruct **
+gi_marshalling_tests_array_zero_terminated_return_struct (void)
+{
+    GIMarshallingTestsBoxedStruct **ret = (GIMarshallingTestsBoxedStruct**) g_new (gpointer, 4);
+
+    ret[0] = gi_marshalling_tests_boxed_struct_new ();
+    ret[0]->long_ = 42;
+
+    ret[1] = gi_marshalling_tests_boxed_struct_new ();
+    ret[1]->long_ = 43;
+
+    ret[2] = gi_marshalling_tests_boxed_struct_new ();
+    ret[2]->long_ = 44;
+
+    ret[3] = NULL;
+
+    return ret;
+}
+
+/**
+ * gi_marshalling_tests_array_zero_terminated_in:
+ * @utf8s: (array zero-terminated=1) (transfer none):
+ */
+void
+gi_marshalling_tests_array_zero_terminated_in (gchar **utf8s)
+{
+    g_assert(g_strv_length(utf8s));
+    g_assert(strcmp(utf8s[0], "0") == 0);
+    g_assert(strcmp(utf8s[1], "1") == 0);
+    g_assert(strcmp(utf8s[2], "2") == 0);
+}
+
+/**
+ * gi_marshalling_tests_array_zero_terminated_out:
+ * @utf8s: (out) (array zero-terminated=1) (transfer none):
+ */
+void
+gi_marshalling_tests_array_zero_terminated_out (gchar ***utf8s)
+{
+    static gchar *values[] = {"0", "1", "2", NULL};
+    *utf8s = values;
+}
+
+/**
+ * gi_marshalling_tests_array_zero_terminated_inout:
+ * @utf8s: (inout) (array zero-terminated=1) (transfer none):
+ */
+void
+gi_marshalling_tests_array_zero_terminated_inout (gchar ***utf8s)
+{
+    static gchar *values[] = {"-1", "0", "1", "2", NULL};
+
+    g_assert(g_strv_length(*utf8s));
+    g_assert(strcmp((*utf8s)[0], "0") == 0);
+    g_assert(strcmp((*utf8s)[1], "1") == 0);
+    g_assert(strcmp((*utf8s)[2], "2") == 0);
+
+    *utf8s = values;
+}
+
+/**
+ * gi_marshalling_tests_array_gvariant_none_in:
+ * @variants: (array zero-terminated=1) (transfer none):
+ * Returns: (array zero-terminated=1) (transfer none):
+ */
+GVariant **
+gi_marshalling_tests_array_gvariant_none_in (GVariant **variants)
+{
+    /* Use a static container to detect if someone tries to free it */
+    static GVariant *private_container[3] = { NULL, NULL, NULL };
+    
+    if (private_container[0] == NULL) {
+      private_container[0] = g_variant_new_int32 (27);
+      private_container[1] = g_variant_new_string ("Hello");
+    }
+
+    g_assert (variants != NULL);
+    g_assert_cmpint (g_variant_get_int32 (variants[0]), ==, 27);
+    g_assert_cmpstr (g_variant_get_string (variants[1], NULL), ==, "Hello");
+    g_assert (variants[2] == NULL);
+
+    return private_container;
+}
+
+/**
+ * gi_marshalling_tests_array_gvariant_container_in:
+ * @variants: (array zero-terminated=1) (transfer container):
+ * Returns: (array zero-terminated=1) (transfer container):
+ */
+GVariant **
+gi_marshalling_tests_array_gvariant_container_in (GVariant **variants)
+{
+    GVariant **container;
+
+    g_assert (variants != NULL);
+    g_assert_cmpint (g_variant_get_int32 (variants[0]), ==, 27);
+    g_assert_cmpstr (g_variant_get_string (variants[1], NULL), ==, "Hello");
+    g_assert (variants[2] == NULL);
+    
+    container = g_new0 (GVariant*, 3);
+    container[0] = variants[0];
+    container[1] = variants[1];
+    g_free (variants);
+    
+    return container;
+}
+
+/**
+ * gi_marshalling_tests_array_gvariant_full_in:
+ * @variants: (array zero-terminated=1) (transfer full):
+ * Returns: (array zero-terminated=1) (transfer full):
+ */
+GVariant **
+gi_marshalling_tests_array_gvariant_full_in (GVariant **variants)
+{
+    GVariant **container;
+
+    g_assert (variants != NULL);
+    g_assert_cmpint (g_variant_get_int32 (variants[0]), ==, 27);
+    g_assert_cmpstr (g_variant_get_string (variants[1], NULL), ==, "Hello");
+    g_assert (variants[2] == NULL);
+    
+    /* To catch different behaviors we reconstruct one variant from scratch,
+     * while leaving the other untouched. Both approaches are legal with full
+     * transfer in and out */
+    container = g_new0 (GVariant*, 3);
+    container[0] = g_variant_new_int32 (g_variant_get_int32 (variants[0]));
+    g_variant_unref (variants[0]);
+    container[1] = variants[1];
+    g_free (variants);
+
+    return container;
+}
+
+/**
+ * gi_marshalling_tests_garray_int_none_return:
+ * Returns: (element-type gint) (transfer none):
+ */
+GArray *
+gi_marshalling_tests_garray_int_none_return (void)
+{
+    static GArray *array = NULL;
+    gint i;
+
+    if (array == NULL) {
+        array = g_array_new (TRUE, TRUE, sizeof (gint));
+        for (i = -1; i < 3; i++)
+            g_array_append_val (array, i);
+    }
+
+    return array;
+}
+
+/**
+ * gi_marshalling_tests_garray_utf8_none_return:
+ * Returns: (element-type utf8) (transfer none):
+ */
+GArray *
+gi_marshalling_tests_garray_utf8_none_return (void)
+{
+    static GArray *array = NULL;
+    static gchar *values[] = {"0", "1", "2", NULL};
+    gint i;
+
+    if (array == NULL) {
+        array = g_array_new (TRUE, TRUE, sizeof (gchar *));
+        for (i = 0; values[i]; i++)
+            g_array_append_val (array, values[i]);
+    }
+
+    return array;
+}
+
+/**
+ * gi_marshalling_tests_garray_utf8_container_return:
+ * Returns: (element-type utf8) (transfer container):
+ */
+GArray *
+gi_marshalling_tests_garray_utf8_container_return (void)
+{
+    GArray *array = NULL;
+    static gchar *values[] = {"0", "1", "2", NULL};
+    gint i;
+
+    array = g_array_new (TRUE, TRUE, sizeof (gchar *));
+    for (i = 0; values[i]; i++)
+        g_array_append_val (array, values[i]);
+
+    return array;
+}
+
+/**
+ * gi_marshalling_tests_garray_utf8_full_return:
+ * Returns: (element-type utf8) (transfer full):
+ */
+GArray *
+gi_marshalling_tests_garray_utf8_full_return (void)
+{
+    GArray *array = NULL;
+    static gchar *values[] = {"0", "1", "2", NULL};
+    gint i;
+
+    array = g_array_new (TRUE, TRUE, sizeof (gchar *));
+    for (i = 0; values[i]; i++) {
+        gchar *str = g_strdup (values[i]);
+        g_array_append_val (array, str);
+    }
+
+    return array;
+}
+
+/**
+ * gi_marshalling_tests_garray_int_none_in:
+ * @array_: (element-type gint) (transfer none):
+ */
+void
+gi_marshalling_tests_garray_int_none_in (GArray *array_)
+{
+    g_assert (array_->len == 4);
+    g_assert (g_array_index (array_, gint, 0) == -1);
+    g_assert (g_array_index (array_, gint, 1) == 0);
+    g_assert (g_array_index (array_, gint, 2) == 1);
+    g_assert (g_array_index (array_, gint, 3) == 2);
+}
+
+/**
+ * gi_marshalling_tests_garray_utf8_none_in:
+ * @array_: (element-type utf8) (transfer none):
+ */
+void
+gi_marshalling_tests_garray_utf8_none_in (GArray *array_)
+{
+    g_assert (array_->len == 3);
+    g_assert (strcmp (g_array_index (array_, gchar*, 0), "0") == 0);
+    g_assert (strcmp (g_array_index (array_, gchar*, 1), "1") == 0);
+    g_assert (strcmp (g_array_index (array_, gchar*, 2), "2") == 0);
+}
+
+/**
+ * gi_marshalling_tests_garray_utf8_none_out:
+ * @array_: (out) (element-type utf8) (transfer none):
+ */
+void
+gi_marshalling_tests_garray_utf8_none_out (GArray **array_)
+{
+    static GArray *internal = NULL;
+    static gchar *values[] = {"0", "1", "2", NULL};
+    gint i;
+
+    if (internal == NULL) {
+        internal = g_array_new (TRUE, TRUE, sizeof (gchar *));
+        for (i = 0; values[i]; i++)
+            g_array_append_val (internal, values[i]);
+    }
+
+    *array_ = internal;
+}
+
+/**
+ * gi_marshalling_tests_garray_utf8_container_out:
+ * @array_: (out) (element-type utf8) (transfer container):
+ */
+void
+gi_marshalling_tests_garray_utf8_container_out (GArray **array_)
+{
+    static gchar *values[] = {"0", "1", "2", NULL};
+    gint i;
+
+    *array_ = NULL;
+
+    *array_ = g_array_new (TRUE, TRUE, sizeof (gchar *));
+    for (i = 0; values[i]; i++)
+        g_array_append_val (*array_, values[i]);
+}
+
+/**
+ * gi_marshalling_tests_garray_utf8_full_out:
+ * @array_: (out) (element-type utf8) (transfer full):
+ */
+void
+gi_marshalling_tests_garray_utf8_full_out (GArray **array_)
+{
+    static gchar *values[] = {"0", "1", "2", NULL};
+    gint i;
+
+    *array_ = NULL;
+
+    *array_ = g_array_new (TRUE, TRUE, sizeof (gchar *));
+    for (i = 0; values[i]; i++) {
+        gchar *str = g_strdup (values[i]);
+        g_array_append_val (*array_, str);
+    }
+}
+
+/**
+ * gi_marshalling_tests_garray_utf8_none_inout:
+ * @array_: (inout) (element-type utf8) (transfer none):
+ */
+void
+gi_marshalling_tests_garray_utf8_none_inout (GArray **array_)
+{
+    static GArray *internal = NULL;
+    static gchar *values[] = {"-2", "-1", "0", "1", NULL};
+    gint i;
+
+    g_assert ((*array_)->len == 3);
+    g_assert (strcmp (g_array_index (*array_, gchar*, 0), "0") == 0);
+    g_assert (strcmp (g_array_index (*array_, gchar*, 1), "1") == 0);
+    g_assert (strcmp (g_array_index (*array_, gchar*, 2), "2") == 0);
+
+    if (internal == NULL) {
+        internal = g_array_new (TRUE, TRUE, sizeof (gchar *));
+        for (i = 0; values[i]; i++)
+            g_array_append_val (internal, values[i]);
+    }
+
+    *array_ = internal;
+}
+
+/**
+ * gi_marshalling_tests_garray_utf8_container_inout:
+ * @array_: (inout) (element-type utf8) (transfer container):
+ */
+void
+gi_marshalling_tests_garray_utf8_container_inout (GArray **array_)
+{
+    static gchar *val1 = "-2";
+    static gchar *val2 = "-1";
+    static gchar *val3 = "0";
+    static gchar *val4 = "1";
+    GArray *result;
+
+    g_assert ((*array_)->len == 3);
+    g_assert (strcmp (g_array_index (*array_, gchar*, 0), "0") == 0);
+    g_assert (strcmp (g_array_index (*array_, gchar*, 1), "1") == 0);
+    g_assert (strcmp (g_array_index (*array_, gchar*, 2), "2") == 0);
+
+    result = g_array_new (TRUE, TRUE, sizeof (gchar *));
+    g_array_append_val (result, val1);
+    g_array_append_val (result, val2);
+    g_array_append_val (result, val3);
+    g_array_append_val (result, val4);
+
+    *array_ = result;
+}
+
+/**
+ * gi_marshalling_tests_garray_utf8_full_inout:
+ * @array_: (inout) (element-type utf8) (transfer full):
+ */
+void
+gi_marshalling_tests_garray_utf8_full_inout (GArray **array_)
+{
+    static gchar *val1 = "-1";
+    static gchar *val2 = "-2";
+    gchar *val;
+    GArray *result;
+
+    g_assert ((*array_)->len == 3);
+    g_assert (strcmp (g_array_index (*array_, gchar*, 0), "0") == 0);
+    g_assert (strcmp (g_array_index (*array_, gchar*, 1), "1") == 0);
+    g_assert (strcmp (g_array_index (*array_, gchar*, 2), "2") == 0);
+
+    result = g_array_new (TRUE, TRUE, sizeof (gchar *));
+    val = g_strdup (val2);
+    g_array_append_val(result, val);
+    val = g_strdup (val1);
+    g_array_append_val(result, val);
+    val = g_strdup ("0");
+    g_array_append_val(result, val);
+    val = g_strdup ("1");
+    g_array_append_val(result, val);
+
+    *array_ = result;
+}
+
+/**
+ * gi_marshalling_tests_gptrarray_utf8_none_return:
+ * Returns: (element-type utf8) (transfer none):
+ */
+GPtrArray *
+gi_marshalling_tests_gptrarray_utf8_none_return (void)
+{
+    static GPtrArray *parray = NULL;
+    static gchar *values[] = {"0", "1", "2"};
+    gint i;
+
+    if (parray == NULL) {
+        parray = g_ptr_array_new ();
+        for (i = 0; i < 3; i++)
+            g_ptr_array_add (parray, (gpointer) values[i]);
+    }
+
+    return parray;
+}
+
+/**
+ * gi_marshalling_tests_gptrarray_utf8_container_return:
+ * Returns: (element-type utf8) (transfer container):
+ */
+GPtrArray *
+gi_marshalling_tests_gptrarray_utf8_container_return (void)
+{
+    GPtrArray *parray = NULL;
+    static gchar *values[] = {"0", "1", "2", NULL};
+    gint i;
+
+    parray = g_ptr_array_new ();
+    for (i = 0; values[i]; i++)
+        g_ptr_array_add (parray, (gpointer)values[i]);
+
+    return parray;
+}
+
+/**
+ * gi_marshalling_tests_gptrarray_utf8_full_return:
+ * Returns: (element-type utf8) (transfer full):
+ */
+GPtrArray *
+gi_marshalling_tests_gptrarray_utf8_full_return (void)
+{
+    GPtrArray *parray = NULL;
+    static gchar *values[] = {"0", "1", "2", NULL};
+    gint i;
+
+    parray = g_ptr_array_new ();
+    for (i = 0; values[i]; i++) {
+        gchar *str = g_strdup (values[i]);
+        g_ptr_array_add (parray, (gpointer)str);
+    }
+
+    return parray;
+}
+
+/**
+ * gi_marshalling_tests_gptrarray_utf8_none_in:
+ * @parray_: (element-type utf8) (transfer none):
+ */
+void
+gi_marshalling_tests_gptrarray_utf8_none_in (GPtrArray *parray_)
+{
+    g_assert (parray_->len == 3);
+    g_assert (strcmp (g_ptr_array_index (parray_, 0), "0") == 0);
+    g_assert (strcmp (g_ptr_array_index (parray_, 1), "1") == 0);
+    g_assert (strcmp (g_ptr_array_index (parray_, 2), "2") == 0);
+}
+
+/**
+ * gi_marshalling_tests_gptrarray_utf8_none_out:
+ * @parray_: (out) (element-type utf8) (transfer none):
+ */
+void
+gi_marshalling_tests_gptrarray_utf8_none_out (GPtrArray **parray_)
+{
+    static GPtrArray *internal = NULL;
+    static gchar *values[] = {"0", "1", "2", NULL};
+    gint i;
+
+    if (internal == NULL) {
+        internal = g_ptr_array_new ();
+        for (i = 0; values[i]; i++)
+            g_ptr_array_add (internal, (gpointer)values[i]);
+    }
+
+    *parray_ = internal;
+}
+
+/**
+ * gi_marshalling_tests_gptrarray_utf8_container_out:
+ * @parray_: (out) (element-type utf8) (transfer container):
+ */
+void
+gi_marshalling_tests_gptrarray_utf8_container_out (GPtrArray **parray_)
+{
+    static gchar *values[] = {"0", "1", "2", NULL};
+    gint i;
+
+    *parray_ = NULL;
+
+    *parray_ = g_ptr_array_new ();
+    for (i = 0; values[i]; i++)
+        g_ptr_array_add (*parray_, (gpointer)values[i]);
+}
+
+/**
+ * gi_marshalling_tests_gptrarray_utf8_full_out:
+ * @parray_: (out) (element-type utf8) (transfer full):
+ */
+void
+gi_marshalling_tests_gptrarray_utf8_full_out (GPtrArray **parray_)
+{
+    static gchar *values[] = {"0", "1", "2", NULL};
+    gint i;
+
+    *parray_ = NULL;
+
+    *parray_ = g_ptr_array_new ();
+    for (i = 0; values[i]; i++) {
+        gchar *str = g_strdup (values[i]);
+        g_ptr_array_add (*parray_, (gpointer)str);
+    }
+}
+
+/**
+ * gi_marshalling_tests_gptrarray_utf8_none_inout:
+ * @parray_: (inout) (element-type utf8) (transfer none):
+ */
+void
+gi_marshalling_tests_gptrarray_utf8_none_inout (GPtrArray **parray_)
+{
+    static GPtrArray *internal = NULL;
+    static gchar *values[] = {"-2", "-1", "0", "1", NULL};
+    gint i;
+
+    g_assert ((*parray_)->len == 3);
+    g_assert (strcmp (g_ptr_array_index (*parray_, 0), "0") == 0);
+    g_assert (strcmp (g_ptr_array_index (*parray_, 1), "1") == 0);
+    g_assert (strcmp (g_ptr_array_index (*parray_, 2), "2") == 0);
+
+    if (internal == NULL) {
+        internal = g_ptr_array_new ();
+        for (i = 0; values[i]; i++)
+            g_ptr_array_add (internal, (gpointer) values[i]);
+    }
+
+    *parray_ = internal;
+}
+
+/**
+ * gi_marshalling_tests_gptrarray_utf8_container_inout:
+ * @parray_: (inout) (element-type utf8) (transfer container):
+ */
+void
+gi_marshalling_tests_gptrarray_utf8_container_inout (GPtrArray **parray_)
+{
+    static gchar *val1 = "-2";
+    static gchar *val2 = "-1";
+    static gchar *val3 = "0";
+    static gchar *val4 = "1";
+    GPtrArray *result;
+
+    g_assert ((*parray_)->len == 3);
+    g_assert (strcmp (g_ptr_array_index (*parray_, 0), "0") == 0);
+    g_assert (strcmp (g_ptr_array_index (*parray_, 1), "1") == 0);
+    g_assert (strcmp (g_ptr_array_index (*parray_, 2), "2") == 0);
+
+    result = g_ptr_array_new ();
+    g_ptr_array_add (result, (gpointer) val1);
+    g_ptr_array_add (result, (gpointer) val2);
+    g_ptr_array_add (result, (gpointer) val3);
+    g_ptr_array_add (result, (gpointer) val4);
+
+    *parray_ = result;
+}
+
+/**
+ * gi_marshalling_tests_gptrarray_utf8_full_inout:
+ * @parray_: (inout) (element-type utf8) (transfer full):
+ */
+void
+gi_marshalling_tests_gptrarray_utf8_full_inout (GPtrArray **parray_)
+{
+    static gchar *val1 = "-1";
+    static gchar *val2 = "-2";
+    gchar *val;
+    GPtrArray *result;
+
+    g_assert ((*parray_)->len == 3);
+    g_assert (strcmp (g_ptr_array_index (*parray_, 0), "0") == 0);
+    g_assert (strcmp (g_ptr_array_index (*parray_, 1), "1") == 0);
+    g_assert (strcmp (g_ptr_array_index (*parray_, 2), "2") == 0);
+
+    result = g_ptr_array_new ();
+    val = g_strdup (val2);
+    g_ptr_array_add(result, (gpointer) val);
+    val = g_strdup (val1);
+    g_ptr_array_add(result, (gpointer) val);
+    val = g_strdup ("0");
+    g_ptr_array_add(result, (gpointer) val);
+    val = g_strdup ("1");
+    g_ptr_array_add(result, (gpointer) val);
+
+    *parray_ = result;
+}
+
+/**
+ * gi_marshalling_tests_bytearray_full_return:
+ * Returns: (transfer full):
+ */
+GByteArray *
+gi_marshalling_tests_bytearray_full_return (void)
+{
+    GByteArray *array = NULL;
+    guint8 data[] = {'\0', '1', '\xFF', '3'};
+
+    array = g_byte_array_new ();
+    g_byte_array_append (array, (const guint8*)data, G_N_ELEMENTS(data));
+
+    return array;
+
+}
+
+/**
+ * gi_marshalling_tests_bytearray_none_in:
+ * @array_: (element-type gint8) (transfer none):
+ */
+void
+gi_marshalling_tests_bytearray_none_in (GByteArray *array_)
+{
+    g_assert_cmpuint (array_->len, ==, 4);
+    g_assert_cmpuint (g_array_index (array_, unsigned char, 0), ==, 0);
+    g_assert_cmpuint (g_array_index (array_, unsigned char, 1), ==, 49);
+    g_assert_cmpuint (g_array_index (array_, unsigned char, 2), ==, 0xFF);
+    g_assert_cmpuint (g_array_index (array_, unsigned char, 3), ==, 51);
+}
+
+/**
+ * gi_marshalling_tests_gstrv_return:
+ *
+ * Returns: (transfer full): an array of strings
+ */
+GStrv
+gi_marshalling_tests_gstrv_return (void)
+{
+    GStrv values = g_new0 (gchar*, 4);
+    values[0] = g_strdup ("0");
+    values[1] = g_strdup ("1");
+    values[2] = g_strdup ("2");
+    values[3] = NULL;
+    return values;
+}
+
+/**
+ * gi_marshalling_tests_gstrv_in:
+ * @g_strv:
+ */
+void
+gi_marshalling_tests_gstrv_in (GStrv g_strv)
+{
+    g_assert(g_strv_length(g_strv) == 3);
+    g_assert(strcmp(g_strv[0], "0") == 0);
+    g_assert(strcmp(g_strv[1], "1") == 0);
+    g_assert(strcmp(g_strv[2], "2") == 0);
+}
+
+/**
+ * gi_marshalling_tests_gstrv_out:
+ * @g_strv: (out) (transfer none):
+ */
+void
+gi_marshalling_tests_gstrv_out (GStrv *g_strv)
+{
+    static gchar *values[] = {"0", "1", "2", NULL};
+    *g_strv = values;
+}
+
+/**
+ * gi_marshalling_tests_gstrv_inout:
+ * @g_strv: (inout) (transfer none):
+ */
+void
+gi_marshalling_tests_gstrv_inout (GStrv *g_strv)
+{
+    static gchar *values[] = {"-1", "0", "1", "2", NULL};
+
+    g_assert(g_strv_length(*g_strv) == 3);
+    g_assert(strcmp((*g_strv)[0], "0") == 0);
+    g_assert(strcmp((*g_strv)[1], "1") == 0);
+    g_assert(strcmp((*g_strv)[2], "2") == 0);
+
+    *g_strv = values;
+}
+
+/**
+ * gi_marshalling_tests_glist_int_none_return:
+ * Returns: (element-type gint) (transfer none):
+ */
+GList *
+gi_marshalling_tests_glist_int_none_return (void)
+{
+    static GList *list = NULL;
+
+    if (list == NULL) {
+        list = g_list_append(list, GINT_TO_POINTER(-1));
+        list = g_list_append(list, GINT_TO_POINTER(0));
+        list = g_list_append(list, GINT_TO_POINTER(1));
+        list = g_list_append(list, GINT_TO_POINTER(2));
+    }
+
+    return list;
+}
+
+/**
+ * gi_marshalling_tests_glist_utf8_none_return:
+ * Returns: (element-type utf8) (transfer none):
+ */
+GList *
+gi_marshalling_tests_glist_utf8_none_return (void)
+{
+    static GList *list = NULL;
+
+    if (list == NULL) {
+        list = g_list_append(list, "0");
+        list = g_list_append(list, "1");
+        list = g_list_append(list, "2");
+    }
+
+    return list;
+}
+
+/**
+ * gi_marshalling_tests_glist_utf8_container_return:
+ * Returns: (element-type utf8) (transfer container):
+ */
+GList *
+gi_marshalling_tests_glist_utf8_container_return (void)
+{
+    GList *list = NULL;
+
+    list = g_list_append(list, "0");
+    list = g_list_append(list, "1");
+    list = g_list_append(list, "2");
+
+    return list;
+}
+
+/**
+ * gi_marshalling_tests_glist_utf8_full_return:
+ * Returns: (element-type utf8) (transfer full):
+ */
+GList *
+gi_marshalling_tests_glist_utf8_full_return (void)
+{
+    GList *list = NULL;
+
+    list = g_list_append(list, g_strdup("0"));
+    list = g_list_append(list, g_strdup("1"));
+    list = g_list_append(list, g_strdup("2"));
+
+    return list;
+}
+
+/**
+ * gi_marshalling_tests_glist_int_none_in:
+ * @list: (element-type gint) (transfer none):
+ */
+void
+gi_marshalling_tests_glist_int_none_in (GList *list)
+{
+    g_assert(g_list_length(list) == 4);
+    g_assert(GPOINTER_TO_INT(g_list_nth_data(list, 0)) == -1);
+    g_assert(GPOINTER_TO_INT(g_list_nth_data(list, 1)) == 0);
+    g_assert(GPOINTER_TO_INT(g_list_nth_data(list, 2)) == 1);
+    g_assert(GPOINTER_TO_INT(g_list_nth_data(list, 3)) == 2);
+}
+
+/**
+ * gi_marshalling_tests_glist_utf8_none_in:
+ * @list: (element-type utf8) (transfer none):
+ */
+void
+gi_marshalling_tests_glist_utf8_none_in (GList *list)
+{
+    g_assert(g_list_length(list) == 3);
+    g_assert(strcmp(g_list_nth_data(list, 0), "0") == 0);
+    g_assert(strcmp(g_list_nth_data(list, 1), "1") == 0);
+    g_assert(strcmp(g_list_nth_data(list, 2), "2") == 0);
+}
+
+/**
+ * gi_marshalling_tests_glist_utf8_none_out:
+ * @list: (out) (element-type utf8) (transfer none):
+ */
+void
+gi_marshalling_tests_glist_utf8_none_out (GList **list)
+{
+    static GList *values = NULL;
+
+    if (values == NULL) {
+        values = g_list_append(values, "0");
+        values = g_list_append(values, "1");
+        values = g_list_append(values, "2");
+    }
+
+    *list = values;
+}
+
+/**
+ * gi_marshalling_tests_glist_utf8_container_out:
+ * @list: (out) (element-type utf8) (transfer container):
+ */
+void
+gi_marshalling_tests_glist_utf8_container_out (GList **list)
+{
+    *list = NULL;
+
+    *list = g_list_append(*list, "0");
+    *list = g_list_append(*list, "1");
+    *list = g_list_append(*list, "2");
+}
+
+/**
+ * gi_marshalling_tests_glist_utf8_full_out:
+ * @list: (out) (element-type utf8) (transfer full):
+ */
+void
+gi_marshalling_tests_glist_utf8_full_out (GList **list)
+{
+    *list = NULL;
+
+    *list = g_list_append(*list, g_strdup("0"));
+    *list = g_list_append(*list, g_strdup("1"));
+    *list = g_list_append(*list, g_strdup("2"));
+}
+
+/**
+ * gi_marshalling_tests_glist_utf8_none_inout:
+ * @list: (inout) (element-type utf8) (transfer none):
+ */
+void
+gi_marshalling_tests_glist_utf8_none_inout (GList **list)
+{
+    static GList *values = NULL;
+
+    g_assert(g_list_length(*list) == 3);
+    g_assert(strcmp(g_list_nth_data(*list, 0), "0") == 0);
+    g_assert(strcmp(g_list_nth_data(*list, 1), "1") == 0);
+    g_assert(strcmp(g_list_nth_data(*list, 2), "2") == 0);
+
+    if (values == NULL) {
+        values = g_list_append(values, "-2");
+        values = g_list_append(values, "-1");
+        values = g_list_append(values, "0");
+        values = g_list_append(values, "1");
+    }
+
+    *list = values;
+}
+
+/**
+ * gi_marshalling_tests_glist_utf8_container_inout:
+ * @list: (inout) (element-type utf8) (transfer container):
+ */
+void
+gi_marshalling_tests_glist_utf8_container_inout (GList **list)
+{
+    GList *result = NULL;
+
+    g_assert(g_list_length(*list) == 3);
+    g_assert(strcmp(g_list_nth_data(*list, 0), "0") == 0);
+    g_assert(strcmp(g_list_nth_data(*list, 1), "1") == 0);
+    g_assert(strcmp(g_list_nth_data(*list, 2), "2") == 0);
+
+    result = g_list_prepend(result, "1");
+    result = g_list_prepend(result, "0");
+    result = g_list_prepend(result, "-1");
+    result = g_list_prepend(result, "-2");
+
+    *list = result;
+}
+
+/**
+ * gi_marshalling_tests_glist_utf8_full_inout:
+ * @list: (inout) (element-type utf8) (transfer full):
+ */
+void
+gi_marshalling_tests_glist_utf8_full_inout (GList **list)
+{
+    GList *result = NULL;
+
+    g_assert(g_list_length(*list) == 3);
+    g_assert(strcmp(g_list_nth_data(*list, 0), "0") == 0);
+    g_assert(strcmp(g_list_nth_data(*list, 1), "1") == 0);
+    g_assert(strcmp(g_list_nth_data(*list, 2), "2") == 0);
+
+    result = g_list_prepend(result, g_strdup("1"));
+    result = g_list_prepend(result, g_strdup("0"));
+    result = g_list_prepend(result, g_strdup("-1"));
+    result = g_list_prepend(result, g_strdup("-2"));
+
+    *list = result;
+}
+
+
+/**
+ * gi_marshalling_tests_gslist_int_none_return:
+ * Returns: (element-type gint) (transfer none):
+ */
+GSList *
+gi_marshalling_tests_gslist_int_none_return (void)
+{
+    static GSList *list = NULL;
+
+    if (list == NULL) {
+        list = g_slist_prepend(list, GINT_TO_POINTER(-1));
+        list = g_slist_prepend(list, GINT_TO_POINTER(0));
+        list = g_slist_prepend(list, GINT_TO_POINTER(1));
+        list = g_slist_prepend(list, GINT_TO_POINTER(2));
+        list = g_slist_reverse(list);
+    }
+
+    return list;
+}
+
+/**
+ * gi_marshalling_tests_gslist_utf8_none_return:
+ * Returns: (element-type utf8) (transfer none):
+ */
+GSList *
+gi_marshalling_tests_gslist_utf8_none_return (void)
+{
+    static GSList *list = NULL;
+
+    if (list == NULL) {
+        list = g_slist_prepend(list, "0");
+        list = g_slist_prepend(list, "1");
+        list = g_slist_prepend(list, "2");
+        list = g_slist_reverse(list);
+    }
+
+    return list;
+}
+
+/**
+ * gi_marshalling_tests_gslist_utf8_container_return:
+ * Returns: (element-type utf8) (transfer container):
+ */
+GSList *
+gi_marshalling_tests_gslist_utf8_container_return (void)
+{
+    GSList *list = NULL;
+
+    list = g_slist_prepend(list, "0");
+    list = g_slist_prepend(list, "1");
+    list = g_slist_prepend(list, "2");
+    list = g_slist_reverse(list);
+
+    return list;
+}
+
+/**
+ * gi_marshalling_tests_gslist_utf8_full_return:
+ * Returns: (element-type utf8) (transfer full):
+ */
+GSList *
+gi_marshalling_tests_gslist_utf8_full_return (void)
+{
+    GSList *list = NULL;
+
+    list = g_slist_prepend(list, g_strdup("0"));
+    list = g_slist_prepend(list, g_strdup("1"));
+    list = g_slist_prepend(list, g_strdup("2"));
+    list = g_slist_reverse(list);
+
+    return list;
+}
+
+/**
+ * gi_marshalling_tests_gslist_int_none_in:
+ * @list: (element-type gint) (transfer none):
+ */
+void
+gi_marshalling_tests_gslist_int_none_in (GSList *list)
+{
+    g_assert(g_slist_length(list) == 4);
+    g_assert(GPOINTER_TO_INT(g_slist_nth_data(list, 0)) == -1);
+    g_assert(GPOINTER_TO_INT(g_slist_nth_data(list, 1)) == 0);
+    g_assert(GPOINTER_TO_INT(g_slist_nth_data(list, 2)) == 1);
+    g_assert(GPOINTER_TO_INT(g_slist_nth_data(list, 3)) == 2);
+}
+
+/**
+ * gi_marshalling_tests_gslist_utf8_none_in:
+ * @list: (element-type utf8) (transfer none):
+ */
+void
+gi_marshalling_tests_gslist_utf8_none_in (GSList *list)
+{
+    g_assert(g_slist_length(list) == 3);
+    g_assert(strcmp(g_slist_nth_data(list, 0), "0") == 0);
+    g_assert(strcmp(g_slist_nth_data(list, 1), "1") == 0);
+    g_assert(strcmp(g_slist_nth_data(list, 2), "2") == 0);
+}
+
+/**
+ * gi_marshalling_tests_gslist_utf8_none_out:
+ * @list: (out) (element-type utf8) (transfer none):
+ */
+void
+gi_marshalling_tests_gslist_utf8_none_out (GSList **list)
+{
+    static GSList *values = NULL;
+
+    if (values == NULL) {
+        values = g_slist_prepend(values, "0");
+        values = g_slist_prepend(values, "1");
+        values = g_slist_prepend(values, "2");
+        values = g_slist_reverse(values);
+    }
+
+    *list = values;
+}
+
+/**
+ * gi_marshalling_tests_gslist_utf8_container_out:
+ * @list: (out) (element-type utf8) (transfer container):
+ */
+void
+gi_marshalling_tests_gslist_utf8_container_out (GSList **list)
+{
+    *list = NULL;
+
+    *list = g_slist_prepend(*list, "0");
+    *list = g_slist_prepend(*list, "1");
+    *list = g_slist_prepend(*list, "2");
+    *list = g_slist_reverse(*list);
+}
+
+/**
+ * gi_marshalling_tests_gslist_utf8_full_out:
+ * @list: (out) (element-type utf8) (transfer full):
+ */
+void
+gi_marshalling_tests_gslist_utf8_full_out (GSList **list)
+{
+    *list = NULL;
+
+    *list = g_slist_prepend(*list, g_strdup("0"));
+    *list = g_slist_prepend(*list, g_strdup("1"));
+    *list = g_slist_prepend(*list, g_strdup("2"));
+    *list = g_slist_reverse(*list);
+}
+
+/**
+ * gi_marshalling_tests_gslist_utf8_none_inout:
+ * @list: (inout) (element-type utf8) (transfer none):
+ */
+void
+gi_marshalling_tests_gslist_utf8_none_inout (GSList **list)
+{
+    static GSList *values = NULL;
+
+    g_assert(g_slist_length(*list) == 3);
+    g_assert(strcmp(g_slist_nth_data(*list, 0), "0") == 0);
+    g_assert(strcmp(g_slist_nth_data(*list, 1), "1") == 0);
+    g_assert(strcmp(g_slist_nth_data(*list, 2), "2") == 0);
+
+    if (values == NULL) {
+        values = g_slist_prepend(values, "-2");
+        values = g_slist_prepend(values, "-1");
+        values = g_slist_prepend(values, "0");
+        values = g_slist_prepend(values, "1");
+        values = g_slist_reverse(values);
+    }
+
+    *list = values;
+}
+
+/**
+ * gi_marshalling_tests_gslist_utf8_container_inout:
+ * @list: (inout) (element-type utf8) (transfer container):
+ */
+void
+gi_marshalling_tests_gslist_utf8_container_inout (GSList **list)
+{
+    GSList *result = NULL;
+
+    g_assert(g_slist_length(*list) == 3);
+    g_assert(strcmp(g_slist_nth_data(*list, 0), "0") == 0);
+    g_assert(strcmp(g_slist_nth_data(*list, 1), "1") == 0);
+    g_assert(strcmp(g_slist_nth_data(*list, 2), "2") == 0);
+
+    result = g_slist_prepend(result, "1");
+    result = g_slist_prepend(result, "0");
+    result = g_slist_prepend(result, "-1");
+    result = g_slist_prepend(result, "-2");
+
+    *list = result;
+}
+
+/**
+ * gi_marshalling_tests_gslist_utf8_full_inout:
+ * @list: (inout) (element-type utf8) (transfer full):
+ */
+void
+gi_marshalling_tests_gslist_utf8_full_inout (GSList **list)
+{
+    GSList *result = NULL;
+
+    g_assert(g_slist_length(*list) == 3);
+    g_assert(strcmp(g_slist_nth_data(*list, 0), "0") == 0);
+    g_assert(strcmp(g_slist_nth_data(*list, 1), "1") == 0);
+    g_assert(strcmp(g_slist_nth_data(*list, 2), "2") == 0);
+
+    result = g_slist_prepend(result, g_strdup("1"));
+    result = g_slist_prepend(result, g_strdup("0"));
+    result = g_slist_prepend(result, g_strdup("-1"));
+    result = g_slist_prepend(result, g_strdup("-2"));
+
+    *list = result;
+}
+
+
+/**
+ * gi_marshalling_tests_ghashtable_int_none_return:
+ * Returns: (element-type gint gint) (transfer none):
+ */
+GHashTable *
+gi_marshalling_tests_ghashtable_int_none_return (void)
+{
+    static GHashTable *hash_table = NULL;
+
+    if (hash_table == NULL) {
+        hash_table = g_hash_table_new(NULL, NULL);
+        g_hash_table_insert(hash_table, GINT_TO_POINTER(-1), GINT_TO_POINTER(1));
+        g_hash_table_insert(hash_table, GINT_TO_POINTER(0), GINT_TO_POINTER(0));
+        g_hash_table_insert(hash_table, GINT_TO_POINTER(1), GINT_TO_POINTER(-1));
+        g_hash_table_insert(hash_table, GINT_TO_POINTER(2), GINT_TO_POINTER(-2));
+    }
+
+    return hash_table;
+}
+
+/**
+ * gi_marshalling_tests_ghashtable_utf8_none_return:
+ * Returns: (element-type utf8 utf8) (transfer none):
+ */
+GHashTable *
+gi_marshalling_tests_ghashtable_utf8_none_return (void)
+{
+    static GHashTable *hash_table = NULL;
+
+    if (hash_table == NULL) {
+        hash_table = g_hash_table_new(g_str_hash, g_str_equal);
+        g_hash_table_insert(hash_table, "-1", "1");
+        g_hash_table_insert(hash_table, "0", "0");
+        g_hash_table_insert(hash_table, "1", "-1");
+        g_hash_table_insert(hash_table, "2", "-2");
+    }
+
+    return hash_table;
+}
+
+/**
+ * gi_marshalling_tests_ghashtable_utf8_container_return:
+ * Returns: (element-type utf8 utf8) (transfer container):
+ */
+GHashTable *
+gi_marshalling_tests_ghashtable_utf8_container_return (void)
+{
+    GHashTable *hash_table = NULL;
+
+    hash_table = g_hash_table_new(g_str_hash, g_str_equal);
+    g_hash_table_insert(hash_table, "-1", "1");
+    g_hash_table_insert(hash_table, "0", "0");
+    g_hash_table_insert(hash_table, "1", "-1");
+    g_hash_table_insert(hash_table, "2", "-2");
+
+    return hash_table;
+}
+
+/**
+ * gi_marshalling_tests_ghashtable_utf8_full_return:
+ * Returns: (element-type utf8 utf8) (transfer full):
+ */
+GHashTable *
+gi_marshalling_tests_ghashtable_utf8_full_return (void)
+{
+    GHashTable *hash_table = NULL;
+
+    hash_table = g_hash_table_new(g_str_hash, g_str_equal);
+    g_hash_table_insert(hash_table, g_strdup("-1"), g_strdup("1"));
+    g_hash_table_insert(hash_table, g_strdup("0"), g_strdup("0"));
+    g_hash_table_insert(hash_table, g_strdup("1"), g_strdup("-1"));
+    g_hash_table_insert(hash_table, g_strdup("2"), g_strdup("-2"));
+
+    return hash_table;
+}
+
+/**
+ * gi_marshalling_tests_ghashtable_int_none_in:
+ * @hash_table: (element-type gint gint) (transfer none):
+ */
+void
+gi_marshalling_tests_ghashtable_int_none_in (GHashTable *hash_table)
+{
+    g_assert(GPOINTER_TO_INT(g_hash_table_lookup(hash_table, GINT_TO_POINTER(-1))) == 1);
+    g_assert(GPOINTER_TO_INT(g_hash_table_lookup(hash_table, GINT_TO_POINTER(0))) == 0);
+    g_assert(GPOINTER_TO_INT(g_hash_table_lookup(hash_table, GINT_TO_POINTER(1))) == -1);
+    g_assert(GPOINTER_TO_INT(g_hash_table_lookup(hash_table, GINT_TO_POINTER(2))) == -2);
+}
+
+/**
+ * gi_marshalling_tests_ghashtable_utf8_none_in:
+ * @hash_table: (element-type utf8 utf8) (transfer none):
+ */
+void
+gi_marshalling_tests_ghashtable_utf8_none_in (GHashTable *hash_table)
+{
+    g_assert(strcmp(g_hash_table_lookup(hash_table, "-1"), "1") == 0);
+    g_assert(strcmp(g_hash_table_lookup(hash_table, "0"), "0") == 0);
+    g_assert(strcmp(g_hash_table_lookup(hash_table, "1"), "-1") == 0);
+    g_assert(strcmp(g_hash_table_lookup(hash_table, "2"), "-2") == 0);
+}
+
+/**
+ * gi_marshalling_tests_ghashtable_utf8_none_out:
+ * @hash_table: (out) (element-type utf8 utf8) (transfer none):
+ */
+void
+gi_marshalling_tests_ghashtable_utf8_none_out (GHashTable **hash_table)
+{
+    static GHashTable *new_hash_table = NULL;
+
+    if (new_hash_table == NULL) {
+        new_hash_table = g_hash_table_new(g_str_hash, g_str_equal);
+        g_hash_table_insert(new_hash_table, "-1", "1");
+        g_hash_table_insert(new_hash_table, "0", "0");
+        g_hash_table_insert(new_hash_table, "1", "-1");
+        g_hash_table_insert(new_hash_table, "2", "-2");
+    }
+
+    *hash_table = new_hash_table;
+}
+
+/**
+ * gi_marshalling_tests_ghashtable_utf8_container_out:
+ * @hash_table: (out) (element-type utf8 utf8) (transfer container):
+ */
+void
+gi_marshalling_tests_ghashtable_utf8_container_out (GHashTable **hash_table)
+{
+    *hash_table = g_hash_table_new(g_str_hash, g_str_equal);
+    g_hash_table_insert(*hash_table, "-1", "1");
+    g_hash_table_insert(*hash_table, "0", "0");
+    g_hash_table_insert(*hash_table, "1", "-1");
+    g_hash_table_insert(*hash_table, "2", "-2");
+}
+
+/**
+ * gi_marshalling_tests_ghashtable_utf8_full_out:
+ * @hash_table: (out) (element-type utf8 utf8) (transfer full):
+ */
+void
+gi_marshalling_tests_ghashtable_utf8_full_out (GHashTable **hash_table)
+{
+    *hash_table = g_hash_table_new(g_str_hash, g_str_equal);
+    g_hash_table_insert(*hash_table, g_strdup("-1"), g_strdup("1"));
+    g_hash_table_insert(*hash_table, g_strdup("0"), g_strdup("0"));
+    g_hash_table_insert(*hash_table, g_strdup("1"), g_strdup("-1"));
+    g_hash_table_insert(*hash_table, g_strdup("2"), g_strdup("-2"));
+}
+
+/**
+ * gi_marshalling_tests_ghashtable_utf8_none_inout:
+ * @hash_table: (inout) (element-type utf8 utf8) (transfer none):
+ */
+void
+gi_marshalling_tests_ghashtable_utf8_none_inout (GHashTable **hash_table)
+{
+    static GHashTable *new_hash_table = NULL;
+
+    g_assert(strcmp(g_hash_table_lookup(*hash_table, "-1"), "1") == 0);
+    g_assert(strcmp(g_hash_table_lookup(*hash_table, "0"), "0") == 0);
+    g_assert(strcmp(g_hash_table_lookup(*hash_table, "1"), "-1") == 0);
+    g_assert(strcmp(g_hash_table_lookup(*hash_table, "2"), "-2") == 0);
+
+    if (new_hash_table == NULL) {
+        new_hash_table = g_hash_table_new(g_str_hash, g_str_equal);
+        g_hash_table_insert(new_hash_table, "-1", "1");
+        g_hash_table_insert(new_hash_table, "0", "0");
+        g_hash_table_insert(new_hash_table, "1", "1");
+    }
+
+    *hash_table = new_hash_table;
+}
+
+/**
+ * gi_marshalling_tests_ghashtable_utf8_container_inout:
+ * @hash_table: (inout) (element-type utf8 utf8) (transfer container):
+ */
+void
+gi_marshalling_tests_ghashtable_utf8_container_inout (GHashTable **hash_table)
+{
+    GHashTable *result = g_hash_table_new(g_str_hash, g_str_equal);
+
+    g_assert(strcmp(g_hash_table_lookup(*hash_table, "-1"), "1") == 0);
+    g_assert(strcmp(g_hash_table_lookup(*hash_table, "0"), "0") == 0);
+    g_assert(strcmp(g_hash_table_lookup(*hash_table, "1"), "-1") == 0);
+    g_assert(strcmp(g_hash_table_lookup(*hash_table, "2"), "-2") == 0);
+
+    g_hash_table_insert(result, "-1", "1");
+    g_hash_table_insert(result, "0", "0");
+    g_hash_table_insert(result, "1", "1");
+
+    *hash_table = result;
+}
+
+/**
+ * gi_marshalling_tests_ghashtable_utf8_full_inout:
+ * @hash_table: (inout) (element-type utf8 utf8) (transfer full):
+ */
+void
+gi_marshalling_tests_ghashtable_utf8_full_inout (GHashTable **hash_table)
+{
+    GHashTable *result = g_hash_table_new_full(g_str_hash, g_str_equal,
+                                              g_free, g_free);
+
+    g_assert(strcmp(g_hash_table_lookup(*hash_table, "-1"), "1") == 0);
+    g_assert(strcmp(g_hash_table_lookup(*hash_table, "0"), "0") == 0);
+    g_assert(strcmp(g_hash_table_lookup(*hash_table, "1"), "-1") == 0);
+    g_assert(strcmp(g_hash_table_lookup(*hash_table, "2"), "-2") == 0);
+
+    g_hash_table_insert(result, g_strdup("-1"), g_strdup("1"));
+    g_hash_table_insert(result, g_strdup("0"), g_strdup("0"));
+    g_hash_table_insert(result, g_strdup("1"), g_strdup("1"));
+
+    *hash_table = result;
+}
+
+
+/**
+ * gi_marshalling_tests_gvalue_return:
+ * Returns: (transfer none):
+ */
+GValue *
+gi_marshalling_tests_gvalue_return (void)
+{
+    static GValue *value = NULL;
+
+    if (value == NULL) {
+        value = g_new0(GValue, 1);
+        g_value_init(value, G_TYPE_INT);
+        g_value_set_int(value, 42);
+    }
+
+    return value;
+}
+
+/**
+ * gi_marshalling_tests_gvalue_in:
+ * @value: (transfer none):
+ */
+void
+gi_marshalling_tests_gvalue_in (GValue *value)
+{
+    g_assert(g_value_get_int(value) == 42);
+}
+
+/**
+ * gi_marshalling_tests_gvalue_in_with_type:
+ * @value: (transfer none):
+ * @type:
+ */
+void
+gi_marshalling_tests_gvalue_in_with_type (GValue *value, GType type)
+{
+  g_assert(g_type_is_a(G_VALUE_TYPE(value), type));
+}
+
+/**
+ * gi_marshalling_tests_gvalue_in_enum:
+ * @value: (transfer none):
+ */
+void
+gi_marshalling_tests_gvalue_in_enum (GValue *value)
+{
+    g_assert(g_value_get_enum(value) == GI_MARSHALLING_TESTS_ENUM_VALUE3);
+}
+
+/**
+ * gi_marshalling_tests_gvalue_out:
+ * @value: (out) (transfer none):
+ */
+void
+gi_marshalling_tests_gvalue_out (GValue **value)
+{
+    static GValue *new_value = NULL;
+
+    if (new_value == NULL) {
+        new_value = g_new0(GValue, 1);
+        g_value_init(new_value, G_TYPE_INT);
+        g_value_set_int(new_value, 42);
+    }
+
+    *value = new_value;
+}
+
+/**
+ * gi_marshalling_tests_gvalue_inout:
+ * @value: (inout) (transfer none):
+ */
+void
+gi_marshalling_tests_gvalue_inout (GValue **value)
+{
+    g_assert(g_value_get_int(*value) == 42);
+    g_value_unset(*value);
+    g_value_init(*value, G_TYPE_STRING);
+    g_value_set_string(*value, "42");
+}
+
+/**
+ * gi_marshalling_tests_gvalue_flat_array:
+ * @n_values: number of values
+ * @values: (array length=n_values): an array containing values
+ */
+void
+gi_marshalling_tests_gvalue_flat_array (guint         n_values,
+                                        const GValue *values)
+{
+    g_assert (n_values == 3);
+
+    g_assert_cmpint (g_value_get_int (&values[0]), ==, 42);
+    g_assert_cmpstr (g_value_get_string (&values[1]), ==, "42");
+    g_assert_cmpint (g_value_get_boolean (&values[2]), ==, TRUE);
+}
+
+/**
+ * gi_marshalling_tests_return_gvalue_flat_array:
+ *
+ * Returns: (array fixed-size=3) (transfer full): a flat GValue array
+ */
+GValue *
+gi_marshalling_tests_return_gvalue_flat_array (void)
+{
+    GValue *array = g_new0 (GValue, 3);
+
+    g_value_init (&array[0], G_TYPE_INT);
+    g_value_set_int (&array[0], 42);
+
+    g_value_init (&array[1], G_TYPE_STRING);
+    g_value_set_static_string (&array[1], "42");
+
+    g_value_init (&array[2], G_TYPE_BOOLEAN);
+    g_value_set_boolean (&array[2], TRUE);
+
+    return array;
+}
+
+/**
+ * gi_marshalling_tests_gvalue_flat_array_round_trip:
+ * @one: The first GValue
+ * @two: The second GValue
+ * @three: The third GValue
+ *
+ * Returns: (array fixed-size=3) (transfer full): a flat array of [@one, @two, @three]
+ */
+GValue *
+gi_marshalling_tests_gvalue_flat_array_round_trip (const GValue one,
+                                                   const GValue two,
+                                                   const GValue three)
+{
+    GValue *array = g_new (GValue, 3);
+    array[0] = one;
+    array[1] = two;
+    array[2] = three;
+
+    return array;
+}
+
+/**
+ * gi_marshalling_tests_gclosure_in:
+ * @closure: (transfer none):
+ */
+void
+gi_marshalling_tests_gclosure_in (GClosure *closure)
+{
+    GValue return_value = {0, };
+
+    g_value_init (&return_value, G_TYPE_INT);
+
+    g_closure_invoke (closure,
+            &return_value,
+            0, NULL,
+            NULL);
+
+    g_assert(g_value_get_int (&return_value) == 42);
+
+    g_value_unset(&return_value);
+}
+
+static gint
+_closure_return_42 (void)
+{
+  return 42;
+}
+
+static void
+_marshal_INT__VOID (GClosure *closure,
+                    GValue *return_value,
+                    guint n_param_values,
+                    const GValue *param_values,
+                    gpointer invocation_hint,
+                    gpointer marshal_data)
+{
+  typedef gint (*GMarshalFunc_INT__VOID) (void);
+  register GMarshalFunc_INT__VOID callback;
+  register GCClosure *cc = (GCClosure*) closure;
+
+  callback = (GMarshalFunc_INT__VOID) cc->callback;
+  g_value_set_int(return_value, callback());
+}
+
+/**
+ * gi_marshalling_tests_gclosure_return:
+ * 
+ * Return: a #GClosure
+ */
+GClosure *
+gi_marshalling_tests_gclosure_return (void)
+{
+    GClosure *closure = g_cclosure_new ((GCallback)_closure_return_42,
+                                        NULL, NULL);
+    g_closure_set_marshal (closure, _marshal_INT__VOID);
+
+    return closure;
+}
+
+
+/**
+ * gi_marshalling_tests_callback_return_value_only:
+ * @callback: (scope call):
+ */
+glong
+gi_marshalling_tests_callback_return_value_only (GIMarshallingTestsCallbackReturnValueOnly callback)
+{
+    return callback ();
+}
+
+/**
+ * gi_marshalling_tests_callback_one_out_parameter:
+ * @callback: (scope call):
+ * @a: (out):
+ */
+void
+gi_marshalling_tests_callback_one_out_parameter (GIMarshallingTestsCallbackOneOutParameter  callback,
+                                                 gfloat                                    *a)
+{
+    callback (a);
+}
+
+/**
+ * gi_marshalling_tests_callback_multiple_out_parameters:
+ * @callback: (scope call):
+ * @a: (out):
+ * @b: (out):
+ */
+void
+gi_marshalling_tests_callback_multiple_out_parameters (GIMarshallingTestsCallbackMultipleOutParameters  callback,
+                                                       gfloat                                          *a,
+                                                       gfloat                                          *b)
+{
+    callback (a, b);
+}
+
+/**
+ * gi_marshalling_tests_callback_return_value_and_one_out_parameter:
+ * @callback: (scope call):
+ * @a: (out):
+ */
+glong
+gi_marshalling_tests_callback_return_value_and_one_out_parameter (GIMarshallingTestsCallbackReturnValueAndOneOutParameter  callback,
+                                                                  glong                                                   *a)
+{
+    return callback (a);
+}
+
+/**
+ * gi_marshalling_tests_callback_return_value_and_multiple_out_parameters:
+ * @callback: (scope call):
+ * @a: (out):
+ * @b: (out):
+ */
+glong
+gi_marshalling_tests_callback_return_value_and_multiple_out_parameters (GIMarshallingTestsCallbackReturnValueAndMultipleOutParameters  callback,
+                                                                        glong                                                         *a,
+                                                                        glong                                                         *b)
+{
+    return callback (a, b);
+}
+
+
+
+/**
+ * gi_marshalling_tests_pointer_in_return:
+ *
+ * Returns: (transfer none): The same pointer
+ */
+gpointer
+gi_marshalling_tests_pointer_in_return (gpointer pointer)
+{
+    return pointer;
+}
+
+GType
+gi_marshalling_tests_genum_get_type (void)
+{
+    static GType type = 0;
+    if (G_UNLIKELY(type == 0)) {
+        static const GEnumValue values[] = {
+            { GI_MARSHALLING_TESTS_GENUM_VALUE1, "GI_MARSHALLING_TESTS_GENUM_VALUE1", "value1" },
+            { GI_MARSHALLING_TESTS_GENUM_VALUE2, "GI_MARSHALLING_TESTS_GENUM_VALUE2", "value2" },
+            { GI_MARSHALLING_TESTS_GENUM_VALUE3, "GI_MARSHALLING_TESTS_GENUM_VALUE3", "value3" },
+            { 0, NULL, NULL }
+        };
+        type = g_enum_register_static (g_intern_static_string ("GIMarshallingTestsGEnum"), values);
+    }
+
+    return type;
+}
+
+GIMarshallingTestsEnum
+gi_marshalling_tests_genum_returnv (void)
+{
+    return GI_MARSHALLING_TESTS_GENUM_VALUE3;
+}
+
+void
+gi_marshalling_tests_genum_in (GIMarshallingTestsGEnum enum_)
+{
+    g_assert(enum_ == GI_MARSHALLING_TESTS_GENUM_VALUE3);
+}
+
+/**
+ * gi_marshalling_tests_genum_out:
+ * @enum_: (out):
+ */
+void
+gi_marshalling_tests_genum_out (GIMarshallingTestsGEnum *enum_)
+{
+    *enum_ = GI_MARSHALLING_TESTS_GENUM_VALUE3;
+}
+
+/**
+ * gi_marshalling_tests_genum_inout:
+ * @enum_: (inout):
+ */
+void
+gi_marshalling_tests_genum_inout (GIMarshallingTestsGEnum *enum_)
+{
+    g_assert(*enum_ == GI_MARSHALLING_TESTS_GENUM_VALUE3);
+    *enum_ = GI_MARSHALLING_TESTS_GENUM_VALUE1;
+}
+
+
+GIMarshallingTestsEnum
+gi_marshalling_tests_enum_returnv (void)
+{
+    return GI_MARSHALLING_TESTS_ENUM_VALUE3;
+}
+
+void
+gi_marshalling_tests_enum_in (GIMarshallingTestsEnum enum_)
+{
+    g_assert(enum_ == GI_MARSHALLING_TESTS_ENUM_VALUE3);
+}
+
+/**
+ * gi_marshalling_tests_enum_out:
+ * @enum_: (out):
+ */
+void
+gi_marshalling_tests_enum_out (GIMarshallingTestsEnum *enum_)
+{
+    *enum_ = GI_MARSHALLING_TESTS_ENUM_VALUE3;
+}
+
+/**
+ * gi_marshalling_tests_enum_inout:
+ * @enum_: (inout):
+ */
+void
+gi_marshalling_tests_enum_inout (GIMarshallingTestsEnum *enum_)
+{
+    g_assert(*enum_ == GI_MARSHALLING_TESTS_ENUM_VALUE3);
+    *enum_ = GI_MARSHALLING_TESTS_ENUM_VALUE1;
+}
+
+
+GType
+gi_marshalling_tests_flags_get_type (void)
+{
+    static GType type = 0;
+    if (G_UNLIKELY(type == 0)) {
+        static const GFlagsValue values[] = {
+            { GI_MARSHALLING_TESTS_FLAGS_VALUE1, "GI_MARSHALLING_TESTS_FLAGS_VALUE1", "value1" },
+            { GI_MARSHALLING_TESTS_FLAGS_VALUE2, "GI_MARSHALLING_TESTS_FLAGS_VALUE2", "value2" },
+            { GI_MARSHALLING_TESTS_FLAGS_VALUE3, "GI_MARSHALLING_TESTS_FLAGS_VALUE3", "value3" },
+            { GI_MARSHALLING_TESTS_FLAGS_MASK,   "GI_MARSHALLING_TESTS_FLAGS_MASK",   "mask"   },
+            { GI_MARSHALLING_TESTS_FLAGS_MASK2,  "GI_MARSHALLING_TESTS_FLAGS_MASK2",  "mask2"  },
+            { 0, NULL, NULL }
+        };
+        type = g_flags_register_static (g_intern_static_string ("GIMarshallingTestsFlags"), values);
+    }
+
+    return type;
+}
+
+GIMarshallingTestsFlags
+gi_marshalling_tests_flags_returnv (void)
+{
+    return GI_MARSHALLING_TESTS_FLAGS_VALUE2;
+}
+
+void
+gi_marshalling_tests_flags_in (GIMarshallingTestsFlags flags_)
+{
+    g_assert(flags_ == GI_MARSHALLING_TESTS_FLAGS_VALUE2);
+}
+
+void
+gi_marshalling_tests_flags_in_zero (GIMarshallingTestsFlags flags)
+{
+    g_assert(flags == 0);
+}
+
+/**
+ * gi_marshalling_tests_flags_out:
+ * @flags_: (out):
+ */
+void
+gi_marshalling_tests_flags_out (GIMarshallingTestsFlags *flags_)
+{
+    *flags_ = GI_MARSHALLING_TESTS_FLAGS_VALUE2;
+}
+
+/**
+ * gi_marshalling_tests_flags_inout:
+ * @flags_: (inout):
+ */
+void
+gi_marshalling_tests_flags_inout (GIMarshallingTestsFlags *flags_)
+{
+    g_assert(*flags_ == GI_MARSHALLING_TESTS_FLAGS_VALUE2);
+    *flags_ = GI_MARSHALLING_TESTS_FLAGS_VALUE1;
+}
+
+
+GIMarshallingTestsNoTypeFlags
+gi_marshalling_tests_no_type_flags_returnv (void)
+{
+    return GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE2;
+}
+
+void
+gi_marshalling_tests_no_type_flags_in (GIMarshallingTestsNoTypeFlags flags_)
+{
+    g_assert(flags_ == GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE2);
+}
+
+void
+gi_marshalling_tests_no_type_flags_in_zero (GIMarshallingTestsNoTypeFlags flags)
+{
+    g_assert(flags == 0);
+}
+
+/**
+ * gi_marshalling_tests_no_type_flags_out:
+ * @flags_: (out):
+ */
+void
+gi_marshalling_tests_no_type_flags_out (GIMarshallingTestsNoTypeFlags *flags_)
+{
+    *flags_ = GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE2;
+}
+
+/**
+ * gi_marshalling_tests_no_type_flags_inout:
+ * @flags_: (inout):
+ */
+void
+gi_marshalling_tests_no_type_flags_inout (GIMarshallingTestsNoTypeFlags *flags_)
+{
+    g_assert(*flags_ == GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE2);
+    *flags_ = GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE1;
+}
+
+
+/**
+ * gi_marshalling_tests_simple_struct_returnv:
+ * Returns: (transfer none):
+ */
+GIMarshallingTestsSimpleStruct *
+gi_marshalling_tests_simple_struct_returnv (void)
+{
+    static GIMarshallingTestsSimpleStruct *struct_ = NULL;
+
+    if (struct_ == NULL) {
+        struct_ = g_new(GIMarshallingTestsSimpleStruct, 1);
+
+        struct_->long_ = 6;
+        struct_->int8 = 7;
+    }
+
+    return struct_;
+}
+
+/**
+ * gi_marshalling_tests_simple_struct_inv:
+ * @struct_: (transfer none):
+ */
+void
+gi_marshalling_tests_simple_struct_inv (GIMarshallingTestsSimpleStruct *struct_)
+{
+    g_assert(struct_->long_ == 6);
+    g_assert(struct_->int8 == 7);
+}
+
+void
+gi_marshalling_tests_simple_struct_method (GIMarshallingTestsSimpleStruct *struct_)
+{
+    g_assert(struct_->long_ == 6);
+    g_assert(struct_->int8 == 7);
+}
+
+
+GType
+gi_marshalling_tests_pointer_struct_get_type (void)
+{
+    static GType type = 0;
+
+    if (type == 0) {
+        type = g_pointer_type_register_static ("GIMarshallingTestsPointerStruct");
+    }
+
+    return type;
+}
+
+/**
+ * gi_marshalling_tests_pointer_struct_returnv:
+ * Returns: (transfer none):
+ */
+GIMarshallingTestsPointerStruct *
+gi_marshalling_tests_pointer_struct_returnv (void)
+{
+    static GIMarshallingTestsPointerStruct *struct_ = NULL;
+
+    if (struct_ == NULL) {
+        struct_ = g_new(GIMarshallingTestsPointerStruct, 1);
+
+        struct_->long_ = 42;
+    }
+
+    return struct_;
+}
+
+/**
+ * gi_marshalling_tests_pointer_struct_inv:
+ * @struct_: (transfer none):
+ */
+void
+gi_marshalling_tests_pointer_struct_inv (GIMarshallingTestsPointerStruct *struct_)
+{
+    g_assert(struct_->long_ == 42);
+}
+
+static GIMarshallingTestsBoxedStruct *
+gi_marshalling_tests_boxed_struct_copy (GIMarshallingTestsBoxedStruct *struct_)
+{
+    GIMarshallingTestsBoxedStruct *new_struct;
+
+    new_struct = g_slice_new (GIMarshallingTestsBoxedStruct);
+
+    *new_struct = *struct_;
+
+    return new_struct;
+}
+
+static void
+gi_marshalling_tests_boxed_struct_free (GIMarshallingTestsBoxedStruct *struct_)
+{
+    g_slice_free (GIMarshallingTestsBoxedStruct, struct_);
+}
+
+GType
+gi_marshalling_tests_boxed_struct_get_type (void)
+{
+    static GType type = 0;
+
+    if (type == 0) {
+        type = g_boxed_type_register_static ("GIMarshallingTestsBoxedStruct",
+                (GBoxedCopyFunc) gi_marshalling_tests_boxed_struct_copy,
+                (GBoxedFreeFunc) gi_marshalling_tests_boxed_struct_free);
+    }
+
+    return type;
+}
+
+GIMarshallingTestsBoxedStruct *
+gi_marshalling_tests_boxed_struct_new (void)
+{
+    return g_slice_new0 (GIMarshallingTestsBoxedStruct);
+}
+
+/**
+ * gi_marshalling_tests_boxed_struct_returnv:
+ * Returns: (transfer none):
+ */
+GIMarshallingTestsBoxedStruct *
+gi_marshalling_tests_boxed_struct_returnv (void)
+{
+    static GIMarshallingTestsBoxedStruct *struct_ = NULL;
+
+    if (struct_ == NULL) {
+        struct_ = g_new(GIMarshallingTestsBoxedStruct, 1);
+
+        struct_->long_ = 42;
+        struct_->g_strv = g_new0(gchar*, 4);
+        struct_->g_strv[0] = g_strdup("0");
+        struct_->g_strv[1] = g_strdup("1");
+        struct_->g_strv[2] = g_strdup("2");
+        struct_->g_strv[3] = NULL;
+    }
+
+    return struct_;
+}
+
+/**
+ * gi_marshalling_tests_boxed_struct_inv:
+ * @struct_: (transfer none):
+ */
+void
+gi_marshalling_tests_boxed_struct_inv (GIMarshallingTestsBoxedStruct *struct_)
+{
+    g_assert(struct_->long_ == 42);
+}
+
+/**
+ * gi_marshalling_tests_boxed_struct_out:
+ * @struct_: (out) (transfer none):
+ */
+void
+gi_marshalling_tests_boxed_struct_out (GIMarshallingTestsBoxedStruct **struct_)
+{
+    static GIMarshallingTestsBoxedStruct *new_struct = NULL;
+
+    if (new_struct == NULL) {
+        new_struct = g_new(GIMarshallingTestsBoxedStruct, 1);
+
+        new_struct->long_ = 42;
+    }
+
+    *struct_ = new_struct;
+}
+
+/**
+ * gi_marshalling_tests_boxed_struct_inout:
+ * @struct_: (inout) (transfer full):
+ */
+void
+gi_marshalling_tests_boxed_struct_inout (GIMarshallingTestsBoxedStruct **struct_)
+{
+    g_assert((*struct_)->long_ == 42);
+
+    (*struct_) = g_slice_new (GIMarshallingTestsBoxedStruct);
+    (*struct_)->long_ = 0;
+}
+
+static GIMarshallingTestsUnion *
+gi_marshalling_tests_union_copy (GIMarshallingTestsUnion *union_)
+{
+    GIMarshallingTestsUnion *new_union;
+
+    new_union = g_slice_new (GIMarshallingTestsUnion);
+
+    *new_union = *union_;
+
+    return new_union;
+}
+
+static void
+gi_marshalling_tests_union_free (GIMarshallingTestsUnion *union_)
+{
+    g_slice_free (GIMarshallingTestsUnion, union_);
+}
+
+GType
+gi_marshalling_tests_union_get_type (void)
+{
+    static GType type = 0;
+
+    if (type == 0) {
+        type = g_boxed_type_register_static ("GIMarshallingTestsUnion",
+                (GBoxedCopyFunc) gi_marshalling_tests_union_copy,
+                (GBoxedFreeFunc) gi_marshalling_tests_union_free);
+    }
+
+    return type;
+}
+
+/**
+ * gi_marshalling_tests_union_returnv:
+ * Returns: (transfer none):
+ */
+GIMarshallingTestsUnion *
+gi_marshalling_tests_union_returnv (void)
+{
+    static GIMarshallingTestsUnion *union_ = NULL;
+
+    if (union_ == NULL) {
+        union_ = g_new(GIMarshallingTestsUnion, 1);
+
+        union_->long_ = 42;
+    }
+
+    return union_;
+}
+
+/**
+ * gi_marshalling_tests_union_inv:
+ * @union_: (transfer none):
+ */
+void
+gi_marshalling_tests_union_inv (GIMarshallingTestsUnion *union_)
+{
+    g_assert(union_->long_ == 42);
+}
+
+void
+gi_marshalling_tests_union_method (GIMarshallingTestsUnion *union_)
+{
+    g_assert(union_->long_ == 42);
+}
+
+
+
+enum
+{
+       PROP_0,
+       PROP_INT_
+};
+
+static void gi_marshalling_tests_object_real_method_with_default_implementation (
+        GIMarshallingTestsObject *self, gint8 in);
+
+G_DEFINE_TYPE (GIMarshallingTestsObject, gi_marshalling_tests_object, G_TYPE_OBJECT);
+
+static void
+gi_marshalling_tests_object_init (GIMarshallingTestsObject *object)
+{
+}
+
+static void
+gi_marshalling_tests_object_finalize (GObject *object)
+{
+       G_OBJECT_CLASS (gi_marshalling_tests_object_parent_class)->finalize (object);
+}
+
+static void
+gi_marshalling_tests_object_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+       g_return_if_fail (GI_MARSHALLING_TESTS_IS_OBJECT (object));
+
+       switch (prop_id) {
+        case PROP_INT_:
+            GI_MARSHALLING_TESTS_OBJECT (object)->int_ = g_value_get_int (value);
+            break;
+        default:
+            G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+            break;
+       }
+}
+
+static void
+gi_marshalling_tests_object_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+       g_return_if_fail (GI_MARSHALLING_TESTS_IS_OBJECT (object));
+
+       switch (prop_id) {
+        case PROP_INT_:
+            g_value_set_int (value, GI_MARSHALLING_TESTS_OBJECT (object)->int_);
+            break;
+        default:
+            G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+            break;
+       }
+}
+
+static void
+gi_marshalling_tests_object_class_init (GIMarshallingTestsObjectClass *klass)
+{
+       GObjectClass* object_class = G_OBJECT_CLASS (klass);
+#if 0
+       GObjectClass* parent_class = G_OBJECT_CLASS (klass);
+#endif
+
+       object_class->finalize = gi_marshalling_tests_object_finalize;
+       object_class->set_property = gi_marshalling_tests_object_set_property;
+       object_class->get_property = gi_marshalling_tests_object_get_property;
+
+       g_object_class_install_property (object_class, PROP_INT_,
+         g_param_spec_int ("int", "Integer", "An integer", G_MININT, G_MAXINT, 0,
+              G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
+
+    klass->method_with_default_implementation = gi_marshalling_tests_object_real_method_with_default_implementation;
+}
+
+
+void
+gi_marshalling_tests_object_static_method (void)
+{
+}
+
+void
+gi_marshalling_tests_object_method (GIMarshallingTestsObject *object)
+{
+       g_return_if_fail (GI_MARSHALLING_TESTS_IS_OBJECT (object));
+    g_assert (object->int_ == 42);
+}
+
+void
+gi_marshalling_tests_object_overridden_method (GIMarshallingTestsObject *object)
+{
+       g_return_if_fail (GI_MARSHALLING_TESTS_IS_OBJECT (object));
+    g_assert (object->int_ == 0);
+}
+
+GIMarshallingTestsObject *
+gi_marshalling_tests_object_new (gint int_)
+{
+    return g_object_new (GI_MARSHALLING_TESTS_TYPE_OBJECT, "int", int_, NULL);
+}
+
+/**
+ * gi_marshalling_tests_object_method_array_in:
+ * @ints: (array length=length):
+ */
+void
+gi_marshalling_tests_object_method_array_in (GIMarshallingTestsObject *object, const gint *ints, gint length)
+{
+    g_assert(length == 4);
+    g_assert(ints[0] == -1);
+    g_assert(ints[1] == 0);
+    g_assert(ints[2] == 1);
+    g_assert(ints[3] == 2);
+}
+
+/**
+ * gi_marshalling_tests_object_method_array_out:
+ * @ints: (out) (array length=length) (transfer none):
+ */
+void
+gi_marshalling_tests_object_method_array_out (GIMarshallingTestsObject *object, gint **ints, gint *length)
+{
+    static gint values[] = {-1, 0, 1, 2};
+
+    *length = 4;
+    *ints = values;
+}
+
+/**
+ * gi_marshalling_tests_object_method_array_inout:
+ * @ints: (inout) (array length=length) (transfer none):
+ * @length: (inout):
+ */
+void
+gi_marshalling_tests_object_method_array_inout (GIMarshallingTestsObject *object, gint **ints, gint *length)
+{
+    static gint values[] = {-2, -1, 0, 1, 2};
+
+    g_assert(*length == 4);
+    g_assert((*ints)[0] == -1);
+    g_assert((*ints)[1] == 0);
+    g_assert((*ints)[2] == 1);
+    g_assert((*ints)[3] == 2);
+
+    *length = 5;
+    *ints = values;
+}
+
+/**
+ * gi_marshalling_tests_object_method_array_return:
+ * Returns: (array length=length):
+ */
+const gint *
+gi_marshalling_tests_object_method_array_return (GIMarshallingTestsObject *object, gint *length)
+{
+    static gint ints[] = {-1, 0, 1, 2};
+
+    *length = 4;
+    return ints;
+}
+
+/**
+ * gi_marshalling_tests_object_method_int8_in:
+ * @in: (in):
+ */
+void
+gi_marshalling_tests_object_method_int8_in (GIMarshallingTestsObject *self, gint8 in)
+{
+  GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->method_int8_in (self, in);
+}
+
+/**
+ * gi_marshalling_tests_object_method_int8_out:
+ * @out: (out):
+ */
+void
+gi_marshalling_tests_object_method_int8_out (GIMarshallingTestsObject *self, gint8 *out)
+{
+  GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->method_int8_out (self, out);
+}
+
+/**
+ * gi_marshalling_tests_object_method_with_default_implementation:
+ * @in: (in):
+ */
+void
+gi_marshalling_tests_object_method_with_default_implementation (GIMarshallingTestsObject *self, gint8 in)
+{
+    GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->method_with_default_implementation (self, in);
+}
+
+static void
+gi_marshalling_tests_object_real_method_with_default_implementation (GIMarshallingTestsObject *self, gint8 in)
+{
+    GValue val = {0, };
+    g_value_init (&val, G_TYPE_INT);
+    g_value_set_int (&val, in);
+    g_object_set_property (G_OBJECT (self), "int", &val);
+}
+
+/**
+ * gi_marshalling_tests_object_vfunc_with_callback:
+ * @callback: (scope call) (closure callback_data):
+ * @callback_data: (allow-none):
+ *
+ * Virtual: vfunc_with_callback
+ */
+void
+gi_marshalling_tests_object_vfunc_with_callback (GIMarshallingTestsObject *object,
+                                                 GIMarshallingTestsCallbackIntInt callback,
+                                                 void *callback_data)
+{
+
+}
+
+static int
+_callback (int val, void *user_data)
+{
+    g_assert(user_data == 0xdeadbeef);
+    return val;
+}
+
+void
+gi_marshalling_tests_object_call_vfunc_with_callback (GIMarshallingTestsObject *object)
+{
+    GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (object)->vfunc_with_callback (object,
+                                                                         _callback,
+                                                                         (void *) 0xdeadbeef);
+}
+
+/**
+ * gi_marshalling_tests_object_none_return:
+ * Returns: (transfer none):
+ */
+GIMarshallingTestsObject *
+gi_marshalling_tests_object_none_return (void)
+{
+    static GIMarshallingTestsObject *object = NULL;
+
+    if (object == NULL) {
+        object = g_object_new(GI_MARSHALLING_TESTS_TYPE_OBJECT, NULL);
+    }
+
+    return object;
+}
+
+/**
+ * gi_marshalling_tests_object_full_return:
+ * Returns: (transfer full):
+ */
+GIMarshallingTestsObject *
+gi_marshalling_tests_object_full_return (void)
+{
+    return g_object_new(GI_MARSHALLING_TESTS_TYPE_OBJECT, NULL);
+}
+
+/**
+ * gi_marshalling_tests_object_none_in:
+ * @object: (transfer none):
+ */
+void
+gi_marshalling_tests_object_none_in (GIMarshallingTestsObject *object)
+{
+    g_assert(object->int_ == 42);
+}
+
+/**
+ * gi_marshalling_tests_object_none_out:
+ * @object: (out) (transfer none):
+ */
+void
+gi_marshalling_tests_object_none_out (GIMarshallingTestsObject **object)
+{
+    static GIMarshallingTestsObject *new_object = NULL;
+
+    if (new_object == NULL) {
+        new_object = g_object_new(GI_MARSHALLING_TESTS_TYPE_OBJECT, NULL);
+    }
+
+    *object = new_object;
+}
+
+/**
+ * gi_marshalling_tests_object_full_out:
+ * @object: (out) (transfer full):
+ */
+void
+gi_marshalling_tests_object_full_out (GIMarshallingTestsObject **object)
+{
+    *object = g_object_new(GI_MARSHALLING_TESTS_TYPE_OBJECT, NULL);
+}
+
+/**
+ * gi_marshalling_tests_object_none_inout:
+ * @object: (inout) (transfer none):
+ */
+void
+gi_marshalling_tests_object_none_inout (GIMarshallingTestsObject **object)
+{
+    static GIMarshallingTestsObject *new_object = NULL;
+
+    g_assert((*object)->int_ == 42);
+
+    if (new_object == NULL) {
+        new_object = g_object_new(GI_MARSHALLING_TESTS_TYPE_OBJECT, NULL);
+        new_object->int_ = 0;
+    }
+
+    *object = new_object;
+}
+
+/**
+ * gi_marshalling_tests_object_full_inout:
+ * @object: (inout) (transfer full):
+ */
+void
+gi_marshalling_tests_object_full_inout (GIMarshallingTestsObject **object)
+{
+    g_assert((*object)->int_ == 42);
+
+    *object = g_object_new(GI_MARSHALLING_TESTS_TYPE_OBJECT, NULL);
+}
+
+/**
+ * gi_marshalling_tests_object_test_int8_in:
+ * @in: (in):
+ */
+void
+gi_marshalling_tests_object_int8_in (GIMarshallingTestsObject *object, gint8 in)
+{
+  gi_marshalling_tests_object_method_int8_in (object, in);
+}
+
+/**
+ * gi_marshalling_tests_object_test_int8_out:
+ * @out: (out):
+ */
+void
+gi_marshalling_tests_object_int8_out (GIMarshallingTestsObject *object, gint8 *out)
+{
+  gi_marshalling_tests_object_method_int8_out (object, out);
+}
+
+/**
+ * gi_marshalling_tests_object_vfunc_return_value_only:
+ */
+glong
+gi_marshalling_tests_object_vfunc_return_value_only (GIMarshallingTestsObject *self)
+{
+    /* make sure that local variables don't get smashed */
+    glong return_value;
+    gulong local = 0x12345678;
+    return_value = GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_return_value_only (self);
+    g_assert_cmpint(local, ==, 0x12345678);
+    return return_value;
+}
+
+/**
+ * gi_marshalling_tests_object_vfunc_one_out_parameter:
+ * @a: (out):
+ */
+void
+gi_marshalling_tests_object_vfunc_one_out_parameter (GIMarshallingTestsObject *self, gfloat *a)
+{
+    /* make sure that local variables don't get smashed */
+    gulong local = 0x12345678;
+    GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_one_out_parameter (self, a);
+    g_assert_cmpint(local, ==, 0x12345678);
+}
+
+/**
+ * gi_marshalling_tests_object_vfunc_multiple_out_parameters:
+ * @a: (out):
+ * @b: (out):
+ */
+void
+gi_marshalling_tests_object_vfunc_multiple_out_parameters (GIMarshallingTestsObject *self, gfloat *a, gfloat *b)
+{
+    /* make sure that local variables don't get smashed */
+    gulong local = 0x12345678;
+    GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_multiple_out_parameters (self, a, b);
+    g_assert_cmpint(local, ==, 0x12345678);
+}
+
+/**
+ * gi_marshalling_tests_object_vfunc_return_value_and_one_out_parameter:
+ * @a: (out):
+ */
+glong
+gi_marshalling_tests_object_vfunc_return_value_and_one_out_parameter (GIMarshallingTestsObject *self, glong *a)
+{
+    /* make sure that local variables don't get smashed */
+    gulong return_value;
+    gulong local = 0x12345678;
+    return_value = GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_return_value_and_one_out_parameter (self, a);
+    g_assert_cmpint(local, ==, 0x12345678);
+    return return_value;
+}
+
+/**
+ * gi_marshalling_tests_object_vfunc_return_value_and_multiple_out_parameters:
+ * @a: (out):
+ * @b: (out):
+ */
+glong
+gi_marshalling_tests_object_vfunc_return_value_and_multiple_out_parameters (GIMarshallingTestsObject *self, glong *a, glong *b)
+{
+    gulong return_value;
+    gulong local = 0x12345678;
+    return_value = GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_return_value_and_multiple_out_parameters (self, a, b);
+    g_assert_cmpint(local, ==, 0x12345678);
+    return return_value;
+}
+
+gboolean
+gi_marshalling_tests_object_vfunc_meth_with_error (GIMarshallingTestsObject *self,
+                                                   gint                      x,
+                                                   GError                  **error)
+{
+  gulong local = 0x12345678;
+  gboolean ret = GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_meth_with_err (self, x, error);
+  g_assert_cmpint(local, ==, 0x12345678);
+  return ret;
+}
+
+G_DEFINE_TYPE (GIMarshallingTestsSubObject, gi_marshalling_tests_sub_object, GI_MARSHALLING_TESTS_TYPE_OBJECT);
+
+static void
+gi_marshalling_tests_sub_object_init (GIMarshallingTestsSubObject *object)
+{
+}
+
+static void
+gi_marshalling_tests_sub_object_finalize (GObject *object)
+{
+       G_OBJECT_CLASS(gi_marshalling_tests_sub_object_parent_class)->finalize(object);
+}
+
+static void
+method_deep_hierarchy (GIMarshallingTestsObject *self, gint8 in)
+{
+    GValue val = {0, };
+    g_value_init (&val, G_TYPE_INT);
+    g_value_set_int (&val, in);
+    g_object_set_property (G_OBJECT (self), "int", &val);
+}
+
+static void
+gi_marshalling_tests_sub_object_class_init (GIMarshallingTestsSubObjectClass *klass)
+{
+       G_OBJECT_CLASS(klass)->finalize = gi_marshalling_tests_sub_object_finalize;
+    GI_MARSHALLING_TESTS_OBJECT_CLASS(klass)->method_deep_hierarchy = method_deep_hierarchy;
+}
+
+void
+gi_marshalling_tests_sub_object_sub_method (GIMarshallingTestsSubObject *object)
+{
+    g_assert(GI_MARSHALLING_TESTS_OBJECT(object)->int_ == 0);
+}
+
+void
+gi_marshalling_tests_sub_object_overwritten_method (GIMarshallingTestsSubObject *object)
+{
+    g_assert(GI_MARSHALLING_TESTS_OBJECT(object)->int_ == 0);
+}
+
+G_DEFINE_TYPE (GIMarshallingTestsSubSubObject, gi_marshalling_tests_sub_sub_object, GI_MARSHALLING_TESTS_TYPE_SUB_OBJECT);
+
+static void
+gi_marshalling_tests_sub_sub_object_init (GIMarshallingTestsSubSubObject *object)
+{
+}
+
+static void
+gi_marshalling_tests_sub_sub_object_class_init (GIMarshallingTestsSubSubObjectClass *klass)
+{
+}
+
+/* Interfaces */
+
+static void
+gi_marshalling_tests_interface_class_init(void *g_iface)
+{
+}
+
+GType
+gi_marshalling_tests_interface_get_type(void)
+{
+    static GType type = 0;
+    if (type == 0) {
+        type = g_type_register_static_simple (G_TYPE_INTERFACE,
+                                              "GIMarshallingTestsInterface",
+                                              sizeof (GIMarshallingTestsInterfaceIface),
+                                              (GClassInitFunc) gi_marshalling_tests_interface_class_init,
+                                              0, NULL, 0);
+    }
+
+    return type;
+}
+
+/**
+ * gi_marshalling_tests_interface_test_int8_in:
+ * @in: (in):
+ */
+void
+gi_marshalling_tests_interface_test_int8_in (GIMarshallingTestsInterface *self, gint8 in)
+{
+  GI_MARSHALLING_TESTS_INTERFACE_GET_IFACE (self)->test_int8_in (self, in);
+}
+
+/**
+ * gi_marshalling_tests_test_interface_test_int8_in:
+ * @in: (in):
+ */
+void
+gi_marshalling_tests_test_interface_test_int8_in (GIMarshallingTestsInterface *test_iface, gint8 in)
+{
+  gi_marshalling_tests_interface_test_int8_in (test_iface, in);
+}
+
+
+static void
+gi_marshalling_tests_interface2_class_init(void *g_iface)
+{
+}
+
+GType
+gi_marshalling_tests_interface2_get_type(void)
+{
+    static GType type = 0;
+    if (type == 0) {
+        type = g_type_register_static_simple (G_TYPE_INTERFACE,
+                                              "GIMarshallingTestsInterface2",
+                                              sizeof (GIMarshallingTestsInterface2Iface),
+                                              (GClassInitFunc) gi_marshalling_tests_interface2_class_init,
+                                              0, NULL, 0);
+    }
+
+    return type;
+}
+
+
+/**
+ * gi_marshalling_tests_int_out_out:
+ * @int0: (out):
+ * @int1: (out):
+ */
+void
+gi_marshalling_tests_int_out_out (gint *int0, gint *int1)
+{
+    *int0 = 6;
+    *int1 = 7;
+}
+
+/**
+ * gi_marshalling_tests_int_three_in_three_out:
+ * @a: (in):
+ * @b: (in):
+ * @c: (in):
+ * @out0: (out):
+ * @out1: (out):
+ * @out2: (out):
+ */
+void
+gi_marshalling_tests_int_three_in_three_out(gint a, gint b, gint c,
+                                            gint *out0, gint *out1, gint *out2)
+{
+    *out0 = a;
+    *out1 = b;
+    *out2 = c;
+}
+
+/**
+ * gi_marshalling_tests_int_return_out:
+ * @int_: (out):
+ */
+gint
+gi_marshalling_tests_int_return_out (gint *int_)
+{
+    *int_ = 7;
+    return 6;
+}
+
+/* GError */
+
+void
+gi_marshalling_tests_gerror(GError **error)
+{
+    GQuark quark = g_quark_from_static_string(GI_MARSHALLING_TESTS_CONSTANT_GERROR_DOMAIN);
+    g_set_error_literal(error,
+                        quark,
+                        GI_MARSHALLING_TESTS_CONSTANT_GERROR_CODE,
+                        GI_MARSHALLING_TESTS_CONSTANT_GERROR_MESSAGE);
+}
+
+/**
+ * gi_marshalling_tests_gerror_array_in:
+ * @in_ints: (array zero-terminated=1):
+ */
+void
+gi_marshalling_tests_gerror_array_in(gint *in_ints, GError **error)
+{
+    GQuark quark = g_quark_from_static_string(GI_MARSHALLING_TESTS_CONSTANT_GERROR_DOMAIN);
+    g_set_error_literal(error,
+                        quark,
+                        GI_MARSHALLING_TESTS_CONSTANT_GERROR_CODE,
+                        GI_MARSHALLING_TESTS_CONSTANT_GERROR_MESSAGE);
+}
+
+/**
+ * gi_marshalling_tests_gerror_out:
+ * @error: (out) (allow-none) (transfer full): location for the GError.
+ * @debug: (out) (allow-none) (transfer full): location for the debug message
+ *
+ * Inspired by gst_message_parse_error.
+ */
+void
+gi_marshalling_tests_gerror_out(GError **error, gchar **debug)
+{
+    GQuark quark = g_quark_from_static_string(GI_MARSHALLING_TESTS_CONSTANT_GERROR_DOMAIN);
+    g_set_error_literal(error,
+                        quark,
+                        GI_MARSHALLING_TESTS_CONSTANT_GERROR_CODE,
+                        GI_MARSHALLING_TESTS_CONSTANT_GERROR_MESSAGE);
+
+    if (debug != NULL) {
+        *debug = g_strdup (GI_MARSHALLING_TESTS_CONSTANT_GERROR_DEBUG_MESSAGE);
+    }
+}
+
+/**
+ * gi_marshalling_tests_gerror_out_transfer_none:
+ * @err: (out) (allow-none) (transfer none): location for the GError.
+ * @debug: (out) (allow-none) (transfer none): location for the debug message
+ *
+ * A variant of gi_marshalling_tests_gerror_out() which returns data the caller
+ * must not free.
+ */
+void
+gi_marshalling_tests_gerror_out_transfer_none(GError **err, const gchar **debug)
+{
+    static GError error = { 0,
+                        GI_MARSHALLING_TESTS_CONSTANT_GERROR_CODE,
+                        GI_MARSHALLING_TESTS_CONSTANT_GERROR_MESSAGE };
+    error.domain = g_quark_from_static_string(GI_MARSHALLING_TESTS_CONSTANT_GERROR_DOMAIN);
+    *err = &error;
+    *debug = GI_MARSHALLING_TESTS_CONSTANT_GERROR_DEBUG_MESSAGE;
+}
+
+/**
+ * gi_marshalling_tests_gerror_return:
+ *
+ * Yet another variant of gi_marshalling_tests_gerror_out().
+ *
+ * Returns: (transfer full): a GError
+ */
+GError *
+gi_marshalling_tests_gerror_return(void)
+{
+    GQuark quark = g_quark_from_static_string(GI_MARSHALLING_TESTS_CONSTANT_GERROR_DOMAIN);
+
+    return g_error_new(quark,
+                       GI_MARSHALLING_TESTS_CONSTANT_GERROR_CODE,
+                       GI_MARSHALLING_TESTS_CONSTANT_GERROR_MESSAGE);
+}
+
+static GIMarshallingTestsOverridesStruct *
+gi_marshalling_tests_overrides_struct_copy (GIMarshallingTestsOverridesStruct *struct_)
+{
+    GIMarshallingTestsOverridesStruct *new_struct;
+
+    new_struct = g_slice_new (GIMarshallingTestsOverridesStruct);
+
+    *new_struct = *struct_;
+
+    return new_struct;
+}
+
+static void
+gi_marshalling_tests_overrides_struct_free (GIMarshallingTestsOverridesStruct *struct_)
+{
+    g_slice_free (GIMarshallingTestsOverridesStruct, struct_);
+}
+
+GType
+gi_marshalling_tests_overrides_struct_get_type (void)
+{
+    static GType type = 0;
+
+    if (type == 0) {
+        type = g_boxed_type_register_static ("GIMarshallingTestsOverridesStruct",
+                (GBoxedCopyFunc) gi_marshalling_tests_overrides_struct_copy,
+                (GBoxedFreeFunc) gi_marshalling_tests_overrides_struct_free);
+    }
+
+    return type;
+}
+
+GIMarshallingTestsOverridesStruct *
+gi_marshalling_tests_overrides_struct_new (void)
+{
+    return g_slice_new (GIMarshallingTestsOverridesStruct);
+}
+
+glong
+gi_marshalling_tests_overrides_struct_method (GIMarshallingTestsOverridesStruct *struct_)
+{
+    return 42;
+}
+
+
+/**
+ * gi_marshalling_tests_overrides_struct_returnv:
+ *
+ * Returns: (transfer full):
+ */
+GIMarshallingTestsOverridesStruct *
+gi_marshalling_tests_overrides_struct_returnv (void)
+{
+    return gi_marshalling_tests_overrides_struct_new();
+}
+
+
+G_DEFINE_TYPE (GIMarshallingTestsOverridesObject, gi_marshalling_tests_overrides_object, G_TYPE_OBJECT);
+
+static void
+gi_marshalling_tests_overrides_object_init (GIMarshallingTestsOverridesObject *object)
+{
+}
+
+static void
+gi_marshalling_tests_overrides_object_finalize (GObject *object)
+{
+       G_OBJECT_CLASS (gi_marshalling_tests_overrides_object_parent_class)->finalize (object);
+}
+
+static void
+gi_marshalling_tests_overrides_object_class_init (GIMarshallingTestsOverridesObjectClass *klass)
+{
+       GObjectClass* object_class = G_OBJECT_CLASS (klass);
+#if 0
+       GObjectClass* parent_class = G_OBJECT_CLASS (klass);
+#endif
+
+       object_class->finalize = gi_marshalling_tests_overrides_object_finalize;
+}
+
+GIMarshallingTestsOverridesObject *
+gi_marshalling_tests_overrides_object_new (void)
+{
+    return g_object_new (GI_MARSHALLING_TESTS_TYPE_OVERRIDES_OBJECT, NULL);
+}
+
+glong
+gi_marshalling_tests_overrides_object_method (GIMarshallingTestsOverridesObject *object)
+{
+    return 42;
+}
+
+/**
+ * gi_marshalling_tests_overrides_object_returnv:
+ *
+ * Returns: (transfer full):
+ */
+GIMarshallingTestsOverridesObject *
+gi_marshalling_tests_overrides_object_returnv (void)
+{
+    return g_object_new (GI_MARSHALLING_TESTS_TYPE_OVERRIDES_OBJECT, NULL);
+}
+
+/**
+ * gi_marshalling_tests_filename_list_return:
+ *
+ * Returns: (transfer none) (element-type filename): List of filenames
+ */
+GSList *
+gi_marshalling_tests_filename_list_return (void)
+{
+    return NULL;
+}
+
+
+enum  {
+    DUMMY_PROPERTY,
+    SOME_BOOLEAN_PROPERTY,
+    SOME_CHAR_PROPERTY,
+    SOME_UCHAR_PROPERTY,
+    SOME_INT_PROPERTY,
+    SOME_UINT_PROPERTY,
+    SOME_LONG_PROPERTY,
+    SOME_ULONG_PROPERTY,
+    SOME_INT64_PROPERTY,
+    SOME_UINT64_PROPERTY,
+    SOME_FLOAT_PROPERTY,
+    SOME_DOUBLE_PROPERTY
+};
+
+G_DEFINE_TYPE (GIMarshallingTestsPropertiesObject, gi_marshalling_tests_properties_object, G_TYPE_OBJECT);
+
+static void
+gi_marshalling_tests_properties_object_init (GIMarshallingTestsPropertiesObject * self)
+{
+}
+
+static void
+gi_marshalling_tests_properties_object_finalize (GObject* obj)
+{
+    G_OBJECT_CLASS (gi_marshalling_tests_properties_object_parent_class)->finalize (obj);
+}
+
+static void
+gi_marshalling_tests_properties_object_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec)
+{
+    GIMarshallingTestsPropertiesObject * self;
+    self = GI_MARSHALLING_TESTS_PROPERTIES_OBJECT (object);
+    switch (property_id) {
+        case SOME_BOOLEAN_PROPERTY:
+            g_value_set_boolean (value, self->some_boolean);
+            break;
+        case SOME_CHAR_PROPERTY:
+            g_value_set_schar (value, self->some_char);
+            break;
+        case SOME_UCHAR_PROPERTY:
+            g_value_set_uchar (value, self->some_uchar);
+            break;
+        case SOME_INT_PROPERTY:
+            g_value_set_int (value, self->some_int);
+            break;
+        case SOME_UINT_PROPERTY:
+            g_value_set_uint (value, self->some_uint);
+            break;
+        case SOME_LONG_PROPERTY:
+            g_value_set_long (value, self->some_long);
+            break;
+        case SOME_ULONG_PROPERTY:
+            g_value_set_ulong (value, self->some_ulong);
+            break;
+        case SOME_INT64_PROPERTY:
+            g_value_set_int64 (value, self->some_int64);
+            break;
+        case SOME_UINT64_PROPERTY:
+            g_value_set_uint64 (value, self->some_uint64);
+            break;
+        case SOME_FLOAT_PROPERTY:
+            g_value_set_float (value, self->some_float);
+            break;
+        case SOME_DOUBLE_PROPERTY:
+            g_value_set_double (value, self->some_double);
+            break;
+        default:
+            G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+            break;
+    }
+}
+
+static void
+gi_marshalling_tests_properties_object_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec)
+{
+    GIMarshallingTestsPropertiesObject * self;
+    self = GI_MARSHALLING_TESTS_PROPERTIES_OBJECT (object);
+    switch (property_id) {
+        case SOME_BOOLEAN_PROPERTY:
+            self->some_boolean = g_value_get_boolean (value);
+            break;
+        case SOME_CHAR_PROPERTY:
+            self->some_char = g_value_get_schar (value);
+            break;
+        case SOME_UCHAR_PROPERTY:
+            self->some_uchar = g_value_get_uchar (value);
+            break;
+        case SOME_INT_PROPERTY:
+            self->some_int = g_value_get_int (value);
+            break;
+        case SOME_UINT_PROPERTY:
+            self->some_uint = g_value_get_uint (value);
+            break;
+        case SOME_LONG_PROPERTY:
+            self->some_long = g_value_get_long (value);
+            break;
+        case SOME_ULONG_PROPERTY:
+            self->some_ulong = g_value_get_ulong (value);
+            break;
+        case SOME_INT64_PROPERTY:
+            self->some_int64 = g_value_get_int64 (value);
+            break;
+        case SOME_UINT64_PROPERTY:
+            self->some_uint64 = g_value_get_uint64 (value);
+            break;
+        case SOME_FLOAT_PROPERTY:
+            self->some_float = g_value_get_float (value);
+            break;
+        case SOME_DOUBLE_PROPERTY:
+            self->some_double = g_value_get_double (value);
+            break;
+        default:
+            G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+            break;
+    }
+}
+
+static void
+gi_marshalling_tests_properties_object_class_init (GIMarshallingTestsPropertiesObjectClass * klass)
+{
+    GObjectClass* object_class = G_OBJECT_CLASS (klass);
+
+    object_class->finalize = gi_marshalling_tests_properties_object_finalize;
+    object_class->get_property = gi_marshalling_tests_properties_object_get_property;
+    object_class->set_property = gi_marshalling_tests_properties_object_set_property;
+
+    g_object_class_install_property (object_class, SOME_BOOLEAN_PROPERTY,
+        g_param_spec_boolean ("some-boolean", "some-boolean", "some-boolean", FALSE,
+            G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
+
+    g_object_class_install_property (object_class, SOME_CHAR_PROPERTY,
+        g_param_spec_char ("some-char", "some-char", "some-char", G_MININT8, G_MAXINT8, 0,
+            G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
+
+    g_object_class_install_property (object_class, SOME_UCHAR_PROPERTY,
+        g_param_spec_uchar ("some-uchar", "some-uchar", "some-uchar", 0, G_MAXUINT8, 0,
+            G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
+
+    g_object_class_install_property (object_class, SOME_INT_PROPERTY,
+        g_param_spec_int ("some-int", "some-int", "some-int", G_MININT, G_MAXINT, 0,
+            G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
+
+    g_object_class_install_property (object_class, SOME_UINT_PROPERTY,
+        g_param_spec_uint ("some-uint", "some-uint", "some-uint", 0, G_MAXUINT, 0,
+            G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
+
+    g_object_class_install_property (object_class, SOME_LONG_PROPERTY,
+        g_param_spec_long ("some-long", "some-long", "some-long", G_MINLONG, G_MAXLONG, 0,
+            G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
+
+    g_object_class_install_property (object_class, SOME_ULONG_PROPERTY,
+        g_param_spec_ulong ("some-ulong", "some-ulong", "some-ulong", 0, G_MAXULONG, 0,
+            G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
+
+    g_object_class_install_property (object_class, SOME_INT64_PROPERTY,
+        g_param_spec_int64 ("some-int64", "some-int64", "some-int64", G_MININT64, G_MAXINT64, 0,
+            G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
+
+    g_object_class_install_property (object_class, SOME_UINT64_PROPERTY,
+        g_param_spec_uint64 ("some-uint64", "some-uint64", "some-uint64", 0, G_MAXUINT64, 0,
+            G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
+
+    g_object_class_install_property (object_class, SOME_FLOAT_PROPERTY,
+        g_param_spec_float ("some-float", "some-float", "some-float", -1 * G_MAXFLOAT, G_MAXFLOAT, 0,
+            G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
+
+    g_object_class_install_property (object_class, SOME_DOUBLE_PROPERTY,
+        g_param_spec_double ("some-double", "some-double", "some-double", -1 * G_MAXDOUBLE, G_MAXDOUBLE, 0,
+            G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
+}
+
+GIMarshallingTestsPropertiesObject*
+gi_marshalling_tests_properties_object_new (void)
+{
+    return g_object_new (GI_MARSHALLING_TESTS_TYPE_PROPERTIES_OBJECT, NULL);
+}
diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h
new file mode 100644 (file)
index 0000000..6fa1b08
--- /dev/null
@@ -0,0 +1,1007 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ */
+
+#include <glib-object.h>
+
+#ifndef __GI_MARSHALLING_TESTS_H__
+#define __GI_MARSHALLING_TESTS_H__
+
+typedef struct _GIMarshallingTestsSimpleStruct GIMarshallingTestsSimpleStruct;
+typedef struct _GIMarshallingTestsBoxedStruct GIMarshallingTestsBoxedStruct;
+
+/* Constants */
+
+#define GI_MARSHALLING_TESTS_CONSTANT_NUMBER 42
+#define GI_MARSHALLING_TESTS_CONSTANT_UTF8   "const \xe2\x99\xa5 utf8"
+
+
+/* Booleans */
+
+gboolean gi_marshalling_tests_boolean_return_true (void);
+gboolean gi_marshalling_tests_boolean_return_false (void);
+
+void gi_marshalling_tests_boolean_in_true (gboolean bool_);
+void gi_marshalling_tests_boolean_in_false (gboolean bool_);
+
+void gi_marshalling_tests_boolean_out_true (gboolean *bool_);
+void gi_marshalling_tests_boolean_out_false (gboolean *bool_);
+
+void gi_marshalling_tests_boolean_inout_true_false (gboolean *bool_);
+void gi_marshalling_tests_boolean_inout_false_true (gboolean *bool_);
+
+
+/* Integers */
+
+gint8 gi_marshalling_tests_int8_return_max (void);
+gint8 gi_marshalling_tests_int8_return_min (void);
+
+void gi_marshalling_tests_int8_in_max (gint8 int8);
+void gi_marshalling_tests_int8_in_min (gint8 int8);
+
+void gi_marshalling_tests_int8_out_max (gint8 *int8);
+void gi_marshalling_tests_int8_out_min (gint8 *int8);
+
+void gi_marshalling_tests_int8_inout_max_min (gint8 *int8);
+void gi_marshalling_tests_int8_inout_min_max (gint8 *int8);
+
+
+guint8 gi_marshalling_tests_uint8_return (void);
+
+void gi_marshalling_tests_uint8_in (guint8 uint8);
+
+void gi_marshalling_tests_uint8_out (guint8 *uint8);
+void gi_marshalling_tests_uint8_inout (guint8 *uint8);
+
+
+gint16 gi_marshalling_tests_int16_return_max (void);
+gint16 gi_marshalling_tests_int16_return_min (void);
+
+void gi_marshalling_tests_int16_in_max (gint16 int16);
+void gi_marshalling_tests_int16_in_min (gint16 int16);
+
+void gi_marshalling_tests_int16_out_max (gint16 *int16);
+void gi_marshalling_tests_int16_out_min (gint16 *int16);
+
+void gi_marshalling_tests_int16_inout_max_min (gint16 *int16);
+void gi_marshalling_tests_int16_inout_min_max (gint16 *int16);
+
+
+guint16 gi_marshalling_tests_uint16_return (void);
+
+void gi_marshalling_tests_uint16_in (guint16 uint16);
+
+void gi_marshalling_tests_uint16_out (guint16 *uint16);
+void gi_marshalling_tests_uint16_inout (guint16 *uint16);
+
+
+gint32 gi_marshalling_tests_int32_return_max (void);
+gint32 gi_marshalling_tests_int32_return_min (void);
+
+void gi_marshalling_tests_int32_in_max (gint32 int32);
+void gi_marshalling_tests_int32_in_min (gint32 int32);
+
+void gi_marshalling_tests_int32_out_max (gint32 *int32);
+void gi_marshalling_tests_int32_out_min (gint32 *int32);
+
+void gi_marshalling_tests_int32_inout_max_min (gint32 *int32);
+void gi_marshalling_tests_int32_inout_min_max (gint32 *int32);
+
+
+guint32 gi_marshalling_tests_uint32_return (void);
+
+void gi_marshalling_tests_uint32_in (guint32 uint32);
+
+void gi_marshalling_tests_uint32_out (guint32 *uint32);
+void gi_marshalling_tests_uint32_inout (guint32 *uint32);
+
+
+gint64 gi_marshalling_tests_int64_return_max (void);
+gint64 gi_marshalling_tests_int64_return_min (void);
+
+void gi_marshalling_tests_int64_in_max (gint64 int64);
+void gi_marshalling_tests_int64_in_min (gint64 int64);
+
+void gi_marshalling_tests_int64_out_max (gint64 *int64);
+void gi_marshalling_tests_int64_out_min (gint64 *int64);
+
+void gi_marshalling_tests_int64_inout_max_min (gint64 *int64);
+void gi_marshalling_tests_int64_inout_min_max (gint64 *int64);
+
+
+guint64 gi_marshalling_tests_uint64_return (void);
+
+void gi_marshalling_tests_uint64_in (guint64 uint64);
+
+void gi_marshalling_tests_uint64_out (guint64 *uint64);
+void gi_marshalling_tests_uint64_inout (guint64 *uint64);
+
+
+gshort gi_marshalling_tests_short_return_max (void);
+gshort gi_marshalling_tests_short_return_min (void);
+
+void gi_marshalling_tests_short_in_max (gshort short_);
+void gi_marshalling_tests_short_in_min (gshort short_);
+
+void gi_marshalling_tests_short_out_max (gshort *short_);
+void gi_marshalling_tests_short_out_min (gshort *short_);
+
+void gi_marshalling_tests_short_inout_max_min (gshort *short_);
+void gi_marshalling_tests_short_inout_min_max (gshort *short_);
+
+
+gushort gi_marshalling_tests_ushort_return (void);
+
+void gi_marshalling_tests_ushort_in (gushort ushort_);
+
+void gi_marshalling_tests_ushort_out (gushort *ushort_);
+void gi_marshalling_tests_ushort_inout (gushort *ushort_);
+
+
+gint gi_marshalling_tests_int_return_max (void);
+gint gi_marshalling_tests_int_return_min (void);
+
+void gi_marshalling_tests_int_in_max (gint int_);
+void gi_marshalling_tests_int_in_min (gint int_);
+
+void gi_marshalling_tests_int_out_max (gint *int_);
+void gi_marshalling_tests_int_out_min (gint *int_);
+
+void gi_marshalling_tests_int_inout_max_min (gint *int_);
+void gi_marshalling_tests_int_inout_min_max (gint *int_);
+
+
+guint gi_marshalling_tests_uint_return (void);
+
+void gi_marshalling_tests_uint_in (guint uint_);
+
+void gi_marshalling_tests_uint_out (guint *uint_);
+void gi_marshalling_tests_uint_inout (guint *uint_);
+
+
+glong gi_marshalling_tests_long_return_max (void);
+glong gi_marshalling_tests_long_return_min (void);
+
+void gi_marshalling_tests_long_in_max (glong long_);
+void gi_marshalling_tests_long_in_min (glong long_);
+
+void gi_marshalling_tests_long_out_max (glong *long_);
+void gi_marshalling_tests_long_out_min (glong *long_);
+
+void gi_marshalling_tests_long_inout_max_min (glong *long_);
+void gi_marshalling_tests_long_inout_min_max (glong *long_);
+
+
+gulong gi_marshalling_tests_ulong_return (void);
+
+void gi_marshalling_tests_ulong_in (gulong ulong_);
+
+void gi_marshalling_tests_ulong_out (gulong *ulong_);
+void gi_marshalling_tests_ulong_inout (gulong *ulong_);
+
+
+gssize gi_marshalling_tests_ssize_return_max (void);
+gssize gi_marshalling_tests_ssize_return_min (void);
+
+void gi_marshalling_tests_ssize_in_max (gssize ssize);
+void gi_marshalling_tests_ssize_in_min (gssize ssize);
+
+void gi_marshalling_tests_ssize_out_max (gssize *ssize);
+void gi_marshalling_tests_ssize_out_min (gssize *ssize);
+
+void gi_marshalling_tests_ssize_inout_max_min (gssize *ssize);
+void gi_marshalling_tests_ssize_inout_min_max (gssize *ssize);
+
+
+gsize gi_marshalling_tests_size_return (void);
+
+void gi_marshalling_tests_size_in (gsize size);
+
+void gi_marshalling_tests_size_out (gsize *size);
+void gi_marshalling_tests_size_inout (gsize *size);
+
+
+/* Floating-point */
+
+gfloat gi_marshalling_tests_float_return (void);
+
+void gi_marshalling_tests_float_in (gfloat float_);
+
+void gi_marshalling_tests_float_out (gfloat *float_);
+
+void gi_marshalling_tests_float_inout (gfloat *float_);
+
+
+gdouble gi_marshalling_tests_double_return (void);
+
+void gi_marshalling_tests_double_in (gdouble double_);
+
+void gi_marshalling_tests_double_out (gdouble *double_);
+
+void gi_marshalling_tests_double_inout (gdouble *double_);
+
+
+/* Timestamps */
+
+time_t gi_marshalling_tests_time_t_return (void);
+
+void gi_marshalling_tests_time_t_in (time_t time_t_);
+
+void gi_marshalling_tests_time_t_out (time_t *time_t_);
+
+void gi_marshalling_tests_time_t_inout (time_t *time_t_);
+
+
+/* GType */
+
+GType gi_marshalling_tests_gtype_return (void);
+
+GType gi_marshalling_tests_gtype_string_return (void);
+
+void gi_marshalling_tests_gtype_in (GType gtype);
+
+void gi_marshalling_tests_gtype_string_in (GType gtype);
+
+void gi_marshalling_tests_gtype_out (GType *gtype);
+
+void gi_marshalling_tests_gtype_string_out (GType *gtype);
+
+void gi_marshalling_tests_gtype_inout (GType *gtype);
+
+
+/* UTF-8 */
+
+const gchar *gi_marshalling_tests_utf8_none_return (void);
+gchar *gi_marshalling_tests_utf8_full_return (void);
+
+void gi_marshalling_tests_utf8_none_in (const gchar *utf8);
+void gi_marshalling_tests_utf8_full_in (gchar *utf8);
+
+void gi_marshalling_tests_utf8_none_out (gchar **utf8);
+void gi_marshalling_tests_utf8_full_out (gchar **utf8);
+
+void gi_marshalling_tests_utf8_dangling_out (gchar **utf8);
+
+void gi_marshalling_tests_utf8_none_inout (gchar **utf8);
+void gi_marshalling_tests_utf8_full_inout (gchar **utf8);
+
+GSList *gi_marshalling_tests_filename_list_return (void);
+
+/* Enum */
+
+typedef enum
+{
+  GI_MARSHALLING_TESTS_ENUM_VALUE1,
+  GI_MARSHALLING_TESTS_ENUM_VALUE2,
+  GI_MARSHALLING_TESTS_ENUM_VALUE3 = 42
+} GIMarshallingTestsEnum;
+
+typedef enum
+{
+  GI_MARSHALLING_TESTS_SECOND_ENUM_SECONDVALUE1,
+  GI_MARSHALLING_TESTS_SECOND_ENUM_SECONDVALUE2,
+} GIMarshallingTestsSecondEnum;
+
+GIMarshallingTestsEnum gi_marshalling_tests_enum_returnv (void);
+
+void gi_marshalling_tests_enum_in (GIMarshallingTestsEnum enum_);
+
+void gi_marshalling_tests_enum_out (GIMarshallingTestsEnum *enum_);
+
+void gi_marshalling_tests_enum_inout (GIMarshallingTestsEnum *enum_);
+
+
+/* GEnum */
+
+typedef enum
+{
+  GI_MARSHALLING_TESTS_GENUM_VALUE1,
+  GI_MARSHALLING_TESTS_GENUM_VALUE2,
+  GI_MARSHALLING_TESTS_GENUM_VALUE3 = 42
+} GIMarshallingTestsGEnum;
+
+GType gi_marshalling_tests_genum_get_type (void) G_GNUC_CONST;
+#define GI_MARSHALLING_TESTS_TYPE_GENUM (gi_marshalling_tests_genum_get_type ())
+
+GIMarshallingTestsEnum gi_marshalling_tests_genum_returnv (void);
+
+void gi_marshalling_tests_genum_in (GIMarshallingTestsGEnum enum_);
+
+void gi_marshalling_tests_genum_out (GIMarshallingTestsGEnum *enum_);
+
+void gi_marshalling_tests_genum_inout (GIMarshallingTestsGEnum *enum_);
+
+
+/* GFlags */
+
+typedef enum
+{
+  GI_MARSHALLING_TESTS_FLAGS_VALUE1 = 1 << 0,
+  GI_MARSHALLING_TESTS_FLAGS_VALUE2 = 1 << 1,
+  GI_MARSHALLING_TESTS_FLAGS_VALUE3 = 1 << 2,
+  GI_MARSHALLING_TESTS_FLAGS_MASK = GI_MARSHALLING_TESTS_FLAGS_VALUE1 |
+                                    GI_MARSHALLING_TESTS_FLAGS_VALUE2,
+  GI_MARSHALLING_TESTS_FLAGS_MASK2 = GI_MARSHALLING_TESTS_FLAGS_MASK
+} GIMarshallingTestsFlags;
+
+GType gi_marshalling_tests_flags_get_type (void) G_GNUC_CONST;
+#define GI_MARSHALLING_TESTS_TYPE_FLAGS (gi_marshalling_tests_flags_get_type ())
+
+GIMarshallingTestsFlags gi_marshalling_tests_flags_returnv (void);
+
+void gi_marshalling_tests_flags_in (GIMarshallingTestsFlags flags_);
+void gi_marshalling_tests_flags_in_zero (GIMarshallingTestsFlags flags);
+
+void gi_marshalling_tests_flags_out (GIMarshallingTestsFlags *flags_);
+
+void gi_marshalling_tests_flags_inout (GIMarshallingTestsFlags *flags_);
+
+/* Flags with no GType */
+
+typedef enum
+{
+  GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE1 = 1 << 0,
+  GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE2 = 1 << 1,
+  GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE3 = 1 << 2,
+  GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_MASK = GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE1 |
+                                            GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE2,
+  GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_MASK2 = GI_MARSHALLING_TESTS_FLAGS_MASK
+} GIMarshallingTestsNoTypeFlags;
+
+GIMarshallingTestsNoTypeFlags gi_marshalling_tests_no_type_flags_returnv (void);
+
+void gi_marshalling_tests_no_type_flags_in (GIMarshallingTestsNoTypeFlags flags_);
+void gi_marshalling_tests_no_type_flags_in_zero (GIMarshallingTestsNoTypeFlags flags);
+
+void gi_marshalling_tests_no_type_flags_out (GIMarshallingTestsNoTypeFlags *flags_);
+
+void gi_marshalling_tests_no_type_flags_inout (GIMarshallingTestsNoTypeFlags *flags_);
+
+/* Arrays */
+
+gboolean gi_marshalling_tests_init_function (gint *n_args, char ***argv);
+
+/* Fixed-size */
+const gint *gi_marshalling_tests_array_fixed_int_return (void);
+const gshort *gi_marshalling_tests_array_fixed_short_return (void);
+
+void gi_marshalling_tests_array_fixed_int_in (const gint *ints);
+void gi_marshalling_tests_array_fixed_short_in (const gshort *shorts);
+
+void gi_marshalling_tests_array_fixed_out (gint **ints);
+
+void gi_marshalling_tests_array_fixed_out_struct (GIMarshallingTestsSimpleStruct **structs);
+
+void gi_marshalling_tests_array_fixed_inout (gint **ints);
+
+/* Variable-size */
+
+const gint *gi_marshalling_tests_array_return (gint *length);
+const gint *gi_marshalling_tests_array_return_etc (gint first, gint *length, gint last, gint *sum);
+
+void gi_marshalling_tests_array_in (const gint *ints, gint length);
+void gi_marshalling_tests_array_in_len_before (gint length, const gint *ints);
+void gi_marshalling_tests_array_in_len_zero_terminated (const gint *ints, gint length);
+void gi_marshalling_tests_array_string_in (const gchar **strings, gint length);
+void gi_marshalling_tests_array_uint8_in (const guint8 *chars, gint length);
+void gi_marshalling_tests_array_struct_in (GIMarshallingTestsBoxedStruct **structs, gint length);
+void gi_marshalling_tests_array_struct_take_in (GIMarshallingTestsBoxedStruct **structs, gint length);
+void gi_marshalling_tests_array_simple_struct_in (GIMarshallingTestsSimpleStruct *structs, gint length);
+void gi_marshalling_tests_multi_array_key_value_in (gint length, const gchar **keys, const GValue *values);
+void gi_marshalling_tests_array_enum_in (GIMarshallingTestsEnum *_enum, gint length);
+void gi_marshalling_tests_array_in_guint64_len (const gint *ints, guint64 length);
+void gi_marshalling_tests_array_in_guint8_len (const gint *ints, guint8 length);
+
+void gi_marshalling_tests_array_out (gint **ints, gint *length);
+void gi_marshalling_tests_array_out_etc (gint first, gint **ints, gint *length, gint last, gint *sum);
+
+void gi_marshalling_tests_array_inout (gint **ints, gint *length);
+void gi_marshalling_tests_array_inout_etc (gint first, gint **ints, gint *length, gint last, gint *sum);
+
+/* Zero-terminated */
+
+gchar **gi_marshalling_tests_array_zero_terminated_return (void);
+gchar **gi_marshalling_tests_array_zero_terminated_return_null (void);
+GIMarshallingTestsBoxedStruct **gi_marshalling_tests_array_zero_terminated_return_struct (void);
+
+void gi_marshalling_tests_array_zero_terminated_in (gchar **utf8s);
+
+void gi_marshalling_tests_array_zero_terminated_out (gchar ***utf8s);
+
+void gi_marshalling_tests_array_zero_terminated_inout (gchar ***utf8s);
+
+GVariant **gi_marshalling_tests_array_gvariant_none_in (GVariant **variants);
+
+GVariant **gi_marshalling_tests_array_gvariant_container_in (GVariant **variants);
+
+GVariant **gi_marshalling_tests_array_gvariant_full_in (GVariant **variants);
+
+
+/* GArray */
+
+GArray *gi_marshalling_tests_garray_int_none_return (void);
+GArray *gi_marshalling_tests_garray_utf8_none_return (void);
+GArray *gi_marshalling_tests_garray_utf8_container_return (void);
+GArray *gi_marshalling_tests_garray_utf8_full_return (void);
+
+void gi_marshalling_tests_garray_int_none_in (GArray *array_);
+void gi_marshalling_tests_garray_utf8_none_in (GArray *array_);
+
+void gi_marshalling_tests_garray_utf8_none_out (GArray **array_);
+void gi_marshalling_tests_garray_utf8_container_out (GArray **array_);
+void gi_marshalling_tests_garray_utf8_full_out (GArray **array_);
+
+void gi_marshalling_tests_garray_utf8_none_inout (GArray **array_);
+void gi_marshalling_tests_garray_utf8_container_inout (GArray **array_);
+void gi_marshalling_tests_garray_utf8_full_inout (GArray **array_);
+
+/* GPtrArray */
+GPtrArray *gi_marshalling_tests_gptrarray_utf8_none_return (void);
+GPtrArray *gi_marshalling_tests_gptrarray_utf8_container_return (void);
+GPtrArray *gi_marshalling_tests_gptrarray_utf8_full_return (void);
+
+void gi_marshalling_tests_gptrarray_utf8_none_in (GPtrArray *parray_);
+
+void gi_marshalling_tests_gptrarray_utf8_none_out (GPtrArray **parray_);
+void gi_marshalling_tests_gptrarray_utf8_container_out (GPtrArray **parray_);
+void gi_marshalling_tests_gptrarray_utf8_full_out (GPtrArray **parray_);
+
+void gi_marshalling_tests_gptrarray_utf8_none_inout (GPtrArray **parray_);
+void gi_marshalling_tests_gptrarray_utf8_container_inout (GPtrArray **parray_);
+void gi_marshalling_tests_gptrarray_utf8_full_inout (GPtrArray **parray_);
+
+/* GByteArray */
+
+GByteArray *gi_marshalling_tests_bytearray_full_return (void);
+void gi_marshalling_tests_bytearray_none_in (GByteArray* array_);
+
+/* GStrv */
+
+GStrv gi_marshalling_tests_gstrv_return (void);
+void gi_marshalling_tests_gstrv_in (GStrv g_strv);
+void gi_marshalling_tests_gstrv_out (GStrv *g_strv);
+void gi_marshalling_tests_gstrv_inout (GStrv *g_strv);
+
+/* GList */
+
+GList *gi_marshalling_tests_glist_int_none_return (void);
+GList *gi_marshalling_tests_glist_utf8_none_return (void);
+GList *gi_marshalling_tests_glist_utf8_container_return (void);
+GList *gi_marshalling_tests_glist_utf8_full_return (void);
+
+void gi_marshalling_tests_glist_int_none_in (GList *list);
+void gi_marshalling_tests_glist_utf8_none_in (GList *list);
+
+void gi_marshalling_tests_glist_utf8_none_out (GList **list);
+void gi_marshalling_tests_glist_utf8_container_out (GList **list);
+void gi_marshalling_tests_glist_utf8_full_out (GList **list);
+
+void gi_marshalling_tests_glist_utf8_none_inout (GList **list);
+void gi_marshalling_tests_glist_utf8_container_inout (GList **list);
+void gi_marshalling_tests_glist_utf8_full_inout (GList **list);
+
+
+/* GSList */
+
+GSList *gi_marshalling_tests_gslist_int_none_return (void);
+GSList *gi_marshalling_tests_gslist_utf8_none_return (void);
+GSList *gi_marshalling_tests_gslist_utf8_container_return (void);
+GSList *gi_marshalling_tests_gslist_utf8_full_return (void);
+
+void gi_marshalling_tests_gslist_int_none_in (GSList *list);
+void gi_marshalling_tests_gslist_utf8_none_in (GSList *list);
+
+void gi_marshalling_tests_gslist_utf8_none_out (GSList **list);
+void gi_marshalling_tests_gslist_utf8_container_out (GSList **list);
+void gi_marshalling_tests_gslist_utf8_full_out (GSList **list);
+
+void gi_marshalling_tests_gslist_utf8_none_inout (GSList **list);
+void gi_marshalling_tests_gslist_utf8_container_inout (GSList **list);
+void gi_marshalling_tests_gslist_utf8_full_inout (GSList **list);
+
+
+/* GHashTable */
+
+GHashTable *gi_marshalling_tests_ghashtable_int_none_return (void);
+GHashTable *gi_marshalling_tests_ghashtable_utf8_none_return (void);
+GHashTable *gi_marshalling_tests_ghashtable_utf8_container_return (void);
+GHashTable *gi_marshalling_tests_ghashtable_utf8_full_return (void);
+
+void gi_marshalling_tests_ghashtable_int_none_in (GHashTable *hash_table);
+void gi_marshalling_tests_ghashtable_utf8_none_in (GHashTable *hash_table);
+void gi_marshalling_tests_ghashtable_utf8_container_in (GHashTable *hash_table);
+void gi_marshalling_tests_ghashtable_utf8_full_in (GHashTable *hash_table);
+
+void gi_marshalling_tests_ghashtable_utf8_none_out (GHashTable **hash_table);
+void gi_marshalling_tests_ghashtable_utf8_container_out (GHashTable **hash_table);
+void gi_marshalling_tests_ghashtable_utf8_full_out (GHashTable **hash_table);
+
+void gi_marshalling_tests_ghashtable_utf8_none_inout (GHashTable **hash_table);
+void gi_marshalling_tests_ghashtable_utf8_container_inout (GHashTable **hash_table);
+void gi_marshalling_tests_ghashtable_utf8_full_inout (GHashTable **hash_table);
+
+
+/* GValue */
+
+GValue *gi_marshalling_tests_gvalue_return (void);
+
+void gi_marshalling_tests_gvalue_in (GValue *value);
+void gi_marshalling_tests_gvalue_in_with_type (GValue *value, GType type);
+
+void gi_marshalling_tests_gvalue_in_enum (GValue *value);
+
+void gi_marshalling_tests_gvalue_out (GValue **value);
+
+void gi_marshalling_tests_gvalue_inout (GValue **value);
+
+void gi_marshalling_tests_gvalue_flat_array (guint         n_values,
+                                             const GValue *values);
+
+GValue *gi_marshalling_tests_return_gvalue_flat_array (void);
+
+GValue *gi_marshalling_tests_gvalue_flat_array_round_trip (const GValue one,
+                                                           const GValue two,
+                                                           const GValue three);
+
+/* GClosure */
+
+void gi_marshalling_tests_gclosure_in (GClosure *closure);
+GClosure *gi_marshalling_tests_gclosure_return (void);
+
+/* Callback return values */
+
+/**
+ * GIMarshallingTestsCallbackReturnValueOnly:
+ */
+typedef glong (* GIMarshallingTestsCallbackReturnValueOnly) ();
+
+glong gi_marshalling_tests_callback_return_value_only (GIMarshallingTestsCallbackReturnValueOnly callback);
+
+/**
+ * GIMarshallingTestsCallbackOneOutParameter:
+ * @a: (out):
+ */
+typedef void (* GIMarshallingTestsCallbackOneOutParameter) (gfloat *a);
+
+void gi_marshalling_tests_callback_one_out_parameter (GIMarshallingTestsCallbackOneOutParameter  callback,
+                                                      gfloat                                    *a);
+
+/**
+ * GIMarshallingTestsCallbackMultipleOutParameters:
+ * @a: (out):
+ * @b: (out):
+ */
+typedef void (* GIMarshallingTestsCallbackMultipleOutParameters) (gfloat *a, gfloat *b);
+
+void gi_marshalling_tests_callback_multiple_out_parameters (GIMarshallingTestsCallbackMultipleOutParameters  callback,
+                                                            gfloat                                          *a,
+                                                            gfloat                                          *b);
+
+/**
+ * GIMarshallingTestsCallbackReturnValueAndOneOutParameter:
+ * @a: (out):
+ */
+typedef glong (* GIMarshallingTestsCallbackReturnValueAndOneOutParameter) (glong *a);
+
+glong gi_marshalling_tests_callback_return_value_and_one_out_parameter (GIMarshallingTestsCallbackReturnValueAndOneOutParameter  callback,
+                                                                        glong                                                   *a);
+
+/**
+ * GIMarshallingTestsCallbackReturnValueAndMultipleOutParameters:
+ * @a: (out):
+ * @b: (out):
+ */
+typedef glong (* GIMarshallingTestsCallbackReturnValueAndMultipleOutParameters) (glong *a, glong *b);
+
+glong gi_marshalling_tests_callback_return_value_and_multiple_out_parameters (GIMarshallingTestsCallbackReturnValueAndMultipleOutParameters  callback,
+                                                                              glong                                                         *a,
+                                                                              glong                                                         *b);
+
+/* Pointer */
+
+gpointer gi_marshalling_tests_pointer_in_return (gpointer pointer);
+
+/* Structure */
+
+struct _GIMarshallingTestsSimpleStruct {
+    glong long_;
+    gint8 int8;
+};
+
+typedef struct {
+    GIMarshallingTestsSimpleStruct simple_struct;
+} GIMarshallingTestsNestedStruct;
+
+typedef struct {
+    GIMarshallingTestsNestedStruct *pointer;
+} GIMarshallingTestsNotSimpleStruct;
+
+
+GIMarshallingTestsSimpleStruct *gi_marshalling_tests_simple_struct_returnv (void);
+
+void gi_marshalling_tests_simple_struct_inv (GIMarshallingTestsSimpleStruct *struct_);
+
+void gi_marshalling_tests_simple_struct_method (GIMarshallingTestsSimpleStruct *struct_);
+
+
+typedef struct {
+    glong long_;
+} GIMarshallingTestsPointerStruct;
+
+GType gi_marshalling_tests_pointer_struct_get_type (void) G_GNUC_CONST;
+
+GIMarshallingTestsPointerStruct *gi_marshalling_tests_pointer_struct_returnv (void);
+
+void gi_marshalling_tests_pointer_struct_inv (GIMarshallingTestsPointerStruct *struct_);
+
+struct _GIMarshallingTestsBoxedStruct {
+    glong long_;
+    GStrv g_strv;
+};
+
+GType gi_marshalling_tests_boxed_struct_get_type (void) G_GNUC_CONST;
+
+GIMarshallingTestsBoxedStruct *gi_marshalling_tests_boxed_struct_new (void);
+
+GIMarshallingTestsBoxedStruct *gi_marshalling_tests_boxed_struct_returnv (void);
+
+void gi_marshalling_tests_boxed_struct_inv (GIMarshallingTestsBoxedStruct *struct_);
+
+void gi_marshalling_tests_boxed_struct_out (GIMarshallingTestsBoxedStruct **struct_);
+
+void gi_marshalling_tests_boxed_struct_inout (GIMarshallingTestsBoxedStruct **struct_);
+
+typedef union {
+    glong long_;
+} GIMarshallingTestsUnion;
+
+GType gi_marshalling_tests_union_get_type (void) G_GNUC_CONST;
+
+GIMarshallingTestsUnion *gi_marshalling_tests_union_returnv (void);
+
+void gi_marshalling_tests_union_inv (GIMarshallingTestsUnion *union_);
+
+void gi_marshalling_tests_union_out (GIMarshallingTestsUnion **union_);
+
+void gi_marshalling_tests_union_inout (GIMarshallingTestsUnion **union_);
+
+void gi_marshalling_tests_union_method (GIMarshallingTestsUnion *union_);
+
+ /* Object */
+
+#define GI_MARSHALLING_TESTS_TYPE_OBJECT             (gi_marshalling_tests_object_get_type ())
+#define GI_MARSHALLING_TESTS_OBJECT(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GI_MARSHALLING_TESTS_TYPE_OBJECT, GIMarshallingTestsObject))
+#define GI_MARSHALLING_TESTS_OBJECT_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GI_MARSHALLING_TESTS_TYPE_OBJECT, GIMarshallingTestsObjectClass))
+#define GI_MARSHALLING_TESTS_IS_OBJECT(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GI_MARSHALLING_TESTS_TYPE_OBJECT))
+#define GI_MARSHALLING_TESTS_IS_OBJECT_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GI_MARSHALLING_TESTS_TYPE_OBJECT))
+#define GI_MARSHALLING_TESTS_OBJECT_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GI_MARSHALLING_TESTS_TYPE_OBJECT, GIMarshallingTestsObjectClass))
+
+typedef struct _GIMarshallingTestsObjectClass GIMarshallingTestsObjectClass;
+typedef struct _GIMarshallingTestsObject GIMarshallingTestsObject;
+
+typedef int (* GIMarshallingTestsCallbackIntInt) (int val, void *user_data);
+
+struct _GIMarshallingTestsObjectClass
+{
+       GObjectClass parent_class;
+
+    /**
+     * GIMarshallingTestsObjectClass::method_int8_in:
+     * @in: (in):
+     */
+    void (* method_int8_in) (GIMarshallingTestsObject *self, gint8 in);
+
+    /**
+     * GIMarshallingTestsObjectClass::method_int8_out:
+     * @out: (out):
+     */
+    void (* method_int8_out) (GIMarshallingTestsObject *self, gint8 *out);
+
+    /**
+     * GIMarshallingTestsObjectClass::method_with_default_implementation:
+     * @in: (in):
+     */
+    void (* method_with_default_implementation) (GIMarshallingTestsObject *self, gint8 in);
+
+    /**
+     * GIMarshallingTestsObjectClass::method_deep_hierarchy:
+     * @in: (in):
+     */
+    void (* method_deep_hierarchy) (GIMarshallingTestsObject *self, gint8 in);
+
+    void (* vfunc_with_callback) (GIMarshallingTestsObject *self,
+                                  GIMarshallingTestsCallbackIntInt callback,
+                                  void *callback_data);
+
+    /**
+     * GIMarshallingTestsObjectClass::vfunc_return_value_only:
+     */
+    glong (* vfunc_return_value_only) (GIMarshallingTestsObject *self);
+
+    /**
+     * GIMarshallingTestsObjectClass::vfunc_one_out_parameter:
+     * @a: (out):
+     */
+    void  (* vfunc_one_out_parameter) (GIMarshallingTestsObject *self, gfloat *a);
+
+    /**
+     * GIMarshallingTestsObjectClass::vfunc_multiple_out_parameters:
+     * @a: (out):
+     * @b: (out):
+     */
+    void  (* vfunc_multiple_out_parameters) (GIMarshallingTestsObject *self, gfloat *a, gfloat *b);
+
+    /**
+     * GIMarshallingTestsObjectClass::vfunc_return_value_and_one_out_parameter:
+     * @a: (out):
+     */
+    glong (* vfunc_return_value_and_one_out_parameter) (GIMarshallingTestsObject *self, glong *a);
+
+    /**
+     * GIMarshallingTestsObjectClass::vfunc_return_value_and_multiple_out_parameters:
+     * @a: (out):
+     * @b: (out):
+     */
+    glong (* vfunc_return_value_and_multiple_out_parameters) (GIMarshallingTestsObject *self, glong *a, glong *b);
+
+    /**
+     * GIMarshallingTestsObjectClass::vfunc_meth_with_err:
+     * @x:
+     * @error: A #GError
+     */
+    gboolean (*vfunc_meth_with_err) (GIMarshallingTestsObject *object, gint x, GError **error);
+};
+
+struct _GIMarshallingTestsObject
+{
+       GObject parent_instance;
+
+    gint int_;
+};
+
+GType gi_marshalling_tests_object_get_type (void) G_GNUC_CONST;
+void gi_marshalling_tests_object_static_method (void);
+void gi_marshalling_tests_object_method (GIMarshallingTestsObject *object);
+void gi_marshalling_tests_object_overridden_method (GIMarshallingTestsObject *object);
+GIMarshallingTestsObject *gi_marshalling_tests_object_new (gint int_);
+
+void gi_marshalling_tests_object_method_array_in (GIMarshallingTestsObject *object, const gint *ints, gint length);
+void gi_marshalling_tests_object_method_array_out (GIMarshallingTestsObject *object, gint **ints, gint *length);
+void gi_marshalling_tests_object_method_array_inout (GIMarshallingTestsObject *object, gint **ints, gint *length);
+const gint *gi_marshalling_tests_object_method_array_return (GIMarshallingTestsObject *object, gint *length);
+
+void gi_marshalling_tests_object_method_int8_in (GIMarshallingTestsObject *object, gint8 in);
+void gi_marshalling_tests_object_method_int8_out (GIMarshallingTestsObject *object, gint8 *out);
+void gi_marshalling_tests_object_method_with_default_implementation (GIMarshallingTestsObject *object, gint8 in);
+
+glong gi_marshalling_tests_object_vfunc_return_value_only (GIMarshallingTestsObject *self);
+void gi_marshalling_tests_object_vfunc_one_out_parameter (GIMarshallingTestsObject *self, gfloat *a);
+void gi_marshalling_tests_object_vfunc_multiple_out_parameters (GIMarshallingTestsObject *self, gfloat *a, gfloat *b);
+glong gi_marshalling_tests_object_vfunc_return_value_and_one_out_parameter (GIMarshallingTestsObject *self, glong *a);
+glong gi_marshalling_tests_object_vfunc_return_value_and_multiple_out_parameters (GIMarshallingTestsObject *self, glong *a, glong *b);
+gboolean gi_marshalling_tests_object_vfunc_meth_with_error (GIMarshallingTestsObject *object, gint x, GError **error);
+
+GIMarshallingTestsObject *gi_marshalling_tests_object_none_return (void);
+GIMarshallingTestsObject *gi_marshalling_tests_object_full_return (void);
+
+void gi_marshalling_tests_object_none_in (GIMarshallingTestsObject *object);
+void gi_marshalling_tests_object_full_in (GIMarshallingTestsObject *object);
+
+void gi_marshalling_tests_object_none_out (GIMarshallingTestsObject **object);
+void gi_marshalling_tests_object_full_out (GIMarshallingTestsObject **object);
+
+void gi_marshalling_tests_object_none_inout (GIMarshallingTestsObject **object);
+void gi_marshalling_tests_object_full_inout (GIMarshallingTestsObject **object);
+void gi_marshalling_tests_object_inout_same (GIMarshallingTestsObject **object);
+
+void gi_marshalling_tests_object_int8_in (GIMarshallingTestsObject *object, gint8 in);
+void gi_marshalling_tests_object_int8_out (GIMarshallingTestsObject *object, gint8 *out);
+
+void gi_marshalling_tests_object_vfunc_with_callback (GIMarshallingTestsObject *object,
+                                                      GIMarshallingTestsCallbackIntInt callback,
+                                                      void *callback_data);
+void gi_marshalling_tests_object_call_vfunc_with_callback (GIMarshallingTestsObject *object);
+
+#define GI_MARSHALLING_TESTS_TYPE_SUB_OBJECT             (gi_marshalling_tests_sub_object_get_type ())
+#define GI_MARSHALLING_TESTS_SUB_OBJECT(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GI_MARSHALLING_TESTS_TYPE_SUB_OBJECT, GIMarshallingTestsSubObject))
+#define GI_MARSHALLING_TESTS_SUB_OBJECT_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GI_MARSHALLING_TESTS_TYPE_SUB_OBJECT, GIMarshallingTestsSubObjectClass))
+#define GI_MARSHALLING_TESTS_IS_SUB_OBJECT(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GI_MARSHALLING_TESTS_TYPE_SUB_OBJECT))
+#define GI_MARSHALLING_TESTS_IS_SUB_OBJECT_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GI_MARSHALLING_TESTS_TYPE_SUB_OBJECT))
+#define GI_MARSHALLING_TESTS_SUB_OBJECT_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GI_MARSHALLING_TESTS_TYPE_SUB_OBJECT, GIMarshallingTestsSubObjectClass))
+
+typedef struct _GIMarshallingTestsSubObjectClass GIMarshallingTestsSubObjectClass;
+typedef struct _GIMarshallingTestsSubObject GIMarshallingTestsSubObject;
+
+struct _GIMarshallingTestsSubObjectClass
+{
+       GIMarshallingTestsObjectClass parent_class;
+};
+
+struct _GIMarshallingTestsSubObject
+{
+       GIMarshallingTestsObject parent_instance;
+};
+
+GType gi_marshalling_tests_sub_object_get_type (void) G_GNUC_CONST;
+
+void gi_marshalling_tests_sub_object_sub_method (GIMarshallingTestsSubObject *object);
+void gi_marshalling_tests_sub_object_overwritten_method (GIMarshallingTestsSubObject *object);
+
+#define GI_MARSHALLING_TESTS_TYPE_SUB_SUB_OBJECT             (gi_marshalling_tests_sub_sub_object_get_type ())
+#define GI_MARSHALLING_TESTS_SUB_SUB_OBJECT(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GI_MARSHALLING_TESTS_TYPE_SUB_SUB_OBJECT, GIMarshallingTestsSubSubObject))
+#define GI_MARSHALLING_TESTS_SUB_SUB_OBJECT_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GI_MARSHALLING_TESTS_TYPE_SUB_SUB_OBJECT, GIMarshallingTestsSubSubObjectClass))
+#define GI_MARSHALLING_TESTS_IS_SUB_SUB_OBJECT(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GI_MARSHALLING_TESTS_TYPE_SUB_SUB_OBJECT))
+#define GI_MARSHALLING_TESTS_IS_SUB_SUB_OBJECT_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GI_MARSHALLING_TESTS_TYPE_SUB_SUB_OBJECT))
+#define GI_MARSHALLING_TESTS_SUB_SUB_OBJECT_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GI_MARSHALLING_TESTS_TYPE_SUB_SUB_OBJECT, GIMarshallingTestsSubSubObjectClass))
+
+typedef struct _GIMarshallingTestsSubSubObjectClass GIMarshallingTestsSubSubObjectClass;
+typedef struct _GIMarshallingTestsSubSubObject GIMarshallingTestsSubSubObject;
+
+struct _GIMarshallingTestsSubSubObjectClass
+{
+       GIMarshallingTestsSubObjectClass parent_class;
+};
+
+struct _GIMarshallingTestsSubSubObject
+{
+       GIMarshallingTestsSubObject parent_instance;
+};
+
+GType gi_marshalling_tests_sub_sub_object_get_type (void) G_GNUC_CONST;
+
+/* Interfaces */
+
+#define GI_MARSHALLING_TESTS_TYPE_INTERFACE              (gi_marshalling_tests_interface_get_type ())
+#define GI_MARSHALLING_TESTS_INTERFACE(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GI_MARSHALLING_TESTS_TYPE_INTERFACE, GIMarshallingTestsInterface))
+#define GI_MARSHALLING_TESTS_IS_INTERFACE(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GI_MARSHALLING_TESTS_TYPE_INTERFACE))
+#define GI_MARSHALLING_TESTS_INTERFACE_GET_IFACE(obj)    (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GI_MARSHALLING_TESTS_TYPE_INTERFACE, GIMarshallingTestsInterfaceIface))
+
+typedef struct _GIMarshallingTestsInterface GIMarshallingTestsInterface;
+typedef struct _GIMarshallingTestsInterfaceIface GIMarshallingTestsInterfaceIface;
+
+struct _GIMarshallingTestsInterfaceIface {
+    GTypeInterface base_iface;
+
+    /**
+     * GIMarshallingTestsInterfaceIface::test_int8_in:
+     * @in: (in):
+     */
+    void (* test_int8_in) (GIMarshallingTestsInterface *self, gint8 in);
+};
+
+GType gi_marshalling_tests_interface_get_type (void) G_GNUC_CONST;
+
+void gi_marshalling_tests_interface_test_int8_in (GIMarshallingTestsInterface *self, gint8 in);
+
+void gi_marshalling_tests_test_interface_test_int8_in (GIMarshallingTestsInterface *test_iface, gint8 in);
+
+/* GIMarshallingTestsInterface2 allows us testing vfunc clashes when a class'
+   vfunc implementation ambiguously relates to its prototype */
+
+#define GI_MARSHALLING_TESTS_TYPE_INTERFACE2              (gi_marshalling_tests_interface2_get_type ())
+#define GI_MARSHALLING_TESTS_INTERFACE2(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GI_MARSHALLING_TESTS_TYPE_INTERFACE2, GIMarshallingTestsInterface2))
+#define GI_MARSHALLING_TESTS_IS_INTERFACE2(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GI_MARSHALLING_TESTS_TYPE_INTERFACE2))
+#define GI_MARSHALLING_TESTS_INTERFACE2_GET_IFACE(obj)    (G_TYPE_INSTANCE_GET_INTERFACE2 ((obj), GI_MARSHALLING_TESTS_TYPE_INTERFACE2, GIMarshallingTestsInterface2Iface))
+
+typedef struct _GIMarshallingTestsInterface2 GIMarshallingTestsInterface2;
+typedef struct _GIMarshallingTestsInterface2Iface GIMarshallingTestsInterface2Iface;
+
+struct _GIMarshallingTestsInterface2Iface {
+    GTypeInterface base_iface;
+
+    /**
+     * GIMarshallingTestsInterface2Iface::test_int8_in:
+     * @in: (in):
+     */
+    void (* test_int8_in) (GIMarshallingTestsInterface2 *self, gint8 in);
+};
+
+GType gi_marshalling_tests_interface2_get_type (void) G_GNUC_CONST;
+
+
+/* Multiple output arguments */
+
+void gi_marshalling_tests_int_out_out (gint *int0, gint *int1);
+void gi_marshalling_tests_int_three_in_three_out(gint a, gint b, gint c,
+                                                 gint *out0, gint *out1, gint *out2);
+gint gi_marshalling_tests_int_return_out (gint *int_);
+
+
+/* GError */
+
+#define GI_MARSHALLING_TESTS_CONSTANT_GERROR_DOMAIN "gi-marshalling-tests-gerror-domain"
+#define GI_MARSHALLING_TESTS_CONSTANT_GERROR_CODE 5
+#define GI_MARSHALLING_TESTS_CONSTANT_GERROR_MESSAGE "gi-marshalling-tests-gerror-message"
+#define GI_MARSHALLING_TESTS_CONSTANT_GERROR_DEBUG_MESSAGE "we got an error, life is shit"
+
+void gi_marshalling_tests_gerror(GError **error);
+void gi_marshalling_tests_gerror_array_in(gint *in_ints, GError **error);
+void gi_marshalling_tests_gerror_out(GError **error, gchar **debug);
+void gi_marshalling_tests_gerror_out_transfer_none(GError **err, const gchar **debug);
+GError *gi_marshalling_tests_gerror_return(void);
+
+/* Overrides */
+
+#define GI_MARSHALLING_TESTS_OVERRIDES_CONSTANT 42
+
+
+typedef struct {
+    glong long_;
+} GIMarshallingTestsOverridesStruct;
+
+GType gi_marshalling_tests_overrides_struct_get_type (void) G_GNUC_CONST;
+
+GIMarshallingTestsOverridesStruct *gi_marshalling_tests_overrides_struct_new (void);
+
+glong gi_marshalling_tests_overrides_struct_method (GIMarshallingTestsOverridesStruct *struct_);
+
+GIMarshallingTestsOverridesStruct *gi_marshalling_tests_overrides_struct_returnv (void);
+
+
+#define GI_MARSHALLING_TESTS_TYPE_OVERRIDES_OBJECT             (gi_marshalling_tests_overrides_object_get_type ())
+#define GI_MARSHALLING_TESTS_OVERRIDES_OBJECT(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GI_MARSHALLING_TESTS_TYPE_OVERRIDES_OBJECT, GIMarshallingTestsOverridesObject))
+#define GI_MARSHALLING_TESTS_OVERRIDES_OBJECT_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GI_MARSHALLING_TESTS_TYPE_OVERRIDES_OBJECT, GIMarshallingTestsOverridesObjectClass))
+#define GI_MARSHALLING_TESTS_IS_OVERRIDES_OBJECT(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GI_MARSHALLING_TESTS_TYPE_OVERRIDES_OBJECT))
+#define GI_MARSHALLING_TESTS_IS_OVERRIDES_OBJECT_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GI_MARSHALLING_TESTS_TYPE_OVERRIDES_OBJECT))
+#define GI_MARSHALLING_TESTS_OVERRIDES_OBJECT_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GI_MARSHALLING_TESTS_TYPE_OVERRIDES_OBJECT, GIMarshallingTestsOverridesObjectClass))
+
+typedef struct _GIMarshallingTestsOverridesObjectClass GIMarshallingTestsOverridesObjectClass;
+typedef struct _GIMarshallingTestsOverridesObject GIMarshallingTestsOverridesObject;
+
+struct _GIMarshallingTestsOverridesObjectClass
+{
+    GObjectClass parent_class;
+};
+
+struct _GIMarshallingTestsOverridesObject
+{
+    GObject parent_instance;
+
+    glong long_;
+};
+
+GType gi_marshalling_tests_overrides_object_get_type (void) G_GNUC_CONST;
+
+GIMarshallingTestsOverridesObject *gi_marshalling_tests_overrides_object_new (void);
+
+glong gi_marshalling_tests_overrides_object_method (GIMarshallingTestsOverridesObject *object);
+
+GIMarshallingTestsOverridesObject *gi_marshalling_tests_overrides_object_returnv (void);
+
+/* Properties Object */
+
+#define GI_MARSHALLING_TESTS_TYPE_PROPERTIES_OBJECT (gi_marshalling_tests_properties_object_get_type ())
+#define GI_MARSHALLING_TESTS_PROPERTIES_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GI_MARSHALLING_TESTS_TYPE_PROPERTIES_OBJECT, GIMarshallingTestsPropertiesObject))
+#define GI_MARSHALLING_TESTS_PROPERTIES_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GI_MARSHALLING_TESTS_TYPE_PROPERTIES_OBJECT, GIMarshallingTestsPropertiesObjectClass))
+#define GI_MARSHALLING_TESTS_IS_PROPERTIES_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GI_MARSHALLING_TESTS_TYPE_PROPERTIES_OBJECT))
+#define GI_MARSHALLING_TESTS_IS_PROPERTIES_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GI_MARSHALLING_TESTS_TYPE_PROPERTIES_OBJECT))
+#define GI_MARSHALLING_TESTS_PROPERTIES_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GI_MARSHALLING_TESTS_TYPE_PROPERTIES_OBJECT, GIMarshallingTestsPropertiesObjectClass))
+
+typedef struct _GIMarshallingTestsPropertiesObject GIMarshallingTestsPropertiesObject;
+typedef struct _GIMarshallingTestsPropertiesObjectClass GIMarshallingTestsPropertiesObjectClass;
+
+struct _GIMarshallingTestsPropertiesObject {
+    GObject parent_instance;
+
+    gboolean some_boolean;
+    gchar some_char;
+    guchar some_uchar;
+    gint some_int;
+    guint some_uint;
+    glong some_long;
+    gulong some_ulong;
+    gint64 some_int64;
+    guint64 some_uint64;
+    gfloat some_float;
+    gdouble some_double;
+};
+
+struct _GIMarshallingTestsPropertiesObjectClass {
+    GObjectClass parent_class;
+};
+
+GType gi_marshalling_tests_properties_object_get_type (void) G_GNUC_CONST;
+
+GIMarshallingTestsPropertiesObject *gi_marshalling_tests_properties_object_new (void);
+
+#endif /* _GI_MARSHALLING_TESTS_H_ */
diff --git a/tests/offsets/Makefile.am b/tests/offsets/Makefile.am
new file mode 100644 (file)
index 0000000..4f03830
--- /dev/null
@@ -0,0 +1,54 @@
+include $(top_srcdir)/common.mk
+include $(top_srcdir)/Makefile.introspection
+
+BUILT_SOURCES =
+CLEANFILES =
+EXTRA_DIST =
+INTROSPECTION_GIRS =
+
+check_LTLIBRARIES =
+check_PROGRAMS =
+
+############################################################
+
+check_LTLIBRARIES += liboffsets.la
+
+liboffsets_la_SOURCES = \
+       offsets.h       \
+       offsets.c
+liboffsets_la_CPPFLAGS = $(GIREPO_CFLAGS)
+# dummy rpath to get built dynamically (huh?)
+liboffsets_la_LDFLAGS = -avoid-version -rpath $(libdir)
+
+Offsets-1.0.gir: liboffsets.la offsets.h
+Offsets_1_0_gir_INCLUDES = GObject-2.0
+Offsets_1_0_gir_LIBS = liboffsets.la
+Offsets_1_0_gir_PACKAGES = gobject-2.0
+Offsets_1_0_gir_FILES = $(srcdir)/offsets.h $(srcdir)/offsets.c
+Offsets_1_0_gir_SCANNERFLAGS = --warn-all --warn-error
+INTROSPECTION_GIRS += Offsets-1.0.gir
+
+CLEANFILES += Offsets-1.0.gir Offsets-1.0.typelib
+
+############################################################
+
+check_PROGRAMS += gitestoffsets
+
+nodist_gitestoffsets_SOURCES = gitestoffsets.c
+gitestoffsets_CPPFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
+gitestoffsets_LDADD = $(top_builddir)/libgirepository-1.0.la $(GIREPO_LIBS)
+
+gitestoffsets.c: gen-gitestoffsets offsets.h
+       $(AM_V_GEN) $(PYTHON) $(srcdir)/gen-gitestoffsets $(srcdir)/offsets.h > $@ || ( rm -f $@ && false )
+
+EXTRA_DIST += gen-gitestoffsets
+BUILT_SOURCES += gitestoffsets.c
+CLEANFILES += gitestoffsets.c
+
+############################################################
+
+check-local: Offsets-1.0.typelib
+       GI_TYPELIB_PATH=:$(top_builddir) ./gitestoffsets$(EXEEXT) offsets.compiled offsets.introspected
+       diff -u offsets.compiled offsets.introspected
+
+CLEANFILES += offsets.compiled offsets.introspected
diff --git a/tests/offsets/Makefile.in b/tests/offsets/Makefile.in
new file mode 100644 (file)
index 0000000..0e0d58c
--- /dev/null
@@ -0,0 +1,837 @@
+# 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@
+
+# -*- Mode: make -*-
+# Copyright 2009-2010 Johan Dahlin
+#
+# This file defines variables that are compatible with
+# Makefile.introspection, but for use within the gobject-introspection
+# module itself.
+#
+
+# -*- Mode: make -*-
+# Copyright 2009-2010 Johan Dahlin
+#
+# This file is free software; the author(s) gives unlimited
+# permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# * Input variables:
+#
+#   INTROSPECTION_GIRS - List of GIRS that should be generated
+#   INTROSPECTION_SCANNER - Command to invoke scanner, normally set by
+#      GOBJECT_INTROSPECTION_REQUIRE/CHECK() in introspection.m4
+#   INTROSPECTION_SCANNER_ARGS - Additional args to pass in to the scanner
+#   INTROSPECTION_SCANNER_ENV - Environment variables to set before running
+#      the scanner
+#   INTROSPECTION_COMPILER - Command to invoke compiler, normally set by
+#      GOBJECT_INTROSPECTION_REQUIRE/CHECK() in introspection.m4
+#   INTROSPECTION_COMPILER_ARGS - Additional args to pass in to the compiler
+#
+# * Simple tutorial
+#
+# Add this to configure.ac:
+#   -Wno-portability to AM_INIT_AUTOMAKE
+#   GOBJECT_INTROSPECTION_CHECK([0.6.7])
+#
+# Add this to Makefile.am where your library/program is built:
+#   include $(INTROSPECTION_MAKEFILE)
+#   INTROSPECTION_GIRS = YourLib-1.0.gir
+#   YourLib_1_0_gir_NAMESPACE = YourLib
+#   YourLib_1_0_gir_VERSION = 1.0
+#   YourLib_1_0_gir_LIBS = libyourlib.la
+#   YourLib_1_0_gir_FILES = $(libyourlib_1_0_SOURCES)
+#   girdir = $(datadir)/gir-1.0
+#   dist_gir_DATA = YourLib-1.0.gir
+#   typelibdir = $(libdir)/girepository-1.0
+#   typelib_DATA = YourLib-1.0.typelib
+#   CLEANFILES = $(dist_gir_DATA) $(typelib_DATA)
+#
+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@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+       $(top_srcdir)/Makefile.introspection $(top_srcdir)/common.mk
+check_PROGRAMS = gitestoffsets$(EXEEXT)
+subdir = tests/offsets
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.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)/acinclude.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 =
+liboffsets_la_LIBADD =
+am_liboffsets_la_OBJECTS = liboffsets_la-offsets.lo
+liboffsets_la_OBJECTS = $(am_liboffsets_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+liboffsets_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(liboffsets_la_LDFLAGS) $(LDFLAGS) -o $@
+nodist_gitestoffsets_OBJECTS = gitestoffsets-gitestoffsets.$(OBJEXT)
+gitestoffsets_OBJECTS = $(nodist_gitestoffsets_OBJECTS)
+am__DEPENDENCIES_1 =
+gitestoffsets_DEPENDENCIES = $(top_builddir)/libgirepository-1.0.la \
+       $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/build-aux/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 = $(liboffsets_la_SOURCES) $(nodist_gitestoffsets_SOURCES)
+DIST_SOURCES = $(liboffsets_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_GIR_PACKAGE = @CAIRO_GIR_PACKAGE@
+CAIRO_GOBJECT_CFLAGS = @CAIRO_GOBJECT_CFLAGS@
+CAIRO_GOBJECT_LIBS = @CAIRO_GOBJECT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CAIRO_SHARED_LIBRARY = @CAIRO_SHARED_LIBRARY@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+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@
+EXPANDED_BINDIR = @EXPANDED_BINDIR@
+EXPANDED_DATADIR = @EXPANDED_DATADIR@
+EXPANDED_LIBDIR = @EXPANDED_LIBDIR@
+EXPANDED_LIBEXECDIR = @EXPANDED_LIBEXECDIR@
+EXPANDED_LOCALSTATEDIR = @EXPANDED_LOCALSTATEDIR@
+EXPANDED_SYSCONFDIR = @EXPANDED_SYSCONFDIR@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FFI_PC_CFLAGS = @FFI_PC_CFLAGS@
+FFI_PC_LIBS = @FFI_PC_LIBS@
+FFI_PC_PACKAGES = @FFI_PC_PACKAGES@
+FGREP = @FGREP@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
+GIREPO_CFLAGS = @GIREPO_CFLAGS@
+GIREPO_LIBS = @GIREPO_LIBS@
+GIR_DIR = @GIR_DIR@
+GIR_SUFFIX = @GIR_SUFFIX@
+GLIBSRC = @GLIBSRC@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMODULE_CFLAGS = @GMODULE_CFLAGS@
+GMODULE_LIBS = @GMODULE_LIBS@
+GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
+GOBJECT_INTROSPECTION_LIBDIR = @GOBJECT_INTROSPECTION_LIBDIR@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
+GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
+GTKDOC_MKPDF = @GTKDOC_MKPDF@
+GTKDOC_REBASE = @GTKDOC_REBASE@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+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@
+POW_LIB = @POW_LIB@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_LIB_LOC = @PYTHON_LIB_LOC@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SCANNER_CFLAGS = @SCANNER_CFLAGS@
+SCANNER_LIBS = @SCANNER_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+YACC = @YACC@
+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@
+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@
+INTROSPECTION_SCANNER = \
+    env PATH=.libs:$(PATH) \
+        LPATH=.libs \
+        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
+        UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
+        $(top_builddir)/g-ir-scanner
+
+INTROSPECTION_SCANNER_ARGS = \
+    --verbose \
+    -I$(top_srcdir) \
+    --add-include-path=$(srcdir) \
+    --add-include-path=$(top_srcdir)/gir \
+    --add-include-path=$(builddir) \
+    --add-include-path=$(top_builddir)
+
+INTROSPECTION_COMPILER = \
+    env PATH=.libs:$(PATH) \
+        $(top_builddir)/g-ir-compiler$(EXEEXT)
+
+INTROSPECTION_COMPILER_ARGS = \
+    --includedir=$(srcdir) \
+    --includedir=$(top_srcdir)/gir \
+    --includedir=$(builddir) \
+    --includedir=$(top_builddir)
+
+INTROSPECTION_DOCTOOL = \
+    env PATH=.libs:$(PATH) \
+        LPATH=.libs \
+        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
+        UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
+        $(top_builddir)/g-ir-doc-tool
+
+
+# Private functions
+_gir_name = $(subst /,_,$(subst -,_,$(subst .,_,$(1))))
+
+# Namespace and Version is either fetched from the gir filename
+# or the _NAMESPACE/_VERSION variable combo
+_gir_namespace = $(or $($(_gir_name)_NAMESPACE),$(firstword $(subst -, ,$(notdir $(1)))))
+_gir_version = $(or $($(_gir_name)_VERSION),$(lastword $(subst -, ,$(1:.gir=))))
+
+# _PROGRAM is an optional variable which needs it's own --program argument
+_gir_program = $(if $($(_gir_name)_PROGRAM),--program=$($(_gir_name)_PROGRAM))
+
+# Variables which provides a list of things
+_gir_libraries = $(foreach lib,$($(_gir_name)_LIBS),--library=$(lib))
+_gir_packages = $(foreach pkg,$($(_gir_name)_PACKAGES),--pkg=$(pkg))
+_gir_includes = $(foreach include,$($(_gir_name)_INCLUDES),--include=$(include))
+_gir_export_packages = $(foreach pkg,$($(_gir_name)_EXPORT_PACKAGES),--pkg-export=$(pkg))
+
+# Reuse the LIBTOOL variable from automake if it's set, but
+# work around MSYS weirdness: When running g-ir-scanner, MSYS changes
+# a command-line argument --libtool="/bin/sh ../../libtool" into
+# --libtool=c:/opt/msys/1.0/bin/libtool. So just use sh.exe without path
+# because we already "know" where the libtool configure produced is.
+_gir_libtool = $(if $(findstring MINGW32,$(shell uname -s)),--libtool="$(top_builddir)/libtool",$(if $(LIBTOOL),--libtool="$(LIBTOOL)"))
+
+# Macros for AM_SILENT_RULES prettiness
+_gir_verbosity = $(if $(AM_DEFAULT_VERBOSITY),$(AM_DEFAULT_VERBOSITY),1)
+_gir_silent_scanner_prefix = $(_gir_silent_scanner_prefix_$(V))
+_gir_silent_scanner_prefix_ = $(_gir_silent_scanner_prefix_$(_gir_verbosity))
+_gir_silent_scanner_prefix_0 = @echo "  GISCAN $(1)";
+_gir_silent_scanner_opts = $(_gir_silent_scanner_opts_$(V))
+_gir_silent_scanner_opts_ = $(_gir_silent_scanner_opts_$(_gir_verbosity))
+_gir_silent_scanner_opts_0 = --quiet
+_gir_silent_compiler = $(_gir_silent_compiler_$(V))
+_gir_silent_compiler_ = $(_gir_silent_compiler_$(_gir_verbosity))
+_gir_silent_compiler_0 = @echo "  GICOMP $(1)";
+BUILT_SOURCES = gitestoffsets.c
+CLEANFILES = Offsets-1.0.gir Offsets-1.0.typelib gitestoffsets.c \
+       offsets.compiled offsets.introspected
+EXTRA_DIST = gen-gitestoffsets
+INTROSPECTION_GIRS = Offsets-1.0.gir
+
+############################################################
+check_LTLIBRARIES = liboffsets.la
+liboffsets_la_SOURCES = \
+       offsets.h       \
+       offsets.c
+
+liboffsets_la_CPPFLAGS = $(GIREPO_CFLAGS)
+# dummy rpath to get built dynamically (huh?)
+liboffsets_la_LDFLAGS = -avoid-version -rpath $(libdir)
+Offsets_1_0_gir_INCLUDES = GObject-2.0
+Offsets_1_0_gir_LIBS = liboffsets.la
+Offsets_1_0_gir_PACKAGES = gobject-2.0
+Offsets_1_0_gir_FILES = $(srcdir)/offsets.h $(srcdir)/offsets.c
+Offsets_1_0_gir_SCANNERFLAGS = --warn-all --warn-error
+nodist_gitestoffsets_SOURCES = gitestoffsets.c
+gitestoffsets_CPPFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
+gitestoffsets_LDADD = $(top_builddir)/libgirepository-1.0.la $(GIREPO_LIBS)
+all: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/common.mk $(top_srcdir)/Makefile.introspection $(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/offsets/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign tests/offsets/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-checkLTLIBRARIES:
+       -test -z "$(check_LTLIBRARIES)" || rm -f $(check_LTLIBRARIES)
+       @list='$(check_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
+liboffsets.la: $(liboffsets_la_OBJECTS) $(liboffsets_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(liboffsets_la_LINK)  $(liboffsets_la_OBJECTS) $(liboffsets_la_LIBADD) $(LIBS)
+
+clean-checkPROGRAMS:
+       @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+       echo " rm -f" $$list; \
+       rm -f $$list || exit $$?; \
+       test -n "$(EXEEXT)" || exit 0; \
+       list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+       echo " rm -f" $$list; \
+       rm -f $$list
+gitestoffsets$(EXEEXT): $(gitestoffsets_OBJECTS) $(gitestoffsets_DEPENDENCIES) 
+       @rm -f gitestoffsets$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(gitestoffsets_OBJECTS) $(gitestoffsets_LDADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gitestoffsets-gitestoffsets.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liboffsets_la-offsets.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 $@ $<
+
+liboffsets_la-offsets.lo: offsets.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liboffsets_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liboffsets_la-offsets.lo -MD -MP -MF $(DEPDIR)/liboffsets_la-offsets.Tpo -c -o liboffsets_la-offsets.lo `test -f 'offsets.c' || echo '$(srcdir)/'`offsets.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/liboffsets_la-offsets.Tpo $(DEPDIR)/liboffsets_la-offsets.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='offsets.c' object='liboffsets_la-offsets.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) $(liboffsets_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liboffsets_la-offsets.lo `test -f 'offsets.c' || echo '$(srcdir)/'`offsets.c
+
+gitestoffsets-gitestoffsets.o: gitestoffsets.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gitestoffsets_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gitestoffsets-gitestoffsets.o -MD -MP -MF $(DEPDIR)/gitestoffsets-gitestoffsets.Tpo -c -o gitestoffsets-gitestoffsets.o `test -f 'gitestoffsets.c' || echo '$(srcdir)/'`gitestoffsets.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/gitestoffsets-gitestoffsets.Tpo $(DEPDIR)/gitestoffsets-gitestoffsets.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='gitestoffsets.c' object='gitestoffsets-gitestoffsets.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gitestoffsets_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gitestoffsets-gitestoffsets.o `test -f 'gitestoffsets.c' || echo '$(srcdir)/'`gitestoffsets.c
+
+gitestoffsets-gitestoffsets.obj: gitestoffsets.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gitestoffsets_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gitestoffsets-gitestoffsets.obj -MD -MP -MF $(DEPDIR)/gitestoffsets-gitestoffsets.Tpo -c -o gitestoffsets-gitestoffsets.obj `if test -f 'gitestoffsets.c'; then $(CYGPATH_W) 'gitestoffsets.c'; else $(CYGPATH_W) '$(srcdir)/gitestoffsets.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/gitestoffsets-gitestoffsets.Tpo $(DEPDIR)/gitestoffsets-gitestoffsets.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='gitestoffsets.c' object='gitestoffsets-gitestoffsets.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gitestoffsets_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gitestoffsets-gitestoffsets.obj `if test -f 'gitestoffsets.c'; then $(CYGPATH_W) 'gitestoffsets.c'; else $(CYGPATH_W) '$(srcdir)/gitestoffsets.c'; fi`
+
+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_LTLIBRARIES) $(check_PROGRAMS)
+       $(MAKE) $(AM_MAKEFLAGS) check-local
+check: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile
+installdirs:
+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-checkLTLIBRARIES clean-checkPROGRAMS clean-generic \
+       clean-libtool 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: all check check-am install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am check-local clean \
+       clean-checkLTLIBRARIES clean-checkPROGRAMS clean-generic \
+       clean-libtool 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
+
+
+# Make sure the required variables are set, these should under normal
+# circumstances come from introspection.m4
+$(if $(INTROSPECTION_SCANNER),,$(error Need to define INTROSPECTION_SCANNER))
+$(if $(INTROSPECTION_COMPILER),,$(error Need to define INTROSPECTION_COMPILER))
+
+#
+# Creates a GIR by scanning C headers/sources
+# $(1) - Name of the gir file (output)
+#
+# If output is Gtk-2.0.gir then you should name the variables like
+# Gtk_2_0_gir_NAMESPACE, Gtk_2_0_gir_VERSION etc.
+# Required variables:
+# FILES - C sources and headers which should be scanned
+#
+# One of these variables are required:
+# LIBS - Library where the symbol represented in the gir can be found
+# PROGRAM - Program where the symbol represented in the gir can be found
+#
+# Optional variables
+# NAMESPACE - Namespace of the gir, first letter capital,
+#   rest should be lower case, for instance: 'Gtk', 'Clutter', 'ClutterGtk'.
+#   If not present the namespace will be fetched from the gir filename,
+#   the part before the first dash. For 'Gtk-2.0', namespace will be 'Gtk'.
+# VERSION - Version of the gir, if not present, will be fetched from gir
+# filename, the part after the first dash. For 'Gtk-2.0', version will be '2.0'.
+# LIBTOOL - Command to invoke libtool, usually set by automake
+# SCANNERFLAGS - Flags to pass in to the scanner, see g-ir-scanner(1) for a list
+# CFLAGS - Flags to pass in to the parser when scanning headers
+# LDFLAGS - Linker flags used by the scanner
+# PACKAGES - list of pkg-config names which cflags are required to parse
+#   the headers of this gir
+# INCLUDES - Gir files to include without the .gir suffix, for instance
+#   GLib-2.0, Gtk-2.0. This is needed for all libraries which you depend on that
+#   provides introspection information.
+# EXPORT_PACKAGES - list of pkg-config names that are provided by this gir.
+#   By default the names in the PACKAGES variable will be used.
+#
+
+define introspection-scanner
+
+# Basic sanity check, to make sure required variables are set
+$(if $($(_gir_name)_FILES),,$(error Need to define $(_gir_name)_FILES))
+$(if $(or $(findstring --header-only,$($(_gir_name)_SCANNERFLAGS)),
+          $($(_gir_name)_LIBS),
+          $($(_gir_name)_PROGRAM)),,
+    $(error Need to define $(_gir_name)_LIBS or $(_gir_name)_PROGRAM))
+
+# Only dependencies we know are actually filenames goes into _FILES, make
+# sure these are built before running the scanner. Libraries and programs
+# needs to be added manually.
+$(1): $$($(_gir_name)_FILES)
+       @ $(MKDIR_P) $(dir $(1))
+       $(_gir_silent_scanner_prefix) $(INTROSPECTION_SCANNER_ENV) $(INTROSPECTION_SCANNER) $(_gir_silent_scanner_opts) \
+       $(INTROSPECTION_SCANNER_ARGS) \
+         --namespace=$(_gir_namespace) \
+         --nsversion=$(_gir_version) \
+         $(_gir_libtool) \
+         $(_gir_packages) \
+         $(_gir_includes) \
+         $(_gir_export_packages) \
+         $(_gir_program) \
+         $(_gir_libraries) \
+         $($(_gir_name)_SCANNERFLAGS) \
+         $($(_gir_name)_CFLAGS) \
+         $($(_gir_name)_LDFLAGS) \
+         $$^ \
+         --output $(1)
+endef
+
+$(foreach gir,$(INTROSPECTION_GIRS),$(eval $(call introspection-scanner,$(gir))))
+
+#
+# Compiles a gir into a typelib
+# $(1): gir filename (input)
+# $(2): typelib filename (output)
+#
+define introspection-compiler
+$(_gir_silent_compiler) $(INTROSPECTION_COMPILER) $(INTROSPECTION_COMPILER_ARGS) --includedir=. $(1) -o $(2)
+endef
+
+# Simple rule to compile a typelib.
+%.typelib: %.gir
+       $(call introspection-compiler,$<,$@)
+
+Offsets-1.0.gir: liboffsets.la offsets.h
+
+gitestoffsets.c: gen-gitestoffsets offsets.h
+       $(AM_V_GEN) $(PYTHON) $(srcdir)/gen-gitestoffsets $(srcdir)/offsets.h > $@ || ( rm -f $@ && false )
+
+############################################################
+
+check-local: Offsets-1.0.typelib
+       GI_TYPELIB_PATH=:$(top_builddir) ./gitestoffsets$(EXEEXT) offsets.compiled offsets.introspected
+       diff -u offsets.compiled offsets.introspected
+
+# 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/offsets/gen-gitestoffsets b/tests/offsets/gen-gitestoffsets
new file mode 100755 (executable)
index 0000000..60efa43
--- /dev/null
@@ -0,0 +1,251 @@
+#!/bin/env python
+# -*- Mode: Python -*-
+# GObject-Introspection - a framework for introspecting GObject libraries
+# Copyright (C) 2008  Red Hat, 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
+# 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.
+#
+
+# The idea here is that we want to compare offset information two ways:
+#
+#  1) As generated by the compiler
+#  2) As found in the typelib
+#
+# So we find all the structures in the input file (offsets.h), parse out
+# fields within the structure and generate code that outputs the field
+# offsets using G_STRUCT_OFFSET() to one file and the field offsets using
+# the typelib to the another file. We can then diff the two files to see
+# if they are the same
+
+import re
+import sys
+
+if len(sys.argv) != 2:
+    print >>sys.stderr, "Usage: gen-gitestoffsets INPUT > OUTPUT"
+    sys.exit(1)
+
+# Helper function that we use to generate source. It does substitions
+# from a dictionary, removes white space at the ends and removes a
+# leading '|' from each line
+STRIP_AROUND_RE = re.compile("^[ \t]*\n?(.*?)[ \t]*$", re.DOTALL)
+STRIP_LEADER_RE = re.compile("^\|", re.MULTILINE)
+def output(args, format):
+    format = STRIP_AROUND_RE.sub(r"\1", format)
+    format = STRIP_LEADER_RE.sub(r"", format)
+    sys.stdout.write(format % args)
+
+#
+# Some regular expressions we use when parsing
+#
+TOKEN = "(?:[A-Za-z_][A-Za-z_0-9]+)"
+
+def compile_re(expr):
+    expr = expr.replace("TOKEN", TOKEN)
+    return re.compile(expr, re.VERBOSE)
+
+COMMENT_RE = compile_re("/\*([^*]+|\*[^/])*\*/")
+STRUCT_DEF_RE = compile_re("struct\s+_(TOKEN)\s*{([^}]*)}")
+
+# This certainly can't handle all type declarations, but it only
+# needs to handle the ones we use in the test cases
+FIELD_RE = compile_re(r"^(?:const\s+)?TOKEN(?:[\s*]+)(TOKEN)\s*(?:\[([0-9]*)\])?\s*;$")
+
+
+input_f = open(sys.argv[1])
+input = input_f.read()
+input_f.close()
+
+# Strip comments
+input = COMMENT_RE.sub("", input)
+
+symbols = []
+symbol_fields = {}
+
+for m in STRUCT_DEF_RE.finditer(input):
+    symbol = m.group(1)
+
+    fields = []
+
+    body = m.group(2)
+    for line in re.split("\n|\r\n", body):
+        line = line.strip()
+        if line == "":
+            continue
+        n = FIELD_RE.match(line)
+        if not n:
+            print sys.stderr, "Can't parse structure line '%s'" % line
+            sys.exit(1)
+        fields.append(n.group(1))
+
+    symbols.append(symbol)
+    symbol_fields[symbol] = fields
+
+# Sort for convenience
+symbols.sort()
+
+output({}, r'''
+| /* GENERATED FILE. DO NOT EDIT. See gen-gitestoffsets */
+|
+|#include <errno.h>
+|#include <stdio.h>
+|#include <string.h>
+|#include <glib.h>
+|#include <girepository.h>
+|#include "offsets.h"
+|
+|static GIRepository *repository;
+|static const char *namespace = "Offsets";
+|static const char *version = "1.0";
+|
+|static void
+|print_field_offset(FILE         *outfile,
+|                   GIStructInfo *struct_info,
+|                   const gchar  *name)
+|{
+|   gint i;
+|   gint n_fields = g_struct_info_get_n_fields (struct_info);
+|   for (i = 0; i < n_fields; i++)
+|     {
+|       GIFieldInfo *field_info = g_struct_info_get_field (struct_info, i);
+|       const char *field_name = g_base_info_get_name ((GIBaseInfo *)field_info);
+|       if (strcmp (field_name, name) == 0)
+|         {
+|           fprintf (outfile, "%%s %%d\n", name, g_field_info_get_offset (field_info));
+|           g_base_info_unref ((GIBaseInfo *)field_info);
+|           return;
+|         }
+|
+|       g_base_info_unref ((GIBaseInfo *)field_info);
+|     }
+|
+|   g_error("Can't find field '%%s.%%s' in introspection information",
+|           g_base_info_get_name ((GIBaseInfo *)struct_info), name);
+|}
+|
+''')
+
+for symbol in symbols:
+    fields = symbol_fields[symbol]
+
+    output({'symbol' : symbol}, r'''
+|typedef struct {
+|   char dummy;
+|   %(symbol)s struct_;
+|} Align%(symbol)s;
+|
+|static void
+|compiled_%(symbol)s (FILE *outfile)
+|{
+|  fprintf (outfile, "%(symbol)s: size=%%" G_GSIZE_FORMAT ", alignment=%%ld\n",
+|           sizeof(%(symbol)s),
+|           G_STRUCT_OFFSET(Align%(symbol)s, struct_));
+|
+           ''')
+
+    for field in fields:
+        output({ 'field' : field, 'symbol' : symbol }, r'''
+|  fprintf (outfile, "%%s %%ld\n", "%(field)s", G_STRUCT_OFFSET(%(symbol)s, %(field)s));
+               ''')
+
+    output({}, r'''
+|
+|  fprintf (outfile, "\n");
+|}
+|
+           ''')
+
+    if not symbol.startswith("Offsets"):
+        print >> sys.stderr, "Symbol '%s' doesn't start with Offsets" % symbol
+    bare_symbol = symbol[len("Offsets"):]
+
+
+    output({'symbol' : symbol, 'bare_symbol' : bare_symbol}, r'''
+|static void
+|introspected_%(symbol)s (FILE *outfile)
+|{
+|  GIStructInfo *struct_info = (GIStructInfo *)g_irepository_find_by_name(repository, namespace,
+|                                                                         "%(bare_symbol)s");
+|  if (!struct_info)
+|     g_error ("Can't find GIStructInfo for '%(symbol)s'");
+|
+|  fprintf (outfile, "%(symbol)s: size=%%" G_GSIZE_FORMAT ", alignment=%%" G_GSIZE_FORMAT "\n",
+|           g_struct_info_get_size (struct_info),
+|           g_struct_info_get_alignment (struct_info));
+|
+           ''')
+    for field in fields:
+        output({'field' : field}, '''
+|  print_field_offset(outfile, struct_info, "%(field)s");
+               ''')
+
+    output({}, r'''
+|
+|  fprintf (outfile, "\n");
+|
+|  g_base_info_unref ((GIBaseInfo *)struct_info);
+|}
+           ''')
+
+output({}, r'''
+|
+|int main(int argc, char **argv)
+|{
+|  GError *error = NULL;
+|  FILE *outfile;
+|
+|  if (argc != 3)
+|    g_error ("Usage: gitestoffsets COMPILED_OFFSETS_FILE INTROSPECTED_OFFSETS_FILE");
+|
+|  g_type_init ();
+|
+|  repository = g_irepository_get_default ();
+|  if (!g_irepository_require (repository, namespace, version, 0, &error))
+|     g_error ("Failed to load %%s-%%s.typelib: %%s", namespace, version, error->message);
+|
+|  outfile = fopen (argv[1], "w");
+|  if (!outfile)
+|    g_error ("Cannot open '%%s': %%s'", argv[1], g_strerror(errno));
+|
+''')
+
+for symbol in symbols:
+    output({'symbol' : symbol}, '''
+|  compiled_%(symbol)s (outfile);
+   ''')
+
+output({}, '''
+|
+|  fclose (outfile);
+|
+|  outfile = fopen (argv[2], "w");
+|  if (!outfile)
+|    g_error ("Cannot open '%%s': %%s'", argv[1], g_strerror(errno));
+|
+''')
+
+
+for symbol in symbols:
+    output({'symbol' : symbol}, '''
+|  introspected_%(symbol)s (outfile);
+''')
+
+output({}, r'''
+|
+|  fclose (outfile);
+|
+|  return 0;
+}
+''')
diff --git a/tests/offsets/offsets.c b/tests/offsets/offsets.c
new file mode 100644 (file)
index 0000000..bd009e8
--- /dev/null
@@ -0,0 +1,7 @@
+#include <offsets.h>
+
+void offsets_dummy(void);
+
+/* To avoid an empty compilation unit */
+void offsets_dummy(void) {
+}
diff --git a/tests/offsets/offsets.h b/tests/offsets/offsets.h
new file mode 100644 (file)
index 0000000..1985f39
--- /dev/null
@@ -0,0 +1,140 @@
+#ifndef __OFFSETS_H__
+#define __OFFSETS_H__
+
+#include <glib.h>
+#include <glib-object.h>
+#include <time.h>
+
+/* Test we get the alignment right for various basic types; we put
+ * a char in front of of each field to make it more likely that we'll
+ * stress out the alignment code.
+ */
+typedef struct _OffsetsBasic OffsetsBasic;
+
+struct _OffsetsBasic {
+  char dummy1;
+  gint8 field_int8;
+  char dummy2;
+  gint16 field_int16;
+  char dummy3;
+  gint32 field_int32;
+  char dummy4;
+  gint64 field_int64;
+  char dummy5;
+  gchar *field_pointer;
+  char dummy6;
+  gfloat field_float;
+  char dummy7;
+  gdouble field_double;
+  char dummy8;
+  gsize field_size;
+  char dummy9;
+  time_t field_time;
+};
+
+typedef enum {
+  OFFSETS_ENUM_1 = 1 /* compiler could use int8, uint8, int16, uint16, int32, uint32 */
+} OffsetsEnum1;
+
+typedef enum {
+  OFFSETS_ENUM_2 = 128 /* compiler could use uint8, int16, uint16, int32, uint32 */
+} OffsetsEnum2;
+
+typedef enum {
+  OFFSETS_ENUM_3 = 257 /* compiler could use int16, uint16, int32, uint32 */
+} OffsetsEnum3;
+
+typedef enum {
+  OFFSETS_ENUM_4 = G_MAXSHORT + 1 /* compiler could use uint16, int32, uint32 */
+} OffsetsEnum4;
+
+typedef enum {
+  OFFSETS_ENUM_5 = G_MAXUSHORT + 1 /* compiler could use int32, uint32 */
+} OffsetsEnum5;
+
+typedef enum {
+  OFFSETS_ENUM_6 = ((guint)G_MAXINT) + 1 /* compiler could use uint32 */
+} OffsetsEnum6;
+
+/* Test that we get the width of enum fields right. The char after
+ * each field will have aligment 1 (almost certainly) so should
+ * be placed right the field.
+ */
+typedef struct _OffsetsEnum OffsetsEnum;
+
+struct _OffsetsEnum {
+  OffsetsEnum1 enum1;
+  char dummy1;
+  OffsetsEnum2 enum2;
+  char dummy2;
+  OffsetsEnum3 enum3;
+  char dummy3;
+  OffsetsEnum4 enum4;
+  char dummy4;
+  OffsetsEnum5 enum5;
+  char dummy5;
+  OffsetsEnum6 enum6;
+  char dummy6;
+};
+
+/* Test nested structures
+ */
+
+typedef struct _OffsetsNestee OffsetsNestee;
+
+struct _OffsetsNestee {
+  char field1;
+  double field2; /* alignment of structure is greater than its first element */
+  char field3; /* structure has tail padding */
+};
+
+typedef union _OffsetsNesteeUnion OffsetsNesteeUnion;
+
+union _OffsetsNesteeUnion {
+  char field1;
+  double field2;
+};
+
+typedef struct _OffsetsNested OffsetsNested;
+
+struct _OffsetsNested {
+  char dummy1;
+  OffsetsNestee nestee;
+  char dummy2;
+  OffsetsNesteeUnion nestee_union;
+  char dummy3;
+};
+
+/* Test array offsets
+ */
+
+typedef struct _OffsetsArray OffsetsArray;
+
+struct _OffsetsArray
+{ 
+  gint some_ints[2];
+  gint8 some_int8s[3];
+  gdouble some_doubles[4];
+  OffsetsEnum1 some_enum[2];
+  gpointer some_ptrs[5];
+};
+
+/** Test object offsets
+ */
+
+typedef struct _OffsetsObj OffsetsObj;
+typedef struct _OffsetsObjClass OffsetsObjClass;
+
+struct _OffsetsObj
+{
+  GObject parent_instance;
+
+  GObject *other;
+};
+
+struct _OffsetsObjClass
+{
+  GObjectClass parent_class;
+};
+
+#endif /* __OFFSETS_H__ */
diff --git a/tests/repository/Makefile.am b/tests/repository/Makefile.am
new file mode 100644 (file)
index 0000000..ca2efe3
--- /dev/null
@@ -0,0 +1,21 @@
+AM_CFLAGS = $(GOBJECT_CFLAGS)
+AM_LDFLAGS = -module -avoid-version
+LIBS = $(GOBJECT_LIBS)
+
+check_PROGRAMS = gitestrepo gitestthrows gitypelibtest
+
+gitestrepo_SOURCES = $(srcdir)/gitestrepo.c
+gitestrepo_CPPFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
+gitestrepo_LDADD = $(top_builddir)/libgirepository-1.0.la $(GIREPO_LIBS)
+
+gitestthrows_SOURCES = $(srcdir)/gitestthrows.c
+gitestthrows_CPPFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
+gitestthrows_LDADD = $(top_builddir)/libgirepository-1.0.la $(GIREPO_LIBS)
+
+gitypelibtest_SOURCES = $(srcdir)/gitypelibtest.c
+gitypelibtest_CPPFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
+gitypelibtest_LDADD = $(top_builddir)/libgirepository-1.0.la $(GIREPO_LIBS)
+
+TESTS = gitestrepo gitestthrows gitypelibtest
+TESTS_ENVIRONMENT=env GI_TYPELIB_PATH=$(top_builddir):$(top_builddir)/gir:$(top_builddir)/tests:$(top_builddir)/tests/scanner: \
+   XDG_DATA_DIRS="$(top_srcdir)/gir:$(XDG_DATA_DIRS)" $(DEBUG)
diff --git a/tests/repository/Makefile.in b/tests/repository/Makefile.in
new file mode 100644 (file)
index 0000000..31e89d7
--- /dev/null
@@ -0,0 +1,731 @@
+# 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@
+check_PROGRAMS = gitestrepo$(EXEEXT) gitestthrows$(EXEEXT) \
+       gitypelibtest$(EXEEXT)
+TESTS = gitestrepo$(EXEEXT) gitestthrows$(EXEEXT) \
+       gitypelibtest$(EXEEXT)
+subdir = tests/repository
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.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)/acinclude.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_gitestrepo_OBJECTS = gitestrepo-gitestrepo.$(OBJEXT)
+gitestrepo_OBJECTS = $(am_gitestrepo_OBJECTS)
+am__DEPENDENCIES_1 =
+gitestrepo_DEPENDENCIES = $(top_builddir)/libgirepository-1.0.la \
+       $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am_gitestthrows_OBJECTS = gitestthrows-gitestthrows.$(OBJEXT)
+gitestthrows_OBJECTS = $(am_gitestthrows_OBJECTS)
+gitestthrows_DEPENDENCIES = $(top_builddir)/libgirepository-1.0.la \
+       $(am__DEPENDENCIES_1)
+am_gitypelibtest_OBJECTS = gitypelibtest-gitypelibtest.$(OBJEXT)
+gitypelibtest_OBJECTS = $(am_gitypelibtest_OBJECTS)
+gitypelibtest_DEPENDENCIES = $(top_builddir)/libgirepository-1.0.la \
+       $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/build-aux/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 = $(gitestrepo_SOURCES) $(gitestthrows_SOURCES) \
+       $(gitypelibtest_SOURCES)
+DIST_SOURCES = $(gitestrepo_SOURCES) $(gitestthrows_SOURCES) \
+       $(gitypelibtest_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_GIR_PACKAGE = @CAIRO_GIR_PACKAGE@
+CAIRO_GOBJECT_CFLAGS = @CAIRO_GOBJECT_CFLAGS@
+CAIRO_GOBJECT_LIBS = @CAIRO_GOBJECT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CAIRO_SHARED_LIBRARY = @CAIRO_SHARED_LIBRARY@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+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@
+EXPANDED_BINDIR = @EXPANDED_BINDIR@
+EXPANDED_DATADIR = @EXPANDED_DATADIR@
+EXPANDED_LIBDIR = @EXPANDED_LIBDIR@
+EXPANDED_LIBEXECDIR = @EXPANDED_LIBEXECDIR@
+EXPANDED_LOCALSTATEDIR = @EXPANDED_LOCALSTATEDIR@
+EXPANDED_SYSCONFDIR = @EXPANDED_SYSCONFDIR@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FFI_PC_CFLAGS = @FFI_PC_CFLAGS@
+FFI_PC_LIBS = @FFI_PC_LIBS@
+FFI_PC_PACKAGES = @FFI_PC_PACKAGES@
+FGREP = @FGREP@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
+GIREPO_CFLAGS = @GIREPO_CFLAGS@
+GIREPO_LIBS = @GIREPO_LIBS@
+GIR_DIR = @GIR_DIR@
+GIR_SUFFIX = @GIR_SUFFIX@
+GLIBSRC = @GLIBSRC@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMODULE_CFLAGS = @GMODULE_CFLAGS@
+GMODULE_LIBS = @GMODULE_LIBS@
+GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
+GOBJECT_INTROSPECTION_LIBDIR = @GOBJECT_INTROSPECTION_LIBDIR@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
+GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
+GTKDOC_MKPDF = @GTKDOC_MKPDF@
+GTKDOC_REBASE = @GTKDOC_REBASE@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = $(GOBJECT_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@
+POW_LIB = @POW_LIB@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_LIB_LOC = @PYTHON_LIB_LOC@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SCANNER_CFLAGS = @SCANNER_CFLAGS@
+SCANNER_LIBS = @SCANNER_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+YACC = @YACC@
+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@
+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@
+AM_CFLAGS = $(GOBJECT_CFLAGS)
+AM_LDFLAGS = -module -avoid-version
+gitestrepo_SOURCES = $(srcdir)/gitestrepo.c
+gitestrepo_CPPFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
+gitestrepo_LDADD = $(top_builddir)/libgirepository-1.0.la $(GIREPO_LIBS)
+gitestthrows_SOURCES = $(srcdir)/gitestthrows.c
+gitestthrows_CPPFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
+gitestthrows_LDADD = $(top_builddir)/libgirepository-1.0.la $(GIREPO_LIBS)
+gitypelibtest_SOURCES = $(srcdir)/gitypelibtest.c
+gitypelibtest_CPPFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
+gitypelibtest_LDADD = $(top_builddir)/libgirepository-1.0.la $(GIREPO_LIBS)
+TESTS_ENVIRONMENT = env GI_TYPELIB_PATH=$(top_builddir):$(top_builddir)/gir:$(top_builddir)/tests:$(top_builddir)/tests/scanner: \
+   XDG_DATA_DIRS="$(top_srcdir)/gir:$(XDG_DATA_DIRS)" $(DEBUG)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(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/repository/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign tests/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):
+
+clean-checkPROGRAMS:
+       @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+       echo " rm -f" $$list; \
+       rm -f $$list || exit $$?; \
+       test -n "$(EXEEXT)" || exit 0; \
+       list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+       echo " rm -f" $$list; \
+       rm -f $$list
+gitestrepo$(EXEEXT): $(gitestrepo_OBJECTS) $(gitestrepo_DEPENDENCIES) 
+       @rm -f gitestrepo$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(gitestrepo_OBJECTS) $(gitestrepo_LDADD) $(LIBS)
+gitestthrows$(EXEEXT): $(gitestthrows_OBJECTS) $(gitestthrows_DEPENDENCIES) 
+       @rm -f gitestthrows$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(gitestthrows_OBJECTS) $(gitestthrows_LDADD) $(LIBS)
+gitypelibtest$(EXEEXT): $(gitypelibtest_OBJECTS) $(gitypelibtest_DEPENDENCIES) 
+       @rm -f gitypelibtest$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(gitypelibtest_OBJECTS) $(gitypelibtest_LDADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gitestrepo-gitestrepo.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gitestthrows-gitestthrows.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gitypelibtest-gitypelibtest.Po@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 $@ $<
+
+gitestrepo-gitestrepo.o: $(srcdir)/gitestrepo.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gitestrepo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gitestrepo-gitestrepo.o -MD -MP -MF $(DEPDIR)/gitestrepo-gitestrepo.Tpo -c -o gitestrepo-gitestrepo.o `test -f '$(srcdir)/gitestrepo.c' || echo '$(srcdir)/'`$(srcdir)/gitestrepo.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/gitestrepo-gitestrepo.Tpo $(DEPDIR)/gitestrepo-gitestrepo.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(srcdir)/gitestrepo.c' object='gitestrepo-gitestrepo.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gitestrepo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gitestrepo-gitestrepo.o `test -f '$(srcdir)/gitestrepo.c' || echo '$(srcdir)/'`$(srcdir)/gitestrepo.c
+
+gitestrepo-gitestrepo.obj: $(srcdir)/gitestrepo.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gitestrepo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gitestrepo-gitestrepo.obj -MD -MP -MF $(DEPDIR)/gitestrepo-gitestrepo.Tpo -c -o gitestrepo-gitestrepo.obj `if test -f '$(srcdir)/gitestrepo.c'; then $(CYGPATH_W) '$(srcdir)/gitestrepo.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/gitestrepo.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/gitestrepo-gitestrepo.Tpo $(DEPDIR)/gitestrepo-gitestrepo.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(srcdir)/gitestrepo.c' object='gitestrepo-gitestrepo.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gitestrepo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gitestrepo-gitestrepo.obj `if test -f '$(srcdir)/gitestrepo.c'; then $(CYGPATH_W) '$(srcdir)/gitestrepo.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/gitestrepo.c'; fi`
+
+gitestthrows-gitestthrows.o: $(srcdir)/gitestthrows.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gitestthrows_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gitestthrows-gitestthrows.o -MD -MP -MF $(DEPDIR)/gitestthrows-gitestthrows.Tpo -c -o gitestthrows-gitestthrows.o `test -f '$(srcdir)/gitestthrows.c' || echo '$(srcdir)/'`$(srcdir)/gitestthrows.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/gitestthrows-gitestthrows.Tpo $(DEPDIR)/gitestthrows-gitestthrows.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(srcdir)/gitestthrows.c' object='gitestthrows-gitestthrows.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gitestthrows_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gitestthrows-gitestthrows.o `test -f '$(srcdir)/gitestthrows.c' || echo '$(srcdir)/'`$(srcdir)/gitestthrows.c
+
+gitestthrows-gitestthrows.obj: $(srcdir)/gitestthrows.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gitestthrows_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gitestthrows-gitestthrows.obj -MD -MP -MF $(DEPDIR)/gitestthrows-gitestthrows.Tpo -c -o gitestthrows-gitestthrows.obj `if test -f '$(srcdir)/gitestthrows.c'; then $(CYGPATH_W) '$(srcdir)/gitestthrows.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/gitestthrows.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/gitestthrows-gitestthrows.Tpo $(DEPDIR)/gitestthrows-gitestthrows.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(srcdir)/gitestthrows.c' object='gitestthrows-gitestthrows.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gitestthrows_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gitestthrows-gitestthrows.obj `if test -f '$(srcdir)/gitestthrows.c'; then $(CYGPATH_W) '$(srcdir)/gitestthrows.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/gitestthrows.c'; fi`
+
+gitypelibtest-gitypelibtest.o: $(srcdir)/gitypelibtest.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gitypelibtest_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gitypelibtest-gitypelibtest.o -MD -MP -MF $(DEPDIR)/gitypelibtest-gitypelibtest.Tpo -c -o gitypelibtest-gitypelibtest.o `test -f '$(srcdir)/gitypelibtest.c' || echo '$(srcdir)/'`$(srcdir)/gitypelibtest.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/gitypelibtest-gitypelibtest.Tpo $(DEPDIR)/gitypelibtest-gitypelibtest.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(srcdir)/gitypelibtest.c' object='gitypelibtest-gitypelibtest.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gitypelibtest_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gitypelibtest-gitypelibtest.o `test -f '$(srcdir)/gitypelibtest.c' || echo '$(srcdir)/'`$(srcdir)/gitypelibtest.c
+
+gitypelibtest-gitypelibtest.obj: $(srcdir)/gitypelibtest.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gitypelibtest_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gitypelibtest-gitypelibtest.obj -MD -MP -MF $(DEPDIR)/gitypelibtest-gitypelibtest.Tpo -c -o gitypelibtest-gitypelibtest.obj `if test -f '$(srcdir)/gitypelibtest.c'; then $(CYGPATH_W) '$(srcdir)/gitypelibtest.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/gitypelibtest.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/gitypelibtest-gitypelibtest.Tpo $(DEPDIR)/gitypelibtest-gitypelibtest.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(srcdir)/gitypelibtest.c' object='gitypelibtest-gitypelibtest.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gitypelibtest_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gitypelibtest-gitypelibtest.obj `if test -f '$(srcdir)/gitypelibtest.c'; then $(CYGPATH_W) '$(srcdir)/gitypelibtest.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/gitypelibtest.c'; fi`
+
+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
+
+check-TESTS: $(TESTS)
+       @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+       srcdir=$(srcdir); export srcdir; \
+       list=' $(TESTS) '; \
+       $(am__tty_colors); \
+       if test -n "$$list"; then \
+         for tst in $$list; do \
+           if test -f ./$$tst; then dir=./; \
+           elif test -f $$tst; then dir=; \
+           else dir="$(srcdir)/"; fi; \
+           if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+             all=`expr $$all + 1`; \
+             case " $(XFAIL_TESTS) " in \
+             *[\ \     ]$$tst[\ \      ]*) \
+               xpass=`expr $$xpass + 1`; \
+               failed=`expr $$failed + 1`; \
+               col=$$red; res=XPASS; \
+             ;; \
+             *) \
+               col=$$grn; res=PASS; \
+             ;; \
+             esac; \
+           elif test $$? -ne 77; then \
+             all=`expr $$all + 1`; \
+             case " $(XFAIL_TESTS) " in \
+             *[\ \     ]$$tst[\ \      ]*) \
+               xfail=`expr $$xfail + 1`; \
+               col=$$lgn; res=XFAIL; \
+             ;; \
+             *) \
+               failed=`expr $$failed + 1`; \
+               col=$$red; res=FAIL; \
+             ;; \
+             esac; \
+           else \
+             skip=`expr $$skip + 1`; \
+             col=$$blu; res=SKIP; \
+           fi; \
+           echo "$${col}$$res$${std}: $$tst"; \
+         done; \
+         if test "$$all" -eq 1; then \
+           tests="test"; \
+           All=""; \
+         else \
+           tests="tests"; \
+           All="All "; \
+         fi; \
+         if test "$$failed" -eq 0; then \
+           if test "$$xfail" -eq 0; then \
+             banner="$$All$$all $$tests passed"; \
+           else \
+             if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+             banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+           fi; \
+         else \
+           if test "$$xpass" -eq 0; then \
+             banner="$$failed of $$all $$tests failed"; \
+           else \
+             if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+             banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+           fi; \
+         fi; \
+         dashes="$$banner"; \
+         skipped=""; \
+         if test "$$skip" -ne 0; then \
+           if test "$$skip" -eq 1; then \
+             skipped="($$skip test was not run)"; \
+           else \
+             skipped="($$skip tests were not run)"; \
+           fi; \
+           test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+             dashes="$$skipped"; \
+         fi; \
+         report=""; \
+         if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+           report="Please report to $(PACKAGE_BUGREPORT)"; \
+           test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+             dashes="$$report"; \
+         fi; \
+         dashes=`echo "$$dashes" | sed s/./=/g`; \
+         if test "$$failed" -eq 0; then \
+           echo "$$grn$$dashes"; \
+         else \
+           echo "$$red$$dashes"; \
+         fi; \
+         echo "$$banner"; \
+         test -z "$$skipped" || echo "$$skipped"; \
+         test -z "$$report" || echo "$$report"; \
+         echo "$$dashes$$std"; \
+         test "$$failed" -eq 0; \
+       else :; fi
+
+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_PROGRAMS)
+       $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+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-checkPROGRAMS clean-generic clean-libtool \
+       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-TESTS check-am clean \
+       clean-checkPROGRAMS clean-generic clean-libtool 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
+
+
+# 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/repository/gitestrepo.c b/tests/repository/gitestrepo.c
new file mode 100644 (file)
index 0000000..05ea5d9
--- /dev/null
@@ -0,0 +1,150 @@
+
+#include "girepository.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <gio/gio.h>
+
+void test_constructor_return_type(GIBaseInfo* object_info);
+
+void
+test_constructor_return_type(GIBaseInfo* object_info)
+{
+  GIFunctionInfo* constructor;
+  GITypeInfo* return_type;
+  GIBaseInfo *return_info;
+  const gchar* class_name;
+  const gchar* return_name;
+
+  class_name = g_registered_type_info_get_type_name ((GIRegisteredTypeInfo*) object_info);
+  g_assert (class_name);
+
+  constructor = g_object_info_find_method((GIObjectInfo*)object_info, "new");
+  g_assert (constructor);
+
+  return_type = g_callable_info_get_return_type ((GICallableInfo*)constructor);
+  g_assert (return_type);
+  g_assert (g_type_info_get_tag (return_type) == GI_TYPE_TAG_INTERFACE);
+
+  return_info = g_type_info_get_interface (return_type);
+  g_assert (return_info);
+
+  return_name = g_registered_type_info_get_type_name ((GIRegisteredTypeInfo*) return_info);
+  g_assert (strcmp (class_name, return_name) == 0);
+}
+
+
+int
+main(int argc, char **argv)
+{
+  GIRepository *repo;
+  GITypelib *ret;
+  GError *error = NULL;
+  GIBaseInfo *info;
+  GIBaseInfo *siginfo;
+  GIEnumInfo *errorinfo;
+  GType gtype;
+  const char *prefix;
+
+  g_type_init ();
+
+  repo = g_irepository_get_default ();
+
+  ret = g_irepository_require (repo, "Gio", NULL, 0, &error);
+  if (!ret)
+    g_error ("%s", error->message);
+
+  prefix = g_irepository_get_c_prefix (repo, "Gio");
+  g_assert (prefix != NULL);
+  g_assert_cmpstr (prefix, ==, "G");
+
+  info = g_irepository_find_by_name (repo, "Gio", "Cancellable");
+  g_assert (info != NULL);
+  g_assert (g_base_info_get_type (info) == GI_INFO_TYPE_OBJECT);
+
+  gtype = g_registered_type_info_get_g_type ((GIRegisteredTypeInfo *)info);
+  g_assert (g_type_is_a (gtype, G_TYPE_OBJECT));
+
+  info = g_irepository_find_by_gtype (repo, g_type_from_name ("GCancellable"));
+  g_assert (info != NULL);
+
+  g_print ("Successfully found GCancellable\n");
+
+  test_constructor_return_type (info);
+
+  info = g_irepository_find_by_name (repo, "Gio", "ThisDoesNotExist");
+  g_assert (info == NULL);
+
+  info = g_irepository_find_by_name (repo, "Gio", "FileMonitor");
+  g_assert (info != NULL);
+  siginfo = g_object_info_find_signal ((GIObjectInfo*) info, "changed");
+  g_assert (siginfo != NULL);
+  g_base_info_unref (siginfo);
+
+  /* Test notify on gobject */
+
+  info = g_irepository_find_by_name (repo, "GObject", "Object");
+  g_assert (info != NULL);
+  siginfo = g_object_info_find_signal (info, "notify");
+  g_assert (siginfo != NULL);
+  g_base_info_unref (siginfo);
+  g_base_info_unref (info);
+
+  /* vfunc tests */
+  {
+    GIVFuncInfo *vfunc;
+    GIFunctionInfo *invoker;
+
+    /* Test vfunc with invoker on interface */
+    info = g_irepository_find_by_name (repo, "Gio", "File");
+    g_assert (info != NULL);
+
+    vfunc = g_interface_info_find_vfunc ((GIInterfaceInfo*)info, "read_async");
+    g_assert (vfunc != NULL);
+
+    invoker = g_vfunc_info_get_invoker (vfunc);
+    g_assert (invoker != NULL);
+
+    g_assert (strcmp (g_base_info_get_name ((GIBaseInfo*)invoker), "read_async") == 0);
+
+    /* Test vfunc with no known invoker on object */
+    info = g_irepository_find_by_name (repo, "GObject", "Object");
+    g_assert (info != NULL);
+
+    vfunc = g_object_info_find_vfunc ((GIObjectInfo*)info, "dispose");
+    g_assert (vfunc != NULL);
+
+    /* Ok, maybe we should mark g_object_run_dispose as the invoker for
+     * dispose, but...eh.  It's pretty special however you cut it.
+     */
+    invoker = g_vfunc_info_get_invoker (vfunc);
+    g_assert (invoker == NULL);
+
+    /* Test vfunc with invoker on object */
+    info = g_irepository_find_by_name (repo, "Gio", "AppLaunchContext");
+    g_assert (info != NULL);
+
+    vfunc = g_object_info_find_vfunc ((GIObjectInfo*)info, "get_display");
+    g_assert (vfunc != NULL);
+
+    invoker = g_vfunc_info_get_invoker (vfunc);
+    g_assert (invoker != NULL);
+    g_assert (strcmp (g_base_info_get_name ((GIBaseInfo*)invoker), "get_display") == 0);
+
+    /* And let's be sure we can find the method directly */
+
+    invoker = g_object_info_find_method ((GIObjectInfo*)info, "get_display");
+    g_assert (invoker != NULL);
+    g_assert (strcmp (g_base_info_get_name ((GIBaseInfo*)invoker), "get_display") == 0);
+  }
+
+  /* Error quark tests */
+  errorinfo = g_irepository_find_by_error_domain (repo, G_RESOLVER_ERROR);
+  g_assert (errorinfo != NULL);
+  g_assert (g_base_info_get_type ((GIBaseInfo *)errorinfo) == GI_INFO_TYPE_ENUM);
+  g_assert (strcmp (g_base_info_get_name ((GIBaseInfo*)errorinfo), "ResolverError") == 0);
+
+  exit(0);
+}
diff --git a/tests/repository/gitestthrows.c b/tests/repository/gitestthrows.c
new file mode 100644 (file)
index 0000000..cce0684
--- /dev/null
@@ -0,0 +1,50 @@
+
+#include "girepository.h"
+
+#include <stdlib.h>
+#include <unistd.h>
+
+
+int
+main(int argc, char **argv)
+{
+  GIRepository *repo;
+  GITypelib *ret;
+  GIBaseInfo *info;
+  GIArgument in_arg[1];
+  GIArgument ret_arg;
+  GError *error;
+  gboolean invoke_return;
+
+  g_type_init ();
+
+  repo = g_irepository_get_default ();
+
+  error = NULL;
+  ret = g_irepository_require (repo, "GLib", NULL, 0, &error);
+  g_assert (ret != NULL);
+  g_assert (error == NULL);
+
+  info = g_irepository_find_by_name (repo, "GLib", "file_read_link");
+  g_assert (info != NULL);
+  g_assert (g_base_info_get_type (info) == GI_INFO_TYPE_FUNCTION);
+  g_assert (g_function_info_get_flags ((GIFunctionInfo *)info) & GI_FUNCTION_THROWS);
+
+  in_arg[0].v_string = g_strdup ("non-existent-file/hope");
+  error = NULL;
+  invoke_return = g_function_info_invoke ((GIFunctionInfo *)info,
+                                          in_arg,
+                                          1,
+                                          NULL,
+                                          0,
+                                          &ret_arg,
+                                          &error);
+  g_free(in_arg[0].v_string);
+
+  g_assert (invoke_return == FALSE);
+  g_assert (error != NULL);
+  g_assert (error->domain == G_FILE_ERROR);
+  g_assert (error->code == G_FILE_ERROR_NOENT);
+
+  exit(0);
+}
diff --git a/tests/repository/gitypelibtest.c b/tests/repository/gitypelibtest.c
new file mode 100644 (file)
index 0000000..c53eab2
--- /dev/null
@@ -0,0 +1,188 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ */
+
+#include "girepository.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+static void
+test_enum_and_flags_cidentifier(GIRepository *repo)
+{
+    GITypelib *ret;
+    GError *error = NULL;
+    gint n_infos, i;
+
+    ret = g_irepository_require (repo, "GIMarshallingTests", NULL, 0, &error);
+    if (!ret)
+        g_error ("%s", error->message);
+
+    n_infos = g_irepository_get_n_infos (repo, "GIMarshallingTests");
+
+    for (i = 0; i < n_infos; i++) {
+        GIBaseInfo *info;
+
+        info = g_irepository_get_info (repo, "GIMarshallingTests", i);
+
+        /* both GI_INFO_TYPE_ENUM and GI_INFO_TYPE_FLAGS use GIEnumInfo */
+        if (GI_IS_ENUM_INFO (info)) {
+            gint n_values, j;
+
+            n_values = g_enum_info_get_n_values ((GIEnumInfo *) info);
+            for (j = 0; j < n_values; j++) {
+                GIValueInfo *value_info;
+                const gchar *c_identifier = NULL;
+
+                value_info = g_enum_info_get_value ((GIEnumInfo *) info, j);
+                c_identifier = g_base_info_get_attribute ((GIBaseInfo *) value_info, "c:identifier");
+
+                if (c_identifier == NULL) {
+                    g_error ("Error: no 'c:identifier' attribute on GIMarshallingTests.%s.%s\n",
+                             g_base_info_get_name (info),
+                             g_base_info_get_name ((GIBaseInfo *) value_info));
+                }
+
+                g_base_info_unref ((GIBaseInfo *) value_info);
+            }
+        }
+
+        g_base_info_unref (info);
+    }
+}
+
+static void
+_check_enum_methods (GIBaseInfo *info, const gchar *name, const gchar *prefix)
+{
+    gint n_methods, i;
+
+    n_methods = g_enum_info_get_n_methods ((GIEnumInfo *) info);
+    if (n_methods <= 0)
+        g_error ("%s should have methods", name);
+
+    for (i = 0; i < n_methods; i += n_methods-1) {
+        GIBaseInfo *function_info;
+        GIFunctionInfoFlags flags;
+        const gchar *symbol;
+        function_info = g_enum_info_get_method ((GIEnumInfo *) info, i);
+        if (!function_info)
+            g_error ("Could not find %s method nr. %d", name, i+1);
+        flags = g_function_info_get_flags ((GIFunctionInfo *) function_info);
+        if (flags != 0)
+            g_error ("%s methods should be static", name);
+        symbol = g_function_info_get_symbol ((GIFunctionInfo *) function_info);
+        if (!symbol || !g_str_has_prefix (symbol, prefix))
+            g_error ("Could not find valid function symbol");
+        g_base_info_unref (function_info);
+    }
+}
+
+static void
+test_enum_and_flags_static_methods(GIRepository *repo)
+{
+    GITypelib *ret;
+    GError *error = NULL;
+    GIBaseInfo *enum_info;
+
+    ret = g_irepository_require (repo, "GIMarshallingTests", NULL, 0, &error);
+    if (!ret)
+        g_error ("%s", error->message);
+
+    enum_info = g_irepository_find_by_name (repo, "GIMarshallingTests", "GEnum");
+    if (!enum_info)
+        g_error ("Could not find GIMarshallingTests.GEnum");
+    _check_enum_methods (enum_info,
+                         "GIMarshallingTests.GEnum",
+                         "gi_marshalling_tests_genum_");
+    g_base_info_unref (enum_info);
+
+    enum_info = g_irepository_find_by_name (repo, "GIMarshallingTests", "Flags");
+    if (!enum_info)
+        g_error ("Could not find GIMarshallingTests.Flags");
+    _check_enum_methods (enum_info,
+                         "GIMarshallingTests.Flags",
+                         "gi_marshalling_tests_flags_");
+    g_base_info_unref (enum_info);
+}
+
+static void
+test_size_of_gvalue(GIRepository *repo)
+{
+    GIBaseInfo *struct_info;
+
+    struct_info = g_irepository_find_by_name (repo, "GObject", "Value");
+    if (!struct_info)
+        g_error ("Could not find GObject.Value");
+    g_assert_cmpuint (g_struct_info_get_size (struct_info), ==, sizeof (GValue));
+    g_base_info_unref (struct_info);
+}
+
+static void
+test_is_pointer_for_struct_arg (GIRepository *repo)
+{
+    GITypelib *ret;
+    GError *error = NULL;
+    GIStructInfo *variant_info;
+    GIFunctionInfo *equal_info;
+    GIArgInfo *arg_info;
+    GITypeInfo *type_info;
+
+    ret = g_irepository_require (repo, "GLib", NULL, 0, &error);
+    if (!ret)
+        g_error ("%s", error->message);
+
+    variant_info = g_irepository_find_by_name (repo, "GLib", "Variant");
+    if (!variant_info)
+       g_error ("Could not find GLib.Variant");
+
+    equal_info = g_struct_info_find_method (variant_info, "equal");
+    if (!equal_info)
+       g_error ("Could not find GLib.Variant.equal()");
+
+    arg_info = g_callable_info_get_arg (equal_info, 0);
+    if (!arg_info)
+       g_error ("Could not find 1st arg of GLib.Variant.equal()");
+
+    type_info = g_arg_info_get_type (arg_info);
+    if (!type_info)
+       g_error ("Could not find typeinfo of 1st arg of GLib.Variant.equal()");
+
+    g_assert (g_type_info_is_pointer (type_info));
+
+    g_base_info_unref (type_info);
+    g_base_info_unref (arg_info);
+    g_base_info_unref (equal_info);
+    g_base_info_unref (variant_info);
+}
+
+static void
+test_fundamental_get_ref_function_pointer (GIRepository *repo)
+{
+    GIObjectInfo *info;
+
+    g_assert (g_irepository_require (repo, "Regress", NULL, 0, NULL));
+    info = g_irepository_find_by_name (repo, "Regress",
+                                       "TestFundamentalObject");
+    g_object_info_get_ref_function_pointer (info);
+    g_base_info_unref (info);
+}
+
+int
+main(int argc, char **argv)
+{
+    GIRepository *repo;
+
+    g_type_init ();
+
+    repo = g_irepository_get_default ();
+
+    /* do tests */
+    test_enum_and_flags_cidentifier (repo);
+    test_enum_and_flags_static_methods (repo);
+    test_size_of_gvalue (repo);
+    test_is_pointer_for_struct_arg (repo);
+    test_fundamental_get_ref_function_pointer (repo);
+
+    exit(0);
+}
diff --git a/tests/scanner/Annotation-1.0-expected.gir b/tests/scanner/Annotation-1.0-expected.gir
new file mode 100644 (file)
index 0000000..88b9ea4
--- /dev/null
@@ -0,0 +1,853 @@
+<?xml version="1.0"?>
+<!-- This file was automatically generated from C sources - DO NOT EDIT!
+To affect the contents of this file, edit the original C definitions,
+and/or use gtk-doc annotations.  -->
+<repository version="1.2"
+            xmlns="http://www.gtk.org/introspection/core/1.0"
+            xmlns:c="http://www.gtk.org/introspection/c/1.0"
+            xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
+  <include name="GLib" version="2.0"/>
+  <include name="GObject" version="2.0"/>
+  <include name="Utility" version="1.0"/>
+  <package name="gobject-2.0"/>
+  <c:include name="annotation.h"/>
+  <namespace name="Annotation"
+             version="1.0"
+             shared-library="libannotation.so"
+             c:identifier-prefixes="Annotation"
+             c:symbol-prefixes="annotation">
+    <bitfield name="Bitfield" c:type="AnnotationBitfield">
+      <member name="foo" value="1" c:identifier="ANN_FLAG_FOO"/>
+      <member name="bar" value="2" c:identifier="ANN_FLAG_BAR"/>
+    </bitfield>
+    <constant name="CALCULATED_DEFINE"
+              value="100"
+              c:type="ANNOTATION_CALCULATED_DEFINE">
+      <type name="gint" c:type="gint"/>
+    </constant>
+    <constant name="CALCULATED_LARGE"
+              value="10000000000UL"
+              c:type="ANNOTATION_CALCULATED_LARGE">
+      <type name="gint" c:type="gint"/>
+    </constant>
+    <constant name="CALCULATED_LARGE_DIV"
+              value="1000000UL"
+              c:type="ANNOTATION_CALCULATED_LARGE_DIV">
+      <type name="gint" c:type="gint"/>
+    </constant>
+    <callback name="Callback" c:type="AnnotationCallback">
+      <doc xml:whitespace="preserve">This is a callback.</doc>
+      <return-value transfer-ownership="none">
+        <doc xml:whitespace="preserve">array of ints</doc>
+        <type name="gint" c:type="gint*"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <doc xml:whitespace="preserve">array of ints</doc>
+          <type name="gint" c:type="gint*"/>
+        </parameter>
+      </parameters>
+    </callback>
+    <callback name="ForeachFunc" c:type="AnnotationForeachFunc">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="object" transfer-ownership="none">
+          <type name="Object" c:type="AnnotationObject*"/>
+        </parameter>
+        <parameter name="item" transfer-ownership="none">
+          <type name="utf8" c:type="char*"/>
+        </parameter>
+        <parameter name="user_data" transfer-ownership="none" closure="2">
+          <type name="gpointer" c:type="gpointer"/>
+        </parameter>
+      </parameters>
+    </callback>
+    <callback name="ListCallback" c:type="AnnotationListCallback">
+      <doc xml:whitespace="preserve">This is a callback taking a list.</doc>
+      <return-value transfer-ownership="container">
+        <doc xml:whitespace="preserve">list of strings</doc>
+        <type name="GLib.List" c:type="GList*">
+          <type name="utf8"/>
+        </type>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <doc xml:whitespace="preserve">list of strings</doc>
+          <type name="GLib.List" c:type="GList*">
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </callback>
+    <callback name="NotifyFunc" c:type="AnnotationNotifyFunc">
+      <doc xml:whitespace="preserve">This is a callback with a 'closure' argument that is not named
+'user_data' and hence has to be annotated.</doc>
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="data" transfer-ownership="none" closure="0">
+          <doc xml:whitespace="preserve">The user data</doc>
+          <type name="gpointer" c:type="gpointer"/>
+        </parameter>
+      </parameters>
+    </callback>
+    <class name="Object"
+           c:symbol-prefix="object"
+           c:type="AnnotationObject"
+           parent="GObject.Object"
+           glib:type-name="AnnotationObject"
+           glib:get-type="annotation_object_get_type"
+           glib:type-struct="ObjectClass">
+      <attribute name="org.example.Test" value="cows"/>
+      <doc xml:whitespace="preserve">This is an object used to test annotations.</doc>
+      <method name="allow_none" c:identifier="annotation_object_allow_none">
+        <return-value transfer-ownership="none">
+          <doc xml:whitespace="preserve">%NULL always</doc>
+          <type name="GObject.Object" c:type="GObject*"/>
+        </return-value>
+        <parameters>
+          <parameter name="somearg" transfer-ownership="none" allow-none="1">
+            <type name="utf8" c:type="gchar*"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="calleeowns" c:identifier="annotation_object_calleeowns">
+        <doc xml:whitespace="preserve">This is a test for out arguments; GObject defaults to transfer</doc>
+        <return-value transfer-ownership="none">
+          <doc xml:whitespace="preserve">an int</doc>
+          <type name="gint" c:type="gint"/>
+        </return-value>
+        <parameters>
+          <parameter name="toown"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <doc xml:whitespace="preserve">a #GObject</doc>
+            <type name="GObject.Object" c:type="GObject**"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="calleesowns" c:identifier="annotation_object_calleesowns">
+        <doc xml:whitespace="preserve">This is a test for out arguments, one transferred, other not</doc>
+        <return-value transfer-ownership="none">
+          <doc xml:whitespace="preserve">an int</doc>
+          <type name="gint" c:type="gint"/>
+        </return-value>
+        <parameters>
+          <parameter name="toown1"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <doc xml:whitespace="preserve">a #GObject</doc>
+            <type name="GObject.Object" c:type="GObject**"/>
+          </parameter>
+          <parameter name="toown2"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #GObject</doc>
+            <type name="GObject.Object" c:type="GObject**"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="compute_sum" c:identifier="annotation_object_compute_sum">
+        <doc xml:whitespace="preserve">Test taking a zero-terminated array</doc>
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="nums" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Sequence of numbers</doc>
+            <array zero-terminated="0" c:type="int*">
+              <type name="gint" c:type="int"/>
+            </array>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="compute_sum_n"
+              c:identifier="annotation_object_compute_sum_n">
+        <doc xml:whitespace="preserve">Test taking an array with length parameter</doc>
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="nums" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Sequence of numbers that are zero-terminated</doc>
+            <array length="1" zero-terminated="0" c:type="int*">
+              <type name="gint" c:type="int"/>
+            </array>
+          </parameter>
+          <parameter name="n_nums" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Length of number array</doc>
+            <type name="gint" c:type="int"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="compute_sum_nz"
+              c:identifier="annotation_object_compute_sum_nz">
+        <doc xml:whitespace="preserve">Test taking a zero-terminated array with length parameter</doc>
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="nums" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Sequence of numbers that are zero-terminated</doc>
+            <array length="1" zero-terminated="1" c:type="int*">
+              <type name="gint" c:type="int"/>
+            </array>
+          </parameter>
+          <parameter name="n_nums" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Length of number array</doc>
+            <type name="gint" c:type="int"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="create_object"
+              c:identifier="annotation_object_create_object">
+        <doc xml:whitespace="preserve">Test returning a caller-owned object</doc>
+        <return-value transfer-ownership="full">
+          <doc xml:whitespace="preserve">The object</doc>
+          <type name="GObject.Object" c:type="GObject*"/>
+        </return-value>
+      </method>
+      <method name="do_not_use"
+              c:identifier="annotation_object_do_not_use"
+              deprecated="Use annotation_object_create_object() instead."
+              deprecated-version="0.12">
+        <return-value transfer-ownership="none">
+          <doc xml:whitespace="preserve">%NULL always</doc>
+          <type name="GObject.Object" c:type="GObject*"/>
+        </return-value>
+      </method>
+      <method name="extra_annos" c:identifier="annotation_object_extra_annos">
+        <attribute name="org.foobar" value="testvalue"/>
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+      </method>
+      <method name="foreach" c:identifier="annotation_object_foreach">
+        <doc xml:whitespace="preserve">Test taking a call-scoped callback</doc>
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="func"
+                     transfer-ownership="none"
+                     scope="call"
+                     closure="1">
+            <doc xml:whitespace="preserve">Callback to invoke</doc>
+            <type name="ForeachFunc" c:type="AnnotationForeachFunc"/>
+          </parameter>
+          <parameter name="user_data" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Callback user data</doc>
+            <type name="gpointer" c:type="gpointer"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="get_hash" c:identifier="annotation_object_get_hash">
+        <doc xml:whitespace="preserve">This is a test for returning a hash table mapping strings to
+objects.</doc>
+        <return-value transfer-ownership="full">
+          <doc xml:whitespace="preserve">hash table</doc>
+          <type name="GLib.HashTable" c:type="GHashTable*">
+            <type name="utf8"/>
+            <type name="GObject.Object"/>
+          </type>
+        </return-value>
+      </method>
+      <method name="get_objects" c:identifier="annotation_object_get_objects">
+        <doc xml:whitespace="preserve">This is a test for returning a list of objects.
+The list itself should be freed, but not the internal objects,
+intentionally similar example to gtk_container_get_children</doc>
+        <return-value transfer-ownership="container">
+          <doc xml:whitespace="preserve">list of objects</doc>
+          <type name="GLib.SList" c:type="GSList*">
+            <type name="Object"/>
+          </type>
+        </return-value>
+      </method>
+      <method name="get_strings" c:identifier="annotation_object_get_strings">
+        <doc xml:whitespace="preserve">This is a test for returning a list of strings, where
+each string needs to be freed.</doc>
+        <return-value transfer-ownership="full">
+          <doc xml:whitespace="preserve">list of strings</doc>
+          <type name="GLib.List" c:type="GList*">
+            <type name="utf8"/>
+          </type>
+        </return-value>
+      </method>
+      <method name="hidden_self" c:identifier="annotation_object_hidden_self">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+      </method>
+      <method name="in" c:identifier="annotation_object_in">
+        <doc xml:whitespace="preserve">This is a test for in arguments</doc>
+        <return-value transfer-ownership="none">
+          <doc xml:whitespace="preserve">an int</doc>
+          <type name="gint" c:type="gint"/>
+        </return-value>
+        <parameters>
+          <parameter name="inarg" transfer-ownership="none">
+            <doc xml:whitespace="preserve">This is an argument test</doc>
+            <type name="gint" c:type="int*"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="inout" c:identifier="annotation_object_inout">
+        <doc xml:whitespace="preserve">This is a test for out arguments</doc>
+        <return-value transfer-ownership="none">
+          <doc xml:whitespace="preserve">an int</doc>
+          <type name="gint" c:type="gint"/>
+        </return-value>
+        <parameters>
+          <parameter name="inoutarg"
+                     direction="inout"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <doc xml:whitespace="preserve">This is an argument test</doc>
+            <type name="gint" c:type="int*"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="inout2" c:identifier="annotation_object_inout2">
+        <doc xml:whitespace="preserve">This is a second test for out arguments</doc>
+        <return-value transfer-ownership="none">
+          <doc xml:whitespace="preserve">an int</doc>
+          <type name="gint" c:type="gint"/>
+        </return-value>
+        <parameters>
+          <parameter name="inoutarg"
+                     direction="inout"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <doc xml:whitespace="preserve">This is an argument test</doc>
+            <type name="gint" c:type="int*"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="inout3" c:identifier="annotation_object_inout3">
+        <doc xml:whitespace="preserve">This is a 3th test for out arguments</doc>
+        <return-value transfer-ownership="none">
+          <doc xml:whitespace="preserve">an int</doc>
+          <type name="gint" c:type="gint"/>
+        </return-value>
+        <parameters>
+          <parameter name="inoutarg"
+                     direction="inout"
+                     caller-allocates="0"
+                     transfer-ownership="full"
+                     allow-none="1">
+            <doc xml:whitespace="preserve">This is an argument test</doc>
+            <type name="gint" c:type="int*"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="method" c:identifier="annotation_object_method">
+        <return-value transfer-ownership="none">
+          <doc xml:whitespace="preserve">an int</doc>
+          <type name="gint" c:type="gint"/>
+        </return-value>
+      </method>
+      <method name="notrans" c:identifier="annotation_object_notrans">
+        <return-value transfer-ownership="none">
+          <doc xml:whitespace="preserve">An object, not referenced</doc>
+          <type name="GObject.Object" c:type="GObject*"/>
+        </return-value>
+      </method>
+      <method name="out" c:identifier="annotation_object_out">
+        <doc xml:whitespace="preserve">This is a test for out arguments</doc>
+        <return-value transfer-ownership="none">
+          <doc xml:whitespace="preserve">an int</doc>
+          <type name="gint" c:type="gint"/>
+        </return-value>
+        <parameters>
+          <parameter name="outarg"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <doc xml:whitespace="preserve">This is an argument test</doc>
+            <type name="gint" c:type="int*"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="parse_args" c:identifier="annotation_object_parse_args">
+        <doc xml:whitespace="preserve">Test taking a zero-terminated array with length parameter</doc>
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="argc"
+                     direction="inout"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <doc xml:whitespace="preserve">Length of the argument vector</doc>
+            <type name="gint" c:type="int*"/>
+          </parameter>
+          <parameter name="argv"
+                     direction="inout"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <doc xml:whitespace="preserve">Argument vector</doc>
+            <array length="0" zero-terminated="1" c:type="char***">
+              <type name="utf8" c:type="char**"/>
+            </array>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="set_data" c:identifier="annotation_object_set_data">
+        <doc xml:whitespace="preserve">Test taking a guchar * with a length.</doc>
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="data" transfer-ownership="none">
+            <doc xml:whitespace="preserve">The data</doc>
+            <array length="1" zero-terminated="0" c:type="guchar*">
+              <type name="guint8" c:type="guchar"/>
+            </array>
+          </parameter>
+          <parameter name="length" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Length of the data</doc>
+            <type name="gsize" c:type="gsize"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="set_data2" c:identifier="annotation_object_set_data2">
+        <doc xml:whitespace="preserve">Test taking a gchar * with a length.</doc>
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="data" transfer-ownership="none">
+            <doc xml:whitespace="preserve">The data</doc>
+            <array length="1" zero-terminated="0" c:type="gchar*">
+              <type name="gint8"/>
+            </array>
+          </parameter>
+          <parameter name="length" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Length of the data</doc>
+            <type name="gsize" c:type="gsize"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="set_data3" c:identifier="annotation_object_set_data3">
+        <doc xml:whitespace="preserve">Test taking a gchar * with a length, overriding the array element
+type.</doc>
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="data" transfer-ownership="none">
+            <doc xml:whitespace="preserve">The data</doc>
+            <array length="1" zero-terminated="0" c:type="gpointer">
+              <type name="guint8"/>
+            </array>
+          </parameter>
+          <parameter name="length" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Length of the data</doc>
+            <type name="gsize" c:type="gsize"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="string_out" c:identifier="annotation_object_string_out">
+        <doc xml:whitespace="preserve">Test returning a string as an out parameter</doc>
+        <return-value transfer-ownership="none">
+          <doc xml:whitespace="preserve">some boolean</doc>
+          <type name="gboolean" c:type="gboolean"/>
+        </return-value>
+        <parameters>
+          <parameter name="str_out"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <doc xml:whitespace="preserve">string return value</doc>
+            <type name="utf8" c:type="char**"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="use_buffer" c:identifier="annotation_object_use_buffer">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="bytes" transfer-ownership="none">
+            <type name="guint8" c:type="guchar*"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="watch"
+              c:identifier="annotation_object_watch"
+              shadowed-by="watch_full"
+              introspectable="0">
+        <doc xml:whitespace="preserve">This is here just for the sake of being overriden by its
+annotation_object_watch_full().</doc>
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="func" transfer-ownership="none" closure="1">
+            <doc xml:whitespace="preserve">The callback</doc>
+            <type name="ForeachFunc" c:type="AnnotationForeachFunc"/>
+          </parameter>
+          <parameter name="user_data" transfer-ownership="none">
+            <doc xml:whitespace="preserve">The callback data</doc>
+            <type name="gpointer" c:type="gpointer"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="watch_full"
+              c:identifier="annotation_object_watch_full"
+              shadows="watch">
+        <doc xml:whitespace="preserve">Test overriding via the "Rename To" annotation.</doc>
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="func"
+                     transfer-ownership="none"
+                     scope="notified"
+                     closure="1"
+                     destroy="2">
+            <doc xml:whitespace="preserve">The callback</doc>
+            <type name="ForeachFunc" c:type="AnnotationForeachFunc"/>
+          </parameter>
+          <parameter name="user_data" transfer-ownership="none">
+            <doc xml:whitespace="preserve">The callback data</doc>
+            <type name="gpointer" c:type="gpointer"/>
+          </parameter>
+          <parameter name="destroy" transfer-ownership="none" scope="async">
+            <doc xml:whitespace="preserve">Destroy notification</doc>
+            <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="with_voidp" c:identifier="annotation_object_with_voidp">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="data" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Opaque pointer handle</doc>
+            <type name="gpointer" c:type="void*"/>
+          </parameter>
+        </parameters>
+      </method>
+      <property name="function-property"
+                writable="1"
+                construct="1"
+                transfer-ownership="none">
+        <type name="Callback"/>
+      </property>
+      <property name="string-property"
+                version="1.0"
+                deprecated="Use better-string-property instead"
+                deprecated-version="1.2"
+                writable="1"
+                construct="1"
+                transfer-ownership="none">
+        <doc xml:whitespace="preserve">This is a property which is a string</doc>
+        <type name="utf8"/>
+      </property>
+      <property name="tab-property"
+                version="1.2"
+                writable="1"
+                construct="1"
+                transfer-ownership="none">
+        <doc xml:whitespace="preserve">This is a property annotation intentionally indented with a mix
+of tabs and strings to test the tab handling capabilities of the scanner.</doc>
+        <type name="utf8"/>
+      </property>
+      <field name="parent_instance">
+        <type name="GObject.Object" c:type="GObject"/>
+      </field>
+      <glib:signal name="attribute-signal" when="last">
+        <doc xml:whitespace="preserve">This signal tests a signal with attributes.</doc>
+        <return-value transfer-ownership="full">
+          <attribute name="some.annotation.foo3" value="val3"/>
+          <doc xml:whitespace="preserve">the return value</doc>
+          <type name="utf8"/>
+        </return-value>
+        <parameters>
+          <parameter name="arg1" transfer-ownership="none">
+            <attribute name="some.annotation.foo1" value="val1"/>
+            <doc xml:whitespace="preserve">a value</doc>
+            <type name="utf8"/>
+          </parameter>
+          <parameter name="arg2" transfer-ownership="none">
+            <attribute name="some.annotation.foo2" value="val2"/>
+            <doc xml:whitespace="preserve">another value</doc>
+            <type name="utf8"/>
+          </parameter>
+        </parameters>
+      </glib:signal>
+      <glib:signal name="doc-empty-arg-parsing" when="last">
+        <doc xml:whitespace="preserve">This signal tests an empty document argument (@arg1)</doc>
+        <return-value transfer-ownership="none">
+          <type name="none"/>
+        </return-value>
+        <parameters>
+          <parameter name="object" transfer-ownership="none">
+            <type name="gpointer"/>
+          </parameter>
+        </parameters>
+      </glib:signal>
+      <glib:signal name="list-signal" when="last">
+        <doc xml:whitespace="preserve">This is a signal which takes a list of strings, but it's not
+known by GObject as it's only marked as G_TYPE_POINTER</doc>
+        <return-value transfer-ownership="none">
+          <type name="none"/>
+        </return-value>
+        <parameters>
+          <parameter name="list" transfer-ownership="container">
+            <doc xml:whitespace="preserve">a list of strings</doc>
+            <type name="GLib.List">
+              <type name="utf8"/>
+            </type>
+          </parameter>
+        </parameters>
+      </glib:signal>
+      <glib:signal name="string-signal"
+                   when="last"
+                   version="1.0"
+                   deprecated="Use other-signal instead"
+                   deprecated-version="1.2">
+        <doc xml:whitespace="preserve">This is a signal which has a broken signal handler,
+it says it's pointer but it's actually a string.</doc>
+        <return-value transfer-ownership="none">
+          <type name="none"/>
+        </return-value>
+        <parameters>
+          <parameter name="string" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a string</doc>
+            <type name="utf8"/>
+          </parameter>
+        </parameters>
+      </glib:signal>
+    </class>
+    <record name="ObjectClass"
+            c:type="AnnotationObjectClass"
+            glib:is-gtype-struct-for="Object">
+      <field name="parent_class">
+        <type name="GObject.ObjectClass" c:type="GObjectClass"/>
+      </field>
+    </record>
+    <record name="Struct" c:type="AnnotationStruct">
+      <doc xml:whitespace="preserve">This is a test of an array of object in an field of a struct.</doc>
+      <field name="objects" writable="1">
+        <array zero-terminated="0" c:type="AnnotationObject" fixed-size="10">
+          <type name="Object" c:type="AnnotationObject*"/>
+        </array>
+      </field>
+    </record>
+    <function name="attribute_func" c:identifier="annotation_attribute_func">
+      <return-value transfer-ownership="none">
+        <attribute name="some.other.annotation" value="value2"/>
+        <attribute name="yet.another.annotation" value="another_value"/>
+        <doc xml:whitespace="preserve">The return value.</doc>
+        <type name="gint" c:type="gint"/>
+      </return-value>
+      <parameters>
+        <parameter name="object" transfer-ownership="none">
+          <doc xml:whitespace="preserve">A #AnnotationObject.</doc>
+          <type name="Object" c:type="AnnotationObject*"/>
+        </parameter>
+        <parameter name="data" transfer-ownership="none">
+          <attribute name="some.annotation" value="value"/>
+          <attribute name="another.annotation" value="blahvalue"/>
+          <doc xml:whitespace="preserve">Some data.</doc>
+          <type name="utf8" c:type="gchar*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="custom_destroy" c:identifier="annotation_custom_destroy">
+      <doc xml:whitespace="preserve">Test messing up the heuristic of closure/destroy-notification
+detection, and fixing it via annotations.</doc>
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="callback"
+                   transfer-ownership="none"
+                   scope="notified"
+                   closure="2"
+                   destroy="1">
+          <doc xml:whitespace="preserve">Destroy notification</doc>
+          <type name="Callback" c:type="AnnotationCallback"/>
+        </parameter>
+        <parameter name="destroy"
+                   transfer-ownership="none"
+                   scope="notified"
+                   closure="2">
+          <type name="NotifyFunc" c:type="AnnotationNotifyFunc"/>
+        </parameter>
+        <parameter name="data" transfer-ownership="none">
+          <type name="gpointer" c:type="gpointer"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="get_source_file" c:identifier="annotation_get_source_file">
+      <return-value transfer-ownership="full">
+        <doc xml:whitespace="preserve">Source file</doc>
+        <type name="filename" c:type="char*"/>
+      </return-value>
+    </function>
+    <function name="init" c:identifier="annotation_init">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="argc"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <doc xml:whitespace="preserve">The number of args.</doc>
+          <type name="gint" c:type="int*"/>
+        </parameter>
+        <parameter name="argv"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <doc xml:whitespace="preserve">The arguments.</doc>
+          <array length="0" zero-terminated="0" c:type="char***">
+            <type name="utf8" c:type="char**"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="invalid_annotation"
+              c:identifier="annotation_invalid_annotation">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="foo" transfer-ownership="none">
+          <doc xml:whitespace="preserve">some text (e.g. example) or else</doc>
+          <type name="gint" c:type="int"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="ptr_array"
+              c:identifier="annotation_ptr_array"
+              introspectable="0">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="array" transfer-ownership="none">
+          <doc xml:whitespace="preserve">the array</doc>
+          <array name="GLib.PtrArray" c:type="GPtrArray*">
+            <type name="GLib.Value"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="return_array" c:identifier="annotation_return_array">
+      <return-value transfer-ownership="full">
+        <doc xml:whitespace="preserve">The return value</doc>
+        <array length="0" zero-terminated="0" c:type="char**">
+          <type name="utf8"/>
+        </array>
+      </return-value>
+      <parameters>
+        <parameter name="length"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <doc xml:whitespace="preserve">Number of return values</doc>
+          <type name="gint" c:type="int*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="return_filename" c:identifier="annotation_return_filename">
+      <return-value transfer-ownership="full">
+        <doc xml:whitespace="preserve">An annotated filename</doc>
+        <type name="filename" c:type="gchar*"/>
+      </return-value>
+    </function>
+    <function name="set_source_file" c:identifier="annotation_set_source_file">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="fname" transfer-ownership="none">
+          <doc xml:whitespace="preserve">Source file</doc>
+          <type name="filename" c:type="char*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="space_after_comment_bug631690"
+              c:identifier="annotation_space_after_comment_bug631690">
+      <doc xml:whitespace="preserve">Explicitly test having a space after the ** here.</doc>
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+    </function>
+    <function name="string_array_length"
+              c:identifier="annotation_string_array_length">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="n_properties" transfer-ownership="none">
+          <type name="guint" c:type="guint"/>
+        </parameter>
+        <parameter name="properties" transfer-ownership="none">
+          <array length="0" zero-terminated="0" c:type="gchar*">
+            <type name="utf8"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="string_zero_terminated"
+              c:identifier="annotation_string_zero_terminated">
+      <return-value transfer-ownership="full">
+        <doc xml:whitespace="preserve">The return value</doc>
+        <array c:type="char**">
+          <type name="utf8"/>
+        </array>
+      </return-value>
+    </function>
+    <function name="string_zero_terminated_out"
+              c:identifier="annotation_string_zero_terminated_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="out"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <array c:type="char***">
+            <type name="utf8" c:type="char**"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_parsing_bug630862"
+              c:identifier="annotation_test_parsing_bug630862">
+      <doc xml:whitespace="preserve">See https://bugzilla.gnome.org/show_bug.cgi?id=630862</doc>
+      <return-value transfer-ownership="none">
+        <doc xml:whitespace="preserve">An object, note the colon:in here</doc>
+        <type name="GObject.Object" c:type="GObject*"/>
+      </return-value>
+    </function>
+    <function name="transfer_floating"
+              c:identifier="annotation_transfer_floating">
+      <return-value transfer-ownership="none">
+        <doc xml:whitespace="preserve">A floating object</doc>
+        <type name="GObject.Object" c:type="GObject*"/>
+      </return-value>
+    </function>
+    <function name="versioned"
+              c:identifier="annotation_versioned"
+              version="0.6">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+    </function>
+  </namespace>
+</repository>
diff --git a/tests/scanner/Bar-1.0-expected.gir b/tests/scanner/Bar-1.0-expected.gir
new file mode 100644 (file)
index 0000000..392a303
--- /dev/null
@@ -0,0 +1,82 @@
+<?xml version="1.0"?>
+<!-- This file was automatically generated from C sources - DO NOT EDIT!
+To affect the contents of this file, edit the original C definitions,
+and/or use gtk-doc annotations.  -->
+<repository version="1.2"
+            xmlns="http://www.gtk.org/introspection/core/1.0"
+            xmlns:c="http://www.gtk.org/introspection/c/1.0"
+            xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
+  <include name="GLib" version="2.0"/>
+  <include name="GObject" version="2.0"/>
+  <package name="gobject-2.0"/>
+  <namespace name="Bar"
+             version="1.0"
+             shared-library=""
+             c:identifier-prefixes="Bar"
+             c:symbol-prefixes="bar">
+    <class name="Baz"
+           c:symbol-prefix="baz"
+           c:type="BarBaz"
+           parent="GObject.Object"
+           glib:type-name="BarBaz"
+           glib:get-type="bar_baz_get_type"
+           glib:type-struct="BazClass">
+      <field name="parent_instance">
+        <type name="GObject.Object" c:type="GObject"/>
+      </field>
+    </class>
+    <record name="BazClass"
+            c:type="BarBazClass"
+            glib:is-gtype-struct-for="Baz">
+      <field name="parent_class">
+        <type name="GObject.ObjectClass" c:type="GObjectClass"/>
+      </field>
+    </record>
+    <class name="MutterWindow"
+           c:symbol-prefix="mutter_window"
+           c:type="MutterWindow"
+           parent="GObject.Object"
+           glib:type-name="MutterWindow"
+           glib:get-type="mutter_window_get_type"
+           glib:type-struct="MutterWindowClass">
+      <method name="func" c:identifier="mutter_window_func">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="v" transfer-ownership="none">
+            <type name="guint" c:type="guint"/>
+          </parameter>
+        </parameters>
+      </method>
+      <field name="parent_instance">
+        <type name="GObject.Object" c:type="GObject"/>
+      </field>
+    </class>
+    <record name="MutterWindowClass"
+            c:type="MutterWindowClass"
+            glib:is-gtype-struct-for="MutterWindow">
+      <field name="parent_class">
+        <type name="GObject.ObjectClass" c:type="GObjectClass"/>
+      </field>
+    </record>
+    <function name="app_func" c:identifier="bar_app_func">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+    </function>
+    <function name="app_func2" c:identifier="bar_app_func2">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="x" transfer-ownership="none">
+          <type name="gint" c:type="int"/>
+        </parameter>
+        <parameter name="y" transfer-ownership="none">
+          <type name="gdouble" c:type="double"/>
+        </parameter>
+      </parameters>
+    </function>
+  </namespace>
+</repository>
diff --git a/tests/scanner/Foo-1.0-expected.gir b/tests/scanner/Foo-1.0-expected.gir
new file mode 100644 (file)
index 0000000..826d676
--- /dev/null
@@ -0,0 +1,1254 @@
+<?xml version="1.0"?>
+<!-- This file was automatically generated from C sources - DO NOT EDIT!
+To affect the contents of this file, edit the original C definitions,
+and/or use gtk-doc annotations.  -->
+<repository version="1.2"
+            xmlns="http://www.gtk.org/introspection/core/1.0"
+            xmlns:c="http://www.gtk.org/introspection/c/1.0"
+            xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
+  <include name="GLib" version="2.0"/>
+  <include name="GObject" version="2.0"/>
+  <include name="Gio" version="2.0"/>
+  <include name="Utility" version="1.0"/>
+  <package name="gobject-2.0"/>
+  <c:include name="foo.h"/>
+  <namespace name="Foo"
+             version="1.0"
+             shared-library="libfoo.so"
+             c:identifier-prefixes="Foo"
+             c:symbol-prefixes="foo">
+    <alias name="ObjectCookie" c:type="FooObjectCookie">
+      <type name="gpointer" c:type="gpointer"/>
+    </alias>
+    <alias name="XEvent" c:type="FooXEvent">
+      <type name="gpointer" c:type="gpointer"/>
+    </alias>
+    <enumeration name="ASingle" c:type="FooASingle">
+      <member name="some_single_enum"
+              value="0"
+              c:identifier="FOO_SOME_SINGLE_ENUM"/>
+    </enumeration>
+    <enumeration name="AddressType" c:type="FooAddressType">
+      <member name="invalid" value="0" c:identifier="FOO_ADDRESS_INVALID"/>
+      <member name="ipv4" value="1" c:identifier="FOO_ADDRESS_IPV4"/>
+      <member name="ipv6" value="2" c:identifier="FOO_ADDRESS_IPV6"/>
+    </enumeration>
+    <record name="BRect"
+            c:type="FooBRect"
+            glib:type-name="FooBRect"
+            glib:get-type="foo_brect_get_type"
+            c:symbol-prefix="brect">
+      <field name="x" writable="1">
+        <type name="gdouble" c:type="double"/>
+      </field>
+      <field name="y" writable="1">
+        <type name="gdouble" c:type="double"/>
+      </field>
+      <constructor name="new" c:identifier="foo_brect_new">
+        <return-value transfer-ownership="full">
+          <type name="BRect" c:type="FooBRect*"/>
+        </return-value>
+        <parameters>
+          <parameter name="x" transfer-ownership="none">
+            <type name="gdouble" c:type="double"/>
+          </parameter>
+          <parameter name="y" transfer-ownership="none">
+            <type name="gdouble" c:type="double"/>
+          </parameter>
+        </parameters>
+      </constructor>
+      <method name="add" c:identifier="foo_brect_add">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="b2" transfer-ownership="none">
+            <type name="BRect" c:type="FooBRect*"/>
+          </parameter>
+        </parameters>
+      </method>
+    </record>
+    <union name="BUnion"
+           c:type="FooBUnion"
+           glib:type-name="FooBUnion"
+           glib:get-type="foo_bunion_get_type"
+           c:symbol-prefix="bunion">
+      <field name="type" writable="1">
+        <type name="gint" c:type="int"/>
+      </field>
+      <field name="v" writable="1">
+        <type name="gdouble" c:type="double"/>
+      </field>
+      <field name="rect" writable="1">
+        <type name="BRect" c:type="FooBRect*"/>
+      </field>
+      <constructor name="new" c:identifier="foo_bunion_new">
+        <return-value transfer-ownership="full">
+          <type name="BUnion" c:type="FooBUnion*"/>
+        </return-value>
+      </constructor>
+      <method name="get_contained_type"
+              c:identifier="foo_bunion_get_contained_type">
+        <return-value transfer-ownership="none">
+          <type name="gint" c:type="int"/>
+        </return-value>
+      </method>
+    </union>
+    <record name="Boxed"
+            c:type="FooBoxed"
+            glib:type-name="FooBoxed"
+            glib:get-type="foo_boxed_get_type"
+            c:symbol-prefix="boxed">
+      <constructor name="new" c:identifier="foo_boxed_new">
+        <return-value transfer-ownership="full">
+          <type name="Boxed" c:type="FooBoxed*"/>
+        </return-value>
+      </constructor>
+      <method name="method" c:identifier="foo_boxed_method">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+      </method>
+    </record>
+    <class name="Buffer"
+           c:symbol-prefix="buffer"
+           c:type="FooBuffer"
+           parent="Object"
+           glib:type-name="FooBuffer"
+           glib:get-type="foo_buffer_get_type"
+           glib:type-struct="BufferClass">
+      <implements name="Interface"/>
+      <method name="some_method" c:identifier="foo_buffer_some_method">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+      </method>
+    </class>
+    <record name="BufferClass"
+            c:type="FooBufferClass"
+            disguised="1"
+            glib:is-gtype-struct-for="Buffer">
+    </record>
+    <callback name="Callback" c:type="FooCallback">
+      <return-value transfer-ownership="none">
+        <type name="gboolean" c:type="gboolean"/>
+      </return-value>
+      <parameters>
+        <parameter name="foo" transfer-ownership="none">
+          <type name="Object" c:type="FooObject*"/>
+        </parameter>
+        <parameter name="b" transfer-ownership="none">
+          <type name="gboolean" c:type="gboolean"/>
+        </parameter>
+        <parameter name="data" transfer-ownership="none">
+          <type name="gpointer" c:type="gpointer"/>
+        </parameter>
+      </parameters>
+    </callback>
+    <record name="DBusData"
+            c:type="FooDBusData"
+            glib:type-name="FooDBusData"
+            glib:get-type="foo_dbus_data_get_type"
+            c:symbol-prefix="dbus_data">
+      <method name="method" c:identifier="foo_dbus_data_method">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+      </method>
+    </record>
+    <constant name="DEFINE_SHOULD_BE_EXPOSED"
+              value="should be exposed"
+              c:type="FOO_DEFINE_SHOULD_BE_EXPOSED">
+      <type name="utf8" c:type="gchar*"/>
+    </constant>
+    <enumeration name="EnumFullname" c:type="FooEnumFullname">
+      <member name="one" value="1" c:identifier="FOO_ENUM_FULLNAME_ONE"/>
+      <member name="two" value="2" c:identifier="FOO_ENUM_FULLNAME_TWO"/>
+      <member name="three" value="3" c:identifier="FOO_ENUM_FULLNAME_THREE"/>
+    </enumeration>
+    <enumeration name="EnumNoType" c:type="FooEnumNoType">
+      <member name="un" value="1" c:identifier="FOO_ENUM_UN"/>
+      <member name="deux" value="2" c:identifier="FOO_ENUM_DEUX"/>
+      <member name="trois" value="3" c:identifier="FOO_ENUM_TROIS"/>
+      <member name="neuf" value="9" c:identifier="FOO_ENUM_NEUF"/>
+    </enumeration>
+    <enumeration name="EnumType"
+                 glib:type-name="FooEnumType"
+                 glib:get-type="foo_enum_type_get_type"
+                 c:type="FooEnumType">
+      <member name="alpha"
+              value="0"
+              c:identifier="FOO_ENUM_ALPHA"
+              glib:nick="alpha"/>
+      <member name="beta"
+              value="1"
+              c:identifier="FOO_ENUM_BETA"
+              glib:nick="beta"/>
+      <member name="delta"
+              value="2"
+              c:identifier="FOO_ENUM_DELTA"
+              glib:nick="delta"/>
+      <function name="method" c:identifier="foo_enum_type_method">
+        <return-value transfer-ownership="none">
+          <type name="gint" c:type="int"/>
+        </return-value>
+        <parameters>
+          <parameter name="foo_enum" transfer-ownership="none">
+            <type name="EnumType" c:type="FooEnumType"/>
+          </parameter>
+        </parameters>
+      </function>
+      <function name="returnv" c:identifier="foo_enum_type_returnv">
+        <return-value transfer-ownership="none">
+          <type name="EnumType" c:type="FooEnumType"/>
+        </return-value>
+        <parameters>
+          <parameter name="x" transfer-ownership="none">
+            <type name="gint" c:type="int"/>
+          </parameter>
+        </parameters>
+      </function>
+    </enumeration>
+    <enumeration name="Error"
+                 glib:type-name="FooError"
+                 glib:get-type="foo_error_get_type"
+                 c:type="FooError"
+                 glib:error-domain="foo-error-quark">
+      <member name="good"
+              value="0"
+              c:identifier="FOO_ERROR_GOOD"
+              glib:nick="good"/>
+      <member name="bad"
+              value="1"
+              c:identifier="FOO_ERROR_BAD"
+              glib:nick="bad"/>
+      <member name="ugly"
+              value="2"
+              c:identifier="FOO_ERROR_UGLY"
+              glib:nick="ugly"/>
+      <function name="quark" c:identifier="foo_error_quark">
+        <return-value transfer-ownership="none">
+          <type name="GLib.Quark" c:type="GQuark"/>
+        </return-value>
+      </function>
+    </enumeration>
+    <union name="Event" c:type="FooEvent">
+      <field name="type" writable="1">
+        <type name="gint" c:type="int"/>
+      </field>
+      <field name="any" writable="1">
+        <type name="EventAny" c:type="FooEventAny"/>
+      </field>
+      <field name="expose" writable="1">
+        <type name="EventExpose" c:type="FooEventExpose"/>
+      </field>
+    </union>
+    <record name="EventAny" c:type="FooEventAny">
+      <field name="send_event" writable="1">
+        <type name="gint8" c:type="gint8"/>
+      </field>
+    </record>
+    <record name="EventExpose" c:type="FooEventExpose">
+      <field name="send_event" writable="1">
+        <type name="gint8" c:type="gint8"/>
+      </field>
+      <field name="count" writable="1">
+        <type name="gint" c:type="gint"/>
+      </field>
+    </record>
+    <bitfield name="FlagsNoType" c:type="FooFlagsNoType">
+      <member name="ett" value="1" c:identifier="FOO_FLAGS_ETT"/>
+      <member name="tva" value="2" c:identifier="FOO_FLAGS_TVA"/>
+      <member name="fyra" value="4" c:identifier="FOO_FLAGS_FYRA"/>
+    </bitfield>
+    <bitfield name="FlagsType"
+              glib:type-name="FooFlagsType"
+              glib:get-type="foo_flags_type_get_type"
+              c:type="FooFlagsType">
+      <member name="first"
+              value="1"
+              c:identifier="FOO_FLAGS_FIRST"
+              glib:nick="first"/>
+      <member name="second"
+              value="2"
+              c:identifier="FOO_FLAGS_SECOND"
+              glib:nick="second"/>
+      <member name="third"
+              value="4"
+              c:identifier="FOO_FLAGS_THIRD"
+              glib:nick="third"/>
+    </bitfield>
+    <record name="ForeignStruct" c:type="FooForeignStruct" foreign="1">
+      <field name="foo" writable="1">
+        <type name="gint" c:type="int"/>
+      </field>
+      <constructor name="new" c:identifier="foo_foreign_struct_new">
+        <return-value transfer-ownership="full">
+          <type name="ForeignStruct" c:type="FooForeignStruct*"/>
+        </return-value>
+      </constructor>
+      <method name="copy" c:identifier="foo_foreign_struct_copy">
+        <return-value transfer-ownership="full">
+          <type name="ForeignStruct" c:type="FooForeignStruct*"/>
+        </return-value>
+      </method>
+    </record>
+    <interface name="Interface"
+               c:symbol-prefix="interface"
+               c:type="FooInterface"
+               glib:type-name="FooInterface"
+               glib:get-type="foo_interface_get_type"
+               glib:type-struct="InterfaceIface">
+      <function name="static_method"
+                c:identifier="foo_interface_static_method">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="x" transfer-ownership="none">
+            <type name="gint" c:type="int"/>
+          </parameter>
+        </parameters>
+      </function>
+      <virtual-method name="do_foo" invoker="do_foo">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="x" transfer-ownership="none">
+            <type name="gint" c:type="int"/>
+          </parameter>
+        </parameters>
+      </virtual-method>
+      <method name="do_foo" c:identifier="foo_interface_do_foo">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="x" transfer-ownership="none">
+            <type name="gint" c:type="int"/>
+          </parameter>
+        </parameters>
+      </method>
+    </interface>
+    <record name="InterfaceIface"
+            c:type="FooInterfaceIface"
+            glib:is-gtype-struct-for="Interface">
+      <field name="parent_iface">
+        <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
+      </field>
+      <field name="do_foo">
+        <callback name="do_foo">
+          <return-value transfer-ownership="none">
+            <type name="none" c:type="void"/>
+          </return-value>
+          <parameters>
+            <parameter name="self" transfer-ownership="none">
+              <type name="Interface" c:type="FooInterface*"/>
+            </parameter>
+            <parameter name="x" transfer-ownership="none">
+              <type name="gint" c:type="int"/>
+            </parameter>
+          </parameters>
+        </callback>
+      </field>
+    </record>
+    <class name="Object"
+           c:symbol-prefix="object"
+           c:type="FooObject"
+           parent="GObject.Object"
+           glib:type-name="FooObject"
+           glib:get-type="foo_object_get_type"
+           glib:type-struct="ObjectClass">
+      <implements name="Interface"/>
+      <constructor name="new" c:identifier="foo_object_new">
+        <return-value transfer-ownership="full">
+          <type name="Object" c:type="FooObject*"/>
+        </return-value>
+      </constructor>
+      <constructor name="new_as_super" c:identifier="foo_object_new_as_super">
+        <return-value transfer-ownership="full">
+          <type name="GObject.Object" c:type="GObject*"/>
+        </return-value>
+      </constructor>
+      <function name="a_global_method"
+                c:identifier="foo_object_a_global_method">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="obj" transfer-ownership="none">
+            <type name="Utility.Object" c:type="UtilityObject*"/>
+          </parameter>
+        </parameters>
+      </function>
+      <function name="get_default" c:identifier="foo_object_get_default">
+        <doc xml:whitespace="preserve">This function is intended to match clutter_stage_get_default which
+uses a C sugar return type.</doc>
+        <return-value transfer-ownership="none">
+          <doc xml:whitespace="preserve">The global #FooSubobject</doc>
+          <type name="Subobject" c:type="FooObject*"/>
+        </return-value>
+      </function>
+      <function name="static_meth" c:identifier="foo_object_static_meth">
+        <return-value transfer-ownership="none">
+          <type name="gint" c:type="int"/>
+        </return-value>
+      </function>
+      <virtual-method name="read_fn" invoker="read">
+        <doc xml:whitespace="preserve">Read some stuff.</doc>
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="offset" transfer-ownership="none">
+            <doc xml:whitespace="preserve">offset</doc>
+            <type name="gint" c:type="int"/>
+          </parameter>
+          <parameter name="length" transfer-ownership="none">
+            <doc xml:whitespace="preserve">length</doc>
+            <type name="gint" c:type="int"/>
+          </parameter>
+        </parameters>
+      </virtual-method>
+      <virtual-method name="virtual_method" invoker="virtual_method">
+        <return-value transfer-ownership="none">
+          <type name="gboolean" c:type="gboolean"/>
+        </return-value>
+        <parameters>
+          <parameter name="first_param" transfer-ownership="none">
+            <type name="gint" c:type="int"/>
+          </parameter>
+        </parameters>
+      </virtual-method>
+      <method name="append_new_stack_layer"
+              c:identifier="foo_object_append_new_stack_layer">
+        <doc xml:whitespace="preserve">This shouldn't be scanned as a constructor.</doc>
+        <return-value transfer-ownership="none">
+          <type name="OtherObject" c:type="FooOtherObject*"/>
+        </return-value>
+        <parameters>
+          <parameter name="x" transfer-ownership="none">
+            <type name="gint" c:type="int"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="dup_name" c:identifier="foo_object_dup_name">
+        <return-value transfer-ownership="full">
+          <type name="utf8" c:type="char*"/>
+        </return-value>
+      </method>
+      <method name="external_type" c:identifier="foo_object_external_type">
+        <return-value transfer-ownership="none">
+          <doc xml:whitespace="preserve">%NULL always</doc>
+          <type name="Utility.Object" c:type="UtilityObject*"/>
+        </return-value>
+      </method>
+      <method name="get_name" c:identifier="foo_object_get_name">
+        <return-value transfer-ownership="none">
+          <type name="utf8" c:type="char*"/>
+        </return-value>
+      </method>
+      <method name="handle_glyph" c:identifier="foo_object_handle_glyph">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="glyph" transfer-ownership="none">
+            <type name="Utility.Glyph" c:type="UtilityGlyph"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="is_it_time_yet" c:identifier="foo_object_is_it_time_yet">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="time" transfer-ownership="none">
+            <type name="glong" c:type="time_t"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="new_cookie"
+              c:identifier="foo_object_new_cookie"
+              introspectable="0">
+        <doc xml:whitespace="preserve">Not sure why this test is here...</doc>
+        <return-value>
+          <type name="ObjectCookie" c:type="FooObjectCookie"/>
+        </return-value>
+        <parameters>
+          <parameter name="target" transfer-ownership="none">
+            <type name="utf8" c:type="char*"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="read" c:identifier="foo_object_read">
+        <doc xml:whitespace="preserve">Read some stuff.</doc>
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="offset" transfer-ownership="none">
+            <doc xml:whitespace="preserve">offset</doc>
+            <type name="gint" c:type="int"/>
+          </parameter>
+          <parameter name="length" transfer-ownership="none">
+            <doc xml:whitespace="preserve">length</doc>
+            <type name="gint" c:type="int"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="skipped_method"
+              c:identifier="foo_object_skipped_method"
+              introspectable="0">
+        <doc xml:whitespace="preserve">This is only useful from C.</doc>
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+      </method>
+      <method name="take_all"
+              c:identifier="foo_object_take_all"
+              introspectable="0">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="x" transfer-ownership="none">
+            <type name="gint" c:type="int"/>
+          </parameter>
+          <parameter transfer-ownership="none">
+            <varargs>
+            </varargs>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="various" c:identifier="foo_object_various">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="data" transfer-ownership="none">
+            <type name="gpointer" c:type="void*"/>
+          </parameter>
+          <parameter name="some_type" transfer-ownership="none">
+            <type name="GType" c:type="GType"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="virtual_method" c:identifier="foo_object_virtual_method">
+        <return-value transfer-ownership="none">
+          <type name="gboolean" c:type="gboolean"/>
+        </return-value>
+        <parameters>
+          <parameter name="first_param" transfer-ownership="none">
+            <type name="gint" c:type="int"/>
+          </parameter>
+        </parameters>
+      </method>
+      <property name="hidden"
+                introspectable="0"
+                writable="1"
+                construct-only="1"
+                transfer-ownership="none">
+        <type/>
+      </property>
+      <property name="string"
+                writable="1"
+                construct="1"
+                transfer-ownership="none">
+        <type name="utf8"/>
+      </property>
+      <field name="parent_instance">
+        <type name="GObject.Object" c:type="GObject"/>
+      </field>
+      <field name="some_int">
+        <type name="gint" c:type="int"/>
+      </field>
+      <glib:signal name="signal" when="last">
+        <return-value transfer-ownership="full">
+          <type name="utf8"/>
+        </return-value>
+        <parameters>
+          <parameter name="object" transfer-ownership="none">
+            <type name="GObject.Object"/>
+          </parameter>
+          <parameter name="p0" transfer-ownership="none">
+            <type name="gpointer"/>
+          </parameter>
+        </parameters>
+      </glib:signal>
+    </class>
+    <record name="ObjectClass"
+            c:type="FooObjectClass"
+            glib:is-gtype-struct-for="Object">
+      <field name="parent_class">
+        <type name="GObject.ObjectClass" c:type="GObjectClass"/>
+      </field>
+      <field name="virtual_method">
+        <callback name="virtual_method">
+          <return-value transfer-ownership="none">
+            <type name="gboolean" c:type="gboolean"/>
+          </return-value>
+          <parameters>
+            <parameter name="object" transfer-ownership="none">
+              <type name="Object" c:type="FooObject*"/>
+            </parameter>
+            <parameter name="first_param" transfer-ownership="none">
+              <type name="gint" c:type="int"/>
+            </parameter>
+          </parameters>
+        </callback>
+      </field>
+      <field name="read_fn">
+        <callback name="read_fn">
+          <return-value transfer-ownership="none">
+            <type name="none" c:type="void"/>
+          </return-value>
+          <parameters>
+            <parameter name="object" transfer-ownership="none">
+              <type name="Object" c:type="FooObject*"/>
+            </parameter>
+            <parameter name="offset" transfer-ownership="none">
+              <doc xml:whitespace="preserve">offset</doc>
+              <type name="gint" c:type="int"/>
+            </parameter>
+            <parameter name="length" transfer-ownership="none">
+              <doc xml:whitespace="preserve">length</doc>
+              <type name="gint" c:type="int"/>
+            </parameter>
+          </parameters>
+        </callback>
+      </field>
+      <field name="_reserved">
+        <array zero-terminated="0" c:type="GCallback" fixed-size="4">
+          <type name="GObject.Callback" c:type="GCallback"/>
+        </array>
+      </field>
+    </record>
+    <class name="OtherObject"
+           c:symbol-prefix="other_object"
+           c:type="FooOtherObject"
+           parent="GObject.Object"
+           glib:type-name="FooOtherObject"
+           glib:get-type="foo_other_object_get_type"
+           glib:type-struct="OtherObjectClass">
+    </class>
+    <record name="OtherObjectClass"
+            c:type="FooOtherObjectClass"
+            disguised="1"
+            glib:is-gtype-struct-for="OtherObject">
+    </record>
+    <constant name="PIE_IS_TASTY" value="3.141590" c:type="FOO_PIE_IS_TASTY">
+      <type name="gdouble" c:type="gdouble"/>
+    </constant>
+    <record name="Rectangle" c:type="FooRectangle">
+      <field name="x" writable="1">
+        <type name="gint" c:type="gint"/>
+      </field>
+      <field name="y" writable="1">
+        <type name="gint" c:type="gint"/>
+      </field>
+      <field name="width" writable="1">
+        <type name="gint" c:type="gint"/>
+      </field>
+      <field name="height" writable="1">
+        <type name="gint" c:type="gint"/>
+      </field>
+      <method name="add" c:identifier="foo_rectangle_add">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="r2" transfer-ownership="none">
+            <doc xml:whitespace="preserve">source rectangle</doc>
+            <type name="Rectangle" c:type="FooRectangle*"/>
+          </parameter>
+        </parameters>
+      </method>
+      <function name="new" c:identifier="foo_rectangle_new" introspectable="0">
+        <doc xml:whitespace="preserve">This is a C convenience constructor; we have to (skip)
+it because it's not a boxed type.</doc>
+        <return-value>
+          <type name="Rectangle" c:type="FooRectangle*"/>
+        </return-value>
+        <parameters>
+          <parameter name="x" transfer-ownership="none">
+            <type name="gint" c:type="int"/>
+          </parameter>
+          <parameter name="y" transfer-ownership="none">
+            <type name="gint" c:type="int"/>
+          </parameter>
+          <parameter name="width" transfer-ownership="none">
+            <type name="gint" c:type="int"/>
+          </parameter>
+          <parameter name="height" transfer-ownership="none">
+            <type name="gint" c:type="int"/>
+          </parameter>
+        </parameters>
+      </function>
+    </record>
+    <constant name="SUCCESS_INT" value="4408" c:type="FOO_SUCCESS_INT">
+      <type name="gint" c:type="gint"/>
+    </constant>
+    <enumeration name="Skippable" introspectable="0" c:type="FooSkippable">
+      <doc xml:whitespace="preserve">Some type that is only interesting from C and should not be
+exposed to language bindings.</doc>
+      <member name="one" value="0" c:identifier="FOO_SKIPPABLE_ONE"/>
+      <member name="two" value="1" c:identifier="FOO_SKIPPABLE_TWO"/>
+    </enumeration>
+    <enumeration name="StackLayer" c:type="FooStackLayer">
+      <member name="desktop" value="0" c:identifier="FOO_LAYER_DESKTOP"/>
+      <member name="bottom" value="1" c:identifier="FOO_LAYER_BOTTOM"/>
+      <member name="normal" value="2" c:identifier="FOO_LAYER_NORMAL"/>
+      <member name="top" value="4" c:identifier="FOO_LAYER_TOP"/>
+      <member name="dock" value="4" c:identifier="FOO_LAYER_DOCK"/>
+      <member name="fullscreen" value="5" c:identifier="FOO_LAYER_FULLSCREEN"/>
+      <member name="focused_window"
+              value="6"
+              c:identifier="FOO_LAYER_FOCUSED_WINDOW"/>
+      <member name="override_redirect"
+              value="7"
+              c:identifier="FOO_LAYER_OVERRIDE_REDIRECT"/>
+      <member name="last" value="8" c:identifier="FOO_LAYER_LAST"/>
+    </enumeration>
+    <record name="Struct" c:type="FooStruct">
+      <field name="priv" writable="1">
+        <type name="StructPrivate" c:type="FooStructPrivate*"/>
+      </field>
+      <field name="member" writable="1">
+        <type name="gint" c:type="int"/>
+      </field>
+    </record>
+    <record name="StructPrivate" c:type="FooStructPrivate" disguised="1">
+    </record>
+    <interface name="SubInterface"
+               c:symbol-prefix="sub_interface"
+               c:type="FooSubInterface"
+               glib:type-name="FooSubInterface"
+               glib:get-type="foo_sub_interface_get_type"
+               glib:type-struct="SubInterfaceIface">
+      <prerequisite name="Interface"/>
+      <virtual-method name="destroy_event">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+      </virtual-method>
+      <virtual-method name="do_bar" invoker="do_bar">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+      </virtual-method>
+      <virtual-method name="do_baz" invoker="do_baz">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="callback"
+                     transfer-ownership="none"
+                     scope="call"
+                     closure="1">
+            <type name="GObject.Callback" c:type="GCallback"/>
+          </parameter>
+          <parameter name="data" transfer-ownership="none">
+            <type name="gpointer" c:type="gpointer"/>
+          </parameter>
+        </parameters>
+      </virtual-method>
+      <virtual-method name="do_moo" invoker="do_moo">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter transfer-ownership="none">
+            <type name="gint" c:type="int"/>
+          </parameter>
+          <parameter transfer-ownership="none">
+            <type name="gpointer" c:type="gpointer"/>
+          </parameter>
+        </parameters>
+      </virtual-method>
+      <method name="do_bar" c:identifier="foo_sub_interface_do_bar">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+      </method>
+      <method name="do_baz" c:identifier="foo_sub_interface_do_baz">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="callback"
+                     transfer-ownership="none"
+                     scope="call"
+                     closure="1">
+            <type name="GObject.Callback" c:type="GCallback"/>
+          </parameter>
+          <parameter name="data" transfer-ownership="none">
+            <type name="gpointer" c:type="gpointer"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="do_moo" c:identifier="foo_sub_interface_do_moo">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter transfer-ownership="none">
+            <type name="gint" c:type="int"/>
+          </parameter>
+          <parameter transfer-ownership="none">
+            <type name="gpointer" c:type="gpointer"/>
+          </parameter>
+        </parameters>
+      </method>
+      <glib:signal name="destroy-event" when="last">
+        <return-value transfer-ownership="none">
+          <type name="none"/>
+        </return-value>
+      </glib:signal>
+    </interface>
+    <record name="SubInterfaceIface"
+            c:type="FooSubInterfaceIface"
+            glib:is-gtype-struct-for="SubInterface">
+      <field name="parent_iface">
+        <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
+      </field>
+      <field name="destroy_event">
+        <callback name="destroy_event">
+          <return-value transfer-ownership="none">
+            <type name="none" c:type="void"/>
+          </return-value>
+          <parameters>
+            <parameter name="self" transfer-ownership="none">
+              <type name="SubInterface" c:type="FooSubInterface*"/>
+            </parameter>
+          </parameters>
+        </callback>
+      </field>
+      <field name="do_bar">
+        <callback name="do_bar">
+          <return-value transfer-ownership="none">
+            <type name="none" c:type="void"/>
+          </return-value>
+          <parameters>
+            <parameter name="self" transfer-ownership="none">
+              <type name="SubInterface" c:type="FooSubInterface*"/>
+            </parameter>
+          </parameters>
+        </callback>
+      </field>
+      <field name="do_moo">
+        <callback name="do_moo">
+          <return-value transfer-ownership="none">
+            <type name="none" c:type="void"/>
+          </return-value>
+          <parameters>
+            <parameter name="self" transfer-ownership="none">
+              <type name="SubInterface" c:type="FooSubInterface*"/>
+            </parameter>
+            <parameter transfer-ownership="none">
+              <type name="gint" c:type="int"/>
+            </parameter>
+            <parameter transfer-ownership="none">
+              <type name="gpointer" c:type="gpointer"/>
+            </parameter>
+          </parameters>
+        </callback>
+      </field>
+      <field name="do_baz">
+        <callback name="do_baz">
+          <return-value transfer-ownership="none">
+            <type name="none" c:type="void"/>
+          </return-value>
+          <parameters>
+            <parameter name="self" transfer-ownership="none">
+              <type name="SubInterface" c:type="FooSubInterface*"/>
+            </parameter>
+            <parameter name="callback"
+                       transfer-ownership="none"
+                       scope="call"
+                       closure="2">
+              <type name="GObject.Callback" c:type="GCallback"/>
+            </parameter>
+            <parameter name="data" transfer-ownership="none">
+              <type name="gpointer" c:type="gpointer"/>
+            </parameter>
+          </parameters>
+        </callback>
+      </field>
+    </record>
+    <class name="Subobject"
+           c:symbol-prefix="subobject"
+           c:type="FooSubobject"
+           parent="Object"
+           abstract="1"
+           glib:type-name="FooSubobject"
+           glib:get-type="foo_subobject_get_type"
+           glib:type-struct="SubobjectClass">
+      <implements name="Interface"/>
+      <constructor name="new" c:identifier="foo_subobject_new">
+        <return-value transfer-ownership="full">
+          <type name="Subobject" c:type="FooSubobject*"/>
+        </return-value>
+      </constructor>
+      <field name="parent_instance">
+        <type name="Object" c:type="FooObject"/>
+      </field>
+    </class>
+    <record name="SubobjectClass"
+            c:type="FooSubobjectClass"
+            glib:is-gtype-struct-for="Subobject">
+      <field name="parent_class">
+        <type name="ObjectClass" c:type="FooObjectClass"/>
+      </field>
+    </record>
+    <record name="ThingWithArray" c:type="FooThingWithArray">
+      <field name="x" writable="1">
+        <type name="gint" c:type="int"/>
+      </field>
+      <field name="y" writable="1">
+        <type name="gint" c:type="int"/>
+      </field>
+      <field name="lines" writable="1">
+        <array zero-terminated="0" c:type="gchar" fixed-size="80">
+          <type name="gchar" c:type="char"/>
+        </array>
+      </field>
+      <field name="data" writable="1">
+        <type name="guint8" c:type="guchar*"/>
+      </field>
+    </record>
+    <union name="Union" c:type="FooUnion">
+      <field name="foo" writable="1">
+        <type name="gint" c:type="int"/>
+      </field>
+    </union>
+    <record name="UtilityStruct" c:type="FooUtilityStruct">
+      <field name="bar" writable="1">
+        <type name="Utility.Struct" c:type="UtilityStruct"/>
+      </field>
+    </record>
+    <callback name="VarargsCallback"
+              c:type="FooVarargsCallback"
+              introspectable="0">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="param" transfer-ownership="none">
+          <type name="utf8" c:type="char*"/>
+        </parameter>
+        <parameter transfer-ownership="none">
+          <varargs>
+          </varargs>
+        </parameter>
+      </parameters>
+    </callback>
+    <function name="async_ready_callback"
+              c:identifier="foo_async_ready_callback">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="cancellable" transfer-ownership="none" allow-none="1">
+          <type name="Gio.Cancellable" c:type="GCancellable*"/>
+        </parameter>
+        <parameter name="callback"
+                   transfer-ownership="none"
+                   allow-none="1"
+                   scope="async"
+                   closure="2">
+          <type name="Gio.AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
+        </parameter>
+        <parameter name="user_data" transfer-ownership="none">
+          <type name="gpointer" c:type="gpointer"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="destroy_notify_callback"
+              c:identifier="foo_destroy_notify_callback">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="callback"
+                   transfer-ownership="none"
+                   scope="notified"
+                   closure="1"
+                   destroy="2">
+          <type name="Callback" c:type="FooCallback"/>
+        </parameter>
+        <parameter name="data" transfer-ownership="none">
+          <type name="gpointer" c:type="gpointer"/>
+        </parameter>
+        <parameter name="destroy" transfer-ownership="none" scope="async">
+          <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="enum_type_method"
+              c:identifier="foo_enum_type_method"
+              moved-to="EnumType.method">
+      <return-value transfer-ownership="none">
+        <type name="gint" c:type="int"/>
+      </return-value>
+      <parameters>
+        <parameter name="foo_enum" transfer-ownership="none">
+          <type name="EnumType" c:type="FooEnumType"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="enum_type_returnv"
+              c:identifier="foo_enum_type_returnv"
+              moved-to="EnumType.returnv">
+      <return-value transfer-ownership="none">
+        <type name="EnumType" c:type="FooEnumType"/>
+      </return-value>
+      <parameters>
+        <parameter name="x" transfer-ownership="none">
+          <type name="gint" c:type="int"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="error_quark"
+              c:identifier="foo_error_quark"
+              moved-to="Error.quark">
+      <return-value transfer-ownership="none">
+        <type name="GLib.Quark" c:type="GQuark"/>
+      </return-value>
+    </function>
+    <function name="init" c:identifier="foo_init">
+      <return-value transfer-ownership="none">
+        <type name="gint" c:type="gint"/>
+      </return-value>
+    </function>
+    <function name="interface_static_method"
+              c:identifier="foo_interface_static_method"
+              moved-to="Interface.static_method">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="x" transfer-ownership="none">
+          <type name="gint" c:type="int"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="method_external_references"
+              c:identifier="foo_method_external_references">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="object" transfer-ownership="none">
+          <type name="Utility.Object" c:type="UtilityObject*"/>
+        </parameter>
+        <parameter name="e" transfer-ownership="none">
+          <type name="Utility.EnumType" c:type="UtilityEnumType"/>
+        </parameter>
+        <parameter name="f" transfer-ownership="none">
+          <type name="Utility.FlagType" c:type="UtilityFlagType"/>
+        </parameter>
+        <parameter name="s" transfer-ownership="none">
+          <type name="Utility.Struct" c:type="UtilityStruct"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="rectangle_new"
+              c:identifier="foo_rectangle_new"
+              moved-to="Rectangle.new"
+              introspectable="0">
+      <doc xml:whitespace="preserve">This is a C convenience constructor; we have to (skip)
+it because it's not a boxed type.</doc>
+      <return-value>
+        <type name="Rectangle" c:type="FooRectangle*"/>
+      </return-value>
+      <parameters>
+        <parameter name="x" transfer-ownership="none">
+          <type name="gint" c:type="int"/>
+        </parameter>
+        <parameter name="y" transfer-ownership="none">
+          <type name="gint" c:type="int"/>
+        </parameter>
+        <parameter name="width" transfer-ownership="none">
+          <type name="gint" c:type="int"/>
+        </parameter>
+        <parameter name="height" transfer-ownership="none">
+          <type name="gint" c:type="int"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="skip_me" c:identifier="foo_skip_me" introspectable="0">
+      <doc xml:whitespace="preserve">Does something that's only interesting from C and should not be
+exposed to language bindings.</doc>
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="fs" transfer-ownership="none">
+          <doc xml:whitespace="preserve">a #FooSkippable</doc>
+          <type name="Skippable" c:type="FooSkippable"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="some_variant"
+              c:identifier="foo_some_variant"
+              introspectable="0">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="x" transfer-ownership="none">
+          <type name="guint" c:type="guint"/>
+        </parameter>
+        <parameter name="args" transfer-ownership="none">
+          <type name="va_list" c:type="va_list"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="some_variant_ptr"
+              c:identifier="foo_some_variant_ptr"
+              introspectable="0">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="x" transfer-ownership="none">
+          <type name="guint" c:type="guint"/>
+        </parameter>
+        <parameter name="args" transfer-ownership="none">
+          <type name="va_list" c:type="va_list*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_array" c:identifier="foo_test_array">
+      <return-value transfer-ownership="container">
+        <array name="GLib.Array" c:type="GArray*">
+          <type name="utf8"/>
+        </array>
+      </return-value>
+    </function>
+    <function name="test_const_char_param"
+              c:identifier="foo_test_const_char_param">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="param" transfer-ownership="none">
+          <type name="utf8" c:type="char*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_const_char_retval"
+              c:identifier="foo_test_const_char_retval">
+      <return-value transfer-ownership="none">
+        <type name="utf8" c:type="char*"/>
+      </return-value>
+    </function>
+    <function name="test_const_struct_param"
+              c:identifier="foo_test_const_struct_param">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="param" transfer-ownership="none">
+          <type name="Struct" c:type="FooStruct*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_const_struct_retval"
+              c:identifier="foo_test_const_struct_retval">
+      <return-value transfer-ownership="none">
+        <type name="Struct" c:type="FooStruct*"/>
+      </return-value>
+    </function>
+    <function name="test_string_array" c:identifier="foo_test_string_array">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="array" transfer-ownership="none">
+          <array c:type="char**">
+            <type name="utf8" c:type="char*"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_string_array_with_g"
+              c:identifier="foo_test_string_array_with_g">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="array" transfer-ownership="none">
+          <array c:type="gchar**">
+            <type name="utf8" c:type="gchar*"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_unsigned_qualifier"
+              c:identifier="foo_test_unsigned_qualifier">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="unsigned_param" transfer-ownership="none">
+          <type name="guint" c:type="unsigned int"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_unsigned_type" c:identifier="foo_test_unsigned_type">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="unsigned_param" transfer-ownership="none">
+          <type name="guint" c:type="unsigned"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_varargs_callback"
+              c:identifier="foo_test_varargs_callback"
+              introspectable="0">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="i" transfer-ownership="none">
+          <type name="gint" c:type="gint"/>
+        </parameter>
+        <parameter name="callback" transfer-ownership="none">
+          <type name="VarargsCallback" c:type="FooVarargsCallback"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_varargs_callback2"
+              c:identifier="foo_test_varargs_callback2"
+              introspectable="0">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="callback" transfer-ownership="none">
+          <type name="VarargsCallback" c:type="FooVarargsCallback"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_varargs_callback3"
+              c:identifier="foo_test_varargs_callback3"
+              introspectable="0">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="callback" transfer-ownership="none">
+          <type name="VarargsCallback" c:type="FooVarargsCallback"/>
+        </parameter>
+        <parameter name="callback2" transfer-ownership="none">
+          <type name="VarargsCallback" c:type="FooVarargsCallback"/>
+        </parameter>
+      </parameters>
+    </function>
+  </namespace>
+</repository>
diff --git a/tests/scanner/GetType-1.0-expected.gir b/tests/scanner/GetType-1.0-expected.gir
new file mode 100644 (file)
index 0000000..3b1dd19
--- /dev/null
@@ -0,0 +1,69 @@
+<?xml version="1.0"?>
+<!-- This file was automatically generated from C sources - DO NOT EDIT!
+To affect the contents of this file, edit the original C definitions,
+and/or use gtk-doc annotations.  -->
+<repository version="1.2"
+            xmlns="http://www.gtk.org/introspection/core/1.0"
+            xmlns:c="http://www.gtk.org/introspection/c/1.0"
+            xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
+  <include name="GLib" version="2.0"/>
+  <include name="GObject" version="2.0"/>
+  <package name="gobject-2.0"/>
+  <c:include name="gettype.h"/>
+  <namespace name="GetType"
+             version="1.0"
+             shared-library="libgettype.so"
+             c:identifier-prefixes="GetType"
+             c:symbol-prefixes="gettype">
+    <class name="Object"
+           c:symbol-prefix="object"
+           c:type="GetTypeObject"
+           parent="GObject.Object"
+           glib:type-name="GetTypeObject"
+           glib:get-type="gettype_object_get_type"
+           glib:type-struct="ObjectClass">
+      <constructor name="new" c:identifier="gettype_object_new">
+        <return-value transfer-ownership="full">
+          <type name="Object" c:type="GetTypeObject*"/>
+        </return-value>
+      </constructor>
+      <function name="nonmeta2_get_type"
+                c:identifier="gettype_object_nonmeta2_get_type">
+        <doc xml:whitespace="preserve">This shouldn't be scanned as a *_get_type function because it doesn't return
+a GType. It will generate a warning.</doc>
+        <return-value transfer-ownership="none">
+          <doc xml:whitespace="preserve">true</doc>
+          <type name="gboolean" c:type="gboolean"/>
+        </return-value>
+      </function>
+      <function name="nonmeta_get_gtype"
+                c:identifier="gettype_object_nonmeta_get_gtype">
+        <doc xml:whitespace="preserve">This shouldn't be scanned as a *_get_type function because it doesn't return
+a GType. It will generate a warning.</doc>
+        <return-value transfer-ownership="none">
+          <doc xml:whitespace="preserve">true</doc>
+          <type name="gboolean" c:type="gboolean"/>
+        </return-value>
+      </function>
+      <method name="nonmeta1_get_type"
+              c:identifier="gettype_object_nonmeta1_get_type">
+        <doc xml:whitespace="preserve">This shouldn't be scanned as a *_get_type function because it takes
+arguments.</doc>
+        <return-value transfer-ownership="none">
+          <doc xml:whitespace="preserve">0</doc>
+          <type name="GType" c:type="GType"/>
+        </return-value>
+      </method>
+      <field name="parent_instance">
+        <type name="GObject.Object" c:type="GObject"/>
+      </field>
+    </class>
+    <record name="ObjectClass"
+            c:type="GetTypeObjectClass"
+            glib:is-gtype-struct-for="Object">
+      <field name="parent_class">
+        <type name="GObject.ObjectClass" c:type="GObjectClass"/>
+      </field>
+    </record>
+  </namespace>
+</repository>
diff --git a/tests/scanner/GtkFrob-1.0-expected.gir b/tests/scanner/GtkFrob-1.0-expected.gir
new file mode 100644 (file)
index 0000000..c875847
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!-- This file was automatically generated from C sources - DO NOT EDIT!
+To affect the contents of this file, edit the original C definitions,
+and/or use gtk-doc annotations.  -->
+<repository version="1.2"
+            xmlns="http://www.gtk.org/introspection/core/1.0"
+            xmlns:c="http://www.gtk.org/introspection/c/1.0"
+            xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
+  <include name="GLib" version="2.0"/>
+  <include name="GObject" version="2.0"/>
+  <package name="gobject-2.0"/>
+  <namespace name="GtkFrob"
+             version="1.0"
+             shared-library="libgtkfrob.so"
+             c:identifier-prefixes="Gtk"
+             c:symbol-prefixes="gtk_frob">
+    <function name="language_manager_get_default"
+              c:identifier="gtk_frob_language_manager_get_default">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+    </function>
+  </namespace>
+</repository>
diff --git a/tests/scanner/Makefile.am b/tests/scanner/Makefile.am
new file mode 100644 (file)
index 0000000..0e5ddb5
--- /dev/null
@@ -0,0 +1,138 @@
+include $(top_srcdir)/common.mk
+include $(top_srcdir)/Makefile.introspection
+
+INTROSPECTION_SCANNER_ARGS += --warn-all
+
+check_LTLIBRARIES = \
+       libannotation.la \
+       libtestinherit.la \
+       libfoo.la \
+       libutility.la \
+       libgtkfrob.la \
+       libgettype.la
+if HAVE_CAIRO
+check_LTLIBRARIES += libregress.la
+endif
+
+AM_CPPFLAGS = -I$(top_srcdir)/girepository
+AM_CFLAGS = $(GIO_CFLAGS) $(GOBJECT_CFLAGS) $(GTHREAD_CFLAGS)
+# -rpath needed to force libtool to build a shared library for a check_LTLIBRARIES
+# target. See http://lists.gnu.org/archive/html/automake/2005-10/msg00107.html
+AM_LDFLAGS = -rpath /unused -avoid-version
+LIBS = $(GOBJECT_LIBS) $(GTHREAD_LIBS)
+
+libannotation_la_SOURCES = $(srcdir)/annotation.c $(srcdir)/annotation.h
+libtestinherit_la_SOURCES = $(srcdir)/drawable.c $(srcdir)/drawable.h
+libfoo_la_SOURCES = $(srcdir)/foo.c $(srcdir)/foo.h
+libfoo_la_LIBADD = $(top_builddir)/libgirepository-1.0.la
+libutility_la_SOURCES = $(srcdir)/utility.c $(srcdir)/utility.h
+libgtkfrob_la_SOURCES = $(srcdir)/gtkfrob.c $(srcdir)/gtkfrob.h
+libregress_la_SOURCES = $(srcdir)/regress.c $(srcdir)/regress.h
+libregress_la_LIBADD = $(GIO_LIBS) $(CAIRO_LIBS)
+libgettype_la_SOURCES = $(srcdir)/gettype.c $(srcdir)/gettype.h
+
+testsdir = $(datadir)/gobject-introspection-1.0/tests
+tests_DATA = $(libregress_la_SOURCES)
+
+libregress_la_CFLAGS = $(AM_CFLAGS) $(CAIRO_CFLAGS)
+libregress_la_LDFLAGS = $(AM_LDFLAGS)
+
+
+if OS_WIN32
+AM_LDFLAGS += -no-undefined
+endif
+
+# .gir --[scanner]-> .typelib
+GIRS =
+TYPELIBS = $(GIRS:.gir=.typelib)
+CHECKGIRS = $(GIRS:.gir=.gir.check)
+EXPECTEDGIRS = $(GIRS:.gir=-expected.gir)
+INTROSPECTION_GIRS = $(GIRS)
+CLEANFILES = $(TYPELIBS) $(GIRS)
+EXTRA_DIST = $(EXPECTEDGIRS)
+
+Regress-1.0.gir: $(top_builddir)/Gio-2.0.gir libregress.la
+Regress_1_0_gir_LIBS = libregress.la
+Regress_1_0_gir_INCLUDES = cairo-1.0 Gio-2.0
+Regress_1_0_gir_FILES = $(libregress_la_SOURCES)
+Regress_1_0_gir_SCANNERFLAGS = --c-include="regress.h" --warn-error
+if HAVE_CAIRO
+GIRS += Regress-1.0.gir
+endif
+
+Annotation-1.0.gir: Utility-1.0.gir libannotation.la
+Annotation_1_0_gir_PACKAGES = gobject-2.0
+Annotation_1_0_gir_LIBS = libannotation.la
+Annotation_1_0_gir_INCLUDES = GObject-2.0 Utility-1.0
+Annotation_1_0_gir_FILES = $(libannotation_la_SOURCES)
+Annotation_1_0_gir_SCANNERFLAGS = --c-include="annotation.h" --warn-error
+GIRS += Annotation-1.0.gir
+
+TestInherit-1.0.gir: Utility-1.0.gir libtestinherit.la
+TestInherit_1_0_gir_PACKAGES = gobject-2.0
+TestInherit_1_0_gir_LIBS = libtestinherit.la
+TestInherit_1_0_gir_INCLUDES = GObject-2.0 Utility-1.0
+TestInherit_1_0_gir_FILES = $(libtestinherit_la_SOURCES)
+TestInherit_1_0_gir_SCANNERFLAGS = --c-include="drawable.h" --warn-error
+GIRS += TestInherit-1.0.gir
+
+Foo-1.0.gir: Utility-1.0.gir libfoo.la
+Foo_1_0_gir_PACKAGES = gobject-2.0
+Foo_1_0_gir_LIBS = libfoo.la
+Foo_1_0_gir_INCLUDES = GObject-2.0 Gio-2.0 Utility-1.0
+Foo_1_0_gir_FILES = $(srcdir)/foo.h $(srcdir)/foo.c
+Foo_1_0_gir_SCANNERFLAGS = --c-include="foo.h" --warn-error
+GIRS += Foo-1.0.gir
+
+Utility-1.0.gir: libutility.la
+Utility_1_0_gir_PACKAGES = gobject-2.0
+Utility_1_0_gir_LIBS = libutility.la
+Utility_1_0_gir_INCLUDES = GObject-2.0
+Utility_1_0_gir_FILES = $(libutility_la_SOURCES)
+Utility_1_0_gir_SCANNERFLAGS = --c-include="utility.h" --warn-error
+GIRS += Utility-1.0.gir
+
+# This one tests different --namespace and --strip-prefix
+GtkFrob-1.0.gir: libgtkfrob.la
+GtkFrob_1_0_gir_PACKAGES = gobject-2.0
+GtkFrob_1_0_gir_LIBS = libgtkfrob.la
+GtkFrob_1_0_gir_INCLUDES = GObject-2.0
+GtkFrob_1_0_gir_FILES = $(libgtkfrob_la_SOURCES)
+GtkFrob_1_0_gir_SCANNERFLAGS = --identifier-prefix=Gtk --symbol-prefix=gtk_frob --warn-error
+GIRS += GtkFrob-1.0.gir
+
+# This tests that functions called _get_type are only matched if they have no
+# arguments and return GType
+GetType-1.0.gir: libgettype.la
+GetType_1_0_gir_PACKAGES = gobject-2.0
+GetType_1_0_gir_LIBS = libgettype.la
+GetType_1_0_gir_INCLUDES = GObject-2.0
+GetType_1_0_gir_FILES = $(libgettype_la_SOURCES)
+GetType_1_0_gir_SCANNERFLAGS = --c-include="gettype.h" --identifier-prefix=GetType --symbol-prefix=gettype
+GIRS += GetType-1.0.gir
+
+if !OS_WIN32
+check_PROGRAMS = barapp
+
+barapp_SOURCES = $(srcdir)/barapp.c $(srcdir)/barapp.h
+barapp_LDADD = $(top_builddir)/libgirepository-1.0.la
+barapp_LDFLAGS = -export-dynamic
+
+Bar-1.0.gir: barapp
+Bar_1_0_gir_PACKAGES = gobject-2.0
+Bar_1_0_gir_PROGRAM = ./barapp
+Bar_1_0_gir_INCLUDES = GObject-2.0
+Bar_1_0_gir_FILES = $(barapp_SOURCES)
+Bar_1_0_gir_SCANNERFLAGS = --accept-unprefixed
+GIRS += Bar-1.0.gir
+endif
+
+EXTRA_DIST += headeronly.h
+
+Headeronly-1.0.gir: headeronly.h
+       $(AM_V_GEN) $(INTROSPECTION_SCANNER) $(INTROSPECTION_SCANNER_ARGS) --warn-all --warn-error --reparse-validate --namespace=Headeronly --nsversion=1.0 --header-only --output=$@ $<
+
+%.gir.check: %.gir
+       @diff -u -U 10 $(srcdir)/$*-expected.gir $*.gir && echo "  TEST  $*.gir"
+
+check-local: Headeronly-1.0.gir $(CHECKGIRS) $(TYPELIBS)
diff --git a/tests/scanner/Makefile.in b/tests/scanner/Makefile.in
new file mode 100644 (file)
index 0000000..4bab686
--- /dev/null
@@ -0,0 +1,1044 @@
+# 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@
+
+# -*- Mode: make -*-
+# Copyright 2009-2010 Johan Dahlin
+#
+# This file defines variables that are compatible with
+# Makefile.introspection, but for use within the gobject-introspection
+# module itself.
+#
+
+# -*- Mode: make -*-
+# Copyright 2009-2010 Johan Dahlin
+#
+# This file is free software; the author(s) gives unlimited
+# permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# * Input variables:
+#
+#   INTROSPECTION_GIRS - List of GIRS that should be generated
+#   INTROSPECTION_SCANNER - Command to invoke scanner, normally set by
+#      GOBJECT_INTROSPECTION_REQUIRE/CHECK() in introspection.m4
+#   INTROSPECTION_SCANNER_ARGS - Additional args to pass in to the scanner
+#   INTROSPECTION_SCANNER_ENV - Environment variables to set before running
+#      the scanner
+#   INTROSPECTION_COMPILER - Command to invoke compiler, normally set by
+#      GOBJECT_INTROSPECTION_REQUIRE/CHECK() in introspection.m4
+#   INTROSPECTION_COMPILER_ARGS - Additional args to pass in to the compiler
+#
+# * Simple tutorial
+#
+# Add this to configure.ac:
+#   -Wno-portability to AM_INIT_AUTOMAKE
+#   GOBJECT_INTROSPECTION_CHECK([0.6.7])
+#
+# Add this to Makefile.am where your library/program is built:
+#   include $(INTROSPECTION_MAKEFILE)
+#   INTROSPECTION_GIRS = YourLib-1.0.gir
+#   YourLib_1_0_gir_NAMESPACE = YourLib
+#   YourLib_1_0_gir_VERSION = 1.0
+#   YourLib_1_0_gir_LIBS = libyourlib.la
+#   YourLib_1_0_gir_FILES = $(libyourlib_1_0_SOURCES)
+#   girdir = $(datadir)/gir-1.0
+#   dist_gir_DATA = YourLib-1.0.gir
+#   typelibdir = $(libdir)/girepository-1.0
+#   typelib_DATA = YourLib-1.0.typelib
+#   CLEANFILES = $(dist_gir_DATA) $(typelib_DATA)
+#
+
+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@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+       $(top_srcdir)/Makefile.introspection $(top_srcdir)/common.mk
+@HAVE_CAIRO_TRUE@am__append_1 = libregress.la
+@OS_WIN32_TRUE@am__append_2 = -no-undefined
+@HAVE_CAIRO_TRUE@am__append_3 = Regress-1.0.gir
+@OS_WIN32_FALSE@check_PROGRAMS = barapp$(EXEEXT)
+@OS_WIN32_FALSE@am__append_4 = Bar-1.0.gir
+subdir = tests/scanner
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.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)/acinclude.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 =
+libannotation_la_LIBADD =
+am_libannotation_la_OBJECTS = annotation.lo
+libannotation_la_OBJECTS = $(am_libannotation_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+libfoo_la_DEPENDENCIES = $(top_builddir)/libgirepository-1.0.la
+am_libfoo_la_OBJECTS = foo.lo
+libfoo_la_OBJECTS = $(am_libfoo_la_OBJECTS)
+libgettype_la_LIBADD =
+am_libgettype_la_OBJECTS = gettype.lo
+libgettype_la_OBJECTS = $(am_libgettype_la_OBJECTS)
+libgtkfrob_la_LIBADD =
+am_libgtkfrob_la_OBJECTS = gtkfrob.lo
+libgtkfrob_la_OBJECTS = $(am_libgtkfrob_la_OBJECTS)
+am__DEPENDENCIES_1 =
+libregress_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+       $(am__DEPENDENCIES_1)
+am_libregress_la_OBJECTS = libregress_la-regress.lo
+libregress_la_OBJECTS = $(am_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 $@
+@HAVE_CAIRO_TRUE@am_libregress_la_rpath =
+libtestinherit_la_LIBADD =
+am_libtestinherit_la_OBJECTS = drawable.lo
+libtestinherit_la_OBJECTS = $(am_libtestinherit_la_OBJECTS)
+libutility_la_LIBADD =
+am_libutility_la_OBJECTS = utility.lo
+libutility_la_OBJECTS = $(am_libutility_la_OBJECTS)
+am__barapp_SOURCES_DIST = $(srcdir)/barapp.c $(srcdir)/barapp.h
+@OS_WIN32_FALSE@am_barapp_OBJECTS = barapp.$(OBJEXT)
+barapp_OBJECTS = $(am_barapp_OBJECTS)
+@OS_WIN32_FALSE@barapp_DEPENDENCIES =  \
+@OS_WIN32_FALSE@       $(top_builddir)/libgirepository-1.0.la
+barapp_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(barapp_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/build-aux/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 = $(libannotation_la_SOURCES) $(libfoo_la_SOURCES) \
+       $(libgettype_la_SOURCES) $(libgtkfrob_la_SOURCES) \
+       $(libregress_la_SOURCES) $(libtestinherit_la_SOURCES) \
+       $(libutility_la_SOURCES) $(barapp_SOURCES)
+DIST_SOURCES = $(libannotation_la_SOURCES) $(libfoo_la_SOURCES) \
+       $(libgettype_la_SOURCES) $(libgtkfrob_la_SOURCES) \
+       $(libregress_la_SOURCES) $(libtestinherit_la_SOURCES) \
+       $(libutility_la_SOURCES) $(am__barapp_SOURCES_DIST)
+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)$(testsdir)"
+DATA = $(tests_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_GIR_PACKAGE = @CAIRO_GIR_PACKAGE@
+CAIRO_GOBJECT_CFLAGS = @CAIRO_GOBJECT_CFLAGS@
+CAIRO_GOBJECT_LIBS = @CAIRO_GOBJECT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CAIRO_SHARED_LIBRARY = @CAIRO_SHARED_LIBRARY@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+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@
+EXPANDED_BINDIR = @EXPANDED_BINDIR@
+EXPANDED_DATADIR = @EXPANDED_DATADIR@
+EXPANDED_LIBDIR = @EXPANDED_LIBDIR@
+EXPANDED_LIBEXECDIR = @EXPANDED_LIBEXECDIR@
+EXPANDED_LOCALSTATEDIR = @EXPANDED_LOCALSTATEDIR@
+EXPANDED_SYSCONFDIR = @EXPANDED_SYSCONFDIR@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FFI_PC_CFLAGS = @FFI_PC_CFLAGS@
+FFI_PC_LIBS = @FFI_PC_LIBS@
+FFI_PC_PACKAGES = @FFI_PC_PACKAGES@
+FGREP = @FGREP@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
+GIREPO_CFLAGS = @GIREPO_CFLAGS@
+GIREPO_LIBS = @GIREPO_LIBS@
+GIR_DIR = @GIR_DIR@
+GIR_SUFFIX = @GIR_SUFFIX@
+GLIBSRC = @GLIBSRC@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMODULE_CFLAGS = @GMODULE_CFLAGS@
+GMODULE_LIBS = @GMODULE_LIBS@
+GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
+GOBJECT_INTROSPECTION_LIBDIR = @GOBJECT_INTROSPECTION_LIBDIR@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
+GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
+GTKDOC_MKPDF = @GTKDOC_MKPDF@
+GTKDOC_REBASE = @GTKDOC_REBASE@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = $(GOBJECT_LIBS) $(GTHREAD_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@
+POW_LIB = @POW_LIB@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_LIB_LOC = @PYTHON_LIB_LOC@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SCANNER_CFLAGS = @SCANNER_CFLAGS@
+SCANNER_LIBS = @SCANNER_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+YACC = @YACC@
+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@
+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@
+INTROSPECTION_SCANNER = \
+    env PATH=.libs:$(PATH) \
+        LPATH=.libs \
+        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
+        UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
+        $(top_builddir)/g-ir-scanner
+
+INTROSPECTION_SCANNER_ARGS = --verbose -I$(top_srcdir) \
+       --add-include-path=$(srcdir) \
+       --add-include-path=$(top_srcdir)/gir \
+       --add-include-path=$(builddir) \
+       --add-include-path=$(top_builddir) --warn-all
+INTROSPECTION_COMPILER = \
+    env PATH=.libs:$(PATH) \
+        $(top_builddir)/g-ir-compiler$(EXEEXT)
+
+INTROSPECTION_COMPILER_ARGS = \
+    --includedir=$(srcdir) \
+    --includedir=$(top_srcdir)/gir \
+    --includedir=$(builddir) \
+    --includedir=$(top_builddir)
+
+INTROSPECTION_DOCTOOL = \
+    env PATH=.libs:$(PATH) \
+        LPATH=.libs \
+        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
+        UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
+        $(top_builddir)/g-ir-doc-tool
+
+
+# Private functions
+_gir_name = $(subst /,_,$(subst -,_,$(subst .,_,$(1))))
+
+# Namespace and Version is either fetched from the gir filename
+# or the _NAMESPACE/_VERSION variable combo
+_gir_namespace = $(or $($(_gir_name)_NAMESPACE),$(firstword $(subst -, ,$(notdir $(1)))))
+_gir_version = $(or $($(_gir_name)_VERSION),$(lastword $(subst -, ,$(1:.gir=))))
+
+# _PROGRAM is an optional variable which needs it's own --program argument
+_gir_program = $(if $($(_gir_name)_PROGRAM),--program=$($(_gir_name)_PROGRAM))
+
+# Variables which provides a list of things
+_gir_libraries = $(foreach lib,$($(_gir_name)_LIBS),--library=$(lib))
+_gir_packages = $(foreach pkg,$($(_gir_name)_PACKAGES),--pkg=$(pkg))
+_gir_includes = $(foreach include,$($(_gir_name)_INCLUDES),--include=$(include))
+_gir_export_packages = $(foreach pkg,$($(_gir_name)_EXPORT_PACKAGES),--pkg-export=$(pkg))
+
+# Reuse the LIBTOOL variable from automake if it's set, but
+# work around MSYS weirdness: When running g-ir-scanner, MSYS changes
+# a command-line argument --libtool="/bin/sh ../../libtool" into
+# --libtool=c:/opt/msys/1.0/bin/libtool. So just use sh.exe without path
+# because we already "know" where the libtool configure produced is.
+_gir_libtool = $(if $(findstring MINGW32,$(shell uname -s)),--libtool="$(top_builddir)/libtool",$(if $(LIBTOOL),--libtool="$(LIBTOOL)"))
+
+# Macros for AM_SILENT_RULES prettiness
+_gir_verbosity = $(if $(AM_DEFAULT_VERBOSITY),$(AM_DEFAULT_VERBOSITY),1)
+_gir_silent_scanner_prefix = $(_gir_silent_scanner_prefix_$(V))
+_gir_silent_scanner_prefix_ = $(_gir_silent_scanner_prefix_$(_gir_verbosity))
+_gir_silent_scanner_prefix_0 = @echo "  GISCAN $(1)";
+_gir_silent_scanner_opts = $(_gir_silent_scanner_opts_$(V))
+_gir_silent_scanner_opts_ = $(_gir_silent_scanner_opts_$(_gir_verbosity))
+_gir_silent_scanner_opts_0 = --quiet
+_gir_silent_compiler = $(_gir_silent_compiler_$(V))
+_gir_silent_compiler_ = $(_gir_silent_compiler_$(_gir_verbosity))
+_gir_silent_compiler_0 = @echo "  GICOMP $(1)";
+check_LTLIBRARIES = libannotation.la libtestinherit.la libfoo.la \
+       libutility.la libgtkfrob.la libgettype.la $(am__append_1)
+AM_CPPFLAGS = -I$(top_srcdir)/girepository
+AM_CFLAGS = $(GIO_CFLAGS) $(GOBJECT_CFLAGS) $(GTHREAD_CFLAGS)
+# -rpath needed to force libtool to build a shared library for a check_LTLIBRARIES
+# target. See http://lists.gnu.org/archive/html/automake/2005-10/msg00107.html
+AM_LDFLAGS = -rpath /unused -avoid-version $(am__append_2)
+libannotation_la_SOURCES = $(srcdir)/annotation.c $(srcdir)/annotation.h
+libtestinherit_la_SOURCES = $(srcdir)/drawable.c $(srcdir)/drawable.h
+libfoo_la_SOURCES = $(srcdir)/foo.c $(srcdir)/foo.h
+libfoo_la_LIBADD = $(top_builddir)/libgirepository-1.0.la
+libutility_la_SOURCES = $(srcdir)/utility.c $(srcdir)/utility.h
+libgtkfrob_la_SOURCES = $(srcdir)/gtkfrob.c $(srcdir)/gtkfrob.h
+libregress_la_SOURCES = $(srcdir)/regress.c $(srcdir)/regress.h
+libregress_la_LIBADD = $(GIO_LIBS) $(CAIRO_LIBS)
+libgettype_la_SOURCES = $(srcdir)/gettype.c $(srcdir)/gettype.h
+testsdir = $(datadir)/gobject-introspection-1.0/tests
+tests_DATA = $(libregress_la_SOURCES)
+libregress_la_CFLAGS = $(AM_CFLAGS) $(CAIRO_CFLAGS)
+libregress_la_LDFLAGS = $(AM_LDFLAGS)
+
+# .gir --[scanner]-> .typelib
+GIRS = $(am__append_3) Annotation-1.0.gir TestInherit-1.0.gir \
+       Foo-1.0.gir Utility-1.0.gir GtkFrob-1.0.gir GetType-1.0.gir \
+       $(am__append_4)
+TYPELIBS = $(GIRS:.gir=.typelib)
+CHECKGIRS = $(GIRS:.gir=.gir.check)
+EXPECTEDGIRS = $(GIRS:.gir=-expected.gir)
+INTROSPECTION_GIRS = $(GIRS)
+CLEANFILES = $(TYPELIBS) $(GIRS)
+EXTRA_DIST = $(EXPECTEDGIRS) headeronly.h
+Regress_1_0_gir_LIBS = libregress.la
+Regress_1_0_gir_INCLUDES = cairo-1.0 Gio-2.0
+Regress_1_0_gir_FILES = $(libregress_la_SOURCES)
+Regress_1_0_gir_SCANNERFLAGS = --c-include="regress.h" --warn-error
+Annotation_1_0_gir_PACKAGES = gobject-2.0
+Annotation_1_0_gir_LIBS = libannotation.la
+Annotation_1_0_gir_INCLUDES = GObject-2.0 Utility-1.0
+Annotation_1_0_gir_FILES = $(libannotation_la_SOURCES)
+Annotation_1_0_gir_SCANNERFLAGS = --c-include="annotation.h" --warn-error
+TestInherit_1_0_gir_PACKAGES = gobject-2.0
+TestInherit_1_0_gir_LIBS = libtestinherit.la
+TestInherit_1_0_gir_INCLUDES = GObject-2.0 Utility-1.0
+TestInherit_1_0_gir_FILES = $(libtestinherit_la_SOURCES)
+TestInherit_1_0_gir_SCANNERFLAGS = --c-include="drawable.h" --warn-error
+Foo_1_0_gir_PACKAGES = gobject-2.0
+Foo_1_0_gir_LIBS = libfoo.la
+Foo_1_0_gir_INCLUDES = GObject-2.0 Gio-2.0 Utility-1.0
+Foo_1_0_gir_FILES = $(srcdir)/foo.h $(srcdir)/foo.c
+Foo_1_0_gir_SCANNERFLAGS = --c-include="foo.h" --warn-error
+Utility_1_0_gir_PACKAGES = gobject-2.0
+Utility_1_0_gir_LIBS = libutility.la
+Utility_1_0_gir_INCLUDES = GObject-2.0
+Utility_1_0_gir_FILES = $(libutility_la_SOURCES)
+Utility_1_0_gir_SCANNERFLAGS = --c-include="utility.h" --warn-error
+GtkFrob_1_0_gir_PACKAGES = gobject-2.0
+GtkFrob_1_0_gir_LIBS = libgtkfrob.la
+GtkFrob_1_0_gir_INCLUDES = GObject-2.0
+GtkFrob_1_0_gir_FILES = $(libgtkfrob_la_SOURCES)
+GtkFrob_1_0_gir_SCANNERFLAGS = --identifier-prefix=Gtk --symbol-prefix=gtk_frob --warn-error
+GetType_1_0_gir_PACKAGES = gobject-2.0
+GetType_1_0_gir_LIBS = libgettype.la
+GetType_1_0_gir_INCLUDES = GObject-2.0
+GetType_1_0_gir_FILES = $(libgettype_la_SOURCES)
+GetType_1_0_gir_SCANNERFLAGS = --c-include="gettype.h" --identifier-prefix=GetType --symbol-prefix=gettype
+@OS_WIN32_FALSE@barapp_SOURCES = $(srcdir)/barapp.c $(srcdir)/barapp.h
+@OS_WIN32_FALSE@barapp_LDADD = $(top_builddir)/libgirepository-1.0.la
+@OS_WIN32_FALSE@barapp_LDFLAGS = -export-dynamic
+@OS_WIN32_FALSE@Bar_1_0_gir_PACKAGES = gobject-2.0
+@OS_WIN32_FALSE@Bar_1_0_gir_PROGRAM = ./barapp
+@OS_WIN32_FALSE@Bar_1_0_gir_INCLUDES = GObject-2.0
+@OS_WIN32_FALSE@Bar_1_0_gir_FILES = $(barapp_SOURCES)
+@OS_WIN32_FALSE@Bar_1_0_gir_SCANNERFLAGS = --accept-unprefixed
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/common.mk $(top_srcdir)/Makefile.introspection $(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/scanner/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign tests/scanner/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-checkLTLIBRARIES:
+       -test -z "$(check_LTLIBRARIES)" || rm -f $(check_LTLIBRARIES)
+       @list='$(check_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
+libannotation.la: $(libannotation_la_OBJECTS) $(libannotation_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK)  $(libannotation_la_OBJECTS) $(libannotation_la_LIBADD) $(LIBS)
+libfoo.la: $(libfoo_la_OBJECTS) $(libfoo_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK)  $(libfoo_la_OBJECTS) $(libfoo_la_LIBADD) $(LIBS)
+libgettype.la: $(libgettype_la_OBJECTS) $(libgettype_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK)  $(libgettype_la_OBJECTS) $(libgettype_la_LIBADD) $(LIBS)
+libgtkfrob.la: $(libgtkfrob_la_OBJECTS) $(libgtkfrob_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK)  $(libgtkfrob_la_OBJECTS) $(libgtkfrob_la_LIBADD) $(LIBS)
+libregress.la: $(libregress_la_OBJECTS) $(libregress_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(libregress_la_LINK) $(am_libregress_la_rpath) $(libregress_la_OBJECTS) $(libregress_la_LIBADD) $(LIBS)
+libtestinherit.la: $(libtestinherit_la_OBJECTS) $(libtestinherit_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK)  $(libtestinherit_la_OBJECTS) $(libtestinherit_la_LIBADD) $(LIBS)
+libutility.la: $(libutility_la_OBJECTS) $(libutility_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK)  $(libutility_la_OBJECTS) $(libutility_la_LIBADD) $(LIBS)
+
+clean-checkPROGRAMS:
+       @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+       echo " rm -f" $$list; \
+       rm -f $$list || exit $$?; \
+       test -n "$(EXEEXT)" || exit 0; \
+       list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+       echo " rm -f" $$list; \
+       rm -f $$list
+barapp$(EXEEXT): $(barapp_OBJECTS) $(barapp_DEPENDENCIES) 
+       @rm -f barapp$(EXEEXT)
+       $(AM_V_CCLD)$(barapp_LINK) $(barapp_OBJECTS) $(barapp_LDADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/annotation.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/barapp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drawable.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/foo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettype.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkfrob.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libregress_la-regress.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utility.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 $@ $<
+
+annotation.lo: $(srcdir)/annotation.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) $(AM_CFLAGS) $(CFLAGS) -MT annotation.lo -MD -MP -MF $(DEPDIR)/annotation.Tpo -c -o annotation.lo `test -f '$(srcdir)/annotation.c' || echo '$(srcdir)/'`$(srcdir)/annotation.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/annotation.Tpo $(DEPDIR)/annotation.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(srcdir)/annotation.c' object='annotation.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) $(AM_CFLAGS) $(CFLAGS) -c -o annotation.lo `test -f '$(srcdir)/annotation.c' || echo '$(srcdir)/'`$(srcdir)/annotation.c
+
+foo.lo: $(srcdir)/foo.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) $(AM_CFLAGS) $(CFLAGS) -MT foo.lo -MD -MP -MF $(DEPDIR)/foo.Tpo -c -o foo.lo `test -f '$(srcdir)/foo.c' || echo '$(srcdir)/'`$(srcdir)/foo.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/foo.Tpo $(DEPDIR)/foo.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(srcdir)/foo.c' object='foo.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) $(AM_CFLAGS) $(CFLAGS) -c -o foo.lo `test -f '$(srcdir)/foo.c' || echo '$(srcdir)/'`$(srcdir)/foo.c
+
+gettype.lo: $(srcdir)/gettype.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) $(AM_CFLAGS) $(CFLAGS) -MT gettype.lo -MD -MP -MF $(DEPDIR)/gettype.Tpo -c -o gettype.lo `test -f '$(srcdir)/gettype.c' || echo '$(srcdir)/'`$(srcdir)/gettype.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/gettype.Tpo $(DEPDIR)/gettype.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(srcdir)/gettype.c' object='gettype.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) $(AM_CFLAGS) $(CFLAGS) -c -o gettype.lo `test -f '$(srcdir)/gettype.c' || echo '$(srcdir)/'`$(srcdir)/gettype.c
+
+gtkfrob.lo: $(srcdir)/gtkfrob.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) $(AM_CFLAGS) $(CFLAGS) -MT gtkfrob.lo -MD -MP -MF $(DEPDIR)/gtkfrob.Tpo -c -o gtkfrob.lo `test -f '$(srcdir)/gtkfrob.c' || echo '$(srcdir)/'`$(srcdir)/gtkfrob.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/gtkfrob.Tpo $(DEPDIR)/gtkfrob.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(srcdir)/gtkfrob.c' object='gtkfrob.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) $(AM_CFLAGS) $(CFLAGS) -c -o gtkfrob.lo `test -f '$(srcdir)/gtkfrob.c' || echo '$(srcdir)/'`$(srcdir)/gtkfrob.c
+
+libregress_la-regress.lo: $(srcdir)/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 '$(srcdir)/regress.c' || echo '$(srcdir)/'`$(srcdir)/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='$(srcdir)/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 '$(srcdir)/regress.c' || echo '$(srcdir)/'`$(srcdir)/regress.c
+
+drawable.lo: $(srcdir)/drawable.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) $(AM_CFLAGS) $(CFLAGS) -MT drawable.lo -MD -MP -MF $(DEPDIR)/drawable.Tpo -c -o drawable.lo `test -f '$(srcdir)/drawable.c' || echo '$(srcdir)/'`$(srcdir)/drawable.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/drawable.Tpo $(DEPDIR)/drawable.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(srcdir)/drawable.c' object='drawable.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) $(AM_CFLAGS) $(CFLAGS) -c -o drawable.lo `test -f '$(srcdir)/drawable.c' || echo '$(srcdir)/'`$(srcdir)/drawable.c
+
+utility.lo: $(srcdir)/utility.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) $(AM_CFLAGS) $(CFLAGS) -MT utility.lo -MD -MP -MF $(DEPDIR)/utility.Tpo -c -o utility.lo `test -f '$(srcdir)/utility.c' || echo '$(srcdir)/'`$(srcdir)/utility.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/utility.Tpo $(DEPDIR)/utility.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(srcdir)/utility.c' object='utility.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) $(AM_CFLAGS) $(CFLAGS) -c -o utility.lo `test -f '$(srcdir)/utility.c' || echo '$(srcdir)/'`$(srcdir)/utility.c
+
+barapp.o: $(srcdir)/barapp.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT barapp.o -MD -MP -MF $(DEPDIR)/barapp.Tpo -c -o barapp.o `test -f '$(srcdir)/barapp.c' || echo '$(srcdir)/'`$(srcdir)/barapp.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/barapp.Tpo $(DEPDIR)/barapp.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(srcdir)/barapp.c' object='barapp.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o barapp.o `test -f '$(srcdir)/barapp.c' || echo '$(srcdir)/'`$(srcdir)/barapp.c
+
+barapp.obj: $(srcdir)/barapp.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT barapp.obj -MD -MP -MF $(DEPDIR)/barapp.Tpo -c -o barapp.obj `if test -f '$(srcdir)/barapp.c'; then $(CYGPATH_W) '$(srcdir)/barapp.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/barapp.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/barapp.Tpo $(DEPDIR)/barapp.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(srcdir)/barapp.c' object='barapp.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o barapp.obj `if test -f '$(srcdir)/barapp.c'; then $(CYGPATH_W) '$(srcdir)/barapp.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/barapp.c'; fi`
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+install-testsDATA: $(tests_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(testsdir)" || $(MKDIR_P) "$(DESTDIR)$(testsdir)"
+       @list='$(tests_DATA)'; test -n "$(testsdir)" || 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)$(testsdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(testsdir)" || exit $$?; \
+       done
+
+uninstall-testsDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(tests_DATA)'; test -n "$(testsdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(testsdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(testsdir)" && 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_LTLIBRARIES) $(check_PROGRAMS)
+       $(MAKE) $(AM_MAKEFLAGS) check-local
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+       for dir in "$(DESTDIR)$(testsdir)"; 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."
+clean: clean-am
+
+clean-am: clean-checkLTLIBRARIES clean-checkPROGRAMS clean-generic \
+       clean-libtool 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-testsDATA
+
+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-testsDATA
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am check-local clean \
+       clean-checkLTLIBRARIES clean-checkPROGRAMS clean-generic \
+       clean-libtool 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 \
+       install-testsDATA 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-testsDATA
+
+
+# Make sure the required variables are set, these should under normal
+# circumstances come from introspection.m4
+$(if $(INTROSPECTION_SCANNER),,$(error Need to define INTROSPECTION_SCANNER))
+$(if $(INTROSPECTION_COMPILER),,$(error Need to define INTROSPECTION_COMPILER))
+
+#
+# Creates a GIR by scanning C headers/sources
+# $(1) - Name of the gir file (output)
+#
+# If output is Gtk-2.0.gir then you should name the variables like
+# Gtk_2_0_gir_NAMESPACE, Gtk_2_0_gir_VERSION etc.
+# Required variables:
+# FILES - C sources and headers which should be scanned
+#
+# One of these variables are required:
+# LIBS - Library where the symbol represented in the gir can be found
+# PROGRAM - Program where the symbol represented in the gir can be found
+#
+# Optional variables
+# NAMESPACE - Namespace of the gir, first letter capital,
+#   rest should be lower case, for instance: 'Gtk', 'Clutter', 'ClutterGtk'.
+#   If not present the namespace will be fetched from the gir filename,
+#   the part before the first dash. For 'Gtk-2.0', namespace will be 'Gtk'.
+# VERSION - Version of the gir, if not present, will be fetched from gir
+# filename, the part after the first dash. For 'Gtk-2.0', version will be '2.0'.
+# LIBTOOL - Command to invoke libtool, usually set by automake
+# SCANNERFLAGS - Flags to pass in to the scanner, see g-ir-scanner(1) for a list
+# CFLAGS - Flags to pass in to the parser when scanning headers
+# LDFLAGS - Linker flags used by the scanner
+# PACKAGES - list of pkg-config names which cflags are required to parse
+#   the headers of this gir
+# INCLUDES - Gir files to include without the .gir suffix, for instance
+#   GLib-2.0, Gtk-2.0. This is needed for all libraries which you depend on that
+#   provides introspection information.
+# EXPORT_PACKAGES - list of pkg-config names that are provided by this gir.
+#   By default the names in the PACKAGES variable will be used.
+#
+
+define introspection-scanner
+
+# Basic sanity check, to make sure required variables are set
+$(if $($(_gir_name)_FILES),,$(error Need to define $(_gir_name)_FILES))
+$(if $(or $(findstring --header-only,$($(_gir_name)_SCANNERFLAGS)),
+          $($(_gir_name)_LIBS),
+          $($(_gir_name)_PROGRAM)),,
+    $(error Need to define $(_gir_name)_LIBS or $(_gir_name)_PROGRAM))
+
+# Only dependencies we know are actually filenames goes into _FILES, make
+# sure these are built before running the scanner. Libraries and programs
+# needs to be added manually.
+$(1): $$($(_gir_name)_FILES)
+       @ $(MKDIR_P) $(dir $(1))
+       $(_gir_silent_scanner_prefix) $(INTROSPECTION_SCANNER_ENV) $(INTROSPECTION_SCANNER) $(_gir_silent_scanner_opts) \
+       $(INTROSPECTION_SCANNER_ARGS) \
+         --namespace=$(_gir_namespace) \
+         --nsversion=$(_gir_version) \
+         $(_gir_libtool) \
+         $(_gir_packages) \
+         $(_gir_includes) \
+         $(_gir_export_packages) \
+         $(_gir_program) \
+         $(_gir_libraries) \
+         $($(_gir_name)_SCANNERFLAGS) \
+         $($(_gir_name)_CFLAGS) \
+         $($(_gir_name)_LDFLAGS) \
+         $$^ \
+         --output $(1)
+endef
+
+$(foreach gir,$(INTROSPECTION_GIRS),$(eval $(call introspection-scanner,$(gir))))
+
+#
+# Compiles a gir into a typelib
+# $(1): gir filename (input)
+# $(2): typelib filename (output)
+#
+define introspection-compiler
+$(_gir_silent_compiler) $(INTROSPECTION_COMPILER) $(INTROSPECTION_COMPILER_ARGS) --includedir=. $(1) -o $(2)
+endef
+
+# Simple rule to compile a typelib.
+%.typelib: %.gir
+       $(call introspection-compiler,$<,$@)
+
+Regress-1.0.gir: $(top_builddir)/Gio-2.0.gir libregress.la
+
+Annotation-1.0.gir: Utility-1.0.gir libannotation.la
+
+TestInherit-1.0.gir: Utility-1.0.gir libtestinherit.la
+
+Foo-1.0.gir: Utility-1.0.gir libfoo.la
+
+Utility-1.0.gir: libutility.la
+
+# This one tests different --namespace and --strip-prefix
+GtkFrob-1.0.gir: libgtkfrob.la
+
+# This tests that functions called _get_type are only matched if they have no
+# arguments and return GType
+GetType-1.0.gir: libgettype.la
+
+@OS_WIN32_FALSE@Bar-1.0.gir: barapp
+
+Headeronly-1.0.gir: headeronly.h
+       $(AM_V_GEN) $(INTROSPECTION_SCANNER) $(INTROSPECTION_SCANNER_ARGS) --warn-all --warn-error --reparse-validate --namespace=Headeronly --nsversion=1.0 --header-only --output=$@ $<
+
+%.gir.check: %.gir
+       @diff -u -U 10 $(srcdir)/$*-expected.gir $*.gir && echo "  TEST  $*.gir"
+
+check-local: Headeronly-1.0.gir $(CHECKGIRS) $(TYPELIBS)
+
+# 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/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir
new file mode 100644 (file)
index 0000000..5d806d3
--- /dev/null
@@ -0,0 +1,3265 @@
+<?xml version="1.0"?>
+<!-- This file was automatically generated from C sources - DO NOT EDIT!
+To affect the contents of this file, edit the original C definitions,
+and/or use gtk-doc annotations.  -->
+<repository version="1.2"
+            xmlns="http://www.gtk.org/introspection/core/1.0"
+            xmlns:c="http://www.gtk.org/introspection/c/1.0"
+            xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
+  <include name="GLib" version="2.0"/>
+  <include name="GObject" version="2.0"/>
+  <include name="Gio" version="2.0"/>
+  <include name="cairo" version="1.0"/>
+  <c:include name="regress.h"/>
+  <namespace name="Regress"
+             version="1.0"
+             shared-library="libregress.so"
+             c:identifier-prefixes="Regress"
+             c:symbol-prefixes="regress">
+    <alias name="AliasedTestBoxed" c:type="RegressAliasedTestBoxed">
+      <doc xml:whitespace="preserve">Typedef TestBoxed to test caller-allocates correctness</doc>
+      <type name="TestBoxed" c:type="RegressTestBoxed"/>
+    </alias>
+    <alias name="IntSet" c:type="RegressIntSet" introspectable="0">
+      <doc xml:whitespace="preserve">Compatibility typedef, like telepathy-glib's TpIntSet</doc>
+      <type name="Intset" c:type="RegressIntset"/>
+    </alias>
+    <alias name="PtrArrayAlias" c:type="RegressPtrArrayAlias">
+      <doc xml:whitespace="preserve">Typedef'd GPtrArray for some reason</doc>
+      <type name="GLib.PtrArray" c:type="GPtrArray"/>
+    </alias>
+    <alias name="VaListAlias" c:type="RegressVaListAlias" introspectable="0">
+      <doc xml:whitespace="preserve">Typedef'd va_list for additional reasons</doc>
+      <type name="va_list" c:type="va_list"/>
+    </alias>
+    <constant name="DOUBLE_CONSTANT"
+              value="44.220000"
+              c:type="REGRESS_DOUBLE_CONSTANT">
+      <type name="gdouble" c:type="gdouble"/>
+    </constant>
+    <constant name="INT_CONSTANT" value="4422" c:type="REGRESS_INT_CONSTANT">
+      <type name="gint" c:type="gint"/>
+    </constant>
+    <record name="Intset" c:type="RegressIntset" disguised="1">
+      <doc xml:whitespace="preserve">Like telepathy-glib's TpIntset.</doc>
+    </record>
+    <constant name="LONG_STRING_CONSTANT"
+              value="TYPE,VALUE,ENCODING,CHARSET,LANGUAGE,DOM,INTL,POSTAL,PARCEL,HOME,WORK,PREF,VOICE,FAX,MSG,CELL,PAGER,BBS,MODEM,CAR,ISDN,VIDEO,AOL,APPLELINK,ATTMAIL,CIS,EWORLD,INTERNET,IBMMAIL,MCIMAIL,POWERSHARE,PRODIGY,TLX,X400,GIF,CGM,WMF,BMP,MET,PMB,DIB,PICT,TIFF,PDF,PS,JPEG,QTIME,MPEG,MPEG2,AVI,WAVE,AIFF,PCM,X509,PGP"
+              c:type="REGRESS_LONG_STRING_CONSTANT">
+      <type name="utf8" c:type="gchar*"/>
+    </constant>
+    <constant name="Mixed_Case_Constant"
+              value="4423"
+              c:type="REGRESS_Mixed_Case_Constant">
+      <type name="gint" c:type="gint"/>
+    </constant>
+    <constant name="STRING_CONSTANT"
+              value="Some String"
+              c:type="REGRESS_STRING_CONSTANT">
+      <type name="utf8" c:type="gchar*"/>
+    </constant>
+    <record name="SkippedStructure"
+            c:type="RegressSkippedStructure"
+            introspectable="0">
+      <doc xml:whitespace="preserve">This should be skipped, and moreover, all function which
+use it should be.</doc>
+      <field name="x" writable="1">
+        <type name="gint" c:type="int"/>
+      </field>
+      <field name="v" writable="1">
+        <type name="gdouble" c:type="double"/>
+      </field>
+    </record>
+    <record name="TestBoxed"
+            c:type="RegressTestBoxed"
+            glib:type-name="RegressTestBoxed"
+            glib:get-type="regress_test_boxed_get_type"
+            c:symbol-prefix="test_boxed">
+      <field name="some_int8" writable="1">
+        <type name="gint8" c:type="gint8"/>
+      </field>
+      <field name="nested_a" writable="1">
+        <type name="TestSimpleBoxedA" c:type="RegressTestSimpleBoxedA"/>
+      </field>
+      <field name="priv" writable="1">
+        <type name="TestBoxedPrivate" c:type="RegressTestBoxedPrivate*"/>
+      </field>
+      <constructor name="new" c:identifier="regress_test_boxed_new">
+        <return-value transfer-ownership="full">
+          <type name="TestBoxed" c:type="RegressTestBoxed*"/>
+        </return-value>
+      </constructor>
+      <constructor name="new_alternative_constructor1"
+                   c:identifier="regress_test_boxed_new_alternative_constructor1">
+        <return-value transfer-ownership="full">
+          <type name="TestBoxed" c:type="RegressTestBoxed*"/>
+        </return-value>
+        <parameters>
+          <parameter name="i" transfer-ownership="none">
+            <type name="gint" c:type="int"/>
+          </parameter>
+        </parameters>
+      </constructor>
+      <constructor name="new_alternative_constructor2"
+                   c:identifier="regress_test_boxed_new_alternative_constructor2">
+        <return-value transfer-ownership="full">
+          <type name="TestBoxed" c:type="RegressTestBoxed*"/>
+        </return-value>
+        <parameters>
+          <parameter name="i" transfer-ownership="none">
+            <type name="gint" c:type="int"/>
+          </parameter>
+          <parameter name="j" transfer-ownership="none">
+            <type name="gint" c:type="int"/>
+          </parameter>
+        </parameters>
+      </constructor>
+      <constructor name="new_alternative_constructor3"
+                   c:identifier="regress_test_boxed_new_alternative_constructor3">
+        <return-value transfer-ownership="full">
+          <type name="TestBoxed" c:type="RegressTestBoxed*"/>
+        </return-value>
+        <parameters>
+          <parameter name="s" transfer-ownership="none">
+            <type name="utf8" c:type="char*"/>
+          </parameter>
+        </parameters>
+      </constructor>
+      <method name="copy" c:identifier="regress_test_boxed_copy">
+        <return-value transfer-ownership="full">
+          <type name="TestBoxed" c:type="RegressTestBoxed*"/>
+        </return-value>
+      </method>
+      <method name="equals" c:identifier="regress_test_boxed_equals">
+        <return-value transfer-ownership="none">
+          <type name="gboolean" c:type="gboolean"/>
+        </return-value>
+        <parameters>
+          <parameter name="other" transfer-ownership="none">
+            <type name="TestBoxed" c:type="RegressTestBoxed*"/>
+          </parameter>
+        </parameters>
+      </method>
+    </record>
+    <record name="TestBoxedB"
+            c:type="RegressTestBoxedB"
+            glib:type-name="RegressTestBoxedB"
+            glib:get-type="regress_test_boxed_b_get_type"
+            c:symbol-prefix="test_boxed_b">
+      <field name="some_int8" writable="1">
+        <type name="gint8" c:type="gint8"/>
+      </field>
+      <field name="some_long" writable="1">
+        <type name="glong" c:type="glong"/>
+      </field>
+      <constructor name="new" c:identifier="regress_test_boxed_b_new">
+        <return-value transfer-ownership="full">
+          <type name="TestBoxedB" c:type="RegressTestBoxedB*"/>
+        </return-value>
+        <parameters>
+          <parameter name="some_int8" transfer-ownership="none">
+            <type name="gint8" c:type="gint8"/>
+          </parameter>
+          <parameter name="some_long" transfer-ownership="none">
+            <type name="glong" c:type="glong"/>
+          </parameter>
+        </parameters>
+      </constructor>
+      <method name="copy" c:identifier="regress_test_boxed_b_copy">
+        <return-value transfer-ownership="full">
+          <type name="TestBoxedB" c:type="RegressTestBoxedB*"/>
+        </return-value>
+      </method>
+    </record>
+    <record name="TestBoxedPrivate"
+            c:type="RegressTestBoxedPrivate"
+            disguised="1">
+    </record>
+    <callback name="TestCallback" c:type="RegressTestCallback">
+      <return-value transfer-ownership="none">
+        <type name="gint" c:type="int"/>
+      </return-value>
+    </callback>
+    <callback name="TestCallbackArray" c:type="RegressTestCallbackArray">
+      <return-value transfer-ownership="none">
+        <type name="gint" c:type="int"/>
+      </return-value>
+      <parameters>
+        <parameter name="one" transfer-ownership="none">
+          <array length="1" zero-terminated="0" c:type="int*">
+            <type name="gint" c:type="int"/>
+          </array>
+        </parameter>
+        <parameter name="one_length" transfer-ownership="none">
+          <type name="gsize" c:type="gsize"/>
+        </parameter>
+        <parameter name="two" transfer-ownership="none">
+          <array length="3" zero-terminated="0" c:type="char**">
+            <type name="utf8"/>
+          </array>
+        </parameter>
+        <parameter name="two_length" transfer-ownership="none">
+          <type name="gint" c:type="int"/>
+        </parameter>
+      </parameters>
+    </callback>
+    <callback name="TestCallbackFull" c:type="RegressTestCallbackFull">
+      <return-value transfer-ownership="none">
+        <type name="gint" c:type="int"/>
+      </return-value>
+      <parameters>
+        <parameter name="foo" transfer-ownership="none">
+          <doc xml:whitespace="preserve">the investment rate</doc>
+          <type name="gint" c:type="int"/>
+        </parameter>
+        <parameter name="bar" transfer-ownership="none">
+          <doc xml:whitespace="preserve">how much money</doc>
+          <type name="gdouble" c:type="double"/>
+        </parameter>
+        <parameter name="path" transfer-ownership="none">
+          <doc xml:whitespace="preserve">Path to file</doc>
+          <type name="filename" c:type="char*"/>
+        </parameter>
+      </parameters>
+    </callback>
+    <callback name="TestCallbackGError" c:type="RegressTestCallbackGError">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="error" transfer-ownership="none">
+          <type name="GLib.Error" c:type="GError*"/>
+        </parameter>
+      </parameters>
+    </callback>
+    <callback name="TestCallbackHashtable"
+              c:type="RegressTestCallbackHashtable">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="data" transfer-ownership="none">
+          <doc xml:whitespace="preserve">a hash table; will be modified</doc>
+          <type name="GLib.HashTable" c:type="GHashTable*">
+            <type name="utf8"/>
+            <type name="gint"/>
+          </type>
+        </parameter>
+      </parameters>
+    </callback>
+    <callback name="TestCallbackOwnedGError"
+              c:type="RegressTestCallbackOwnedGError">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="error" transfer-ownership="full">
+          <doc xml:whitespace="preserve">GError instance; must be freed by the callback</doc>
+          <type name="GLib.Error" c:type="GError*"/>
+        </parameter>
+      </parameters>
+    </callback>
+    <callback name="TestCallbackUserData" c:type="RegressTestCallbackUserData">
+      <return-value transfer-ownership="none">
+        <type name="gint" c:type="int"/>
+      </return-value>
+      <parameters>
+        <parameter name="user_data" transfer-ownership="none" closure="0">
+          <type name="gpointer" c:type="gpointer"/>
+        </parameter>
+      </parameters>
+    </callback>
+    <enumeration name="TestEnum"
+                 glib:type-name="RegressTestEnum"
+                 glib:get-type="regress_test_enum_get_type"
+                 c:type="RegressTestEnum">
+      <member name="value1"
+              value="0"
+              c:identifier="REGRESS_TEST_VALUE1"
+              glib:nick="value1"/>
+      <member name="value2"
+              value="1"
+              c:identifier="REGRESS_TEST_VALUE2"
+              glib:nick="value2"/>
+      <member name="value3"
+              value="-1"
+              c:identifier="REGRESS_TEST_VALUE3"
+              glib:nick="value3"/>
+      <member name="value4"
+              value="48"
+              c:identifier="REGRESS_TEST_VALUE4"
+              glib:nick="value4"/>
+      <function name="param" c:identifier="regress_test_enum_param">
+        <return-value transfer-ownership="none">
+          <type name="utf8" c:type="gchar*"/>
+        </return-value>
+        <parameters>
+          <parameter name="e" transfer-ownership="none">
+            <type name="TestEnum" c:type="RegressTestEnum"/>
+          </parameter>
+        </parameters>
+      </function>
+    </enumeration>
+    <enumeration name="TestEnumNoGEnum" c:type="RegressTestEnumNoGEnum">
+      <member name="evalue1" value="0" c:identifier="REGRESS_TEST_EVALUE1"/>
+      <member name="evalue2" value="42" c:identifier="REGRESS_TEST_EVALUE2"/>
+      <member name="evalue3" value="48" c:identifier="REGRESS_TEST_EVALUE3"/>
+    </enumeration>
+    <enumeration name="TestEnumUnsigned"
+                 glib:type-name="RegressTestEnumUnsigned"
+                 glib:get-type="regress_test_enum_unsigned_get_type"
+                 c:type="RegressTestEnumUnsigned">
+      <member name="value1"
+              value="1"
+              c:identifier="REGRESS_TEST_UNSIGNED_VALUE1"
+              glib:nick="value1"/>
+      <member name="value2"
+              value="2147483648"
+              c:identifier="REGRESS_TEST_UNSIGNED_VALUE2"
+              glib:nick="value2"/>
+    </enumeration>
+    <bitfield name="TestFlags"
+              glib:type-name="RegressTestFlags"
+              glib:get-type="regress_test_flags_get_type"
+              c:type="RegressTestFlags">
+      <member name="flag1"
+              value="1"
+              c:identifier="TEST_FLAG1"
+              glib:nick="flag1"/>
+      <member name="flag2"
+              value="2"
+              c:identifier="TEST_FLAG2"
+              glib:nick="flag2"/>
+      <member name="flag3"
+              value="4"
+              c:identifier="TEST_FLAG3"
+              glib:nick="flag3"/>
+    </bitfield>
+    <class name="TestFloating"
+           c:symbol-prefix="test_floating"
+           c:type="RegressTestFloating"
+           parent="GObject.InitiallyUnowned"
+           glib:type-name="RegressTestFloating"
+           glib:get-type="regress_test_floating_get_type"
+           glib:type-struct="TestFloatingClass">
+      <constructor name="new" c:identifier="regress_test_floating_new">
+        <return-value transfer-ownership="none">
+          <doc xml:whitespace="preserve">A new floating #RegressTestFloating</doc>
+          <type name="TestFloating" c:type="RegressTestFloating*"/>
+        </return-value>
+      </constructor>
+      <field name="parent_instance">
+        <type name="GObject.InitiallyUnowned" c:type="GInitiallyUnowned"/>
+      </field>
+    </class>
+    <record name="TestFloatingClass"
+            c:type="RegressTestFloatingClass"
+            glib:is-gtype-struct-for="TestFloating">
+      <field name="parent_class">
+        <type name="GObject.InitiallyUnownedClass"
+              c:type="GInitiallyUnownedClass"/>
+      </field>
+    </record>
+    <class name="TestFundamentalObject"
+           c:symbol-prefix="test_fundamental_object"
+           c:type="RegressTestFundamentalObject"
+           abstract="1"
+           glib:type-name="RegressTestFundamentalObject"
+           glib:get-type="regress_test_fundamental_object_get_type"
+           glib:type-struct="TestFundamentalObjectClass"
+           glib:fundamental="1"
+           glib:ref-func="regress_test_fundamental_object_ref"
+           glib:unref-func="regress_test_fundamental_object_unref"
+           glib:set-value-func="regress_test_value_set_fundamental_object"
+           glib:get-value-func="regress_test_value_get_fundamental_object">
+      <method name="ref" c:identifier="regress_test_fundamental_object_ref">
+        <return-value transfer-ownership="full">
+          <doc xml:whitespace="preserve">A new #RegressTestFundamentalObject</doc>
+          <type name="TestFundamentalObject"
+                c:type="RegressTestFundamentalObject*"/>
+        </return-value>
+      </method>
+      <method name="unref"
+              c:identifier="regress_test_fundamental_object_unref">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+      </method>
+      <field name="instance">
+        <type name="GObject.TypeInstance" c:type="GTypeInstance"/>
+      </field>
+      <field name="refcount">
+        <type name="gint" c:type="gint"/>
+      </field>
+      <field name="flags">
+        <type name="guint" c:type="guint"/>
+      </field>
+    </class>
+    <record name="TestFundamentalObjectClass"
+            c:type="RegressTestFundamentalObjectClass"
+            glib:is-gtype-struct-for="TestFundamentalObject">
+      <field name="type_class">
+        <type name="GObject.TypeClass" c:type="GTypeClass"/>
+      </field>
+      <field name="copy">
+        <type name="TestFundamentalObjectCopyFunction"
+              c:type="RegressTestFundamentalObjectCopyFunction"/>
+      </field>
+      <field name="finalize">
+        <type name="TestFundamentalObjectFinalizeFunction"
+              c:type="RegressTestFundamentalObjectFinalizeFunction"/>
+      </field>
+    </record>
+    <callback name="TestFundamentalObjectCopyFunction"
+              c:type="RegressTestFundamentalObjectCopyFunction">
+      <return-value transfer-ownership="full">
+        <type name="TestFundamentalObject"
+              c:type="RegressTestFundamentalObject*"/>
+      </return-value>
+      <parameters>
+        <parameter name="obj" transfer-ownership="none">
+          <type name="TestFundamentalObject"
+                c:type="RegressTestFundamentalObject*"/>
+        </parameter>
+      </parameters>
+    </callback>
+    <callback name="TestFundamentalObjectFinalizeFunction"
+              c:type="RegressTestFundamentalObjectFinalizeFunction">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="obj" transfer-ownership="none">
+          <type name="TestFundamentalObject"
+                c:type="RegressTestFundamentalObject*"/>
+        </parameter>
+      </parameters>
+    </callback>
+    <class name="TestFundamentalSubObject"
+           c:symbol-prefix="test_fundamental_sub_object"
+           c:type="RegressTestFundamentalSubObject"
+           parent="TestFundamentalObject"
+           glib:type-name="RegressTestFundamentalSubObject"
+           glib:get-type="regress_test_fundamental_sub_object_get_type"
+           glib:type-struct="TestFundamentalSubObjectClass"
+           glib:fundamental="1">
+      <constructor name="new"
+                   c:identifier="regress_test_fundamental_sub_object_new">
+        <return-value transfer-ownership="full">
+          <type name="TestFundamentalSubObject"
+                c:type="RegressTestFundamentalSubObject*"/>
+        </return-value>
+        <parameters>
+          <parameter name="data" transfer-ownership="none">
+            <type name="utf8" c:type="char*"/>
+          </parameter>
+        </parameters>
+      </constructor>
+      <field name="fundamental_object">
+        <type name="TestFundamentalObject"
+              c:type="RegressTestFundamentalObject"/>
+      </field>
+      <field name="data">
+        <type name="utf8" c:type="char*"/>
+      </field>
+    </class>
+    <record name="TestFundamentalSubObjectClass"
+            c:type="RegressTestFundamentalSubObjectClass"
+            glib:is-gtype-struct-for="TestFundamentalSubObject">
+      <field name="fundamental_object_class">
+        <type name="TestFundamentalObjectClass"
+              c:type="RegressTestFundamentalObjectClass"/>
+      </field>
+    </record>
+    <interface name="TestInterface"
+               c:symbol-prefix="test_interface"
+               c:type="RegressTestInterface"
+               glib:type-name="RegressTestInterface"
+               glib:get-type="regress_test_interface_get_type"
+               glib:type-struct="TestInterfaceIface">
+    </interface>
+    <record name="TestInterfaceIface"
+            c:type="RegressTestInterfaceIface"
+            glib:is-gtype-struct-for="TestInterface">
+      <field name="base_iface">
+        <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
+      </field>
+    </record>
+    <class name="TestObj"
+           c:symbol-prefix="test_obj"
+           c:type="RegressTestObj"
+           parent="GObject.Object"
+           glib:type-name="RegressTestObj"
+           glib:get-type="regress_test_obj_get_type"
+           glib:type-struct="TestObjClass">
+      <constructor name="constructor" c:identifier="regress_constructor">
+        <return-value transfer-ownership="full">
+          <type name="TestObj" c:type="RegressTestObj*"/>
+        </return-value>
+      </constructor>
+      <constructor name="new" c:identifier="regress_test_obj_new">
+        <return-value transfer-ownership="full">
+          <type name="TestObj" c:type="RegressTestObj*"/>
+        </return-value>
+        <parameters>
+          <parameter name="obj" transfer-ownership="none">
+            <doc xml:whitespace="preserve">A #RegressTestObj</doc>
+            <type name="TestObj" c:type="RegressTestObj*"/>
+          </parameter>
+        </parameters>
+      </constructor>
+      <constructor name="new_callback"
+                   c:identifier="regress_test_obj_new_callback">
+        <return-value transfer-ownership="full">
+          <type name="TestObj" c:type="RegressTestObj*"/>
+        </return-value>
+        <parameters>
+          <parameter name="callback"
+                     transfer-ownership="none"
+                     scope="notified"
+                     closure="1"
+                     destroy="2">
+            <type name="TestCallbackUserData"
+                  c:type="RegressTestCallbackUserData"/>
+          </parameter>
+          <parameter name="user_data" transfer-ownership="none">
+            <type name="gpointer" c:type="gpointer"/>
+          </parameter>
+          <parameter name="notify" transfer-ownership="none" scope="async">
+            <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
+          </parameter>
+        </parameters>
+      </constructor>
+      <constructor name="new_from_file"
+                   c:identifier="regress_test_obj_new_from_file"
+                   throws="1">
+        <return-value transfer-ownership="full">
+          <type name="TestObj" c:type="RegressTestObj*"/>
+        </return-value>
+        <parameters>
+          <parameter name="x" transfer-ownership="none">
+            <type name="utf8" c:type="char*"/>
+          </parameter>
+        </parameters>
+      </constructor>
+      <function name="null_out" c:identifier="regress_test_obj_null_out">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="obj"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="full"
+                     allow-none="1">
+            <doc xml:whitespace="preserve">A #RegressTestObj</doc>
+            <type name="TestObj" c:type="RegressTestObj**"/>
+          </parameter>
+        </parameters>
+      </function>
+      <function name="static_method"
+                c:identifier="regress_test_obj_static_method">
+        <return-value transfer-ownership="none">
+          <type name="gdouble" c:type="double"/>
+        </return-value>
+        <parameters>
+          <parameter name="x" transfer-ownership="none">
+            <type name="gint" c:type="int"/>
+          </parameter>
+        </parameters>
+      </function>
+      <function name="static_method_callback"
+                c:identifier="regress_test_obj_static_method_callback">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="callback"
+                     transfer-ownership="none"
+                     allow-none="1"
+                     scope="call">
+            <type name="TestCallback" c:type="RegressTestCallback"/>
+          </parameter>
+        </parameters>
+      </function>
+      <virtual-method name="allow_none_vfunc">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="two" transfer-ownership="none" allow-none="1">
+            <doc xml:whitespace="preserve">Another object</doc>
+            <type name="TestObj" c:type="RegressTestObj*"/>
+          </parameter>
+        </parameters>
+      </virtual-method>
+      <virtual-method name="matrix" invoker="do_matrix">
+        <doc xml:whitespace="preserve">This method is virtual.  Notably its name differs from the virtual
+slot name, which makes it useful for testing bindings handle this
+case.</doc>
+        <return-value transfer-ownership="none">
+          <type name="gint" c:type="int"/>
+        </return-value>
+        <parameters>
+          <parameter name="somestr" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Meaningless string</doc>
+            <type name="utf8" c:type="char*"/>
+          </parameter>
+        </parameters>
+      </virtual-method>
+      <method name="do_matrix" c:identifier="regress_test_obj_do_matrix">
+        <doc xml:whitespace="preserve">This method is virtual.  Notably its name differs from the virtual
+slot name, which makes it useful for testing bindings handle this
+case.</doc>
+        <return-value transfer-ownership="none">
+          <type name="gint" c:type="int"/>
+        </return-value>
+        <parameters>
+          <parameter name="somestr" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Meaningless string</doc>
+            <type name="utf8" c:type="char*"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="emit_sig_with_obj"
+              c:identifier="regress_test_obj_emit_sig_with_obj">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+      </method>
+      <method name="forced_method" c:identifier="regress_forced_method">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+      </method>
+      <method name="instance_method"
+              c:identifier="regress_test_obj_instance_method">
+        <return-value transfer-ownership="none">
+          <type name="gint" c:type="int"/>
+        </return-value>
+      </method>
+      <method name="instance_method_callback"
+              c:identifier="regress_test_obj_instance_method_callback">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="callback"
+                     transfer-ownership="none"
+                     allow-none="1"
+                     scope="call">
+            <type name="TestCallback" c:type="RegressTestCallback"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="set_bare" c:identifier="regress_test_obj_set_bare">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="bare" transfer-ownership="none" allow-none="1">
+            <type name="GObject.Object" c:type="GObject*"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="skip_inout_param"
+              c:identifier="regress_test_obj_skip_inout_param"
+              throws="1">
+        <doc xml:whitespace="preserve">Check that the out value is skipped</doc>
+        <return-value transfer-ownership="none">
+          <doc xml:whitespace="preserve">%TRUE if the call succeeds, %FALSE if @error is set.</doc>
+          <type name="gboolean" c:type="gboolean"/>
+        </return-value>
+        <parameters>
+          <parameter name="a" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Parameter.</doc>
+            <type name="gint" c:type="gint"/>
+          </parameter>
+          <parameter name="out_b"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <doc xml:whitespace="preserve">Return value.</doc>
+            <type name="gint" c:type="gint*"/>
+          </parameter>
+          <parameter name="c" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Other parameter.</doc>
+            <type name="gdouble" c:type="gdouble"/>
+          </parameter>
+          <parameter name="inout_d"
+                     direction="inout"
+                     caller-allocates="0"
+                     transfer-ownership="full"
+                     skip="1">
+            <doc xml:whitespace="preserve">Will be incremented.</doc>
+            <type name="gint" c:type="gint*"/>
+          </parameter>
+          <parameter name="out_sum"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <doc xml:whitespace="preserve">Return value.</doc>
+            <type name="gint" c:type="gint*"/>
+          </parameter>
+          <parameter name="num1" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Number.</doc>
+            <type name="gint" c:type="gint"/>
+          </parameter>
+          <parameter name="num2" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Number.</doc>
+            <type name="gint" c:type="gint"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="skip_out_param"
+              c:identifier="regress_test_obj_skip_out_param"
+              throws="1">
+        <doc xml:whitespace="preserve">Check that the out value is skipped</doc>
+        <return-value transfer-ownership="none">
+          <doc xml:whitespace="preserve">%TRUE if the call succeeds, %FALSE if @error is set.</doc>
+          <type name="gboolean" c:type="gboolean"/>
+        </return-value>
+        <parameters>
+          <parameter name="a" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Parameter.</doc>
+            <type name="gint" c:type="gint"/>
+          </parameter>
+          <parameter name="out_b"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="full"
+                     skip="1">
+            <doc xml:whitespace="preserve">Return value.</doc>
+            <type name="gint" c:type="gint*"/>
+          </parameter>
+          <parameter name="c" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Other parameter.</doc>
+            <type name="gdouble" c:type="gdouble"/>
+          </parameter>
+          <parameter name="inout_d"
+                     direction="inout"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <doc xml:whitespace="preserve">Will be incremented.</doc>
+            <type name="gint" c:type="gint*"/>
+          </parameter>
+          <parameter name="out_sum"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <doc xml:whitespace="preserve">Return value.</doc>
+            <type name="gint" c:type="gint*"/>
+          </parameter>
+          <parameter name="num1" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Number.</doc>
+            <type name="gint" c:type="gint"/>
+          </parameter>
+          <parameter name="num2" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Number.</doc>
+            <type name="gint" c:type="gint"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="skip_param"
+              c:identifier="regress_test_obj_skip_param"
+              throws="1">
+        <doc xml:whitespace="preserve">Check that a parameter is skipped</doc>
+        <return-value transfer-ownership="none">
+          <doc xml:whitespace="preserve">%TRUE if the call succeeds, %FALSE if @error is set.</doc>
+          <type name="gboolean" c:type="gboolean"/>
+        </return-value>
+        <parameters>
+          <parameter name="a" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Parameter.</doc>
+            <type name="gint" c:type="gint"/>
+          </parameter>
+          <parameter name="out_b"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <doc xml:whitespace="preserve">Return value.</doc>
+            <type name="gint" c:type="gint*"/>
+          </parameter>
+          <parameter name="c" transfer-ownership="none" skip="1">
+            <doc xml:whitespace="preserve">Other parameter.</doc>
+            <type name="gdouble" c:type="gdouble"/>
+          </parameter>
+          <parameter name="inout_d"
+                     direction="inout"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <doc xml:whitespace="preserve">Will be incremented.</doc>
+            <type name="gint" c:type="gint*"/>
+          </parameter>
+          <parameter name="out_sum"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <doc xml:whitespace="preserve">Return value.</doc>
+            <type name="gint" c:type="gint*"/>
+          </parameter>
+          <parameter name="num1" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Number.</doc>
+            <type name="gint" c:type="gint"/>
+          </parameter>
+          <parameter name="num2" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Number.</doc>
+            <type name="gint" c:type="gint"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="skip_return_val"
+              c:identifier="regress_test_obj_skip_return_val"
+              throws="1">
+        <doc xml:whitespace="preserve">Check that the return value is skipped</doc>
+        <return-value transfer-ownership="none" skip="1">
+          <doc xml:whitespace="preserve">%TRUE if the call succeeds, %FALSE if @error is set.</doc>
+          <type name="gboolean" c:type="gboolean"/>
+        </return-value>
+        <parameters>
+          <parameter name="a" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Parameter.</doc>
+            <type name="gint" c:type="gint"/>
+          </parameter>
+          <parameter name="out_b"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <doc xml:whitespace="preserve">A return value.</doc>
+            <type name="gint" c:type="gint*"/>
+          </parameter>
+          <parameter name="c" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Other parameter.</doc>
+            <type name="gdouble" c:type="gdouble"/>
+          </parameter>
+          <parameter name="inout_d"
+                     direction="inout"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <doc xml:whitespace="preserve">Will be incremented.</doc>
+            <type name="gint" c:type="gint*"/>
+          </parameter>
+          <parameter name="out_sum"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <doc xml:whitespace="preserve">Return value.</doc>
+            <type name="gint" c:type="gint*"/>
+          </parameter>
+          <parameter name="num1" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Number.</doc>
+            <type name="gint" c:type="gint"/>
+          </parameter>
+          <parameter name="num2" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Number.</doc>
+            <type name="gint" c:type="gint"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="skip_return_val_no_out"
+              c:identifier="regress_test_obj_skip_return_val_no_out"
+              throws="1">
+        <doc xml:whitespace="preserve">Check that the return value is skipped. Succeed if a is nonzero, otherwise
+raise an error.</doc>
+        <return-value transfer-ownership="none" skip="1">
+          <doc xml:whitespace="preserve">%TRUE if the call succeeds, %FALSE if @error is set.</doc>
+          <type name="gboolean" c:type="gboolean"/>
+        </return-value>
+        <parameters>
+          <parameter name="a" transfer-ownership="none">
+            <doc xml:whitespace="preserve">Parameter.</doc>
+            <type name="gint" c:type="gint"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="torture_signature_0"
+              c:identifier="regress_test_obj_torture_signature_0">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="x" transfer-ownership="none">
+            <type name="gint" c:type="int"/>
+          </parameter>
+          <parameter name="y"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <type name="gdouble" c:type="double*"/>
+          </parameter>
+          <parameter name="z"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <type name="gint" c:type="int*"/>
+          </parameter>
+          <parameter name="foo" transfer-ownership="none">
+            <type name="utf8" c:type="char*"/>
+          </parameter>
+          <parameter name="q"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <type name="gint" c:type="int*"/>
+          </parameter>
+          <parameter name="m" transfer-ownership="none">
+            <type name="guint" c:type="guint"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="torture_signature_1"
+              c:identifier="regress_test_obj_torture_signature_1"
+              throws="1">
+        <doc xml:whitespace="preserve">This function throws an error if m is odd.</doc>
+        <return-value transfer-ownership="none">
+          <type name="gboolean" c:type="gboolean"/>
+        </return-value>
+        <parameters>
+          <parameter name="x" transfer-ownership="none">
+            <type name="gint" c:type="int"/>
+          </parameter>
+          <parameter name="y"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <type name="gdouble" c:type="double*"/>
+          </parameter>
+          <parameter name="z"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <type name="gint" c:type="int*"/>
+          </parameter>
+          <parameter name="foo" transfer-ownership="none">
+            <type name="utf8" c:type="char*"/>
+          </parameter>
+          <parameter name="q"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <type name="gint" c:type="int*"/>
+          </parameter>
+          <parameter name="m" transfer-ownership="none">
+            <type name="guint" c:type="guint"/>
+          </parameter>
+        </parameters>
+      </method>
+      <property name="bare" writable="1" transfer-ownership="none">
+        <type name="GObject.Object"/>
+      </property>
+      <property name="boxed" writable="1" transfer-ownership="none">
+        <type name="TestBoxed"/>
+      </property>
+      <property name="double" writable="1" transfer-ownership="none">
+        <type name="gdouble"/>
+      </property>
+      <property name="float" writable="1" transfer-ownership="none">
+        <type name="gfloat"/>
+      </property>
+      <property name="hash-table" writable="1" transfer-ownership="container">
+        <type name="GLib.HashTable">
+          <type name="utf8"/>
+          <type name="gint8"/>
+        </type>
+      </property>
+      <property name="hash-table-old"
+                writable="1"
+                transfer-ownership="container">
+        <type name="GLib.HashTable">
+          <type name="utf8"/>
+          <type name="gint8"/>
+        </type>
+      </property>
+      <property name="int" writable="1" transfer-ownership="none">
+        <type name="gint"/>
+      </property>
+      <property name="list" writable="1" transfer-ownership="none">
+        <type name="GLib.List">
+          <type name="utf8"/>
+        </type>
+      </property>
+      <property name="list-old" writable="1" transfer-ownership="none">
+        <type name="GLib.List">
+          <type name="utf8"/>
+        </type>
+      </property>
+      <property name="string" writable="1" transfer-ownership="none">
+        <type name="utf8"/>
+      </property>
+      <field name="parent_instance">
+        <type name="GObject.Object" c:type="GObject"/>
+      </field>
+      <field name="bare">
+        <type name="GObject.Object" c:type="GObject*"/>
+      </field>
+      <field name="boxed">
+        <type name="TestBoxed" c:type="RegressTestBoxed*"/>
+      </field>
+      <field name="hash_table">
+        <type name="GLib.HashTable" c:type="GHashTable*">
+          <type name="gpointer" c:type="gpointer"/>
+          <type name="gpointer" c:type="gpointer"/>
+        </type>
+      </field>
+      <field name="list">
+        <type name="GLib.List" c:type="GList*">
+          <type name="gpointer" c:type="gpointer"/>
+        </type>
+      </field>
+      <field name="some_int8">
+        <type name="gint8" c:type="gint8"/>
+      </field>
+      <field name="some_float">
+        <type name="gfloat" c:type="float"/>
+      </field>
+      <field name="some_double">
+        <type name="gdouble" c:type="double"/>
+      </field>
+      <field name="string">
+        <type name="utf8" c:type="char*"/>
+      </field>
+      <glib:signal name="all"
+                   when="first"
+                   no-recurse="1"
+                   detailed="1"
+                   action="1"
+                   no-hooks="1">
+        <return-value transfer-ownership="none">
+          <type name="none"/>
+        </return-value>
+      </glib:signal>
+      <glib:signal name="cleanup" when="cleanup">
+        <return-value transfer-ownership="none">
+          <type name="none"/>
+        </return-value>
+      </glib:signal>
+      <glib:signal name="first" when="first">
+        <return-value transfer-ownership="none">
+          <type name="none"/>
+        </return-value>
+      </glib:signal>
+      <glib:signal name="sig-with-array-prop" when="last">
+        <doc xml:whitespace="preserve">This test signal is like TelepathyGlib's
+TpChannel:: group-members-changed-detailed:</doc>
+        <return-value transfer-ownership="none">
+          <type name="none"/>
+        </return-value>
+        <parameters>
+          <parameter name="arr" transfer-ownership="none">
+            <doc xml:whitespace="preserve">numbers</doc>
+            <array name="GLib.Array">
+              <type name="guint"/>
+            </array>
+          </parameter>
+        </parameters>
+      </glib:signal>
+      <glib:signal name="sig-with-hash-prop" when="last">
+        <doc xml:whitespace="preserve">This test signal is like TelepathyGlib's
+TpAccount::status-changed</doc>
+        <return-value transfer-ownership="none">
+          <type name="none"/>
+        </return-value>
+        <parameters>
+          <parameter name="hash" transfer-ownership="none">
+            <type name="GLib.HashTable">
+              <type name="utf8"/>
+              <type name="GObject.Value"/>
+            </type>
+          </parameter>
+        </parameters>
+      </glib:signal>
+      <glib:signal name="sig-with-obj" when="last">
+        <doc xml:whitespace="preserve">Test transfer none GObject as a param (tests refcounting).
+Use with regress_test_obj_emit_sig_with_obj</doc>
+        <return-value transfer-ownership="none">
+          <type name="none"/>
+        </return-value>
+        <parameters>
+          <parameter name="obj" transfer-ownership="none">
+            <doc xml:whitespace="preserve">A newly created RegressTestObj</doc>
+            <type name="GObject.Object"/>
+          </parameter>
+        </parameters>
+      </glib:signal>
+      <glib:signal name="sig-with-strv" when="last">
+        <doc xml:whitespace="preserve">Test GStrv as a param.</doc>
+        <return-value transfer-ownership="none">
+          <type name="none"/>
+        </return-value>
+        <parameters>
+          <parameter name="strs" transfer-ownership="none">
+            <doc xml:whitespace="preserve">strings</doc>
+            <array>
+              <type name="utf8"/>
+            </array>
+          </parameter>
+        </parameters>
+      </glib:signal>
+      <glib:signal name="test" when="last" no-recurse="1" no-hooks="1">
+        <return-value transfer-ownership="none">
+          <type name="none"/>
+        </return-value>
+      </glib:signal>
+      <glib:signal name="test-with-static-scope-arg"
+                   when="last"
+                   no-recurse="1"
+                   no-hooks="1">
+        <return-value transfer-ownership="none">
+          <type name="none"/>
+        </return-value>
+        <parameters>
+          <parameter name="object" transfer-ownership="none">
+            <type name="TestSimpleBoxedA"/>
+          </parameter>
+        </parameters>
+      </glib:signal>
+    </class>
+    <record name="TestObjClass"
+            c:type="RegressTestObjClass"
+            glib:is-gtype-struct-for="TestObj">
+      <field name="parent_class">
+        <type name="GObject.ObjectClass" c:type="GObjectClass"/>
+      </field>
+      <field name="matrix">
+        <callback name="matrix">
+          <return-value transfer-ownership="none">
+            <type name="gint" c:type="int"/>
+          </return-value>
+          <parameters>
+            <parameter name="obj" transfer-ownership="none">
+              <type name="TestObj" c:type="RegressTestObj*"/>
+            </parameter>
+            <parameter name="somestr" transfer-ownership="none">
+              <doc xml:whitespace="preserve">Meaningless string</doc>
+              <type name="utf8" c:type="char*"/>
+            </parameter>
+          </parameters>
+        </callback>
+      </field>
+      <field name="allow_none_vfunc">
+        <callback name="allow_none_vfunc">
+          <return-value transfer-ownership="none">
+            <type name="none" c:type="void"/>
+          </return-value>
+          <parameters>
+            <parameter name="obj" transfer-ownership="none">
+              <type name="TestObj" c:type="RegressTestObj*"/>
+            </parameter>
+            <parameter name="two" transfer-ownership="none" allow-none="1">
+              <doc xml:whitespace="preserve">Another object</doc>
+              <type name="TestObj" c:type="RegressTestObj*"/>
+            </parameter>
+          </parameters>
+        </callback>
+      </field>
+      <field name="test_signal">
+        <type name="guint" c:type="guint"/>
+      </field>
+      <field name="test_signal_with_static_scope_arg">
+        <type name="guint" c:type="guint"/>
+      </field>
+      <field name="_regress_reserved1" introspectable="0">
+        <callback name="_regress_reserved1">
+          <return-value transfer-ownership="none">
+            <type name="none" c:type="void"/>
+          </return-value>
+        </callback>
+      </field>
+      <field name="_regress_reserved2" introspectable="0">
+        <callback name="_regress_reserved2">
+          <return-value transfer-ownership="none">
+            <type name="none" c:type="void"/>
+          </return-value>
+        </callback>
+      </field>
+    </record>
+    <bitfield name="TestPrivateEnum" c:type="RegressTestPrivateEnum">
+      <member name="public_enum_before"
+              value="1"
+              c:identifier="REGRESS_TEST_PUBLIC_ENUM_BEFORE"/>
+      <member name="public_enum_after"
+              value="4"
+              c:identifier="REGRESS_TEST_PUBLIC_ENUM_AFTER"/>
+    </bitfield>
+    <record name="TestPrivateStruct" c:type="RegressTestPrivateStruct">
+      <field name="this_is_public_before" writable="1">
+        <type name="gint" c:type="gint"/>
+      </field>
+      <field name="this_is_private" readable="0" private="1">
+        <type name="gint" c:type="gint"/>
+      </field>
+      <field name="this_is_public_after" writable="1">
+        <type name="gint" c:type="gint"/>
+      </field>
+    </record>
+    <record name="TestSimpleBoxedA"
+            c:type="RegressTestSimpleBoxedA"
+            glib:type-name="RegressTestSimpleBoxedA"
+            glib:get-type="regress_test_simple_boxed_a_get_gtype"
+            c:symbol-prefix="test_simple_boxed_a">
+      <field name="some_int" writable="1">
+        <type name="gint" c:type="gint"/>
+      </field>
+      <field name="some_int8" writable="1">
+        <type name="gint8" c:type="gint8"/>
+      </field>
+      <field name="some_double" writable="1">
+        <type name="gdouble" c:type="gdouble"/>
+      </field>
+      <field name="some_enum" writable="1">
+        <type name="TestEnum" c:type="RegressTestEnum"/>
+      </field>
+      <method name="copy" c:identifier="regress_test_simple_boxed_a_copy">
+        <return-value transfer-ownership="full">
+          <type name="TestSimpleBoxedA" c:type="RegressTestSimpleBoxedA*"/>
+        </return-value>
+      </method>
+      <method name="equals" c:identifier="regress_test_simple_boxed_a_equals">
+        <return-value transfer-ownership="none">
+          <type name="gboolean" c:type="gboolean"/>
+        </return-value>
+        <parameters>
+          <parameter name="other_a" transfer-ownership="none">
+            <type name="TestSimpleBoxedA" c:type="RegressTestSimpleBoxedA*"/>
+          </parameter>
+        </parameters>
+      </method>
+      <function name="const_return"
+                c:identifier="regress_test_simple_boxed_a_const_return">
+        <return-value transfer-ownership="none">
+          <type name="TestSimpleBoxedA" c:type="RegressTestSimpleBoxedA*"/>
+        </return-value>
+      </function>
+    </record>
+    <record name="TestSimpleBoxedB"
+            c:type="RegressTestSimpleBoxedB"
+            glib:type-name="RegressTestSimpleBoxedB"
+            glib:get-type="regress_test_simple_boxed_b_get_type"
+            c:symbol-prefix="test_simple_boxed_b">
+      <field name="some_int8" writable="1">
+        <type name="gint8" c:type="gint8"/>
+      </field>
+      <field name="nested_a" writable="1">
+        <type name="TestSimpleBoxedA" c:type="RegressTestSimpleBoxedA"/>
+      </field>
+      <method name="copy" c:identifier="regress_test_simple_boxed_b_copy">
+        <return-value transfer-ownership="full">
+          <type name="TestSimpleBoxedB" c:type="RegressTestSimpleBoxedB*"/>
+        </return-value>
+      </method>
+    </record>
+    <callback name="TestSimpleCallback" c:type="RegressTestSimpleCallback">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+    </callback>
+    <record name="TestStructA" c:type="RegressTestStructA">
+      <field name="some_int" writable="1">
+        <type name="gint" c:type="gint"/>
+      </field>
+      <field name="some_int8" writable="1">
+        <type name="gint8" c:type="gint8"/>
+      </field>
+      <field name="some_double" writable="1">
+        <type name="gdouble" c:type="gdouble"/>
+      </field>
+      <field name="some_enum" writable="1">
+        <type name="TestEnum" c:type="RegressTestEnum"/>
+      </field>
+      <method name="clone" c:identifier="regress_test_struct_a_clone">
+        <doc xml:whitespace="preserve">Make a copy of a RegressTestStructA</doc>
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="a_out"
+                     direction="out"
+                     caller-allocates="1"
+                     transfer-ownership="none">
+            <doc xml:whitespace="preserve">the cloned structure</doc>
+            <type name="TestStructA" c:type="RegressTestStructA*"/>
+          </parameter>
+        </parameters>
+      </method>
+    </record>
+    <record name="TestStructB" c:type="RegressTestStructB">
+      <field name="some_int8" writable="1">
+        <type name="gint8" c:type="gint8"/>
+      </field>
+      <field name="nested_a" writable="1">
+        <type name="TestStructA" c:type="RegressTestStructA"/>
+      </field>
+      <method name="clone" c:identifier="regress_test_struct_b_clone">
+        <doc xml:whitespace="preserve">Make a copy of a RegressTestStructB</doc>
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="b_out"
+                     direction="out"
+                     caller-allocates="1"
+                     transfer-ownership="none">
+            <doc xml:whitespace="preserve">the cloned structure</doc>
+            <type name="TestStructB" c:type="RegressTestStructB*"/>
+          </parameter>
+        </parameters>
+      </method>
+    </record>
+    <record name="TestStructC" c:type="RegressTestStructC">
+      <field name="another_int" writable="1">
+        <type name="gint" c:type="gint"/>
+      </field>
+      <field name="obj" writable="1">
+        <type name="GObject.Object" c:type="GObject*"/>
+      </field>
+    </record>
+    <record name="TestStructD" c:type="RegressTestStructD">
+      <field name="array1" writable="1">
+        <array c:type="RegressTestStructA**">
+          <type name="TestStructA" c:type="RegressTestStructA*"/>
+        </array>
+      </field>
+      <field name="array2" writable="1">
+        <array c:type="gpointer*">
+          <type name="TestObj"/>
+        </array>
+      </field>
+      <field name="field" writable="1">
+        <type name="TestObj"/>
+      </field>
+      <field name="list" writable="1">
+        <type name="GLib.List" c:type="GList*">
+          <type name="TestObj"/>
+        </type>
+      </field>
+      <field name="garray" writable="1">
+        <array name="GLib.PtrArray" c:type="GPtrArray*">
+          <type name="TestObj"/>
+        </array>
+      </field>
+    </record>
+    <record name="TestStructE" c:type="RegressTestStructE">
+      <field name="some_type" writable="1">
+        <type name="GType" c:type="GType"/>
+      </field>
+      <field name="some_union" writable="1">
+        <array zero-terminated="0" fixed-size="2">
+          <type name="TestStructE__some_union__union"/>
+        </array>
+      </field>
+    </record>
+    <union name="TestStructE__some_union__union">
+      <field name="v_int" writable="1">
+        <type name="gint" c:type="gint"/>
+      </field>
+      <field name="v_uint" writable="1">
+        <type name="guint" c:type="guint"/>
+      </field>
+      <field name="v_long" writable="1">
+        <type name="glong" c:type="glong"/>
+      </field>
+      <field name="v_ulong" writable="1">
+        <type name="gulong" c:type="gulong"/>
+      </field>
+      <field name="v_int64" writable="1">
+        <type name="gint64" c:type="gint64"/>
+      </field>
+      <field name="v_uint64" writable="1">
+        <type name="guint64" c:type="guint64"/>
+      </field>
+      <field name="v_float" writable="1">
+        <type name="gfloat" c:type="gfloat"/>
+      </field>
+      <field name="v_double" writable="1">
+        <type name="gdouble" c:type="gdouble"/>
+      </field>
+      <field name="v_pointer" writable="1">
+        <type name="gpointer" c:type="gpointer"/>
+      </field>
+    </union>
+    <record name="TestStructFixedArray" c:type="RegressTestStructFixedArray">
+      <field name="just_int" writable="1">
+        <type name="gint" c:type="gint"/>
+      </field>
+      <field name="array" writable="1">
+        <array zero-terminated="0" c:type="gint" fixed-size="10">
+          <type name="gint" c:type="gint"/>
+        </array>
+      </field>
+      <method name="frob" c:identifier="regress_test_struct_fixed_array_frob">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+      </method>
+    </record>
+    <class name="TestSubObj"
+           c:symbol-prefix="test_sub_obj"
+           c:type="RegressTestSubObj"
+           parent="TestObj"
+           glib:type-name="RegressTestSubObj"
+           glib:get-type="regress_test_sub_obj_get_type"
+           glib:type-struct="TestSubObjClass">
+      <constructor name="new" c:identifier="regress_test_sub_obj_new">
+        <return-value transfer-ownership="full">
+          <type name="TestObj" c:type="RegressTestObj*"/>
+        </return-value>
+      </constructor>
+      <method name="instance_method"
+              c:identifier="regress_test_sub_obj_instance_method">
+        <return-value transfer-ownership="none">
+          <type name="gint" c:type="int"/>
+        </return-value>
+      </method>
+      <method name="unset_bare" c:identifier="regress_test_sub_obj_unset_bare">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+      </method>
+      <field name="parent_instance">
+        <type name="TestObj" c:type="RegressTestObj"/>
+      </field>
+    </class>
+    <record name="TestSubObjClass"
+            c:type="RegressTestSubObjClass"
+            glib:is-gtype-struct-for="TestSubObj">
+      <field name="parent_class">
+        <type name="TestObjClass" c:type="RegressTestObjClass"/>
+      </field>
+    </record>
+    <class name="TestWi8021x"
+           c:symbol-prefix="test_wi_802_1x"
+           c:type="RegressTestWi8021x"
+           parent="GObject.Object"
+           glib:type-name="RegressTestWi8021x"
+           glib:get-type="regress_test_wi_802_1x_get_type"
+           glib:type-struct="TestWi8021xClass">
+      <constructor name="new" c:identifier="regress_test_wi_802_1x_new">
+        <return-value transfer-ownership="full">
+          <type name="TestWi8021x" c:type="RegressTestWi8021x*"/>
+        </return-value>
+      </constructor>
+      <function name="static_method"
+                c:identifier="regress_test_wi_802_1x_static_method">
+        <return-value transfer-ownership="none">
+          <type name="gint" c:type="int"/>
+        </return-value>
+        <parameters>
+          <parameter name="x" transfer-ownership="none">
+            <type name="gint" c:type="int"/>
+          </parameter>
+        </parameters>
+      </function>
+      <method name="get_testbool"
+              c:identifier="regress_test_wi_802_1x_get_testbool">
+        <return-value transfer-ownership="none">
+          <type name="gboolean" c:type="gboolean"/>
+        </return-value>
+      </method>
+      <method name="set_testbool"
+              c:identifier="regress_test_wi_802_1x_set_testbool">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="v" transfer-ownership="none">
+            <type name="gboolean" c:type="gboolean"/>
+          </parameter>
+        </parameters>
+      </method>
+      <property name="testbool" writable="1" transfer-ownership="none">
+        <type name="gboolean"/>
+      </property>
+      <field name="parent_instance">
+        <type name="GObject.Object" c:type="GObject"/>
+      </field>
+      <field name="testbool">
+        <type name="gboolean" c:type="gboolean"/>
+      </field>
+    </class>
+    <record name="TestWi8021xClass"
+            c:type="RegressTestWi8021xClass"
+            glib:is-gtype-struct-for="TestWi8021x">
+      <field name="parent_class">
+        <type name="GObject.ObjectClass" c:type="GObjectClass"/>
+      </field>
+    </record>
+    <constant name="UTF8_CONSTANT"
+              value="const â™¥ utf8"
+              c:type="REGRESS_UTF8_CONSTANT">
+      <type name="utf8" c:type="gchar*"/>
+    </constant>
+    <function name="aliased_caller_alloc"
+              c:identifier="regress_aliased_caller_alloc">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="boxed"
+                   direction="out"
+                   caller-allocates="1"
+                   transfer-ownership="none">
+          <type name="AliasedTestBoxed" c:type="RegressAliasedTestBoxed*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="func_obj_null_in" c:identifier="regress_func_obj_null_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="obj" transfer-ownership="none" allow-none="1">
+          <doc xml:whitespace="preserve">A #RegressTestObj</doc>
+          <type name="TestObj" c:type="RegressTestObj*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="global_get_flags_out"
+              c:identifier="regress_global_get_flags_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="v"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <doc xml:whitespace="preserve">A flags value</doc>
+          <type name="TestFlags" c:type="RegressTestFlags*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="introspectable_via_alias"
+              c:identifier="regress_introspectable_via_alias">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="data" transfer-ownership="none">
+          <type name="PtrArrayAlias" c:type="RegressPtrArrayAlias*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="not_introspectable_via_alias"
+              c:identifier="regress_not_introspectable_via_alias"
+              introspectable="0">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="ok" transfer-ownership="none">
+          <type name="VaListAlias" c:type="RegressVaListAlias"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="random_function_with_skipped_structure"
+              c:identifier="regress_random_function_with_skipped_structure"
+              introspectable="0">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="x" transfer-ownership="none">
+          <type name="gint" c:type="int"/>
+        </parameter>
+        <parameter name="foo" transfer-ownership="none">
+          <type name="SkippedStructure" c:type="RegressSkippedStructure*"/>
+        </parameter>
+        <parameter name="v" transfer-ownership="none">
+          <type name="gdouble" c:type="double"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="set_abort_on_error"
+              c:identifier="regress_set_abort_on_error">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="abort_on_error" transfer-ownership="none">
+          <type name="gboolean" c:type="gboolean"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_array_callback"
+              c:identifier="regress_test_array_callback">
+      <return-value transfer-ownership="none">
+        <type name="gint" c:type="int"/>
+      </return-value>
+      <parameters>
+        <parameter name="callback" transfer-ownership="none" scope="call">
+          <type name="TestCallbackArray" c:type="RegressTestCallbackArray"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_array_fixed_out_objects"
+              c:identifier="regress_test_array_fixed_out_objects">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="objs"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <doc xml:whitespace="preserve">An array of #RegressTestObj</doc>
+          <array zero-terminated="0" c:type="RegressTestObj***" fixed-size="2">
+            <type name="TestObj" c:type="RegressTestObj**"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_array_fixed_size_int_in"
+              c:identifier="regress_test_array_fixed_size_int_in">
+      <return-value transfer-ownership="none">
+        <doc xml:whitespace="preserve">the sum of the items in @ints</doc>
+        <type name="gint" c:type="int"/>
+      </return-value>
+      <parameters>
+        <parameter name="ints" transfer-ownership="none">
+          <doc xml:whitespace="preserve">a list of 5 integers</doc>
+          <array zero-terminated="0" c:type="int*" fixed-size="5">
+            <type name="gint" c:type="int"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_array_fixed_size_int_out"
+              c:identifier="regress_test_array_fixed_size_int_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="ints"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <doc xml:whitespace="preserve">a list of 5 integers ranging from 0 to 4</doc>
+          <array zero-terminated="0" c:type="int**" fixed-size="5">
+            <type name="gint" c:type="int*"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_array_fixed_size_int_return"
+              c:identifier="regress_test_array_fixed_size_int_return">
+      <return-value transfer-ownership="full">
+        <doc xml:whitespace="preserve">a list of 5 integers ranging from 0 to 4</doc>
+        <array zero-terminated="0" c:type="int*" fixed-size="5">
+          <type name="gint" c:type="int"/>
+        </array>
+      </return-value>
+    </function>
+    <function name="test_array_gint16_in"
+              c:identifier="regress_test_array_gint16_in">
+      <return-value transfer-ownership="none">
+        <type name="gint" c:type="int"/>
+      </return-value>
+      <parameters>
+        <parameter name="n_ints" transfer-ownership="none">
+          <type name="gint" c:type="int"/>
+        </parameter>
+        <parameter name="ints" transfer-ownership="none">
+          <doc xml:whitespace="preserve">List of ints</doc>
+          <array length="0" zero-terminated="0" c:type="gint16*">
+            <type name="gint16" c:type="gint16"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_array_gint32_in"
+              c:identifier="regress_test_array_gint32_in">
+      <return-value transfer-ownership="none">
+        <type name="gint32" c:type="gint32"/>
+      </return-value>
+      <parameters>
+        <parameter name="n_ints" transfer-ownership="none">
+          <type name="gint" c:type="int"/>
+        </parameter>
+        <parameter name="ints" transfer-ownership="none">
+          <doc xml:whitespace="preserve">List of ints</doc>
+          <array length="0" zero-terminated="0" c:type="gint32*">
+            <type name="gint32" c:type="gint32"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_array_gint64_in"
+              c:identifier="regress_test_array_gint64_in">
+      <return-value transfer-ownership="none">
+        <type name="gint64" c:type="gint64"/>
+      </return-value>
+      <parameters>
+        <parameter name="n_ints" transfer-ownership="none">
+          <type name="gint" c:type="int"/>
+        </parameter>
+        <parameter name="ints" transfer-ownership="none">
+          <doc xml:whitespace="preserve">List of ints</doc>
+          <array length="0" zero-terminated="0" c:type="gint64*">
+            <type name="gint64" c:type="gint64"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_array_gint8_in"
+              c:identifier="regress_test_array_gint8_in">
+      <return-value transfer-ownership="none">
+        <type name="gint" c:type="int"/>
+      </return-value>
+      <parameters>
+        <parameter name="n_ints" transfer-ownership="none">
+          <type name="gint" c:type="int"/>
+        </parameter>
+        <parameter name="ints" transfer-ownership="none">
+          <doc xml:whitespace="preserve">List of ints</doc>
+          <array length="0" zero-terminated="0" c:type="gint8*">
+            <type name="gint8" c:type="gint8"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_array_gtype_in"
+              c:identifier="regress_test_array_gtype_in">
+      <return-value transfer-ownership="full">
+        <doc xml:whitespace="preserve">string representation of provided types</doc>
+        <type name="utf8" c:type="char*"/>
+      </return-value>
+      <parameters>
+        <parameter name="n_types" transfer-ownership="none">
+          <type name="gint" c:type="int"/>
+        </parameter>
+        <parameter name="types" transfer-ownership="none">
+          <doc xml:whitespace="preserve">List of types</doc>
+          <array length="0" zero-terminated="0" c:type="GType*">
+            <type name="GType" c:type="GType"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_array_int_full_out"
+              c:identifier="regress_test_array_int_full_out">
+      <return-value transfer-ownership="full">
+        <doc xml:whitespace="preserve">a new array of integers.</doc>
+        <array length="0" zero-terminated="0" c:type="int*">
+          <type name="gint" c:type="int"/>
+        </array>
+      </return-value>
+      <parameters>
+        <parameter name="len"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <doc xml:whitespace="preserve">length of the returned array.</doc>
+          <type name="gint" c:type="int*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_array_int_in"
+              c:identifier="regress_test_array_int_in">
+      <return-value transfer-ownership="none">
+        <type name="gint" c:type="int"/>
+      </return-value>
+      <parameters>
+        <parameter name="n_ints" transfer-ownership="none">
+          <type name="gint" c:type="int"/>
+        </parameter>
+        <parameter name="ints" transfer-ownership="none">
+          <doc xml:whitespace="preserve">List of ints</doc>
+          <array length="0" zero-terminated="0" c:type="int*">
+            <type name="gint" c:type="int"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_array_int_inout"
+              c:identifier="regress_test_array_int_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="n_ints"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <doc xml:whitespace="preserve">the length of @ints</doc>
+          <type name="gint" c:type="int*"/>
+        </parameter>
+        <parameter name="ints"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <doc xml:whitespace="preserve">a list of integers whose items will be increased by 1, except the first that will be dropped</doc>
+          <array length="0" zero-terminated="0" c:type="int**">
+            <type name="gint" c:type="int*"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_array_int_none_out"
+              c:identifier="regress_test_array_int_none_out">
+      <return-value transfer-ownership="none">
+        <doc xml:whitespace="preserve">a static array of integers.</doc>
+        <array length="0" zero-terminated="0" c:type="int*">
+          <type name="gint" c:type="int"/>
+        </array>
+      </return-value>
+      <parameters>
+        <parameter name="len"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <doc xml:whitespace="preserve">length of the returned array.</doc>
+          <type name="gint" c:type="int*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_array_int_null_in"
+              c:identifier="regress_test_array_int_null_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="arr" transfer-ownership="none" allow-none="1">
+          <array length="1" zero-terminated="0" c:type="int*">
+            <type name="gint" c:type="int"/>
+          </array>
+        </parameter>
+        <parameter name="len" transfer-ownership="none">
+          <doc xml:whitespace="preserve">length</doc>
+          <type name="gint" c:type="int"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_array_int_null_out"
+              c:identifier="regress_test_array_int_null_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="arr"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full"
+                   allow-none="1">
+          <array length="1" zero-terminated="0" c:type="int**">
+            <type name="gint" c:type="int*"/>
+          </array>
+        </parameter>
+        <parameter name="len"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <doc xml:whitespace="preserve">length</doc>
+          <type name="gint" c:type="int*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_array_int_out"
+              c:identifier="regress_test_array_int_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="n_ints"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <doc xml:whitespace="preserve">the length of @ints</doc>
+          <type name="gint" c:type="int*"/>
+        </parameter>
+        <parameter name="ints"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <doc xml:whitespace="preserve">a list of 5 integers, from 0 to 4 in consecutive order</doc>
+          <array length="0" zero-terminated="0" c:type="int**">
+            <type name="gint" c:type="int*"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_async_ready_callback"
+              c:identifier="regress_test_async_ready_callback">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="callback"
+                   transfer-ownership="none"
+                   allow-none="1"
+                   scope="async">
+          <type name="Gio.AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_boolean" c:identifier="regress_test_boolean">
+      <return-value transfer-ownership="none">
+        <type name="gboolean" c:type="gboolean"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="gboolean" c:type="gboolean"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_boolean_false"
+              c:identifier="regress_test_boolean_false">
+      <return-value transfer-ownership="none">
+        <type name="gboolean" c:type="gboolean"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="gboolean" c:type="gboolean"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_boolean_true"
+              c:identifier="regress_test_boolean_true">
+      <return-value transfer-ownership="none">
+        <type name="gboolean" c:type="gboolean"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="gboolean" c:type="gboolean"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_cairo_context_full_return"
+              c:identifier="regress_test_cairo_context_full_return">
+      <return-value transfer-ownership="full">
+        <type name="cairo.Context" c:type="cairo_t*"/>
+      </return-value>
+    </function>
+    <function name="test_cairo_context_none_in"
+              c:identifier="regress_test_cairo_context_none_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="context" transfer-ownership="none">
+          <type name="cairo.Context" c:type="cairo_t*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_cairo_surface_full_out"
+              c:identifier="regress_test_cairo_surface_full_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="surface"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="cairo.Surface" c:type="cairo_surface_t**"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_cairo_surface_full_return"
+              c:identifier="regress_test_cairo_surface_full_return">
+      <return-value transfer-ownership="full">
+        <type name="cairo.Surface" c:type="cairo_surface_t*"/>
+      </return-value>
+    </function>
+    <function name="test_cairo_surface_none_in"
+              c:identifier="regress_test_cairo_surface_none_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="surface" transfer-ownership="none">
+          <type name="cairo.Surface" c:type="cairo_surface_t*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_cairo_surface_none_return"
+              c:identifier="regress_test_cairo_surface_none_return">
+      <return-value transfer-ownership="none">
+        <type name="cairo.Surface" c:type="cairo_surface_t*"/>
+      </return-value>
+    </function>
+    <function name="test_callback" c:identifier="regress_test_callback">
+      <return-value transfer-ownership="none">
+        <type name="gint" c:type="int"/>
+      </return-value>
+      <parameters>
+        <parameter name="callback"
+                   transfer-ownership="none"
+                   allow-none="1"
+                   scope="call">
+          <type name="TestCallback" c:type="RegressTestCallback"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_callback_async"
+              c:identifier="regress_test_callback_async">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="callback"
+                   transfer-ownership="none"
+                   scope="async"
+                   closure="1">
+          <type name="TestCallbackUserData"
+                c:type="RegressTestCallbackUserData"/>
+        </parameter>
+        <parameter name="user_data" transfer-ownership="none">
+          <type name="gpointer" c:type="gpointer"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_callback_destroy_notify"
+              c:identifier="regress_test_callback_destroy_notify">
+      <doc xml:whitespace="preserve">Notified - callback persists until a DestroyNotify delegate
+is invoked.</doc>
+      <return-value transfer-ownership="none">
+        <type name="gint" c:type="int"/>
+      </return-value>
+      <parameters>
+        <parameter name="callback"
+                   transfer-ownership="none"
+                   scope="notified"
+                   closure="1"
+                   destroy="2">
+          <type name="TestCallbackUserData"
+                c:type="RegressTestCallbackUserData"/>
+        </parameter>
+        <parameter name="user_data" transfer-ownership="none">
+          <type name="gpointer" c:type="gpointer"/>
+        </parameter>
+        <parameter name="notify" transfer-ownership="none" scope="async">
+          <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_callback_thaw_async"
+              c:identifier="regress_test_callback_thaw_async">
+      <return-value transfer-ownership="none">
+        <type name="gint" c:type="int"/>
+      </return-value>
+    </function>
+    <function name="test_callback_thaw_notifications"
+              c:identifier="regress_test_callback_thaw_notifications">
+      <doc xml:whitespace="preserve">Invokes all callbacks installed by #test_callback_destroy_notify(),
+adding up their return values, and removes them, invoking the
+corresponding destroy notfications.</doc>
+      <return-value transfer-ownership="none">
+        <doc xml:whitespace="preserve">Sum of the return values of the invoked callbacks.</doc>
+        <type name="gint" c:type="int"/>
+      </return-value>
+    </function>
+    <function name="test_callback_user_data"
+              c:identifier="regress_test_callback_user_data">
+      <doc xml:whitespace="preserve">Call - callback parameter persists for the duration of the method
+call and can be released on return.</doc>
+      <return-value transfer-ownership="none">
+        <type name="gint" c:type="int"/>
+      </return-value>
+      <parameters>
+        <parameter name="callback"
+                   transfer-ownership="none"
+                   scope="call"
+                   closure="1">
+          <type name="TestCallbackUserData"
+                c:type="RegressTestCallbackUserData"/>
+        </parameter>
+        <parameter name="user_data" transfer-ownership="none">
+          <type name="gpointer" c:type="gpointer"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_closure" c:identifier="regress_test_closure">
+      <return-value transfer-ownership="none">
+        <type name="gint" c:type="int"/>
+      </return-value>
+      <parameters>
+        <parameter name="closure" transfer-ownership="none">
+          <type name="GObject.Closure" c:type="GClosure*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_closure_one_arg"
+              c:identifier="regress_test_closure_one_arg">
+      <return-value transfer-ownership="none">
+        <type name="gint" c:type="int"/>
+      </return-value>
+      <parameters>
+        <parameter name="closure" transfer-ownership="none">
+          <type name="GObject.Closure" c:type="GClosure*"/>
+        </parameter>
+        <parameter name="arg" transfer-ownership="none">
+          <type name="gint" c:type="int"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_closure_variant"
+              c:identifier="regress_test_closure_variant">
+      <return-value transfer-ownership="full">
+        <doc xml:whitespace="preserve">the return value of @closure</doc>
+        <type name="GLib.Variant" c:type="GVariant*"/>
+      </return-value>
+      <parameters>
+        <parameter name="closure" transfer-ownership="none">
+          <doc xml:whitespace="preserve">GClosure which takes one GVariant and returns a GVariant</doc>
+          <type name="GObject.Closure" c:type="GClosure*"/>
+        </parameter>
+        <parameter name="arg" transfer-ownership="none">
+          <doc xml:whitespace="preserve">a GVariant passed as argument to @closure</doc>
+          <type name="GLib.Variant" c:type="GVariant*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_date_in_gvalue"
+              c:identifier="regress_test_date_in_gvalue">
+      <return-value transfer-ownership="full">
+        <type name="GObject.Value" c:type="GValue*"/>
+      </return-value>
+    </function>
+    <function name="test_double" c:identifier="regress_test_double">
+      <return-value transfer-ownership="none">
+        <type name="gdouble" c:type="gdouble"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="gdouble" c:type="gdouble"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_enum_param"
+              c:identifier="regress_test_enum_param"
+              moved-to="TestEnum.param">
+      <return-value transfer-ownership="none">
+        <type name="utf8" c:type="gchar*"/>
+      </return-value>
+      <parameters>
+        <parameter name="e" transfer-ownership="none">
+          <type name="TestEnum" c:type="RegressTestEnum"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_filename_return"
+              c:identifier="regress_test_filename_return">
+      <return-value transfer-ownership="full">
+        <doc xml:whitespace="preserve">list of strings</doc>
+        <type name="GLib.SList" c:type="GSList*">
+          <type name="filename"/>
+        </type>
+      </return-value>
+    </function>
+    <function name="test_float" c:identifier="regress_test_float">
+      <return-value transfer-ownership="none">
+        <type name="gfloat" c:type="gfloat"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="gfloat" c:type="gfloat"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_garray_container_return"
+              c:identifier="regress_test_garray_container_return">
+      <return-value transfer-ownership="container">
+        <array name="GLib.PtrArray" c:type="GPtrArray*">
+          <type name="utf8"/>
+        </array>
+      </return-value>
+    </function>
+    <function name="test_garray_full_return"
+              c:identifier="regress_test_garray_full_return">
+      <return-value transfer-ownership="full">
+        <array name="GLib.PtrArray" c:type="GPtrArray*">
+          <type name="utf8"/>
+        </array>
+      </return-value>
+    </function>
+    <function name="test_gerror_callback"
+              c:identifier="regress_test_gerror_callback">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="callback" transfer-ownership="none" scope="call">
+          <type name="TestCallbackGError" c:type="RegressTestCallbackGError"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_ghash_container_return"
+              c:identifier="regress_test_ghash_container_return">
+      <return-value transfer-ownership="container">
+        <type name="GLib.HashTable" c:type="GHashTable*">
+          <type name="utf8"/>
+          <type name="utf8"/>
+        </type>
+      </return-value>
+    </function>
+    <function name="test_ghash_everything_return"
+              c:identifier="regress_test_ghash_everything_return">
+      <return-value transfer-ownership="full">
+        <type name="GLib.HashTable" c:type="GHashTable*">
+          <type name="utf8"/>
+          <type name="utf8"/>
+        </type>
+      </return-value>
+    </function>
+    <function name="test_ghash_gvalue_in"
+              c:identifier="regress_test_ghash_gvalue_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="hash" transfer-ownership="none">
+          <doc xml:whitespace="preserve">the hash table returned by regress_test_ghash_gvalue_return().</doc>
+          <type name="GLib.HashTable" c:type="GHashTable*">
+            <type name="utf8"/>
+            <type name="GObject.Value"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_ghash_gvalue_return"
+              c:identifier="regress_test_ghash_gvalue_return">
+      <return-value transfer-ownership="none">
+        <type name="GLib.HashTable" c:type="GHashTable*">
+          <type name="utf8"/>
+          <type name="GObject.Value"/>
+        </type>
+      </return-value>
+    </function>
+    <function name="test_ghash_nested_everything_return"
+              c:identifier="regress_test_ghash_nested_everything_return">
+      <doc xml:whitespace="preserve">Specify nested parameterized types directly with the (type ) annotation.</doc>
+      <return-value transfer-ownership="full">
+        <type name="GLib.HashTable" c:type="GHashTable*">
+          <type name="utf8"/>
+          <type name="GLib.HashTable">
+            <type name="utf8"/>
+            <type name="utf8"/>
+          </type>
+        </type>
+      </return-value>
+    </function>
+    <function name="test_ghash_nested_everything_return2"
+              c:identifier="regress_test_ghash_nested_everything_return2">
+      <doc xml:whitespace="preserve">Another way of specifying nested parameterized types: using the
+element-type annotation.</doc>
+      <return-value transfer-ownership="full">
+        <type name="GLib.HashTable" c:type="GHashTable*">
+          <type name="utf8"/>
+          <type name="GLib.HashTable">
+            <type name="utf8"/>
+            <type name="utf8"/>
+          </type>
+        </type>
+      </return-value>
+    </function>
+    <function name="test_ghash_nothing_in"
+              c:identifier="regress_test_ghash_nothing_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="GLib.HashTable" c:type="GHashTable*">
+            <type name="utf8"/>
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_ghash_nothing_in2"
+              c:identifier="regress_test_ghash_nothing_in2">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="GLib.HashTable" c:type="GHashTable*">
+            <type name="utf8"/>
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_ghash_nothing_return"
+              c:identifier="regress_test_ghash_nothing_return">
+      <return-value transfer-ownership="none">
+        <type name="GLib.HashTable" c:type="GHashTable*">
+          <type name="utf8"/>
+          <type name="utf8"/>
+        </type>
+      </return-value>
+    </function>
+    <function name="test_ghash_nothing_return2"
+              c:identifier="regress_test_ghash_nothing_return2">
+      <return-value transfer-ownership="none">
+        <type name="GLib.HashTable" c:type="GHashTable*">
+          <type name="utf8"/>
+          <type name="utf8"/>
+        </type>
+      </return-value>
+    </function>
+    <function name="test_ghash_null_in"
+              c:identifier="regress_test_ghash_null_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none" allow-none="1">
+          <type name="GLib.HashTable" c:type="GHashTable*">
+            <type name="utf8"/>
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_ghash_null_out"
+              c:identifier="regress_test_ghash_null_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="out"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full"
+                   allow-none="1">
+          <type name="GLib.HashTable" c:type="GHashTable**">
+            <type name="utf8"/>
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_ghash_null_return"
+              c:identifier="regress_test_ghash_null_return">
+      <return-value transfer-ownership="none">
+        <type name="GLib.HashTable" c:type="GHashTable*">
+          <type name="utf8"/>
+          <type name="utf8"/>
+        </type>
+      </return-value>
+    </function>
+    <function name="test_glist_container_return"
+              c:identifier="regress_test_glist_container_return">
+      <return-value transfer-ownership="container">
+        <type name="GLib.List" c:type="GList*">
+          <type name="utf8"/>
+        </type>
+      </return-value>
+    </function>
+    <function name="test_glist_everything_return"
+              c:identifier="regress_test_glist_everything_return">
+      <return-value transfer-ownership="full">
+        <type name="GLib.List" c:type="GList*">
+          <type name="utf8"/>
+        </type>
+      </return-value>
+    </function>
+    <function name="test_glist_nothing_in"
+              c:identifier="regress_test_glist_nothing_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="GLib.List" c:type="GList*">
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_glist_nothing_in2"
+              c:identifier="regress_test_glist_nothing_in2">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="GLib.List" c:type="GList*">
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_glist_nothing_return"
+              c:identifier="regress_test_glist_nothing_return">
+      <return-value transfer-ownership="none">
+        <type name="GLib.List" c:type="GList*">
+          <type name="utf8"/>
+        </type>
+      </return-value>
+    </function>
+    <function name="test_glist_nothing_return2"
+              c:identifier="regress_test_glist_nothing_return2">
+      <return-value transfer-ownership="none">
+        <type name="GLib.List" c:type="GList*">
+          <type name="utf8"/>
+        </type>
+      </return-value>
+    </function>
+    <function name="test_glist_null_in"
+              c:identifier="regress_test_glist_null_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none" allow-none="1">
+          <type name="GLib.SList" c:type="GSList*">
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_glist_null_out"
+              c:identifier="regress_test_glist_null_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="out_list"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full"
+                   allow-none="1">
+          <type name="GLib.SList" c:type="GSList**">
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_gslist_container_return"
+              c:identifier="regress_test_gslist_container_return">
+      <return-value transfer-ownership="container">
+        <type name="GLib.SList" c:type="GSList*">
+          <type name="utf8"/>
+        </type>
+      </return-value>
+    </function>
+    <function name="test_gslist_everything_return"
+              c:identifier="regress_test_gslist_everything_return">
+      <return-value transfer-ownership="full">
+        <type name="GLib.SList" c:type="GSList*">
+          <type name="utf8"/>
+        </type>
+      </return-value>
+    </function>
+    <function name="test_gslist_nothing_in"
+              c:identifier="regress_test_gslist_nothing_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="GLib.SList" c:type="GSList*">
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_gslist_nothing_in2"
+              c:identifier="regress_test_gslist_nothing_in2">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="GLib.SList" c:type="GSList*">
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_gslist_nothing_return"
+              c:identifier="regress_test_gslist_nothing_return">
+      <return-value transfer-ownership="none">
+        <type name="GLib.SList" c:type="GSList*">
+          <type name="utf8"/>
+        </type>
+      </return-value>
+    </function>
+    <function name="test_gslist_nothing_return2"
+              c:identifier="regress_test_gslist_nothing_return2">
+      <return-value transfer-ownership="none">
+        <type name="GLib.SList" c:type="GSList*">
+          <type name="utf8"/>
+        </type>
+      </return-value>
+    </function>
+    <function name="test_gslist_null_in"
+              c:identifier="regress_test_gslist_null_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none" allow-none="1">
+          <type name="GLib.SList" c:type="GSList*">
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_gslist_null_out"
+              c:identifier="regress_test_gslist_null_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="out_list"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full"
+                   allow-none="1">
+          <type name="GLib.SList" c:type="GSList**">
+            <type name="utf8"/>
+          </type>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_gtype" c:identifier="regress_test_gtype">
+      <return-value transfer-ownership="none">
+        <type name="GType" c:type="GType"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="GType" c:type="GType"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_gvariant_as" c:identifier="regress_test_gvariant_as">
+      <return-value transfer-ownership="none">
+        <doc xml:whitespace="preserve">New variant</doc>
+        <type name="GLib.Variant" c:type="GVariant*"/>
+      </return-value>
+    </function>
+    <function name="test_gvariant_asv"
+              c:identifier="regress_test_gvariant_asv">
+      <return-value transfer-ownership="none">
+        <doc xml:whitespace="preserve">New variant</doc>
+        <type name="GLib.Variant" c:type="GVariant*"/>
+      </return-value>
+    </function>
+    <function name="test_gvariant_i" c:identifier="regress_test_gvariant_i">
+      <return-value transfer-ownership="none">
+        <doc xml:whitespace="preserve">New variant</doc>
+        <type name="GLib.Variant" c:type="GVariant*"/>
+      </return-value>
+    </function>
+    <function name="test_gvariant_s" c:identifier="regress_test_gvariant_s">
+      <return-value transfer-ownership="none">
+        <doc xml:whitespace="preserve">New variant</doc>
+        <type name="GLib.Variant" c:type="GVariant*"/>
+      </return-value>
+    </function>
+    <function name="test_gvariant_v" c:identifier="regress_test_gvariant_v">
+      <return-value transfer-ownership="none">
+        <doc xml:whitespace="preserve">New variant</doc>
+        <type name="GLib.Variant" c:type="GVariant*"/>
+      </return-value>
+    </function>
+    <function name="test_hash_table_callback"
+              c:identifier="regress_test_hash_table_callback">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="data" transfer-ownership="none">
+          <doc xml:whitespace="preserve">GHashTable that gets passed to callback</doc>
+          <type name="GLib.HashTable" c:type="GHashTable*">
+            <type name="utf8"/>
+            <type name="gint"/>
+          </type>
+        </parameter>
+        <parameter name="callback" transfer-ownership="none" scope="call">
+          <type name="TestCallbackHashtable"
+                c:type="RegressTestCallbackHashtable"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_int" c:identifier="regress_test_int">
+      <return-value transfer-ownership="none">
+        <type name="gint" c:type="gint"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="gint" c:type="gint"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_int16" c:identifier="regress_test_int16">
+      <return-value transfer-ownership="none">
+        <type name="gint16" c:type="gint16"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="gint16" c:type="gint16"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_int32" c:identifier="regress_test_int32">
+      <return-value transfer-ownership="none">
+        <type name="gint32" c:type="gint32"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="gint32" c:type="gint32"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_int64" c:identifier="regress_test_int64">
+      <return-value transfer-ownership="none">
+        <type name="gint64" c:type="gint64"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="gint64" c:type="gint64"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_int8" c:identifier="regress_test_int8">
+      <return-value transfer-ownership="none">
+        <type name="gint8" c:type="gint8"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="gint8" c:type="gint8"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_int_out_utf8"
+              c:identifier="regress_test_int_out_utf8">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="length"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="gint" c:type="int*"/>
+        </parameter>
+        <parameter name="in" transfer-ownership="none">
+          <type name="utf8" c:type="char*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_int_value_arg"
+              c:identifier="regress_test_int_value_arg">
+      <return-value transfer-ownership="none">
+        <type name="gint" c:type="int"/>
+      </return-value>
+      <parameters>
+        <parameter name="v" transfer-ownership="none">
+          <type name="GObject.Value" c:type="GValue*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_long" c:identifier="regress_test_long">
+      <return-value transfer-ownership="none">
+        <type name="glong" c:type="glong"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="glong" c:type="glong"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_multi_callback"
+              c:identifier="regress_test_multi_callback">
+      <return-value transfer-ownership="none">
+        <type name="gint" c:type="int"/>
+      </return-value>
+      <parameters>
+        <parameter name="callback"
+                   transfer-ownership="none"
+                   allow-none="1"
+                   scope="call">
+          <type name="TestCallback" c:type="RegressTestCallback"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_multi_double_args"
+              c:identifier="regress_test_multi_double_args">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="gdouble" c:type="gdouble"/>
+        </parameter>
+        <parameter name="one"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="gdouble" c:type="gdouble*"/>
+        </parameter>
+        <parameter name="two"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="gdouble" c:type="gdouble*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_multiline_doc_comments"
+              c:identifier="regress_test_multiline_doc_comments">
+      <doc xml:whitespace="preserve">This is a function.
+
+It has multiple lines in the documentation.
+
+The sky is blue.
+
+You will give me your credit card number.</doc>
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+    </function>
+    <function name="test_nested_parameter"
+              c:identifier="regress_test_nested_parameter">
+      <doc xml:whitespace="preserve">&lt;informaltable&gt;
+&lt;tgroup cols="3"&gt;
+&lt;thead&gt;
+&lt;row&gt;
+&lt;entry&gt;Syntax&lt;/entry&gt;
+&lt;entry&gt;Explanation&lt;/entry&gt;
+&lt;entry&gt;Examples&lt;/entry&gt;
+&lt;/row&gt;
+&lt;/thead&gt;
+&lt;tbody&gt;
+&lt;row&gt;
+&lt;entry&gt;rgb(@r, @g, @b)&lt;/entry&gt;
+&lt;entry&gt;An opaque color; @r, @g, @b can be either integers between
+0 and 255 or percentages&lt;/entry&gt;
+&lt;entry&gt;&lt;literallayout&gt;rgb(128, 10, 54)
+rgb(20%, 30%, 0%)&lt;/literallayout&gt;&lt;/entry&gt;
+&lt;/row&gt;
+&lt;row&gt;
+&lt;entry&gt;rgba(@r, @g, @b, @a)&lt;/entry&gt;
+&lt;entry&gt;A translucent color; @r, @g, @b are as in the previous row,
+@a is a floating point number between 0 and 1&lt;/entry&gt;
+&lt;entry&gt;&lt;literallayout&gt;rgba(255, 255, 0, 0.5)&lt;/literallayout&gt;&lt;/entry&gt;
+&lt;/row&gt;
+&lt;/tbody&gt;
+&lt;/tgroup&gt;
+&lt;/informaltable&gt;
+
+What we're testing here is that the scanner ignores the @a nested inside XML.</doc>
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="a" transfer-ownership="none">
+          <doc xml:whitespace="preserve">An integer</doc>
+          <type name="gint" c:type="int"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_null_gerror_callback"
+              c:identifier="regress_test_null_gerror_callback">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="callback" transfer-ownership="none" scope="call">
+          <type name="TestCallbackGError" c:type="RegressTestCallbackGError"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_owned_gerror_callback"
+              c:identifier="regress_test_owned_gerror_callback">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="callback" transfer-ownership="none" scope="call">
+          <type name="TestCallbackOwnedGError"
+                c:type="RegressTestCallbackOwnedGError"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_short" c:identifier="regress_test_short">
+      <return-value transfer-ownership="none">
+        <type name="gshort" c:type="gshort"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="gshort" c:type="gshort"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_simple_boxed_a_const_return"
+              c:identifier="regress_test_simple_boxed_a_const_return"
+              moved-to="TestSimpleBoxedA.const_return">
+      <return-value transfer-ownership="none">
+        <type name="TestSimpleBoxedA" c:type="RegressTestSimpleBoxedA*"/>
+      </return-value>
+    </function>
+    <function name="test_simple_callback"
+              c:identifier="regress_test_simple_callback">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="callback"
+                   transfer-ownership="none"
+                   allow-none="1"
+                   scope="call">
+          <type name="TestSimpleCallback" c:type="RegressTestSimpleCallback"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_size" c:identifier="regress_test_size">
+      <return-value transfer-ownership="none">
+        <type name="gsize" c:type="gsize"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="gsize" c:type="gsize"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_ssize" c:identifier="regress_test_ssize">
+      <return-value transfer-ownership="none">
+        <type name="gssize" c:type="gssize"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="gssize" c:type="gssize"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_strv_in" c:identifier="regress_test_strv_in">
+      <return-value transfer-ownership="none">
+        <type name="gboolean" c:type="gboolean"/>
+      </return-value>
+      <parameters>
+        <parameter name="arr" transfer-ownership="none">
+          <array c:type="char**">
+            <type name="utf8" c:type="char*"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_strv_in_gvalue"
+              c:identifier="regress_test_strv_in_gvalue">
+      <return-value transfer-ownership="full">
+        <type name="GObject.Value" c:type="GValue*"/>
+      </return-value>
+    </function>
+    <function name="test_strv_out" c:identifier="regress_test_strv_out">
+      <return-value transfer-ownership="full">
+        <array c:type="char**">
+          <type name="utf8"/>
+        </array>
+      </return-value>
+    </function>
+    <function name="test_strv_out_c" c:identifier="regress_test_strv_out_c">
+      <return-value transfer-ownership="none">
+        <array c:type="char**">
+          <type name="utf8"/>
+        </array>
+      </return-value>
+    </function>
+    <function name="test_strv_out_container"
+              c:identifier="regress_test_strv_out_container">
+      <return-value transfer-ownership="container">
+        <array c:type="char**">
+          <type name="utf8"/>
+        </array>
+      </return-value>
+    </function>
+    <function name="test_strv_outarg" c:identifier="regress_test_strv_outarg">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="retp"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="container">
+          <array c:type="char***">
+            <type name="utf8" c:type="char**"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_timet" c:identifier="regress_test_timet">
+      <return-value transfer-ownership="none">
+        <type name="glong" c:type="time_t"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="glong" c:type="time_t"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_torture_signature_0"
+              c:identifier="regress_test_torture_signature_0">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="x" transfer-ownership="none">
+          <type name="gint" c:type="int"/>
+        </parameter>
+        <parameter name="y"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="gdouble" c:type="double*"/>
+        </parameter>
+        <parameter name="z"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="gint" c:type="int*"/>
+        </parameter>
+        <parameter name="foo" transfer-ownership="none">
+          <type name="utf8" c:type="char*"/>
+        </parameter>
+        <parameter name="q"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="gint" c:type="int*"/>
+        </parameter>
+        <parameter name="m" transfer-ownership="none">
+          <type name="guint" c:type="guint"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_torture_signature_1"
+              c:identifier="regress_test_torture_signature_1"
+              throws="1">
+      <doc xml:whitespace="preserve">This function throws an error if m is odd.</doc>
+      <return-value transfer-ownership="none">
+        <type name="gboolean" c:type="gboolean"/>
+      </return-value>
+      <parameters>
+        <parameter name="x" transfer-ownership="none">
+          <type name="gint" c:type="int"/>
+        </parameter>
+        <parameter name="y"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="gdouble" c:type="double*"/>
+        </parameter>
+        <parameter name="z"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="gint" c:type="int*"/>
+        </parameter>
+        <parameter name="foo" transfer-ownership="none">
+          <type name="utf8" c:type="char*"/>
+        </parameter>
+        <parameter name="q"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="gint" c:type="int*"/>
+        </parameter>
+        <parameter name="m" transfer-ownership="none">
+          <type name="guint" c:type="guint"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_torture_signature_2"
+              c:identifier="regress_test_torture_signature_2">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="x" transfer-ownership="none">
+          <type name="gint" c:type="int"/>
+        </parameter>
+        <parameter name="callback"
+                   transfer-ownership="none"
+                   scope="notified"
+                   closure="2"
+                   destroy="3">
+          <type name="TestCallbackUserData"
+                c:type="RegressTestCallbackUserData"/>
+        </parameter>
+        <parameter name="user_data" transfer-ownership="none">
+          <type name="gpointer" c:type="gpointer"/>
+        </parameter>
+        <parameter name="notify" transfer-ownership="none" scope="async">
+          <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
+        </parameter>
+        <parameter name="y"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="gdouble" c:type="double*"/>
+        </parameter>
+        <parameter name="z"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="gint" c:type="int*"/>
+        </parameter>
+        <parameter name="foo" transfer-ownership="none">
+          <type name="utf8" c:type="char*"/>
+        </parameter>
+        <parameter name="q"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="gint" c:type="int*"/>
+        </parameter>
+        <parameter name="m" transfer-ownership="none">
+          <type name="guint" c:type="guint"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_uint" c:identifier="regress_test_uint">
+      <return-value transfer-ownership="none">
+        <type name="guint" c:type="guint"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="guint" c:type="guint"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_uint16" c:identifier="regress_test_uint16">
+      <return-value transfer-ownership="none">
+        <type name="guint16" c:type="guint16"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="guint16" c:type="guint16"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_uint32" c:identifier="regress_test_uint32">
+      <return-value transfer-ownership="none">
+        <type name="guint32" c:type="guint32"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="guint32" c:type="guint32"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_uint64" c:identifier="regress_test_uint64">
+      <return-value transfer-ownership="none">
+        <type name="guint64" c:type="guint64"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="guint64" c:type="guint64"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_uint8" c:identifier="regress_test_uint8">
+      <return-value transfer-ownership="none">
+        <type name="guint8" c:type="guint8"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="guint8" c:type="guint8"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_ulong" c:identifier="regress_test_ulong">
+      <return-value transfer-ownership="none">
+        <type name="gulong" c:type="gulong"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="gulong" c:type="gulong"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_unichar" c:identifier="regress_test_unichar">
+      <return-value transfer-ownership="none">
+        <type name="gunichar" c:type="gunichar"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="gunichar" c:type="gunichar"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_unsigned_enum_param"
+              c:identifier="regress_test_unsigned_enum_param">
+      <return-value transfer-ownership="none">
+        <type name="utf8" c:type="gchar*"/>
+      </return-value>
+      <parameters>
+        <parameter name="e" transfer-ownership="none">
+          <type name="TestEnumUnsigned" c:type="RegressTestEnumUnsigned"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_ushort" c:identifier="regress_test_ushort">
+      <return-value transfer-ownership="none">
+        <type name="gushort" c:type="gushort"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="gushort" c:type="gushort"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_utf8_const_in"
+              c:identifier="regress_test_utf8_const_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none">
+          <type name="utf8" c:type="char*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_utf8_const_return"
+              c:identifier="regress_test_utf8_const_return">
+      <return-value transfer-ownership="none">
+        <doc xml:whitespace="preserve">UTF-8 string</doc>
+        <type name="utf8" c:type="char*"/>
+      </return-value>
+    </function>
+    <function name="test_utf8_inout" c:identifier="regress_test_utf8_inout">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="inout"
+                   direction="inout"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="utf8" c:type="char**"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_utf8_nonconst_return"
+              c:identifier="regress_test_utf8_nonconst_return">
+      <return-value transfer-ownership="full">
+        <doc xml:whitespace="preserve">UTF-8 string</doc>
+        <type name="utf8" c:type="char*"/>
+      </return-value>
+    </function>
+    <function name="test_utf8_null_in"
+              c:identifier="regress_test_utf8_null_in">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="in" transfer-ownership="none" allow-none="1">
+          <type name="utf8" c:type="char*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_utf8_null_out"
+              c:identifier="regress_test_utf8_null_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="char_out"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full"
+                   allow-none="1">
+          <type name="utf8" c:type="char**"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_utf8_out" c:identifier="regress_test_utf8_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="out"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <type name="utf8" c:type="char**"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_utf8_out_nonconst_return"
+              c:identifier="regress_test_utf8_out_nonconst_return">
+      <return-value transfer-ownership="full">
+        <doc xml:whitespace="preserve">a copy of "first"</doc>
+        <type name="utf8" c:type="char*"/>
+      </return-value>
+      <parameters>
+        <parameter name="out"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <doc xml:whitespace="preserve">a copy of "second"</doc>
+          <type name="utf8" c:type="char**"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_utf8_out_out"
+              c:identifier="regress_test_utf8_out_out">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="out0"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <doc xml:whitespace="preserve">a copy of "first"</doc>
+          <type name="utf8" c:type="char**"/>
+        </parameter>
+        <parameter name="out1"
+                   direction="out"
+                   caller-allocates="0"
+                   transfer-ownership="full">
+          <doc xml:whitespace="preserve">a copy of "second"</doc>
+          <type name="utf8" c:type="char**"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_value_get_fundamental_object"
+              c:identifier="regress_test_value_get_fundamental_object"
+              introspectable="0">
+      <return-value>
+        <type name="TestFundamentalObject"
+              c:type="RegressTestFundamentalObject*"/>
+      </return-value>
+      <parameters>
+        <parameter name="value" transfer-ownership="none">
+          <type name="GObject.Value" c:type="GValue*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_value_return"
+              c:identifier="regress_test_value_return">
+      <return-value transfer-ownership="none">
+        <doc xml:whitespace="preserve">the int wrapped in a GValue.</doc>
+        <type name="GObject.Value" c:type="GValue*"/>
+      </return-value>
+      <parameters>
+        <parameter name="i" transfer-ownership="none">
+          <doc xml:whitespace="preserve">an int</doc>
+          <type name="gint" c:type="int"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_value_set_fundamental_object"
+              c:identifier="regress_test_value_set_fundamental_object"
+              introspectable="0">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="value" transfer-ownership="none">
+          <type name="GObject.Value" c:type="GValue*"/>
+        </parameter>
+        <parameter name="fundamental_object" transfer-ownership="none">
+          <type name="TestFundamentalObject"
+                c:type="RegressTestFundamentalObject*"/>
+        </parameter>
+      </parameters>
+    </function>
+  </namespace>
+</repository>
diff --git a/tests/scanner/TestInherit-1.0-expected.gir b/tests/scanner/TestInherit-1.0-expected.gir
new file mode 100644 (file)
index 0000000..6b16ab7
--- /dev/null
@@ -0,0 +1,105 @@
+<?xml version="1.0"?>
+<!-- This file was automatically generated from C sources - DO NOT EDIT!
+To affect the contents of this file, edit the original C definitions,
+and/or use gtk-doc annotations.  -->
+<repository version="1.2"
+            xmlns="http://www.gtk.org/introspection/core/1.0"
+            xmlns:c="http://www.gtk.org/introspection/c/1.0"
+            xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
+  <include name="GLib" version="2.0"/>
+  <include name="GObject" version="2.0"/>
+  <include name="Utility" version="1.0"/>
+  <package name="gobject-2.0"/>
+  <c:include name="drawable.h"/>
+  <namespace name="TestInherit"
+             version="1.0"
+             shared-library="libtestinherit.so"
+             c:identifier-prefixes="TestInherit"
+             c:symbol-prefixes="test_inherit">
+    <class name="Drawable"
+           c:symbol-prefix="drawable"
+           c:type="TestInheritDrawable"
+           parent="GObject.Object"
+           abstract="1"
+           glib:type-name="TestInheritDrawable"
+           glib:get-type="test_inherit_drawable_get_type"
+           glib:type-struct="DrawableClass">
+      <method name="do_foo" c:identifier="test_inherit_drawable_do_foo">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="x" transfer-ownership="none">
+            <type name="gint" c:type="int"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="do_foo_maybe_throw"
+              c:identifier="test_inherit_drawable_do_foo_maybe_throw"
+              throws="1">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="x" transfer-ownership="none">
+            <type name="gint" c:type="int"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="get_origin"
+              c:identifier="test_inherit_drawable_get_origin">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="x"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <type name="gint" c:type="int*"/>
+          </parameter>
+          <parameter name="y"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <type name="gint" c:type="int*"/>
+          </parameter>
+        </parameters>
+      </method>
+      <method name="get_size" c:identifier="test_inherit_drawable_get_size">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="width"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <type name="guint" c:type="guint*"/>
+          </parameter>
+          <parameter name="height"
+                     direction="out"
+                     caller-allocates="0"
+                     transfer-ownership="full">
+            <type name="guint" c:type="guint*"/>
+          </parameter>
+        </parameters>
+      </method>
+      <field name="parent_instance">
+        <type name="GObject.Object" c:type="GObject"/>
+      </field>
+    </class>
+    <record name="DrawableClass"
+            c:type="TestInheritDrawableClass"
+            glib:is-gtype-struct-for="Drawable">
+      <field name="parent_class">
+        <type name="GObject.ObjectClass" c:type="GObjectClass"/>
+      </field>
+    </record>
+    <record name="PixmapObjectClass" c:type="TestInheritPixmapObjectClass">
+      <field name="parent_class" writable="1">
+        <type name="DrawableClass" c:type="TestInheritDrawableClass"/>
+      </field>
+    </record>
+  </namespace>
+</repository>
diff --git a/tests/scanner/Utility-1.0-expected.gir b/tests/scanner/Utility-1.0-expected.gir
new file mode 100644 (file)
index 0000000..dec7984
--- /dev/null
@@ -0,0 +1,169 @@
+<?xml version="1.0"?>
+<!-- This file was automatically generated from C sources - DO NOT EDIT!
+To affect the contents of this file, edit the original C definitions,
+and/or use gtk-doc annotations.  -->
+<repository version="1.2"
+            xmlns="http://www.gtk.org/introspection/core/1.0"
+            xmlns:c="http://www.gtk.org/introspection/c/1.0"
+            xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
+  <include name="GLib" version="2.0"/>
+  <include name="GObject" version="2.0"/>
+  <package name="gobject-2.0"/>
+  <c:include name="utility.h"/>
+  <namespace name="Utility"
+             version="1.0"
+             shared-library="libutility.so"
+             c:identifier-prefixes="Utility"
+             c:symbol-prefixes="utility">
+    <alias name="Glyph" c:type="UtilityGlyph">
+      <type name="guint32" c:type="guint32"/>
+    </alias>
+    <record name="Buffer" c:type="UtilityBuffer">
+      <field name="data" writable="1">
+        <type name="gpointer"/>
+      </field>
+      <field name="length" writable="1">
+        <type name="gsize" c:type="gsize"/>
+      </field>
+    </record>
+    <union name="Byte" c:type="UtilityByte">
+      <field name="value" writable="1">
+        <type name="guint8" c:type="guint8"/>
+      </field>
+      <record name="parts" c:type="parts">
+        <field name="first_nibble" writable="1" bits="4">
+          <type name="guint8" c:type="guint8"/>
+        </field>
+        <field name="second_nibble" writable="1" bits="4">
+          <type name="guint8" c:type="guint8"/>
+        </field>
+      </record>
+    </union>
+    <enumeration name="EnumType" c:type="UtilityEnumType">
+      <member name="a" value="0" c:identifier="UTILITY_ENUM_A"/>
+      <member name="b" value="1" c:identifier="UTILITY_ENUM_B"/>
+      <member name="c" value="2" c:identifier="UTILITY_ENUM_C"/>
+    </enumeration>
+    <callback name="FileFunc" c:type="UtilityFileFunc">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="path" transfer-ownership="none">
+          <type name="utf8" c:type="char*"/>
+        </parameter>
+        <parameter name="user_data" transfer-ownership="none" closure="1">
+          <type name="gpointer" c:type="gpointer"/>
+        </parameter>
+      </parameters>
+    </callback>
+    <bitfield name="FlagType" c:type="UtilityFlagType">
+      <member name="a" value="1" c:identifier="UTILITY_FLAG_A"/>
+      <member name="b" value="2" c:identifier="UTILITY_FLAG_B"/>
+      <member name="c" value="4" c:identifier="UTILITY_FLAG_C"/>
+    </bitfield>
+    <class name="Object"
+           c:symbol-prefix="object"
+           c:type="UtilityObject"
+           parent="GObject.Object"
+           glib:type-name="UtilityObject"
+           glib:get-type="utility_object_get_type"
+           glib:type-struct="ObjectClass">
+      <method name="watch_dir" c:identifier="utility_object_watch_dir">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="path" transfer-ownership="none">
+            <type name="utf8" c:type="char*"/>
+          </parameter>
+          <parameter name="func"
+                     transfer-ownership="none"
+                     scope="notified"
+                     closure="2"
+                     destroy="3">
+            <type name="FileFunc" c:type="UtilityFileFunc"/>
+          </parameter>
+          <parameter name="user_data" transfer-ownership="none">
+            <type name="gpointer" c:type="gpointer"/>
+          </parameter>
+          <parameter name="destroy" transfer-ownership="none" scope="async">
+            <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
+          </parameter>
+        </parameters>
+      </method>
+      <field name="parent_instance">
+        <type name="GObject.Object" c:type="GObject"/>
+      </field>
+    </class>
+    <record name="ObjectClass"
+            c:type="UtilityObjectClass"
+            glib:is-gtype-struct-for="Object">
+      <field name="parent_class">
+        <type name="GObject.ObjectClass" c:type="GObjectClass"/>
+      </field>
+    </record>
+    <record name="Struct" c:type="UtilityStruct">
+      <field name="field" writable="1">
+        <type name="gint" c:type="int"/>
+      </field>
+      <field name="bitfield1" writable="1" bits="3">
+        <type name="guint" c:type="guint"/>
+      </field>
+      <field name="bitfield2" writable="1" bits="2">
+        <type name="guint" c:type="guint"/>
+      </field>
+      <field name="data" writable="1">
+        <array zero-terminated="0" c:type="guint8" fixed-size="16">
+          <type name="guint8" c:type="guint8"/>
+        </array>
+      </field>
+    </record>
+    <record name="TaggedValue" c:type="UtilityTaggedValue">
+      <field name="tag" writable="1">
+        <type name="gint" c:type="int"/>
+      </field>
+      <union name="value" c:type="value">
+        <field name="v_pointer" writable="1">
+          <type name="gpointer" c:type="gpointer"/>
+        </field>
+        <field name="v_real" writable="1">
+          <type name="gdouble" c:type="double"/>
+        </field>
+        <field name="v_integer" writable="1">
+          <type name="glong" c:type="long"/>
+        </field>
+      </union>
+    </record>
+    <union name="Union" c:type="UtilityUnion">
+      <field name="pointer" writable="1">
+        <type name="utf8" c:type="char*"/>
+      </field>
+      <field name="integer" writable="1">
+        <type name="glong" c:type="glong"/>
+      </field>
+      <field name="real" writable="1">
+        <type name="gdouble" c:type="double"/>
+      </field>
+    </union>
+    <function name="dir_foreach" c:identifier="utility_dir_foreach">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="path" transfer-ownership="none">
+          <type name="utf8" c:type="char*"/>
+        </parameter>
+        <parameter name="func"
+                   transfer-ownership="none"
+                   scope="call"
+                   closure="2">
+          <type name="FileFunc" c:type="UtilityFileFunc"/>
+        </parameter>
+        <parameter name="user_data" transfer-ownership="none">
+          <type name="gpointer" c:type="gpointer"/>
+        </parameter>
+      </parameters>
+    </function>
+  </namespace>
+</repository>
diff --git a/tests/scanner/annotation.c b/tests/scanner/annotation.c
new file mode 100644 (file)
index 0000000..a4e4efc
--- /dev/null
@@ -0,0 +1,836 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+#include "annotation.h"
+
+char backslash_parsing_tester = '\\';
+
+G_DEFINE_TYPE (AnnotationObject, annotation_object, G_TYPE_OBJECT);
+
+enum {
+  PROP_0,
+  PROP_STRING_PROPERTY,
+  PROP_FUNCTION_PROPERTY,
+  PROP_TAB_PROPERTY
+};
+
+enum {
+  STRING_SIGNAL,
+  LIST_SIGNAL,
+  DOC_EMPTY_ARG_PARSING,
+  ATTRIBUTE_SIGNAL,
+  LAST_SIGNAL
+};
+
+static guint annotation_object_signals[LAST_SIGNAL] = { 0 };
+
+static void
+annotation_object_set_property (GObject         *object,
+                                guint            prop_id,
+                                const GValue    *value,
+                                GParamSpec      *pspec)
+{
+  switch (prop_id)
+    {
+    case PROP_STRING_PROPERTY:
+      break;
+    case PROP_FUNCTION_PROPERTY:
+      break;
+    case PROP_TAB_PROPERTY:
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+    }
+}
+
+static void
+annotation_object_get_property (GObject         *object,
+                                guint            prop_id,
+                                GValue          *value,
+                                GParamSpec      *pspec)
+{
+  switch (prop_id)
+    {
+    case PROP_STRING_PROPERTY:
+      break;
+    case PROP_FUNCTION_PROPERTY:
+      break;
+    case PROP_TAB_PROPERTY:
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+    }
+}
+
+static void
+annotation_object_class_init (AnnotationObjectClass *klass)
+{
+  GObjectClass *gobject_class;
+
+  gobject_class = G_OBJECT_CLASS (klass);
+
+  gobject_class->set_property = annotation_object_set_property;
+  gobject_class->get_property = annotation_object_get_property;
+
+  /**
+   * AnnotationObject::string-signal:
+   * @annotation: the annotation object
+   * @string: (type utf8): a string
+   *
+   * This is a signal which has a broken signal handler,
+   * it says it's pointer but it's actually a string.
+   *
+   * Since: 1.0
+   * Deprecated: 1.2: Use other-signal instead
+   */
+  annotation_object_signals[STRING_SIGNAL] =
+    g_signal_new ("string-signal",
+                 G_OBJECT_CLASS_TYPE (gobject_class),
+                 G_SIGNAL_RUN_LAST,
+                 0,
+                 NULL, NULL,
+                 (GSignalCMarshaller)g_cclosure_marshal_VOID__POINTER,
+                 G_TYPE_NONE, 1, G_TYPE_POINTER);
+
+  /**
+   * AnnotationObject::list-signal:
+   * @annotation: the annotation object
+   * @list: (type GLib.List) (element-type utf8) (transfer container): a list of strings
+   *
+   * This is a signal which takes a list of strings, but it's not
+   * known by GObject as it's only marked as G_TYPE_POINTER
+   */
+  annotation_object_signals[LIST_SIGNAL] =
+    g_signal_new ("list-signal",
+                 G_OBJECT_CLASS_TYPE (gobject_class),
+                 G_SIGNAL_RUN_LAST,
+                 0,
+                 NULL, NULL,
+                 (GSignalCMarshaller)g_cclosure_marshal_VOID__POINTER,
+                 G_TYPE_NONE, 1, G_TYPE_POINTER);
+
+  /**
+   * AnnotationObject::doc-empty-arg-parsing:
+   * @annotation: the annotation object
+   * @arg1:
+   *
+   * This signal tests an empty document argument (@arg1)
+   */
+  annotation_object_signals[DOC_EMPTY_ARG_PARSING] =
+    g_signal_new ("doc-empty-arg-parsing",
+                 G_OBJECT_CLASS_TYPE (gobject_class),
+                 G_SIGNAL_RUN_LAST,
+                 0,
+                 NULL, NULL,
+                 (GSignalCMarshaller)g_cclosure_marshal_VOID__POINTER,
+                 G_TYPE_NONE, 1, G_TYPE_POINTER);
+
+  /**
+   * AnnotationObject::attribute-signal:
+   * @annotation: the annotation object
+   * @arg1: (attribute some.annotation.foo1 val1): a value
+   * @arg2: (attribute some.annotation.foo2 val2): another value
+   *
+   * This signal tests a signal with attributes.
+   *
+   * Returns: (attribute some.annotation.foo3 val3): the return value
+   */
+  annotation_object_signals[ATTRIBUTE_SIGNAL] =
+    g_signal_new ("attribute-signal",
+                 G_OBJECT_CLASS_TYPE (gobject_class),
+                 G_SIGNAL_RUN_LAST,
+                 0,
+                 NULL, NULL,
+                 NULL, /* marshaller */
+                 G_TYPE_STRING,
+                  2,
+                  G_TYPE_STRING,
+                  G_TYPE_STRING);
+
+  /**
+   * AnnotationObject:string-property:
+   *
+   * This is a property which is a string
+   *
+   * Since: 1.0
+   * Deprecated: 1.2: Use better-string-property instead
+   */
+  g_object_class_install_property (gobject_class,
+                                   PROP_STRING_PROPERTY,
+                                   g_param_spec_string ("string-property",
+                                                        "String property",
+                                                        "This property is a string",
+                                                        NULL,
+                                                        G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+  /**
+   * AnnotationObject:function-property:
+   *
+   * Type: AnnotationCallback
+   */
+  g_object_class_install_property (gobject_class,
+                                   PROP_FUNCTION_PROPERTY,
+                                   g_param_spec_pointer ("function-property",
+                                                         "Function property",
+                                                         "This property is a function pointer",
+                                                         G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+
+         /**
+          * AnnotationObject:tab-property:
+          *
+          * This is a property annotation intentionally indented with a mix
+          * of tabs and strings to test the tab handling capabilities of the scanner.
+          *
+          * Since: 1.2
+          */
+  g_object_class_install_property (gobject_class,
+                                   PROP_TAB_PROPERTY,
+                                   g_param_spec_string ("tab-property",
+                                                        "Tab property",
+                                                        "This property is a thing",
+                                                        NULL,
+                                                        G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+}
+
+static void
+annotation_object_init (AnnotationObject *object)
+{
+
+}
+
+/**
+ * annotation_object_method:
+ * @object: a #GObject
+ *
+ * Return value: an int
+ **/
+gint
+annotation_object_method (AnnotationObject *object)
+{
+  return 1;
+}
+
+/**
+ * annotation_object_out:
+ * @object: a #GObject
+ *
+ * This is a test for out arguments
+ *
+ * @outarg: (out): This is an argument test
+ * Return value: an int
+ */
+gint
+annotation_object_out (AnnotationObject *object, int *outarg)
+{
+  *outarg = 2;
+  return 1;
+}
+
+/**
+ * annotation_object_in:
+ * @object: a #GObject
+ *
+ * This is a test for in arguments
+ *
+ * @inarg: (in) (transfer none): This is an argument test
+ * Return value: an int
+ */
+gint
+annotation_object_in (AnnotationObject *object, int *inarg)
+{
+  return *inarg;
+}
+
+
+/**
+ * annotation_object_inout:
+ * @object: a #GObject
+ *
+ * This is a test for out arguments
+ *
+ * @inoutarg: (inout): This is an argument test
+ * Return value: an int
+ */
+gint
+annotation_object_inout (AnnotationObject *object, int *inoutarg)
+{
+  return *inoutarg += 1;
+}
+
+/**
+ * annotation_object_inout2:
+ * @object: a #GObject
+ *
+ * This is a second test for out arguments
+ *
+ * @inoutarg: (inout): This is an argument test
+ * Return value: an int
+ */
+gint
+annotation_object_inout2 (AnnotationObject *object, int *inoutarg)
+{
+  return *inoutarg += 1;
+}
+
+
+/**
+ * annotation_object_inout3:
+ * @object: a #GObject
+ *
+ * This is a 3th test for out arguments
+ *
+ * @inoutarg: (inout) (allow-none): This is an argument test
+ * Return value: an int
+ */
+gint
+annotation_object_inout3 (AnnotationObject *object, int *inoutarg)
+{
+  if (inoutarg)
+    return *inoutarg + 1;
+  return 1;
+}
+
+/**
+ * annotation_object_calleeowns:
+ * @object: a #GObject
+ *
+ * This is a test for out arguments; GObject defaults to transfer
+ *
+ * @toown: (out): a #GObject
+ * Return value: an int
+ */
+gint
+annotation_object_calleeowns (AnnotationObject *object, GObject **toown)
+{
+  return 1;
+}
+
+
+/**
+ * annotation_object_calleesowns:
+ * @object: a #GObject
+ *
+ * This is a test for out arguments, one transferred, other not
+ *
+ * @toown1: (out) (transfer full): a #GObject
+ * @toown2: (out) (transfer none): a #GObject
+ * Return value: an int
+ */
+gint
+annotation_object_calleesowns (AnnotationObject *object,
+                              GObject **toown1,
+                              GObject **toown2)
+{
+  return 1;
+}
+
+
+/**
+ * annotation_object_get_strings:
+ * @object: a #GObject
+ *
+ * This is a test for returning a list of strings, where
+ * each string needs to be freed.
+ *
+ * Return value: (element-type utf8) (transfer full): list of strings
+ */
+GList*
+annotation_object_get_strings (AnnotationObject *object)
+{
+  GList *list = NULL;
+  list = g_list_prepend (list, g_strdup ("annotation"));
+  list = g_list_prepend (list, g_strdup ("bar"));
+  return list;
+}
+
+/**
+ * annotation_object_get_hash:
+ * @object: a #GObject
+ *
+ * This is a test for returning a hash table mapping strings to
+ * objects.
+ *
+ * Return value: (element-type utf8 GObject) (transfer full): hash table
+ */
+GHashTable*
+annotation_object_get_hash (AnnotationObject *object)
+{
+  GHashTable *hash = g_hash_table_new_full (g_str_hash, g_str_equal,
+                                           g_free, g_object_unref);
+  g_hash_table_insert (hash, g_strdup ("one"), g_object_ref (object));
+  g_hash_table_insert (hash, g_strdup ("two"), g_object_ref (object));
+  return hash;
+}
+
+/**
+ * annotation_object_with_voidp
+ * @data: Opaque pointer handle
+ */
+void
+annotation_object_with_voidp (AnnotationObject *object, void *data)
+{
+
+}
+
+/**
+ * annotation_object_get_objects:
+ * @object: a #GObject
+ *
+ * This is a test for returning a list of objects.
+ * The list itself should be freed, but not the internal objects,
+ * intentionally similar example to gtk_container_get_children
+ *
+ * Return value: (element-type AnnotationObject) (transfer container): list of objects
+ */
+GSList*
+annotation_object_get_objects (AnnotationObject *object)
+{
+  GSList *list = NULL;
+  list = g_slist_prepend (list, object);
+  return list;
+}
+
+/**
+ * annotation_object_create_object:
+ * @object: a #GObject
+ *
+ * Test returning a caller-owned object
+ *
+ * Return value: (transfer full): The object
+ **/
+GObject*
+annotation_object_create_object (AnnotationObject *object)
+{
+       return g_object_ref (object);
+}
+
+/**
+ * annotation_object_use_buffer:
+ * @object: a #GObject
+ *
+ **/
+void
+annotation_object_use_buffer   (AnnotationObject *object,
+                               guchar           *bytes)
+{
+
+}
+
+/**
+ * annotation_object_compute_sum:
+ * @object: a #GObject
+ * @nums: (array): Sequence of numbers
+ *
+ * Test taking a zero-terminated array
+ **/
+void
+annotation_object_compute_sum  (AnnotationObject *object,
+                               int              *nums)
+{
+
+}
+
+/**
+ * annotation_object_compute_sum_n:
+ * @object: a #GObject
+ * @nums: (array length=n_nums zero-terminated=0): Sequence of
+ *   numbers that are zero-terminated
+ * @n_nums: Length of number array
+ *
+ * Test taking an array with length parameter
+ **/
+void
+annotation_object_compute_sum_n(AnnotationObject *object,
+                               int              *nums,
+                               int               n_nums)
+{
+
+}
+
+/**
+ * annotation_object_compute_sum_nz:
+ * @object: a #AnnotationObject
+ * @nums: (array length=n_nums zero-terminated=1): Sequence of numbers that
+ * are zero-terminated
+ * @n_nums: Length of number array
+ *
+ * Test taking a zero-terminated array with length parameter
+ **/
+void
+annotation_object_compute_sum_nz(AnnotationObject *object,
+                                 int             *nums,
+                                 int              n_nums)
+{
+
+}
+
+/**
+ * annotation_object_parse_args:
+ * @object: a #AnnotationObject
+ * @argc: (inout): Length of the argument vector
+ * @argv: (inout) (array length=argc zero-terminated=1): Argument vector
+ *
+ * Test taking a zero-terminated array with length parameter
+ **/
+void
+annotation_object_parse_args(AnnotationObject *object,
+                             int              *argc,
+                             char           ***argv)
+{
+
+}
+
+/**
+ * annotation_object_string_out:
+ * @object: a #AnnotationObject
+ * @str_out: (out) (transfer full): string return value
+ *
+ * Test returning a string as an out parameter
+ *
+ * Returns: some boolean
+ **/
+gboolean
+annotation_object_string_out(AnnotationObject *object,
+                             char            **str_out)
+{
+  return FALSE;
+}
+
+/**
+ * annotation_object_foreach:
+ * @object: a #AnnotationObject
+ * @func: (scope call): Callback to invoke
+ * @user_data: Callback user data
+ *
+ * Test taking a call-scoped callback
+ **/
+void
+annotation_object_foreach (AnnotationObject *object,
+                           AnnotationForeachFunc func,
+                           gpointer user_data)
+{
+  
+}
+
+/**
+ * annotation_object_set_data:
+ * @object: a #AnnotationObject
+ * @data: (array length=length): The data
+ * @length: Length of the data
+ *
+ * Test taking a guchar * with a length.
+ **/
+void
+annotation_object_set_data (AnnotationObject *object,
+                            const guchar *data,
+                            gsize length)
+{
+  
+}
+
+/**
+ * annotation_object_set_data2:
+ * @object: a #AnnotationObject
+ * @data: (array length=length) (element-type gint8): The data
+ * @length: Length of the data
+ *
+ * Test taking a gchar * with a length.
+ **/
+void
+annotation_object_set_data2 (AnnotationObject *object,
+                             const gchar *data,
+                             gsize length)
+{
+  
+}
+
+/**
+ * annotation_object_set_data3:
+ * @object: a #AnnotationObject
+ * @data: (array length=length) (element-type guint8): The data
+ * @length: Length of the data
+ *
+ * Test taking a gchar * with a length, overriding the array element
+ * type.
+ **/
+void
+annotation_object_set_data3 (AnnotationObject *object,
+                             gpointer data,
+                             gsize length)
+{
+  
+}
+
+/**
+ * annotation_object_allow_none:
+ * @object: a #GObject
+ * @somearg: (allow-none):
+ *
+ * Returns: (transfer none): %NULL always
+ **/
+GObject*
+annotation_object_allow_none (AnnotationObject *object, const gchar *somearg)
+{
+  return NULL;
+}
+
+/**
+ * annotation_object_notrans:
+ * @object: a #GObject
+ *
+ * Returns: (transfer none): An object, not referenced
+ **/
+
+GObject*
+annotation_object_notrans (AnnotationObject *object)
+{
+  return NULL;
+}
+
+/**
+ * annotation_object_do_not_use:
+ * @object: a #GObject
+ *
+ * Returns: (transfer none): %NULL always
+ * Deprecated: 0.12: Use annotation_object_create_object() instead.
+ **/
+GObject*
+annotation_object_do_not_use (AnnotationObject *object)
+{
+  return NULL;
+}
+
+/**
+ * annotation_object_watch: (skip)
+ * @object: A #AnnotationObject
+ * @func: The callback
+ * @user_data: The callback data
+ *
+ * This is here just for the sake of being overriden by its
+ * annotation_object_watch_full().
+ */
+void
+annotation_object_watch (AnnotationObject *object,
+                         AnnotationForeachFunc func,
+                         gpointer user_data)
+{
+}
+
+/**
+ * annotation_object_watch_full:
+ * @object: A #AnnotationObject
+ * @func: The callback
+ * @user_data: The callback data
+ * @destroy: Destroy notification
+ *
+ * Test overriding via the "Rename To" annotation.
+ *
+ * Rename to: annotation_object_watch
+ */
+void
+annotation_object_watch_full (AnnotationObject *object,
+                              AnnotationForeachFunc func,
+                              gpointer user_data,
+                              GDestroyNotify destroy)
+{
+}
+
+/**
+ * annotation_object_hidden_self:
+ * @object: (type AnnotationObject): A #AnnotationObject
+ **/
+void
+annotation_object_hidden_self (gpointer object)
+{
+}
+
+/**
+ * annotation_init:
+ * @argc: (inout): The number of args. 
+ * @argv: (inout) (array length=argc): The arguments.
+ **/
+void
+annotation_init (int *argc, char ***argv)
+{
+
+}
+
+/**
+ * annotation_return_array:
+ * @length: (out): Number of return values
+ *
+ * Return value: (transfer full) (array length=length): The return value
+ **/
+char **
+annotation_return_array (int *length)
+{
+  return NULL;
+}
+
+/**
+ * annotation_string_zero_terminated:
+ *
+ * Return value: (transfer full) (array zero-terminated=1): The return value
+ **/
+char **
+annotation_string_zero_terminated (void)
+{
+  return NULL;
+}
+
+/**
+ * annotation_string_zero_terminated_out:
+ * @out: (array zero-terminated=1) (inout):
+ **/
+void
+annotation_string_zero_terminated_out (char ***out)
+{
+}
+
+/**
+ * annotation_versioned:
+ *
+ * Since: 0.6
+ **/
+void
+annotation_versioned (void)
+{
+}
+
+/**
+ * annotation_string_array_length:
+ * @n_properties:
+ * @properties: (array length=n_properties) (element-type utf8):
+ */
+void
+annotation_string_array_length (guint n_properties, const gchar * const properties[])
+{
+}
+
+/**
+ * annotation_object_extra_annos:
+ *
+ * Attributes: (org.foobar testvalue)
+ */
+void
+annotation_object_extra_annos (AnnotationObject *object)
+{
+}
+
+/**
+ * annotation_custom_destroy:
+ *
+ * @callback: (destroy destroy) (closure data): Destroy notification
+ *
+ * Test messing up the heuristic of closure/destroy-notification
+ * detection, and fixing it via annotations.
+ */
+void
+annotation_custom_destroy (AnnotationCallback callback,
+                           AnnotationNotifyFunc destroy,
+                           gpointer data)
+{
+}
+
+/**
+ * annotation_get_source_file:
+ *
+ * Return value: (type filename) (transfer full): Source file
+ */
+char *
+annotation_get_source_file (void)
+{
+  return NULL;
+}
+
+/**
+ * annotation_set_source_file:
+ * @fname: (type filename): Source file
+ *
+ */
+void
+annotation_set_source_file (const char *fname)
+{
+}
+
+/**
+ * annotation_ptr_array:
+ * @array: (element-type GLib.Value): the array
+ */
+void
+annotation_ptr_array (GPtrArray *array)
+{
+}
+
+/**
+ * annotation_attribute_func:
+ * @object: A #AnnotationObject.
+ * @data: (attribute some.annotation value) (attribute another.annotation blahvalue): Some data.
+ *
+ * Returns: (attribute some.other.annotation value2) (attribute yet.another.annotation another_value): The return value.
+ */
+gint
+annotation_attribute_func (AnnotationObject *object,
+                           const gchar      *data)
+{
+  return 42;
+}
+
+/**
+ * annotation_invalid_annotation:
+ * @foo: some text (e.g. example) or else
+ */
+void
+annotation_invalid_annotation (int foo)
+{
+
+}
+
+
+char backslash_parsing_tester_2 = '\\';
+
+
+/**
+ * annotation_test_parsing_bug630862:
+ *
+ * See https://bugzilla.gnome.org/show_bug.cgi?id=630862
+ *
+ * Returns: (transfer none): An object, note the colon:in here
+ */
+GObject  *
+annotation_test_parsing_bug630862 (void)
+{
+  return NULL;
+}
+
+
+/** 
+ * annotation_space_after_comment_bug631690:
+ *
+ * Explicitly test having a space after the ** here.
+ */
+void
+annotation_space_after_comment_bug631690 (void)
+{
+}
+
+/**
+ * annotation_return_filename:
+ *
+ * Returns: (type filename): An annotated filename
+ */
+gchar*
+annotation_return_filename (void)
+{
+  return "a utf-8 filename";
+}
+
+/**
+ * annotation_transfer_floating:
+ *
+ * Returns: (transfer floating): A floating object
+ */
+GObject *
+annotation_transfer_floating(void)
+{
+  return NULL;
+}
diff --git a/tests/scanner/annotation.h b/tests/scanner/annotation.h
new file mode 100644 (file)
index 0000000..b3b4bd4
--- /dev/null
@@ -0,0 +1,196 @@
+#ifndef __ANNOTATION_OBJECT_H__
+#define __ANNOTATION_OBJECT_H__
+
+#include <glib-object.h>
+
+typedef enum /*< flags,prefix=ANN >*/
+{
+  ANN_FLAG_FOO = 1,
+  ANN_FLAG_BAR = 2
+} AnnotationBitfield;
+
+/**
+ * AnnotationCallback:
+ * @in: (in) (transfer none): array of ints
+ *
+ * This is a callback.
+ * Return value: (transfer none): array of ints
+ */
+typedef const gint* (*AnnotationCallback) (const gint *in);
+
+/**
+ * AnnotationListCallback:
+ * @in: (in) (transfer none) (element-type utf8): list of strings
+ *
+ * This is a callback taking a list.
+ * Return value: (transfer container) (element-type utf8): list of strings
+ */
+typedef GList* (*AnnotationListCallback) (GList *in);
+
+/**
+ * AnnotationNotifyFunc:
+ * @data: (closure): The user data
+ *
+ * This is a callback with a 'closure' argument that is not named
+ * 'user_data' and hence has to be annotated.
+ */
+typedef void (*AnnotationNotifyFunc) (gpointer data);
+
+/**
+ * AnnotationObject:
+ *
+ * This is an object used to test annotations.
+ *
+ * Attributes: (org.example.Test cows)
+ */
+typedef struct _AnnotationObject          AnnotationObject;
+typedef struct _AnnotationObjectClass     AnnotationObjectClass;
+
+typedef void (*AnnotationForeachFunc) (AnnotationObject *object,
+                                       const char *item,
+                                       gpointer user_data);
+
+struct _AnnotationObject
+{
+  GObject parent_instance;
+};
+
+struct _AnnotationObjectClass
+{
+  GObjectClass parent_class;
+};
+
+GType    annotation_object_get_type (void);
+
+gint     annotation_object_method       (AnnotationObject *object);
+gint     annotation_object_out          (AnnotationObject *object,
+                                        int              *outarg);
+GObject* annotation_object_create_object(AnnotationObject *object);
+GObject* annotation_object_allow_none   (AnnotationObject *object,
+                                        const gchar      *somearg);
+GObject* annotation_object_notrans      (AnnotationObject *object);
+gint     annotation_object_inout        (AnnotationObject *object,
+                                        int              *inoutarg);
+gint     annotation_object_inout2       (AnnotationObject *object,
+                                        int              *inoutarg);
+gint     annotation_object_inout3       (AnnotationObject *object,
+                                        int              *inoutarg);
+gint     annotation_object_in           (AnnotationObject *object,
+                                        int              *inarg);
+gint     annotation_object_calleeowns   (AnnotationObject *object,
+                                        GObject          **toown);
+gint     annotation_object_calleesowns  (AnnotationObject *object,
+                                        GObject          **toown1,
+                                        GObject          **toown2);
+GList*   annotation_object_get_strings  (AnnotationObject *object);
+GHashTable*annotation_object_get_hash   (AnnotationObject *object);
+void     annotation_object_with_voidp   (AnnotationObject *object,
+                                        void             *data);
+GSList*  annotation_object_get_objects  (AnnotationObject *object);
+
+void     annotation_object_use_buffer   (AnnotationObject *object,
+                                        guchar           *bytes);
+
+void     annotation_object_compute_sum  (AnnotationObject *object,
+                                        int              *nums);
+
+void     annotation_object_compute_sum_n(AnnotationObject *object,
+                                        int              *nums,
+                                        int               n_nums);
+void     annotation_object_compute_sum_nz(AnnotationObject *object,
+                                          int             *nums,
+                                          int              n_nums);
+void     annotation_object_parse_args   (AnnotationObject *object,
+                                         int              *argc,
+                                         char           ***argv);
+gboolean annotation_object_string_out   (AnnotationObject *object,
+                                         char            **str_out);
+void     annotation_object_foreach      (AnnotationObject *object,
+                                         AnnotationForeachFunc func,
+                                         gpointer user_data);
+
+void     annotation_object_set_data     (AnnotationObject *object,
+                                         const guchar     *data,
+                                         gsize             length);
+void     annotation_object_set_data2    (AnnotationObject *object,
+                                         const gchar      *data,
+                                         gsize             length);
+void     annotation_object_set_data3    (AnnotationObject *object,
+                                         gpointer          data,
+                                         gsize             length);
+
+GObject* annotation_object_do_not_use   (AnnotationObject *object);
+void     annotation_object_watch        (AnnotationObject *object,
+                                         AnnotationForeachFunc func,
+                                         gpointer user_data);
+void     annotation_object_watch_full   (AnnotationObject *object,
+                                         AnnotationForeachFunc func,
+                                         gpointer user_data,
+                                         GDestroyNotify destroy);
+void     annotation_object_hidden_self  (gpointer object);
+
+void     annotation_init                (int              *argc, 
+                                        char           ***argv);
+char **  annotation_return_array        (int             *length);
+void     annotation_versioned           (void);
+char **  annotation_string_zero_terminated (void);
+void     annotation_string_zero_terminated_out (char ***out);
+
+void     annotation_string_array_length (guint n_properties, const gchar * const properties[]);
+
+void     annotation_object_extra_annos (AnnotationObject *object);
+
+void     annotation_custom_destroy (AnnotationCallback callback,
+                                    AnnotationNotifyFunc destroy,
+                                    gpointer data);
+char *   annotation_get_source_file (void);
+void     annotation_set_source_file (const char *fname);
+
+gint     annotation_attribute_func (AnnotationObject *object,
+                                    const gchar      *data);
+
+void     annotation_invalid_annotation (int foo);
+
+/**
+ * AnnotationStruct:
+ *
+ * This is a test of an array of object in an field of a struct.
+ */
+struct AnnotationStruct
+{
+  AnnotationObject *objects[10];
+};
+
+void    annotation_ptr_array (GPtrArray *array);
+
+GObject  * annotation_test_parsing_bug630862 (void);
+
+void annotation_space_after_comment_bug631690 (void);
+
+gchar* annotation_return_filename (void);
+
+GObject * annotation_transfer_floating(void);
+
+/* This one we can handle properly */
+#define ANNOTATION_CALCULATED_DEFINE (10 * 10)
+
+/**
+ * ANNOTATION_CALCULATED_LARGE:
+ *
+ * Constant to define a calculated large value
+ *
+ * Value: 10000000000UL
+ */
+#define ANNOTATION_CALCULATED_LARGE (1000 * G_GINT64_CONSTANT (10000000))
+
+/**
+ * ANNOTATION_CALCULATED_LARGE_DIV:
+ *
+ * Constant to define a calculated large value
+ *
+ * Value: 1000000UL
+ */
+#define ANNOTATION_CALCULATED_LARGE_DIV (1000 / G_GINT64_CONSTANT (10000000))
+
+#endif /* __ANNOTATION_OBJECT_H__ */
+
diff --git a/tests/scanner/barapp.c b/tests/scanner/barapp.c
new file mode 100644 (file)
index 0000000..db4be8d
--- /dev/null
@@ -0,0 +1,65 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+#include "barapp.h"
+
+#include <girepository.h>
+#include <string.h>
+
+G_DEFINE_TYPE(BarBaz, bar_baz, G_TYPE_OBJECT);
+
+static void
+bar_baz_class_init (BarBazClass *klass)
+{
+}
+
+static void
+bar_baz_init (BarBaz *object)
+{
+}
+
+void
+bar_app_func (void)
+{
+}
+
+void
+bar_app_func2 (int x, double y)
+{
+}
+
+G_DEFINE_TYPE(MutterWindow, mutter_window, G_TYPE_OBJECT);
+
+static void
+mutter_window_class_init (MutterWindowClass *klass)
+{
+}
+
+static void
+mutter_window_init (MutterWindow *object)
+{
+}
+
+void
+mutter_window_func (MutterWindow *window,
+                   guint         v)
+{
+}
+
+int
+main(int argc, char **argv)
+{
+  const char *prefix = "--introspect-dump=";
+  GError *error = NULL;
+  if (!(argc == 2 && g_str_has_prefix (argv[1], prefix)))
+    {
+      g_printerr ("usage: barapp --introspect-dump=types.txt,out.xml\\n");
+      return 1;
+    }
+  g_type_init ();
+
+  if (!g_irepository_dump (argv[1] + strlen (prefix), &error))
+    {
+      g_printerr ("%s\n", error->message);
+      return 1;
+    }
+  return 0;
+}
diff --git a/tests/scanner/barapp.h b/tests/scanner/barapp.h
new file mode 100644 (file)
index 0000000..12c39a5
--- /dev/null
@@ -0,0 +1,50 @@
+
+#include <glib-object.h>
+
+#define BAR_TYPE_BAZ              (bar_baz_get_type ())
+#define BAR_BAZ(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), BAR_TYPE_BAZ, BarBaz))
+#define BAR_IS_BAZ(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), BAR_TYPE_BAZ))
+
+typedef struct BarBaz          BarBaz;
+typedef struct BarBazClass     BarBazClass;
+
+struct BarBaz
+{
+  GObject parent_instance;
+};
+
+struct BarBazClass
+{
+  GObjectClass parent_class;
+};
+
+GType bar_baz_get_type          (void) G_GNUC_CONST;
+
+void bar_app_func (void);
+void bar_app_func2 (int x, double y);
+
+
+/* The intent of this case is to match mutter, which has unprefixed names like "MutterWindow".
+ * In this case we don't want to add "Mutter" as a namespace prefix, since that gives us a
+ * clash on a class name.  (MetaWindow and MutterWindow)
+ */
+#define MUTTER_TYPE_WINDOW              (mutter_window_get_type ())
+#define MUTTER_WINDOW(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), MUTTER_TYPE_WINDOW, MutterWindow))
+#define MUTTER_IS_WINDOW(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), MUTTER_TYPE_WINDOW))
+
+typedef struct MutterWindow          MutterWindow;
+typedef struct MutterWindowClass     MutterWindowClass;
+
+struct MutterWindow
+{
+  GObject parent_instance;
+};
+
+struct MutterWindowClass
+{
+  GObjectClass parent_class;
+};
+
+GType mutter_window_get_type          (void) G_GNUC_CONST;
+
+void mutter_window_func (MutterWindow *window, guint v);
diff --git a/tests/scanner/drawable.c b/tests/scanner/drawable.c
new file mode 100644 (file)
index 0000000..6ab8ecf
--- /dev/null
@@ -0,0 +1,55 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+#include "drawable.h"
+
+G_DEFINE_ABSTRACT_TYPE (TestInheritDrawable, test_inherit_drawable, G_TYPE_OBJECT);
+
+static void
+test_inherit_drawable_class_init (TestInheritDrawableClass *klass)
+{
+
+}
+
+static void
+test_inherit_drawable_init (TestInheritDrawable *drawable)
+{
+
+}
+
+void 
+test_inherit_drawable_do_foo (TestInheritDrawable *drawable, int x)
+{
+  
+}
+
+/**
+ * test_inherit_drawable_get_origin:
+ * @drawable:
+ * @x: (out):
+ * @y: (out):
+ */
+void
+test_inherit_drawable_get_origin (TestInheritDrawable *drawable, int *x, int *y)
+{
+  *x = 0;
+  *y = 0;
+}
+
+/**
+ * test_inherit_drawable_get_size:
+ * @drawable:
+ * @width: (out):
+ * @height: (out):
+ */
+void
+test_inherit_drawable_get_size (TestInheritDrawable *drawable, guint *width, guint *height)
+{
+  *width = 42;
+  *height = 42;
+}
+
+void
+test_inherit_drawable_do_foo_maybe_throw (TestInheritDrawable *drawable, int x, GError **error)
+{
+  if (x != 42)
+    g_set_error(error, 0, 12, "The answer should be 42!");
+}
diff --git a/tests/scanner/drawable.h b/tests/scanner/drawable.h
new file mode 100644 (file)
index 0000000..d1752e4
--- /dev/null
@@ -0,0 +1,33 @@
+#ifndef __TEST_INHERIT_DRAWABLE_H__
+#define __TEST_INHERIT_DRAWABLE_H__
+
+#include <glib-object.h>
+
+typedef struct _TestInheritDrawable TestInheritDrawable;
+typedef struct _TestInheritDrawableClass TestInheritDrawableClass;
+
+struct _TestInheritDrawable
+{
+  GObject parent_instance;
+};
+
+struct _TestInheritDrawableClass
+{
+  GObjectClass parent_class;
+};
+
+GType test_inherit_drawable_get_type (void) G_GNUC_CONST;
+
+void test_inherit_drawable_do_foo (TestInheritDrawable *drawable, int x);
+void test_inherit_drawable_get_origin (TestInheritDrawable *drawable, int *x, int *y);
+void test_inherit_drawable_get_size (TestInheritDrawable *drawable, guint *width, guint *height);
+void test_inherit_drawable_do_foo_maybe_throw (TestInheritDrawable *drawable, int x, GError **error);
+
+typedef struct _TestInheritPixmapObjectClass TestInheritPixmapObjectClass;
+
+struct _TestInheritPixmapObjectClass
+{
+  TestInheritDrawableClass parent_class;
+};
+
+#endif /* __TEST_INHERIT_DRAWABLE_H__ */
diff --git a/tests/scanner/foo.c b/tests/scanner/foo.c
new file mode 100644 (file)
index 0000000..3e15444
--- /dev/null
@@ -0,0 +1,784 @@
+#include "foo.h"
+#include "girepository.h"
+
+/* A hidden type not exposed publicly, similar to GUPNP's XML wrapper
+   object */
+typedef struct _FooHidden FooHidden;
+
+int foo_init_argv (int argc, char **argv);
+int foo_init_argv_address (int *argc, char ***argv);
+void foo_private_function (FooObject *foo);
+void foo_test_unsigned (unsigned int uint);
+void foo_interface_do_foo (FooInterface *self, int x);
+void foo_do_foo (FooInterface *self, int x);
+int foo_enum_method (FooEnumType foo_enum);
+FooHidden * foo_hidden_copy (const FooHidden *boxed);
+void foo_hidden_free (FooHidden *boxed);
+GType foo_hidden_get_type (void);
+FooBoxed *foo_boxed_copy (const FooBoxed *boxed);
+void foo_boxed_free (FooBoxed *boxed);
+void foo_dbus_data_free (FooDBusData *boxed);
+FooDBusData *foo_dbus_data_copy (const FooDBusData *boxed);
+
+typedef struct
+{
+  int i;
+} PrivateStruct;
+
+void foo_private_function (FooObject *foo)
+{
+
+}
+
+GType
+foo_interface_get_type (void)
+{
+  static GType object_type = 0;
+
+  if (!object_type)
+    {
+      object_type = g_type_register_static_simple (G_TYPE_INTERFACE,
+                                                   "FooInterface",
+                                                   sizeof (FooInterfaceIface),
+                                                   NULL, 0, NULL, 0);
+
+      g_type_interface_add_prerequisite (object_type, G_TYPE_OBJECT);
+    }
+
+  return object_type;
+}
+
+void foo_interface_do_foo (FooInterface *self, int x)
+{
+  FOO_INTERFACE_GET_INTERFACE(self)->do_foo (self, x);
+}
+
+void foo_interface_static_method (int x)
+{
+}
+
+enum {
+  PROP_0,
+  PROP_STRING,
+  PROP_HIDDEN
+};
+
+enum {
+  SIGNAL,
+  LAST_SIGNAL
+};
+
+static guint foo_object_signals[LAST_SIGNAL] = { 0 };
+
+static void
+foo_foo_interface_init (gpointer         g_iface,
+                       gpointer         iface_data)
+{
+  FooInterfaceIface *iface = (FooInterfaceIface *)g_iface;
+  iface->do_foo = foo_do_foo;
+}
+
+enum {
+  SUBIFACE_DESTROY_EVENT,
+  SUBIFACE_LAST_SIGNAL
+};
+
+static void
+foo_sub_interface_class_init (gpointer g_class, gpointer class_data);
+
+static guint foo_subiface_signals[SUBIFACE_LAST_SIGNAL] = { 0 };
+
+GType
+foo_sub_interface_get_type (void)
+{
+  static GType object_type = 0;
+
+  if (!object_type)
+    {
+      object_type = g_type_register_static_simple (G_TYPE_INTERFACE,
+                                                   "FooSubInterface",
+                                                   sizeof (FooSubInterfaceIface),
+                                                   foo_sub_interface_class_init, 0, NULL, 0);
+
+      g_type_interface_add_prerequisite (object_type, FOO_TYPE_INTERFACE);
+    }
+
+  return object_type;
+}
+
+static void
+foo_sub_interface_class_init (gpointer g_class, gpointer class_data)
+{
+  foo_subiface_signals[SUBIFACE_DESTROY_EVENT] =
+    g_signal_new ("destroy-event", FOO_TYPE_SUBINTERFACE,
+                  G_SIGNAL_RUN_LAST,
+                  G_STRUCT_OFFSET (FooSubInterfaceIface, destroy_event),
+                  NULL, NULL,
+                  gi_cclosure_marshal_generic,
+                  G_TYPE_NONE,
+                  0,
+                  G_TYPE_NONE);
+}
+
+void
+foo_sub_interface_do_bar (FooSubInterface *self)
+{
+  FOO_SUBINTERFACE_GET_INTERFACE(self)->do_bar (self);
+}
+
+void
+foo_sub_interface_do_moo (FooSubInterface *self, int x, gpointer y)
+{
+  FOO_SUBINTERFACE_GET_INTERFACE(self)->do_moo (self, x, y);
+}
+
+/**
+ * foo_sub_interface_do_baz:
+ * @self:
+ * @callback: (scope call):
+ * @user_data:
+ *
+ */
+void
+foo_sub_interface_do_baz (FooSubInterface *self, GCallback callback, gpointer user_data)
+{
+  FOO_SUBINTERFACE_GET_INTERFACE(self)->do_baz (self, callback, user_data);
+}
+
+G_DEFINE_TYPE_EXTENDED (FooObject, foo_object, G_TYPE_OBJECT,
+                       0, G_IMPLEMENT_INTERFACE (FOO_TYPE_INTERFACE,
+                                                 foo_foo_interface_init));
+
+static void
+foo_object_set_property (GObject         *object,
+                         guint            prop_id,
+                         const GValue    *value,
+                         GParamSpec      *pspec)
+{
+  switch (prop_id)
+    {
+    case PROP_STRING:
+      break;
+    case PROP_HIDDEN:
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+    }
+}
+
+static void
+foo_object_get_property (GObject         *object,
+                         guint            prop_id,
+                         GValue          *value,
+                         GParamSpec      *pspec)
+{
+  switch (prop_id)
+    {
+    case PROP_STRING:
+      break;
+    case PROP_HIDDEN:
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+    }
+}
+
+static void
+foo_object_class_init (FooObjectClass *klass)
+{
+  GObjectClass *gobject_class;
+
+  gobject_class = G_OBJECT_CLASS (klass);
+
+  gobject_class->set_property = foo_object_set_property;
+  gobject_class->get_property = foo_object_get_property;
+
+  g_object_class_install_property (gobject_class,
+                                   PROP_STRING,
+                                   g_param_spec_string ("string",
+                                                        "String nick",
+                                                        "The String Property Blurb",
+                                                        NULL,
+                                                        G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+  g_object_class_install_property (gobject_class,
+                                   PROP_HIDDEN,
+                                   g_param_spec_boxed ("hidden",
+                                                      "hidden property",
+                                                      "should not be exposed",
+                                                      foo_hidden_get_type (),
+                                                      G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+  foo_object_signals[SIGNAL] =
+    g_signal_new ("signal",
+                 G_OBJECT_CLASS_TYPE (gobject_class),
+                 G_SIGNAL_RUN_LAST,
+                 0,
+                 NULL, NULL,
+                 (GSignalCMarshaller)g_cclosure_marshal_STRING__OBJECT_POINTER,
+                 G_TYPE_STRING, 2, G_TYPE_OBJECT, G_TYPE_POINTER);
+
+}
+
+static void
+foo_object_init (FooObject *object)
+{
+
+}
+
+FooObject *
+foo_object_new (void)
+{
+  return g_object_new (FOO_TYPE_OBJECT, NULL);
+}
+
+GObject *
+foo_object_new_as_super (void)
+{
+  return g_object_new (FOO_TYPE_OBJECT, NULL);
+}
+
+/**
+ * foo_object_external_type:
+ * @object: a #FooObject
+ *
+ * Returns: (transfer none): %NULL always
+ */
+UtilityObject*
+foo_object_external_type (FooObject *object)
+{
+  return NULL;
+}
+
+void                  
+foo_object_take_all (FooObject *object, int x, ...)
+{
+
+}
+
+void
+foo_do_foo (FooInterface *self, int x)
+{
+
+
+}
+
+void
+foo_object_is_it_time_yet (FooObject *object, time_t time)
+{
+}
+
+/**
+ * foo_object_new_cookie: (skip)
+ * @object:
+ * @target:
+ *
+ * Not sure why this test is here...
+ */
+FooObjectCookie
+foo_object_new_cookie (FooObject *object, const char *target)
+{
+  return NULL;
+}
+
+const char *
+foo_object_get_name (FooObject *object)
+{
+  return "foo";
+}
+
+char *
+foo_object_dup_name (FooObject *object)
+{
+  return g_strdup ("foo");
+}
+
+/**
+ * foo_object_read:
+ * @object: obj
+ * @offset: offset
+ * @length: length
+ *
+ * Read some stuff.
+ *
+ * Virtual: read_fn
+ */
+void
+foo_object_read (FooObject *object, int offset, int length)
+{
+
+}
+
+/**
+ * foo_object_skipped_method: (skip)
+ * @object: obj
+ *
+ * This is only useful from C.
+ */
+void
+foo_object_skipped_method (FooObject *object)
+{
+}
+
+G_DEFINE_ABSTRACT_TYPE (FooSubobject, foo_subobject, FOO_TYPE_OBJECT);
+
+static void
+foo_subobject_class_init (FooSubobjectClass *klass)
+{
+
+}
+
+static void
+foo_subobject_init (FooSubobject *object)
+{
+
+}
+
+/**
+ * foo_object_get_default:
+ *
+ * This function is intended to match clutter_stage_get_default which
+ * uses a C sugar return type.
+ *
+ * Return value: (type FooSubobject) (transfer none): The global #FooSubobject
+ */
+FooObject *
+foo_object_get_default ()
+{
+  return NULL;
+}
+
+int foo_init (void)
+{
+  return FOO_SUCCESS_INT;
+}
+
+int foo_init_argv (int argc, char **argv)
+{
+  return FOO_SUCCESS_INT;
+}
+
+int foo_init_argv_address (int *argc, char ***argv)
+{
+  return FOO_SUCCESS_INT;
+}
+
+GType
+foo_enum_type_get_type (void)
+{
+    static GType etype = 0;
+    if (G_UNLIKELY(etype == 0)) {
+        static const GEnumValue values[] = {
+            { FOO_ENUM_ALPHA, "FOO_ENUM_ALPHA", "alpha" },
+            { FOO_ENUM_BETA, "FOO_ENUM_BETA", "beta" },
+            { FOO_ENUM_DELTA, "FOO_ENUM_DELTA", "delta" },
+            { 0, NULL, NULL }
+        };
+        etype = g_enum_register_static (g_intern_static_string ("FooEnumType"), values);
+    }
+    return etype;
+}
+
+int foo_enum_method (FooEnumType foo_enum)
+{
+  return 0;
+}
+
+
+GType
+foo_flags_type_get_type (void)
+{
+    static GType etype = 0;
+    if (G_UNLIKELY(etype == 0)) {
+        static const GFlagsValue values[] = {
+            { FOO_FLAGS_FIRST, "FOO_FLAGS_FIRST", "first" },
+            { FOO_FLAGS_SECOND, "FOO_FLAGS_SECOND", "second" },
+            { FOO_FLAGS_THIRD, "FOO_FLAGS_THIRD", "third" },
+            { 0, NULL, NULL }
+        };
+        etype = g_flags_register_static (g_intern_static_string ("FooFlagsType"), values);
+    }
+    return etype;
+}
+
+struct _FooBoxed
+{
+  int private;
+};
+
+
+FooBoxed *
+foo_boxed_copy (const FooBoxed *boxed)
+{
+  return (FooBoxed *)g_memdup (boxed, sizeof (FooBoxed));
+}
+
+void
+foo_boxed_free (FooBoxed *boxed)
+{
+  g_slice_free (FooBoxed, boxed);
+}
+
+
+GType
+foo_boxed_get_type (void)
+{
+  static GType our_type = 0;
+  
+  if (our_type == 0)
+    our_type = g_boxed_type_register_static ("FooBoxed",
+                                            (GBoxedCopyFunc) foo_boxed_copy,
+                                            (GBoxedFreeFunc) foo_boxed_free);
+  return our_type;
+}
+
+FooBoxed *
+foo_boxed_new (void)
+{
+  return g_slice_new0 (FooBoxed);
+}
+
+void
+foo_boxed_method (FooBoxed *boxed)
+{
+
+}
+
+/* FooDbus */
+struct _FooDBusData
+{
+  double private;
+};
+
+FooDBusData *
+foo_dbus_data_copy (const FooDBusData *boxed)
+{
+  return (FooDBusData *)g_memdup (boxed, sizeof (FooDBusData));
+}
+
+void
+foo_dbus_data_free (FooDBusData *boxed)
+{
+  g_slice_free (FooDBusData, boxed);
+}
+
+
+GType
+foo_dbus_data_get_type (void)
+{
+  static GType our_type = 0;
+  
+  if (our_type == 0)
+    our_type = g_boxed_type_register_static ("FooDBusData",
+                                            (GBoxedCopyFunc) foo_dbus_data_copy,
+                                            (GBoxedFreeFunc) foo_dbus_data_free);
+  return our_type;
+}
+
+GType
+foo_brect_get_type (void)
+{
+  static GType our_type = 0;
+  
+  if (our_type == 0)
+    our_type = g_boxed_type_register_static ("FooBRect",
+                                            (GBoxedCopyFunc) g_memdup, /* Won't work */
+                                            (GBoxedFreeFunc) g_free);
+  return our_type;
+}
+
+GType
+foo_bunion_get_type (void)
+{
+  static GType our_type = 0;
+  
+  if (our_type == 0)
+    our_type = g_boxed_type_register_static ("FooBUnion",
+                                            (GBoxedCopyFunc) g_memdup, /* Won't work */
+                                            (GBoxedFreeFunc) g_free);
+  return our_type;
+}
+
+void foo_test_unsigned (unsigned int uint)
+{
+}
+
+/**
+ * foo_test_string_array:
+ * @array: (array zero-terminated=1):
+ */
+void
+foo_test_string_array (char **array)
+{
+}
+
+/**
+ * foo_test_string_array_with_g:
+ * @array: (array zero-terminated=1):
+ */
+void
+foo_test_string_array_with_g (gchar **array)
+{
+}
+
+/**
+ * foo_test_array:
+ * Returns: (element-type utf8) (transfer container):
+ */
+GArray *
+foo_test_array (void)
+{
+  return NULL;
+}
+
+/**
+ * foo_rectangle_new: (skip)
+ *
+ * This is a C convenience constructor; we have to (skip)
+ * it because it's not a boxed type.
+ */
+FooRectangle *
+foo_rectangle_new (int x, int y, int width, int height)
+{
+  FooRectangle *r = g_slice_new (FooRectangle);
+  r->x = x;
+  r->y = y;
+  r->width = width;
+  r->height = height;
+  return r;
+}
+
+/**
+ * foo_rectangle_add:
+ * @r1: (inout): add to this rect
+ * @r2: source rectangle
+ */
+void
+foo_rectangle_add(FooRectangle *r1, const FooRectangle *r2)
+{
+
+}
+
+/* FooHidden */
+
+struct _FooHidden
+{
+  char *frob;
+};
+
+FooHidden *
+foo_hidden_copy (const FooHidden *boxed)
+{
+  return (FooHidden *)g_memdup (boxed, sizeof (FooHidden));
+}
+
+void
+foo_hidden_free (FooHidden *boxed)
+{
+  g_slice_free (FooHidden, boxed);
+}
+
+GType
+foo_hidden_get_type (void)
+{
+  static GType our_type = 0;
+
+  if (our_type == 0)
+    our_type = g_boxed_type_register_static ("FooHidden",
+                                            (GBoxedCopyFunc) foo_hidden_copy,
+                                            (GBoxedFreeFunc) foo_hidden_free);
+  return our_type;
+}
+
+GType
+foo_error_get_type (void)
+{
+    static GType etype = 0;
+    if (G_UNLIKELY(etype == 0)) {
+        static const GEnumValue values[] = {
+            { FOO_ERROR_GOOD, "FOO_ERROR_GOOD", "good" },
+            { FOO_ERROR_BAD, "FOO_ERROR_BAD", "bad" },
+            { FOO_ERROR_UGLY, "FOO_ERROR_UGLY", "ugly" },
+            { 0, NULL, NULL }
+        };
+        etype = g_enum_register_static (g_intern_static_string ("FooError"), values);
+    }
+    return etype;
+}
+
+GQuark
+foo_error_quark (void)
+{
+  return g_quark_from_static_string ("foo-error-quark");
+}
+
+void
+foo_some_variant (guint x, va_list args)
+{
+}
+
+GType foo_tile_handler_get_type(void);
+
+/* This setup of a totally hidden parent class matches
+ * http://bugzilla.gnome.org/show_bug.cgi?id=561360
+ */
+#define FOO_TYPE_TILE_HANDLER        (foo_tile_handler_get_type ())
+#define FOO_TILE_HANDLER(object)     (G_TYPE_CHECK_INSTANCE_CAST ((object), FOO_TYPE_TILE_HANDLER, FooTileHandler))
+#define FOO_IS_TILE_HANDLER(object)  (G_TYPE_CHECK_INSTANCE_TYPE ((object), FOO_TYPE_TILE_HANDLER))
+
+struct _FooTileHandler
+{
+  FooObject parent_instance;
+};
+
+
+struct _FooTileHandlerClass
+{
+  FooObjectClass parent_class;
+};
+
+typedef struct _FooTileHandler          FooTileHandler;
+typedef struct _FooTileHandlerClass     FooTileHandlerClass;
+
+G_DEFINE_TYPE(FooTileHandler, foo_tile_handler, FOO_TYPE_OBJECT);
+
+static void
+foo_tile_handler_class_init (FooTileHandlerClass *klass)
+{
+
+}
+
+static void
+foo_tile_handler_init (FooTileHandler *object)
+{
+
+}
+
+struct _FooBuffer
+{
+  FooTileHandler parent_instance;
+};
+
+struct _FooBufferClass
+{
+  FooTileHandlerClass parent_class;
+};
+
+G_DEFINE_TYPE(FooBuffer, foo_buffer, FOO_TYPE_TILE_HANDLER);
+
+static void
+foo_buffer_class_init (FooBufferClass *klass)
+{
+
+}
+
+static void
+foo_buffer_init (FooBuffer *object)
+{
+
+}
+
+void
+foo_buffer_some_method (FooBuffer *buffer)
+{
+}
+
+struct _FooOtherObject
+{
+  GObject parent_instance;
+};
+
+struct _FooOtherObjectClass
+{
+  GObjectClass parent_class;
+};
+
+G_DEFINE_TYPE(FooOtherObject, foo_other_object, G_TYPE_OBJECT);
+
+static void
+foo_other_object_class_init (FooOtherObjectClass *klass)
+{
+
+}
+
+static void
+foo_other_object_init (FooOtherObject *object)
+{
+
+}
+
+
+#define FOO_DEFINE_SHOULD_NOT_BE_EXPOSED "should not be exposed"
+
+/**
+ * foo_skip_me: (skip)
+ * @fs: a #FooSkippable
+ *
+ * Does something that's only interesting from C and should not be
+ * exposed to language bindings.
+ */
+void
+foo_skip_me (FooSkippable fs)
+{
+}
+
+/**
+ * FooForeignStruct: (foreign)
+ *
+ */
+
+FooForeignStruct*
+foo_foreign_struct_new (void)
+{
+  return g_slice_new0 (FooForeignStruct);
+}
+
+FooForeignStruct*
+foo_foreign_struct_copy (FooForeignStruct *original)
+{
+    FooForeignStruct *copy;
+    copy = foo_foreign_struct_new ();
+    copy->foo = original->foo;
+    return copy;
+}
+
+/**
+ * foo_test_varargs_callback: (skip)
+ *
+ */
+void
+foo_test_varargs_callback (gint i, FooVarargsCallback callback)
+{
+}
+
+/**
+ * foo_test_varargs_callback2: (skip)
+ *
+ */
+void
+foo_test_varargs_callback2 (FooVarargsCallback callback)
+{
+}
+
+/**
+ * foo_test_varargs_callback3: (skip)
+ *
+ */
+void
+foo_test_varargs_callback3 (FooVarargsCallback callback,
+                           FooVarargsCallback callback2)
+{
+}
+
+/**
+ * foo_object_append_new_stack_layer:
+ *
+ * This shouldn't be scanned as a constructor.
+ *
+ * Returns: (transfer none):
+ */
+FooOtherObject *
+foo_object_append_new_stack_layer (FooObject *obj, int x)
+{
+  return NULL;
+}
diff --git a/tests/scanner/foo.h b/tests/scanner/foo.h
new file mode 100644 (file)
index 0000000..4b20ed7
--- /dev/null
@@ -0,0 +1,439 @@
+#ifndef __FOO_OBJECT_H__
+#define __FOO_OBJECT_H__
+
+#include <glib-object.h>
+#include <gio/gio.h> /* GAsyncReadyCallback */
+#include "utility.h"
+
+#define FOO_SUCCESS_INT 0x1138
+
+#define FOO_DEFINE_SHOULD_BE_EXPOSED "should be exposed"
+
+#define FOO_PIE_IS_TASTY 3.14159
+
+#define FOO_TYPE_INTERFACE           (foo_interface_get_type ())
+#define FOO_INTERFACE(object)        (G_TYPE_CHECK_INSTANCE_CAST ((object), FOO_TYPE_INTERFACE, FooInterface))
+#define FOO_IS_INTERFACE(object)     (G_TYPE_CHECK_INSTANCE_TYPE ((object), FOO_TYPE_INTERFACE))
+#define FOO_INTERFACE_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), FOO_TYPE_INTERFACE, FooInterfaceIface))
+
+#define FOO_TYPE_SUBINTERFACE           (foo_sub_interface_get_type ())
+#define FOO_SUBINTERFACE(object)        (G_TYPE_CHECK_INSTANCE_CAST ((object), FOO_TYPE_SUBINTERFACE, FooSubInterface))
+#define FOO_IS_SUBINTERFACE(object)     (G_TYPE_CHECK_INSTANCE_TYPE ((object), FOO_TYPE_SUBINTERFACE))
+#define FOO_SUBINTERFACE_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), FOO_TYPE_SUBINTERFACE, FooSubInterfaceIface))
+
+
+#define FOO_TYPE_OBJECT              (foo_object_get_type ())
+#define FOO_OBJECT(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), FOO_TYPE_OBJECT, FooObject))
+#define FOO_IS_OBJECT(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), FOO_TYPE_OBJECT))
+
+#define FOO_TYPE_SUBOBJECT           (foo_subobject_get_type ())
+#define FOO_SUBOBJECT(subobject)     (G_TYPE_CHECK_INSTANCE_CAST ((subobject), FOO_TYPE_SUBOBJECT, FooSubobject))
+#define FOO_IS_SUBOBJECT(subobject)  (G_TYPE_CHECK_INSTANCE_TYPE ((subobject), FOO_TYPE_SUBOBJECT))
+
+#define FOO_TYPE_BUFFER        (foo_buffer_get_type ())
+#define FOO_BUFFER(object)     (G_TYPE_CHECK_INSTANCE_CAST ((object), FOO_TYPE_BUFFER, FooBuffer))
+#define FOO_IS_BUFFER(object)  (G_TYPE_CHECK_INSTANCE_TYPE ((object), FOO_TYPE_BUFFER))
+
+#define FOO_TYPE_OTHER_OBJECT  (foo_other_object_get_type ())
+#define FOO_OTHER_OBJECT(object)     (G_TYPE_CHECK_INSTANCE_CAST ((object), FOO_TYPE_OTHER_OBJECT, FooOtherObject))
+#define FOO_IS_OTHER_OBJECT(object)  (G_TYPE_CHECK_INSTANCE_TYPE ((object), FOO_TYPE_OTHER_OBJECT))
+
+typedef struct _FooInterface       FooInterface;
+typedef struct _FooInterfaceIface  FooInterfaceIface;
+typedef struct _FooSubInterface       FooSubInterface;
+typedef struct _FooSubInterfaceIface  FooSubInterfaceIface;
+typedef struct _FooObject          FooObject;
+typedef struct _FooObjectClass     FooObjectClass;
+typedef struct _FooSubobject       FooSubobject;
+typedef struct _FooSubobjectClass  FooSubobjectClass;
+typedef struct _FooBuffer          FooBuffer;
+typedef struct _FooBufferClass     FooBufferClass;
+typedef struct _FooOtherObject          FooOtherObject;
+typedef struct _FooOtherObjectClass     FooOtherObjectClass;
+
+struct _FooInterfaceIface
+{
+  GTypeInterface parent_iface;
+
+  void (*do_foo) (FooInterface *self, int x);
+};
+
+GType                 foo_interface_get_type       (void) G_GNUC_CONST;
+
+void foo_interface_do_foo (FooInterface *iface, int x);
+
+void foo_interface_static_method (int x);
+
+struct _FooSubInterfaceIface
+{
+  GTypeInterface parent_iface;
+
+  /* signals */
+
+  void (*destroy_event) (FooSubInterface *self);
+
+  /* virtual table */
+
+  void (*do_bar) (FooSubInterface *self);
+
+  /* explicitly test un-named parameters */
+  void (*do_moo) (FooSubInterface *self, int, gpointer);
+
+  void (*do_baz) (FooSubInterface *self, GCallback callback, gpointer data);
+};
+
+GType                 foo_sub_interface_get_type       (void) G_GNUC_CONST;
+
+void foo_sub_interface_do_bar (FooSubInterface *self);
+void foo_sub_interface_do_moo (FooSubInterface *self, int, gpointer);
+void foo_sub_interface_do_baz (FooSubInterface *self,
+                               GCallback callback,
+                               gpointer data);
+
+struct _FooObject
+{
+  GObject parent_instance;
+
+  int some_int;
+};
+
+struct _FooObjectClass
+{
+  GObjectClass parent_class;
+
+  gboolean (* virtual_method) (FooObject *object, int first_param);
+
+  /* Intended to match GFile */
+  void (*read_fn) (FooObject *object, int offset, int length);
+  
+  /* Test reserved stuff */
+  GCallback _reserved[4];
+};
+
+gint                  foo_init                     (void);
+
+GType                 foo_object_get_type          (void) G_GNUC_CONST;
+FooObject*            foo_object_new               (void);
+UtilityObject*        foo_object_external_type     (FooObject *object);
+GObject*              foo_object_new_as_super      (void);
+
+void                  foo_object_various           (FooObject *object, void *data, GType some_type);
+
+void                  foo_object_take_all          (FooObject *object, int x, ...);
+
+typedef gpointer FooObjectCookie;
+
+FooObjectCookie       foo_object_new_cookie        (FooObject *object, const char *target);
+
+void                  foo_object_is_it_time_yet    (FooObject *object, time_t time);
+
+const char *          foo_object_get_name          (FooObject *object);
+
+char *                foo_object_dup_name          (FooObject *object);
+
+void                  foo_object_handle_glyph      (FooObject *object, UtilityGlyph glyph);
+
+gboolean              foo_object_virtual_method    (FooObject *object, int first_param);
+
+void                  foo_object_read              (FooObject *object, int offset, int length);
+
+int                   foo_object_static_meth       (void);
+
+void                  foo_object_skipped_method    (FooObject *object);
+
+struct _FooSubobject
+{
+  FooObject parent_instance;
+};
+
+struct _FooSubobjectClass
+{
+  FooObjectClass parent_class;
+};
+
+GType                 foo_subobject_get_type       (void) G_GNUC_CONST;
+FooSubobject*         foo_subobject_new            (void);
+
+FooObject *           foo_object_get_default       (void);
+
+GType                 foo_buffer_get_type          (void);
+
+void                  foo_buffer_some_method       (FooBuffer *buffer);
+
+GType                 foo_other_object_get_type    (void) G_GNUC_CONST;
+
+typedef enum
+{
+  FOO_ENUM_ALPHA,
+  FOO_ENUM_BETA,
+  FOO_ENUM_DELTA
+} FooEnumType;
+
+GType foo_enum_type_get_type (void);
+
+int                   foo_enum_type_method         (FooEnumType foo_enum);
+
+FooEnumType           foo_enum_type_returnv        (int x);
+
+typedef enum
+{
+  FOO_FLAGS_FIRST  = 1 << 0,
+  FOO_FLAGS_SECOND = 1 << 1,
+  FOO_FLAGS_THIRD  = 1 << 2
+} FooFlagsType;
+
+GType foo_flags_type_get_type (void);
+
+typedef enum
+{
+  FOO_ENUM_UN = 1,
+  FOO_ENUM_DEUX = 2,
+  FOO_ENUM_TROIS = 3,
+  FOO_ENUM_NEUF = 9
+} FooEnumNoType;
+
+typedef enum
+{
+  FOO_FLAGS_ETT  = 1 << 0,
+  FOO_FLAGS_TVA = 1 << 1,
+  FOO_FLAGS_FYRA  = 1 << 2
+} FooFlagsNoType;
+
+typedef enum
+{
+  FOO_ENUM_FULLNAME_ONE = 1,
+  FOO_ENUM_FULLNAME_TWO,
+  FOO_ENUM_FULLNAME_THREE
+} FooEnumFullname;
+
+typedef enum
+{
+  FOO_ADDRESS_INVALID,
+  FOO_ADDRESS_IPV4,
+  FOO_ADDRESS_IPV6
+} FooAddressType;
+
+typedef struct _FooBoxed FooBoxed;
+
+GType                 foo_boxed_get_type       (void) G_GNUC_CONST;
+FooBoxed*             foo_boxed_new            (void);
+void                  foo_boxed_method         (FooBoxed* boxed);
+
+/* This one tests capitalization handling with respect to DBus */
+typedef struct _FooDBusData FooDBusData;
+GType                 foo_dbus_data_get_type       (void) G_GNUC_CONST;
+void                  foo_dbus_data_method         (FooDBusData* dbusdata);
+
+/* FIXME: Scanner does not support this yet
+const char *FOO_CONSTANT_STR = "foo-constant-str";
+const int FOO_CONSTANT_INT = 10;
+const float FOO_CONSTANT_FLOAT = 10;
+*/
+
+/* Callback */
+typedef gboolean (* FooCallback) (FooObject *foo, gboolean b, gpointer data);
+
+/* Invalid comments, should be ignored */
+
+/* @ */
+/* @: */
+
+typedef struct _FooStruct           FooStruct; 
+typedef struct _FooStructPrivate    FooStructPrivate; 
+
+struct _FooStruct
+{
+  FooStructPrivate *priv;
+  int member;
+};
+
+typedef struct _FooRectangle          FooRectangle;
+
+struct _FooRectangle
+{
+  gint x;
+  gint y;
+  gint width;
+  gint height;
+};
+
+void
+foo_method_external_references (UtilityObject *object,
+                               UtilityEnumType e,
+                               UtilityFlagType f,
+                               UtilityStruct s);
+
+void foo_rectangle_add(FooRectangle *r1, const FooRectangle *r2);
+
+FooRectangle * foo_rectangle_new (int x, int y, int width, int height);
+
+
+typedef struct _FooEventAny FooEventAny;
+typedef struct _FooEventExpose FooEventExpose;
+
+typedef union  _FooEvent FooEvent;
+
+struct _FooEventAny
+{
+  gint8 send_event;
+};
+
+struct _FooEventExpose
+{
+  gint8 send_event;
+  gint count;
+};
+  
+union _FooEvent
+{
+  int type;
+  FooEventAny any;
+  FooEventExpose expose;
+};
+
+typedef void FooXEvent;
+
+/* And now some boxed variants */
+
+typedef struct _FooBRect          FooBRect;
+
+struct _FooBRect
+{
+  double x;
+  double y;
+};
+
+GType foo_brect_get_type (void);
+
+FooBRect *foo_brect_new (double x, double y);
+
+void foo_brect_add (FooBRect *b1, FooBRect *b2);
+
+typedef union _FooBUnion FooBUnion;
+
+union _FooBUnion
+{
+  int type;
+  double v;
+  FooBRect *rect;
+};
+
+typedef union _FooUnion FooUnion;
+
+union _FooUnion
+{
+  int foo;
+};
+
+typedef struct _FooUtilityStruct FooUtilityStruct;
+struct _FooUtilityStruct
+{
+  UtilityStruct bar;
+};
+
+typedef struct _FooThingWithArray FooThingWithArray;
+struct _FooThingWithArray
+{
+  int x;
+  int y;
+  char lines[80];
+  guchar *data;
+} ;
+
+FooBUnion *foo_bunion_new (void);
+
+GType foo_bunion_get_type (void);
+
+int foo_bunion_get_contained_type (FooBUnion *bunion);
+
+void foo_test_unsigned_qualifier (unsigned int unsigned_param);
+void foo_test_unsigned_type (unsigned unsigned_param);
+
+void foo_test_string_array (char **array);
+
+void foo_test_string_array_with_g (gchar **array);
+
+GArray *foo_test_array (void);
+
+const char * foo_test_const_char_retval (void);
+const FooStruct * foo_test_const_struct_retval (void);
+void foo_test_const_char_param (const char * param);
+void foo_test_const_struct_param (const FooStruct * param);
+
+typedef void (*FooVarargsCallback) (const char * param, ...);
+void foo_test_varargs_callback (gint i, FooVarargsCallback callback);
+void foo_test_varargs_callback2 (FooVarargsCallback callback);
+void foo_test_varargs_callback3 (FooVarargsCallback callback,
+                                FooVarargsCallback callback2);
+
+/* Make sure callbacks get the right scope by default */
+void foo_async_ready_callback(GCancellable *cancellable,
+                              GAsyncReadyCallback callback,
+                              gpointer user_data);
+void foo_destroy_notify_callback(FooCallback callback,
+                                 gpointer data,
+                                 GDestroyNotify destroy);
+
+typedef enum {
+  FOO_ERROR_GOOD,
+  FOO_ERROR_BAD,
+  FOO_ERROR_UGLY
+} FooError;
+GType foo_error_get_type (void);
+
+GQuark foo_error_quark (void);
+
+typedef enum
+{
+  FOO_LAYER_DESKTOP        = 0,
+  FOO_LAYER_BOTTOM        = 1,
+  FOO_LAYER_NORMAL        = 2,
+  FOO_LAYER_TOP        = 4, /* Same as DOCK; see EWMH and bug 330717 */
+  FOO_LAYER_DOCK        = 4,
+  FOO_LAYER_FULLSCREEN        = 5,
+  FOO_LAYER_FOCUSED_WINDOW    = 6,
+  FOO_LAYER_OVERRIDE_REDIRECT = 7,
+  FOO_LAYER_LAST        = 8
+} FooStackLayer;
+
+typedef enum
+{
+  FOO_SOME_SINGLE_ENUM
+} FooASingle;
+
+/* Should be skipped */
+void foo_some_variant (guint x, va_list args);
+void foo_some_variant_ptr (guint x, va_list *args);
+
+/**
+ * FooSkippable: (skip)
+ * @FOO_SKIPPABLE_ONE: a skippable enum value
+ * @FOO_SKIPPABLE_TWO: another skippable enum value
+ *
+ * Some type that is only interesting from C and should not be
+ * exposed to language bindings.
+ */
+typedef enum {
+  FOO_SKIPPABLE_ONE,
+  FOO_SKIPPABLE_TWO
+} FooSkippable;
+void foo_skip_me (FooSkippable fs);
+
+typedef struct _FooForeignStruct           FooForeignStruct;
+
+struct _FooForeignStruct
+{
+  int foo;
+};
+
+FooForeignStruct* foo_foreign_struct_new (void);
+FooForeignStruct* foo_foreign_struct_copy (FooForeignStruct *original);
+
+/* This one should be a global, not a method on UtilityObject since
+ * it's a separate namespace.
+ */
+void foo_object_a_global_method (UtilityObject *obj);
+
+FooOtherObject * foo_object_append_new_stack_layer (FooObject *obj, int x);
+
+#endif /* __FOO_OBJECT_H__ */
diff --git a/tests/scanner/gettype.c b/tests/scanner/gettype.c
new file mode 100644 (file)
index 0000000..cd81673
--- /dev/null
@@ -0,0 +1,62 @@
+#include "gettype.h"
+
+G_DEFINE_TYPE(GetTypeObject, gettype_object, G_TYPE_OBJECT);
+
+static void
+gettype_object_class_init (GetTypeObjectClass *klass)
+{
+}
+
+static void
+gettype_object_init (GetTypeObject *object)
+{
+}
+
+GetTypeObject *
+gettype_object_new (void)
+{
+  return g_object_new (GETTYPE_TYPE_OBJECT, NULL);
+}
+
+/**
+ * gettype_object_nonmeta1_get_type:
+ * @obj: self
+ *
+ * This shouldn't be scanned as a *_get_type function because it takes
+ * arguments.
+ *
+ * Returns: 0
+ */
+GType
+gettype_object_nonmeta1_get_type (GetTypeObject *obj)
+{
+    return 0;
+}
+
+/**
+ * gettype_object_nonmeta2_get_type:
+ *
+ * This shouldn't be scanned as a *_get_type function because it doesn't return
+ * a GType. It will generate a warning.
+ *
+ * Returns: true
+ */
+gboolean
+gettype_object_nonmeta2_get_type (void)
+{
+    return TRUE;
+}
+
+/**
+ * gettype_object_nonmeta_get_gtype:
+ *
+ * This shouldn't be scanned as a *_get_type function because it doesn't return
+ * a GType. It will generate a warning.
+ *
+ * Returns: true
+ */
+gboolean
+gettype_object_nonmeta_get_gtype (void)
+{
+    return TRUE;
+}
diff --git a/tests/scanner/gettype.h b/tests/scanner/gettype.h
new file mode 100644 (file)
index 0000000..755f091
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef __GETTYPE_OBJECT_H__
+#define __GETTYPE_OBJECT_H__
+
+#include <glib-object.h>
+
+#define GETTYPE_TYPE_OBJECT            (gettype_object_get_type ())
+#define GETTYPE_OBJECT(object)         (G_TYPE_CHECK_INSTANCE_CAST ((object), GETTYPE_TYPE_OBJECT, GetTypeObject))
+#define GETTYPE_IS_OBJECT(object)      (G_TYPE_CHECK_INSTANCE_TYPE ((object), GETTYPE_TYPE_OBJECT))
+
+typedef struct _GetTypeObject           GetTypeObject;
+typedef struct _GetTypeObjectClass      GetTypeObjectClass;
+struct _GetTypeObject
+{
+  GObject parent_instance;
+};
+
+struct _GetTypeObjectClass
+{
+  GObjectClass parent_class;
+};
+
+GType           gettype_object_get_type          (void) G_GNUC_CONST;
+GetTypeObject*  gettype_object_new               (void);
+
+GType           gettype_object_nonmeta1_get_type (GetTypeObject *obj);
+gboolean        gettype_object_nonmeta2_get_type (void);
+gboolean        gettype_object_nonmeta_get_gtype (void);
+
+#endif /* __GETTYPE_OBJECT_H__ */
diff --git a/tests/scanner/gtkfrob.c b/tests/scanner/gtkfrob.c
new file mode 100644 (file)
index 0000000..d1c2312
--- /dev/null
@@ -0,0 +1,7 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+#include "gtkfrob.h"
+
+void
+gtk_frob_language_manager_get_default (void)
+{
+}
diff --git a/tests/scanner/gtkfrob.h b/tests/scanner/gtkfrob.h
new file mode 100644 (file)
index 0000000..06a282d
--- /dev/null
@@ -0,0 +1,11 @@
+#ifndef __GTKFROB_H__
+#define __GTKFROB_H__
+
+#include <glib-object.h>
+
+
+/* A global function */
+
+void gtk_frob_language_manager_get_default (void);
+
+#endif /* __GTKFROB_H__ */
diff --git a/tests/scanner/headeronly.h b/tests/scanner/headeronly.h
new file mode 100644 (file)
index 0000000..fc68a19
--- /dev/null
@@ -0,0 +1,9 @@
+#ifndef __HEADERONLY_H__
+#define __HEADERONLY_H__
+
+typedef enum {
+  HEADERONLY_FOO,
+  HEADERONLY_BAR,
+} HeaderonlyExampleEnum;
+
+#endif
diff --git a/tests/scanner/regress.c b/tests/scanner/regress.c
new file mode 100644 (file)
index 0000000..30029f9
--- /dev/null
@@ -0,0 +1,3605 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+#include <string.h>
+#include <stdlib.h>
+#include <glib-object.h>
+#include <gobject/gvaluecollector.h>
+
+#include "regress.h"
+
+static gboolean abort_on_error = TRUE;
+
+#define ASSERT_VALUE(condition)  \
+  if (abort_on_error)             \
+    g_assert (condition);         \
+  else                            \
+    g_warn_if_fail (condition);   \
+
+void
+regress_set_abort_on_error (gboolean in)
+{
+  abort_on_error = in;
+}
+
+/* basic types */
+gboolean
+regress_test_boolean (gboolean in)
+{
+  return in;
+}
+
+gboolean
+regress_test_boolean_true (gboolean in)
+{
+  ASSERT_VALUE (in == TRUE);
+  return in;
+}
+
+gboolean
+regress_test_boolean_false (gboolean in)
+{
+  ASSERT_VALUE (in == FALSE);
+  return in;
+}
+
+gint8
+regress_test_int8 (gint8 in)
+{
+  return in;
+}
+
+guint8
+regress_test_uint8 (guint8 in)
+{
+  return in;
+}
+
+gint16
+regress_test_int16 (gint16 in)
+{
+  return in;
+}
+
+guint16
+regress_test_uint16 (guint16 in)
+{
+  return in;
+}
+
+gint32
+regress_test_int32 (gint32 in)
+{
+  return in;
+}
+
+guint32
+regress_test_uint32 (guint32 in)
+{
+  return in;
+}
+
+gint64
+regress_test_int64 (gint64 in)
+{
+  return in;
+}
+
+guint64
+regress_test_uint64 (guint64 in)
+{
+  return in;
+}
+
+gshort
+regress_test_short (gshort in)
+{
+  return in;
+}
+
+gushort
+regress_test_ushort (gushort in)
+{
+  return in;
+}
+
+gint
+regress_test_int (gint in)
+{
+  return in;
+}
+
+guint
+regress_test_uint (guint in)
+{
+  return in;
+}
+
+glong
+regress_test_long (glong in)
+{
+  return in;
+}
+
+gulong
+regress_test_ulong (gulong in)
+{
+  return in;
+}
+
+gssize
+regress_test_ssize (gssize in)
+{
+  return in;
+}
+
+gsize
+regress_test_size (gsize in)
+{
+  return in;
+}
+
+gfloat
+regress_test_float (gfloat in)
+{
+  return in;
+}
+
+gdouble
+regress_test_double (gdouble in)
+{
+  return in;
+}
+
+gunichar
+regress_test_unichar (gunichar in)
+{
+  return in;
+}
+
+time_t
+regress_test_timet (time_t in)
+{
+  return in;
+}
+
+GType
+regress_test_gtype (GType in)
+{
+  return in;
+}
+
+int
+regress_test_closure (GClosure *closure)
+{
+  GValue return_value = {0, };
+  int ret;
+
+  g_value_init (&return_value, G_TYPE_INT);
+
+  g_closure_invoke (closure,
+                    &return_value,
+                    0, NULL,
+                    NULL);
+
+  ret = g_value_get_int (&return_value);
+
+  g_value_unset(&return_value);
+
+  return ret;
+}
+
+int
+regress_test_closure_one_arg (GClosure *closure, int arg)
+{
+  GValue return_value = {0, };
+  GValue arguments[1];
+  int ret;
+
+  g_value_init (&return_value, G_TYPE_INT);
+
+  memset (&arguments[0], 0, sizeof (arguments));
+  g_value_init (&arguments[0], G_TYPE_INT);
+  g_value_set_int (&arguments[0], arg);
+
+  g_closure_invoke (closure,
+                    &return_value,
+                    1, arguments,
+                    NULL);
+
+  ret = g_value_get_int (&return_value);
+
+  g_value_unset(&return_value);
+  g_value_unset(&arguments[0]);
+
+  return ret;
+}
+
+/**
+ * regress_test_closure_variant:
+ * @closure: GClosure which takes one GVariant and returns a GVariant
+ * @arg: (transfer none): a GVariant passed as argument to @closure
+ *
+ * Return value: (transfer full): the return value of @closure
+ */
+GVariant*
+regress_test_closure_variant (GClosure *closure, const GVariant* arg)
+{
+  GValue return_value = {0, };
+  GValue arguments[1] = {{0,} };
+  GVariant *ret;
+
+  g_value_init (&return_value, G_TYPE_VARIANT);
+
+  g_value_init (&arguments[0], G_TYPE_VARIANT);
+  g_value_set_variant (&arguments[0], arg);
+
+  g_closure_invoke (closure,
+                    &return_value,
+                    1, arguments,
+                    NULL);
+
+  ret = g_value_get_variant (&return_value);
+
+  g_value_unset (&return_value);
+  g_value_unset (&arguments[0]);
+
+  return ret;
+}
+
+/**
+ * regress_test_value_arg:
+ * @v: (transfer none): a GValue expected to contain an int
+ *
+ * Return value: the int contained in the GValue.
+ */
+int
+regress_test_int_value_arg(const GValue *v)
+{
+  int i;
+
+  i = g_value_get_int (v);
+
+  return i;
+}
+
+static GValue value;
+/**
+ * regress_test_value_return:
+ * @i: an int
+ *
+ * Return value: (transfer none): the int wrapped in a GValue.
+ */
+const GValue *
+regress_test_value_return(int i)
+{
+  memset(&value, '\0', sizeof(GValue));
+
+  g_value_init (&value, G_TYPE_INT);
+  g_value_set_int (&value, i);
+
+  return &value;
+}
+
+/************************************************************************/
+/* foreign structs */
+
+/**
+ * regress_test_cairo_context_full_return:
+ * Returns: (transfer full):
+ */
+cairo_t *
+regress_test_cairo_context_full_return (void)
+{
+  cairo_surface_t *surface;
+  surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 10, 10);
+  return cairo_create (surface);
+}
+
+/**
+ * regress_test_cairo_context_none_in:
+ * @context: (transfer none):
+ */
+void
+regress_test_cairo_context_none_in (cairo_t *context)
+{
+  cairo_surface_t *surface = cairo_get_target (context);
+
+  g_assert (cairo_image_surface_get_format (surface) == CAIRO_FORMAT_ARGB32);
+  g_assert (cairo_image_surface_get_width (surface) == 10);
+  g_assert (cairo_image_surface_get_height (surface) == 10);
+}
+
+
+/**
+ * regress_test_cairo_surface_none_return:
+ * Returns: (transfer none):
+ */
+cairo_surface_t *
+regress_test_cairo_surface_none_return (void)
+{
+  static cairo_surface_t *surface;
+
+  if (surface == NULL) {
+    surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 10, 10);
+  }
+
+  return surface;
+}
+
+/**
+ * regress_test_cairo_surface_full_return:
+ * Returns: (transfer full):
+ */
+cairo_surface_t *
+regress_test_cairo_surface_full_return (void)
+{
+  return cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 10, 10);
+}
+
+/**
+ * regress_test_cairo_surface_none_in:
+ * @surface: (transfer none):
+ */
+void
+regress_test_cairo_surface_none_in (cairo_surface_t *surface)
+{
+  g_assert (cairo_image_surface_get_format (surface) == CAIRO_FORMAT_ARGB32);
+  g_assert (cairo_image_surface_get_width (surface) == 10);
+  g_assert (cairo_image_surface_get_height (surface) == 10);
+}
+
+/**
+ * regress_test_cairo_surface_full_out:
+ * @surface: (out) (transfer full):
+ */
+void
+regress_test_cairo_surface_full_out (cairo_surface_t **surface)
+{
+  *surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 10, 10);
+}
+
+/**
+ * regress_test_gvariant_i:
+ *
+ * Returns: (transfer none): New variant
+ */
+GVariant *
+regress_test_gvariant_i (void)
+{
+  return g_variant_new_int32 (1);
+}
+
+/**
+ * regress_test_gvariant_s:
+ *
+ * Returns: (transfer none): New variant
+ */
+GVariant *
+regress_test_gvariant_s (void)
+{
+  return g_variant_new_string ("one");
+}
+
+/**
+ * regress_test_gvariant_asv:
+ *
+ * Returns: (transfer none): New variant
+ */
+GVariant *
+regress_test_gvariant_asv (void)
+{
+  GVariantBuilder b;
+
+  g_variant_builder_init (&b, G_VARIANT_TYPE ("a{sv}"));
+
+  g_variant_builder_add (&b, "{sv}", "name", g_variant_new_string ("foo"));
+  g_variant_builder_add (&b, "{sv}", "timeout", g_variant_new_int32 (10));
+
+  return g_variant_builder_end (&b);
+}
+
+/**
+ * regress_test_gvariant_v:
+ *
+ * Returns: (transfer none): New variant
+ */
+GVariant *
+regress_test_gvariant_v (void)
+{
+  return g_variant_new_variant (g_variant_new_string ("contents"));
+}
+
+/**
+ * regress_test_gvariant_as:
+ *
+ * Returns: (transfer none): New variant
+ */
+GVariant *
+regress_test_gvariant_as (void)
+{
+  const char *as[] = { "one", "two", "three", NULL };
+
+  return g_variant_new_strv (as, -1);
+}
+
+/************************************************************************/
+/* utf8 */
+/* insert BLACK HEART SUIT to ensure UTF-8 doesn't get mangled */
+static const char utf8_const[]    = "const \xe2\x99\xa5 utf8";
+static const char utf8_nonconst[] = "nonconst \xe2\x99\xa5 utf8";
+
+/**
+ * regress_test_utf8_const_return:
+ * Return value: UTF-8 string
+ */
+const char *
+regress_test_utf8_const_return (void)
+{
+  /* transfer mode none */
+  return utf8_const;
+}
+
+/**
+ * regress_test_utf8_nonconst_return:
+ *
+ * Return value: (transfer full): UTF-8 string
+ */
+char *
+regress_test_utf8_nonconst_return (void)
+{
+  return g_strdup (utf8_nonconst);
+}
+
+/**
+ * regress_test_utf8_const_in:
+ *
+ */
+void
+regress_test_utf8_const_in (const char *in)
+{
+  /* transfer mode none */
+  g_assert (strcmp (in, utf8_const) == 0);
+}
+
+/**
+ * regress_test_utf8_out:
+ * @out: (out) (transfer full):
+ */
+void
+regress_test_utf8_out (char **out)
+{
+  /* out parameter, transfer mode full */
+  *out = g_strdup (utf8_nonconst);
+}
+
+/**
+ * regress_test_utf8_inout:
+ * @inout: (inout) (transfer full):
+ */
+void
+regress_test_utf8_inout (char **inout)
+{
+  /* inout parameter, transfer mode full */
+  g_assert (strcmp (*inout, utf8_const) == 0);
+  *inout = g_strdup (utf8_nonconst);
+}
+
+/**
+ * regress_test_filename_return:
+ *
+ * Return value: (element-type filename) (transfer full): list of strings
+ */
+GSList *
+regress_test_filename_return (void)
+{
+  GSList *filenames = NULL;
+  filenames = g_slist_prepend (filenames, g_filename_from_utf8("/etc/fstab", -1, NULL, NULL, NULL));
+  filenames = g_slist_prepend (filenames, g_filename_from_utf8("åäö", -1, NULL, NULL, NULL));
+  return filenames;
+}
+
+/* in arguments after out arguments */
+
+/**
+ * regress_test_int_out_utf8:
+ * @length: (out):
+ * @in:
+ */
+void
+regress_test_int_out_utf8 (int *length, const char *in)
+{
+    *length = g_utf8_strlen(in, -1);
+}
+
+
+/* multiple output arguments */
+
+/**
+ * regress_test_multi_double_args:
+ * @in:
+ * @one: (out):
+ * @two: (out):
+ */
+void
+regress_test_multi_double_args (gdouble in, gdouble *one, gdouble *two)
+{
+  *one = in * 2;
+  *two = in * 3;
+}
+
+/**
+ * regress_test_utf8_out_out:
+ * @out0: (out) (transfer full): a copy of "first"
+ * @out1: (out) (transfer full): a copy of "second"
+ */
+void
+regress_test_utf8_out_out (char **out0, char **out1)
+{
+  *out0 = g_strdup ("first");
+  *out1 = g_strdup ("second");
+}
+
+/**
+ * regress_test_utf8_out_nonconst_return:
+ * @out: (out) (transfer full): a copy of "second"
+ *
+ * Returns: (transfer full): a copy of "first"
+ */
+char *
+regress_test_utf8_out_nonconst_return (char **out)
+{
+  *out = g_strdup ("second");
+  return g_strdup ("first");
+}
+
+/**
+ * regress_test_utf8_null_in:
+ * @in: (allow-none):
+ */
+void
+regress_test_utf8_null_in (char *in)
+{
+  g_assert (in == NULL);
+}
+
+/**
+ * regress_test_utf8_null_out:
+ * @char_out: (allow-none) (out):
+ */
+void regress_test_utf8_null_out (char **char_out)
+{
+  *char_out = NULL;
+}
+
+
+/* non-basic-types */
+
+static const char *test_sequence[] = {"1", "2", "3"};
+
+/* array */
+
+/**
+ * regress_test_array_int_in:
+ * @n_ints:
+ * @ints: (array length=n_ints): List of ints
+ */
+int
+regress_test_array_int_in (int n_ints, int *ints)
+{
+  int i, sum = 0;
+  for (i = 0; i < n_ints; i++)
+    sum += ints[i];
+  return sum;
+}
+
+/**
+ * regress_test_array_int_out:
+ * @n_ints: (out): the length of @ints
+ * @ints: (out) (array length=n_ints) (transfer full): a list of 5 integers, from 0 to 4 in consecutive order
+ */
+void
+regress_test_array_int_out (int *n_ints, int **ints)
+{
+  int i;
+  *n_ints = 5;
+  *ints = g_malloc0(sizeof(**ints) * *n_ints);
+  for (i = 1; i < *n_ints; i++)
+    (*ints)[i] = (*ints)[i-1] + 1;
+}
+
+/**
+ * regress_test_array_int_inout:
+ * @n_ints: (inout): the length of @ints
+ * @ints: (inout) (array length=n_ints) (transfer full): a list of integers whose items will be increased by 1, except the first that will be dropped
+ */
+void
+regress_test_array_int_inout (int *n_ints, int **ints)
+{
+  int i;
+  int *new_ints;
+
+  if (0 < *n_ints)
+    {
+      *n_ints -= 1;
+      new_ints = g_malloc(sizeof(**ints) * *n_ints);
+      for (i = 0; i < *n_ints; i++)
+       new_ints[i] = (*ints)[i + 1] + 1;
+      *ints = new_ints;
+    }
+}
+
+/**
+ * regress_test_array_gint8_in:
+ * @n_ints:
+ * @ints: (array length=n_ints): List of ints
+ */
+int
+regress_test_array_gint8_in (int n_ints, gint8 *ints)
+{
+  int i, sum = 0;
+  for (i = 0; i < n_ints; i++)
+    sum += ints[i];
+  return sum;
+}
+
+/**
+ * regress_test_array_gint16_in:
+ * @n_ints:
+ * @ints: (array length=n_ints): List of ints
+ */
+int
+regress_test_array_gint16_in (int n_ints, gint16 *ints)
+{
+  int i, sum = 0;
+  for (i = 0; i < n_ints; i++)
+    sum += ints[i];
+  return sum;
+}
+
+/**
+ * regress_test_array_gint32_in:
+ * @n_ints:
+ * @ints: (array length=n_ints): List of ints
+ */
+gint32
+regress_test_array_gint32_in (int n_ints, gint32 *ints)
+{
+  int i;
+  gint32 sum = 0;
+  for (i = 0; i < n_ints; i++)
+    sum += ints[i];
+  return sum;
+}
+
+/**
+ * regress_test_array_gint64_in:
+ * @n_ints:
+ * @ints: (array length=n_ints): List of ints
+ */
+gint64
+regress_test_array_gint64_in (int n_ints, gint64 *ints)
+{
+  int i;
+  gint64 sum = 0;
+  for (i = 0; i < n_ints; i++)
+    sum += ints[i];
+  return sum;
+}
+
+/**
+ * regress_test_strv_in:
+ * @arr: (array zero-terminated=1) (transfer none):
+ */
+gboolean
+regress_test_strv_in (char **arr)
+{
+  if (g_strv_length (arr) != 3)
+    return FALSE;
+  if (strcmp (arr[0], "1") != 0)
+    return FALSE;
+  if (strcmp (arr[1], "2") != 0)
+    return FALSE;
+  if (strcmp (arr[2], "3") != 0)
+    return FALSE;
+  return TRUE;
+}
+
+/**
+ * regress_test_array_gtype_in:
+ * @n_types:
+ * @types: (array length=n_types): List of types
+ *
+ * Return value: (transfer full): string representation of provided types
+ * */
+char *
+regress_test_array_gtype_in (int n_types, GType *types)
+{
+  GString *string;
+  int i;
+
+  string = g_string_new ("[");
+  for (i = 0; i < n_types; i++)
+    {
+      g_string_append (string, g_type_name (types[i]));
+      g_string_append_c (string, ',');
+    }
+  g_string_append_c (string, ']');
+  return g_string_free (string, FALSE);
+}
+
+/**
+ * regress_test_strv_out:
+ *
+ * Returns: (transfer full):
+ */
+char **
+regress_test_strv_out (void)
+{
+  int i = 0;
+  int n = 6;
+  char **ret = g_new (char *, n);
+  ret[i++] = g_strdup ("thanks");
+  ret[i++] = g_strdup ("for");
+  ret[i++] = g_strdup ("all");
+  ret[i++] = g_strdup ("the");
+  ret[i++] = g_strdup ("fish");
+  ret[i++] = NULL;
+  g_assert (i == n);
+  return ret;
+}
+
+/**
+ * regress_test_strv_out_container:
+ *
+ * Return value: (array zero-terminated=1) (transfer container):
+ */
+char **
+regress_test_strv_out_container (void)
+{
+  char **ret = g_new (char *, 4);
+  ret[0] = "1";
+  ret[1] = "2";
+  ret[2] = "3";
+  ret[3] = NULL;
+  return ret;
+}
+
+/**
+ * regress_test_strv_outarg:
+ * @retp: (array zero-terminated=1) (out) (transfer container):
+ */
+void
+regress_test_strv_outarg (char ***retp)
+{
+  char **ret = g_new (char *, 4);
+  ret[0] = "1";
+  ret[1] = "2";
+  ret[2] = "3";
+  ret[3] = NULL;
+  *retp = ret;
+}
+
+/**
+ * regress_test_array_fixed_size_int_in:
+ * @ints: (array fixed-size=5): a list of 5 integers
+ *
+ * Returns: the sum of the items in @ints
+ */
+int
+regress_test_array_fixed_size_int_in (int *ints)
+{
+  int i, sum = 0;
+  for (i = 0; i < 5; i++)
+    sum += ints[i];
+  return sum;
+}
+
+/**
+ * regress_test_array_fixed_size_int_out:
+ * @ints: (out) (array fixed-size=5) (transfer full): a list of 5 integers ranging from 0 to 4
+ */
+void
+regress_test_array_fixed_size_int_out (int **ints)
+{
+  int i;
+  *ints = g_malloc0(sizeof(**ints) * 5);
+  for (i = 1; i < 5; i++)
+    (*ints)[i] = (*ints)[i-1] + 1;
+}
+
+/**
+ * regress_test_array_fixed_size_int_return:
+ * Returns: (array fixed-size=5) (transfer full): a list of 5 integers ranging from 0 to 4
+ */
+int *
+regress_test_array_fixed_size_int_return (void)
+{
+  int i, *ints;
+  ints = g_malloc0(sizeof(*ints) * 5);
+  for (i = 1; i < 5; i++)
+    ints[i] = ints[i-1] + 1;
+  return ints;
+}
+
+/**
+ * regress_test_strv_out_c:
+ *
+ * Returns: (transfer none):
+ */
+const char * const*
+regress_test_strv_out_c (void)
+{
+  static char **ret = NULL;
+
+  if (ret == NULL)
+    ret = regress_test_strv_out ();
+
+  return (const char * const *) ret;
+}
+
+/**
+ * regress_test_array_int_full_out:
+ * @len: length of the returned array.
+ * Returns: (array length=len) (transfer full): a new array of integers.
+ */
+int *
+regress_test_array_int_full_out(int *len)
+{
+  int *result, i;
+  *len = 5;
+  result = g_malloc0(sizeof(*result) * (*len));
+  for (i=1; i < (*len); i++)
+    result[i] = result[i-1] + 1;
+  return result;
+}
+
+/**
+ * regress_test_array_int_none_out:
+ * @len: length of the returned array.
+ * Returns: (array length=len) (transfer none): a static array of integers.
+ */
+int *
+regress_test_array_int_none_out(int *len)
+{
+  static int result[5] = { 1, 2, 3, 4, 5 };
+  *len = 5;
+  return result;
+}
+
+/**
+ * regress_test_array_int_null_in:
+ * @arr: (array length=len) (allow-none):
+ * @len: length
+ */
+void
+regress_test_array_int_null_in (int *arr, int len)
+{
+  g_assert (arr == NULL);
+}
+
+/**
+ * regress_test_array_int_null_out:
+ * @arr: (out) (array length=len) (allow-none):
+ * @len: (out) : length
+ */
+void
+regress_test_array_int_null_out (int **arr, int *len)
+{
+  *arr = NULL;
+  *len = 0;
+}
+
+/* interface */
+
+/************************************************************************/
+/* GList */
+
+static /*const*/ GList *
+regress_test_sequence_list()
+{
+    static GList *list = NULL;
+    if (!list) {
+        gsize i;
+        for (i = 0; i < G_N_ELEMENTS(test_sequence); ++i) {
+            list = g_list_prepend (list, (gpointer)test_sequence[i]);
+        }
+        list = g_list_reverse (list);
+    }
+    return list;
+}
+
+/**
+ * regress_test_glist_nothing_return:
+ *
+ * Return value: (element-type utf8) (transfer none):
+ */
+const GList *
+regress_test_glist_nothing_return (void)
+{
+  return regress_test_sequence_list ();
+}
+
+/**
+ * regress_test_glist_nothing_return2:
+ *
+ * Return value: (element-type utf8) (transfer none):
+ */
+GList *
+regress_test_glist_nothing_return2 (void)
+{
+  return regress_test_sequence_list ();
+}
+
+/**
+ * regress_test_glist_container_return:
+ *
+ * Return value: (element-type utf8) (transfer container):
+ */
+GList *
+regress_test_glist_container_return (void)
+{
+  return g_list_copy (regress_test_sequence_list ());
+}
+
+/**
+ * regress_test_glist_everything_return:
+ *
+ * Return value: (element-type utf8) (transfer full):
+ */
+GList *
+regress_test_glist_everything_return (void)
+{
+  GList *list;
+  GList *l;
+
+  list = g_list_copy (regress_test_sequence_list ());
+  for (l = list; l != NULL; l = l->next)
+      l->data = g_strdup (l->data);
+  return list;
+}
+
+static void
+regress_assert_test_sequence_list (const GList *in)
+{
+  const GList *l;
+  gsize i;
+
+  for (i = 0, l = in; l != NULL; ++i, l = l->next) {
+      g_assert (i < G_N_ELEMENTS(test_sequence));
+      g_assert (strcmp (l->data, test_sequence[i]) == 0);
+  }
+  g_assert (i == G_N_ELEMENTS(test_sequence));
+}
+
+/**
+ * regress_test_glist_nothing_in:
+ * @in: (element-type utf8):
+ */
+void
+regress_test_glist_nothing_in (const GList *in)
+{
+  regress_assert_test_sequence_list (in);
+}
+
+/**
+ * regress_test_glist_nothing_in2:
+ * @in: (element-type utf8):
+ */
+void
+regress_test_glist_nothing_in2 (GList *in)
+{
+  regress_assert_test_sequence_list (in);
+}
+
+/**
+ * regress_test_glist_null_in:
+ * @in: (element-type utf8) (allow-none):
+ */
+void
+regress_test_glist_null_in (GSList *in)
+{
+  g_assert (in == NULL);
+}
+
+/**
+ * regress_test_glist_null_out:
+ * @out_list: (out) (element-type utf8) (allow-none):
+ */
+void
+regress_test_glist_null_out (GSList **out_list)
+{
+  *out_list = NULL;
+}
+
+
+/************************************************************************/
+/* GSList */
+
+static /*const*/ GSList *
+regress_test_sequence_slist()
+{
+    static GSList *list = NULL;
+    if (!list) {
+        gsize i;
+        for (i = 0; i < G_N_ELEMENTS(test_sequence); ++i) {
+            list = g_slist_prepend (list, (gpointer)test_sequence[i]);
+        }
+        list = g_slist_reverse (list);
+    }
+    return list;
+}
+
+/**
+ * regress_test_gslist_nothing_return:
+ *
+ * Return value: (element-type utf8) (transfer none):
+ */
+const GSList *
+regress_test_gslist_nothing_return (void)
+{
+  return regress_test_sequence_slist ();
+}
+
+/**
+ * regress_test_gslist_nothing_return2:
+ *
+ * Return value: (element-type utf8) (transfer none):
+ */
+GSList *
+regress_test_gslist_nothing_return2 (void)
+{
+  return regress_test_sequence_slist ();
+}
+
+/**
+ * regress_test_gslist_container_return:
+ *
+ * Return value: (element-type utf8) (transfer container):
+ */
+GSList *
+regress_test_gslist_container_return (void)
+{
+  return g_slist_copy (regress_test_sequence_slist ());
+}
+
+/**
+ * regress_test_gslist_everything_return:
+ *
+ * Return value: (element-type utf8) (transfer full):
+ */
+GSList *
+regress_test_gslist_everything_return (void)
+{
+  GSList *list;
+  GSList *l;
+
+  list = g_slist_copy (regress_test_sequence_slist ());
+  for (l = list; l != NULL; l = l->next)
+      l->data = g_strdup (l->data);
+  return list;
+}
+
+static void
+regress_assert_test_sequence_slist (const GSList *in)
+{
+  const GSList *l;
+  gsize i;
+
+  for (i = 0, l = in; l != NULL; ++i, l = l->next) {
+      g_assert (i < G_N_ELEMENTS(test_sequence));
+      g_assert (strcmp (l->data, test_sequence[i]) == 0);
+  }
+  g_assert (i == G_N_ELEMENTS(test_sequence));
+}
+
+/**
+ * regress_test_gslist_nothing_in:
+ * @in: (element-type utf8):
+ */
+void
+regress_test_gslist_nothing_in (const GSList *in)
+{
+  regress_assert_test_sequence_slist (in);
+}
+
+/**
+ * regress_test_gslist_nothing_in2:
+ * @in: (element-type utf8):
+ */
+void
+regress_test_gslist_nothing_in2 (GSList *in)
+{
+  regress_assert_test_sequence_slist (in);
+}
+
+/**
+ * regress_test_gslist_null_in:
+ * @in: (element-type utf8) (allow-none):
+ */
+void
+regress_test_gslist_null_in (GSList *in)
+{
+  g_assert (in == NULL);
+}
+
+/**
+ * regress_test_gslist_null_out:
+ * @out_list: (out) (element-type utf8) (allow-none):
+ */
+void
+regress_test_gslist_null_out (GSList **out_list)
+{
+  *out_list = NULL;
+}
+
+/************************************************************************/
+/* GHash */
+
+static char *table_data[3][2] = {
+  { "foo", "bar" }, { "baz", "bat" }, { "qux", "quux" }
+};
+
+static GHashTable *
+regress_test_table_ghash_new_container()
+{
+  GHashTable *hash;
+  int i;
+  hash = g_hash_table_new(g_str_hash, g_str_equal);
+  for (i=0; i<3; i++)
+    g_hash_table_insert(hash, table_data[i][0], table_data[i][1]);
+  return hash;
+}
+
+static GHashTable *
+regress_test_table_ghash_new_full()
+{
+  GHashTable *hash;
+  int i;
+  hash = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
+  for (i=0; i<3; i++)
+    g_hash_table_insert(hash,
+                        g_strdup(table_data[i][0]),
+                        g_strdup(table_data[i][1]));
+  return hash;
+}
+
+static /*const*/ GHashTable *
+regress_test_table_ghash_const()
+{
+  static GHashTable *hash = NULL;
+  if (!hash) {
+    hash = regress_test_table_ghash_new_container();
+  }
+  return hash;
+}
+
+/**
+ * regress_test_ghash_null_return:
+ *
+ * Return value: (element-type utf8 utf8) (transfer none) (allow-none):
+ */
+const GHashTable *
+regress_test_ghash_null_return (void)
+{
+  return NULL;
+}
+
+/**
+ * regress_test_ghash_nothing_return:
+ *
+ * Return value: (element-type utf8 utf8) (transfer none):
+ */
+const GHashTable *
+regress_test_ghash_nothing_return (void)
+{
+  return regress_test_table_ghash_const ();
+}
+
+/**
+ * regress_test_ghash_nothing_return2:
+ *
+ * Return value: (element-type utf8 utf8) (transfer none):
+ */
+GHashTable *
+regress_test_ghash_nothing_return2 (void)
+{
+  return regress_test_table_ghash_const ();
+}
+
+static GValue *
+g_value_new (GType type)
+{
+  GValue *value = g_slice_new0(GValue);
+  g_value_init(value, type);
+  return value;
+}
+
+static void
+g_value_free (GValue *value)
+{
+  g_value_unset(value);
+  g_slice_free(GValue, value);
+}
+
+static const gchar *string_array[] = {
+  "first",
+  "second",
+  "third",
+  NULL
+};
+
+/**
+ * regress_test_ghash_gvalue_return:
+ *
+ * Return value: (element-type utf8 GValue) (transfer none):
+ */
+GHashTable *
+regress_test_ghash_gvalue_return (void)
+{
+  GHashTable *hash;
+  GValue *value;
+  hash = g_hash_table_new_full(g_str_hash, g_str_equal,
+                               g_free, (GDestroyNotify)g_value_free);
+
+  value = g_value_new(G_TYPE_INT);
+  g_value_set_int(value, 12);
+  g_hash_table_insert(hash, g_strdup("integer"), value);
+
+  value = g_value_new(G_TYPE_BOOLEAN);
+  g_value_set_boolean(value, TRUE);
+  g_hash_table_insert(hash, g_strdup("boolean"), value);
+
+  value = g_value_new(G_TYPE_STRING);
+  g_value_set_string(value, "some text");
+  g_hash_table_insert(hash, g_strdup("string"), value);
+
+  value = g_value_new(G_TYPE_STRV);
+  g_value_set_boxed(value, string_array);
+  g_hash_table_insert(hash, g_strdup("strings"), value);
+
+  return hash;
+}
+
+/**
+ * regress_test_ghash_gvalue_in:
+ * @hash: (element-type utf8 GValue): the hash table returned by
+ * regress_test_ghash_gvalue_return().
+ */
+void
+regress_test_ghash_gvalue_in (GHashTable *hash)
+{
+  GValue *value;
+  const gchar **strings;
+  int i;
+
+  g_assert(hash != NULL);
+
+  value = g_hash_table_lookup(hash, "integer");
+  g_assert(value != NULL);
+  g_assert(G_VALUE_HOLDS_INT(value));
+  g_assert(g_value_get_int(value) == 12);
+
+  value = g_hash_table_lookup(hash, "boolean");
+  g_assert(value != NULL);
+  g_assert(G_VALUE_HOLDS_BOOLEAN(value));
+  g_assert(g_value_get_boolean(value) == TRUE);
+
+  value = g_hash_table_lookup(hash, "string");
+  g_assert(value != NULL);
+  g_assert(G_VALUE_HOLDS_STRING(value));
+  g_assert(strcmp(g_value_get_string(value), "some text") == 0);
+
+  value = g_hash_table_lookup(hash, "strings");
+  g_assert(value != NULL);
+  g_assert(G_VALUE_HOLDS(value, G_TYPE_STRV));
+  strings = g_value_get_boxed(value);
+  g_assert(strings != NULL);
+  for (i = 0; string_array[i] != NULL; i++)
+    g_assert(strcmp(strings[i], string_array[i]) == 0);
+}
+
+/**
+ * regress_test_ghash_container_return:
+ *
+ * Return value: (element-type utf8 utf8) (transfer container):
+ */
+GHashTable *
+regress_test_ghash_container_return (void)
+{
+  return regress_test_table_ghash_new_container ();
+}
+
+/**
+ * regress_test_ghash_everything_return:
+ *
+ * Return value: (element-type utf8 utf8) (transfer full):
+ */
+GHashTable *
+regress_test_ghash_everything_return (void)
+{
+  return regress_test_table_ghash_new_full ();
+}
+
+static void
+assert_test_table_ghash (const GHashTable *in)
+{
+  GHashTable *h = regress_test_table_ghash_const();
+  GHashTableIter iter;
+  gpointer key, value;
+
+  g_assert(g_hash_table_size(h) ==
+           g_hash_table_size((GHashTable*)in));
+
+  g_hash_table_iter_init(&iter, (GHashTable*)in);
+  while (g_hash_table_iter_next (&iter, &key, &value))
+    g_assert( strcmp(g_hash_table_lookup(h, (char*)key), (char*)value) == 0);
+}
+
+/**
+ * regress_test_ghash_null_in:
+ * @in: (element-type utf8 utf8) (allow-none):
+ */
+void
+regress_test_ghash_null_in (const GHashTable *in)
+{
+  g_assert (in == NULL);
+}
+
+/**
+ * regress_test_ghash_null_out:
+ * @out: (element-type utf8 utf8) (allow-none) (out):
+ */
+void
+regress_test_ghash_null_out (const GHashTable **out)
+{
+  *out = NULL;
+}
+
+/**
+ * regress_test_ghash_nothing_in:
+ * @in: (element-type utf8 utf8):
+ */
+void
+regress_test_ghash_nothing_in (const GHashTable *in)
+{
+  assert_test_table_ghash (in);
+}
+
+/**
+ * regress_test_ghash_nothing_in2:
+ * @in: (element-type utf8 utf8):
+ */
+void
+regress_test_ghash_nothing_in2 (GHashTable *in)
+{
+  assert_test_table_ghash (in);
+}
+
+/* Nested collection types */
+
+/**
+ * regress_test_ghash_nested_everything_return:
+ *
+ * Specify nested parameterized types directly with the (type ) annotation.
+ *
+ * Return value: (type GLib.HashTable<utf8,GLib.HashTable<utf8,utf8>>) (transfer full):
+ */
+GHashTable *
+regress_test_ghash_nested_everything_return (void)
+{
+  GHashTable *hash;
+  hash = g_hash_table_new_full(g_str_hash, g_str_equal, g_free,
+                               (void (*) (gpointer)) g_hash_table_destroy);
+  g_hash_table_insert(hash, g_strdup("wibble"), regress_test_table_ghash_new_full());
+  return hash;
+}
+
+/**
+ * regress_test_ghash_nested_everything_return2:
+ *
+ * Another way of specifying nested parameterized types: using the
+ * element-type annotation.
+ *
+ * Return value: (element-type utf8 GLib.HashTable<utf8,utf8>) (transfer full):
+ */
+GHashTable *
+regress_test_ghash_nested_everything_return2 (void)
+{
+  return regress_test_ghash_nested_everything_return();
+}
+
+/************************************************************************/
+
+/**
+ * regress_test_garray_container_return:
+ *
+ * Returns: (transfer container) (type GLib.PtrArray) (element-type utf8):
+ */
+GPtrArray *
+regress_test_garray_container_return (void)
+{
+  GPtrArray *array;
+
+  array = g_ptr_array_new_with_free_func (g_free);
+  g_ptr_array_add (array, g_strdup ("regress"));
+
+  return array;
+}
+
+/**
+ * regress_test_garray_full_return:
+ *
+ * Returns: (transfer full) (type GLib.PtrArray) (element-type utf8):
+ */
+GPtrArray *
+regress_test_garray_full_return (void)
+{
+  GPtrArray *array;
+
+  array = g_ptr_array_new ();
+  g_ptr_array_add (array, g_strdup ("regress"));
+
+  return array;
+}
+
+/************************************************************************/
+
+/* error? */
+
+/* enums / flags */
+
+/**
+ * NUM_REGRESS_FOO: (skip)
+ *
+ * num of elements in RegressFoo
+ */
+
+GType
+regress_test_enum_get_type (void)
+{
+    static GType etype = 0;
+    if (G_UNLIKELY(etype == 0)) {
+        static const GEnumValue values[] = {
+            { REGRESS_TEST_VALUE1, "REGRESS_TEST_VALUE1", "value1" },
+            { REGRESS_TEST_VALUE2, "REGRESS_TEST_VALUE2", "value2" },
+            { REGRESS_TEST_VALUE3, "REGRESS_TEST_VALUE3", "value3" },
+            { REGRESS_TEST_VALUE4, "REGRESS_TEST_VALUE4", "value4" },
+            { 0, NULL, NULL }
+        };
+        etype = g_enum_register_static (g_intern_static_string ("RegressTestEnum"), values);
+    }
+
+    return etype;
+}
+
+GType
+regress_test_enum_unsigned_get_type (void)
+{
+    static GType etype = 0;
+    if (G_UNLIKELY(etype == 0)) {
+        static const GEnumValue values[] = {
+            { REGRESS_TEST_UNSIGNED_VALUE1, "REGRESS_TEST_UNSIGNED_VALUE1", "value1" },
+            { REGRESS_TEST_UNSIGNED_VALUE2, "REGRESS_TEST_UNSIGNED_VALUE2", "value2" },
+            { 0, NULL, NULL }
+        };
+        etype = g_enum_register_static (g_intern_static_string ("RegressTestEnumUnsigned"), values);
+    }
+
+    return etype;
+}
+
+GType
+regress_test_flags_get_type (void)
+{
+    static GType etype = 0;
+    if (G_UNLIKELY(etype == 0)) {
+        static const GFlagsValue values[] = {
+            { REGRESS_TEST_FLAG1, "TEST_FLAG1", "flag1" },
+            { REGRESS_TEST_FLAG2, "TEST_FLAG2", "flag2" },
+            { REGRESS_TEST_FLAG3, "TEST_FLAG3", "flag3" },
+            { 0, NULL, NULL }
+        };
+        etype = g_flags_register_static (g_intern_static_string ("RegressTestFlags"), values);
+    }
+
+    return etype;
+}
+
+const gchar *
+regress_test_enum_param(RegressTestEnum e)
+{
+  GEnumValue *ev;
+  GEnumClass *ec;
+
+  ec = g_type_class_ref (regress_test_enum_get_type ());
+  ev = g_enum_get_value (ec, e);
+  g_type_class_unref (ec);
+
+  return ev->value_nick;
+}
+
+const gchar *
+regress_test_unsigned_enum_param(RegressTestEnumUnsigned e)
+{
+  GEnumValue *ev;
+  GEnumClass *ec;
+
+  ec = g_type_class_ref (regress_test_enum_unsigned_get_type ());
+  ev = g_enum_get_value (ec, e);
+  g_type_class_unref (ec);
+
+  return ev->value_nick;
+}
+
+/**
+ * regress_global_get_flags_out:
+ * @v: (out): A flags value
+ *
+ */
+void
+regress_global_get_flags_out (RegressTestFlags *v)
+{
+  *v = REGRESS_TEST_FLAG1 | REGRESS_TEST_FLAG3;
+}
+
+/* structures */
+
+/**
+ * regress_test_struct_a_clone:
+ * @a: the structure
+ * @a_out: (out caller-allocates): the cloned structure
+ *
+ * Make a copy of a RegressTestStructA
+ */
+void
+regress_test_struct_a_clone (RegressTestStructA *a,
+                    RegressTestStructA *a_out)
+{
+  *a_out = *a;
+}
+
+/**
+ * regress_test_struct_b_clone:
+ * @b: the structure
+ * @b_out: (out): the cloned structure
+ *
+ * Make a copy of a RegressTestStructB
+ */
+void
+regress_test_struct_b_clone (RegressTestStructB *b,
+                    RegressTestStructB *b_out)
+{
+  *b_out = *b;
+}
+
+/* plain-old-data boxed types */
+
+RegressTestSimpleBoxedA *
+regress_test_simple_boxed_a_copy (RegressTestSimpleBoxedA *a)
+{
+  RegressTestSimpleBoxedA *new_a = g_slice_new (RegressTestSimpleBoxedA);
+
+  *new_a = *a;
+
+  return new_a;
+}
+
+static void
+regress_test_simple_boxed_a_free (RegressTestSimpleBoxedA *a)
+{
+  g_slice_free (RegressTestSimpleBoxedA, a);
+}
+
+GType
+regress_test_simple_boxed_a_get_gtype (void)
+{
+  static GType our_type = 0;
+
+  if (our_type == 0)
+    our_type = g_boxed_type_register_static (g_intern_static_string ("RegressTestSimpleBoxedA"),
+                                            (GBoxedCopyFunc)regress_test_simple_boxed_a_copy,
+                                            (GBoxedFreeFunc)regress_test_simple_boxed_a_free);
+  return our_type;
+}
+
+RegressTestSimpleBoxedB *
+regress_test_simple_boxed_b_copy (RegressTestSimpleBoxedB *b)
+{
+  RegressTestSimpleBoxedB *new_b = g_slice_new (RegressTestSimpleBoxedB);
+
+  *new_b = *b;
+
+  return new_b;
+}
+
+gboolean
+regress_test_simple_boxed_a_equals (RegressTestSimpleBoxedA *a,
+                           RegressTestSimpleBoxedA *other_a)
+{
+  return (a->some_int == other_a->some_int &&
+         a->some_int8 == other_a->some_int8 &&
+         a->some_double == other_a->some_double);
+}
+
+const RegressTestSimpleBoxedA*
+regress_test_simple_boxed_a_const_return (void)
+{
+  static RegressTestSimpleBoxedA simple_a = {
+    5, 6, 7.0
+  };
+
+  return &simple_a;
+}
+
+static void
+regress_test_simple_boxed_b_free (RegressTestSimpleBoxedB *a)
+{
+  g_slice_free (RegressTestSimpleBoxedB, a);
+}
+
+GType
+regress_test_simple_boxed_b_get_type (void)
+{
+  static GType our_type = 0;
+
+  if (our_type == 0)
+    our_type = g_boxed_type_register_static (g_intern_static_string ("RegressTestSimpleBoxedB"),
+                                            (GBoxedCopyFunc)regress_test_simple_boxed_b_copy,
+                                            (GBoxedFreeFunc)regress_test_simple_boxed_b_free);
+  return our_type;
+}
+
+/* opaque boxed */
+
+struct _RegressTestBoxedPrivate
+{
+  guint magic;
+};
+
+/**
+ * regress_test_boxed_new:
+ *
+ * Returns: (transfer full):
+ */
+RegressTestBoxed *
+regress_test_boxed_new (void)
+{
+  RegressTestBoxed *boxed = g_slice_new0(RegressTestBoxed);
+  boxed->priv = g_slice_new0(RegressTestBoxedPrivate);
+  boxed->priv->magic = 0xdeadbeef;
+
+  return boxed;
+}
+
+/**
+ * regress_test_boxed_new_alternative_constructor1:
+ *
+ * Returns: (transfer full):
+ */
+RegressTestBoxed *
+regress_test_boxed_new_alternative_constructor1 (int i)
+{
+  RegressTestBoxed *boxed = g_slice_new0(RegressTestBoxed);
+  boxed->priv = g_slice_new0(RegressTestBoxedPrivate);
+  boxed->priv->magic = 0xdeadbeef;
+  boxed->some_int8 = i;
+
+  return boxed;
+}
+
+/**
+ * regress_test_boxed_new_alternative_constructor2:
+ *
+ * Returns: (transfer full):
+ */
+RegressTestBoxed *
+regress_test_boxed_new_alternative_constructor2 (int i, int j)
+{
+  RegressTestBoxed *boxed = g_slice_new0(RegressTestBoxed);
+  boxed->priv = g_slice_new0(RegressTestBoxedPrivate);
+  boxed->priv->magic = 0xdeadbeef;
+  boxed->some_int8 = i + j;
+
+  return boxed;
+}
+
+/**
+ * regress_test_boxed_new_alternative_constructor3:
+ *
+ * Returns: (transfer full):
+ */
+RegressTestBoxed *
+regress_test_boxed_new_alternative_constructor3 (char *s)
+{
+  RegressTestBoxed *boxed = g_slice_new0(RegressTestBoxed);
+  boxed->priv = g_slice_new0(RegressTestBoxedPrivate);
+  boxed->priv->magic = 0xdeadbeef;
+  boxed->some_int8 = atoi(s);
+
+  return boxed;
+}
+
+/**
+ * regress_test_boxed_copy:
+ *
+ * Returns: (transfer full):
+ */
+RegressTestBoxed *
+regress_test_boxed_copy (RegressTestBoxed *boxed)
+{
+  RegressTestBoxed *new_boxed = regress_test_boxed_new();
+  RegressTestBoxedPrivate *save;
+
+  save = new_boxed->priv;
+  *new_boxed = *boxed;
+  new_boxed->priv = save;
+
+  return new_boxed;
+}
+
+gboolean
+regress_test_boxed_equals (RegressTestBoxed *boxed,
+                  RegressTestBoxed *other)
+{
+  return (other->some_int8 == boxed->some_int8 &&
+         regress_test_simple_boxed_a_equals(&other->nested_a, &boxed->nested_a));
+}
+
+static void
+regress_test_boxed_free (RegressTestBoxed *boxed)
+{
+  g_assert (boxed->priv->magic == 0xdeadbeef);
+
+  g_slice_free (RegressTestBoxedPrivate, boxed->priv);
+  g_slice_free (RegressTestBoxed, boxed);
+}
+
+GType
+regress_test_boxed_get_type (void)
+{
+  static GType our_type = 0;
+
+  if (our_type == 0)
+    our_type = g_boxed_type_register_static (g_intern_static_string ("RegressTestBoxed"),
+                                            (GBoxedCopyFunc)regress_test_boxed_copy,
+                                            (GBoxedFreeFunc)regress_test_boxed_free);
+  return our_type;
+}
+
+RegressTestBoxedB *
+regress_test_boxed_b_new (gint8 some_int8, glong some_long)
+{
+  RegressTestBoxedB *boxed;
+
+  boxed = g_slice_new (RegressTestBoxedB);
+  boxed->some_int8 = some_int8;
+  boxed->some_long = some_long;
+
+  return boxed;
+}
+
+RegressTestBoxedB *
+regress_test_boxed_b_copy (RegressTestBoxedB *boxed)
+{
+  return regress_test_boxed_b_new (boxed->some_int8, boxed->some_long);
+}
+
+static void
+regress_test_boxed_b_free (RegressTestBoxedB *boxed)
+{
+  g_slice_free (RegressTestBoxedB, boxed);
+}
+
+G_DEFINE_BOXED_TYPE(RegressTestBoxedB,
+                    regress_test_boxed_b,
+                    regress_test_boxed_b_copy,
+                    regress_test_boxed_b_free);
+
+G_DEFINE_TYPE(RegressTestObj, regress_test_obj, G_TYPE_OBJECT);
+
+enum
+{
+  PROP_TEST_OBJ_BARE = 1,
+  PROP_TEST_OBJ_BOXED,
+  PROP_TEST_OBJ_HASH_TABLE,
+  PROP_TEST_OBJ_LIST,
+  PROP_TEST_OBJ_HASH_TABLE_OLD,
+  PROP_TEST_OBJ_LIST_OLD,
+  PROP_TEST_OBJ_INT,
+  PROP_TEST_OBJ_FLOAT,
+  PROP_TEST_OBJ_DOUBLE,
+  PROP_TEST_OBJ_STRING
+};
+
+static void
+regress_test_obj_set_property (GObject      *object,
+                       guint         property_id,
+                       const GValue *value,
+                       GParamSpec   *pspec)
+{
+  RegressTestObj *self = REGRESS_TEST_OBJECT (object);
+  GList *list;
+
+  switch (property_id)
+    {
+    case PROP_TEST_OBJ_BARE:
+      regress_test_obj_set_bare (self, g_value_get_object (value));
+      break;
+
+    case PROP_TEST_OBJ_BOXED:
+      if (self->boxed)
+        regress_test_boxed_free (self->boxed);
+      self->boxed = g_value_dup_boxed (value);
+      break;
+
+    case PROP_TEST_OBJ_HASH_TABLE:
+    case PROP_TEST_OBJ_HASH_TABLE_OLD:
+      if (self->hash_table)
+        g_hash_table_unref (self->hash_table);
+      self->hash_table = g_hash_table_ref (g_value_get_boxed (value));
+      break;
+
+    case PROP_TEST_OBJ_LIST:
+    case PROP_TEST_OBJ_LIST_OLD:
+      if (self->list != NULL)
+        {
+          for (list = self->list; list != NULL; list = g_list_next (list))
+            g_free (list->data);
+          g_list_free (self->list);
+        }
+      self->list = NULL;
+      for (list = g_value_get_pointer (value); list != NULL; list = g_list_next (list))
+        self->list = g_list_append (self->list, g_strdup (list->data));
+      break;
+
+    case PROP_TEST_OBJ_INT:
+      self->some_int8 = g_value_get_int (value);
+      break;
+
+    case PROP_TEST_OBJ_FLOAT:
+      self->some_float = g_value_get_float (value);
+      break;
+
+    case PROP_TEST_OBJ_DOUBLE:
+      self->some_double = g_value_get_double (value);
+      break;
+
+    case PROP_TEST_OBJ_STRING:
+      self->string = g_value_dup_string (value);
+      break;
+
+    default:
+      /* We don't have any other property... */
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+      break;
+    }
+}
+
+static void
+regress_test_obj_get_property (GObject    *object,
+                        guint       property_id,
+                        GValue     *value,
+                        GParamSpec *pspec)
+{
+  RegressTestObj *self = REGRESS_TEST_OBJECT (object);
+
+  switch (property_id)
+    {
+    case PROP_TEST_OBJ_BARE:
+      g_value_set_object (value, self->bare);
+      break;
+
+    case PROP_TEST_OBJ_BOXED:
+      g_value_set_boxed (value, self->boxed);
+      break;
+
+    case PROP_TEST_OBJ_HASH_TABLE:
+    case PROP_TEST_OBJ_HASH_TABLE_OLD:
+      if (self->hash_table != NULL)
+        g_hash_table_ref (self->hash_table);
+      g_value_set_boxed (value, self->hash_table);
+      break;
+
+    case PROP_TEST_OBJ_LIST:
+    case PROP_TEST_OBJ_LIST_OLD:
+      g_value_set_pointer (value, self->list);
+      break;
+
+    case PROP_TEST_OBJ_INT:
+      g_value_set_int (value, self->some_int8);
+      break;
+
+    case PROP_TEST_OBJ_FLOAT:
+      g_value_set_float (value, self->some_float);
+      break;
+
+    case PROP_TEST_OBJ_DOUBLE:
+      g_value_set_double (value, self->some_double);
+      break;
+
+    case PROP_TEST_OBJ_STRING:
+      g_value_set_string (value, self->string);
+      break;
+
+    default:
+      /* We don't have any other property... */
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+      break;
+    }
+}
+
+static void
+regress_test_obj_dispose (GObject *gobject)
+{
+  RegressTestObj *self = REGRESS_TEST_OBJECT (gobject);
+
+  if (self->bare)
+    {
+      g_object_unref (self->bare);
+
+      self->bare = NULL;
+    }
+
+  if (self->boxed)
+    {
+      regress_test_boxed_free (self->boxed);
+      self->boxed = NULL;
+    }
+
+  /* Chain up to the parent class */
+  G_OBJECT_CLASS (regress_test_obj_parent_class)->dispose (gobject);
+}
+
+static int
+regress_test_obj_default_matrix (RegressTestObj *obj, const char *somestr)
+{
+  return 42;
+}
+
+enum {
+  REGRESS_TEST_OBJ_SIGNAL_SIG_NEW_WITH_ARRAY_PROP,
+  REGRESS_TEST_OBJ_SIGNAL_SIG_WITH_HASH_PROP,
+  REGRESS_TEST_OBJ_SIGNAL_SIG_WITH_STRV,
+  REGRESS_TEST_OBJ_SIGNAL_SIG_WITH_OBJ,
+  REGRESS_TEST_OBJ_SIGNAL_FIRST,
+  REGRESS_TEST_OBJ_SIGNAL_CLEANUP,
+  REGRESS_TEST_OBJ_SIGNAL_ALL,
+  N_REGRESS_TEST_OBJ_SIGNALS
+};
+
+static guint regress_test_obj_signals[N_REGRESS_TEST_OBJ_SIGNALS] = { 0 };
+
+static void
+regress_test_obj_class_init (RegressTestObjClass *klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+  GParamSpec *pspec;
+  GType param_types[1];
+
+  klass->test_signal =
+    g_signal_newv ("test",
+                   G_TYPE_FROM_CLASS (gobject_class),
+                   G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS,
+                   NULL /* closure */,
+                   NULL /* accumulator */,
+                   NULL /* accumulator data */,
+                   g_cclosure_marshal_VOID__VOID,
+                   G_TYPE_NONE /* return_type */,
+                   0     /* n_params */,
+                   NULL  /* param_types */);
+
+  param_types[0] = regress_test_simple_boxed_a_get_gtype() | G_SIGNAL_TYPE_STATIC_SCOPE;
+  klass->test_signal_with_static_scope_arg =
+    g_signal_newv ("test-with-static-scope-arg",
+                   G_TYPE_FROM_CLASS (gobject_class),
+                   G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS,
+                   NULL /* closure */,
+                   NULL /* accumulator */,
+                   NULL /* accumulator data */,
+                   g_cclosure_marshal_VOID__BOXED,
+                   G_TYPE_NONE /* return_type */,
+                   1     /* n_params */,
+                   param_types);
+
+  /**
+   * RegressTestObj::sig-with-array-prop:
+   * @self: an object
+   * @arr: (type GArray) (element-type uint): numbers
+   *
+   * This test signal is like TelepathyGlib's
+   *  TpChannel:: group-members-changed-detailed:
+   */
+  regress_test_obj_signals[REGRESS_TEST_OBJ_SIGNAL_SIG_NEW_WITH_ARRAY_PROP] =
+    g_signal_new ("sig-with-array-prop",
+                 G_TYPE_FROM_CLASS (gobject_class),
+                 G_SIGNAL_RUN_LAST,
+                 0,
+                 NULL,
+                 NULL,
+                 g_cclosure_marshal_VOID__BOXED,
+                 G_TYPE_NONE,
+                 1,
+                 G_TYPE_ARRAY);
+
+  /**
+   * RegressTestObj::sig-with-hash-prop:
+   * @self: an object
+   * @hash: (element-type utf8 GObject.Value):
+   *
+   * This test signal is like TelepathyGlib's
+   *  TpAccount::status-changed
+   */
+  regress_test_obj_signals[REGRESS_TEST_OBJ_SIGNAL_SIG_WITH_HASH_PROP] =
+    g_signal_new ("sig-with-hash-prop",
+                 G_TYPE_FROM_CLASS (gobject_class),
+                 G_SIGNAL_RUN_LAST,
+                 0,
+                 NULL,
+                 NULL,
+                 g_cclosure_marshal_VOID__BOXED,
+                 G_TYPE_NONE,
+                 1,
+                 G_TYPE_HASH_TABLE);
+
+  /**
+   * RegressTestObj::sig-with-strv:
+   * @self: an object
+   * @strs: strings
+   *
+   * Test GStrv as a param.
+   */
+  regress_test_obj_signals[REGRESS_TEST_OBJ_SIGNAL_SIG_WITH_STRV] =
+    g_signal_new ("sig-with-strv",
+                 G_TYPE_FROM_CLASS (gobject_class),
+                 G_SIGNAL_RUN_LAST,
+                 0,
+                 NULL,
+                 NULL,
+                 g_cclosure_marshal_VOID__BOXED,
+                 G_TYPE_NONE,
+                 1,
+                 G_TYPE_STRV);
+
+   /**
+   * RegressTestObj::sig-with-obj:
+   * @self: an object
+   * @obj: (transfer none): A newly created RegressTestObj
+   *
+   * Test transfer none GObject as a param (tests refcounting).
+   * Use with regress_test_obj_emit_sig_with_obj
+   */
+  regress_test_obj_signals[REGRESS_TEST_OBJ_SIGNAL_SIG_WITH_OBJ] =
+    g_signal_new ("sig-with-obj",
+                 G_TYPE_FROM_CLASS (gobject_class),
+                 G_SIGNAL_RUN_LAST,
+                 0,
+                 NULL,
+                 NULL,
+                 g_cclosure_marshal_VOID__OBJECT,
+                 G_TYPE_NONE,
+                 1,
+                 G_TYPE_OBJECT);
+
+  regress_test_obj_signals[REGRESS_TEST_OBJ_SIGNAL_FIRST] =
+    g_signal_new ("first",
+                 G_TYPE_FROM_CLASS (gobject_class),
+                 G_SIGNAL_RUN_FIRST,
+                 0,
+                 NULL,
+                 NULL,
+                 g_cclosure_marshal_VOID__VOID,
+                 G_TYPE_NONE,
+                  0);
+
+    regress_test_obj_signals[REGRESS_TEST_OBJ_SIGNAL_CLEANUP] =
+    g_signal_new ("cleanup",
+                 G_TYPE_FROM_CLASS (gobject_class),
+                 G_SIGNAL_RUN_CLEANUP,
+                 0,
+                 NULL,
+                 NULL,
+                 g_cclosure_marshal_VOID__VOID,
+                 G_TYPE_NONE,
+                  0);
+
+    regress_test_obj_signals[REGRESS_TEST_OBJ_SIGNAL_ALL] =
+    g_signal_new ("all",
+                 G_TYPE_FROM_CLASS (gobject_class),
+                 G_SIGNAL_RUN_FIRST | G_SIGNAL_NO_RECURSE | G_SIGNAL_DETAILED | G_SIGNAL_ACTION | G_SIGNAL_NO_HOOKS,
+                 0,
+                 NULL,
+                 NULL,
+                 g_cclosure_marshal_VOID__VOID,
+                 G_TYPE_NONE,
+                  0);
+
+  gobject_class->set_property = regress_test_obj_set_property;
+  gobject_class->get_property = regress_test_obj_get_property;
+  gobject_class->dispose = regress_test_obj_dispose;
+
+  pspec = g_param_spec_object ("bare",
+                               "Bare property",
+                               "A contained object",
+                               G_TYPE_OBJECT,
+                               G_PARAM_READWRITE);
+  g_object_class_install_property (gobject_class,
+                                   PROP_TEST_OBJ_BARE,
+                                   pspec);
+
+  pspec = g_param_spec_boxed ("boxed",
+                              "Boxed property",
+                              "A contained boxed struct",
+                              REGRESS_TEST_TYPE_BOXED,
+                              G_PARAM_READWRITE);
+  g_object_class_install_property (gobject_class,
+                                   PROP_TEST_OBJ_BOXED,
+                                   pspec);
+
+  /**
+   * RegressTestObj:hash-table:
+   *
+   * Type: GLib.HashTable(utf8,gint8)
+   * Transfer: container
+   */
+  pspec = g_param_spec_boxed ("hash-table",
+                              "GHashTable property",
+                              "A contained GHashTable",
+                              G_TYPE_HASH_TABLE,
+                              G_PARAM_READWRITE);
+  g_object_class_install_property (gobject_class,
+                                   PROP_TEST_OBJ_HASH_TABLE,
+                                   pspec);
+
+  /**
+   * RegressTestObj:list:
+   *
+   * Type: GLib.List(utf8)
+   * Transfer: none
+   */
+  pspec = g_param_spec_pointer ("list",
+                                "GList property",
+                                "A contained GList",
+                                G_PARAM_READWRITE);
+  g_object_class_install_property (gobject_class,
+                                   PROP_TEST_OBJ_LIST,
+                                   pspec);
+
+  /**
+   * RegressTestObj:hash-table-old:
+   *
+   * Type: GLib.HashTable<utf8,gint8>
+   * Transfer: container
+   */
+  pspec = g_param_spec_boxed ("hash-table-old",
+                              "GHashTable property with <>",
+                              "A contained GHashTable with <>",
+                              G_TYPE_HASH_TABLE,
+                              G_PARAM_READWRITE);
+  g_object_class_install_property (gobject_class,
+                                   PROP_TEST_OBJ_HASH_TABLE_OLD,
+                                   pspec);
+
+  /**
+   * RegressTestObj:list-old:
+   *
+   * Type: GLib.List<utf8>
+   * Transfer: none
+   */
+  pspec = g_param_spec_pointer ("list-old",
+                                "GList property with ()",
+                                "A contained GList with <>",
+                                G_PARAM_READWRITE);
+  g_object_class_install_property (gobject_class,
+                                   PROP_TEST_OBJ_LIST_OLD,
+                                   pspec);
+
+
+
+  /**
+   * TestObj:int:
+   */
+  pspec = g_param_spec_int ("int",
+                            "int property",
+                            "A contained int",
+                            G_MININT,
+                            G_MAXINT,
+                            0,
+                            G_PARAM_READWRITE);
+  g_object_class_install_property (gobject_class,
+                                   PROP_TEST_OBJ_INT,
+                                   pspec);
+
+  /**
+   * TestObj:float:
+   */
+  pspec = g_param_spec_float ("float",
+                              "float property",
+                              "A contained float",
+                              G_MINFLOAT,
+                              G_MAXFLOAT,
+                              1.0f,
+                              G_PARAM_READWRITE);
+  g_object_class_install_property (gobject_class,
+                                   PROP_TEST_OBJ_FLOAT,
+                                   pspec);
+
+  /**
+   * TestObj:double:
+   */
+  pspec = g_param_spec_double ("double",
+                               "double property",
+                               "A contained double",
+                               G_MINDOUBLE,
+                               G_MAXDOUBLE,
+                               1.0f,
+                               G_PARAM_READWRITE);
+  g_object_class_install_property (gobject_class,
+                                   PROP_TEST_OBJ_DOUBLE,
+                                   pspec);
+
+  /**
+   * TestObj:string:
+   */
+  pspec = g_param_spec_string ("string",
+                               "string property",
+                               "A contained string",
+                               NULL,
+                               G_PARAM_READWRITE);
+  g_object_class_install_property (gobject_class,
+                                   PROP_TEST_OBJ_STRING,
+                                   pspec);
+
+
+  klass->matrix = regress_test_obj_default_matrix;
+}
+
+static void
+regress_test_obj_init (RegressTestObj *obj)
+{
+  obj->bare = NULL;
+  obj->boxed = NULL;
+  obj->hash_table = NULL;
+}
+
+/**
+ * regress_test_obj_new: (constructor)
+ * @obj: A #RegressTestObj
+ */
+RegressTestObj *
+regress_test_obj_new (RegressTestObj *obj)
+{
+  return g_object_new (REGRESS_TEST_TYPE_OBJ, NULL);
+}
+
+/**
+ * regress_constructor: (constructor)
+ *
+ */
+RegressTestObj *
+regress_constructor (void)
+{
+  return g_object_new (REGRESS_TEST_TYPE_OBJ, NULL);
+}
+
+/**
+ * regress_test_obj_new_from_file:
+ */
+RegressTestObj *
+regress_test_obj_new_from_file (const char *x, GError **error)
+{
+  return g_object_new (REGRESS_TEST_TYPE_OBJ, NULL);
+}
+
+/**
+ * regress_test_obj_set_bare:
+ * @bare: (allow-none):
+ */
+void
+regress_test_obj_set_bare (RegressTestObj *obj, GObject *bare)
+{
+  if (obj->bare)
+    g_object_unref (obj->bare);
+  obj->bare = bare;
+  if (obj->bare)
+    g_object_ref (obj->bare);
+}
+
+void
+regress_test_obj_emit_sig_with_obj (RegressTestObj *obj)
+{
+    RegressTestObj *obj_param = regress_constructor ();
+    g_object_set (obj_param, "int", 3, NULL);
+    g_signal_emit_by_name (obj, "sig-with-obj", obj_param);
+    g_object_unref (obj_param);
+}
+
+int
+regress_test_obj_instance_method (RegressTestObj *obj)
+{
+    return -1;
+}
+
+double
+regress_test_obj_static_method (int x)
+{
+  return x;
+}
+
+/**
+ * regress_forced_method: (method)
+ * @obj: A #RegressTestObj
+ *
+ */
+void
+regress_forced_method (RegressTestObj *obj)
+{
+}
+
+/**
+ * regress_test_obj_torture_signature_0:
+ * @obj: A #RegressTestObj
+ * @x:
+ * @y: (out):
+ * @z: (out):
+ * @foo:
+ * @q: (out):
+ * @m:
+ *
+ */
+void
+regress_test_obj_torture_signature_0 (RegressTestObj    *obj,
+                              int         x,
+                              double     *y,
+                              int        *z,
+                              const char *foo,
+                              int        *q,
+                              guint       m)
+{
+  *y = x;
+  *z = x * 2;
+  *q = g_utf8_strlen (foo, -1) + m;
+}
+
+/**
+ * regress_test_obj_torture_signature_1:
+ * @obj: A #RegressTestObj
+ * @x:
+ * @y: (out):
+ * @z: (out):
+ * @foo:
+ * @q: (out):
+ * @m:
+ * @error: A #GError
+ *
+ * This function throws an error if m is odd.
+ */
+gboolean
+regress_test_obj_torture_signature_1 (RegressTestObj   *obj,
+                              int        x,
+                              double     *y,
+                              int        *z,
+                              const char *foo,
+                              int        *q,
+                              guint       m,
+                              GError    **error)
+{
+  *y = x;
+  *z = x * 2;
+  *q = g_utf8_strlen (foo, -1) + m;
+  if (m % 2 == 0)
+      return TRUE;
+  g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "m is odd");
+  return FALSE;
+}
+
+/**
+ * regress_test_obj_skip_return_val:
+ * @obj: a #RegressTestObj
+ * @a: Parameter.
+ * @out_b: (out): A return value.
+ * @c: Other parameter.
+ * @inout_d: (inout): Will be incremented.
+ * @out_sum: (out): Return value.
+ * @num1: Number.
+ * @num2: Number.
+ * @error: Return location for error.
+ *
+ * Check that the return value is skipped
+ *
+ * Returns: (skip): %TRUE if the call succeeds, %FALSE if @error is set.
+ */
+gboolean
+regress_test_obj_skip_return_val (RegressTestObj *obj,
+                                  gint            a,
+                                  gint           *out_b,
+                                  gdouble         c,
+                                  gint           *inout_d,
+                                  gint           *out_sum,
+                                  gint            num1,
+                                  gint            num2,
+                                  GError        **error)
+{
+  if (out_b != NULL)
+    *out_b = a + 1;
+  if (inout_d != NULL)
+    *inout_d = *inout_d + 1;
+  if (out_sum != NULL)
+    *out_sum = num1 + 10*num2;
+  return TRUE;
+}
+
+/**
+ * regress_test_obj_skip_return_val_no_out:
+ * @obj: a #RegressTestObj
+ * @a: Parameter.
+ * @error: Return location for error.
+ *
+ * Check that the return value is skipped. Succeed if a is nonzero, otherwise
+ * raise an error.
+ *
+ * Returns: (skip): %TRUE if the call succeeds, %FALSE if @error is set.
+ */
+gboolean
+regress_test_obj_skip_return_val_no_out (RegressTestObj *obj,
+                                         gint            a,
+                                         GError        **error)
+{
+  if (a == 0) {
+    g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "a is zero");
+    return FALSE;
+  } else {
+    return TRUE;
+  }
+}
+
+/**
+ * regress_test_obj_skip_param:
+ * @obj: A #RegressTestObj.
+ * @a: Parameter.
+ * @out_b: (out): Return value.
+ * @c: (skip): Other parameter.
+ * @inout_d: (inout): Will be incremented.
+ * @out_sum: (out): Return value.
+ * @num1: Number.
+ * @num2: Number.
+ * @error: Return location for error.
+ *
+ * Check that a parameter is skipped
+ *
+ * Returns: %TRUE if the call succeeds, %FALSE if @error is set.
+ */
+gboolean
+regress_test_obj_skip_param (RegressTestObj *obj,
+                             gint            a,
+                             gint           *out_b,
+                             gdouble         c,
+                             gint           *inout_d,
+                             gint           *out_sum,
+                             gint            num1,
+                             gint            num2,
+                             GError        **error)
+{
+  if (out_b != NULL)
+    *out_b = a + 1;
+  if (inout_d != NULL)
+    *inout_d = *inout_d + 1;
+  if (out_sum != NULL)
+    *out_sum = num1 + 10*num2;
+  return TRUE;
+}
+
+/**
+ * regress_test_obj_skip_out_param:
+ * @obj: A #RegressTestObj.
+ * @a: Parameter.
+ * @out_b: (out) (skip): Return value.
+ * @c: Other parameter.
+ * @inout_d: (inout): Will be incremented.
+ * @out_sum: (out): Return value.
+ * @num1: Number.
+ * @num2: Number.
+ * @error: Return location for error.
+ *
+ * Check that the out value is skipped
+ *
+ * Returns: %TRUE if the call succeeds, %FALSE if @error is set.
+ */
+gboolean
+regress_test_obj_skip_out_param (RegressTestObj *obj,
+                                 gint            a,
+                                 gint           *out_b,
+                                 gdouble         c,
+                                 gint           *inout_d,
+                                 gint           *out_sum,
+                                 gint            num1,
+                                 gint            num2,
+                                 GError        **error)
+{
+  if (out_b != NULL)
+    *out_b = a + 1;
+  if (inout_d != NULL)
+    *inout_d = *inout_d + 1;
+  if (out_sum != NULL)
+    *out_sum = num1 + 10*num2;
+  return TRUE;
+}
+
+/**
+ * regress_test_obj_skip_inout_param:
+ * @obj: A #RegressTestObj.
+ * @a: Parameter.
+ * @out_b: (out): Return value.
+ * @c: Other parameter.
+ * @inout_d: (inout) (skip): Will be incremented.
+ * @out_sum: (out): Return value.
+ * @num1: Number.
+ * @num2: Number.
+ * @error: Return location for error.
+ *
+ * Check that the out value is skipped
+ *
+ * Returns: %TRUE if the call succeeds, %FALSE if @error is set.
+ */
+gboolean
+regress_test_obj_skip_inout_param (RegressTestObj *obj,
+                                   gint            a,
+                                   gint           *out_b,
+                                   gdouble         c,
+                                   gint           *inout_d,
+                                   gint           *out_sum,
+                                   gint            num1,
+                                   gint            num2,
+                                   GError        **error)
+{
+  if (out_b != NULL)
+    *out_b = a + 1;
+  if (inout_d != NULL)
+    *inout_d = *inout_d + 1;
+  if (out_sum != NULL)
+    *out_sum = num1 + 10*num2;
+  return TRUE;
+}
+
+/**
+ * regress_test_obj_do_matrix:
+ * @obj: A #RegressTestObj
+ * @somestr: Meaningless string
+ *
+ * This method is virtual.  Notably its name differs from the virtual
+ * slot name, which makes it useful for testing bindings handle this
+ * case.
+ *
+ * Virtual: matrix
+ */
+int
+regress_test_obj_do_matrix (RegressTestObj *obj, const char *somestr)
+{
+  return REGRESS_TEST_OBJ_GET_CLASS (obj)->matrix (obj, somestr);
+}
+
+/**
+ * regress_func_obj_null_in:
+ * @obj: (allow-none): A #RegressTestObj
+ */
+void
+regress_func_obj_null_in (RegressTestObj *obj)
+{
+}
+
+/**
+ * regress_test_obj_null_out:
+ * @obj: (allow-none) (out): A #RegressTestObj
+ */
+void
+regress_test_obj_null_out (RegressTestObj **obj)
+{
+  if (obj)
+    *obj = NULL;
+}
+
+/**
+ * regress_test_array_fixed_out_objects:
+ * @objs: (out) (array fixed-size=2) (transfer full): An array of #RegressTestObj
+ */
+void
+regress_test_array_fixed_out_objects (RegressTestObj ***objs)
+{
+    RegressTestObj **values = g_new(gpointer, 2);
+
+    values[0] = regress_constructor();
+    values[1] = regress_constructor();
+
+    *objs = values;
+}
+
+typedef struct _CallbackInfo CallbackInfo;
+
+struct _CallbackInfo
+{
+  RegressTestCallbackUserData callback;
+  GDestroyNotify notify;
+  gpointer user_data;
+};
+
+
+G_DEFINE_TYPE(RegressTestSubObj, regress_test_sub_obj, REGRESS_TEST_TYPE_OBJ);
+
+static void
+regress_test_sub_obj_class_init (RegressTestSubObjClass *klass)
+{
+}
+
+static void
+regress_test_sub_obj_init (RegressTestSubObj *obj)
+{
+}
+
+RegressTestObj*
+regress_test_sub_obj_new ()
+{
+  return g_object_new (REGRESS_TEST_TYPE_SUB_OBJ, NULL);
+}
+
+int
+regress_test_sub_obj_instance_method (RegressTestSubObj *obj)
+{
+    return 0;
+}
+
+void
+regress_test_sub_obj_unset_bare (RegressTestSubObj *obj)
+{
+  regress_test_obj_set_bare(REGRESS_TEST_OBJECT(obj), NULL);
+}
+
+/* RegressTestFundamental */
+
+/**
+ * regress_test_fundamental_object_ref:
+ *
+ * Returns: (transfer full): A new #RegressTestFundamentalObject
+ */
+RegressTestFundamentalObject *
+regress_test_fundamental_object_ref (RegressTestFundamentalObject * fundamental_object)
+{
+  g_return_val_if_fail (fundamental_object != NULL, NULL);
+  g_atomic_int_inc (&fundamental_object->refcount);
+
+  return fundamental_object;
+}
+
+static void
+regress_test_fundamental_object_free (RegressTestFundamentalObject * fundamental_object)
+{
+  RegressTestFundamentalObjectClass *mo_class;
+  regress_test_fundamental_object_ref (fundamental_object);
+
+  mo_class = REGRESS_TEST_FUNDAMENTAL_OBJECT_GET_CLASS (fundamental_object);
+  mo_class->finalize (fundamental_object);
+
+  if (G_LIKELY (g_atomic_int_dec_and_test (&fundamental_object->refcount))) {
+    g_type_free_instance ((GTypeInstance *) fundamental_object);
+  }
+}
+
+void
+regress_test_fundamental_object_unref (RegressTestFundamentalObject * fundamental_object)
+{
+  g_return_if_fail (fundamental_object != NULL);
+  g_return_if_fail (fundamental_object->refcount > 0);
+
+  if (G_UNLIKELY (g_atomic_int_dec_and_test (&fundamental_object->refcount))) {
+    regress_test_fundamental_object_free (fundamental_object);
+  }
+}
+
+static void
+regress_test_fundamental_object_replace (RegressTestFundamentalObject ** olddata, RegressTestFundamentalObject * newdata)
+{
+  RegressTestFundamentalObject *olddata_val;
+
+  g_return_if_fail (olddata != NULL);
+
+  olddata_val = g_atomic_pointer_get ((gpointer *) olddata);
+
+  if (olddata_val == newdata)
+    return;
+
+  if (newdata)
+    regress_test_fundamental_object_ref (newdata);
+
+  while (!g_atomic_pointer_compare_and_exchange ((gpointer *) olddata,
+          olddata_val, newdata)) {
+    olddata_val = g_atomic_pointer_get ((gpointer *) olddata);
+  }
+
+  if (olddata_val)
+    regress_test_fundamental_object_unref (olddata_val);
+}
+
+static void
+regress_test_value_fundamental_object_init (GValue * value)
+{
+  value->data[0].v_pointer = NULL;
+}
+
+static void
+regress_test_value_fundamental_object_free (GValue * value)
+{
+  if (value->data[0].v_pointer) {
+    regress_test_fundamental_object_unref (REGRESS_TEST_FUNDAMENTAL_OBJECT_CAST (value->data[0].v_pointer));
+  }
+}
+
+static void
+regress_test_value_fundamental_object_copy (const GValue * src_value, GValue * dest_value)
+{
+  if (src_value->data[0].v_pointer) {
+    dest_value->data[0].v_pointer =
+        regress_test_fundamental_object_ref (REGRESS_TEST_FUNDAMENTAL_OBJECT_CAST (src_value->data[0].
+            v_pointer));
+  } else {
+    dest_value->data[0].v_pointer = NULL;
+  }
+}
+
+static gpointer
+regress_test_value_fundamental_object_peek_pointer (const GValue * value)
+{
+  return value->data[0].v_pointer;
+}
+
+static gchar *
+regress_test_value_fundamental_object_collect (GValue * value,
+                                       guint n_collect_values,
+                                       GTypeCValue * collect_values,
+                                       guint collect_flags)
+{
+  if (collect_values[0].v_pointer) {
+    value->data[0].v_pointer =
+        regress_test_fundamental_object_ref (collect_values[0].v_pointer);
+  } else {
+    value->data[0].v_pointer = NULL;
+  }
+
+  return NULL;
+}
+
+static gchar *
+regress_test_value_fundamental_object_lcopy (const GValue * value,
+                                     guint n_collect_values,
+                                     GTypeCValue * collect_values,
+                                     guint collect_flags)
+{
+  gpointer *fundamental_object_p = collect_values[0].v_pointer;
+
+  if (!fundamental_object_p) {
+    return g_strdup_printf ("value location for '%s' passed as NULL",
+        G_VALUE_TYPE_NAME (value));
+  }
+
+  if (!value->data[0].v_pointer)
+    *fundamental_object_p = NULL;
+  else if (collect_flags & G_VALUE_NOCOPY_CONTENTS)
+    *fundamental_object_p = value->data[0].v_pointer;
+  else
+    *fundamental_object_p = regress_test_fundamental_object_ref (value->data[0].v_pointer);
+
+  return NULL;
+}
+
+static void
+regress_test_fundamental_object_finalize (RegressTestFundamentalObject * obj)
+{
+
+}
+
+static RegressTestFundamentalObject *
+regress_test_fundamental_object_copy_default (const RegressTestFundamentalObject * obj)
+{
+  g_warning ("RegressTestFundamentalObject classes must implement RegressTestFundamentalObject::copy");
+  return NULL;
+}
+
+static void
+regress_test_fundamental_object_class_init (gpointer g_class, gpointer class_data)
+{
+  RegressTestFundamentalObjectClass *mo_class = REGRESS_TEST_FUNDAMENTAL_OBJECT_CLASS (g_class);
+
+  mo_class->copy = regress_test_fundamental_object_copy_default;
+  mo_class->finalize = regress_test_fundamental_object_finalize;
+}
+
+static void
+regress_test_fundamental_object_init (GTypeInstance * instance, gpointer klass)
+{
+  RegressTestFundamentalObject *fundamental_object = REGRESS_TEST_FUNDAMENTAL_OBJECT_CAST (instance);
+
+  fundamental_object->refcount = 1;
+}
+
+/**
+ * RegressTestFundamentalObject:
+ *
+ * Ref Func: regress_test_fundamental_object_ref
+ * Unref Func: regress_test_fundamental_object_unref
+ * Set Value Func: regress_test_value_set_fundamental_object
+ * Get Value Func: regress_test_value_get_fundamental_object
+ */
+
+GType
+regress_test_fundamental_object_get_type (void)
+{
+  static GType _test_fundamental_object_type = 0;
+
+  if (G_UNLIKELY (_test_fundamental_object_type == 0)) {
+    static const GTypeValueTable value_table = {
+      regress_test_value_fundamental_object_init,
+      regress_test_value_fundamental_object_free,
+      regress_test_value_fundamental_object_copy,
+      regress_test_value_fundamental_object_peek_pointer,
+      (char *) "p",
+      regress_test_value_fundamental_object_collect,
+      (char *) "p",
+      regress_test_value_fundamental_object_lcopy
+    };
+    static const GTypeInfo fundamental_object_info = {
+      sizeof (RegressTestFundamentalObjectClass),
+      NULL, NULL,
+      regress_test_fundamental_object_class_init,
+      NULL,
+      NULL,
+      sizeof (RegressTestFundamentalObject),
+      0,
+      (GInstanceInitFunc) regress_test_fundamental_object_init,
+      &value_table
+    };
+    static const GTypeFundamentalInfo fundamental_object_fundamental_info = {
+      (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE |
+          G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE)
+    };
+
+    _test_fundamental_object_type = g_type_fundamental_next ();
+    g_type_register_fundamental (_test_fundamental_object_type, "RegressTestFundamentalObject",
+        &fundamental_object_info, &fundamental_object_fundamental_info, G_TYPE_FLAG_ABSTRACT);
+
+  }
+
+  return _test_fundamental_object_type;
+}
+
+/**
+ * regress_test_value_set_fundamental_object: (skip)
+ * @value:
+ * @fundamental_object:
+ */
+void
+regress_test_value_set_fundamental_object (GValue * value, RegressTestFundamentalObject * fundamental_object)
+{
+  gpointer *pointer_p;
+
+  g_return_if_fail (REGRESS_TEST_VALUE_HOLDS_FUNDAMENTAL_OBJECT (value));
+  g_return_if_fail (fundamental_object == NULL || REGRESS_TEST_IS_FUNDAMENTAL_OBJECT (fundamental_object));
+
+  pointer_p = &value->data[0].v_pointer;
+
+  regress_test_fundamental_object_replace ((RegressTestFundamentalObject **) pointer_p, fundamental_object);
+}
+
+/**
+ * regress_test_value_get_fundamental_object: (skip)
+ * @value:
+ */
+RegressTestFundamentalObject *
+regress_test_value_get_fundamental_object (const GValue * value)
+{
+  g_return_val_if_fail (REGRESS_TEST_VALUE_HOLDS_FUNDAMENTAL_OBJECT (value), NULL);
+
+  return value->data[0].v_pointer;
+}
+
+static RegressTestFundamentalObjectClass *parent_class = NULL;
+
+G_DEFINE_TYPE (RegressTestFundamentalSubObject, regress_test_fundamental_sub_object, REGRESS_TEST_TYPE_FUNDAMENTAL_OBJECT);
+
+static RegressTestFundamentalSubObject *
+_regress_test_fundamental_sub_object_copy (RegressTestFundamentalSubObject * fundamental_sub_object)
+{
+  RegressTestFundamentalSubObject *copy;
+
+  copy = regress_test_fundamental_sub_object_new(NULL);
+  copy->data = g_strdup(fundamental_sub_object->data);
+  return copy;
+}
+
+static void
+regress_test_fundamental_sub_object_finalize (RegressTestFundamentalSubObject * fundamental_sub_object)
+{
+  g_return_if_fail (fundamental_sub_object != NULL);
+
+  g_free(fundamental_sub_object->data);
+  regress_test_fundamental_object_finalize (REGRESS_TEST_FUNDAMENTAL_OBJECT (fundamental_sub_object));
+}
+
+static void
+regress_test_fundamental_sub_object_class_init (RegressTestFundamentalSubObjectClass * klass)
+{
+  parent_class = g_type_class_peek_parent (klass);
+
+  klass->fundamental_object_class.copy = (RegressTestFundamentalObjectCopyFunction) _regress_test_fundamental_sub_object_copy;
+  klass->fundamental_object_class.finalize =
+      (RegressTestFundamentalObjectFinalizeFunction) regress_test_fundamental_sub_object_finalize;
+}
+
+static void
+regress_test_fundamental_sub_object_init(RegressTestFundamentalSubObject *object)
+{
+
+}
+
+/**
+ * regress_test_fundamental_sub_object_new:
+ */
+RegressTestFundamentalSubObject *
+regress_test_fundamental_sub_object_new (const char * data)
+{
+  RegressTestFundamentalSubObject *object;
+
+  object = (RegressTestFundamentalSubObject *) g_type_create_instance (regress_test_fundamental_sub_object_get_type());
+  object->data = g_strdup(data);
+  return object;
+}
+
+
+/**
+ * regress_test_callback:
+ * @callback: (scope call) (allow-none):
+ *
+ **/
+int
+regress_test_callback (RegressTestCallback callback)
+{
+    if (callback != NULL)
+        return callback();
+    return 0;
+}
+
+/**
+ * regress_test_multi_callback:
+ * @callback: (scope call) (allow-none):
+ *
+ **/
+int
+regress_test_multi_callback (RegressTestCallback callback)
+{
+    int sum = 0;
+    if (callback != NULL) {
+        sum += callback();
+        sum += callback();
+    }
+
+    return sum;
+}
+
+/**
+ * regress_test_array_callback:
+ * @callback: (scope call):
+ *
+ **/
+int regress_test_array_callback (RegressTestCallbackArray callback)
+{
+  static const char *strings[] = { "one", "two", "three" };
+  static int ints[] = { -1, 0, 1, 2 };
+  int sum = 0;
+
+  sum += callback(ints, 4, strings, 3);
+  sum += callback(ints, 4, strings, 3);
+
+  return sum;
+}
+
+/**
+ * regress_test_simple_callback:
+ * @callback: (scope call) (allow-none):
+ *
+ **/
+void
+regress_test_simple_callback (RegressTestSimpleCallback callback)
+{
+    if (callback != NULL)
+        callback();
+
+    return;
+}
+
+/**
+ * regress_test_callback_user_data:
+ * @callback: (scope call):
+ *
+ * Call - callback parameter persists for the duration of the method
+ * call and can be released on return.
+ **/
+int
+regress_test_callback_user_data (RegressTestCallbackUserData callback,
+                         gpointer user_data)
+{
+  return callback(user_data);
+}
+
+static GSList *notified_callbacks = NULL;
+
+/**
+ * regress_test_callback_destroy_notify:
+ * @callback: (scope notified):
+ *
+ * Notified - callback persists until a DestroyNotify delegate
+ * is invoked.
+ **/
+int
+regress_test_callback_destroy_notify (RegressTestCallbackUserData callback,
+                              gpointer user_data,
+                              GDestroyNotify notify)
+{
+  int retval;
+  CallbackInfo *info;
+
+  retval = callback(user_data);
+
+  info = g_slice_new(CallbackInfo);
+  info->callback = callback;
+  info->notify = notify;
+  info->user_data = user_data;
+
+  notified_callbacks = g_slist_prepend(notified_callbacks, info);
+
+  return retval;
+}
+
+/**
+ * regress_test_callback_thaw_notifications:
+ *
+ * Invokes all callbacks installed by #test_callback_destroy_notify(),
+ * adding up their return values, and removes them, invoking the
+ * corresponding destroy notfications.
+ *
+ * Return value: Sum of the return values of the invoked callbacks.
+ */
+int
+regress_test_callback_thaw_notifications (void)
+{
+  int retval = 0;
+  GSList *node;
+
+  for (node = notified_callbacks; node != NULL; node = node->next)
+    {
+      CallbackInfo *info = node->data;
+      retval += info->callback (info->user_data);
+      if (info->notify)
+        info->notify (info->user_data);
+      g_slice_free (CallbackInfo, info);
+    }
+
+  g_slist_free (notified_callbacks);
+  notified_callbacks = NULL;
+
+  return retval;
+}
+
+static GSList *async_callbacks = NULL;
+
+/**
+ * regress_test_callback_async:
+ * @callback: (scope async):
+ *
+ **/
+void
+regress_test_callback_async (RegressTestCallbackUserData callback,
+                     gpointer user_data)
+{
+  CallbackInfo *info;
+
+  info = g_slice_new(CallbackInfo);
+  info->callback = callback;
+  info->user_data = user_data;
+
+  async_callbacks = g_slist_prepend(async_callbacks, info);
+}
+
+/**
+ * regress_test_callback_thaw_async:
+ */
+int
+regress_test_callback_thaw_async (void)
+{
+  int retval = 0;
+  GSList *node;
+
+  for (node = async_callbacks; node != NULL; node = node->next)
+    {
+      CallbackInfo *info = node->data;
+      retval = info->callback (info->user_data);
+      g_slice_free (CallbackInfo, info);
+    }
+
+  g_slist_free (async_callbacks);
+  async_callbacks = NULL;
+  return retval;
+}
+
+void
+regress_test_async_ready_callback (GAsyncReadyCallback callback)
+{
+  GSimpleAsyncResult *result = g_simple_async_result_new (NULL, callback, NULL,
+    regress_test_async_ready_callback);
+  g_simple_async_result_complete_in_idle (result);
+}
+
+/**
+ * regress_test_obj_instance_method_callback:
+ * @callback: (scope call) (allow-none):
+ *
+ **/
+void
+regress_test_obj_instance_method_callback (RegressTestObj *obj, RegressTestCallback callback)
+{
+    if (callback != NULL)
+        callback();
+}
+
+/**
+ * regress_test_obj_static_method_callback:
+ * @callback: (scope call) (allow-none):
+ *
+ **/
+void
+regress_test_obj_static_method_callback (RegressTestCallback callback)
+{
+    if (callback != NULL)
+        callback();
+}
+
+/**
+ * regress_test_obj_new_callback:
+ * @callback: (scope notified):
+ **/
+RegressTestObj *
+regress_test_obj_new_callback (RegressTestCallbackUserData callback, gpointer user_data,
+                       GDestroyNotify notify)
+{
+  CallbackInfo *info;
+
+  callback(user_data);
+
+  info = g_slice_new(CallbackInfo);
+  info->callback = callback;
+  info->notify = notify;
+  info->user_data = user_data;
+
+  notified_callbacks = g_slist_prepend(notified_callbacks, info);
+
+  return g_object_new (REGRESS_TEST_TYPE_OBJ, NULL);
+}
+
+/**
+ * regress_test_hash_table_callback:
+ * @data: (element-type utf8 gint): GHashTable that gets passed to callback
+ * @callback: (scope call):
+ **/
+void
+regress_test_hash_table_callback (GHashTable *data, RegressTestCallbackHashtable callback)
+{
+  callback (data);
+}
+
+/**
+ * regress_test_gerror_callback:
+ * @callback: (scope call):
+ **/
+void
+regress_test_gerror_callback (RegressTestCallbackGError callback)
+{
+  GError *error;
+
+  error = g_error_new_literal (G_IO_ERROR,
+                               G_IO_ERROR_NOT_SUPPORTED,
+                               "regression test error");
+  callback (error);
+  g_error_free (error);
+}
+
+/**
+ * regress_test_null_gerror_callback:
+ * @callback: (scope call):
+ **/
+void
+regress_test_null_gerror_callback (RegressTestCallbackGError callback)
+{
+  callback (NULL);
+}
+
+/**
+ * regress_test_owned_gerror_callback:
+ * @callback: (scope call):
+ **/
+void
+regress_test_owned_gerror_callback (RegressTestCallbackOwnedGError callback)
+{
+  GError *error;
+
+  error = g_error_new_literal (G_IO_ERROR,
+                               G_IO_ERROR_PERMISSION_DENIED,
+                               "regression test owned error");
+  callback (error);
+}
+
+/* interface */
+
+static void
+regress_test_interface_class_init(void *g_iface)
+{
+}
+
+GType
+regress_test_interface_get_type(void)
+{
+    static GType type = 0;
+    if (type == 0) {
+        type = g_type_register_static_simple (G_TYPE_INTERFACE,
+                                              "RegressTestInterface",
+                                              sizeof (RegressTestInterfaceIface),
+                                              (GClassInitFunc) regress_test_interface_class_init,
+                                              0, NULL, 0);
+    }
+
+    return type;
+}
+
+/* gobject with non-standard prefix */
+G_DEFINE_TYPE(RegressTestWi8021x, regress_test_wi_802_1x, G_TYPE_OBJECT);
+
+enum
+{
+  PROP_TEST_WI_802_1X_TESTBOOL = 1
+};
+
+static void
+regress_test_wi_802_1x_set_property (GObject      *object,
+                             guint         property_id,
+                             const GValue *value,
+                             GParamSpec   *pspec)
+{
+  RegressTestWi8021x *self = REGRESS_TEST_WI_802_1X (object);
+
+  switch (property_id)
+    {
+    case PROP_TEST_WI_802_1X_TESTBOOL:
+      regress_test_wi_802_1x_set_testbool (self, g_value_get_boolean (value));
+      break;
+
+    default:
+      /* We don't have any other property... */
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+      break;
+    }
+}
+
+static void
+regress_test_wi_802_1x_get_property (GObject    *object,
+                        guint       property_id,
+                        GValue     *value,
+                        GParamSpec *pspec)
+{
+  RegressTestWi8021x *self = REGRESS_TEST_WI_802_1X (object);
+
+  switch (property_id)
+    {
+    case PROP_TEST_WI_802_1X_TESTBOOL:
+      g_value_set_boolean (value, regress_test_wi_802_1x_get_testbool (self));
+      break;
+
+    default:
+      /* We don't have any other property... */
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+      break;
+    }
+}
+
+static void
+regress_test_wi_802_1x_dispose (GObject *gobject)
+{
+  /* Chain up to the parent class */
+  G_OBJECT_CLASS (regress_test_wi_802_1x_parent_class)->dispose (gobject);
+}
+
+static void
+regress_test_wi_802_1x_class_init (RegressTestWi8021xClass *klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+  GParamSpec *pspec;
+
+  gobject_class->set_property = regress_test_wi_802_1x_set_property;
+  gobject_class->get_property = regress_test_wi_802_1x_get_property;
+  gobject_class->dispose = regress_test_wi_802_1x_dispose;
+
+  pspec = g_param_spec_boolean ("testbool",
+                                "Nick for testbool",
+                                "Blurb for testbool",
+                                TRUE,
+                                G_PARAM_READWRITE);
+  g_object_class_install_property (gobject_class,
+                                   PROP_TEST_WI_802_1X_TESTBOOL,
+                                   pspec);
+}
+
+static void
+regress_test_wi_802_1x_init (RegressTestWi8021x *obj)
+{
+  obj->testbool = TRUE;
+}
+
+RegressTestWi8021x *
+regress_test_wi_802_1x_new (void)
+{
+  return g_object_new (REGRESS_TEST_TYPE_WI_802_1X, NULL);
+}
+
+void
+regress_test_wi_802_1x_set_testbool (RegressTestWi8021x *obj, gboolean val)
+{
+  obj->testbool = val;
+}
+
+gboolean
+regress_test_wi_802_1x_get_testbool (RegressTestWi8021x *obj)
+{
+  return obj->testbool;
+}
+
+int
+regress_test_wi_802_1x_static_method (int x)
+{
+  return 2*x;
+}
+
+/* floating gobject */
+G_DEFINE_TYPE(RegressTestFloating, regress_test_floating, G_TYPE_INITIALLY_UNOWNED);
+
+static void
+regress_test_floating_finalize(GObject *object)
+{
+  g_assert(!g_object_is_floating (object));
+
+  G_OBJECT_CLASS(regress_test_floating_parent_class)->finalize(object);
+}
+
+static void
+regress_test_floating_class_init (RegressTestFloatingClass *klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+  gobject_class->finalize = regress_test_floating_finalize;
+}
+
+static void
+regress_test_floating_init (RegressTestFloating *obj)
+{
+}
+
+/**
+ * regress_test_floating_new:
+ *
+ * Returns:: A new floating #RegressTestFloating
+ */
+RegressTestFloating *
+regress_test_floating_new (void)
+{
+  return g_object_new (REGRESS_TEST_TYPE_FLOATING, NULL);
+}
+
+
+/**
+ * regress_test_torture_signature_0:
+ * @x:
+ * @y: (out):
+ * @z: (out):
+ * @foo:
+ * @q: (out):
+ * @m:
+ *
+ */
+void
+regress_test_torture_signature_0 (int         x,
+                          double     *y,
+                          int        *z,
+                          const char *foo,
+                          int        *q,
+                          guint       m)
+{
+  *y = x;
+  *z = x * 2;
+  *q = g_utf8_strlen (foo, -1) + m;
+}
+
+/**
+ * regress_test_torture_signature_1:
+ * @x:
+ * @y: (out):
+ * @z: (out):
+ * @foo:
+ * @q: (out):
+ * @m:
+ * @error: A #GError
+ *
+ * This function throws an error if m is odd.
+ */
+gboolean
+regress_test_torture_signature_1 (int         x,
+                          double     *y,
+                          int        *z,
+                          const char *foo,
+                          int        *q,
+                          guint       m,
+                          GError    **error)
+{
+  *y = x;
+  *z = x * 2;
+  *q = g_utf8_strlen (foo, -1) + m;
+  if (m % 2 == 0)
+      return TRUE;
+  g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "m is odd");
+  return FALSE;
+}
+
+/**
+ * regress_test_torture_signature_2:
+ * @x:
+ * @callback:
+ * @user_data:
+ * @notify:
+ * @y: (out):
+ * @z: (out):
+ * @foo:
+ * @q: (out):
+ * @m:
+ *
+ */
+void
+regress_test_torture_signature_2 (int                   x,
+                          RegressTestCallbackUserData  callback,
+                          gpointer              user_data,
+                          GDestroyNotify        notify,
+                          double               *y,
+                          int                  *z,
+                          const char           *foo,
+                          int                  *q,
+                          guint                 m)
+{
+  *y = x;
+  *z = x * 2;
+  *q = g_utf8_strlen (foo, -1) + m;
+  notify (user_data);
+}
+
+/**
+ * regress_test_date_in_gvalue:
+ *
+ * Returns: (transfer full):
+ */
+GValue *
+regress_test_date_in_gvalue (void)
+{
+  GValue *value = g_new0 (GValue, 1);
+  GDate *date = g_date_new_dmy (5, 12, 1984);
+
+  g_value_init (value, G_TYPE_DATE);
+  g_value_take_boxed (value, date);
+
+  return value;
+}
+
+/**
+ * regress_test_strv_in_gvalue:
+ *
+ * Returns: (transfer full):
+ */
+GValue *
+regress_test_strv_in_gvalue (void)
+{
+  GValue *value = g_new0 (GValue, 1);
+  const char *strv[] = { "one", "two", "three", NULL };
+
+  g_value_init (value, G_TYPE_STRV);
+  g_value_set_boxed (value, strv);
+
+  return value;
+}
+
+/**
+ * regress_test_multiline_doc_comments:
+ *
+ * This is a function.
+ *
+ * It has multiple lines in the documentation.
+ *
+ * The sky is blue.
+ *
+ * You will give me your credit card number.
+ */
+void
+regress_test_multiline_doc_comments (void)
+{
+}
+
+/**
+ * regress_test_nested_parameter:
+ * @a: An integer
+ *
+ * <informaltable>
+ *   <tgroup cols="3">
+ *     <thead>
+ *       <row>
+ *         <entry>Syntax</entry>
+ *         <entry>Explanation</entry>
+ *         <entry>Examples</entry>
+ *       </row>
+ *     </thead>
+ *     <tbody>
+ *       <row>
+ *         <entry>rgb(@r, @g, @b)</entry>
+ *         <entry>An opaque color; @r, @g, @b can be either integers between
+ *                0 and 255 or percentages</entry>
+ *         <entry><literallayout>rgb(128, 10, 54)
+ * rgb(20%, 30%, 0%)</literallayout></entry>
+ *       </row>
+ *       <row>
+ *         <entry>rgba(@r, @g, @b, @a)</entry>
+ *         <entry>A translucent color; @r, @g, @b are as in the previous row,
+ *                @a is a floating point number between 0 and 1</entry>
+ *         <entry><literallayout>rgba(255, 255, 0, 0.5)</literallayout></entry>
+ *       </row>
+ *    </tbody>
+ *  </tgroup>
+ * </informaltable>
+ *
+ * What we're testing here is that the scanner ignores the @a nested inside XML.
+ */
+void
+regress_test_nested_parameter (int a)
+{
+}
+
+/**
+ * regress_introspectable_via_alias:
+ *
+ */
+void
+regress_introspectable_via_alias (RegressPtrArrayAlias *data)
+{
+}
+
+/**
+ * regress_not_introspectable_via_alias:
+ *
+ */
+void
+regress_not_introspectable_via_alias (RegressVaListAlias ok)
+{
+}
+
+/**
+ * regress_aliased_caller_alloc:
+ * @boxed: (out):
+ */
+void regress_aliased_caller_alloc (RegressAliasedTestBoxed *boxed)
+{
+  boxed->priv = g_slice_new0 (RegressTestBoxedPrivate);
+  boxed->priv->magic = 0xdeadbeef;
+}
+
+void
+regress_test_struct_fixed_array_frob (RegressTestStructFixedArray *str)
+{
+  guint i;
+  str->just_int = 7;
+
+  for (i = 0; i < G_N_ELEMENTS(str->array); i++)
+    str->array[i] = 42 + i;
+}
diff --git a/tests/scanner/regress.h b/tests/scanner/regress.h
new file mode 100644 (file)
index 0000000..6ef3b60
--- /dev/null
@@ -0,0 +1,786 @@
+#ifndef __GITESTTYPES_H__
+#define __GITESTTYPES_H__
+
+#include <cairo.h>
+#include <glib-object.h>
+#include <gio/gio.h>
+#include <time.h>
+
+void regress_set_abort_on_error (gboolean abort_on_error);
+
+/* basic types */
+gboolean regress_test_boolean (gboolean in);
+gboolean regress_test_boolean_true (gboolean in);
+gboolean regress_test_boolean_false (gboolean in);
+gint8 regress_test_int8 (gint8 in);
+guint8 regress_test_uint8 (guint8 in);
+gint16 regress_test_int16 (gint16 in);
+guint16 regress_test_uint16 (guint16 in);
+gint32 regress_test_int32 (gint32 in);
+guint32 regress_test_uint32 (guint32 in);
+gint64 regress_test_int64 (gint64 in);
+guint64 regress_test_uint64 (guint64 in);
+gshort regress_test_short (gshort in);
+gushort regress_test_ushort (gushort in);
+gint regress_test_int (gint in);
+guint regress_test_uint (guint in);
+glong regress_test_long (glong in);
+gulong regress_test_ulong (gulong in);
+gssize regress_test_ssize (gssize in);
+gsize regress_test_size (gsize in);
+gfloat regress_test_float (gfloat in);
+gdouble regress_test_double (gdouble in);
+gunichar regress_test_unichar (gunichar in);
+time_t regress_test_timet (time_t in);
+GType regress_test_gtype (GType in);
+
+/* utf8 */
+const char *regress_test_utf8_const_return (void);
+char *regress_test_utf8_nonconst_return (void);
+void regress_test_utf8_const_in (const char *in);
+void regress_test_utf8_out (char **out);
+void regress_test_utf8_inout (char **inout);
+GSList *regress_test_filename_return (void);
+void regress_test_utf8_null_in (char *in);
+void regress_test_utf8_null_out (char **char_out);
+
+/* in arguments after out arguments */
+void regress_test_int_out_utf8 (int *length, const char *in);
+
+/* multiple output arguments */
+void regress_test_multi_double_args (gdouble in, gdouble *one, gdouble *two);
+void regress_test_utf8_out_out (char **out0, char **out1);
+char *regress_test_utf8_out_nonconst_return (char **out);
+
+/* non-basic-types */
+/* array */
+gboolean regress_test_strv_in (char **arr);
+int regress_test_array_int_in (int n_ints, int *ints);
+void regress_test_array_int_out (int *n_ints, int **ints);
+void regress_test_array_int_inout (int *n_ints, int **ints);
+int regress_test_array_gint8_in (int n_ints, gint8 *ints);
+int regress_test_array_gint16_in (int n_ints, gint16 *ints);
+gint32 regress_test_array_gint32_in (int n_ints, gint32 *ints);
+gint64 regress_test_array_gint64_in (int n_ints, gint64 *ints);
+char *regress_test_array_gtype_in (int n_types, GType *types);
+char **regress_test_strv_out_container (void);
+char **regress_test_strv_out (void);
+const char * const * regress_test_strv_out_c (void);
+void   regress_test_strv_outarg (char ***retp);
+int regress_test_array_fixed_size_int_in (int *ints);
+void regress_test_array_fixed_size_int_out (int **ints);
+int *regress_test_array_fixed_size_int_return (void);
+
+/* transfer tests */
+int *regress_test_array_int_full_out(int *len);
+int *regress_test_array_int_none_out(int *len);
+void regress_test_array_int_null_in (int *arr, int len);
+void regress_test_array_int_null_out (int **arr, int *len);
+
+/* interface */
+/* GList */
+const GList *regress_test_glist_nothing_return (void);
+GList *regress_test_glist_nothing_return2 (void);
+GList *regress_test_glist_container_return (void);
+GList *regress_test_glist_everything_return (void);
+void regress_test_glist_nothing_in (const GList *in);
+void regress_test_glist_nothing_in2 (GList *in);
+void regress_test_glist_null_in(GSList *in);
+void regress_test_glist_null_out(GSList **out_list);
+
+/* GSList */
+const GSList *regress_test_gslist_nothing_return (void);
+GSList *regress_test_gslist_nothing_return2 (void);
+GSList *regress_test_gslist_container_return (void);
+GSList *regress_test_gslist_everything_return (void);
+void regress_test_gslist_nothing_in (const GSList *in);
+void regress_test_gslist_nothing_in2 (GSList *in);
+void regress_test_gslist_null_in(GSList *in);
+void regress_test_gslist_null_out(GSList **out_list);
+
+/* GHashTable */
+const GHashTable *regress_test_ghash_null_return (void);
+const GHashTable *regress_test_ghash_nothing_return (void);
+GHashTable *regress_test_ghash_nothing_return2 (void);
+GHashTable *regress_test_ghash_gvalue_return (void);
+void regress_test_ghash_gvalue_in (GHashTable *hash);
+GHashTable *regress_test_ghash_container_return (void);
+GHashTable *regress_test_ghash_everything_return (void);
+void regress_test_ghash_null_in (const GHashTable *in);
+void regress_test_ghash_null_out (const GHashTable **out);
+void regress_test_ghash_nothing_in (const GHashTable *in);
+void regress_test_ghash_nothing_in2 (GHashTable *in);
+GHashTable *regress_test_ghash_nested_everything_return (void);
+GHashTable *regress_test_ghash_nested_everything_return2 (void);
+
+/* GPtrArray */
+GPtrArray *regress_test_garray_container_return (void);
+GPtrArray *regress_test_garray_full_return (void);
+
+/* error? */
+
+/* closure */
+int regress_test_closure (GClosure *closure);
+int regress_test_closure_one_arg (GClosure *closure, int arg);
+GVariant *regress_test_closure_variant (GClosure *closure, const GVariant* arg);
+
+/* value */
+int regress_test_int_value_arg(const GValue *v);
+const GValue *regress_test_value_return(int i);
+
+/* foreign structs */
+cairo_t *regress_test_cairo_context_full_return (void);
+void regress_test_cairo_context_none_in (cairo_t *context);
+
+cairo_surface_t *regress_test_cairo_surface_none_return (void);
+cairo_surface_t *regress_test_cairo_surface_full_return (void);
+void regress_test_cairo_surface_none_in (cairo_surface_t *surface);
+void regress_test_cairo_surface_full_out (cairo_surface_t **surface);
+
+GVariant *regress_test_gvariant_i (void);
+GVariant *regress_test_gvariant_s (void);
+GVariant *regress_test_gvariant_asv (void);
+GVariant *regress_test_gvariant_v (void);
+GVariant *regress_test_gvariant_as (void);
+
+/* enums / flags */
+
+#define NUM_REGRESS_FOO
+
+typedef enum
+{
+  REGRESS_TEST_VALUE1,
+  REGRESS_TEST_VALUE2,
+  REGRESS_TEST_VALUE3 = -1,
+  REGRESS_TEST_VALUE4 = '0'
+} RegressTestEnum;
+
+typedef enum
+{
+  REGRESS_TEST_UNSIGNED_VALUE1 = 1,
+  REGRESS_TEST_UNSIGNED_VALUE2 = 0x80000000
+} RegressTestEnumUnsigned;
+
+typedef enum
+{
+  REGRESS_TEST_FLAG1 = 1 << 0,
+  REGRESS_TEST_FLAG2 = 1 << 1,
+  REGRESS_TEST_FLAG3 = 1 << 2,
+} RegressTestFlags;
+
+GType regress_test_enum_get_type (void) G_GNUC_CONST;
+#define REGRESS_TEST_TYPE_ENUM (regress_test_enum_get_type ())
+GType regress_test_enum_unsigned_get_type (void) G_GNUC_CONST;
+#define REGRESS_TEST_TYPE_ENUM_UNSIGNED (regress_test_enum_unsigned_get_type ())
+GType regress_test_flags_get_type (void) G_GNUC_CONST;
+#define REGRESS_TEST_TYPE_FLAGS (regress_test_flags_get_type ())
+
+/* this is not registered with GType */
+typedef enum
+{
+  REGRESS_TEST_EVALUE1,
+  REGRESS_TEST_EVALUE2 = 42,
+  REGRESS_TEST_EVALUE3 = '0'
+} RegressTestEnumNoGEnum;
+
+const gchar * regress_test_enum_param(RegressTestEnum e);
+const gchar * regress_test_unsigned_enum_param(RegressTestEnumUnsigned e);
+
+void regress_global_get_flags_out (RegressTestFlags *v);
+
+/* constants */
+
+#define REGRESS_INT_CONSTANT 4422
+#define REGRESS_DOUBLE_CONSTANT 44.22
+#define REGRESS_STRING_CONSTANT "Some String"
+#define REGRESS_Mixed_Case_Constant 4423
+
+/* structures */
+typedef struct _RegressTestStructA RegressTestStructA;
+typedef struct _RegressTestStructB RegressTestStructB;
+typedef struct _RegressTestStructC RegressTestStructC;
+typedef struct _RegressTestStructD RegressTestStructD;
+
+struct _RegressTestStructA
+{
+  gint some_int;
+  gint8 some_int8;
+  gdouble some_double;
+  RegressTestEnum some_enum;
+};
+
+void regress_test_struct_a_clone (RegressTestStructA *a,
+                                 RegressTestStructA *a_out);
+
+struct _RegressTestStructB
+{
+  gint8 some_int8;
+  RegressTestStructA nested_a;
+};
+
+void regress_test_struct_b_clone (RegressTestStructB *b,
+                         RegressTestStructB *b_out);
+
+/* This one has a non-basic member */
+struct _RegressTestStructC
+{
+  gint another_int;
+  GObject *obj;
+};
+
+/* This one has annotated fields */
+/**
+ * RegressTestStructD:
+ * @array1: (array zero-terminated=1):
+ * @array2: (array zero-terminated=1) (element-type RegressTestObj):
+ * @field: (type RegressTestObj):
+ * @list: (element-type RegressTestObj):
+ * @garray: (element-type RegressTestObj):
+ */
+struct _RegressTestStructD
+{
+  RegressTestStructA **array1;
+  gpointer            *array2;
+  gpointer             field;
+  GList               *list;
+  GPtrArray           *garray;
+};
+
+/* This one has an array of anonymous unions, inspired by GValue */
+struct RegressTestStructE
+{
+  GType some_type;
+  union {
+    gint       v_int;
+    guint      v_uint;
+    glong      v_long;
+    gulong     v_ulong;
+    gint64      v_int64;
+    guint64     v_uint64;
+    gfloat     v_float;
+    gdouble    v_double;
+    gpointer   v_pointer;
+  } some_union[2];
+};
+
+/* plain-old-data boxed types */
+typedef struct _RegressTestSimpleBoxedA RegressTestSimpleBoxedA;
+typedef struct _RegressTestSimpleBoxedB RegressTestSimpleBoxedB;
+
+struct _RegressTestSimpleBoxedA
+{
+  gint some_int;
+  gint8 some_int8;
+  gdouble some_double;
+  RegressTestEnum some_enum;
+};
+
+/* Intentionally uses _get_gtype */
+GType                   regress_test_simple_boxed_a_get_gtype     (void);
+RegressTestSimpleBoxedA *regress_test_simple_boxed_a_copy         (RegressTestSimpleBoxedA *a);
+gboolean                regress_test_simple_boxed_a_equals       (RegressTestSimpleBoxedA *a,
+                                                          RegressTestSimpleBoxedA *other_a);
+const RegressTestSimpleBoxedA *regress_test_simple_boxed_a_const_return (void);
+
+
+struct _RegressTestSimpleBoxedB
+{
+  gint8 some_int8;
+  RegressTestSimpleBoxedA nested_a;
+};
+
+GType             regress_test_simple_boxed_b_get_type (void);
+RegressTestSimpleBoxedB *regress_test_simple_boxed_b_copy     (RegressTestSimpleBoxedB *b);
+
+/* opaque boxed */
+#define REGRESS_TEST_TYPE_BOXED (regress_test_boxed_get_type())
+
+typedef struct _RegressTestBoxed RegressTestBoxed;
+typedef struct _RegressTestBoxedPrivate RegressTestBoxedPrivate;
+
+struct _RegressTestBoxed
+{
+  gint8 some_int8;
+  RegressTestSimpleBoxedA nested_a;
+
+  RegressTestBoxedPrivate *priv;
+};
+
+GType      regress_test_boxed_get_type (void);
+RegressTestBoxed *regress_test_boxed_new      (void);
+RegressTestBoxed *regress_test_boxed_new_alternative_constructor1  (int i);
+RegressTestBoxed *regress_test_boxed_new_alternative_constructor2  (int i, int j);
+RegressTestBoxed *regress_test_boxed_new_alternative_constructor3  (char *s);
+
+RegressTestBoxed *regress_test_boxed_copy     (RegressTestBoxed *boxed);
+gboolean   regress_test_boxed_equals   (RegressTestBoxed *boxed,
+                                       RegressTestBoxed *other);
+
+typedef struct _RegressTestBoxedB RegressTestBoxedB;
+
+struct _RegressTestBoxedB
+{
+  gint8 some_int8;
+  glong some_long;
+};
+
+GType regress_test_boxed_b_get_type (void);
+RegressTestBoxedB *regress_test_boxed_b_new (gint8 some_int8, glong some_long);
+RegressTestBoxedB *regress_test_boxed_b_copy (RegressTestBoxedB *boxed);
+
+/* gobject */
+#define REGRESS_TEST_TYPE_OBJ              (regress_test_obj_get_type ())
+#define REGRESS_TEST_OBJECT(object)        (G_TYPE_CHECK_INSTANCE_CAST ((object), REGRESS_TEST_TYPE_OBJ, RegressTestObj))
+#define REGRESS_TEST_IS_OBJECT(object)     (G_TYPE_CHECK_INSTANCE_TYPE ((object), REGRESS_TEST_TYPE_OBJ))
+#define REGRESS_TEST_OBJ_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), REGRESS_TEST_TYPE_OBJ, RegressTestObjClass))
+
+typedef struct _RegressTestObj          RegressTestObj;
+typedef struct _RegressTestObjClass     RegressTestObjClass;
+
+/**
+ * RegressTestObj:
+ * @bare: (allow-none):
+ */
+struct _RegressTestObj
+{
+  GObject parent_instance;
+
+  GObject *bare;
+  RegressTestBoxed *boxed;
+  GHashTable *hash_table;
+  GList *list;
+  gint8 some_int8;
+  float some_float;
+  double some_double;
+  char* string;
+};
+
+struct _RegressTestObjClass
+{
+  GObjectClass parent_class;
+
+  int (*matrix) (RegressTestObj *obj, const char *somestr);
+
+  /**
+   * RegressTestObjClass::allow_none_vfunc
+   * @two: (allow-none): Another object
+   */
+  void (*allow_none_vfunc) (RegressTestObj *obj, RegressTestObj *two);
+
+  guint test_signal;
+  guint test_signal_with_static_scope_arg;
+
+  /* Should be replaced with simple "gpointer" and not be callback */
+  void (*_regress_reserved1) (void);
+  void (*_regress_reserved2) (void);
+};
+
+GType      regress_test_obj_get_type (void);
+RegressTestObj*   regress_test_obj_new (RegressTestObj *obj);
+RegressTestObj*   regress_constructor (void);
+RegressTestObj*   regress_test_obj_new_from_file (const char *x, GError **error);
+void       regress_test_obj_set_bare (RegressTestObj *obj, GObject *bare);
+void       regress_test_obj_emit_sig_with_obj (RegressTestObj *obj);
+int        regress_test_obj_instance_method (RegressTestObj *obj);
+double     regress_test_obj_static_method (int x);
+void       regress_forced_method (RegressTestObj *obj);
+
+void regress_test_array_fixed_out_objects (RegressTestObj ***objs);
+
+void regress_test_obj_torture_signature_0 (RegressTestObj    *obj,
+                                   int        x,
+                                   double     *y,
+                                   int        *z,
+                                   const char *foo,
+                                   int        *q,
+                                   guint       m);
+gboolean regress_test_obj_torture_signature_1 (RegressTestObj    *obj,
+                                       int        x,
+                                       double     *y,
+                                       int        *z,
+                                       const char *foo,
+                                       int        *q,
+                                       guint       m,
+                                       GError    **error);
+
+gboolean regress_test_obj_skip_return_val (RegressTestObj *obj,
+                                           gint            a,
+                                           gint           *out_b,
+                                           gdouble         c,
+                                           gint           *inout_d,
+                                           gint           *out_sum,
+                                           gint            num1,
+                                           gint            num2,
+                                           GError        **error);
+
+gboolean regress_test_obj_skip_return_val_no_out (RegressTestObj *obj,
+                                                  gint            a,
+                                                  GError        **error);
+
+gboolean regress_test_obj_skip_param (RegressTestObj *obj,
+                                      gint            a,
+                                      gint           *out_b,
+                                      gdouble         c,
+                                      gint           *inout_d,
+                                      gint           *out_sum,
+                                      gint            num1,
+                                      gint            num2,
+                                      GError        **error);
+
+gboolean regress_test_obj_skip_out_param (RegressTestObj *obj,
+                                          gint            a,
+                                          gint           *out_b,
+                                          gdouble         c,
+                                          gint           *inout_d,
+                                          gint           *out_sum,
+                                          gint            num1,
+                                          gint            num2,
+                                          GError        **error);
+
+gboolean regress_test_obj_skip_inout_param (RegressTestObj *obj,
+                                            gint            a,
+                                            gint           *out_b,
+                                            gdouble         c,
+                                            gint           *inout_d,
+                                            gint           *out_sum,
+                                            gint            num1,
+                                            gint            num2,
+                                            GError        **error);
+
+/* virtual */
+int        regress_test_obj_do_matrix (RegressTestObj *obj, const char *somestr);
+
+void regress_func_obj_null_in (RegressTestObj *obj);
+void regress_test_obj_null_out (RegressTestObj **obj);
+
+/* inheritance */
+#define REGRESS_TEST_TYPE_SUB_OBJ           (regress_test_sub_obj_get_type ())
+#define REGRESS_TEST_SUB_OBJECT(object)     (G_TYPE_CHECK_INSTANCE_CAST ((object), REGRESS_TEST_TYPE_SUB_OBJ, RegressTestSubObj))
+#define REGRESS_TEST_IS_SUB_OBJECT(object)  (G_TYPE_CHECK_INSTANCE_TYPE ((object), REGRESS_TEST_TYPE_SUB_OBJ))
+#define REGRESS_TEST_SUB_OBJ_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), REGRESS_TEST_TYPE_SUB_OBJ, RegressTestSubObjClass))
+
+typedef struct _RegressTestSubObj         RegressTestSubObj;
+typedef struct _RegressTestSubObjClass    RegressTestSubObjClass;
+
+struct _RegressTestSubObj
+{
+  RegressTestObj parent_instance;
+};
+
+struct _RegressTestSubObjClass
+{
+  RegressTestObjClass parent_class;
+};
+
+GType       regress_test_sub_obj_get_type (void);
+RegressTestObj* regress_test_sub_obj_new (void);
+void        regress_test_sub_obj_unset_bare (RegressTestSubObj *obj);
+int         regress_test_sub_obj_instance_method (RegressTestSubObj *obj);
+
+/* fundamental object */
+#define REGRESS_TEST_TYPE_FUNDAMENTAL_OBJECT            (regress_test_fundamental_object_get_type())
+#define REGRESS_TEST_IS_FUNDAMENTAL_OBJECT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), REGRESS_TEST_TYPE_FUNDAMENTAL_OBJECT))
+#define REGRESS_TEST_IS_FUNDAMENTAL_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), REGRESS_TEST_TYPE_FUNDAMENTAL_OBJECT))
+#define REGRESS_TEST_FUNDAMENTAL_OBJECT_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), REGRESS_TEST_TYPE_FUNDAMENTAL_OBJECT, RegressTestFundamentalObjectClass))
+#define REGRESS_TEST_FUNDAMENTAL_OBJECT(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), REGRESS_TEST_TYPE_FUNDAMENTAL_OBJECT, RegressTestFundamentalObject))
+#define REGRESS_TEST_FUNDAMENTAL_OBJECT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), REGRESS_TEST_TYPE_FUNDAMENTAL_OBJECT, RegressTestFundamentalObjectClass))
+#define REGRESS_TEST_FUNDAMENTAL_OBJECT_CAST(obj)       ((RegressTestFundamentalObject*)(obj))
+
+typedef struct _RegressTestFundamentalObject RegressTestFundamentalObject;
+typedef struct _RegressTestFundamentalObjectClass RegressTestFundamentalObjectClass;
+/**
+ * RegressTestFundamentalObjectCopyFunction:
+ *
+ * Returns: (transfer full):
+ */
+typedef RegressTestFundamentalObject * (*RegressTestFundamentalObjectCopyFunction) (const RegressTestFundamentalObject *obj);
+typedef void (*RegressTestFundamentalObjectFinalizeFunction) (RegressTestFundamentalObject *obj);
+
+
+struct _RegressTestFundamentalObject {
+  GTypeInstance instance;
+  gint refcount;
+  guint flags;
+};
+
+struct _RegressTestFundamentalObjectClass {
+  GTypeClass type_class;
+
+  RegressTestFundamentalObjectCopyFunction copy;
+  RegressTestFundamentalObjectFinalizeFunction finalize;
+};
+
+GType                 regress_test_fundamental_object_get_type (void);
+RegressTestFundamentalObject* regress_test_fundamental_object_ref      (RegressTestFundamentalObject *fundamental_object);
+void                  regress_test_fundamental_object_unref    (RegressTestFundamentalObject *fundamental_object);
+
+#define REGRESS_TEST_VALUE_HOLDS_FUNDAMENTAL_OBJECT(value)  (G_VALUE_HOLDS(value, REGRESS_TEST_TYPE_FUNDAMENTAL_OBJECT))
+
+void                  regress_test_value_set_fundamental_object (GValue *value, RegressTestFundamentalObject *fundamental_object);
+RegressTestFundamentalObject* regress_test_value_get_fundamental_object (const GValue *value);
+
+typedef struct _RegressTestFundamentalSubObject RegressTestFundamentalSubObject;
+typedef struct _RegressTestFundamentalSubObjectClass RegressTestFundamentalSubObjectClass;
+
+struct _RegressTestFundamentalSubObject
+{
+  RegressTestFundamentalObject fundamental_object;
+  char *data;
+};
+
+struct _RegressTestFundamentalSubObjectClass {
+  RegressTestFundamentalObjectClass fundamental_object_class;
+};
+
+GType regress_test_fundamental_sub_object_get_type(void);
+
+RegressTestFundamentalSubObject *
+regress_test_fundamental_sub_object_new (const char *data);
+
+/* callback */
+typedef void (*RegressTestSimpleCallback) (void);
+typedef int (*RegressTestCallback) (void);
+typedef int (*RegressTestCallbackUserData) (gpointer user_data);
+/**
+ * RegressTestCallbackHashtable:
+ * @data: (element-type utf8 gint): a hash table; will be modified
+ */
+typedef void (*RegressTestCallbackHashtable) (GHashTable *data);
+typedef void (*RegressTestCallbackGError) (const GError *error);
+/**
+ * RegressTestCallbackOwnedGError:
+ * @error: (transfer full): GError instance; must be freed by the callback
+ */
+typedef void (*RegressTestCallbackOwnedGError) (GError *error);
+/**
+ * RegressTestCallbackFull:
+ * @foo: the investment rate
+ * @bar: how much money
+ * @path: (type filename): Path to file
+ */
+typedef int (*RegressTestCallbackFull) (int foo, double bar, char *path);
+/**
+ * RegressTestCallbackArray:
+ * @one: (array length=one_length):
+ * @one_length:
+ * @two: (array length=two_length) (element-type utf8):
+ * @two_length:
+ */
+typedef int (*RegressTestCallbackArray) (int *one, gsize one_length, const char** two, int two_length);
+
+void regress_test_simple_callback (RegressTestSimpleCallback callback);
+int regress_test_callback (RegressTestCallback callback);
+int regress_test_multi_callback (RegressTestCallback callback);
+int regress_test_array_callback (RegressTestCallbackArray callback);
+int regress_test_callback_user_data (RegressTestCallbackUserData callback,
+                             gpointer user_data);
+int regress_test_callback_destroy_notify (RegressTestCallbackUserData callback,
+                                  gpointer user_data,
+                                  GDestroyNotify notify);
+int regress_test_callback_thaw_notifications (void);
+
+void regress_test_callback_async (RegressTestCallbackUserData callback, gpointer user_data);
+int regress_test_callback_thaw_async (void);
+
+void regress_test_async_ready_callback (GAsyncReadyCallback callback);
+
+void regress_test_obj_instance_method_callback (RegressTestObj *obj, RegressTestCallback callback);
+void regress_test_obj_static_method_callback (RegressTestCallback callback);
+RegressTestObj *regress_test_obj_new_callback (RegressTestCallbackUserData callback,
+                                gpointer user_data,
+                                GDestroyNotify notify);
+void regress_test_hash_table_callback (GHashTable *data, RegressTestCallbackHashtable callback);
+void regress_test_gerror_callback (RegressTestCallbackGError callback);
+void regress_test_null_gerror_callback (RegressTestCallbackGError callback);
+void regress_test_owned_gerror_callback (RegressTestCallbackOwnedGError callback);
+
+typedef struct _RegressTestInterface RegressTestInterface;
+
+/* interface */
+#define REGRESS_TEST_TYPE_INTERFACE              (regress_test_interface_get_type ())
+#define REGRESS_TEST_INTERFACE(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), REGRESS_TEST_TYPE_INTERFACE, RegressTestInterface))
+#define REGRESS_TEST_IS_INTERFACE(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), REGRESS_TEST_TYPE_INTERFACE))
+#define REGRESS_TEST_INTERFACE_GET_IFACE(obj)    (G_TYPE_INSTANCE_GET_INTERFACE ((obj), REGRESS_TEST_TYPE_INTERFACE, RegressTestInterfaceIface))
+
+typedef struct _RegressTestInterfaceIface RegressTestInterfaceIface;
+
+struct _RegressTestInterfaceIface {
+    GTypeInterface base_iface;
+};
+
+GType regress_test_interface_get_type (void) G_GNUC_CONST;
+
+/* gobject with non-standard prefix */
+#define REGRESS_TEST_TYPE_WI_802_1X              (regress_test_wi_802_1x_get_type ())
+#define REGRESS_TEST_WI_802_1X(object)        (G_TYPE_CHECK_INSTANCE_CAST ((object), REGRESS_TEST_TYPE_WI_802_1X, RegressTestWi8021x))
+#define REGRESS_TEST_IS_WI_802_1X(object)     (G_TYPE_CHECK_INSTANCE_TYPE ((object), REGRESS_TEST_TYPE_WI_802_1X))
+#define REGRESS_TEST_WI_802_1X_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), REGRESS_TEST_TYPE_WI_802_1X, RegressTestWi8021xClass))
+
+typedef struct
+{
+  GObject parent_instance;
+
+  gboolean testbool;
+} RegressTestWi8021x;
+
+typedef struct
+{
+  GObjectClass parent_class;
+} RegressTestWi8021xClass;
+
+GType        regress_test_wi_802_1x_get_type (void);
+RegressTestWi8021x* regress_test_wi_802_1x_new (void);
+gboolean     regress_test_wi_802_1x_get_testbool (RegressTestWi8021x *obj);
+void         regress_test_wi_802_1x_set_testbool (RegressTestWi8021x *obj, gboolean v);
+int          regress_test_wi_802_1x_static_method (int x);
+
+/* floating gobject */
+#define REGRESS_TEST_TYPE_FLOATING           (regress_test_floating_get_type ())
+#define REGRESS_TEST_FLOATING(object)        (G_TYPE_CHECK_INSTANCE_CAST ((object), REGRESS_TEST_TYPE_FLOATING, RegressTestFloating))
+#define REGRESS_TEST_IS_FLOATING(object)     (G_TYPE_CHECK_INSTANCE_TYPE ((object), REGRESS_TEST_TYPE_FLOATING))
+#define REGRESS_TEST_FLOATING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), REGRESS_TEST_TYPE_FLOATING, RegressTestFloatingClass))
+
+typedef struct
+{
+  GInitiallyUnowned parent_instance;
+} RegressTestFloating;
+
+typedef struct
+{
+  GInitiallyUnownedClass parent_class;
+} RegressTestFloatingClass;
+
+GType        regress_test_floating_get_type (void);
+RegressTestFloating* regress_test_floating_new (void);
+
+/* Function signature torture tests */
+void regress_test_torture_signature_0 (int        x,
+                               double     *y,
+                               int        *z,
+                               const char *foo,
+                               int        *q,
+                               guint       m);
+gboolean regress_test_torture_signature_1 (int        x,
+                                   double     *y,
+                                   int        *z,
+                                   const char *foo,
+                                   int        *q,
+                                   guint       m,
+                                   GError    **error);
+void regress_test_torture_signature_2 (int                  x,
+                                      RegressTestCallbackUserData  callback,
+                                      gpointer              user_data,
+                                      GDestroyNotify        notify,
+                                      double               *y,
+                                      int                  *z,
+                                      const char           *foo,
+                                      int                  *q,
+                                      guint                 m);
+
+GValue *regress_test_date_in_gvalue (void);
+GValue *regress_test_strv_in_gvalue (void);
+
+GObject * _regress_this_is_a_private_symbol (void);
+
+void regress_test_multiline_doc_comments (void);
+void regress_test_nested_parameter (int a);
+
+/**
+ * RegressSkippedStructure: (skip)
+ *
+ * This should be skipped, and moreover, all function which
+ * use it should be.
+ */
+typedef struct
+{
+  int x;
+  double v;
+} RegressSkippedStructure;
+
+void regress_random_function_with_skipped_structure (int x,
+                                                    RegressSkippedStructure *foo,
+                                                    double v);
+
+/**
+ * RegressIntset:
+ *
+ * Like telepathy-glib's TpIntset.
+ *
+ */
+typedef struct _RegressIntset RegressIntset;
+
+/**
+ * RegressIntSet: (skip)
+ *
+ * Compatibility typedef, like telepathy-glib's TpIntSet
+ *
+ */
+typedef RegressIntset RegressIntSet;
+
+/**
+ * RegressPtrArrayAlias:
+ *
+ * Typedef'd GPtrArray for some reason
+ */
+typedef GPtrArray RegressPtrArrayAlias;
+
+void regress_introspectable_via_alias (RegressPtrArrayAlias *data);
+
+/**
+ * RegressVaListAlias:
+ *
+ * Typedef'd va_list for additional reasons
+ */
+typedef va_list RegressVaListAlias;
+
+void regress_not_introspectable_via_alias (RegressVaListAlias ok);
+
+/**
+ * RegressAliasedTestBoxed:
+ *
+ * Typedef TestBoxed to test caller-allocates correctness
+ */
+typedef RegressTestBoxed RegressAliasedTestBoxed;
+
+void regress_aliased_caller_alloc (RegressAliasedTestBoxed *boxed);
+
+/* private testing */
+
+typedef struct {
+  gint this_is_public_before;
+  /* < private > */
+  gint this_is_private;
+  /* < public > */
+  gint this_is_public_after;
+} RegressTestPrivateStruct;
+
+typedef enum {
+  REGRESS_TEST_PUBLIC_ENUM_BEFORE = 1 << 0,
+  /* <private> */
+  REGRESS_TEST_PRIVATE_ENUM       = 1 << 1,
+  /* <public> */
+  REGRESS_TEST_PUBLIC_ENUM_AFTER  = 1 << 2,
+} RegressTestPrivateEnum;
+
+typedef struct {
+  gint just_int;
+  gint array[10];
+} RegressTestStructFixedArray;
+
+void regress_test_struct_fixed_array_frob (RegressTestStructFixedArray *str);
+
+#define REGRESS_UTF8_CONSTANT "const \xe2\x99\xa5 utf8"
+
+#ifdef __GNUC__
+#define REGRESS_TEST_GNUC_EXTENSION_STMT(foo) (G_GNUC_EXTENSION ({ int x[10]; x[5] = 42; x[5]; }))
+#endif
+
+/* https://bugzilla.gnome.org/show_bug.cgi?id=662888 */
+#define REGRESS_LONG_STRING_CONSTANT \
+       "TYPE,VALUE,ENCODING,CHARSET,LANGUAGE,DOM,INTL,POSTAL,PARCEL," \
+       "HOME,WORK,PREF,VOICE,FAX,MSG,CELL,PAGER,BBS,MODEM,CAR,ISDN,VIDEO," \
+       "AOL,APPLELINK,ATTMAIL,CIS,EWORLD,INTERNET,IBMMAIL,MCIMAIL," \
+       "POWERSHARE,PRODIGY,TLX,X400,GIF,CGM,WMF,BMP,MET,PMB,DIB,PICT,TIFF," \
+       "PDF,PS,JPEG,QTIME,MPEG,MPEG2,AVI,WAVE,AIFF,PCM,X509,PGP"
+
+#endif /* __GITESTTYPES_H__ */
diff --git a/tests/scanner/utility.c b/tests/scanner/utility.c
new file mode 100644 (file)
index 0000000..fb1cf5a
--- /dev/null
@@ -0,0 +1,45 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+#include "utility.h"
+
+G_DEFINE_TYPE (UtilityObject, utility_object, G_TYPE_OBJECT);
+
+/**
+ * UtilityBuffer:
+ * @data: (type gpointer): the data
+ *
+ **/
+
+static void
+utility_object_class_init (UtilityObjectClass *klass)
+{
+
+}
+
+static void
+utility_object_init (UtilityObject *object)
+{
+
+}
+
+void
+utility_object_watch_dir (UtilityObject *object,
+                          const char *path,
+                          UtilityFileFunc func,
+                          gpointer user_data,
+                          GDestroyNotify destroy)
+{
+
+}
+
+/**
+ * utility_dir_foreach:
+ * @path::
+ * @func: (scope call):
+ * @user_data::
+ *
+ */
+void
+utility_dir_foreach (const char *path, UtilityFileFunc func, gpointer user_data)
+{
+
+}
diff --git a/tests/scanner/utility.h b/tests/scanner/utility.h
new file mode 100644 (file)
index 0000000..8dc6d54
--- /dev/null
@@ -0,0 +1,95 @@
+#ifndef __UTILITY_H__
+#define __UTILITY_H__
+
+#include <glib-object.h>
+
+#define UTILITY_TYPE_OBJECT              (utility_object_get_type ())
+#define UTILITY_OBJECT(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), UTILITY_TYPE_OBJECT, UtilityObject))
+#define UTILITY_IS_OBJECT(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), UTILITY_TYPE_OBJECT))
+
+typedef struct _UtilityObject          UtilityObject;
+typedef struct _UtilityObjectClass     UtilityObjectClass;
+
+struct _UtilityObject
+{
+  GObject parent_instance;
+};
+
+struct _UtilityObjectClass
+{
+  GObjectClass parent_class;
+};
+
+/* This one is similar to Pango.Glyph */
+typedef guint32 UtilityGlyph;
+
+typedef struct
+{
+  int tag;
+  union
+  {
+    gpointer v_pointer;
+    double v_real;
+    long v_integer;
+  } value;
+} UtilityTaggedValue;
+
+typedef union
+{
+  guint8 value;
+  struct
+  {
+    guint8 first_nibble : 4;
+    guint8 second_nibble : 4;
+  } parts;
+} UtilityByte;
+
+/* This one is similiar to Soup.Buffer */
+typedef struct
+{
+  const char *data;
+  gsize       length;
+} UtilityBuffer;
+
+typedef void (*UtilityFileFunc)(const char *path, gpointer user_data);
+
+GType                 utility_object_get_type          (void) G_GNUC_CONST;
+void                  utility_object_watch_dir         (UtilityObject *object,
+                                                        const char *path,
+                                                        UtilityFileFunc func,
+                                                        gpointer user_data,
+                                                        GDestroyNotify destroy);
+
+typedef enum
+{
+  UTILITY_ENUM_A,
+  UTILITY_ENUM_B,
+  UTILITY_ENUM_C
+} UtilityEnumType;
+
+/* The shift operators here should imply bitfield */ 
+typedef enum
+{
+  UTILITY_FLAG_A = 1 << 0,
+  UTILITY_FLAG_B = 1 << 1,
+  UTILITY_FLAG_C = 1 << 2
+} UtilityFlagType;
+
+typedef struct
+{
+  int field;
+  guint bitfield1 : 3;
+  guint bitfield2 : 2;
+  guint8 data[16];
+} UtilityStruct;
+
+typedef union
+{
+  char *pointer;
+  glong integer;
+  double real;
+} UtilityUnion;
+
+void utility_dir_foreach (const char *path, UtilityFileFunc func, gpointer user_data);
+
+#endif /* __UTILITY_H__ */
diff --git a/tests/warn/Makefile.am b/tests/warn/Makefile.am
new file mode 100644 (file)
index 0000000..5ca3d82
--- /dev/null
@@ -0,0 +1,22 @@
+include $(top_srcdir)/common.mk
+
+TESTS = \
+       callback-invalid-scope.h \
+       callback-missing-scope.h \
+       return-gobject.h \
+       invalid-array.h \
+       invalid-closure.h \
+       invalid-constructor.h \
+       invalid-element-type.h \
+       invalid-method.h \
+       invalid-option.h \
+       invalid-out.h \
+       invalid-transfer.h \
+       missing-element-type.h \
+       unknown-parameter.h \
+       unresolved-type.h
+
+EXTRA_DIST = warningtester.py common.h $(TESTS)
+
+TESTS_ENVIRONMENT = PYTHONPATH=$(top_builddir):$(top_srcdir) TOP_BUILDDIR=$(top_builddir) UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) $(PYTHON) $(srcdir)/warningtester.py
+
diff --git a/tests/warn/Makefile.in b/tests/warn/Makefile.in
new file mode 100644 (file)
index 0000000..7bfd9fc
--- /dev/null
@@ -0,0 +1,579 @@
+# 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@
+
+# -*- Mode: make -*-
+# Copyright 2009-2010 Johan Dahlin
+#
+# This file defines variables that are compatible with
+# Makefile.introspection, but for use within the gobject-introspection
+# module itself.
+#
+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@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+       $(top_srcdir)/common.mk
+subdir = tests/warn
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.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)/acinclude.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__tty_colors = \
+red=; grn=; lgn=; blu=; std=
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_GIR_PACKAGE = @CAIRO_GIR_PACKAGE@
+CAIRO_GOBJECT_CFLAGS = @CAIRO_GOBJECT_CFLAGS@
+CAIRO_GOBJECT_LIBS = @CAIRO_GOBJECT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CAIRO_SHARED_LIBRARY = @CAIRO_SHARED_LIBRARY@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+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@
+EXPANDED_BINDIR = @EXPANDED_BINDIR@
+EXPANDED_DATADIR = @EXPANDED_DATADIR@
+EXPANDED_LIBDIR = @EXPANDED_LIBDIR@
+EXPANDED_LIBEXECDIR = @EXPANDED_LIBEXECDIR@
+EXPANDED_LOCALSTATEDIR = @EXPANDED_LOCALSTATEDIR@
+EXPANDED_SYSCONFDIR = @EXPANDED_SYSCONFDIR@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FFI_PC_CFLAGS = @FFI_PC_CFLAGS@
+FFI_PC_LIBS = @FFI_PC_LIBS@
+FFI_PC_PACKAGES = @FFI_PC_PACKAGES@
+FGREP = @FGREP@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
+GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
+GIREPO_CFLAGS = @GIREPO_CFLAGS@
+GIREPO_LIBS = @GIREPO_LIBS@
+GIR_DIR = @GIR_DIR@
+GIR_SUFFIX = @GIR_SUFFIX@
+GLIBSRC = @GLIBSRC@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMODULE_CFLAGS = @GMODULE_CFLAGS@
+GMODULE_LIBS = @GMODULE_LIBS@
+GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
+GOBJECT_INTROSPECTION_LIBDIR = @GOBJECT_INTROSPECTION_LIBDIR@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
+GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
+GTKDOC_MKPDF = @GTKDOC_MKPDF@
+GTKDOC_REBASE = @GTKDOC_REBASE@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+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@
+POW_LIB = @POW_LIB@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_LIB_LOC = @PYTHON_LIB_LOC@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SCANNER_CFLAGS = @SCANNER_CFLAGS@
+SCANNER_LIBS = @SCANNER_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+YACC = @YACC@
+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@
+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@
+INTROSPECTION_SCANNER = \
+    env PATH=.libs:$(PATH) \
+        LPATH=.libs \
+        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
+        UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
+        $(top_builddir)/g-ir-scanner
+
+INTROSPECTION_SCANNER_ARGS = \
+    --verbose \
+    -I$(top_srcdir) \
+    --add-include-path=$(srcdir) \
+    --add-include-path=$(top_srcdir)/gir \
+    --add-include-path=$(builddir) \
+    --add-include-path=$(top_builddir)
+
+INTROSPECTION_COMPILER = \
+    env PATH=.libs:$(PATH) \
+        $(top_builddir)/g-ir-compiler$(EXEEXT)
+
+INTROSPECTION_COMPILER_ARGS = \
+    --includedir=$(srcdir) \
+    --includedir=$(top_srcdir)/gir \
+    --includedir=$(builddir) \
+    --includedir=$(top_builddir)
+
+INTROSPECTION_DOCTOOL = \
+    env PATH=.libs:$(PATH) \
+        LPATH=.libs \
+        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
+        UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
+        $(top_builddir)/g-ir-doc-tool
+
+TESTS = \
+       callback-invalid-scope.h \
+       callback-missing-scope.h \
+       return-gobject.h \
+       invalid-array.h \
+       invalid-closure.h \
+       invalid-constructor.h \
+       invalid-element-type.h \
+       invalid-method.h \
+       invalid-option.h \
+       invalid-out.h \
+       invalid-transfer.h \
+       missing-element-type.h \
+       unknown-parameter.h \
+       unresolved-type.h
+
+EXTRA_DIST = warningtester.py common.h $(TESTS)
+TESTS_ENVIRONMENT = PYTHONPATH=$(top_builddir):$(top_srcdir) TOP_BUILDDIR=$(top_builddir) UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) $(PYTHON) $(srcdir)/warningtester.py
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/common.mk $(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/warn/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign tests/warn/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:
+
+
+check-TESTS: $(TESTS)
+       @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+       srcdir=$(srcdir); export srcdir; \
+       list=' $(TESTS) '; \
+       $(am__tty_colors); \
+       if test -n "$$list"; then \
+         for tst in $$list; do \
+           if test -f ./$$tst; then dir=./; \
+           elif test -f $$tst; then dir=; \
+           else dir="$(srcdir)/"; fi; \
+           if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+             all=`expr $$all + 1`; \
+             case " $(XFAIL_TESTS) " in \
+             *[\ \     ]$$tst[\ \      ]*) \
+               xpass=`expr $$xpass + 1`; \
+               failed=`expr $$failed + 1`; \
+               col=$$red; res=XPASS; \
+             ;; \
+             *) \
+               col=$$grn; res=PASS; \
+             ;; \
+             esac; \
+           elif test $$? -ne 77; then \
+             all=`expr $$all + 1`; \
+             case " $(XFAIL_TESTS) " in \
+             *[\ \     ]$$tst[\ \      ]*) \
+               xfail=`expr $$xfail + 1`; \
+               col=$$lgn; res=XFAIL; \
+             ;; \
+             *) \
+               failed=`expr $$failed + 1`; \
+               col=$$red; res=FAIL; \
+             ;; \
+             esac; \
+           else \
+             skip=`expr $$skip + 1`; \
+             col=$$blu; res=SKIP; \
+           fi; \
+           echo "$${col}$$res$${std}: $$tst"; \
+         done; \
+         if test "$$all" -eq 1; then \
+           tests="test"; \
+           All=""; \
+         else \
+           tests="tests"; \
+           All="All "; \
+         fi; \
+         if test "$$failed" -eq 0; then \
+           if test "$$xfail" -eq 0; then \
+             banner="$$All$$all $$tests passed"; \
+           else \
+             if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+             banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+           fi; \
+         else \
+           if test "$$xpass" -eq 0; then \
+             banner="$$failed of $$all $$tests failed"; \
+           else \
+             if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+             banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+           fi; \
+         fi; \
+         dashes="$$banner"; \
+         skipped=""; \
+         if test "$$skip" -ne 0; then \
+           if test "$$skip" -eq 1; then \
+             skipped="($$skip test was not run)"; \
+           else \
+             skipped="($$skip tests were not run)"; \
+           fi; \
+           test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+             dashes="$$skipped"; \
+         fi; \
+         report=""; \
+         if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+           report="Please report to $(PACKAGE_BUGREPORT)"; \
+           test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+             dashes="$$report"; \
+         fi; \
+         dashes=`echo "$$dashes" | sed s/./=/g`; \
+         if test "$$failed" -eq 0; then \
+           echo "$$grn$$dashes"; \
+         else \
+           echo "$$red$$dashes"; \
+         fi; \
+         echo "$$banner"; \
+         test -z "$$skipped" || echo "$$skipped"; \
+         test -z "$$report" || echo "$$report"; \
+         echo "$$dashes$$std"; \
+         test "$$failed" -eq 0; \
+       else :; fi
+
+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-TESTS
+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: check-am install-am install-strip
+
+.PHONY: all all-am check check-TESTS 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
+
+
+# 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/warn/callback-invalid-scope.h b/tests/warn/callback-invalid-scope.h
new file mode 100644 (file)
index 0000000..be0ef5b
--- /dev/null
@@ -0,0 +1,31 @@
+#include "common.h"
+
+/**
+ * test_callback_invalid:
+ * @callback: (scope invalid):
+ *
+ */
+void test_callback_invalid(GCallback *callback, gpointer user_data);
+
+// EXPECT:5: Warning: Test: invalid scope annotation value: 'invalid'
+
+/**
+ * test_callback_invalid2:
+ * @callback: (scope):
+ *
+ */
+void test_callback_invalid2(GCallback *callback, gpointer user_data);
+
+// EXPECT:14: Warning: Test: scope annotation needs a value
+
+/**
+ * test_callback_invalid3:
+ * @callback: (scope invalid foo):
+ *
+ */
+void test_callback_invalid3(GCallback *callback, gpointer user_data);
+
+// EXPECT:23: Warning: Test: scope annotation needs one value, not 2
+
+// EXPECT:12: Warning: Test: test_callback_invalid2: argument callback: Missing (scope) annotation for callback without GDestroyNotify (valid: call, async)
+// EXPECT:21: Warning: Test: test_callback_invalid3: argument callback: Missing (scope) annotation for callback without GDestroyNotify (valid: call, async)
diff --git a/tests/warn/callback-missing-scope.h b/tests/warn/callback-missing-scope.h
new file mode 100644 (file)
index 0000000..7932198
--- /dev/null
@@ -0,0 +1,5 @@
+#include "common.h"
+
+void test_callback(GCallback *callback, gpointer user_data);
+
+// EXPECT:3: Warning: Test: test_callback: argument callback: Missing (scope) annotation for callback without GDestroyNotify (valid: call, async)
diff --git a/tests/warn/common.h b/tests/warn/common.h
new file mode 100644 (file)
index 0000000..8ea62fa
--- /dev/null
@@ -0,0 +1 @@
+#include <glib-object.h>
diff --git a/tests/warn/invalid-array.h b/tests/warn/invalid-array.h
new file mode 100644 (file)
index 0000000..a4a4e47
--- /dev/null
@@ -0,0 +1,44 @@
+#include "common.h"
+
+/**
+ * test_invalid_array:
+ * @out1: (array foobar):
+ **/
+void
+test_invalid_array (char ***out1);
+
+// EXPECT:5: Warning: Test: invalid array annotation value: 'foobar'
+
+/**
+ * test_invalid_array_zero_terminated:
+ * @out1: (array zero-terminated):
+ * @out2: (array zero-terminated=foobar):
+ **/
+void
+test_invalid_array_zero_terminated (char ***out1,
+                                    char ***out2);
+
+// EXPECT:14: Warning: Test: array option zero-terminated needs a value
+// EXPECT:15: Warning: Test: invalid array zero-terminated option value 'foobar', must be an integer
+
+/**
+ * test_invalid_array_fixed_size:
+ * @out1: (array fixed-size):
+ * @out2: (array fixed-size=foobar):
+ **/
+void
+test_invalid_array_fixed_size (char ***out1,
+                               char ***out2);
+
+// EXPECT:26: Warning: Test: array option fixed-size needs a value
+// EXPECT:27: Warning: Test: invalid array fixed-size option value 'foobar', must be an integer
+
+/**
+ * test_invalid_array_length:
+ * @out1: (array length):
+ **/
+void
+test_invalid_array_length (char ***out1,
+                           char ***out2);
+
+// EXPECT:38: Warning: Test: array option length needs a value
diff --git a/tests/warn/invalid-closure.h b/tests/warn/invalid-closure.h
new file mode 100644 (file)
index 0000000..fcaf093
--- /dev/null
@@ -0,0 +1,8 @@
+
+/**
+ * test_invalid_closure:
+ * @param: (closure a b):
+ */
+void test_invalid_closure(int param);
+
+// EXPECT:4: Warning: Test: closure takes at maximium 1 value, 2 given
diff --git a/tests/warn/invalid-constructor.h b/tests/warn/invalid-constructor.h
new file mode 100644 (file)
index 0000000..a80d79e
--- /dev/null
@@ -0,0 +1,18 @@
+#include "common.h"
+
+/**
+ * test_constructor_invalid_return: (constructor)
+ *
+ */
+int test_constructor_invalid_return();
+
+// EXPECT:7: Warning: Test: test_constructor_invalid_return: Constructors must return an instance of their class
+
+/**
+ * test_constructor_invalid_return_pointer: (constructor)
+ *
+ */
+GClosure *test_constructor_invalid_return_pointer();
+
+// EXPECT:15: Warning: Test: test_constructor_invalid_return_pointer: Constructors must belong to the same namespace as the class they belong to
+
diff --git a/tests/warn/invalid-element-type.h b/tests/warn/invalid-element-type.h
new file mode 100644 (file)
index 0000000..a3e71f5
--- /dev/null
@@ -0,0 +1,82 @@
+#include "common.h"
+
+/**
+ * test_invalid_list_element_type:
+ * @l1: (element-type):
+ * @l2: (element-type int int):
+ */
+
+void test_invalid_list_element_type(GList *l1, GList *l2);
+
+// EXPECT:5: Warning: Test: element-type annotation needs a value
+// EXPECT:5: Warning: Test: element-type takes at least one value, none given
+
+/**
+ * test_invalid_array_element_type:
+ * @a1: (element-type):
+ * @a2: (element-type int int):
+ */
+
+void test_invalid_array_element_type(const char *a1, const char *a2);
+
+// EXPECT:16: Warning: Test: element-type annotation needs a value
+// EXPECT:16: Warning: Test: element-type takes at least one value, none given
+
+/**
+ * test_invalid_hash_element_type:
+ * @h1: (element-type):
+ * @h2: (element-type int):
+ * @h3: (element-type int int int):
+ */
+
+void test_invalid_hash_element_type(GHashTable *h1, GHashTable *h2, GHashTable *h3);
+
+// EXPECT:27: Warning: Test: element-type annotation needs a value
+// EXPECT:27: Warning: Test: element-type takes at least one value, none given
+// EXPECT:29: Warning: Test: element-type takes at maximium 2 values, 3 given
+
+/**
+ * test_invalid_bytearray_element_type:
+ * @b1: (element-type):
+ * @b2: (element-type int):
+ */
+
+void test_invalid_bytearray_element_type(GByteArray *b1, GByteArray *b2);
+
+// EXPECT:40: Warning: Test: element-type annotation needs a value
+// EXPECT:40: Warning: Test: element-type takes at least one value, none given
+
+/**
+ * test_invalid_ptrarray_element_type:
+ * @p1: (element-type):
+ * @p2: (element-type int):
+ */
+
+void test_invalid_ptrarray_element_type(GPtrArray *p1, GPtrArray *p2);
+
+// EXPECT:51: Warning: Test: element-type annotation needs a value
+// EXPECT:51: Warning: Test: element-type takes at least one value, none given
+
+/**
+ * test_unresolved_element_type:
+ *
+ * Returns: (element-type Unresolved) (transfer full):
+ */
+
+GList* test_unresolved_element_type(void);
+
+
+// EXPECT:5: Warning: Test: element-type annotation takes at least one option, none given
+// EXPECT:6: Warning: Test: element-type annotation for a list must have exactly one option, not 2 options
+// EXPECT:16: Warning: Test: element-type annotation takes at least one option, none given
+// EXPECT:20: Warning: Test: Unknown container Type(target_fundamental=utf8, ctype=char*) for element-type annotation
+// EXPECT:27: Warning: Test: element-type annotation takes at least one option, none given
+// EXPECT:28: Warning: Test: element-type annotation for a hash table must have exactly two options, not 1 option(s)
+// EXPECT:29: Warning: Test: element-type annotation for a hash table must have exactly two options, not 3 option(s)
+// EXPECT:40: Warning: Test: element-type annotation takes at least one option, none given
+// EXPECT:41: Warning: Test: invalid (element-type) for a GByteArray, must be one of guint8, gint8 or gchar
+// EXPECT:51: Warning: Test: element-type annotation takes at least one option, none given
+// EXPECT:52: Warning: Test: invalid (element-type) for a GPtrArray, must be a pointer
+// EXPECT:63: Warning: Test: test_unresolved_element_type: Unknown type: 'Unresolved'
+// EXPECT:3: Warning: Test: test_invalid_list_element_type: argument l1: Missing (element-type) annotation
+// EXPECT:3: Warning: Test: test_invalid_list_element_type: argument l2: Missing (element-type) annotation
diff --git a/tests/warn/invalid-method.h b/tests/warn/invalid-method.h
new file mode 100644 (file)
index 0000000..f0ee727
--- /dev/null
@@ -0,0 +1,26 @@
+#include "common.h"
+
+/**
+ * test_method_no_parameters: (method)
+ *
+ */
+void test_method_no_parameters();
+
+// EXPECT:7: Warning: Test: test_method_no_parameters: Methods must have parameters
+
+/**
+ * test_method_invalid_first_parameter: (method):
+ *
+ */
+void test_method_invalid_first_parameter(int param);
+
+// EXPECT:15: Warning: Test: test_method_invalid_first_parameter: Methods must have a pointer as their first parameter
+
+/**
+ * test_method_invalid_namespace: (method):
+ *
+ */
+void test_method_invalid_namespace(GClosure *param);
+
+// EXPECT:23: Warning: Test: test_method_invalid_namespace: Methods must belong to the same namespace as the class they belong to
+
diff --git a/tests/warn/invalid-option.h b/tests/warn/invalid-option.h
new file mode 100644 (file)
index 0000000..41985a0
--- /dev/null
@@ -0,0 +1,15 @@
+
+/**
+ * func:
+ * @param: (invalid-annotation-option): sizeof (x) == 1
+ */
+void test_func(int param);
+
+// EXPECT:4: Warning: Test: invalid annotation option: invalid-annotation-option
+
+/**
+ * func_weird_gtk_doc:
+ * @param: Foo (e.g. bar) baz:
+ * @param2: This is a (bar):
+ */
+void test_func_weird_gtk_doc(int param, int param2);
diff --git a/tests/warn/invalid-out.h b/tests/warn/invalid-out.h
new file mode 100644 (file)
index 0000000..fcb4f70
--- /dev/null
@@ -0,0 +1,8 @@
+/**
+ * test_invalid_out:
+ * @out: (out invalid):
+ */
+
+void test_invalid_out(int *out);
+
+// EXPECT:3: Warning: Test: out annotation value is invalid: 'invalid'
diff --git a/tests/warn/invalid-transfer.h b/tests/warn/invalid-transfer.h
new file mode 100644 (file)
index 0000000..3579ad1
--- /dev/null
@@ -0,0 +1,12 @@
+
+/**
+ * test_transfer_invalid:
+ * @param: (transfer):
+ * @param2: (transfer invalid):
+ * @param3: (transfer full foo):
+ */
+void test_transfer_invalid(int param, int param2, int param3);
+
+// EXPECT:4: Warning: Test: transfer annotation needs a value
+// EXPECT:5: Warning: Test: invalid transfer annotation value: 'invalid'
+// EXPECT:6: Warning: Test: transfer annotation needs one value, not 2
diff --git a/tests/warn/missing-element-type.h b/tests/warn/missing-element-type.h
new file mode 100644 (file)
index 0000000..1f958a7
--- /dev/null
@@ -0,0 +1,10 @@
+#include "common.h"
+
+/**
+ * test_gslist_element_type:
+ *
+ * Returns: (transfer none): Some stuff
+ */
+GSList *test_gslist_element_type(void);
+
+// EXPECT:6: Warning: Test: test_gslist_element_type: return value: Missing (element-type) annotation
diff --git a/tests/warn/return-gobject.h b/tests/warn/return-gobject.h
new file mode 100644 (file)
index 0000000..5e621c3
--- /dev/null
@@ -0,0 +1,13 @@
+#include "common.h"
+
+GObject * test_get_object(void);
+
+// EXPECT:3: Warning: Test: test_get_object: return value: Missing (transfer) annotation
+
+/**
+ * test_get_object2:
+ *
+ */
+GObject * test_get_object2(void);
+
+// EXPECT:7: Warning: Test: test_get_object2: return value: Missing (transfer) annotation
diff --git a/tests/warn/unknown-parameter.h b/tests/warn/unknown-parameter.h
new file mode 100644 (file)
index 0000000..3d339b3
--- /dev/null
@@ -0,0 +1,48 @@
+/* See https://bugzilla.gnome.org/show_bug.cgi?id=629708 */
+
+/**
+ * test_param_mismatch:
+ * @wrong_name: (out):
+ *
+ */
+void test_param_mismatch(int *out);
+
+// EXPECT:5: Warning: Test: test_param_mismatch: unknown parameter 'wrong_name' in documentation comment, should be 'out'
+
+/**
+ * test_param_mismatch2:
+ * @wrong_name2: (out):
+ *
+ */
+void test_param_mismatch2(int a, int *out2);
+
+// EXPECT:14: Warning: Test: test_param_mismatch2: unknown parameter 'wrong_name2' in documentation comment, should be one of 'a', 'out2'
+
+/**
+ * test_param_mismatch3:
+ * @a: an integer
+ * @wrong_name3: (out):
+ *
+ */
+void test_param_mismatch3(int a, int *out3);
+
+// EXPECT:24: Warning: Test: test_param_mismatch3: unknown parameter 'wrong_name3' in documentation comment, should be 'out3'
+
+/**
+ * test_param_missing:
+ * @missing: (out):
+ *
+ */
+void test_param_missing(void);
+
+// EXPECT:33: Warning: Test: test_param_missing: unknown parameter 'missing' in documentation comment
+
+
+/**
+ * test_param_vargs:
+ * @...: The varargs
+ *
+ */
+void test_param_varargs(int i, ...);
+
+// Should not warn
diff --git a/tests/warn/unresolved-type.h b/tests/warn/unresolved-type.h
new file mode 100644 (file)
index 0000000..d20182c
--- /dev/null
@@ -0,0 +1,23 @@
+#include "common.h"
+
+typedef struct {
+   int i;
+} MyStruct;
+
+// EXPECT:5: Warning: Test: symbol='MyStruct': Unknown namespace for identifier 'MyStruct'
+
+typedef enum {
+  TEST_MY_ENUM_A = 0
+} MyEnum;
+
+// EXPECT:11: Warning: Test: symbol='MyEnum': Unknown namespace for identifier 'MyEnum'
+
+typedef enum {
+  MY_ENUM_A = 0
+} TestMyEnum2;
+
+// EXPECT:17: Warning: Test: symbol='TestMyEnum2': Unknown namespace for symbol 'MY_ENUM_A'
+
+/* Stub function here so namespace isn't empty */
+void test_foo (void);
+
diff --git a/tests/warn/warningtester.py b/tests/warn/warningtester.py
new file mode 100644 (file)
index 0000000..3ad4b8a
--- /dev/null
@@ -0,0 +1,130 @@
+import difflib
+import os
+import os.path
+import sys
+from StringIO import StringIO
+import __builtin__
+
+path=os.getenv('UNINSTALLED_INTROSPECTION_SRCDIR', None)
+assert path is not None
+sys.path.insert(0, path)
+
+# Not correct, but enough to get the tests going uninstalled
+__builtin__.__dict__['DATADIR'] = path
+
+from giscanner.annotationparser import AnnotationParser
+from giscanner.ast import Include, Namespace
+from giscanner.introspectablepass import IntrospectablePass
+from giscanner.maintransformer import MainTransformer
+from giscanner.message import MessageLogger
+from giscanner.sourcescanner import SourceScanner
+from giscanner.transformer import Transformer
+from giscanner.scannermain import process_packages
+
+currentdir = os.path.dirname(os.path.abspath(sys.argv[0]))
+current_name = os.path.basename(currentdir)
+path = os.path.abspath(os.path.join(currentdir, '..', ''))
+top_srcdir = os.environ['UNINSTALLED_INTROSPECTION_SRCDIR']
+top_builddir = os.environ['TOP_BUILDDIR']
+
+class Options:
+    def __init__(self):
+        self.cpp_includes = []
+        self.cpp_defines = []
+        self.cpp_undefines = []
+        self.library_paths = []
+
+def _diff(orig, new, short):
+    def _tolines(s):
+        return [s + '\n' for line in s.split('\n')]
+    lines = difflib.unified_diff(_tolines(orig),
+                                 _tolines(new))
+    if not lines:
+        return
+
+    diff = False
+    try:
+        first = lines.next()
+        diff = True
+    except StopIteration:
+        pass
+    else:
+        print 'ERROR: while comparing %s:' % (short, )
+        for line in list(lines)[2:]:
+            print '%s: %r' % (short, line[:-1])
+
+    return diff
+
+def _extract_expected(filename):
+    fd = open(filename)
+    data = fd.read()
+
+    retval = []
+    for line in data.split('\n'):
+        if line.startswith('// EXPECT:'):
+            sort_key = None
+            if ":" in line:
+                try:
+                    sort_key = int(line.split(":")[1])
+                except ValueError:
+                    pass
+            retval.append((sort_key, line[10:]))
+    return retval
+
+def check(args):
+    filename = args[0]
+
+    output = StringIO()
+    namespace = Namespace("Test", "1.0")
+    logger = MessageLogger.get(namespace=namespace,
+                               output=output)
+    logger.enable_warnings(True)
+    transformer = Transformer(namespace)
+    transformer.set_include_paths([os.path.join(top_srcdir, 'gir'), top_builddir])
+    transformer.register_include(Include.from_string("GObject-2.0"))
+
+    ss = SourceScanner()
+
+    options = Options()
+    exit_code = process_packages(options, ['gobject-2.0'])
+    if exit_code:
+        sys.exit(exit_code)
+    ss.set_cpp_options(options.cpp_includes,
+                       options.cpp_defines,
+                       options.cpp_undefines)
+    ss.parse_files([filename])
+    ss.parse_macros([filename])
+    transformer.parse(ss.get_symbols())
+
+    ap = AnnotationParser()
+    blocks = ap.parse(ss.get_comments())
+
+    main = MainTransformer(transformer, blocks)
+    main.transform()
+
+    final = IntrospectablePass(transformer, blocks)
+    final.validate()
+
+    raw = output.getvalue()
+    if raw.endswith('\n'):
+        raw = raw[:-1]
+    warnings = raw.split('\n')
+
+    failed_tests = 0
+    expected_warnings = _extract_expected(filename)
+    if '' in warnings:
+        warnings.remove('')
+    if len(expected_warnings) != len(warnings):
+        raise SystemExit(
+            "ERROR in %r: expected %d warnings, but got %d:\n"
+            "----\nexpected:\n%s\n----\ngot:\n%s\n----" % (
+            os.path.basename(filename),
+            len(expected_warnings), len(warnings),
+            '\n'.join([w[1] for w in expected_warnings]),
+            '\n'.join([w.split(':', 2)[2][1:] for w in warnings])))
+    for warning, (sort_key, expected) in zip(warnings, expected_warnings):
+        actual = warning.split(":", 1)[1]
+        if _diff(expected, actual, filename):
+            raise SystemExit("ERROR: tests %r failed" % (filename, ))
+
+sys.exit(check(sys.argv[1:]))
diff --git a/tools/compiler.c b/tools/compiler.c
new file mode 100644 (file)
index 0000000..7e17f1b
--- /dev/null
@@ -0,0 +1,233 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: Typelib compiler
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ *
+ * 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 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.
+ */
+
+#include <errno.h>
+#include <string.h>
+
+#include <glib.h>
+#include <glib/gstdio.h>
+#include <gio/gio.h>
+
+#ifdef G_OS_WIN32
+#include <io.h>
+#include <fcntl.h>
+#endif
+
+#include "girmodule.h"
+#include "girnode.h"
+#include "girparser.h"
+#include "gitypelib-internal.h"
+
+gboolean no_init = FALSE;
+gchar **includedirs = NULL;
+gchar **input = NULL;
+gchar *output = NULL;
+gchar *mname = NULL;
+gchar *shlib = NULL;
+gboolean include_cwd = FALSE;
+gboolean debug = FALSE;
+gboolean verbose = FALSE;
+
+static gboolean
+write_out_typelib (gchar *prefix,
+                  GITypelib *typelib)
+{
+  FILE *file;
+  gsize written;
+  GFile *file_obj;
+  gchar *filename;
+  GFile *tmp_file_obj;
+  gchar *tmp_filename;
+  GError *error = NULL;
+  gboolean success = FALSE;
+
+  if (output == NULL)
+    {
+      file = stdout;
+      file_obj = NULL;
+      filename = NULL;
+      tmp_filename = NULL;
+      tmp_file_obj = NULL;
+#ifdef G_OS_WIN32
+      setmode (fileno (file), _O_BINARY);
+#endif
+    }
+  else
+    {
+      if (prefix)
+       filename = g_strdup_printf ("%s-%s", prefix, output);  
+      else
+       filename = g_strdup (output);
+      file_obj = g_file_new_for_path (filename);
+      tmp_filename = g_strdup_printf ("%s.tmp", filename);
+      tmp_file_obj = g_file_new_for_path (tmp_filename);
+      file = g_fopen (tmp_filename, "wb");
+
+      if (file == NULL)
+       {
+          g_fprintf (stderr, "failed to open '%s': %s\n",
+                     tmp_filename, g_strerror (errno));
+          goto out;
+       }
+    }
+
+  written = fwrite (typelib->data, 1, typelib->len, file);
+  if (written < typelib->len) {
+    g_fprintf (stderr, "ERROR: Could not write the whole output: %s",
+              strerror(errno));
+    goto out;
+  }
+
+  if (output != NULL)
+    fclose (file);
+  if (tmp_filename != NULL)
+    {
+      if (!g_file_move (tmp_file_obj, file_obj, G_FILE_COPY_OVERWRITE, NULL, NULL, NULL, &error))
+        {
+         g_fprintf (stderr, "ERROR: failed to rename %s to %s: %s", tmp_filename, filename, error->message);
+          g_clear_error (&error);
+         goto out;
+        }
+    }
+  success = TRUE;
+out:
+  g_free (filename);
+  g_free (tmp_filename);
+
+  return success;
+}
+
+GLogLevelFlags logged_levels;
+
+static void log_handler (const gchar *log_domain,
+                        GLogLevelFlags log_level,
+                        const gchar *message,
+                        gpointer user_data)
+{
+  
+  if (log_level & logged_levels)
+    g_log_default_handler (log_domain, log_level, message, user_data);
+}
+
+static GOptionEntry options[] = 
+{
+  { "no-init", 0, 0, G_OPTION_ARG_NONE, &no_init, "do not create _init() function", NULL },
+  { "includedir", 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &includedirs, "include directories in GIR search path", NULL }, 
+  { "output", 'o', 0, G_OPTION_ARG_FILENAME, &output, "output file", "FILE" }, 
+  { "module", 'm', 0, G_OPTION_ARG_STRING, &mname, "module to compile", "NAME" }, 
+  { "shared-library", 'l', 0, G_OPTION_ARG_FILENAME, &shlib, "shared library", "FILE" }, 
+  { "debug", 0, 0, G_OPTION_ARG_NONE, &debug, "show debug messages", NULL }, 
+  { "verbose", 0, 0, G_OPTION_ARG_NONE, &verbose, "show verbose messages", NULL }, 
+  { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &input, NULL, NULL },
+  { NULL, }
+};
+
+int
+main (int argc, char ** argv)
+{
+  GOptionContext *context;
+  GError *error = NULL;
+  GIrParser *parser;
+  GIrModule *module;
+  gint i;
+  g_typelib_check_sanity ();
+
+  context = g_option_context_new ("");
+  g_option_context_add_main_entries (context, options, NULL);
+  g_option_context_parse (context, &argc, &argv, &error);
+  g_option_context_free (context);
+
+  logged_levels = G_LOG_LEVEL_MASK & ~(G_LOG_LEVEL_MESSAGE|G_LOG_LEVEL_DEBUG);
+  if (debug)
+    logged_levels = logged_levels | G_LOG_LEVEL_DEBUG;
+  if (verbose)
+    logged_levels = logged_levels | G_LOG_LEVEL_MESSAGE;
+  g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL);
+
+  g_log_set_default_handler (log_handler, NULL);
+
+  if (!input) 
+    { 
+      g_fprintf (stderr, "no input files\n"); 
+
+      return 1;
+    }
+
+  g_debug ("[parsing] start, %d includes", 
+          includedirs ? g_strv_length (includedirs) : 0);
+
+  g_type_init ();
+
+  if (includedirs != NULL)
+    for (i = 0; includedirs[i]; i++)
+      g_irepository_prepend_search_path (includedirs[i]);
+
+  parser = _g_ir_parser_new ();
+
+  _g_ir_parser_set_includes (parser, (const char*const*) includedirs);
+
+  module = _g_ir_parser_parse_file (parser, input[0], &error);
+  if (module == NULL) 
+    {
+      g_fprintf (stderr, "error parsing file %s: %s\n", 
+                input[0], error->message);
+      
+      return 1;
+    }
+
+  g_debug ("[parsing] done");
+
+  g_debug ("[building] start");
+
+  {
+      GITypelib *typelib;
+
+      if (shlib)
+       {
+          if (module->shared_library)
+           g_free (module->shared_library);
+          module->shared_library = g_strdup (shlib);
+       }
+
+      g_debug ("[building] module %s", module->name);
+
+      typelib = _g_ir_module_build_typelib (module);
+      if (typelib == NULL)
+       g_error ("Failed to build typelib for module '%s'\n", module->name);
+      if (!g_typelib_validate (typelib, &error))
+       g_error ("Invalid typelib for module '%s': %s", 
+                module->name, error->message);
+
+      if (!write_out_typelib (NULL, typelib))
+       return 1;
+      g_typelib_free (typelib);
+      typelib = NULL;
+    }
+
+  g_debug ("[building] done");
+
+#if 0
+  /* No point */
+  _g_ir_parser_free (parser);
+#endif  
+
+  return 0; 
+}
diff --git a/tools/g-ir-annotation-tool.in b/tools/g-ir-annotation-tool.in
new file mode 100755 (executable)
index 0000000..5668cbe
--- /dev/null
@@ -0,0 +1,46 @@
+#!@PYTHON@
+# -*- Mode: Python -*-
+# GObject-Introspection - a framework for introspecting GObject libraries
+# Copyright (C) 2008  Johan Dahlin
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+
+import os
+import sys
+import __builtin__
+
+__builtin__.__dict__['DATADIR'] = "@datarootdir@"
+
+if 'GI_SCANNER_DEBUG' in os.environ:
+    def on_exception(exctype, value, tb):
+        print "Caught exception: %r %r" % (exctype, value)
+        import pdb
+        pdb.pm()
+    sys.excepthook = on_exception
+
+srcdir=os.getenv('UNINSTALLED_INTROSPECTION_SRCDIR', None)
+if srcdir is not None:
+    path = srcdir
+else:
+    # This is a private directory, we don't want to pollute the global
+    # namespace.
+    path = os.path.join('@libdir@', 'gobject-introspection')
+sys.path.insert(0, path)
+
+from giscanner.annotationmain import annotation_main
+
+sys.exit(annotation_main(sys.argv))
diff --git a/tools/g-ir-doc-tool.in b/tools/g-ir-doc-tool.in
new file mode 100644 (file)
index 0000000..4a84afa
--- /dev/null
@@ -0,0 +1,46 @@
+#!@PYTHON@
+# -*- Mode: Python -*-
+# GObject-Introspection - a framework for introspecting GObject libraries
+# Copyright (C) 2008  Johan Dahlin
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+
+import os
+import sys
+import __builtin__
+
+__builtin__.__dict__['DATADIR'] = "@datarootdir@"
+
+if 'GI_SCANNER_DEBUG' in os.environ:
+    def on_exception(exctype, value, tb):
+        print "Caught exception: %r %r" % (exctype, value)
+        import pdb
+        pdb.pm()
+    sys.excepthook = on_exception
+
+srcdir = os.getenv('UNINSTALLED_INTROSPECTION_SRCDIR', None)
+if srcdir is not None:
+    path = srcdir
+else:
+    # This is a private directory, we don't want to pollute the global
+    # namespace.
+    path = os.path.join('@libdir@', 'gobject-introspection')
+sys.path.insert(0, path)
+
+from giscanner.docmain import doc_main
+
+sys.exit(doc_main(sys.argv))
diff --git a/tools/g-ir-scanner.in b/tools/g-ir-scanner.in
new file mode 100755 (executable)
index 0000000..f709683
--- /dev/null
@@ -0,0 +1,46 @@
+#!@PYTHON@
+# -*- Mode: Python -*-
+# GObject-Introspection - a framework for introspecting GObject libraries
+# Copyright (C) 2008  Johan Dahlin
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+
+import os
+import sys
+import __builtin__
+
+__builtin__.__dict__['DATADIR'] = "@datarootdir@"
+
+if 'GI_SCANNER_DEBUG' in os.environ:
+    def on_exception(exctype, value, tb):
+        print "Caught exception: %r %r" % (exctype, value)
+        import pdb
+        pdb.pm()
+    sys.excepthook = on_exception
+
+srcdir = os.getenv('UNINSTALLED_INTROSPECTION_SRCDIR', None)
+if srcdir is not None:
+    path = srcdir
+else:
+    # This is a private directory, we don't want to pollute the global
+    # namespace.
+    path = os.path.join('@libdir@', 'gobject-introspection')
+sys.path.insert(0, path)
+
+from giscanner.scannermain import scanner_main
+
+sys.exit(scanner_main(sys.argv))
diff --git a/tools/generate.c b/tools/generate.c
new file mode 100644 (file)
index 0000000..0426512
--- /dev/null
@@ -0,0 +1,112 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ * GObject introspection: IDL generator
+ *
+ * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008,2009 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#include <glib.h>
+#include <glib/gstdio.h>
+#include <gmodule.h>
+
+#include "girwriter.h"
+#include "girepository.h"
+#include "gitypelib-internal.h"
+
+int
+main (int argc, char *argv[])
+{
+  gboolean shlib = FALSE;
+  gchar *output = NULL;
+  gchar **includedirs = NULL;
+  gboolean show_all = FALSE;
+  gchar **input = NULL;
+  GOptionContext *context;
+  GError *error = NULL;
+  gboolean needs_prefix;
+  gint i;
+  GOptionEntry options[] =
+    {
+      { "shlib", 0, 0, G_OPTION_ARG_NONE, &shlib, "handle typelib embedded in shlib", NULL },
+      { "output", 'o', 0, G_OPTION_ARG_FILENAME, &output, "output file", "FILE" },
+      { "includedir", 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &includedirs, "include directories in GIR search path", NULL },
+      { "all", 0, 0, G_OPTION_ARG_NONE, &show_all, "show all available information", NULL, },
+      { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &input, NULL, NULL },
+      { NULL, }
+    };
+
+  g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL);
+
+  g_type_init ();
+
+  g_typelib_check_sanity ();
+
+  context = g_option_context_new ("");
+  g_option_context_add_main_entries (context, options, NULL);
+  g_option_context_parse (context, &argc, &argv, &error);
+
+  if (!input)
+    {
+      g_fprintf (stderr, "no input files\n");
+
+      return 1;
+    }
+
+  if (includedirs != NULL)
+    for (i = 0; includedirs[i]; i++)
+      g_irepository_prepend_search_path (includedirs[i]);
+
+  for (i = 0; input[i]; i++)
+    {
+      GError *error = NULL;
+      const char *namespace;
+      GMappedFile *mfile;
+      GITypelib *typelib;
+
+      mfile = g_mapped_file_new (input[i], FALSE, &error);
+      if (!mfile)
+       g_error ("failed to read '%s': %s", input[i], error->message);
+
+      if (input[i + 1] && output)
+       needs_prefix = TRUE;
+      else
+       needs_prefix = FALSE;
+
+      typelib = g_typelib_new_from_mapped_file (mfile, &error);
+      if (!typelib)
+       g_error ("failed to create typelib '%s': %s", input[i], error->message);
+
+      namespace = g_irepository_load_typelib (g_irepository_get_default (), typelib, 0,
+                                             &error);
+      if (namespace == NULL)
+       g_error ("failed to load typelib: %s", error->message);
+      
+      gir_writer_write (output, namespace, needs_prefix, show_all);
+
+      /* when writing to stdout, stop after the first module */
+      if (input[i + 1] && !output)
+       {
+         g_fprintf (stderr, "warning, %d modules omitted\n",
+                    g_strv_length (input) - 1);
+
+         break;
+       }
+    }
+
+  return 0;
+}